diff options
Diffstat (limited to 'plugins/jetpack/jetpack_vendor')
401 files changed, 34606 insertions, 1753 deletions
diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-a8c-mc-stats/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-a8c-mc-stats/CHANGELOG.md index 15ab7fa5..a1251200 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-a8c-mc-stats/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-a8c-mc-stats/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.4.13] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.4.12] - 2022-01-25 +### Changed +- Updated package dependencies. + ## [1.4.11] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -83,6 +91,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Creates the MC Stats package +[1.4.13]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.12...v1.4.13 +[1.4.12]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.11...v1.4.12 [1.4.11]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.10...v1.4.11 [1.4.10]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.9...v1.4.10 [1.4.9]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.8...v1.4.9 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-abtest/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-abtest/CHANGELOG.md index cdd96d24..b2b15668 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-abtest/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-abtest/CHANGELOG.md @@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.10.0] - 2022-05-04 +### Changed +- Updated package dependencies. [#24095] + +## [1.9.23] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.9.22] - 2022-04-19 +### Changed +- Updated package dependencies. + +## [1.9.21] - 2022-03-02 +### Changed +- Updated package dependencies. + +## [1.9.20] - 2022-01-25 +### Changed +- Updated package dependencies. + +## [1.9.19] - 2022-01-18 +### Changed +- Updated package dependencies. + ## [1.9.18] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -204,6 +228,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Packages: Introduce a simple A/B test package +[1.10.0]: https://github.com/Automattic/jetpack-abtest/compare/v1.9.23...v1.10.0 +[1.9.23]: https://github.com/Automattic/jetpack-abtest/compare/v1.9.22...v1.9.23 +[1.9.22]: https://github.com/Automattic/jetpack-abtest/compare/v1.9.21...v1.9.22 +[1.9.21]: https://github.com/Automattic/jetpack-abtest/compare/v1.9.20...v1.9.21 +[1.9.20]: https://github.com/Automattic/jetpack-abtest/compare/v1.9.19...v1.9.20 +[1.9.19]: https://github.com/Automattic/jetpack-abtest/compare/v1.9.18...v1.9.19 [1.9.18]: https://github.com/Automattic/jetpack-abtest/compare/v1.9.17...v1.9.18 [1.9.17]: https://github.com/Automattic/jetpack-abtest/compare/v1.9.16...v1.9.17 [1.9.16]: https://github.com/Automattic/jetpack-abtest/compare/v1.9.15...v1.9.16 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-admin-ui/.phpcs.dir.xml b/plugins/jetpack/jetpack_vendor/automattic/jetpack-admin-ui/.phpcs.dir.xml new file mode 100644 index 00000000..8ebbc7cd --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-admin-ui/.phpcs.dir.xml @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<ruleset> + + <rule ref="WordPress.WP.I18n"> + <properties> + <property name="text_domain" type="array"> + <element value="jetpack-admin-ui" /> + </property> + </properties> + </rule> + <rule ref="Jetpack.Functions.I18n"> + <properties> + <property name="text_domain" value="jetpack-admin-ui" /> + </properties> + </rule> + + <rule ref="WordPress.Utils.I18nTextDomainFixer"> + <properties> + <property name="old_text_domain" type="array" /> + <property name="new_text_domain" value="jetpack-admin-ui" /> + </properties> + </rule> + +</ruleset> diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-admin-ui/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-admin-ui/CHANGELOG.md index 6215e5c5..f527e27b 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-admin-ui/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-admin-ui/CHANGELOG.md @@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.7] - 2022-04-26 +### Changed +- Update package.json metadata. + +## [0.2.6] - 2022-04-05 +### Changed +- Updated package dependencies. + +## [0.2.5] - 2022-03-08 +### Fixed +- Do not handle Akismet submenu if Jetpack plugin is present + +## [0.2.4] - 2022-02-09 +### Added +- Support for akismet menu with stand-alone plugins + +### Fixed +- Fixes menu order working around a bug in add_submenu_page + +## [0.2.3] - 2022-01-25 +### Changed +- Updated package dependencies. + +## [0.2.2] - 2022-01-18 +### Changed +- General: update required node version to v16.13.2 + ## [0.2.1] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -29,6 +56,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixing menu visibility issues. +[0.2.7]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.6...0.2.7 +[0.2.6]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.5...0.2.6 +[0.2.5]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.4...0.2.5 +[0.2.4]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.3...0.2.4 +[0.2.3]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.2...0.2.3 +[0.2.2]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.1...0.2.2 [0.2.1]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.0...0.2.1 [0.2.0]: https://github.com/Automattic/jetpack-admin-ui/compare/0.1.1...0.2.0 [0.1.1]: https://github.com/Automattic/jetpack-admin-ui/compare/0.1.0...0.1.1 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php index 140b40f6..fd54f4ab 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php @@ -13,7 +13,7 @@ namespace Automattic\Jetpack\Admin_UI; */ class Admin_Menu { - const PACKAGE_VERSION = '0.2.1'; + const PACKAGE_VERSION = '0.2.7'; /** * Whether this class has been initialized @@ -37,11 +37,35 @@ class Admin_Menu { public static function init() { if ( ! self::$initialized ) { self::$initialized = true; + self::handle_akismet_menu(); add_action( 'admin_menu', array( __CLASS__, 'admin_menu_hook_callback' ), 1000 ); // Jetpack uses 998. } } /** + * Handles the Akismet menu item when used alongside other stand-alone plugins + * + * When Jetpack plugin is present, Akismet menu item is moved under the Jetpack top level menu, but if Akismet is active alongside other stand-alone plugins, + * we use this method to move the menu item. + */ + private static function handle_akismet_menu() { + if ( ! class_exists( 'Jetpack' ) && class_exists( 'Akismet_Admin' ) ) { + // Prevent Akismet from adding a menu item. + add_action( + 'admin_menu', + function () { + remove_action( 'admin_menu', array( 'Akismet_Admin', 'admin_menu' ), 5 ); + }, + 4 + ); + + // Add an Anti-spam menu item for Jetpack. + self::add_menu( __( 'Anti-Spam', 'jetpack-admin-ui' ), __( 'Anti-Spam', 'jetpack-admin-ui' ), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) ); + + } + } + + /** * Enqueue styles for the top level menu * * @return void @@ -80,6 +104,22 @@ class Admin_Menu { $can_see_toplevel_menu = false; } + /** + * The add_sub_menu function has a bug and will not keep the right order of menu items. + * + * @see https://core.trac.wordpress.org/ticket/52035 + * Let's order the items before registering them. + * Since this all happens after the Jetpack plugin menu items were added, all items will be added after Jetpack plugin items - unless position is very low number (smaller than the number of menu items present in Jetpack plugin). + */ + usort( + self::$menu_items, + function ( $a, $b ) { + $position_a = empty( $a['position'] ) ? 0 : $a['position']; + $position_b = empty( $b['position'] ) ? 0 : $b['position']; + return $position_a - $position_b; + } + ); + foreach ( self::$menu_items as $menu_item ) { if ( ! current_user_can( $menu_item['capability'] ) ) { continue; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/CHANGELOG.md index 422b57f5..5cd6b19c 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/CHANGELOG.md @@ -5,6 +5,74 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.17.14] - 2022-05-18 +### Changed +- Updated package dependencies [#24372] + +## [1.17.13] - 2022-05-10 +### Changed +- Updated package dependencies. [#24302] + +## [1.17.12] - 2022-05-04 +### Added +- Add missing JavaScript dependencies, and fix a test. [#24096] + +## [1.17.11] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.17.10] - 2022-04-19 +### Fixed +- Assets: Defer the enqueued script instead of its translations + +## [1.17.9] - 2022-04-05 +### Changed +- Updated package dependencies. + +## [1.17.8] - 2022-03-29 +### Changed +- Updated package dependencies. + +## [1.17.7] - 2022-03-23 +### Changed +- Updated package dependencies. + +## [1.17.6] - 2022-03-02 +### Changed +- Updated package dependencies. + +## [1.17.5] - 2022-02-16 +### Changed +- Updated package dependencies. + +## [1.17.4] - 2022-02-09 +### Changed +- Updated package dependencies. + +## [1.17.3] - 2022-02-02 +### Fixed +- Fixed minor coding standard violation. + +## [1.17.2] - 2022-02-01 +### Changed +- Build: remove unneeded files from production build. + +## [1.17.1] - 2022-01-27 +### Changed +- Updated package dependencies. + +## [1.17.0] - 2022-01-25 +### Added +- Accept package path prefixes from jetpack-composer-plugin and use them when lazy-loading JS translations. +- Generate the `wp-jp-i18n-loader` module needed by the new i18n-loader-webpack-plugin. + +### Deprecated +- Deprecated the `wp-jp-i18n-state` module. + +## [1.16.2] - 2022-01-18 +### Fixed +- Handle the case where `WP_LANG_DIR` is in `WP_CONTENT_DIR`, but `WP_CONTENT_DIR` is not in `ABSPATH`. + ## [1.16.1] - 2022-01-05 ### Fixed - Don't issue a "doing it wrong" warning for registering aliases during plugin activation. @@ -166,6 +234,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Statically access asset tools +[1.17.14]: https://github.com/Automattic/jetpack-assets/compare/v1.17.13...v1.17.14 +[1.17.13]: https://github.com/Automattic/jetpack-assets/compare/v1.17.12...v1.17.13 +[1.17.12]: https://github.com/Automattic/jetpack-assets/compare/v1.17.11...v1.17.12 +[1.17.11]: https://github.com/Automattic/jetpack-assets/compare/v1.17.10...v1.17.11 +[1.17.10]: https://github.com/Automattic/jetpack-assets/compare/v1.17.9...v1.17.10 +[1.17.9]: https://github.com/Automattic/jetpack-assets/compare/v1.17.8...v1.17.9 +[1.17.8]: https://github.com/Automattic/jetpack-assets/compare/v1.17.7...v1.17.8 +[1.17.7]: https://github.com/Automattic/jetpack-assets/compare/v1.17.6...v1.17.7 +[1.17.6]: https://github.com/Automattic/jetpack-assets/compare/v1.17.5...v1.17.6 +[1.17.5]: https://github.com/Automattic/jetpack-assets/compare/v1.17.4...v1.17.5 +[1.17.4]: https://github.com/Automattic/jetpack-assets/compare/v1.17.3...v1.17.4 +[1.17.3]: https://github.com/Automattic/jetpack-assets/compare/v1.17.2...v1.17.3 +[1.17.2]: https://github.com/Automattic/jetpack-assets/compare/v1.17.1...v1.17.2 +[1.17.1]: https://github.com/Automattic/jetpack-assets/compare/v1.17.0...v1.17.1 +[1.17.0]: https://github.com/Automattic/jetpack-assets/compare/v1.16.2...v1.17.0 +[1.16.2]: https://github.com/Automattic/jetpack-assets/compare/v1.16.1...v1.16.2 [1.16.1]: https://github.com/Automattic/jetpack-assets/compare/v1.16.0...v1.16.1 [1.16.0]: https://github.com/Automattic/jetpack-assets/compare/v1.15.0...v1.16.0 [1.15.0]: https://github.com/Automattic/jetpack-assets/compare/v1.14.0...v1.15.0 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/build/i18n-loader.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/build/i18n-loader.asset.php new file mode 100644 index 00000000..d7ded791 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/build/i18n-loader.asset.php @@ -0,0 +1 @@ +<?php return array('dependencies' => array('wp-i18n'), 'version' => 'a138d7ec784aee87c81071575eb6b11a');
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/build/i18n-loader.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/build/i18n-loader.js new file mode 100644 index 00000000..49f5cd3f --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/build/i18n-loader.js @@ -0,0 +1 @@ +!function(){var e={356:function(e){e.exports=function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};return n.m=e,n.c=r,n.i=function(e){return e},n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=1)}([function(e,n,r){"use strict";function t(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(n,r,t){return r&&e(n.prototype,r),t&&e(n,t),n}}(),a=function(){function e(){t(this,e)}return o(e,null,[{key:"hash",value:function(n){return e.hex(e.md51(n))}},{key:"md5cycle",value:function(n,r){var t=n[0],o=n[1],a=n[2],i=n[3];t=e.ff(t,o,a,i,r[0],7,-680876936),i=e.ff(i,t,o,a,r[1],12,-389564586),a=e.ff(a,i,t,o,r[2],17,606105819),o=e.ff(o,a,i,t,r[3],22,-1044525330),t=e.ff(t,o,a,i,r[4],7,-176418897),i=e.ff(i,t,o,a,r[5],12,1200080426),a=e.ff(a,i,t,o,r[6],17,-1473231341),o=e.ff(o,a,i,t,r[7],22,-45705983),t=e.ff(t,o,a,i,r[8],7,1770035416),i=e.ff(i,t,o,a,r[9],12,-1958414417),a=e.ff(a,i,t,o,r[10],17,-42063),o=e.ff(o,a,i,t,r[11],22,-1990404162),t=e.ff(t,o,a,i,r[12],7,1804603682),i=e.ff(i,t,o,a,r[13],12,-40341101),a=e.ff(a,i,t,o,r[14],17,-1502002290),o=e.ff(o,a,i,t,r[15],22,1236535329),t=e.gg(t,o,a,i,r[1],5,-165796510),i=e.gg(i,t,o,a,r[6],9,-1069501632),a=e.gg(a,i,t,o,r[11],14,643717713),o=e.gg(o,a,i,t,r[0],20,-373897302),t=e.gg(t,o,a,i,r[5],5,-701558691),i=e.gg(i,t,o,a,r[10],9,38016083),a=e.gg(a,i,t,o,r[15],14,-660478335),o=e.gg(o,a,i,t,r[4],20,-405537848),t=e.gg(t,o,a,i,r[9],5,568446438),i=e.gg(i,t,o,a,r[14],9,-1019803690),a=e.gg(a,i,t,o,r[3],14,-187363961),o=e.gg(o,a,i,t,r[8],20,1163531501),t=e.gg(t,o,a,i,r[13],5,-1444681467),i=e.gg(i,t,o,a,r[2],9,-51403784),a=e.gg(a,i,t,o,r[7],14,1735328473),o=e.gg(o,a,i,t,r[12],20,-1926607734),t=e.hh(t,o,a,i,r[5],4,-378558),i=e.hh(i,t,o,a,r[8],11,-2022574463),a=e.hh(a,i,t,o,r[11],16,1839030562),o=e.hh(o,a,i,t,r[14],23,-35309556),t=e.hh(t,o,a,i,r[1],4,-1530992060),i=e.hh(i,t,o,a,r[4],11,1272893353),a=e.hh(a,i,t,o,r[7],16,-155497632),o=e.hh(o,a,i,t,r[10],23,-1094730640),t=e.hh(t,o,a,i,r[13],4,681279174),i=e.hh(i,t,o,a,r[0],11,-358537222),a=e.hh(a,i,t,o,r[3],16,-722521979),o=e.hh(o,a,i,t,r[6],23,76029189),t=e.hh(t,o,a,i,r[9],4,-640364487),i=e.hh(i,t,o,a,r[12],11,-421815835),a=e.hh(a,i,t,o,r[15],16,530742520),o=e.hh(o,a,i,t,r[2],23,-995338651),t=e.ii(t,o,a,i,r[0],6,-198630844),i=e.ii(i,t,o,a,r[7],10,1126891415),a=e.ii(a,i,t,o,r[14],15,-1416354905),o=e.ii(o,a,i,t,r[5],21,-57434055),t=e.ii(t,o,a,i,r[12],6,1700485571),i=e.ii(i,t,o,a,r[3],10,-1894986606),a=e.ii(a,i,t,o,r[10],15,-1051523),o=e.ii(o,a,i,t,r[1],21,-2054922799),t=e.ii(t,o,a,i,r[8],6,1873313359),i=e.ii(i,t,o,a,r[15],10,-30611744),a=e.ii(a,i,t,o,r[6],15,-1560198380),o=e.ii(o,a,i,t,r[13],21,1309151649),t=e.ii(t,o,a,i,r[4],6,-145523070),i=e.ii(i,t,o,a,r[11],10,-1120210379),a=e.ii(a,i,t,o,r[2],15,718787259),o=e.ii(o,a,i,t,r[9],21,-343485551),n[0]=t+n[0]&4294967295,n[1]=o+n[1]&4294967295,n[2]=a+n[2]&4294967295,n[3]=i+n[3]&4294967295}},{key:"cmn",value:function(e,n,r,t,o,a){return((n=(n+e&4294967295)+(t+a&4294967295)&4294967295)<<o|n>>>32-o)+r&4294967295}},{key:"ff",value:function(n,r,t,o,a,i,f){return e.cmn(r&t|~r&o,n,r,a,i,f)}},{key:"gg",value:function(n,r,t,o,a,i,f){return e.cmn(r&o|t&~o,n,r,a,i,f)}},{key:"hh",value:function(n,r,t,o,a,i,f){return e.cmn(r^t^o,n,r,a,i,f)}},{key:"ii",value:function(n,r,t,o,a,i,f){return e.cmn(t^(r|~o),n,r,a,i,f)}},{key:"md51",value:function(n){for(var r=n.length,t=[1732584193,-271733879,-1732584194,271733878],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=0,i=64;i<=r;i+=64)e.md5cycle(t,e.md5blk(n.substring(i-64,i)));for(n=n.substring(i-64),i=0,a=n.length;i<a;i++)o[i>>2]|=n.charCodeAt(i)<<(i%4<<3);if(o[i>>2]|=128<<(i%4<<3),i>55)for(e.md5cycle(t,o),i=0;i<16;i++)o[i]=0;return o[14]=8*r,e.md5cycle(t,o),t}},{key:"md5blk",value:function(e){for(var n=[],r=0;r<64;r+=4)n[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return n}},{key:"rhex",value:function(n){var r="";return r+=e.hexArray[n>>4&15]+e.hexArray[n>>0&15],r+=e.hexArray[n>>12&15]+e.hexArray[n>>8&15],(r+=e.hexArray[n>>20&15]+e.hexArray[n>>16&15])+(e.hexArray[n>>28&15]+e.hexArray[n>>24&15])}},{key:"hex",value:function(n){for(var r=n.length,t=0;t<r;t++)n[t]=e.rhex(n[t]);return n.join("")}}]),e}();a.hexArray=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n.default=a},function(e,n,r){e.exports=r(0)}])},618:function(e,n,r){const{default:t}=r(356),o=r(736),a={plugin:"plugins/",theme:"themes/",core:""},i=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);e.exports={state:{baseUrl:null,locale:null,domainMap:{},domainPaths:{}},async downloadI18n(e,n,r){const f=this.state;if(!f||"string"!=typeof f.baseUrl)throw new Error("wp.jpI18nLoader.state is not set");if("en_US"===f.locale)return;if("undefined"==typeof fetch)throw new Error("Fetch API is not available.");const u=i(f.domainPaths,n)?f.domainPaths[n]:"";let c,h;const l=e.indexOf("?");l>=0?(c=t.hash(u+e.substring(0,l)),h=e.substring(l)):(c=t.hash(u+e),h="");const s=i(f.domainMap,n)?f.domainMap[n]:a[r]+n,g=await fetch(`${f.baseUrl}${s}-${f.locale}-${c}.json${h}`);if(!g.ok)throw new Error(`HTTP request failed: ${g.status} ${g.statusText}`);const d=await g.json(),p=i(d.locale_data,n)?d.locale_data[n]:d.locale_data.messages;p[""].domain=n,o.setLocaleData(p,n)}}},736:function(e){"use strict";e.exports=window.wp.i18n}},n={};var r=function r(t){var o=n[t];if(void 0!==o)return o.exports;var a=n[t]={exports:{}};return e[t].call(a.exports,a,a.exports,r),a.exports}(618);(window.wp=window.wp||{}).jpI18nLoader=r}();
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/package.json b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/package.json new file mode 100644 index 00000000..4e641fa5 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/package.json @@ -0,0 +1,22 @@ +{ + "private": true, + "browserslist": "extends @wordpress/browserslist-config", + "scripts": { + "build": "pnpm run clean && pnpm run build-js", + "build-js": "webpack", + "build-production": "pnpm run clean && pnpm run build-production-js && pnpm run validate", + "build-production-js": "NODE_ENV=production BABEL_ENV=production pnpm run build-js", + "clean": "rm -rf build", + "test": "jest tests", + "test-coverage": "jest tests --coverage --collectCoverageFrom='src/**/*.js' --coverageDirectory=\"$COVERAGE_DIR/js\" --coverageReporters=clover", + "validate": "pnpm exec validate-es build/" + }, + "devDependencies": { + "@automattic/jetpack-webpack-config": "^1.3", + "@wordpress/browserslist-config": "4.1.2", + "md5-es": "1.8.2", + "jest": "28.1.0", + "webpack": "5.72.1", + "webpack-cli": "4.9.1" + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php index dd130a7b..c4d7ee1f 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php @@ -32,7 +32,7 @@ class Assets { /** * The registered textdomain mappings. * - * @var array `array( mapped_domain => array( string target_domain, string target_type, string semver ) )`. + * @var array `array( mapped_domain => array( string target_domain, string target_type, string semver, string path_prefix ) )`. */ private static $domain_map = array(); @@ -92,7 +92,8 @@ class Assets { } if ( in_array( $handle, $this->defer_script_handles, true ) ) { - return preg_replace( '/^<script /i', '<script defer ', $tag ); + // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript + return preg_replace( '/<script( [^>]*)? src=/i', '<script defer$1 src=', $tag ); } return $tag; @@ -358,7 +359,7 @@ class Assets { } if ( $options['asset_path'] && file_exists( "$dir/{$options['asset_path']}" ) ) { - $asset = require "$dir/{$options['asset_path']}"; + $asset = require "$dir/{$options['asset_path']}"; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.NotAbsolutePath $options['dependencies'] = array_merge( $asset['dependencies'], $options['dependencies'] ); $options['css_dependencies'] = array_merge( array_filter( @@ -430,7 +431,7 @@ class Assets { /** * 'wp_default_scripts' action handler. * - * This registers the `wp-jp-i18n-state` script for use by Webpack bundles built with + * This registers the `wp-jp-i18n-loader` script for use by Webpack bundles built with * `@automattic/i18n-loader-webpack-plugin`. * * @since 1.14.0 @@ -438,20 +439,27 @@ class Assets { */ public static function wp_default_scripts_hook( $wp_scripts ) { $data = array( - 'baseUrl' => false, - 'locale' => determine_locale(), - 'domainMap' => array(), + 'baseUrl' => false, + 'locale' => determine_locale(), + 'domainMap' => array(), + 'domainPaths' => array(), ); - $lang_dir = Jetpack_Constants::get_constant( 'WP_LANG_DIR' ); - $abspath = Jetpack_Constants::get_constant( 'ABSPATH' ); + $lang_dir = Jetpack_Constants::get_constant( 'WP_LANG_DIR' ); + $content_dir = Jetpack_Constants::get_constant( 'WP_CONTENT_DIR' ); + $abspath = Jetpack_Constants::get_constant( 'ABSPATH' ); - if ( strpos( $lang_dir, $abspath ) === 0 ) { + if ( strpos( $lang_dir, $content_dir ) === 0 ) { + $data['baseUrl'] = content_url( substr( trailingslashit( $lang_dir ), strlen( trailingslashit( $content_dir ) ) ) ); + } elseif ( strpos( $lang_dir, $abspath ) === 0 ) { $data['baseUrl'] = site_url( substr( trailingslashit( $lang_dir ), strlen( untrailingslashit( $abspath ) ) ) ); } - foreach ( self::$domain_map as $from => list( $to, $type ) ) { + foreach ( self::$domain_map as $from => list( $to, $type, , $path ) ) { $data['domainMap'][ $from ] = ( 'core' === $type ? '' : "{$type}/" ) . $to; + if ( '' !== $path ) { + $data['domainPaths'][ $from ] = trailingslashit( $path ); + } } /** @@ -465,25 +473,44 @@ class Assets { * - `locale`: (string) The locale for the page. * - `domainMap`: (string[]) A mapping from Composer package textdomains to the corresponding * `plugins/textdomain` or `themes/textdomain` (or core `textdomain`, but that's unlikely). + * - `domainPaths`: (string[]) A mapping from Composer package textdomains to the corresponding package + * paths. */ $data = apply_filters( 'jetpack_i18n_state', $data ); + // Can't use self::register_script(), this action is called too early. + if ( file_exists( __DIR__ . '/../build/i18n-loader.asset.php' ) ) { + $path = '../build/i18n-loader.js'; + $asset = require __DIR__ . '/../build/i18n-loader.asset.php'; + } else { + $path = 'js/i18n-loader.js'; + $asset = array( + 'dependencies' => array( 'wp-i18n' ), + 'version' => filemtime( __DIR__ . "/$path" ), + ); + } + $url = self::normalize_path( plugins_url( $path, __FILE__ ) ); + $url = add_query_arg( 'minify', 'true', $url ); + $wp_scripts->add( 'wp-jp-i18n-loader', $url, $asset['dependencies'], $asset['version'] ); if ( ! is_array( $data ) || ! isset( $data['baseUrl'] ) || ! ( is_string( $data['baseUrl'] ) || false === $data['baseUrl'] ) || ! isset( $data['locale'] ) || ! is_string( $data['locale'] ) || - ! isset( $data['domainMap'] ) || ! is_array( $data['domainMap'] ) + ! isset( $data['domainMap'] ) || ! is_array( $data['domainMap'] ) || + ! isset( $data['domainPaths'] ) || ! is_array( $data['domainPaths'] ) ) { - $js = 'console.warn( "I18n state deleted by jetpack_i18n_state hook" );'; + $wp_scripts->add_inline_script( 'wp-jp-i18n-loader', 'console.warn( "I18n state deleted by jetpack_i18n_state hook" );' ); } elseif ( ! $data['baseUrl'] ) { - $js = 'console.warn( "Failed to determine languages base URL. Is WP_LANG_DIR in the WordPress root?" );'; + $wp_scripts->add_inline_script( 'wp-jp-i18n-loader', 'console.warn( "Failed to determine languages base URL. Is WP_LANG_DIR in the WordPress root?" );' ); } else { - $data['domainMap'] = (object) $data['domainMap']; // Ensure it becomes a json object. - $js = 'wp.jpI18nState = ' . wp_json_encode( $data, JSON_UNESCAPED_SLASHES ) . ';'; + $data['domainMap'] = (object) $data['domainMap']; // Ensure it becomes a json object. + $data['domainPaths'] = (object) $data['domainPaths']; // Ensure it becomes a json object. + $wp_scripts->add_inline_script( 'wp-jp-i18n-loader', 'wp.jpI18nLoader.state = ' . wp_json_encode( $data, JSON_UNESCAPED_SLASHES ) . ';' ); } - // Depend on wp-i18n to ensure global `wp` exists and because anything needing this will need that too. - $wp_scripts->add( 'wp-jp-i18n-state', null, array( 'wp-i18n' ) ); - $wp_scripts->add_inline_script( 'wp-jp-i18n-state', $js, 'before' ); + // Deprecated state module: Depend on wp-i18n to ensure global `wp` exists and because anything needing this will need that too. + $wp_scripts->add( 'wp-jp-i18n-state', null, array( 'wp-deprecated', 'wp-jp-i18n-loader' ) ); + $wp_scripts->add_inline_script( 'wp-jp-i18n-state', 'wp.deprecated( "wp-jp-i18n-state", { alternative: "wp-jp-i18n-loader" } );' ); + $wp_scripts->add_inline_script( 'wp-jp-i18n-state', 'wp.jpI18nState = wp.jpI18nLoader.state;' ); } // endregion . @@ -507,9 +534,10 @@ class Assets { * @param string $to Domain to alias it to. * @param string $totype What is the target of the alias: 'plugins', 'themes', or 'core'. * @param string $ver Version of the `$from` domain. + * @param string $path Path to prepend when lazy-loading from JavaScript. * @throws InvalidArgumentException If arguments are invalid. */ - public static function alias_textdomain( $from, $to, $totype, $ver ) { + public static function alias_textdomain( $from, $to, $totype, $ver, $path = '' ) { if ( ! in_array( $totype, array( 'plugins', 'themes', 'core' ), true ) ) { throw new InvalidArgumentException( 'Type must be "plugins", "themes", or "core"' ); } @@ -533,9 +561,9 @@ class Assets { if ( empty( self::$domain_map[ $from ] ) ) { self::init_domain_map_hooks( $from, array() === self::$domain_map ); - self::$domain_map[ $from ] = array( $to, $totype, $ver ); + self::$domain_map[ $from ] = array( $to, $totype, $ver, $path ); } elseif ( Semver::compare( $ver, self::$domain_map[ $from ][2] ) > 0 ) { - self::$domain_map[ $from ] = array( $to, $totype, $ver ); + self::$domain_map[ $from ] = array( $to, $totype, $ver, $path ); } } @@ -546,15 +574,21 @@ class Assets { * with the following properties: * - 'domain': String, `$to` * - 'type': String, `$totype` - * - 'packages': Array, mapping `$from` to `$ver`. + * - 'packages': Array, mapping `$from` to `array( 'path' => $path, 'ver' => $ver )` (or to the string `$ver` for back compat). * * @since 1.15.0 * @param string $file Mapping file. */ public static function alias_textdomains_from_file( $file ) { $data = require $file; - foreach ( $data['packages'] as $from => $ver ) { - self::alias_textdomain( $from, $data['domain'], $data['type'], $ver ); + foreach ( $data['packages'] as $from => $fromdata ) { + if ( ! is_array( $fromdata ) ) { + $fromdata = array( + 'path' => '', + 'ver' => $fromdata, + ); + } + self::alias_textdomain( $from, $data['domain'], $data['type'], $fromdata['ver'], $fromdata['path'] ); } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/src/js/i18n-loader.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/src/js/i18n-loader.js new file mode 100644 index 00000000..6887aa85 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-assets/src/js/i18n-loader.js @@ -0,0 +1,76 @@ +const { default: md5 } = require( 'md5-es' ); +const i18n = require( '@wordpress/i18n' ); + +const locationMap = { + plugin: 'plugins/', + theme: 'themes/', + core: '', +}; + +const hasOwn = ( obj, prop ) => Object.prototype.hasOwnProperty.call( obj, prop ); + +module.exports = { + state: { + baseUrl: null, + locale: null, + domainMap: {}, + domainPaths: {}, + }, + + /** + * Download and register translations for a bundle. + * + * @param {string} path - Bundle path being fetched. May have a query part. + * @param {string} domain - Text domain to register into. + * @param {string} location - Location for the translation: 'plugin', 'theme', or 'core'. + * @returns {Promise} Resolved when the translations are registered, or rejected with an `Error`. + */ + async downloadI18n( path, domain, location ) { + const state = this.state; + if ( ! state || typeof state.baseUrl !== 'string' ) { + throw new Error( 'wp.jpI18nLoader.state is not set' ); + } + + // "en_US" is the default, no translations are needed. + if ( state.locale === 'en_US' ) { + return; + } + + // Check that fetch is available. + if ( typeof fetch === 'undefined' ) { + throw new Error( 'Fetch API is not available.' ); + } + + // Extract any query part and hash the script name like WordPress does. + const pathPrefix = hasOwn( state.domainPaths, domain ) ? state.domainPaths[ domain ] : ''; + let hash, query; + const i = path.indexOf( '?' ); + if ( i >= 0 ) { + hash = md5.hash( pathPrefix + path.substring( 0, i ) ); + query = path.substring( i ); + } else { + hash = md5.hash( pathPrefix + path ); + query = ''; + } + + // Download. + const locationAndDomain = hasOwn( state.domainMap, domain ) + ? state.domainMap[ domain ] + : locationMap[ location ] + domain; + const res = await fetch( + // prettier-ignore + `${ state.baseUrl }${ locationAndDomain }-${ state.locale }-${ hash }.json${ query }` + ); + if ( ! res.ok ) { + throw new Error( `HTTP request failed: ${ res.status } ${ res.statusText }` ); + } + const data = await res.json(); + + // Extract the messages from the file and register them. + const localeData = hasOwn( data.locale_data, domain ) + ? data.locale_data[ domain ] + : data.locale_data.messages; + localeData[ '' ].domain = domain; + i18n.setLocaleData( localeData, domain ); + }, +}; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/.babelrc b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/.babelrc new file mode 100644 index 00000000..9e9ed77c --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/.babelrc @@ -0,0 +1,12 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "targets": { + "node": "current" + } + } + ] + ] +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/CHANGELOG.md index 571fa485..ba6b9b09 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/CHANGELOG.md @@ -5,6 +5,67 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.3.7] - 2022-05-31 +### Changed +- Updated package dependencies. [#24432] [#24573] [#24475] [#24505] [#24515] + +## [1.3.6] - 2022-05-24 +### Changed +- Updated package dependencies. [#24396] [#24449] [#24453] [#24468] + +## [1.3.5] - 2022-05-20 +### Changed +- Improve the build process to ensure availability of built assets. [#24442] + +## [1.3.4] - 2022-05-19 +### Changed +- Updated package dependencies. [#24419] + +## [1.3.3] - 2022-05-18 +### Changed +- Changed method used to disconnect upon deactivation [#24300] +- Updated package dependencies. [#23795] [#24372] [#24153] [#24334] [#24347] [#24344] + +### Fixed +- Fix new PHPCS sniffs. [#24366] + +## [1.3.2] - 2022-05-10 +### Changed +- Updated package dependencies. [#24167] + +## [1.3.1] - 2022-05-04 +### Changed +- Remove use of `pnpx` in preparation for pnpm 7.0. [#24210] +- Updated package dependencies. [#24095] [#24198] + +## [1.3.0] - 2022-04-26 +### Changed +- Backup plugin UI now lives in the Backup package + +## [1.2.6] - 2022-04-19 +### Changed +- Updated package dependencies. + +## [1.2.5] - 2022-03-02 +### Changed +- Updated package dependencies. + +## [1.2.4] - 2022-02-22 +### Changed +- Updated package dependencies. + +## [1.2.3] - 2022-01-25 +### Changed +- Dependency Update - Sync from 1.29 to 1.29 + +## [1.2.2] - 2022-01-18 +### Changed +- Updated package dependencies. + +## [1.2.1] - 2022-01-13 +### Changed +- Updated package dependencies. + ## [1.2.0] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -94,6 +155,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add API endpoints and Jetpack Backup package for managing Help… +[1.3.7]: https://github.com/Automattic/jetpack-backup/compare/v1.3.6...v1.3.7 +[1.3.6]: https://github.com/Automattic/jetpack-backup/compare/v1.3.5...v1.3.6 +[1.3.5]: https://github.com/Automattic/jetpack-backup/compare/v1.3.4...v1.3.5 +[1.3.4]: https://github.com/Automattic/jetpack-backup/compare/v1.3.3...v1.3.4 +[1.3.3]: https://github.com/Automattic/jetpack-backup/compare/v1.3.2...v1.3.3 +[1.3.2]: https://github.com/Automattic/jetpack-backup/compare/v1.3.1...v1.3.2 +[1.3.1]: https://github.com/Automattic/jetpack-backup/compare/v1.3.0...v1.3.1 +[1.3.0]: https://github.com/Automattic/jetpack-backup/compare/v1.2.6...v1.3.0 +[1.2.6]: https://github.com/Automattic/jetpack-backup/compare/v1.2.5...v1.2.6 +[1.2.5]: https://github.com/Automattic/jetpack-backup/compare/v1.2.4...v1.2.5 +[1.2.4]: https://github.com/Automattic/jetpack-backup/compare/v1.2.3...v1.2.4 +[1.2.3]: https://github.com/Automattic/jetpack-backup/compare/v1.2.2...v1.2.3 +[1.2.2]: https://github.com/Automattic/jetpack-backup/compare/v1.2.1...v1.2.2 +[1.2.1]: https://github.com/Automattic/jetpack-backup/compare/v1.2.0...v1.2.1 [1.2.0]: https://github.com/Automattic/jetpack-backup/compare/v1.1.11...v1.2.0 [1.1.11]: https://github.com/Automattic/jetpack-backup/compare/v1.1.10...v1.1.11 [1.1.10]: https://github.com/Automattic/jetpack-backup/compare/v1.1.9...v1.1.10 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/actions.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/actions.php index b9ae6aa5..4790b4e3 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/actions.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/actions.php @@ -19,7 +19,7 @@ if ( function_exists( 'add_filter' ) ) { 'function' => $cb, ); }; - $add_action = $add_filter; + $add_action = $add_filter; } // Clean up expired Helper Scripts from a scheduled event. diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/babel.config.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/babel.config.js new file mode 100644 index 00000000..ab2f5bee --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/babel.config.js @@ -0,0 +1,10 @@ +const config = { + presets: [ + [ + '@automattic/jetpack-webpack-config/babel/preset', + { pluginReplaceTextdomain: { textdomain: 'jetpack-backup-pkg' } }, + ], + ], +}; + +module.exports = config; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/backup-animation-1-8d65f9365c217c43eb01.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/backup-animation-1-8d65f9365c217c43eb01.svg new file mode 100644 index 00000000..08c42d96 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/backup-animation-1-8d65f9365c217c43eb01.svg @@ -0,0 +1,33 @@ +<svg + class="backup__animation-el-1" + width="176" + height="212" + fill="none" + xmlns="http://www.w3.org/2000/svg" +> + <g filter="url(#filter1_d)"> + <rect x="40" y="40" width="96" height="132" rx="3" fill="#98C6D9"></rect> + </g> + <defs> + <filter + id="filter1_d" + x="0" + y="0" + width="176" + height="212" + filterUnits="userSpaceOnUse" + color-interpolation-filters="sRGB" + > + <feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> + <feColorMatrix + in="SourceAlpha" + values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" + ></feColorMatrix> + <feOffset></feOffset> + <feGaussianBlur stdDeviation="20"></feGaussianBlur> + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"></feColorMatrix> + <feBlend in2="BackgroundImageFix" result="effect1_dropShadow"></feBlend> + <feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"></feBlend> + </filter> + </defs> +</svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/backup-animation-2-4d8da04fb34b29957030.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/backup-animation-2-4d8da04fb34b29957030.svg new file mode 100644 index 00000000..414816b6 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/backup-animation-2-4d8da04fb34b29957030.svg @@ -0,0 +1,33 @@ +<svg + class="backup__animation-el-2" + width="248" + height="200" + fill="none" + xmlns="http://www.w3.org/2000/svg" +> + <g filter="url(#filter2_d)"> + <rect x="40" y="40" width="168" height="120" rx="3" fill="#F2D76B"></rect> + </g> + <defs> + <filter + id="filter2_d" + x="0" + y="0" + width="248" + height="200" + filterUnits="userSpaceOnUse" + color-interpolation-filters="sRGB" + > + <feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> + <feColorMatrix + in="SourceAlpha" + values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" + ></feColorMatrix> + <feOffset></feOffset> + <feGaussianBlur stdDeviation="20"></feGaussianBlur> + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"></feColorMatrix> + <feBlend in2="BackgroundImageFix" result="effect2_dropShadow"></feBlend> + <feBlend in="SourceGraphic" in2="effect2_dropShadow" result="shape"></feBlend> + </filter> + </defs> +</svg> diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/backup-animation-3-1c6df0c7bc8546e712d8.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/backup-animation-3-1c6df0c7bc8546e712d8.svg new file mode 100644 index 00000000..eb3ff3a2 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/backup-animation-3-1c6df0c7bc8546e712d8.svg @@ -0,0 +1,42 @@ +<svg + class="backup__animation-el-3" + width="536" + height="196" + fill="none" + xmlns="http://www.w3.org/2000/svg" +> + <g filter="url(#filter3_d)"> + <rect x="40" y="40" width="456" height="116" rx="8" fill="#fff"></rect> + </g> + <path + d="M475.35 62.04A7.49 7.49 0 00468 56c-2.89 0-5.4 1.64-6.65 4.04A5.994 5.994 0 00456 66c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z" + fill="#E9EFF5" + ></path> + <circle cx="100" cy="98" r="36" fill="#F7A8C3"></circle> + <path + d="M160 84a6 6 0 016-6h174a6 6 0 110 12H166a6 6 0 01-6-6zM160 112a6 6 0 016-6h276a6 6 0 110 12H166a6 6 0 01-6-6z" + fill="#E9EFF5" + ></path> + <defs> + <filter + id="filter3_d" + x="0" + y="0" + width="536" + height="196" + filterUnits="userSpaceOnUse" + color-interpolation-filters="sRGB" + > + <feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> + <feColorMatrix + in="SourceAlpha" + values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" + ></feColorMatrix> + <feOffset></feOffset> + <feGaussianBlur stdDeviation="20"></feGaussianBlur> + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"></feColorMatrix> + <feBlend in2="BackgroundImageFix" result="effect3_dropShadow"></feBlend> + <feBlend in="SourceGraphic" in2="effect3_dropShadow" result="shape"></feBlend> + </filter> + </defs> +</svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/cloud-35473ae2758e9f3e353d.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/cloud-35473ae2758e9f3e353d.svg new file mode 100644 index 00000000..ca7a6171 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/cloud-35473ae2758e9f3e353d.svg @@ -0,0 +1 @@ +<svg width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="a" maskUnits="userSpaceOnUse" x="0" y="5" width="32" height="22"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 5.333c4.853 0 8.893 3.453 9.8 8.053 3.467.24 6.2 3.094 6.2 6.614a6.67 6.67 0 01-6.667 6.666H8c-4.413 0-8-3.586-8-8 0-4.12 3.12-7.52 7.133-7.946A9.994 9.994 0 0116 5.333zM8.667 18l4.666 4.666 8.787-8.786L20.24 12l-6.907 6.906-2.786-2.786L8.667 18z" fill="#fff"></path></mask><g mask="url(#a)"><path fill="#069E08" d="M0 0h32v32H0z"></path></g></svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/cloud-alert-cf8336f3384ee5b98a9e.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/cloud-alert-cf8336f3384ee5b98a9e.svg new file mode 100644 index 00000000..9440bdd0 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/cloud-alert-cf8336f3384ee5b98a9e.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="32" height="32" viewBox="0 0 24 24"><path fill="#d63639" d="M19 20H6C2.7 20 0 17.3 0 14C0 10.9 2.3 8.4 5.3 8C6.6 5.6 9.1 4 12 4C15.6 4 18.7 6.6 19.4 10C22 10.2 24 12.3 24 15C24 17.7 21.7 20 19 20M11 15V17H13V15H11M11 13H13V7H11V13Z" /></svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/plugins-d0898bae4e79a6e05b9e.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/plugins-d0898bae4e79a6e05b9e.svg new file mode 100644 index 00000000..22419452 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/plugins-d0898bae4e79a6e05b9e.svg @@ -0,0 +1 @@ +<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="4.75" y="7.75" width="14.5" height="10.5" rx="1.25" stroke="#069E08" stroke-width="1.5"></rect><path fill="#069E08" d="M6 5h5v3H6zM13 5h5v3h-5z"></path></svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/posts-7a4c9e22d20abaac65d6.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/posts-7a4c9e22d20abaac65d6.svg new file mode 100644 index 00000000..9299c527 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/posts-7a4c9e22d20abaac65d6.svg @@ -0,0 +1 @@ +<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 7L8 13.5c-.167-1.167 1-5.167 1.5-6 .365-.608 1-1.5 2.5-2.5s5-2 5-2c0 1-1 2.5-2.5 4z" fill="#069E08"></path><path d="M7 16l1-2.5m0 0L14.5 7C16 5.5 17 4 17 3c0 0-3.5 1-5 2S9.865 6.892 9.5 7.5c-.5.833-1.667 4.833-1.5 6z" stroke="#069E08" stroke-width="1.5" stroke-linecap="round"></path><path d="M17.743 3.1a.75.75 0 10-1.486-.2l1.486.2zm-1.486-.2c-.089.662-.131 1.443-.17 2.235-.04.804-.075 1.63-.146 2.423-.072.795-.176 1.525-.344 2.134-.17.62-.386 1.036-.627 1.278l1.06 1.06c.509-.508.814-1.216 1.013-1.94.203-.735.317-1.568.392-2.398.074-.831.111-1.694.15-2.483.04-.802.08-1.52.158-2.11l-1.486-.198zm-1.287 8.07c-.276.275-.767.574-1.435.866-.653.287-1.415.541-2.175.754-.758.213-1.502.38-2.114.493-.63.117-1.071.167-1.246.167v1.5c.325 0 .885-.075 1.52-.192a26.28 26.28 0 002.245-.523 18.402 18.402 0 002.372-.825c.722-.316 1.419-.705 1.893-1.18l-1.06-1.06z" fill="#069E08"></path><path stroke="#069E08" stroke-width="1.5" d="M6 19.25h8"></path></svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/themes-700cf8bdf1049fdbc94a.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/themes-700cf8bdf1049fdbc94a.svg new file mode 100644 index 00000000..8e3afcae --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/themes-700cf8bdf1049fdbc94a.svg @@ -0,0 +1 @@ +<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.44 13.905a5.345 5.345 0 01-10.69 0c0-.652.307-1.557.866-2.619.547-1.039 1.284-2.137 2.034-3.15a47.06 47.06 0 012.445-3.014 48.194 48.194 0 012.445 3.015c.75 1.012 1.488 2.11 2.034 3.15.56 1.061.866 1.966.866 2.618z" stroke="#069E08" stroke-width="1.5"></path></svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/uploads-7a7b15dfda25508a8d68.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/uploads-7a7b15dfda25508a8d68.svg new file mode 100644 index 00000000..57132bfd --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/images/uploads-7a7b15dfda25508a8d68.svg @@ -0,0 +1 @@ +<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.293 13.758a7.503 7.503 0 01-14.168 1.243l3.67-2.177 3.456 1.217a.75.75 0 00.686-.098l2.887-2.073.08.04c.296.145.703.349 1.15.58.78.406 1.64.877 2.239 1.268zm.206-1.635a37.63 37.63 0 00-1.754-.964 63.44 63.44 0 00-1.538-.771l-.099-.048-.026-.012-.01-.005a.75.75 0 00-.76.068l-2.932 2.105-3.417-1.203a.75.75 0 00-.631.062l-3.675 2.18A7.5 7.5 0 1119.5 12.123zM21 12a9 9 0 11-18 0 9 9 0 0118 0z" fill="#069E08"></path></svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.asset.php new file mode 100644 index 00000000..408132e7 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.asset.php @@ -0,0 +1 @@ +<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '7640d552762ac3fc6d87'); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.css new file mode 100644 index 00000000..80431c90 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.css @@ -0,0 +1 @@ +.stat-block{display:flex;flex:1;flex-direction:column}.stat-block .icon{flex:2}.stat-block .icon img{height:24px;margin-top:24px;width:24px}.stat-block .label{flex:1;font-weight:700}.stat-block .value{flex:1}.stat-block .large-text{font-size:2em;font-weight:700}.backup__card{background:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 0 40px rgba(0,0,0,.08);padding:24px}.backup__card-details-items{font-weight:500;margin:16px 0 -8px}.backup__card-details-amount{font-size:var(--font-title-large);font-weight:600;margin-bottom:-12px}.backup__progress{margin-bottom:48px;margin-right:64px}.backup__progress-info{display:flex;font-weight:500}.backup__progress-info .backup__progress-info-percentage{margin-left:auto}.backup__progress-bar,.backup__progress-bar-actual{border-radius:8px;height:12px}.backup__progress-bar{background:var(--jp-gray-off);position:relative;width:100%}.backup__progress-bar-actual{background:var(--jp-green-primary);left:0;position:absolute;top:0;width:0}.backup__latest{align-items:center;display:flex;margin-bottom:8px}.backup__latest img,.backup__latest svg{min-height:32px;min-width:32px}.backup__latest h2{margin:0 0 0 12px;vertical-align:-1px}.backup__latest+h1{white-space:nowrap}.backup__animation{position:relative}@media only screen and (max-width:960px){.backup__animation{display:none}}.backup__animation-el-1,.backup__animation-el-2,.backup__animation-el-3{animation:animation-el-3 4s ease-in-out .8s infinite normal forwards;opacity:0;position:absolute;z-index:4}.backup__animation-el-1{animation-delay:.6s;animation-name:animation-el-1;bottom:150px;right:264px}.backup__animation-el-2{animation-delay:.7s;animation-name:animation-el-2;bottom:108px;right:44px}.backup__animation-el-3{animation-name:animation-el-3;bottom:-32px}@keyframes animation-el-1{0%{opacity:0;transform:translateY(32px)}20%{opacity:1;transform:translateY(0)}50%{opacity:1;transform:translateY(0)}60%{opacity:0;transform:translateY(-96px)}to{opacity:0;transform:translateY(-96px)}}@keyframes animation-el-2{0%{opacity:0;transform:translateY(64px)}20%{opacity:1;transform:translateY(0)}50%{opacity:1;transform:translateY(0)}60%{opacity:0;transform:translateY(-96px)}to{opacity:0;transform:translateY(-96px)}}@keyframes animation-el-3{0%{opacity:0;transform:translateY(44px)}20%{opacity:1;transform:translateY(0)}50%{opacity:1;transform:translateY(0)}60%{opacity:0;transform:translateY(-84px)}to{opacity:0;transform:translateY(-84px)}}@media(min-width:1080px){.jp-connection__connect-screen-layout__left{width:70%}.jp-connection__connect-screen-required-plan{background:linear-gradient(90deg,#fff 70%,#f9f9f6 0);position:relative}}.jp-connection__connect-screen-required-plan__loading{display:none}@media(min-width:1080px){.jp-connection__connect-screen-required-plan__pricing-card{left:62%;position:absolute;top:14%}}.jp-connection__connect-screen-required-plan__pricing-card .jp-action-button--button.components-button{align-items:center;background:var(--jp-black)!important;border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;font-weight:500;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-connection__connect-screen-required-plan__with-subscription{margin-top:38px}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button{display:inline}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button{background:inherit!important;color:var(--jp-black)!important;display:inline;font-size:var(--font-title-small);font:inherit;height:auto;line-height:20px;min-width:0;padding:0;text-decoration:underline;width:auto}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button:hover{background:inherit;text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button:focus{background:inherit;box-shadow:none!important}.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__inner,.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__outer{border-right-color:var(--jp-black);border-top-color:var(--jp-black)}.jp-action-button--button{background:#000}.jp-action-button--button,.jp-action-button--button.components-button{border-radius:4px;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-style:normal;font-weight:600;height:40px;line-height:18px;min-width:264px;text-align:center}.jp-action-button__error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 0 0;color:var(--jp-red)!important;line-height:25px!important;padding-left:25px}.jp-connection__connect-screen-layout{background:var(--jp-white);border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.08)}.jp-connection__connect-screen-layout__loading{display:none}.jp-connection__connect-screen-layout__left,.jp-connection__connect-screen-layout__right{box-sizing:border-box}.jp-connection__connect-screen-layout__left{padding:25px}@media(min-width:600px){.jp-connection__connect-screen-layout__left{padding:64px 96px}}.jp-connection__connect-screen-layout__left .jetpack-logo{margin-bottom:24px}.jp-connection__connect-screen-layout__left h2{color:var(--jp-black);font-size:36px;font-style:normal;font-weight:700;line-height:40px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left h3{color:var(--jp-black);font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left li,.jp-connection__connect-screen-layout__left p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.jp-connection__connect-screen-layout__left p{color:#101517;margin:16px 0}.jp-connection__connect-screen-layout__left a{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__connect-screen-layout__left a:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-layout__left a:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__connect-screen-layout__left ul{list-style-type:none;padding:0}.jp-connection__connect-screen-layout__left ul li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-left:30px}.jp-connection__connect-screen-layout__right{padding:64px 0}.jp-connection__connect-screen-layout__right img{max-width:100%}.jp-connection__connect-screen-layout__two-columns{display:flex;flex-wrap:wrap}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:100%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:52%}}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{background:#f9f9f6;display:none;flex-basis:47%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{display:block}}.jp-components__pricing-card{background:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 10px 40px rgba(0,0,0,.08);max-width:384px;padding:24px 24px 32px;width:-moz-fit-content;width:fit-content}@media screen and (min-width:600px){.jp-components__pricing-card{padding:32px 32px 44px}}.jp-components__pricing-card__icon img{height:32px;width:32px}.jp-components__pricing-card__title{color:#101517;font-size:32px;line-height:38px;margin:16px 0 24px}.jp-components__pricing-card__pricing{display:flex;flex-wrap:wrap}.jp-components__pricing-card__price-after,.jp-components__pricing-card__price-before{display:inline-block;font-size:54px;font-weight:700;line-height:40px;margin-bottom:8px;padding:0 2px}.jp-components__pricing-card__price-before{color:var(--jp-gray-20);margin-right:16px;position:relative}.jp-components__pricing-card__price-strikethrough{background:var(--jp-pink);border-radius:1.5px;height:3px;left:0;position:absolute;top:20px;width:100%}.jp-components__pricing-card__price-after{color:var(--jp-black)}.jp-components__pricing-card__currency{font-size:var(--font-title-small);font-weight:400;line-height:20px;vertical-align:super}.jp-components__pricing-card__price-details{align-self:flex-end;color:var(--jp-gray-50);font-size:14px;font-weight:400;letter-spacing:-.02em;line-height:17px;margin-bottom:8px}.jp-components__pricing-card__price-decimal{font-size:var(--font-label);line-height:14px;vertical-align:top}.jp-components__pricing-card__button{align-items:center;background:var(--jp-black);border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-components__pricing-card__info{color:var(--jp-gray-60);font-size:var(--font-label);letter-spacing:-.02em;line-height:20px}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-10:#f2cf75;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-footer,.jp-header{padding:20px 0}@media(min-width:960px){.jp-footer,.jp-header{padding:40px 0}}.jp-content{font-size:var(--font-body);line-height:1.5;position:relative}.jp-content h1,.jp-content h2,.jp-content h3,.jp-content h4,.jp-content h5,.jp-content h6{line-height:1.2;margin-top:0}.jp-content h1{font-size:var(--font-title-large);font-weight:600}.jp-content h2{font-size:var(--font-title-small);font-weight:500}.jp-content .jp-section h2,.jp-content .jp-section h3{margin-bottom:16px}.jp-content .jp-section p{margin-top:16px}.jp-content li,.jp-content p{font-size:16px;line-height:1.5}.jp-content .jp-connection-status-card h3,.jp-content .jpb-my-plan-container h3{font-size:var(--font-title-small);font-weight:500;margin-top:48px}.jp-content a{color:var(--jp-black);transition:color,background-color .15s ease-out}.jp-content a:hover{text-decoration-thickness:var(--jp-underline-thickness)}.jp-content a:focus{outline-color:var(--jp-black)}.jp-content .button{background:var(--jp-black);border:0;border-color:var(--jp-black);border-radius:var(--jp-border-radius);color:var(--jp-white);display:inline-block;font-weight:500;padding:8px 24px;text-decoration:none}.jp-content .button.is-full-width{text-align:center;width:100%}.jp-content .button:active,.jp-content .button:hover{background:var(--jp-black-80);color:var(--jp-white)}.jp-content .button:focus{box-shadow:0 0 0 1px var(--jp-white) inset,0 0 0 2px var(--jp-black)}.jp-content .button.disabled,.jp-content .button:disabled{background:var(--jp-gray);pointer-events:none}.jp-content ul.jp-product-promote li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-left:30px}.jp-hero{background:var(--jp-white-off);margin-bottom:64px;padding:64px 0}.jp-hero.is-backup-performing{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='624' height='400' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M624 88.387C575.321 34.082 504.674 0 426 0 323.405 0 234.3 58.22 189.925 143.42 83.07 154.78 0 245.305 0 355c0 38.16 10.072 73.999 27.698 105H624V88.387z' fill='%23fff'/%3E%3C/svg%3E");background-position:100% 100%;background-repeat:no-repeat}.jp-hero.is-backup-error,.jp-hero.is-backup-healthy{display:none}.jp-hero p+.button{margin-top:18px}.jp-dashboard-footer{padding:40px 0}.jp-connection-status-card--status{margin:30px 0}@keyframes appear{0%{opacity:0}to{opacity:1}}.jp-masthead{background-color:#fff;padding:40px 0;text-align:center}@media(max-width:rem(782px)){.jp-masthead{padding:0 rem(24px)}.jetpack-masterbar .jp-masthead{padding-left:rem(64px)}}.jp-masthead__inside-container{display:flex;flex-wrap:wrap;margin:0 auto;max-width:rem(1040px);padding-bottom:rem(6px);width:100%}@media(max-width:1250px){.jp-masthead__inside-container{max-width:95%}}.jp-masthead__logo-container{flex-grow:0;flex-shrink:0;padding:rem(11px) 0 0}@media(max-width:480px){.jp-masthead__logo-container{margin-right:rem(16px)}}.jp-masthead__logo-link{display:inline-block;outline:none;vertical-align:middle}.jp-masthead__logo-link:focus{box-shadow:0 0 0 2px #78dcfa;line-height:0}.jp-masthead__logo-link+code{background:#e6ecf1;border-radius:2px;color:#647a88;margin:0 10px;padding:5px 9px}.jp-masthead__nav{display:flex;flex-grow:1;flex-shrink:0;flex-wrap:nowrap;margin-top:rem(6px);padding:rem(4px) 0;text-align:right}.jp-masthead__nav .dops-button-group{align-self:center;flex-grow:1;font-size:0}@media(max-width:480px){.jp-masthead__nav{text-align:left}}#sandbox-domain-badge{background:#d63638;color:#fff;cursor:pointer;font-size:9px;font-weight:700;letter-spacing:.2em;text-shadow:none;text-transform:uppercase}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1128px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;max-width:var(--max-container-width);width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));padding:0 24px}}.SqdhUZkXCRuIpErj1B3z.OZC_9a1LhpWF9dv15Gdh{max-width:none;padding:unset}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off)}.cAbGtJDGgLubucBnz7vM{background-color:var(--jp-white)}.sexr0jUxC1jVixdKiDnC{margin-left:-20px}@media(max-width:782px){.sexr0jUxC1jVixdKiDnC{margin-left:-10px}}.sexr0jUxC1jVixdKiDnC.vKQ11sLeAM45M04P1ccj{background-color:var(--jp-white)}.jp-dashboard-footer{align-items:center;color:#000;display:flex;flex-flow:row wrap;justify-content:space-between;max-width:1128px;width:100%}.jp-dashboard-footer a,.jp-dashboard-footer a:hover,.jp-dashboard-footer a:visited{color:#000;text-decoration:none}.jp-dashboard-footer__jetpack-symbol,.jp-dashboard-footer__module-name{display:inline-block;vertical-align:middle}.jp-dashboard-footer__module-name{font-size:12px;font-weight:600;margin-left:5px}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.js new file mode 100644 index 00000000..486f5698 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.js @@ -0,0 +1,6 @@ +/*! For license information please see index.js.LICENSE.txt */ +!function(){var e={9487:function(e,t,n){"use strict";n.d(t,{X:function(){return c}});const i={AED:{symbol:"د.إ.",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function c(e){return i[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},8899:function(e,t,n){"use strict";n.d(t,{LR:function(){return o}});var i=n(9487),c=n(2003);function o(e,t,n={}){const o=(0,i.X)(t);if(!o||isNaN(e))return null;const{decimal:r,grouping:a,precision:s,symbol:l}={...o,...n},p=e<0?"-":"",u=Math.abs(e),g=Math.floor(u);return{sign:p,symbol:l,integer:(0,c.Z)(u,s,r,a).split(r)[0],fraction:s>0?(0,c.Z)(u-g,s,r,a).slice(1):""}}},2003:function(e,t,n){"use strict";function i(e,t=0,n=".",i=","){const c=(e+"").replace(/[^0-9+\-Ee.]/g,""),o=isFinite(+c)?+c:0,r=isFinite(+t)?Math.abs(t):0,a=(r?function(e,t){const n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,r):""+Math.round(o)).split(".");return a[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(a[1]||"").length<r&&(a[1]=a[1]||"",a[1]+=new Array(r-a[1].length+1).join("0")),a.join(n)}n.d(t,{Z:function(){return i}})},8294:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},2402:function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5235:function(e,t){var n;!function(){"use strict";var i={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var r=c.apply(null,n);r&&e.push(r)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var a in n)i.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(n=function(){return c}.apply(t,[]))||(e.exports=n)}()},9710:function(){},1494:function(e,t){"use strict";t.Z={"admin-page":"sexr0jUxC1jVixdKiDnC",background:"vKQ11sLeAM45M04P1ccj"}},511:function(e,t){"use strict";t.Z={section:"cAbGtJDGgLubucBnz7vM"}},281:function(e,t){"use strict";t.Z={"section-hero":"vMa4i_Dza2t5Zi_Bw9Nf"}},9054:function(){},3080:function(e,t){"use strict";t.Z={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",smCols:"4",mdCols:"8",lgCols:"12","col-sm-1":"RuVLl3q4lxTQa3wbhBJB","col-sm-1-start":"f9LZTRG4MMK42rS89afW","col-sm-1-end":"bHe_zKxjjpUwHw_MdYE1","col-sm-2":"QZbNrOqE2aNSn50xVhpU","col-sm-2-start":"ev7W3z7zVYPeHAlYqZjf","col-sm-2-end":"NJWd1m_e7lOiPYru2ZMP","col-sm-3":"Xc6nt1Qc1DI0Z2A3gt1r","col-sm-3-start":"UIcN_GXiPRoIsin8Kohg","col-sm-3-end":"GRKCyqb5LufCSCgykKFc","col-sm-4":"i_qTq8gqhhC3vIUepVRB","col-sm-4-start":"G3qaZ3Jpbvam_1XvGxgc","col-sm-4-end":"VRCNYKZtO9zukEwmgP1y","col-md-1":"tRm008K_WJL79WoNZTNL","col-md-1-start":"l5T2P_bgKts4tdaRkS1d","col-md-1-end":"zOCxfLZpF6BlgC7a_Yq1","col-md-2":"F80DdgVn0m5OpvtSQWka","col-md-2-start":"oI1c7JYfiJtMQHbhngtU","col-md-2-end":"pMQtA_4jh1_1lVknqEP5","col-md-3":"VenqMpdgyKQVUNNQcfqd","col-md-3-start":"seNYL99uoczf9V4MxBxT","col-md-3-end":"YKfF1HFhI9KygA5l3b2J","col-md-4":"yAi0Cv1xDWkoqsaUhvhR","col-md-4-start":"ubhnyZOnkgxNhh6XtVWv","col-md-4-end":"RGOPGQbWMJ9Ei5oFxS7X","col-md-5":"Sz1E2aWbX483ijdi6yge","col-md-5-start":"tku6_bRYrX9tMbgYGmIl","col-md-5-end":"b5JHttOhSEcI1WBlqAjk","col-md-6":"FboSx5MoKTAWbxXyYlCw","col-md-6-start":"Jhs8yEEmodG30edbJvag","col-md-6-end":"IpzbbKVqEqPcfIGkXkwt","col-md-7":"mhCPwfAZ4Kmm_empzJAq","col-md-7-start":"x034ilrJF7rO9UJB2rI1","col-md-7-end":"Wt8t2e16viRrOJ1lLA5v","col-md-8":"S6pIrEy9AMLKx9bgh_Ae","col-md-8-start":"kEfI4tGyuWfHTlRnvIab","col-md-8-end":"PUzX4RRsKq1dnsz3gebS","col-lg-1":"X_pdcLJikd8LS_YAdJlB","col-lg-1-start":"tl936d14Huby4khYp05X","col-lg-1-end":"hnge0LnR69d3NXEtEE1t","col-lg-2":"fj0NUMuyZQcPNgKcjp5Z","col-lg-2-start":"R2ncBX7a2NigdYCcV1OX","col-lg-2-end":"t8vMSDVYno9k9itRwnXb","col-lg-3":"wsDuEN2GqHx6qzo8dUdk","col-lg-3-start":"cIEVPUweWtLBy3xaXnMx","col-lg-3-end":"fajUWBwu1m2B479j3jmz","col-lg-4":"YR0c7fQTgMkDdWzwSyLp","col-lg-4-start":"xlwp8BmplxkKNMI7gamo","col-lg-4-end":"_C4O1w9DUqx1m3gPf8aA","col-lg-5":"Z54F1hAErckAIrKlxnXW","col-lg-5-start":"ezSDWkRHmKSxDJXxuiOH","col-lg-5-end":"T0ChoeAjGJjkkNrYhD4g","col-lg-6":"qtMoMPF6yHvGJnWHSsde","col-lg-6-start":"gdoywN5VPiWERfIBqkph","col-lg-6-end":"wUev_VH5uf_pwFFlbnAU","col-lg-7":"egIPDFJsOpownTClq9XP","col-lg-7-start":"yGhp9yoAW7k0kQik9AB7","col-lg-7-end":"SJ43U9mR5wUg5V2qBeQA","col-lg-8":"cTuyHfMwSUJxN_HdIEgd","col-lg-8-start":"smCr8DaIagcumdvdldiK","col-lg-8-end":"T03NHzQJvzwL6wAfIiTL","col-lg-9":"pMvxM3RJGjqyNdf9qg1Y","col-lg-9-start":"iIVpNRwEnQ_JI5gpp9EN","col-lg-9-end":"ZbQ4u4vGSX5rJOje4uGL","col-lg-10":"gKb5wuIDAlKGbrjK2vxy","col-lg-10-start":"Z7pINdImE2WJiYnZBTqm","col-lg-10-end":"ZTxp6qpvwurMdOnLLSz1","col-lg-11":"NnQTlbfnxPDR6cQ7rygg","col-lg-11-start":"O137wZd6Yl0olSA9PsXR","col-lg-11-end":"zf2OJtQ2MPz6SDoh6CB0","col-lg-12":"U3H6UHW6HqRt9hdzVg3O","col-lg-12-start":"zynnNeS_ZBTxABcVpUQH","col-lg-12-end":"vI8tltFZtFUNAy9Iag9s"}},8730:function(e,t){"use strict";t.Z={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",container:"SqdhUZkXCRuIpErj1B3z",fluid:"OZC_9a1LhpWF9dv15Gdh"}},9478:function(){},9610:function(){},2917:function(){},469:function(e,t,n){"use strict";var i=n(758);function c(){}function o(){}o.resetWarningCache=c,e.exports=function(){function e(e,t,n,c,o,r){if(r!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:c};return n.PropTypes=n,n}},5162:function(e,t,n){e.exports=n(469)()},758:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4743:function(e,t,n){"use strict";var i=n(2819),c=n(6483),o=n(1132);function r(e){class t extends Error{constructor(){super(...arguments),this.name=e}}return t}const a=r("JsonParseError"),s=r("JsonParseAfterRedirectError"),l=r("Api404Error"),p=r("Api404AfterRedirectError"),u=r("FetchNetworkError");const g=new function(e,t){let n=e,r={"X-WP-Nonce":t},a={credentials:"same-origin",headers:r},s={method:"post",credentials:"same-origin",headers:(0,i.assign)({},r,{"Content-type":"application/json"})},l=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",i=n.length?n.split("&"):[];return i.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+i.join("&")};const p={setApiRoot(e){n=e},setApiNonce(e){r={"X-WP-Nonce":e},a={credentials:"same-origin",headers:r},s={method:"post",credentials:"same-origin",headers:(0,i.assign)({},r,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{l=e},registerSite:(e,t)=>{const i={registration_nonce:e,no_iframe:!0};return(0,o.jetpackConfigHas)("consumer_slug")&&(i.plugin_slug=(0,o.jetpackConfigGet)("consumer_slug")),null!==t&&(i.redirect_uri=t),g(`${n}jetpack/v4/connection/register`,s,{body:JSON.stringify(i)}).then(m).then(d)},fetchAuthorizationUrl:e=>u((0,c.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),a).then(m).then(d),fetchSiteConnectionData:()=>u(`${n}jetpack/v4/connection/data`,a).then(d),fetchSiteConnectionStatus:()=>u(`${n}jetpack/v4/connection`,a).then(d),fetchSiteConnectionTest:()=>u(`${n}jetpack/v4/connection/test`,a).then(m).then(d),fetchUserConnectionData:()=>u(`${n}jetpack/v4/connection/data`,a).then(d),fetchUserTrackingSettings:()=>u(`${n}jetpack/v4/tracking/settings`,a).then(m).then(d),updateUserTrackingSettings:e=>g(`${n}jetpack/v4/tracking/settings`,s,{body:JSON.stringify(e)}).then(m).then(d),disconnectSite:()=>g(`${n}jetpack/v4/connection`,s,{body:JSON.stringify({isActive:!1})}).then(m).then(d),fetchConnectUrl:()=>u(`${n}jetpack/v4/connection/url`,a).then(m).then(d),unlinkUser:()=>g(`${n}jetpack/v4/connection/user`,s,{body:JSON.stringify({linked:!1})}).then(m).then(d),reconnect:()=>g(`${n}jetpack/v4/connection/reconnect`,s).then(m).then(d),fetchConnectedPlugins:()=>u(`${n}jetpack/v4/connection/plugins`,a).then(m).then(d),setHasSeenWCConnectionModal:()=>g(`${n}jetpack/v4/seen-wc-connection-modal`,s).then(m).then(d),fetchModules:()=>u(`${n}jetpack/v4/module/all`,a).then(m).then(d),fetchModule:e=>u(`${n}jetpack/v4/module/${e}`,a).then(m).then(d),activateModule:e=>g(`${n}jetpack/v4/module/${e}/active`,s,{body:JSON.stringify({active:!0})}).then(m).then(d),deactivateModule:e=>g(`${n}jetpack/v4/module/${e}/active`,s,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>g(`${n}jetpack/v4/module/${e}`,s,{body:JSON.stringify(t)}).then(m).then(d),updateSettings:e=>g(`${n}jetpack/v4/settings`,s,{body:JSON.stringify(e)}).then(m).then(d),getProtectCount:()=>u(`${n}jetpack/v4/module/protect/data`,a).then(m).then(d),resetOptions:e=>g(`${n}jetpack/v4/options/${e}`,s,{body:JSON.stringify({reset:!0})}).then(m).then(d),activateVaultPress:()=>g(`${n}jetpack/v4/plugins`,s,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(m).then(d),getVaultPressData:()=>u(`${n}jetpack/v4/module/vaultpress/data`,a).then(m).then(d),installPlugin:(e,t)=>{const i={slug:e,status:"active"};return t&&(i.source=t),g(`${n}jetpack/v4/plugins`,s,{body:JSON.stringify(i)}).then(m).then(d)},activateAkismet:()=>g(`${n}jetpack/v4/plugins`,s,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(m).then(d),getAkismetData:()=>u(`${n}jetpack/v4/module/akismet/data`,a).then(m).then(d),checkAkismetKey:()=>u(`${n}jetpack/v4/module/akismet/key/check`,a).then(m).then(d),checkAkismetKeyTyped:e=>g(`${n}jetpack/v4/module/akismet/key/check`,s,{body:JSON.stringify({api_key:e})}).then(m).then(d),fetchStatsData:e=>u(function(e){let t=`${n}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),a).then(m).then(d).then(h),getPluginUpdates:()=>u(`${n}jetpack/v4/updates/plugins`,a).then(m).then(d),getPlans:()=>u(`${n}jetpack/v4/plans`,a).then(m).then(d),fetchSettings:()=>u(`${n}jetpack/v4/settings`,a).then(m).then(d),updateSetting:e=>g(`${n}jetpack/v4/settings`,s,{body:JSON.stringify(e)}).then(m).then(d),fetchSiteData:()=>u(`${n}jetpack/v4/site`,a).then(m).then(d).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>u(`${n}jetpack/v4/site/features`,a).then(m).then(d).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>u(`${n}jetpack/v4/site/products`,a).then(m).then(d),fetchSitePurchases:()=>u(`${n}jetpack/v4/site/purchases`,a).then(m).then(d).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>u(`${n}jetpack/v4/site/benefits`,a).then(m).then(d).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>u(`${n}jetpack/v4/site/discount`,a).then(m).then(d).then((e=>e.data)),fetchSetupQuestionnaire:()=>u(`${n}jetpack/v4/setup/questionnaire`,a).then(m).then(d),fetchRecommendationsData:()=>u(`${n}jetpack/v4/recommendations/data`,a).then(m).then(d),fetchRecommendationsProductSuggestions:()=>u(`${n}jetpack/v4/recommendations/product-suggestions`,a).then(m).then(d),fetchRecommendationsUpsell:()=>u(`${n}jetpack/v4/recommendations/upsell`,a).then(m).then(d),fetchRecommendationsConditional:()=>u(`${n}jetpack/v4/recommendations/conditional`,a).then(m).then(d),saveRecommendationsData:e=>g(`${n}jetpack/v4/recommendations/data`,s,{body:JSON.stringify({data:e})}).then(m),fetchProducts:()=>u(`${n}jetpack/v4/products`,a).then(m).then(d),fetchRewindStatus:()=>u(`${n}jetpack/v4/rewind`,a).then(m).then(d).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>u(`${n}jetpack/v4/scan`,a).then(m).then(d).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>g(`${n}jetpack/v4/notice/${e}`,s,{body:JSON.stringify({dismissed:!0})}).then(m).then(d),fetchPluginsData:()=>u(`${n}jetpack/v4/plugins`,a).then(m).then(d),fetchIntroOffers:()=>u(`${n}jetpack/v4/intro-offers`,a).then(m).then(d),fetchVerifySiteGoogleStatus:e=>u(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,a).then(m).then(d),verifySiteGoogle:e=>g(`${n}jetpack/v4/verify-site/google`,s,{body:JSON.stringify({keyring_id:e})}).then(m).then(d),sendMobileLoginEmail:()=>g(`${n}jetpack/v4/mobile/send-login-email`,s).then(m).then(d),submitSurvey:e=>g(`${n}jetpack/v4/marketing/survey`,s,{body:JSON.stringify(e)}).then(m).then(d),saveSetupQuestionnaire:e=>g(`${n}jetpack/v4/setup/questionnaire`,s,{body:JSON.stringify(e)}).then(m).then(d),updateLicensingError:e=>g(`${n}jetpack/v4/licensing/error`,s,{body:JSON.stringify(e)}).then(m).then(d),updateLicenseKey:e=>g(`${n}jetpack/v4/licensing/set-license`,s,{body:JSON.stringify({license:e})}).then(m).then(d),getUserLicensesCounts:()=>u(`${n}jetpack/v4/licensing/user/counts`,a).then(m).then(d),getUserLicenses:()=>u(`${n}jetpack/v4/licensing/user/licenses`,a).then(m).then(d),updateLicensingActivationNoticeDismiss:e=>g(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,s,{body:JSON.stringify({last_detached_count:e})}).then(m).then(d),updateRecommendationsStep:e=>g(`${n}jetpack/v4/recommendations/step`,s,{body:JSON.stringify({step:e})}).then(m),confirmIDCSafeMode:()=>g(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,s).then(m),startIDCFresh:e=>g(`${n}jetpack/v4/identity-crisis/start-fresh`,s,{body:JSON.stringify({redirect_uri:e})}).then(m).then(d),migrateIDC:()=>g(`${n}jetpack/v4/identity-crisis/migrate`,s).then(m),attachLicenses:e=>g(`${n}jetpack/v4/licensing/attach-licenses`,s,{body:JSON.stringify({licenses:e})}).then(m).then(d),fetchSearchPlanInfo:()=>u(`${n}jetpack/v4/search/plan`,a).then(m).then(d),fetchSearchSettings:()=>u(`${n}jetpack/v4/search/settings`,a).then(m).then(d),updateSearchSettings:e=>g(`${n}jetpack/v4/search/settings`,s,{body:JSON.stringify(e)}).then(m).then(d),fetchSearchStats:()=>u(`${n}jetpack/v4/search/stats`,a).then(m).then(d),fetchWafSettings:()=>u(`${n}jetpack/v4/waf`,a).then(m).then(d),fetchWordAdsSettings:()=>u(`${n}jetpack/v4/wordads/settings`,a).then(m).then(d),updateWordAdsSettings:e=>g(`${n}jetpack/v4/wordads/settings`,s,{body:JSON.stringify(e)}),fetchSearchPricing:()=>u(`${n}jetpack/v4/search/pricing`,a).then(m).then(d)};function u(e,t){return fetch(l(e),t)}function g(e,t,n){return fetch(e,(0,i.assign)({},t,n)).catch(f)}function h(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}(0,i.assign)(this,p)};function m(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new p(e.redirected):new l})):e.json().catch((e=>h(e))).then((t=>{const n=new Error(`${t.message} (Status ${e.status})`);throw n.response=t,n.name="ApiError",n}))}function d(e){return e.json().catch((t=>h(t,e.redirected,e.url)))}function h(e,t,n){throw t?new s(n):new a}function f(){throw new u}t.ZP=g},7121:function(e,t,n){"use strict";var i=n(9196),c=n.n(i),o=n(5736),r=n(5609),a=n(5162),s=n.n(a);n(9710);const __=o.__,l=e=>{const{label:t,onClick:n,isLoading:i,displayError:o,errorMessage:a}=e;return c().createElement("div",{className:"jp-action-button"},c().createElement(r.Button,{className:"jp-action-button--button",label:t,onClick:n,variant:"primary",disabled:i},i?c().createElement(r.Spinner,null):t),o&&c().createElement("p",{className:"jp-action-button__error"},a))};l.propTypes={label:s().string.isRequired,onClick:s().func,isLoading:s().bool,displayError:s().bool,errorMessage:s().string},l.defaultProps={isLoading:!1,displayError:!1,errorMessage:__("An error occurred. Please try again.","jetpack-backup-pkg")},t.Z=l},1163:function(e,t,n){"use strict";var i=n(9196),c=n.n(i),o=n(5736),r=n(5162),a=n.n(r),s=n(5235),l=n.n(s),p=n(1494),u=n(2392),g=n(1202),m=n(8218),d=n(2939);const __=o.__,h=e=>{const{children:t,moduleName:n,moduleNameHref:i,a8cLogoHref:o,showHeader:r,showFooter:a,showBackground:s,header:h}=e,f=l()(p.Z["admin-page"],{[p.Z.background]:s});return c().createElement("div",{className:f},r&&c().createElement(m.Z,{horizontalSpacing:5},c().createElement(d.Z,null,h||c().createElement(g.Z,null))),c().createElement(m.Z,{fluid:!0,horizontalSpacing:0},c().createElement(d.Z,null,t)),a&&c().createElement(m.Z,{horizontalSpacing:5},c().createElement(d.Z,null,c().createElement(u.Z,{moduleName:n,a8cLogoHref:o,moduleNameHref:i}))))};h.defaultProps={moduleName:__("Jetpack","jetpack-backup-pkg"),showHeader:!0,header:null,showFooter:!0,showBackground:!0},h.propTypes={a8cLogoHref:a().string,moduleName:a().string,showHeader:a().bool,header:a().node,showFooter:a().bool,moduleNameHref:a().string,showBackground:a().bool},t.Z=h},8038:function(e,t,n){"use strict";var i=n(9196),c=n.n(i),o=n(511);t.Z=e=>{const{children:t}=e;return c().createElement("div",{className:o.Z.section},t)}},3244:function(e,t,n){"use strict";var i=n(9196),c=n.n(i),o=n(281);t.Z=e=>{const{children:t}=e;return c().createElement("div",{className:o.Z["section-hero"]},t)}},207:function(e,t,n){"use strict";var i=n(2402),c=n.n(i),o=n(9196),r=n.n(o),a=n(5235),s=n.n(a),l=n(5736),p=n(5162),u=n.n(p);const __=l.__,g=e=>{const{title:t,height:n,className:i,...o}=e;return r().createElement("svg",c()({role:"img",x:"0",y:"0",viewBox:"0 0 935 38.2",enableBackground:"new 0 0 935 38.2","aria-labelledby":"jp-automattic-byline-logo-title",height:n,className:s()("jp-automattic-byline-logo",i)},o),r().createElement("title",{id:"jp-automattic-byline-logo-title"},t),r().createElement("path",{d:"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"}),r().createElement("path",{d:"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z"}),r().createElement("path",{d:"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7zM886.2 37l-23.4-24.1 -2.3-2.5V37h-6.8V1h6.5l22.7 24.1 2.3 2.6V1h6.8v36H886.2zM902.3 37V1H935v5.6h-26v9.2h20v5.5h-20v10.1h26V37H902.3z"}))};g.defaultProps={title:__("An Automattic Airline","jetpack-backup-pkg"),height:7,className:""},g.propTypes={title:u().string,height:u().number,className:u().string},t.Z=g},2392:function(e,t,n){"use strict";var i=n(2402),c=n.n(i),o=n(9196),r=n.n(o),a=n(5736),s=n(5235),l=n.n(s),p=n(5162),u=n.n(p),g=n(207),m=(n(9054),n(1202));const __=a.__,d=e=>{const{a8cLogoHref:t,moduleName:n,className:i,moduleNameHref:o,...a}=e;return r().createElement("div",c()({className:l()("jp-dashboard-footer",i)},a),r().createElement("div",{className:"jp-dashboard-footer__footer-left"},r().createElement(m.Z,{logoColor:"#000",showText:!1,height:16,className:"jp-dashboard-footer__jetpack-symbol","aria-label":__("Jetpack logo","jetpack-backup-pkg")}),r().createElement("span",{className:"jp-dashboard-footer__module-name"},o?r().createElement("a",{href:o,"aria-label":n},n):n)),r().createElement("div",{className:"jp-dashboard-footer__footer-right"},r().createElement("a",{href:t,"aria-label":__("An Automattic Airline","jetpack-backup-pkg")},r().createElement(g.Z,null))))};d.defaultProps={a8cLogoHref:"https://automattic.com",moduleName:__("Jetpack","jetpack-backup-pkg"),className:"",moduleNameHref:"https://jetpack.com"},d.propTypes={a8cLogoHref:u().string,moduleName:u().string,className:u().string,moduleNameHref:u().string},t.Z=d},1202:function(e,t,n){"use strict";var i=n(2402),c=n.n(i),o=n(8294),r=n.n(o),a=n(5162),s=n.n(a),l=n(9196),p=n.n(l),u=n(5235),g=n.n(u),m=n(5736);const __=m.__;class d extends p().Component{render(){const{logoColor:e,showText:t,className:n,...i}=this.props,o=t?"0 0 118 32":"0 0 32 32";return p().createElement("svg",c()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:o,className:g()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title"},i),p().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-backup-pkg")),p().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&p().createElement(l.Fragment,null,p().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),p().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),p().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),p().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),p().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),p().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),p().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}r()(d,"propTypes",{className:s().string,width:s().number,height:s().number,showText:s().bool,logoColor:s().string}),r()(d,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"}),t.Z=d},2939:function(e,t,n){"use strict";var i=n(9196),c=n.n(i),o=n(5235),r=n.n(o),a=n(5162),s=n.n(a),l=n(3080);const p=Number(l.Z.smCols),u=Number(l.Z.mdCols),g=Number(l.Z.lgCols),m=e=>{var t,n,i,o,a,s;const{children:m,className:d}=e,h=Math.min(p,(null==e?void 0:e.sm)??p),f=Math.min(p,(null==e||null===(t=e.sm)||void 0===t?void 0:t.start)??0),b=Math.min(p,(null==e||null===(n=e.sm)||void 0===n?void 0:n.end)??0),k=Math.min(u,(null==e?void 0:e.md)??u),y=Math.min(u,(null==e||null===(i=e.md)||void 0===i?void 0:i.start)??0),v=Math.min(u,(null==e||null===(o=e.md)||void 0===o?void 0:o.end)??0),E=Math.min(g,(null==e?void 0:e.lg)??g),_=Math.min(g,(null==e||null===(a=e.lg)||void 0===a?void 0:a.start)??0),N=Math.min(g,(null==e||null===(s=e.lg)||void 0===s?void 0:s.end)??0),S=r()(d,{[l.Z[`col-sm-${h}`]]:!(f&&b),[l.Z[`col-sm-${f}-start`]]:f>0,[l.Z[`col-sm-${b}-end`]]:b>0,[l.Z[`col-md-${k}`]]:!(y&&v),[l.Z[`col-md-${y}-start`]]:y>0,[l.Z[`col-md-${v}-end`]]:v>0,[l.Z[`col-lg-${E}`]]:!(_&&N),[l.Z[`col-lg-${_}-start`]]:_>0,[l.Z[`col-lg-${N}-end`]]:N>0});return c().createElement("div",{className:S},m)};m.proptypes={className:s().string,sm:s().oneOfType([s().number,s().shape({start:s().number,end:s().number})]),md:s().oneOfType([s().number,s().shape({start:s().number,end:s().number})]),lg:s().oneOfType([s().number,s().shape({start:s().number,end:s().number})]),children:s().node},t.Z=m},8218:function(e,t,n){"use strict";var i=n(9196),c=n.n(i),o=n(5235),r=n.n(o),a=n(5162),s=n.n(a),l=n(8730);const p=e=>{const{children:t,fluid:n,className:i}=e,o=`calc( var(--horizontal-spacing) * ${e.horizontalSpacing} )`,a={paddingTop:o,paddingBottom:o,rowGap:`calc( var(--horizontal-spacing) * ${e.horizontalGap} )`},s=r()(i,l.Z.container,{[l.Z.fluid]:n});return c().createElement("div",{className:s,style:a},t)};p.propTypes={fluid:s().bool,className:s().string,horizontalSpacing:s().number,horizontalGap:s().number,children:s().node},p.defaultProps={fluid:!1,horizontalGap:1,horizontalSpacing:1},t.Z=p},667:function(e,t,n){"use strict";var i=n(9196),c=n.n(i),o=n(5162),r=n.n(o),a=n(5609),s=n(8899),l=n(5736);n(9478);const __=l.__,p=e=>-1===e.fraction.indexOf("00"),u=e=>{const t=(0,s.LR)(e.priceBefore,e.currencyCode),n=(0,s.LR)(e.priceAfter,e.currencyCode);return c().createElement("div",{className:"jp-components__pricing-card"},e.icon&&c().createElement("div",{className:"jp-components__pricing-card__icon"},c().createElement("img",{src:e.icon,alt:(0,l.sprintf)( +/* translators: placeholder is a product name */ +__("Icon for the product %s","jetpack-backup-pkg"),e.title)})),c().createElement("h1",{className:"jp-components__pricing-card__title"},e.title),c().createElement("div",{className:"jp-components__pricing-card__pricing"},e.priceBefore!==e.priceAfter&&c().createElement("div",{className:"jp-components__pricing-card__price-before"},c().createElement("span",{className:"jp-components__pricing-card__currency"},t.symbol),c().createElement("span",{className:"jp-components__pricing-card__price"},t.integer),p(t)&&c().createElement("span",{className:"jp-components__pricing-card__price-decimal"}," ",t.fraction),c().createElement("div",{className:"jp-components__pricing-card__price-strikethrough"})),c().createElement("div",{className:"jp-components__pricing-card__price-after"},c().createElement("span",{className:"jp-components__pricing-card__currency"},n.symbol),c().createElement("span",{className:"jp-components__pricing-card__price"},n.integer),p(n)&&c().createElement("span",{className:"jp-components__pricing-card__price-decimal"},n.fraction)),c().createElement("span",{className:"jp-components__pricing-card__price-details"},e.priceDetails)),e.children&&c().createElement("div",{className:"jp-components__pricing-card__extra-content-wrapper"},e.children),e.ctaText&&c().createElement("div",{className:"jp-components__pricing-card__cta"},c().createElement(a.Button,{className:"jp-components__pricing-card__button",label:e.ctaText,onClick:e.onCtaClick},e.ctaText)),e.infoText&&c().createElement("div",{className:"jp-components__pricing-card__info"},e.infoText))};u.propTypes={title:r().string.isRequired,icon:r().string,priceBefore:r().number.isRequired,priceAfter:r().number.isRequired,priceDetails:r().string,currencyCode:r().string,ctaText:r().string,onCtaClick:r().func,infoText:r().oneOfType([r().string,r().object])},u.defaultProps={currencyCode:"USD",priceDetails:__("/month, paid yearly","jetpack-backup-pkg")},t.Z=u},9922:function(e,t,n){"use strict";function i(e,t,n,i){const c=new URL("https://wordpress.com/checkout/"),o=new URL(`${c}${t}/${e}`);return o.searchParams.set("redirect_to",n),i||o.searchParams.set("unlinked",1),o.searchParams.set("site",t),o.toString()}n.d(t,{Z:function(){return i}})},6324:function(e,t,n){"use strict";function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let i;var c;"undefined"!=typeof window&&(i=null===(c=window.Initial_State)||void 0===c?void 0:c.calypsoEnv);if(0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);Object.keys(t).map((e=>{n[e]=encodeURIComponent(t[e])})),!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),i&&(n.calypso_env=i);const o=Object.keys(n).map((e=>e+"="+n[e])).join("&");return"https://jetpack.com/redirect/?"+o}n.d(t,{Z:function(){return i}})},1132:function(e,t,n){let i={};try{i=n(4608)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),i={missingConfig:!0}}const c=e=>i.hasOwnProperty(e);e.exports={jetpackConfigHas:c,jetpackConfigGet:e=>{if(!c(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return i[e]}}},2458:function(e,t,n){"use strict";var i=n(9196),c=n.n(i),o=n(5162),r=n.n(o);const a=e=>{const{images:t,assetBaseUrl:n}=e;if(!t.length)return null;const i=t.map(((e,t)=>c().createElement(c().Fragment,{key:t},c().createElement("img",{src:n+e,alt:""}))));return c().createElement("div",{className:"jp-connection__connect-screen__image-slider"},i)};a.propTypes={images:r().arrayOf(r().string).isRequired,assetBaseUrl:r().string},a.defaultProps={assetBaseUrl:""},t.Z=a},8524:function(e,t,n){"use strict";var i=n(9196),c=n.n(i),o=n(5162),r=n.n(o),a=n(1202),s=n(2458);n(9610);const l=e=>{const{title:t,children:n,className:i,assetBaseUrl:o,images:r}=e,l=null==r?void 0:r.length;return c().createElement("div",{className:"jp-connection__connect-screen-layout"+(l?" jp-connection__connect-screen-layout__two-columns":"")+(i?" "+i:"")},c().createElement("div",{className:"jp-connection__connect-screen-layout__left"},c().createElement(a.Z,null),c().createElement("h2",null,t),n),l?c().createElement("div",{className:"jp-connection__connect-screen-layout__right"},c().createElement(s.Z,{images:r,assetBaseUrl:o})):null)};l.propTypes={title:r().string,className:r().string,images:r().arrayOf(r().string),assetBaseUrl:r().string},t.Z=l},7710:function(e,t,n){"use strict";var i=n(9196),c=n.n(i),o=n(5162),r=n.n(o),a=n(5736),s=n(4082),l=n(1294),p=n(8258);const __=a.__,u=e=>{const{title:t,autoTrigger:n,buttonLabel:i,apiRoot:o,apiNonce:r,registrationNonce:a,from:u,redirectUri:g,children:m,priceBefore:d,priceAfter:h,pricingIcon:f,pricingTitle:b,pricingCurrencyCode:k,wpcomProductSlug:y,siteProductAvailabilityHandler:v}=e,{handleRegisterSite:E,isRegistered:_,isUserConnected:N,siteIsRegistering:S,userIsConnecting:R,registrationError:j}=(0,l.Z)({registrationNonce:a,redirectUri:g,apiRoot:o,apiNonce:r,autoTrigger:n,from:u}),C=y||"",{run:w,hasCheckoutStarted:Z}=(0,p.Z)({productSlug:C,redirectUrl:g,siteProductAvailabilityHandler:v,from:u}),T=!_||!N,P=Boolean(j),I=S||R||Z,A=C?w:E;return c().createElement(s.Z,{title:t,buttonLabel:i,priceBefore:d,priceAfter:h,pricingIcon:f,pricingTitle:b,pricingCurrencyCode:k,handleButtonClick:A,showConnectButton:T,displayButtonError:P,buttonIsLoading:I},m)};u.propTypes={title:r().string,buttonLabel:r().string,apiRoot:r().string.isRequired,apiNonce:r().string.isRequired,registrationNonce:r().string.isRequired,from:r().string,redirectUri:r().string.isRequired,autoTrigger:r().bool,pricingTitle:r().string.isRequired,icon:r().string,priceBefore:r().number.isRequired,priceAfter:r().number.isRequired,pricingCurrencyCode:r().string,wpcomProductSlug:r().string,checkSiteHasWpcomProduct:r().func},u.defaultProps={title:__("Over 5 million WordPress sites are faster and more secure","jetpack-backup-pkg"),buttonLabel:__("Set up Jetpack","jetpack-backup-pkg"),pricingCurrencyCode:"USD",autoTrigger:!1},t.Z=u},4082:function(e,t,n){"use strict";var i=n(9196),c=n.n(i),o=n(5162),r=n.n(o),a=n(5736),s=n(6324),l=n(7121),p=n(667),u=n(9307),g=n(8524);n(2917);const __=a.__,m=e=>{const{title:t,buttonLabel:n,children:i,priceBefore:o,priceAfter:r,pricingIcon:a,pricingTitle:m,pricingCurrencyCode:d,isLoading:h,handleButtonClick:f,showConnectButton:b,displayButtonError:k,buttonIsLoading:y}=e,v=(0,u.createInterpolateElement)(__("By clicking the button above, you agree to our <tosLink>Terms of Service</tosLink> and to <shareDetailsLink>share details</shareDetailsLink> with WordPress.com.","jetpack-backup-pkg"),{tosLink:c().createElement("a",{href:(0,s.Z)("wpcom-tos"),rel:"noopener noreferrer",target:"_blank"}),shareDetailsLink:c().createElement("a",{href:(0,s.Z)("jetpack-support-what-data-does-jetpack-sync"),rel:"noopener noreferrer",target:"_blank"})}),E=(0,u.createInterpolateElement)(__("Already have a subscription? <connectButton/>","jetpack-backup-pkg"),{connectButton:c().createElement(l.Z,{label:__("Log in to get started","jetpack-backup-pkg"),onClick:f,isLoading:y})});return c().createElement(g.Z,{title:t,className:"jp-connection__connect-screen-required-plan"+(h?" jp-connection__connect-screen-required-plan__loading":"")},c().createElement("div",{className:"jp-connection__connect-screen-required-plan__content"},i,c().createElement("div",{className:"jp-connection__connect-screen-required-plan__pricing-card"},c().createElement(p.Z,{title:m,icon:a,priceBefore:o,currencyCode:d,priceAfter:r,infoText:b?v:""},b&&c().createElement(l.Z,{label:n,onClick:f,displayError:k,isLoading:y}))),b&&c().createElement("div",{className:"jp-connection__connect-screen-required-plan__with-subscription"},E)))};m.propTypes={pricingTitle:r().string.isRequired,priceBefore:r().number.isRequired,priceAfter:r().number.isRequired,pricingCurrencyCode:r().string,title:r().string,buttonLabel:r().string,pricingIcon:r().string,isLoading:r().bool,handleButtonClick:r().func,showConnectButton:r().bool,displayButtonError:r().bool,buttonIsLoading:r().bool},m.defaultProps={pricingCurrencyCode:"USD",showConnectButton:!0,isLoading:!1,buttonIsLoading:!1,displayButtonError:!1,handleButtonClick:()=>{}},t.Z=m},1294:function(e,t,n){"use strict";var i,c=n(9196),o=n(9818),r=n(4743),a=n(428);const s=null!==(i=window)&&void 0!==i&&i.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};t.Z=function(){let{registrationNonce:e=s.registrationNonce,apiRoot:t=s.apiRoot,apiNonce:n=s.apiNonce,redirectUri:i,autoTrigger:l,from:p,skipUserConnection:u}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{registerSite:g,connectUser:m,refreshConnectedPlugins:d}=(0,o.useDispatch)(a.t),h=(0,o.useSelect)((e=>e(a.t).getRegistrationError())),{siteIsRegistering:f,userIsConnecting:b,userConnectionData:k,connectedPlugins:y,isRegistered:v,isUserConnected:E,hasConnectedOwner:_}=(0,o.useSelect)((e=>({siteIsRegistering:e(a.t).getSiteIsRegistering(),userIsConnecting:e(a.t).getUserIsConnecting(),userConnectionData:e(a.t).getUserConnectionData(),connectedPlugins:e(a.t).getConnectedPlugins(),...e(a.t).getConnectionStatus()}))),N=()=>{u?i&&(window.location=i):m({from:p,redirectUri:i})},S=t=>{t&&t.preventDefault(),v?N():g({registrationNonce:e,redirectUri:i}).then((()=>{N()}))};return(0,c.useEffect)((()=>{r.ZP.setApiRoot(t),r.ZP.setApiNonce(n)}),[t,n]),(0,c.useEffect)((()=>{!l||f||b||S()}),[]),{handleRegisterSite:S,handleConnectUser:N,refreshConnectedPlugins:d,isRegistered:v,isUserConnected:E,siteIsRegistering:f,userIsConnecting:b,registrationError:h,userConnectionData:k,hasConnectedOwner:_,connectedPlugins:y}}},8258:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var i,c=n(9196),o=n(9818),r=n(4743),a=n(9922),s=n(428),l=n(1294);const{registrationNonce:p,apiRoot:u,apiNonce:g,siteSuffix:m}=null!==(i=window)&&void 0!==i&&i.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};function d(){let{productSlug:e,redirectUrl:t,siteSuffix:n=m,siteProductAvailabilityHandler:i=null,from:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[h,f]=(0,c.useState)(!1),{registerSite:b}=(0,o.useDispatch)(s.t),{isUserConnected:k,isRegistered:y,handleConnectUser:v}=(0,l.Z)({redirectUri:t,from:d}),E=(0,a.Z)(e,n,t,k),_=()=>Promise.resolve(i&&i()).then((e=>{if(e)return v();window.location.href=E})),N=e=>{if(e&&e.preventDefault(),f(!0),y)return _();b({registrationNonce:p,redirectUri:t}).then(_)};return(0,c.useEffect)((()=>{r.ZP.setApiRoot(u),r.ZP.setApiNonce(g)}),[]),{run:N,isRegistered:y,hasCheckoutStarted:h}}},7523:function(e,t,n){"use strict";n.d(t,{LI:function(){return o},N4:function(){return a},T1:function(){return l},TS:function(){return p},ZP:function(){return v},i6:function(){return c},qV:function(){return s},r7:function(){return r},wQ:function(){return g}});var i=n(4743);const c="SET_CONNECTION_STATUS",o="SET_CONNECTION_STATUS_IS_FETCHING",r="SET_SITE_IS_REGISTERING",a="SET_USER_IS_CONNECTING",s="SET_REGISTRATION_ERROR",l="CLEAR_REGISTRATION_ERROR",p="SET_AUTHORIZATION_URL",u="CONNECT_USER",g="SET_CONNECTED_PLUGINS",m=e=>({type:c,connectionStatus:e}),d=e=>({type:r,isRegistering:e}),h=e=>({type:a,isConnecting:e}),f=e=>({type:s,registrationError:e}),b=()=>({type:l}),k=e=>({type:p,authorizationUrl:e}),y=e=>({type:g,connectedPlugins:e});const v={setConnectionStatus:m,setConnectionStatusIsFetching:e=>({type:o,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:d,setUserIsConnecting:h,setRegistrationError:f,clearRegistrationError:b,setAuthorizationUrl:k,registerSite:function*(e){let{registrationNonce:t,redirectUri:n}=e;yield b(),yield d(!0);try{const e=yield{type:"REGISTER_SITE",registrationNonce:t,redirectUri:n};return yield m({isRegistered:!0}),yield k(e.authorizeUrl),yield d(!1),Promise.resolve(e)}catch(e){return yield f(e),yield d(!1),Promise.reject(e)}},connectUser:function*(){let{from:e,redirectFunc:t,redirectUri:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yield h(!0),yield{type:u,from:e,redirectFunc:t,redirectUri:n}},setConnectedPlugins:y,refreshConnectedPlugins:()=>async e=>{let{dispatch:t}=e;return await new Promise((e=>i.ZP.fetchConnectedPlugins().then((n=>{t(y(n)),e(n)}))))}}},1432:function(e,t,n){"use strict";var i=n(4743),c=n(9818),o=n(428);const r=(0,c.createRegistryControl)((e=>{let{resolveSelect:t}=e;return function(){let{from:e,redirectFunc:n,redirectUri:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((c,r)=>{t(o.t).getAuthorizationUrl(i).then((t=>{const i=n||(e=>window.location.assign(e)),o=new URL(t);e&&o.searchParams.set("from",encodeURIComponent(e));const r=o.toString();i(r),c(r)})).catch((e=>{r(e)}))}))}}));t.Z={FETCH_AUTHORIZATION_URL:e=>{let{redirectUri:t}=e;return i.ZP.fetchAuthorizationUrl(t)},REGISTER_SITE:e=>{let{registrationNonce:t,redirectUri:n}=e;return i.ZP.registerSite(t,n)},CONNECT_USER:r}},1479:function(e,t,n){"use strict";var i=n(9818),c=n(7523);const o=(0,i.combineReducers)({connectionStatus:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===c.i6?{...e,...t.connectionStatus}:e},connectionStatusIsFetching:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===c.LI?t.isFetching:e},siteIsRegistering:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===c.r7?t.isRegistering:e},userIsConnecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===c.N4?t.isConnecting:e},registrationError:(e,t)=>{switch(t.type){case c.T1:return!1;case c.qV:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===c.TS?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===c.wQ?t.connectedPlugins:e}});t.Z=o},7728:function(e,t,n){"use strict";var i=n(9818),c=n(7523),o=n(428);const r={getAuthorizationUrl:{isFulfilled:function(e){const t=Boolean(e.authorizationUrl);for(var n=arguments.length,c=new Array(n>1?n-1:0),r=1;r<n;r++)c[r-1]=arguments[r];const a=(0,i.select)(o.t).hasFinishedResolution("getAuthorizationUrl",c);return t&&!a&&(0,i.dispatch)(o.t).finishResolution("getAuthorizationUrl",c),t},*fulfill(e){const t=yield c.ZP.fetchAuthorizationUrl(e);yield c.ZP.setAuthorizationUrl(t.authorizeUrl)}}};t.Z={...r}},2725:function(e,t){"use strict";const n={getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1,getUserConnectionData:e=>e.userConnectionData||!1,getConnectedPlugins:e=>e.connectedPlugins||[]};t.Z=n},3535:function(e,t,n){"use strict";var i=n(8294),c=n.n(i),o=n(9818);class r{static mayBeInit(e,t){null===r.store&&(r.store=(0,o.createReduxStore)(e,t),(0,o.register)(r.store))}}c()(r,"store",null),t.Z=r},428:function(e,t,n){"use strict";n.d(t,{t:function(){return l}});var i=n(1479),c=n(7523),o=n(2725),r=n(7728),a=n(1432),s=n(3535);const l="jetpack-connection",p=window.JP_CONNECTION_INITIAL_STATE;p||console.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),s.Z.mayBeInit(l,{__experimentalUseThunks:!0,reducer:i.Z,actions:c.ZP,selectors:o.Z,resolvers:r.Z,controls:a.Z,initialState:p||{}})},3133:function(e,t,n){"use strict";var i=n(9307),c=n(5736),o=n(6989),r=n.n(o),a=n(9818),s=n(6324),l=n(8218),p=n(2939),u=n(667),g=n(3244),m=n(8038),d=n(1163),h=n(1925),f=n(2329),b=n(5993);const __=c.__;t.Z=()=>{const[e,t]=(0,f.Z)(),[n,c]=(0,i.useState)([]),[o,k]=(0,i.useState)(null),[y,v]=(0,i.useState)(!1),[E,_]=(0,i.useState)(!1),[N,S]=(0,i.useState)(!0),[R,j]=(0,i.useState)(0),[C,w]=(0,i.useState)(0),Z=(0,a.useSelect)((e=>e(b.t).getCalypsoSlug()),[]);(0,i.useEffect)((()=>{0<Object.keys(e).length&&v(!0)}),[e]),(0,i.useEffect)((()=>{r()({path:"/jetpack/v4/backup-capabilities"}).then((e=>{c(e.capabilities),_(!0)}),(()=>{_(!0),k("Failed to fetch site capabilities")})),r()({path:"/jetpack/v4/backup-promoted-product-info"}).then((e=>{j(e.cost/12),e.introductory_offer?w(e.introductory_offer.cost_per_interval/12):w(e.cost/12)}))}),[]);const T=()=>n.includes("backup"),P=()=>{window.location.href=(0,s.Z)("backup-plugin-upgrade-10gb",{site:Z})},I=()=>y&&e.isUserConnected&&e.isRegistered?(N||S(!0),E?T()?React.createElement(l.Z,{horizontalSpacing:5,fluid:!0},React.createElement(p.Z,null,React.createElement(h.Z,null))):o?React.createElement(l.Z,{horizontalSpacing:3},React.createElement(p.Z,{lg:12,md:8,sm:4},o)):(()=>{const e=__("14 day money back guarantee.","jetpack-backup-pkg"),t=__("Special introductory pricing, all renewals are at full price. 14 day money back guarantee.","jetpack-backup-pkg");return React.createElement(l.Z,{horizontalSpacing:3,horizontalGap:3},React.createElement(p.Z,{lg:6,md:6,sm:4},React.createElement("h1",null,__("Secure your site with a Backup subscription.","jetpack-backup-pkg")),React.createElement("p",null," ",__("Get peace of mind knowing that all your work will be saved, and get back online quickly with one-click restores.","jetpack-backup-pkg")),React.createElement("ul",{className:"jp-product-promote"},React.createElement("li",null,__("Automated real-time backups","jetpack-backup-pkg")),React.createElement("li",null,__("Easy one-click restores","jetpack-backup-pkg")),React.createElement("li",null,__("Complete list of all site changes","jetpack-backup-pkg")),React.createElement("li",null,__("Global server infrastructure","jetpack-backup-pkg")),React.createElement("li",null,__("Best-in-class support","jetpack-backup-pkg")))),React.createElement(p.Z,{lg:1,md:1,sm:0}),React.createElement(p.Z,{lg:5,md:6,sm:4},React.createElement(u.Z,{ctaText:__("Get Jetpack Backup","jetpack-backup-pkg"),icon:"data:image/svg+xml,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m21.092 15.164.019-1.703v-.039c0-1.975-1.803-3.866-4.4-3.866-2.17 0-3.828 1.351-4.274 2.943l-.426 1.524-1.581-.065a2.92 2.92 0 0 0-.12-.002c-1.586 0-2.977 1.344-2.977 3.133 0 1.787 1.388 3.13 2.973 3.133H22.399c1.194 0 2.267-1.016 2.267-2.4 0-1.235-.865-2.19-1.897-2.368l-1.677-.29Zm-10.58-3.204a4.944 4.944 0 0 0-.201-.004c-2.75 0-4.978 2.298-4.978 5.133s2.229 5.133 4.978 5.133h12.088c2.357 0 4.267-1.97 4.267-4.4 0-2.18-1.538-3.99-3.556-4.339v-.06c0-3.24-2.865-5.867-6.4-5.867-2.983 0-5.49 1.871-6.199 4.404Z' fill='%23000'/%3E%3C/svg%3E",infoText:C===R?e:t,onCtaClick:P,priceAfter:C,priceBefore:R,title:__("Jetpack Backup","jetpack-backup-pkg")})))})():React.createElement("div",null)):(N&&S(!1),React.createElement(l.Z,{horizontalSpacing:3,horizontalGap:3},React.createElement(p.Z,{lg:12,md:8,sm:4},t())));return React.createElement(d.Z,{withHeader:N,withFooter:N,moduleName:__("Jetpack Backup","jetpack-backup-pkg"),a8cLogoHref:"https://www.jetpack.com"},React.createElement("div",{id:"jetpack-backup-admin-container",className:"jp-content"},React.createElement("div",{className:"content"},React.createElement(g.Z,null,I()),React.createElement(m.Z,null,y&&e.isUserConnected&&e.isRegistered&&React.createElement(l.Z,{horizontalSpacing:3,horizontalGap:3},React.createElement(p.Z,{lg:6,md:4},React.createElement("h2",null,__("Your cloud backups","jetpack-backup-pkg")),React.createElement("p",null,__("All the backups are safely stored in the cloud and available for you at any time on Jetpack.com, with full details about status and content.","jetpack-backup-pkg")),T()&&React.createElement(React.Fragment,null,React.createElement("p",null,React.createElement("a",{href:(0,s.Z)("jetpack-backup",{site:Z}),target:"_blank",rel:"noreferrer"},__("See all your backups","jetpack-backup-pkg"))))),React.createElement(p.Z,{lg:1,md:1,sm:0}),React.createElement(p.Z,{lg:5,md:3,sm:4},React.createElement("h2",null,__("Your site's heartbeat","jetpack-backup-pkg")),React.createElement("p",null,__("The activity log lets you see everything that’s going on with your site outlined in an organized, readable way.","jetpack-backup-pkg")),T()&&React.createElement("p",null,React.createElement("a",{href:(0,s.Z)("backup-plugin-activity-log",{site:Z}),target:"_blank",rel:"noreferrer"},__("See your site's activity","jetpack-backup-pkg")))))))))}},1925:function(e,t,n){"use strict";var i=n(9771),c=n(5736),o=n(6989),r=n.n(o),a=n(9307),s=n(9818),l=n(6324),p=n(5993),u=n(7355),g=n(8287),m=n(50),d=n(4256),h=n(567),f=n(7410),b=n(4535),k=n(4444),y=n(6476),v=n(8406);const __=c.__;t.Z=()=>{const[e,t]=(0,a.useState)(0),[n,o]=(0,a.useState)(0),[E,_]=(0,a.useState)(""),[N,S]=(0,a.useState)({posts:0,uploads:0,plugins:0,themes:0}),R=(0,s.useSelect)((e=>e(p.t).getCalypsoSlug()),[]),j=(0,s.useSelect)((e=>e(p.t).getSiteTitle()),""),C=0,w=1,Z=2,T=3,P=4,I=5,[A,U]=(0,a.useState)(C);(0,a.useEffect)((()=>{r()({path:"/jetpack/v4/backups"}).then((e=>{let c=null;if(0===e.length)U(Z);else if(1===e.length&&"error-will-retry"===e[0].status)U(T);else{if(e.forEach((e=>{null===c&&"finished"===e.status&&e.stats&&(c=e,U(I))})),null===c&&"started"===e[0].status&&(c=e[0],t(c.percent),U(w)),!c)return void U(P);if("finished"===c.status){const e=c.stats.prefix+"posts";S({plugins:c.stats.plugins.count,themes:c.stats.themes.count,uploads:c.stats.uploads.count,posts:c.stats.tables[e].post_published}),_((0,i.date)("c",c.last_updated+"+00:00"))}}0!==e.length&&"started"!==c.status||setTimeout((()=>{o(n+1)}),1e3)}),(()=>{U(P)}))}),[n]);const $=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return React.createElement("div",{className:"jp-row"},React.createElement("div",{className:"lg-col-span-5 md-col-span-8 sm-col-span-4"},t&&React.createElement("div",{className:"backup__progress"},React.createElement("div",{className:"backup__progress-info"},React.createElement("p",null,(0,c.sprintf)( +/* translators: placeholder is the Site Title */ +__("Backing up %s","jetpack-backup-pkg"),j)),React.createElement("p",{className:"backup__progress-info-percentage"},e,"%")),React.createElement("div",{className:"backup__progress-bar"},React.createElement("div",{className:"backup__progress-bar-actual",style:{width:e+"%"}}))),React.createElement("h1",null,__("Your first cloud backup will be ready soon","jetpack-backup-pkg")),React.createElement("p",null,__("The first backup usually takes a few minutes, so it will become available soon.","jetpack-backup-pkg")),React.createElement("p",null,(0,a.createInterpolateElement)(__("In the meanwhile, you can start getting familiar with your <a>backup management on Jetpack.com</a>.","jetpack-backup-pkg"),{a:React.createElement("a",{href:(0,l.Z)("jetpack-backup",{site:R}),target:"_blank",rel:"noreferrer"})}))),React.createElement("div",{className:"lg-col-span-1 md-col-span-4 sm-col-span-0"}),React.createElement("div",{className:"backup__animation lg-col-span-6 md-col-span-2 sm-col-span-2"},React.createElement("img",{className:"backup__animation-el-1",src:k,alt:""}),React.createElement("img",{className:"backup__animation-el-2",src:y,alt:""}),React.createElement("img",{className:"backup__animation-el-3",src:v,alt:""})))};return React.createElement("div",{className:"jp-wrap jp-content"},C===A&&React.createElement("div",{className:"jp-row"}),Z===A&&$(),T===A&&$(!1),w===A&&$(),I===A&&React.createElement("div",{className:"jp-row"},React.createElement("div",{className:"lg-col-span-3 md-col-span-4 sm-col-span-4"},React.createElement("div",{className:"backup__latest"},React.createElement("img",{src:m,alt:""}),React.createElement("h2",null,__("Latest Backup","jetpack-backup-pkg"))),React.createElement("h1",null,(e=>{const t=__("Today","jetpack-backup-pkg"),n=(0,i.getDate)();let c=t;return(0,i.dateI18n)("zY",n)!==(0,i.dateI18n)("zY",e)&&(c=(0,i.dateI18n)("M j",e)),c+", "+(0,i.dateI18n)("g:i A",e)})(E)),React.createElement("a",{className:"button is-full-width",href:(0,l.Z)("jetpack-backup",{site:R}),target:"_blank",rel:"noreferrer"},__("See all your backups","jetpack-backup-pkg"))),React.createElement("div",{className:"lg-col-span-1 md-col-span-4 sm-col-span-0"}),React.createElement("div",{className:"lg-col-span-2 md-col-span-2 sm-col-span-2"},React.createElement(u.Z,{icon:g,label:__("Posts","jetpack-backup-pkg"),value:N.posts})),React.createElement("div",{className:"lg-col-span-2 md-col-span-2 sm-col-span-2"},React.createElement(u.Z,{icon:h,label:__("Uploads","jetpack-backup-pkg"),value:N.uploads})),React.createElement("div",{className:"lg-col-span-2 md-col-span-2 sm-col-span-2"},React.createElement(u.Z,{icon:f,label:__("Plugins","jetpack-backup-pkg"),value:N.plugins})),React.createElement("div",{className:"lg-col-span-2 md-col-span-2 sm-col-span-2"},React.createElement(u.Z,{icon:b,label:__("Themes","jetpack-backup-pkg"),value:N.themes}))),P===A&&React.createElement("div",{className:"jp-row"},React.createElement("div",{className:"lg-col-span-5 md-col-span-4 sm-col-span-4"},React.createElement("img",{src:d,alt:""}),React.createElement("h1",null,__("We're having trouble backing up your site","jetpack-backup-pkg")),React.createElement("p",null,(0,a.createInterpolateElement)(__(" <a>Get in touch with us</a> to get your site backups going again.","jetpack-backup-pkg"),{a:React.createElement("a",{href:(0,l.Z)("jetpack-contact-support",{site:R}),target:"_blank",rel:"noreferrer"})}))),React.createElement("div",{className:"lg-col-span-1 md-col-span-4 sm-col-span-0"}),React.createElement("div",{className:"lg-col-span-6 md-col-span-2 sm-col-span-2"})))}},7355:function(e,t){"use strict";t.Z=e=>React.createElement("div",{className:"backup__card"},React.createElement("img",{src:e.icon,alt:""}),React.createElement("div",{className:"backup__card-details"},React.createElement("div",{className:"backup__card-details-items"},e.label),React.createElement("div",{className:"backup__card-details-amount"},e.value)))},2329:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var i=n(9196),c=n.n(i),o=n(9307),r=n(6989),a=n.n(r),s=n(9818),l=n(428),p=n(7710),u=n(5736),g=n(5993);const __=u.__;function m(){const e=(0,s.useSelect)((e=>e(g.t).getAPINonce()),[]),t=(0,s.useSelect)((e=>e(g.t).getAPIRoot()),[]),n=(0,s.useSelect)((e=>e(g.t).getRegistrationNonce()),[]),i=(0,s.useSelect)((e=>e(l.t).getConnectionStatus()),[]),[r,u]=(0,o.useState)(0),[m,d]=(0,o.useState)(0);(0,o.useEffect)((()=>{a()({path:"/jetpack/v4/backup-promoted-product-info"}).then((e=>{u(e.cost/12),e.introductory_offer?d(e.introductory_offer.cost_per_interval/12):d(e.cost/12)}))}),[]);return[i,()=>c().createElement(p.Z,{buttonLabel:__("Get Jetpack Backup","jetpack-backup-pkg"),priceAfter:m,priceBefore:r,pricingIcon:"data:image/svg+xml,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m21.092 15.164.019-1.703v-.039c0-1.975-1.803-3.866-4.4-3.866-2.17 0-3.828 1.351-4.274 2.943l-.426 1.524-1.581-.065a2.92 2.92 0 0 0-.12-.002c-1.586 0-2.977 1.344-2.977 3.133 0 1.787 1.388 3.13 2.973 3.133H22.399c1.194 0 2.267-1.016 2.267-2.4 0-1.235-.865-2.19-1.897-2.368l-1.677-.29Zm-10.58-3.204a4.944 4.944 0 0 0-.201-.004c-2.75 0-4.978 2.298-4.978 5.133s2.229 5.133 4.978 5.133h12.088c2.357 0 4.267-1.97 4.267-4.4 0-2.18-1.538-3.99-3.556-4.339v-.06c0-3.24-2.865-5.867-6.4-5.867-2.983 0-5.49 1.871-6.199 4.404Z' fill='%23000'/%3E%3C/svg%3E",pricingTitle:__("Jetpack Backup","jetpack-backup-pkg"),title:__("The best real‑time WordPress backups","jetpack-backup-pkg"),apiRoot:t,apiNonce:e,registrationNonce:n,from:"jetpack-backup",redirectUri:"admin.php?page=jetpack-backup"},c().createElement("h3",null,__("Save every change and get back online quickly with one‑click restores.","jetpack-backup-pkg")),c().createElement("ul",null,c().createElement("li",null,__("Automated real-time backups","jetpack-backup-pkg")),c().createElement("li",null,__("Easy one-click restores","jetpack-backup-pkg")),c().createElement("li",null,__("Complete list of all site changes","jetpack-backup-pkg")),c().createElement("li",null,__("Global server infrastructure","jetpack-backup-pkg")),c().createElement("li",null,__("Best-in-class support","jetpack-backup-pkg"))))]}},2228:function(e,t){"use strict";t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e}},6143:function(e,t){"use strict";t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e}},4845:function(e,t){"use strict";t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e}},2083:function(e,t,n){"use strict";var i=n(9818),c=n(2228),o=n(8242),r=n(6143),a=n(4845),s=n(2388);const l=(0,i.combineReducers)({connectedPlugins:a.Z,API:c.Z,jetpackStatus:o.Z,assets:r.Z,siteData:s.Z});t.Z=l},8242:function(e,t){"use strict";t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e}},2388:function(e,t){"use strict";t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e}},675:function(e,t){"use strict";t.Z={getAPIRoot:e=>e.API.WP_API_root||null,getAPINonce:e=>e.API.WP_API_nonce||null,getRegistrationNonce:e=>e.API.registrationNonce||null}},2175:function(e,t){"use strict";t.Z={getConnectedPlugins:e=>e.connectedPlugins||[]}},9325:function(e,t,n){"use strict";var i=n(675),c=n(4677),o=n(2175),r=n(7513);const a={...i.Z,...c.Z,...o.Z,...r.Z};t.Z=a},4677:function(e,t){"use strict";t.Z={getCalypsoSlug:e=>e.jetpackStatus.calypsoSlug||{}}},7513:function(e,t){"use strict";t.Z={getSiteData:e=>e.siteData||[],getSiteTitle:e=>{var t;return(null===(t=e.siteData)||void 0===t?void 0:t.title)||""}}},5993:function(e,t,n){"use strict";n.d(t,{i:function(){return r},t:function(){return o}});var i=n(2083),c=n(9325);const o="jetpack-backup-plugin",r={reducer:i.Z,selectors:c.Z,initialState:window.JPBACKUP_INITIAL_STATE||{}}},4444:function(e,t,n){"use strict";e.exports=n.p+"images/backup-animation-1-8d65f9365c217c43eb01.svg"},6476:function(e,t,n){"use strict";e.exports=n.p+"images/backup-animation-2-4d8da04fb34b29957030.svg"},8406:function(e,t,n){"use strict";e.exports=n.p+"images/backup-animation-3-1c6df0c7bc8546e712d8.svg"},4256:function(e,t,n){"use strict";e.exports=n.p+"images/cloud-alert-cf8336f3384ee5b98a9e.svg"},50:function(e,t,n){"use strict";e.exports=n.p+"images/cloud-35473ae2758e9f3e353d.svg"},7410:function(e,t,n){"use strict";e.exports=n.p+"images/plugins-d0898bae4e79a6e05b9e.svg"},8287:function(e,t,n){"use strict";e.exports=n.p+"images/posts-7a4c9e22d20abaac65d6.svg"},4535:function(e,t,n){"use strict";e.exports=n.p+"images/themes-700cf8bdf1049fdbc94a.svg"},567:function(e,t,n){"use strict";e.exports=n.p+"images/uploads-7a7b15dfda25508a8d68.svg"},4608:function(e){"use strict";if(void 0==={consumer_slug:"jetpack-backup"}){var t=new Error('Cannot find module \'{"consumer_slug":"jetpack-backup"}\'');throw t.code="MODULE_NOT_FOUND",t}e.exports={consumer_slug:"jetpack-backup"}},9196:function(e){"use strict";e.exports=window.React},1850:function(e){"use strict";e.exports=window.ReactDOM},2819:function(e){"use strict";e.exports=window.lodash},6989:function(e){"use strict";e.exports=window.wp.apiFetch},5609:function(e){"use strict";e.exports=window.wp.components},9818:function(e){"use strict";e.exports=window.wp.data},9771:function(e){"use strict";e.exports=window.wp.date},9307:function(e){"use strict";e.exports=window.wp.element},5736:function(e){"use strict";e.exports=window.wp.i18n},6483:function(e){"use strict";e.exports=window.wp.url}},t={};function n(i){var c=t[i];if(void 0!==c)return c.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");i.length&&(e=i[i.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e}(),function(){"use strict";var e=n(9196),t=n.n(e),i=n(1850),c=n.n(i),o=n(9818),r=n(3133),a=n(5993);const s=(0,o.createReduxStore)(a.t,a.i);(0,o.register)(s),function(){const e=document.getElementById("jetpack-backup-root");null!==e&&c().render(t().createElement(r.Z,null),e)}()}()}();
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.js.LICENSE.txt b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.js.LICENSE.txt new file mode 100644 index 00000000..2d8ad0cf --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.js.LICENSE.txt @@ -0,0 +1,13 @@ +/* + * Exposes number format capability + * + * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors). + * @license See CREDITS.md + * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js + */ + +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.rtl.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.rtl.css new file mode 100644 index 00000000..80f1d1b4 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/build/index.rtl.css @@ -0,0 +1 @@ +.stat-block{display:flex;flex:1;flex-direction:column}.stat-block .icon{flex:2}.stat-block .icon img{height:24px;margin-top:24px;width:24px}.stat-block .label{flex:1;font-weight:700}.stat-block .value{flex:1}.stat-block .large-text{font-size:2em;font-weight:700}.backup__card{background:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 0 40px rgba(0,0,0,.08);padding:24px}.backup__card-details-items{font-weight:500;margin:16px 0 -8px}.backup__card-details-amount{font-size:var(--font-title-large);font-weight:600;margin-bottom:-12px}.backup__progress{margin-bottom:48px;margin-left:64px}.backup__progress-info{display:flex;font-weight:500}.backup__progress-info .backup__progress-info-percentage{margin-right:auto}.backup__progress-bar,.backup__progress-bar-actual{border-radius:8px;height:12px}.backup__progress-bar{background:var(--jp-gray-off);position:relative;width:100%}.backup__progress-bar-actual{background:var(--jp-green-primary);position:absolute;right:0;top:0;width:0}.backup__latest{align-items:center;display:flex;margin-bottom:8px}.backup__latest img,.backup__latest svg{min-height:32px;min-width:32px}.backup__latest h2{margin:0 12px 0 0;vertical-align:-1px}.backup__latest+h1{white-space:nowrap}.backup__animation{position:relative}@media only screen and (max-width:960px){.backup__animation{display:none}}.backup__animation-el-1,.backup__animation-el-2,.backup__animation-el-3{animation:animation-el-3 4s ease-in-out .8s infinite normal forwards;opacity:0;position:absolute;z-index:4}.backup__animation-el-1{animation-delay:.6s;animation-name:animation-el-1;bottom:150px;left:264px}.backup__animation-el-2{animation-delay:.7s;animation-name:animation-el-2;bottom:108px;left:44px}.backup__animation-el-3{animation-name:animation-el-3;bottom:-32px}@keyframes animation-el-1{0%{opacity:0;transform:translateY(32px)}20%{opacity:1;transform:translateY(0)}50%{opacity:1;transform:translateY(0)}60%{opacity:0;transform:translateY(-96px)}to{opacity:0;transform:translateY(-96px)}}@keyframes animation-el-2{0%{opacity:0;transform:translateY(64px)}20%{opacity:1;transform:translateY(0)}50%{opacity:1;transform:translateY(0)}60%{opacity:0;transform:translateY(-96px)}to{opacity:0;transform:translateY(-96px)}}@keyframes animation-el-3{0%{opacity:0;transform:translateY(44px)}20%{opacity:1;transform:translateY(0)}50%{opacity:1;transform:translateY(0)}60%{opacity:0;transform:translateY(-84px)}to{opacity:0;transform:translateY(-84px)}}@media(min-width:1080px){.jp-connection__connect-screen-layout__left{width:70%}.jp-connection__connect-screen-required-plan{background:linear-gradient(270deg,#fff 70%,#f9f9f6 0);position:relative}}.jp-connection__connect-screen-required-plan__loading{display:none}@media(min-width:1080px){.jp-connection__connect-screen-required-plan__pricing-card{position:absolute;right:62%;top:14%}}.jp-connection__connect-screen-required-plan__pricing-card .jp-action-button--button.components-button{align-items:center;background:var(--jp-black)!important;border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;font-weight:500;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-connection__connect-screen-required-plan__with-subscription{margin-top:38px}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button{display:inline}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button{background:inherit!important;color:var(--jp-black)!important;display:inline;font-size:var(--font-title-small);font:inherit;height:auto;line-height:20px;min-width:0;padding:0;text-decoration:underline;width:auto}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button:hover{background:inherit;text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button:focus{background:inherit;box-shadow:none!important}.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__inner,.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__outer{border-left-color:var(--jp-black);border-top-color:var(--jp-black)}.jp-action-button--button{background:#000}.jp-action-button--button,.jp-action-button--button.components-button{border-radius:4px;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-style:normal;font-weight:600;height:40px;line-height:18px;min-width:264px;text-align:center}.jp-action-button__error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 100% 0;color:var(--jp-red)!important;line-height:25px!important;padding-right:25px}.jp-connection__connect-screen-layout{background:var(--jp-white);border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.08)}.jp-connection__connect-screen-layout__loading{display:none}.jp-connection__connect-screen-layout__left,.jp-connection__connect-screen-layout__right{box-sizing:border-box}.jp-connection__connect-screen-layout__left{padding:25px}@media(min-width:600px){.jp-connection__connect-screen-layout__left{padding:64px 96px}}.jp-connection__connect-screen-layout__left .jetpack-logo{margin-bottom:24px}.jp-connection__connect-screen-layout__left h2{color:var(--jp-black);font-size:36px;font-style:normal;font-weight:700;line-height:40px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left h3{color:var(--jp-black);font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left li,.jp-connection__connect-screen-layout__left p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.jp-connection__connect-screen-layout__left p{color:#101517;margin:16px 0}.jp-connection__connect-screen-layout__left a{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__connect-screen-layout__left a:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-layout__left a:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__connect-screen-layout__left ul{list-style-type:none;padding:0}.jp-connection__connect-screen-layout__left ul li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-right:30px}.jp-connection__connect-screen-layout__right{padding:64px 0}.jp-connection__connect-screen-layout__right img{max-width:100%}.jp-connection__connect-screen-layout__two-columns{display:flex;flex-wrap:wrap}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:100%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:52%}}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{background:#f9f9f6;display:none;flex-basis:47%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{display:block}}.jp-components__pricing-card{background:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 10px 40px rgba(0,0,0,.08);max-width:384px;padding:24px 24px 32px;width:-moz-fit-content;width:fit-content}@media screen and (min-width:600px){.jp-components__pricing-card{padding:32px 32px 44px}}.jp-components__pricing-card__icon img{height:32px;width:32px}.jp-components__pricing-card__title{color:#101517;font-size:32px;line-height:38px;margin:16px 0 24px}.jp-components__pricing-card__pricing{display:flex;flex-wrap:wrap}.jp-components__pricing-card__price-after,.jp-components__pricing-card__price-before{display:inline-block;font-size:54px;font-weight:700;line-height:40px;margin-bottom:8px;padding:0 2px}.jp-components__pricing-card__price-before{color:var(--jp-gray-20);margin-left:16px;position:relative}.jp-components__pricing-card__price-strikethrough{background:var(--jp-pink);border-radius:1.5px;height:3px;position:absolute;right:0;top:20px;width:100%}.jp-components__pricing-card__price-after{color:var(--jp-black)}.jp-components__pricing-card__currency{font-size:var(--font-title-small);font-weight:400;line-height:20px;vertical-align:super}.jp-components__pricing-card__price-details{align-self:flex-end;color:var(--jp-gray-50);font-size:14px;font-weight:400;letter-spacing:-.02em;line-height:17px;margin-bottom:8px}.jp-components__pricing-card__price-decimal{font-size:var(--font-label);line-height:14px;vertical-align:top}.jp-components__pricing-card__button{align-items:center;background:var(--jp-black);border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-components__pricing-card__info{color:var(--jp-gray-60);font-size:var(--font-label);letter-spacing:-.02em;line-height:20px}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-10:#f2cf75;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-footer,.jp-header{padding:20px 0}@media(min-width:960px){.jp-footer,.jp-header{padding:40px 0}}.jp-content{font-size:var(--font-body);line-height:1.5;position:relative}.jp-content h1,.jp-content h2,.jp-content h3,.jp-content h4,.jp-content h5,.jp-content h6{line-height:1.2;margin-top:0}.jp-content h1{font-size:var(--font-title-large);font-weight:600}.jp-content h2{font-size:var(--font-title-small);font-weight:500}.jp-content .jp-section h2,.jp-content .jp-section h3{margin-bottom:16px}.jp-content .jp-section p{margin-top:16px}.jp-content li,.jp-content p{font-size:16px;line-height:1.5}.jp-content .jp-connection-status-card h3,.jp-content .jpb-my-plan-container h3{font-size:var(--font-title-small);font-weight:500;margin-top:48px}.jp-content a{color:var(--jp-black);transition:color,background-color .15s ease-out}.jp-content a:hover{text-decoration-thickness:var(--jp-underline-thickness)}.jp-content a:focus{outline-color:var(--jp-black)}.jp-content .button{background:var(--jp-black);border:0;border-color:var(--jp-black);border-radius:var(--jp-border-radius);color:var(--jp-white);display:inline-block;font-weight:500;padding:8px 24px;text-decoration:none}.jp-content .button.is-full-width{text-align:center;width:100%}.jp-content .button:active,.jp-content .button:hover{background:var(--jp-black-80);color:var(--jp-white)}.jp-content .button:focus{box-shadow:0 0 0 1px var(--jp-white) inset,0 0 0 2px var(--jp-black)}.jp-content .button.disabled,.jp-content .button:disabled{background:var(--jp-gray);pointer-events:none}.jp-content ul.jp-product-promote li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-right:30px}.jp-hero{background:var(--jp-white-off);margin-bottom:64px;padding:64px 0}.jp-hero.is-backup-performing{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='624' height='400' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M624 88.387C575.321 34.082 504.674 0 426 0 323.405 0 234.3 58.22 189.925 143.42 83.07 154.78 0 245.305 0 355c0 38.16 10.072 73.999 27.698 105H624V88.387z' fill='%23fff'/%3E%3C/svg%3E");background-position:0 100%;background-repeat:no-repeat}.jp-hero.is-backup-error,.jp-hero.is-backup-healthy{display:none}.jp-hero p+.button{margin-top:18px}.jp-dashboard-footer{padding:40px 0}.jp-connection-status-card--status{margin:30px 0}@keyframes appear{0%{opacity:0}to{opacity:1}}.jp-masthead{background-color:#fff;padding:40px 0;text-align:center}@media(max-width:rem(782px)){.jp-masthead{padding:0 rem(24px)}.jetpack-masterbar .jp-masthead{padding-right:rem(64px)}}.jp-masthead__inside-container{display:flex;flex-wrap:wrap;margin:0 auto;max-width:rem(1040px);padding-bottom:rem(6px);width:100%}@media(max-width:1250px){.jp-masthead__inside-container{max-width:95%}}.jp-masthead__logo-container{flex-grow:0;flex-shrink:0;padding:rem(11px) 0 0}@media(max-width:480px){.jp-masthead__logo-container{margin-left:rem(16px)}}.jp-masthead__logo-link{display:inline-block;outline:none;vertical-align:middle}.jp-masthead__logo-link:focus{box-shadow:0 0 0 2px #78dcfa;line-height:0}.jp-masthead__logo-link+code{background:#e6ecf1;border-radius:2px;color:#647a88;margin:0 10px;padding:5px 9px}.jp-masthead__nav{display:flex;flex-grow:1;flex-shrink:0;flex-wrap:nowrap;margin-top:rem(6px);padding:rem(4px) 0;text-align:left}.jp-masthead__nav .dops-button-group{align-self:center;flex-grow:1;font-size:0}@media(max-width:480px){.jp-masthead__nav{text-align:right}}#sandbox-domain-badge{background:#d63638;color:#fff;cursor:pointer;font-size:9px;font-weight:700;letter-spacing:.2em;text-shadow:none;text-transform:uppercase}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1128px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;max-width:var(--max-container-width);width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));padding:0 24px}}.SqdhUZkXCRuIpErj1B3z.OZC_9a1LhpWF9dv15Gdh{max-width:none;padding:unset}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off)}.cAbGtJDGgLubucBnz7vM{background-color:var(--jp-white)}.sexr0jUxC1jVixdKiDnC{margin-right:-20px}@media(max-width:782px){.sexr0jUxC1jVixdKiDnC{margin-right:-10px}}.sexr0jUxC1jVixdKiDnC.vKQ11sLeAM45M04P1ccj{background-color:var(--jp-white)}.jp-dashboard-footer{align-items:center;color:#000;display:flex;flex-flow:row wrap;justify-content:space-between;max-width:1128px;width:100%}.jp-dashboard-footer a,.jp-dashboard-footer a:hover,.jp-dashboard-footer a:visited{color:#000;text-decoration:none}.jp-dashboard-footer__jetpack-symbol,.jp-dashboard-footer__module-name{display:inline-block;vertical-align:middle}.jp-dashboard-footer__module-name{font-size:12px;font-weight:600;margin-right:5px}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/package.json b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/package.json new file mode 100644 index 00000000..ac51fc8b --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/package.json @@ -0,0 +1,53 @@ +{ + "private": true, + "description": "Easily restore or download a backup of your site from a specific moment in time.", + "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/backup/#readme", + "bugs": { + "url": "https://github.com/Automattic/jetpack/labels/[Package] Backup" + }, + "repository": { + "type": "git", + "url": "https://github.com/Automattic/jetpack.git", + "directory": "projects/packages/backup" + }, + "license": "GPL-2.0-or-later", + "author": "Automattic", + "scripts": { + "build": "pnpm run clean && pnpm run build-client", + "build-client": "webpack", + "build-concurrently": "pnpm run clean && concurrently 'pnpm:build-client' 'pnpm:build-php'", + "build-production-concurrently": "pnpm run clean && concurrently 'NODE_ENV=production BABEL_ENV=production pnpm run build-client' && pnpm run validate", + "clean": "rm -rf build/", + "validate": "pnpm exec validate-es build/", + "watch": "pnpm run build && webpack watch" + }, + "browserslist": [ + "extends @wordpress/browserslist-config" + ], + "dependencies": { + "@automattic/jetpack-api": "^0.13", + "@automattic/jetpack-components": "^0.15", + "@automattic/jetpack-connection": "^0.18", + "@wordpress/api-fetch": "6.6.0", + "@wordpress/data": "6.9.0", + "@wordpress/element": "4.7.0", + "@wordpress/date": "4.9.0", + "@wordpress/i18n": "4.9.0", + "react": "17.0.2", + "react-dom": "17.0.2" + }, + "devDependencies": { + "@automattic/jetpack-base-styles": "^0.3", + "@automattic/jetpack-webpack-config": "^1.3", + "@babel/core": "7.17.10", + "@babel/preset-env": "7.17.10", + "@babel/register": "7.17.7", + "@babel/runtime": "7.17.9", + "@wordpress/browserslist-config": "4.1.2", + "concurrently": "6.0.2", + "sass": "1.43.3", + "sass-loader": "12.4.0", + "webpack": "5.72.1", + "webpack-cli": "4.9.1" + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-initial-state.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-initial-state.php new file mode 100644 index 00000000..e5bf0a84 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-initial-state.php @@ -0,0 +1,54 @@ +<?php +/** + * The React initial state. + * + * @package automattic/jetpack-backup-plugin + */ + +namespace Automattic\Jetpack\Backup; + +use Automattic\Jetpack\Connection\Plugin_Storage as Connection_Plugin_Storage; +use Automattic\Jetpack\Status; + +/** + * The React initial state. + */ +class Initial_State { + /** + * Get the initial state data. + * + * @return array + */ + private function get_data() { + return array( + 'API' => array( + 'WP_API_root' => esc_url_raw( rest_url() ), + 'WP_API_nonce' => wp_create_nonce( 'wp_rest' ), + 'registrationNonce' => wp_create_nonce( 'jetpack-registration-nonce' ), + ), + 'jetpackStatus' => array( + 'calypsoSlug' => ( new Status() )->get_site_suffix(), + ), + 'connectedPlugins' => Connection_Plugin_Storage::get_all(), + 'siteData' => array( + 'id' => \Jetpack_Options::get_option( 'id' ), + 'title' => get_bloginfo( 'name' ) ? get_bloginfo( 'name' ) : get_site_url(), + ), + 'assets' => array( + 'buildUrl' => plugins_url( '../build/', __FILE__ ), + ), + ); + } + + /** + * Render the initial state into a JavaScript variable. + * + * @return string + */ + public function render() { + add_action( 'jetpack_use_iframe_authorization_flow', '__return_true' ); + + return 'var JPBACKUP_INITIAL_STATE=JSON.parse(decodeURIComponent("' . rawurlencode( wp_json_encode( $this->get_data() ) ) . '"));'; + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-jetpack-backup-upgrades.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-jetpack-backup-upgrades.php new file mode 100644 index 00000000..46e09d82 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-jetpack-backup-upgrades.php @@ -0,0 +1,46 @@ +<?php +/** + * Handle Backup plugin upgrades + * + * @package automattic/jetpack-backup-plugin + */ + +namespace Automattic\Jetpack\Backup; + +use Automattic\Jetpack\Connection\Manager as Connection_Manager; + +/** + * The Upgrades class. + */ +class Jetpack_Backup_Upgrades { + + /** + * Run all methods only once and store an option to make sure it never runs again + */ + public static function upgrade() { + + $upgrades = get_class_methods( __CLASS__ ); + + foreach ( $upgrades as $upgrade ) { + $option_name = '_upgrade_' . $upgrade; + if ( 'upgrade' === $upgrade || get_option( $option_name ) ) { + continue; + } + + update_option( $option_name, 1 ); + + call_user_func( array( __CLASS__, $upgrade ) ); + + } + + } + + /** + * The plugin is not checking if it was disabled and reactivating it when we reconnect, therefore we need to clear this information from DB so other plugins know we are still using the connection + */ + public static function clear_disabled_plugin() { + $manager = new Connection_Manager( 'jetpack-backup' ); + $manager->enable_plugin(); + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-jetpack-backup.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-jetpack-backup.php new file mode 100644 index 00000000..aed428ae --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-jetpack-backup.php @@ -0,0 +1,378 @@ +<?php +/** + * Primary class file for the Jetpack Backup plugin. + * + * @package automattic/jetpack-backup-plugin + */ + +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + +use Automattic\Jetpack\Admin_UI\Admin_Menu; +use Automattic\Jetpack\Assets; +use Automattic\Jetpack\Backup\Initial_State as Backup_Initial_State; +use Automattic\Jetpack\Backup\Jetpack_Backup_Upgrades; +use Automattic\Jetpack\Connection\Initial_State as Connection_Initial_State; +use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Connection\Rest_Authentication as Connection_Rest_Authentication; +use Automattic\Jetpack\My_Jetpack\Initializer as My_Jetpack_Initializer; +use Automattic\Jetpack\Status; + +/** + * Class Jetpack_Backup + */ +class Jetpack_Backup { + + /** + * Slug. + * + * @var string + */ + const JETPACK_BACKUP_SLUG = 'jetpack-backup'; + + /** + * Backup name. + * + * @var string + */ + const JETPACK_BACKUP_NAME = 'Jetpack Backup'; + + /** + * Backup URL. + * + * @var string + */ + const JETPACK_BACKUP_URI = 'https://jetpack.com/jetpack-backup'; + + /** + * Promoted product. + * + * @var string + */ + const JETPACK_BACKUP_PROMOTED_PRODUCT = 'jetpack_backup_t1_yearly'; + + /** + * Jetpack Backup DB version. + * + * @var string + */ + const JETPACK_BACKUP_DB_VERSION = '2'; + + /** + * Constructor. + */ + public static function initialize() { + if ( did_action( 'jetpack_backup_initialized' ) ) { + return; + } + + // Set up the REST authentication hooks. + Connection_Rest_Authentication::init(); + + add_action( 'rest_api_init', array( __CLASS__, 'register_rest_routes' ) ); + + $page_suffix = Admin_Menu::add_menu( + __( 'Jetpack Backup', 'jetpack-backup-pkg' ), + _x( 'Backup', 'The Jetpack Backup product name, without the Jetpack prefix', 'jetpack-backup-pkg' ), + 'manage_options', + 'jetpack-backup', + array( __CLASS__, 'plugin_settings_page' ), + 99 + ); + add_action( 'load-' . $page_suffix, array( __CLASS__, 'admin_init' ) ); + + // Init Jetpack packages and ConnectionUI. + add_action( + 'plugins_loaded', + function () { + $config = new Automattic\Jetpack\Config(); + // Connection package. + $config->ensure( + 'connection', + array( + 'slug' => self::JETPACK_BACKUP_SLUG, + 'name' => self::JETPACK_BACKUP_NAME, + 'url_info' => self::JETPACK_BACKUP_URI, + ) + ); + // Sync package. + $config->ensure( 'sync' ); + + // Identity crisis package. + $config->ensure( 'identity_crisis' ); + }, + 1 + ); + + add_action( 'plugins_loaded', array( __CLASS__, 'maybe_upgrade_db' ), 20 ); + + My_Jetpack_Initializer::init(); + + /** + * Runs right after the Jetpack Backup package is initialized. + * + * @since 1.3.0 + */ + do_action( 'jetpack_backup_initialized' ); + } + + /** + * Initialize the admin resources. + */ + public static function admin_init() { + add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_admin_scripts' ) ); + } + + /** + * Checks current version against version in code and run upgrades if we are running a new version + */ + public static function maybe_upgrade_db() { + $current_db_version = get_option( 'jetpack_backup_db_version' ); + if ( version_compare( $current_db_version, self::JETPACK_BACKUP_DB_VERSION, '<' ) ) { + update_option( 'jetpack_backup_db_version', self::JETPACK_BACKUP_DB_VERSION ); + Jetpack_Backup_Upgrades::upgrade(); + } + } + + /** + * Enqueue plugin admin scripts and styles. + */ + public static function enqueue_admin_scripts() { + $status = new Status(); + $manager = new Connection_Manager( 'jetpack-backup' ); + + Assets::register_script( + 'jetpack-backup', + '../build/index.js', + __FILE__, + array( + 'in_footer' => true, + 'textdomain' => 'jetpack-backup-pkg', + ) + ); + Assets::enqueue_script( 'jetpack-backup' ); + // Initial JS state including JP Connection data. + wp_add_inline_script( 'jetpack-backup', self::get_initial_state(), 'before' ); + wp_add_inline_script( 'jetpack-backup', Connection_Initial_State::render(), 'before' ); + + // Load script for analytics. + if ( ! $status->is_offline_mode() && $manager->is_connected() ) { + wp_enqueue_script( 'jp-tracks', '//stats.wp.com/w.js', array(), gmdate( 'YW' ), true ); + } + } + + /** + * Main plugin settings page. + */ + public static function plugin_settings_page() { + ?> + <div id="jetpack-backup-root"></div> + <?php + } + + /** + * Return the rendered initial state JavaScript code. + * + * @return string + */ + private static function get_initial_state() { + return ( new Backup_Initial_State() )->render(); + } + + /** + * Register REST API + */ + public static function register_rest_routes() { + + // Get information on most recent 10 backups. + register_rest_route( + 'jetpack/v4', + '/backups', + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_recent_backups', + 'permission_callback' => __CLASS__ . '::backups_permissions_callback', + ) + ); + + // Get site backup/scan/anti-spam capabilities. + register_rest_route( + 'jetpack/v4', + '/backup-capabilities', + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_backup_capabilities', + 'permission_callback' => __CLASS__ . '::backups_permissions_callback', + ) + ); + + // Get information on site products. + // Backup plugin version of /site/purchases from JP plugin. + // Revert once this route and MyPlan component are extracted to a common package. + register_rest_route( + 'jetpack/v4', + '/site/current-purchases', + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_site_current_purchases', + 'permission_callback' => __CLASS__ . '::backups_permissions_callback', + ) + ); + + // Get currently promoted product from the product's endpoint. + register_rest_route( + 'jetpack/v4', + '/backup-promoted-product-info', + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_backup_promoted_product_info', + 'permission_callback' => __CLASS__ . '::backups_permissions_callback', + ) + ); + } + /** + * The backup calls should only occur from a signed in admin user + * + * @access public + * @static + * + * @return true|WP_Error + */ + public static function backups_permissions_callback() { + return current_user_can( 'manage_options' ); + } + + /** + * Get information about recent backups + * + * @access public + * @static + * + * @return array An array of recent backups + */ + public static function get_recent_backups() { + $blog_id = \Jetpack_Options::get_option( 'id' ); + + $response = Automattic\Jetpack\Connection\Client::wpcom_json_api_request_as_blog( + '/sites/' . $blog_id . '/rewind/backups', + 'v2', + array(), + null, + 'wpcom' + ); + + if ( 200 !== $response['response']['code'] ) { + return null; + } + + return rest_ensure_response( + json_decode( $response['body'], true ) + ); + } + + /** + * Get an array of backup/scan/anti-spam site capabilities + * + * @access public + * @static + * + * @return array An array of capabilities + */ + public static function get_backup_capabilities() { + $blog_id = \Jetpack_Options::get_option( 'id' ); + + $response = Automattic\Jetpack\Connection\Client::wpcom_json_api_request_as_user( + '/sites/' . $blog_id . '/rewind/capabilities', + 'v2', + array(), + null, + 'wpcom' + ); + + if ( is_wp_error( $response ) ) { + return null; + } + + if ( 200 !== $response['response']['code'] ) { + return null; + } + + return rest_ensure_response( + json_decode( $response['body'], true ) + ); + } + + /** + * Gets information about the currently promoted backup product. + * + * @return string|WP_Error A JSON object of the current backup product being promoted if the request was successful, or a WP_Error otherwise. + */ + public static function get_backup_promoted_product_info() { + $request_url = 'https://public-api.wordpress.com/rest/v1.1/products?locale=' . get_user_locale() . '&type=jetpack'; + $wpcom_request = wp_remote_get( esc_url_raw( $request_url ) ); + $response_code = wp_remote_retrieve_response_code( $wpcom_request ); + if ( 200 === $response_code ) { + $products = json_decode( wp_remote_retrieve_body( $wpcom_request ) ); + return $products->{self::JETPACK_BACKUP_PROMOTED_PRODUCT}; + } else { + // Something went wrong so we'll just return the response without caching. + return new WP_Error( + 'failed_to_fetch_data', + esc_html__( 'Unable to fetch the requested data.', 'jetpack-backup-pkg' ), + array( + 'status' => $response_code, + 'request' => $wpcom_request, + ) + ); + } + } + + /** + * Removes plugin from the connection manager + * If it's the last plugin using the connection, the site will be disconnected. + * + * @access public + * @static + */ + public static function plugin_deactivation() { + $manager = new Connection_Manager( 'jetpack-backup' ); + $manager->remove_connection(); + } + + /** + * Returns the result of `/sites/%d/purchases` endpoint call. + * + * @return array of site purchases. + */ + public static function get_site_current_purchases() { + + $request = sprintf( '/sites/%d/purchases', \Jetpack_Options::get_option( 'id' ) ); + $response = Automattic\Jetpack\Connection\Client::wpcom_json_api_request_as_blog( $request, '1.1' ); + + // Bail if there was an error or malformed response. + if ( is_wp_error( $response ) || ! is_array( $response ) || ! isset( $response['body'] ) ) { + return self::get_failed_fetch_error(); + } + + if ( 200 !== (int) wp_remote_retrieve_response_code( $response ) ) { + return self::get_failed_fetch_error(); + } + + // Decode the results. + $results = json_decode( $response['body'], true ); + + // Bail if there were no results or purchase details returned. + if ( ! is_array( $results ) ) { + return self::get_failed_fetch_error(); + } + + return rest_ensure_response( + array( + 'code' => 'success', + 'message' => esc_html__( 'Site purchases correctly received.', 'jetpack-backup-pkg' ), + 'data' => wp_remote_retrieve_body( $response ), + ) + ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-package-version.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-package-version.php index b38415bf..1a0246ac 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-package-version.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/class-package-version.php @@ -12,7 +12,7 @@ namespace Automattic\Jetpack\Backup; */ class Package_Version { - const PACKAGE_VERSION = '1.2.0'; + const PACKAGE_VERSION = '1.3.7'; const PACKAGE_SLUG = 'backup'; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/Admin.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/Admin.js new file mode 100644 index 00000000..9f90d5d7 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/Admin.js @@ -0,0 +1,247 @@ +/** + * External dependencies + */ +import { useState, useEffect } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; +import apiFetch from '@wordpress/api-fetch'; +import { useSelect } from '@wordpress/data'; +import { + AdminPage, + AdminSection, + AdminSectionHero, + Container, + Col, + getRedirectUrl, + PricingCard, +} from '@automattic/jetpack-components'; + +/** + * Internal dependencies + */ +import Backups from './Backups'; +import useConnection from '../hooks/useConnection'; +import './admin-style.scss'; +import './masthead/masthead-style.scss'; +import { STORE_ID } from '../store'; + +/* eslint react/react-in-jsx-scope: 0 */ +const Admin = () => { + const [ connectionStatus, renderConnectScreen ] = useConnection(); + const [ capabilities, setCapabilities ] = useState( [] ); + const [ capabilitiesError, setCapabilitiesError ] = useState( null ); + const [ connectionLoaded, setConnectionLoaded ] = useState( false ); + const [ capabilitiesLoaded, setCapabilitiesLoaded ] = useState( false ); + const [ showHeaderFooter, setShowHeaderFooter ] = useState( true ); + const [ price, setPrice ] = useState( 0 ); + const [ priceAfter, setPriceAfter ] = useState( 0 ); + + const domain = useSelect( select => select( STORE_ID ).getCalypsoSlug(), [] ); + + useEffect( () => { + if ( 0 < Object.keys( connectionStatus ).length ) { + setConnectionLoaded( true ); + } + }, [ connectionStatus ] ); + + useEffect( () => { + apiFetch( { path: '/jetpack/v4/backup-capabilities' } ).then( + res => { + setCapabilities( res.capabilities ); + setCapabilitiesLoaded( true ); + }, + () => { + setCapabilitiesLoaded( true ); + setCapabilitiesError( 'Failed to fetch site capabilities' ); + } + ); + apiFetch( { path: '/jetpack/v4/backup-promoted-product-info' } ).then( res => { + setPrice( res.cost / 12 ); + if ( res.introductory_offer ) { + setPriceAfter( res.introductory_offer.cost_per_interval / 12 ); + } else { + setPriceAfter( res.cost / 12 ); + } + } ); + }, [] ); + + const isFullyConnected = () => { + return connectionLoaded && connectionStatus.isUserConnected && connectionStatus.isRegistered; + }; + + const hasBackupPlan = () => { + return capabilities.includes( 'backup' ); + }; + + const sendToCart = () => { + window.location.href = getRedirectUrl( 'backup-plugin-upgrade-10gb', { site: domain } ); + }; + + const renderNoBackupCapabilities = () => { + const basicInfoText = __( '14 day money back guarantee.', 'jetpack-backup-pkg' ); + const introductoryInfoText = __( + 'Special introductory pricing, all renewals are at full price. 14 day money back guarantee.', + 'jetpack-backup-pkg' + ); + return ( + <Container horizontalSpacing={ 3 } horizontalGap={ 3 }> + <Col lg={ 6 } md={ 6 } sm={ 4 }> + <h1>{ __( 'Secure your site with a Backup subscription.', 'jetpack-backup-pkg' ) }</h1> + <p> + { ' ' } + { __( + 'Get peace of mind knowing that all your work will be saved, and get back online quickly with one-click restores.', + 'jetpack-backup-pkg' + ) } + </p> + <ul className="jp-product-promote"> + <li>{ __( 'Automated real-time backups', 'jetpack-backup-pkg' ) }</li> + <li>{ __( 'Easy one-click restores', 'jetpack-backup-pkg' ) }</li> + <li>{ __( 'Complete list of all site changes', 'jetpack-backup-pkg' ) }</li> + <li>{ __( 'Global server infrastructure', 'jetpack-backup-pkg' ) }</li> + <li>{ __( 'Best-in-class support', 'jetpack-backup-pkg' ) }</li> + </ul> + </Col> + <Col lg={ 1 } md={ 1 } sm={ 0 } /> + <Col lg={ 5 } md={ 6 } sm={ 4 }> + <PricingCard + ctaText={ __( 'Get Jetpack Backup', 'jetpack-backup-pkg' ) } + icon="data:image/svg+xml,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m21.092 15.164.019-1.703v-.039c0-1.975-1.803-3.866-4.4-3.866-2.17 0-3.828 1.351-4.274 2.943l-.426 1.524-1.581-.065a2.92 2.92 0 0 0-.12-.002c-1.586 0-2.977 1.344-2.977 3.133 0 1.787 1.388 3.13 2.973 3.133H22.399c1.194 0 2.267-1.016 2.267-2.4 0-1.235-.865-2.19-1.897-2.368l-1.677-.29Zm-10.58-3.204a4.944 4.944 0 0 0-.201-.004c-2.75 0-4.978 2.298-4.978 5.133s2.229 5.133 4.978 5.133h12.088c2.357 0 4.267-1.97 4.267-4.4 0-2.18-1.538-3.99-3.556-4.339v-.06c0-3.24-2.865-5.867-6.4-5.867-2.983 0-5.49 1.871-6.199 4.404Z' fill='%23000'/%3E%3C/svg%3E" + infoText={ priceAfter === price ? basicInfoText : introductoryInfoText } + // eslint-disable-next-line react/jsx-no-bind + onCtaClick={ sendToCart } + priceAfter={ priceAfter } + priceBefore={ price } + title={ __( 'Jetpack Backup', 'jetpack-backup-pkg' ) } + /> + </Col> + </Container> + ); + }; + + const renderLoadedState = () => { + if ( + ! connectionLoaded || + ! connectionStatus.isUserConnected || + ! connectionStatus.isRegistered + ) { + if ( showHeaderFooter ) { + setShowHeaderFooter( false ); + } + + return ( + <Container horizontalSpacing={ 3 } horizontalGap={ 3 }> + <Col lg={ 12 } md={ 8 } sm={ 4 }> + { renderConnectScreen() } + </Col> + </Container> + ); + } + + // Show header and footer on all screens except ConnectScreen + if ( ! showHeaderFooter ) { + setShowHeaderFooter( true ); + } + + if ( ! capabilitiesLoaded ) { + return <div></div>; + } + + if ( hasBackupPlan() ) { + return ( + <Container horizontalSpacing={ 5 } fluid> + <Col> + <Backups /> + </Col> + </Container> + ); + } + + // Render an error state, this shouldn't occurr since we've passed userConnected checks + if ( capabilitiesError ) { + return ( + <Container horizontalSpacing={ 3 }> + <Col lg={ 12 } md={ 8 } sm={ 4 }> + { capabilitiesError } + </Col> + </Container> + ); + } + + return renderNoBackupCapabilities(); + }; + + // Renders additional segments under the jp-hero area condition on having a backup plan + const renderBackupSegments = () => { + return ( + <Container horizontalSpacing={ 3 } horizontalGap={ 3 }> + <Col lg={ 6 } md={ 4 }> + <h2>{ __( 'Your cloud backups', 'jetpack-backup-pkg' ) }</h2> + <p> + { __( + 'All the backups are safely stored in the cloud and available for you at any time on Jetpack.com, with full details about status and content.', + 'jetpack-backup-pkg' + ) } + </p> + { hasBackupPlan() && ( + <> + <p> + <a + href={ getRedirectUrl( 'jetpack-backup', { site: domain } ) } + target="_blank" + rel="noreferrer" + > + { __( 'See all your backups', 'jetpack-backup-pkg' ) } + </a> + </p> + </> + ) } + </Col> + <Col lg={ 1 } md={ 1 } sm={ 0 } /> + <Col lg={ 5 } md={ 3 } sm={ 4 }> + <h2>{ __( "Your site's heartbeat", 'jetpack-backup-pkg' ) }</h2> + <p> + { __( + 'The activity log lets you see everything that’s going on with your site outlined in an organized, readable way.', + 'jetpack-backup-pkg' + ) } + </p> + { hasBackupPlan() && ( + <p> + <a + href={ getRedirectUrl( 'backup-plugin-activity-log', { site: domain } ) } + target="_blank" + rel="noreferrer" + > + { __( "See your site's activity", 'jetpack-backup-pkg' ) } + </a> + </p> + ) } + </Col> + </Container> + ); + }; + + const renderContent = () => { + return ( + <div className="content"> + <AdminSectionHero>{ renderLoadedState() }</AdminSectionHero> + <AdminSection>{ isFullyConnected() && renderBackupSegments() }</AdminSection> + </div> + ); + }; + + return ( + <AdminPage + withHeader={ showHeaderFooter } + withFooter={ showHeaderFooter } + moduleName={ __( 'Jetpack Backup', 'jetpack-backup-pkg' ) } + a8cLogoHref="https://www.jetpack.com" + > + <div id="jetpack-backup-admin-container" className="jp-content"> + { renderContent() } + </div> + </AdminPage> + ); +}; + +export default Admin; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/Backups.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/Backups.js new file mode 100644 index 00000000..ed02e77f --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/Backups.js @@ -0,0 +1,287 @@ +/** + * External dependencies + */ +import { getDate, date, dateI18n } from '@wordpress/date'; +import { __, sprintf } from '@wordpress/i18n'; +import apiFetch from '@wordpress/api-fetch'; +import { createInterpolateElement, useState, useEffect } from '@wordpress/element'; +import { useSelect } from '@wordpress/data'; +import { getRedirectUrl } from '@automattic/jetpack-components'; + +/** + * Internal dependencies + */ +import { STORE_ID } from '../store'; +import StatBlock from './StatBlock'; +import './backups-style.scss'; +import PostsIcon from './icons/posts.svg'; +import CloudIcon from './icons/cloud.svg'; +import CloudAlertIcon from './icons/cloud-alert.svg'; +import UploadsIcon from './icons/uploads.svg'; +import PluginsIcon from './icons/plugins.svg'; +import ThemesIcon from './icons/themes.svg'; +import BackupAnim1 from './icons/backup-animation-1.svg'; +import BackupAnim2 from './icons/backup-animation-2.svg'; +import BackupAnim3 from './icons/backup-animation-3.svg'; + +/* eslint react/react-in-jsx-scope: 0 */ +const Backups = () => { + // State information + const [ progress, setProgress ] = useState( 0 ); + const [ trackProgress, setTrackProgress ] = useState( 0 ); + const [ latestTime, setLatestTime ] = useState( '' ); + const [ stats, setStats ] = useState( { + posts: 0, + uploads: 0, + plugins: 0, + themes: 0, + } ); + const domain = useSelect( select => select( STORE_ID ).getCalypsoSlug(), [] ); + const siteTitle = useSelect( select => select( STORE_ID ).getSiteTitle(), '' ); + + const BACKUP_STATE = { + LOADING: 0, + IN_PROGRESS: 1, + NO_BACKUPS: 2, + NO_BACKUPS_RETRY: 3, + NO_GOOD_BACKUPS: 4, + COMPLETE: 5, + }; + const [ backupState, setBackupState ] = useState( BACKUP_STATE.LOADING ); + + const progressInterval = 1 * 1000; // How often to poll for backup progress updates. + + // Loads data on startup and whenever trackProgress updates. + useEffect( () => { + apiFetch( { path: '/jetpack/v4/backups' } ).then( + res => { + // If we have no backups don't load up stats. + let latestBackup = null; + if ( res.length === 0 ) { + setBackupState( BACKUP_STATE.NO_BACKUPS ); + } else if ( res.length === 1 && 'error-will-retry' === res[ 0 ].status ) { + setBackupState( BACKUP_STATE.NO_BACKUPS_RETRY ); + } else { + // Check for the first completed backups. + res.forEach( backup => { + if ( null !== latestBackup ) { + return; + } + + if ( 'finished' === backup.status && backup.stats ) { + latestBackup = backup; + setBackupState( BACKUP_STATE.COMPLETE ); + } + } ); + + // Only the first backup can be in progress. + if ( null === latestBackup && 'started' === res[ 0 ].status ) { + latestBackup = res[ 0 ]; + setProgress( latestBackup.percent ); + setBackupState( BACKUP_STATE.IN_PROGRESS ); + } + + // No complete or in progress backups. + if ( ! latestBackup ) { + setBackupState( BACKUP_STATE.NO_GOOD_BACKUPS ); + return; + } + + // Setup data for COMPLETE state. + if ( 'finished' === latestBackup.status ) { + const postsTable = latestBackup.stats.prefix + 'posts'; + setStats( { + plugins: latestBackup.stats.plugins.count, + themes: latestBackup.stats.themes.count, + uploads: latestBackup.stats.uploads.count, + posts: latestBackup.stats.tables[ postsTable ].post_published, + } ); + setLatestTime( date( 'c', latestBackup.last_updated + '+00:00' ) ); + } + } + + // Repeat query for NO_BACKUPS (before first) and IN_PROGRESS + if ( res.length === 0 || 'started' === latestBackup.status ) { + // Grab progress and update every progressInterval until complete. + setTimeout( () => { + setTrackProgress( trackProgress + 1 ); + }, progressInterval ); + } + }, + () => { + setBackupState( BACKUP_STATE.NO_GOOD_BACKUPS ); + } + ); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [ trackProgress ] ); + + const renderInProgressBackup = ( showProgressBar = true ) => { + return ( + <div className="jp-row"> + <div className="lg-col-span-5 md-col-span-8 sm-col-span-4"> + { showProgressBar && ( + <div className="backup__progress"> + <div className="backup__progress-info"> + <p> + { sprintf( + /* translators: placeholder is the Site Title */ + __( 'Backing up %s', 'jetpack-backup-pkg' ), + siteTitle + ) } + </p> + <p className="backup__progress-info-percentage">{ progress }%</p> + </div> + <div className="backup__progress-bar"> + <div + className="backup__progress-bar-actual" + style={ { width: progress + '%' } } + ></div> + </div> + </div> + ) } + <h1>{ __( 'Your first cloud backup will be ready soon', 'jetpack-backup-pkg' ) }</h1> + <p> + { __( + 'The first backup usually takes a few minutes, so it will become available soon.', + 'jetpack-backup-pkg' + ) } + </p> + <p> + { createInterpolateElement( + __( + 'In the meanwhile, you can start getting familiar with your <a>backup management on Jetpack.com</a>.', + 'jetpack-backup-pkg' + ), + { + a: ( + <a + href={ getRedirectUrl( 'jetpack-backup', { site: domain } ) } + target="_blank" + rel="noreferrer" + /> + ), + } + ) } + </p> + </div> + <div className="lg-col-span-1 md-col-span-4 sm-col-span-0"></div> + <div className="backup__animation lg-col-span-6 md-col-span-2 sm-col-span-2"> + <img className="backup__animation-el-1" src={ BackupAnim1 } alt="" /> + <img className="backup__animation-el-2" src={ BackupAnim2 } alt="" /> + <img className="backup__animation-el-3" src={ BackupAnim3 } alt="" /> + </div> + </div> + ); + }; + + const formatDateString = dateString => { + const todayString = __( 'Today', 'jetpack-backup-pkg' ); + const todayDate = getDate(); + let backupDate = todayString; + if ( dateI18n( 'zY', todayDate ) !== dateI18n( 'zY', dateString ) ) { + backupDate = dateI18n( 'M j', dateString ); + } + const backupTime = dateI18n( 'g:i A', dateString ); + + return backupDate + ', ' + backupTime; + }; + + const renderCompleteBackup = () => { + return ( + <div className="jp-row"> + <div className="lg-col-span-3 md-col-span-4 sm-col-span-4"> + <div className="backup__latest"> + <img src={ CloudIcon } alt="" /> + <h2>{ __( 'Latest Backup', 'jetpack-backup-pkg' ) }</h2> + </div> + <h1>{ formatDateString( latestTime ) }</h1> + <a + className="button is-full-width" + href={ getRedirectUrl( 'jetpack-backup', { site: domain } ) } + target="_blank" + rel="noreferrer" + > + { __( 'See all your backups', 'jetpack-backup-pkg' ) } + </a> + </div> + <div className="lg-col-span-1 md-col-span-4 sm-col-span-0"></div> + <div className="lg-col-span-2 md-col-span-2 sm-col-span-2"> + <StatBlock + icon={ PostsIcon } + label={ __( 'Posts', 'jetpack-backup-pkg' ) } + value={ stats.posts } + /> + </div> + <div className="lg-col-span-2 md-col-span-2 sm-col-span-2"> + <StatBlock + icon={ UploadsIcon } + label={ __( 'Uploads', 'jetpack-backup-pkg' ) } + value={ stats.uploads } + /> + </div> + <div className="lg-col-span-2 md-col-span-2 sm-col-span-2"> + <StatBlock + icon={ PluginsIcon } + label={ __( 'Plugins', 'jetpack-backup-pkg' ) } + value={ stats.plugins } + /> + </div> + <div className="lg-col-span-2 md-col-span-2 sm-col-span-2"> + <StatBlock + icon={ ThemesIcon } + label={ __( 'Themes', 'jetpack-backup-pkg' ) } + value={ stats.themes } + /> + </div> + </div> + ); + }; + + const renderNoGoodBackups = () => { + return ( + <div className="jp-row"> + <div className="lg-col-span-5 md-col-span-4 sm-col-span-4"> + <img src={ CloudAlertIcon } alt="" /> + <h1>{ __( "We're having trouble backing up your site", 'jetpack-backup-pkg' ) }</h1> + <p> + { createInterpolateElement( + __( + ' <a>Get in touch with us</a> to get your site backups going again.', + 'jetpack-backup-pkg' + ), + { + a: ( + <a + //TODO: we may want to add a specific redirect for Backup plugin related issues + href={ getRedirectUrl( 'jetpack-contact-support', { site: domain } ) } + target="_blank" + rel="noreferrer" + /> + ), + } + ) } + </p> + </div> + <div className="lg-col-span-1 md-col-span-4 sm-col-span-0"></div> + <div className="lg-col-span-6 md-col-span-2 sm-col-span-2"></div> + </div> + ); + }; + + const renderLoading = () => { + return <div className="jp-row"></div>; + }; + + return ( + <div className="jp-wrap jp-content"> + { BACKUP_STATE.LOADING === backupState && renderLoading() } + { BACKUP_STATE.NO_BACKUPS === backupState && renderInProgressBackup() } + { BACKUP_STATE.NO_BACKUPS_RETRY === backupState && renderInProgressBackup( false ) } + { BACKUP_STATE.IN_PROGRESS === backupState && renderInProgressBackup() } + { BACKUP_STATE.COMPLETE === backupState && renderCompleteBackup() } + { BACKUP_STATE.NO_GOOD_BACKUPS === backupState && renderNoGoodBackups() } + </div> + ); +}; + +export default Backups; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/StatBlock.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/StatBlock.js new file mode 100644 index 00000000..c19b3ae8 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/StatBlock.js @@ -0,0 +1,19 @@ +/** + * Internal dependencies + */ +import './stat-block-style.scss'; + +/* eslint react/react-in-jsx-scope: 0 */ +const StatBlock = props => { + return ( + <div className="backup__card"> + <img src={ props.icon } alt="" /> + <div className="backup__card-details"> + <div className="backup__card-details-items">{ props.label }</div> + <div className="backup__card-details-amount">{ props.value }</div> + </div> + </div> + ); +}; + +export default StatBlock; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/admin-style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/admin-style.scss new file mode 100644 index 00000000..4141bcf9 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/admin-style.scss @@ -0,0 +1,136 @@ +@import '@automattic/jetpack-base-styles/style'; + +.jp-header, +.jp-footer { + padding: 20px 0; + + @include for-tablet-up { + padding: 40px 0; + } +} + +.jp-content { + position: relative; + font-size: var( --font-body ); + line-height: 1.5; + + h1, h2, h3, h4, h5, h6 { + margin-top: 0; + line-height: 1.2; + } + + h1 { + font-size: var( --font-title-large ); + font-weight: 600; + } + + h2 { + font-size: var( --font-title-small ); + font-weight: 500; + } + + .jp-section { + h2, h3 { + margin-bottom: 16px; + } + + p { + margin-top: 16px; + } + } + + p, li { + font-size: 16px; + line-height: 1.5; + } + + .jp-connection-status-card h3, .jpb-my-plan-container h3 { + margin-top: 48px; + font-size: var( --font-title-small ); + font-weight: 500; + } + + a { + color: var( --jp-black ); + transition: color, background-color 0.15s ease-out; + + &:hover { + text-decoration-thickness: var( --jp-underline-thickness ); + } + + &:focus { + outline-color: var( --jp-black ); + } + } + + .button { + display: inline-block; + padding: 8px 24px; + font-weight: 500; + color: var( --jp-white ); + background: var( --jp-black ); + text-decoration: none; + border-radius: var( --jp-border-radius ); + border: 0; + border-color: var( --jp-black ); + + &.is-full-width { + width: 100%; + text-align: center; + } + + &:hover, + &:active { + background: var( --jp-black-80 ); + color: var( --jp-white ); + } + + &:focus { + box-shadow: 0 0 0 1px var( --jp-white ) inset, 0 0 0 2px var( --jp-black ); + } + + &:disabled, + &.disabled { + background: var( --jp-gray ); + pointer-events: none; + } + } + + ul.jp-product-promote li { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat; + background-size: 24px; + padding-left: 30px; + margin-bottom: 9px; + color: var(--jp-black); + } +} + +.jp-hero { + margin-bottom: 64px; + padding: 64px 0; + background: var( --jp-white-off ); + + &.is-backup-performing { + background-image: url("data:image/svg+xml,%3Csvg width='624' height='400' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M624 88.387C575.321 34.082 504.674 0 426 0 323.405 0 234.3 58.22 189.925 143.42 83.07 154.78 0 245.305 0 355c0 38.16 10.072 73.999 27.698 105H624V88.387z' fill='%23fff'/%3E%3C/svg%3E"); + background-position: 100% 100%; + background-repeat: no-repeat; + } + + &.is-backup-healthy, + &.is-backup-error { + display: none; + } + + p + .button { + margin-top: 18px; + } +} + +.jp-dashboard-footer { + padding: 40px 0; +} + +.jp-connection-status-card--status { + margin: 30px 0; +} + diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/backups-style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/backups-style.scss new file mode 100644 index 00000000..5d0850a1 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/backups-style.scss @@ -0,0 +1,180 @@ +@import '@automattic/jetpack-base-styles/style'; +@import 'masthead/calypso-mixins'; + +.backup__card { + padding: 24px; + background: var( --jp-white ); + box-shadow: 0px 0px 40px rgba( 0, 0, 0, 0.08 ); + border-radius: var( --jp-border-radius ); +} + +.backup__card-details-items { + margin: 16px 0 -8px; + font-weight: 500; +} + +.backup__card-details-amount { + margin-bottom: -12px; + font-size: var( --font-title-large ); + font-weight: 600; +} + +.backup__progress { + margin-right: 64px; + margin-bottom: 48px; +} + +.backup__progress-info { + display: flex; + font-weight: 500; + + .backup__progress-info-percentage { + margin-left: auto; + } +} + +.backup__progress-bar, +.backup__progress-bar-actual { + height: 12px; + border-radius: 8px; +} + +.backup__progress-bar { + position: relative; + width: 100%; + background: var( --jp-gray-off ); +} + +.backup__progress-bar-actual { + position: absolute; + top: 0; + left: 0; + width: 0%; + background: var( --jp-green-primary ); +} +.backup__latest { + display: flex; + align-items: center; + margin-bottom: 8px; + + svg, + img { + min-width: 32px; + min-height: 32px; + } + + h2 { + margin: 0; + margin-left: 12px; + vertical-align: -1px; + } + + + h1 { + white-space: nowrap; + } +} + +.backup__animation { + position: relative; + + @include responsive( full-width ) { + display: none; + } +} + +.backup__animation-el-1, +.backup__animation-el-2, +.backup__animation-el-3 { + opacity: 0; + position: absolute; + z-index: 4; + animation: animation-el-3 4s ease-in-out 0.8s infinite normal forwards; +} + +.backup__animation-el-1 { + bottom: 150px; + right: 264px; + animation-name: animation-el-1; + animation-delay: 0.6s; +} + +.backup__animation-el-2 { + bottom: 108px; + right: 44px; + animation-name: animation-el-2; + animation-delay: 0.7s; +} + +.backup__animation-el-3 { + bottom: -32px; + animation-name: animation-el-3; +} + +@keyframes animation-el-1 { + 0% { + opacity: 0; + transform: translateY( 32px ); + } + 20% { + opacity: 1; + transform: translateY( 0 ); + } + 50% { + opacity: 1; + transform: translateY( 0 ); + } + 60% { + opacity: 0; + transform: translateY( -96px ); + } + 100% { + opacity: 0; + transform: translateY( -96px ); + } +} + +@keyframes animation-el-2 { + 0% { + opacity: 0; + transform: translateY( 64px ); + } + 20% { + opacity: 1; + transform: translateY( 0 ); + } + 50% { + opacity: 1; + transform: translateY( 0 ); + } + 60% { + opacity: 0; + transform: translateY( -96px ); + } + 100% { + opacity: 0; + transform: translateY( -96px ); + } +} + +@keyframes animation-el-3 { + 0% { + opacity: 0; + transform: translateY( 44px ); + } + 20% { + opacity: 1; + transform: translateY( 0 ); + } + 50% { + opacity: 1; + transform: translateY( 0 ); + } + 60% { + opacity: 0; + transform: translateY( -84px ); + } + 100% { + opacity: 0; + transform: translateY( -84px ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/backup-animation-1.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/backup-animation-1.svg new file mode 100644 index 00000000..08c42d96 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/backup-animation-1.svg @@ -0,0 +1,33 @@ +<svg + class="backup__animation-el-1" + width="176" + height="212" + fill="none" + xmlns="http://www.w3.org/2000/svg" +> + <g filter="url(#filter1_d)"> + <rect x="40" y="40" width="96" height="132" rx="3" fill="#98C6D9"></rect> + </g> + <defs> + <filter + id="filter1_d" + x="0" + y="0" + width="176" + height="212" + filterUnits="userSpaceOnUse" + color-interpolation-filters="sRGB" + > + <feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> + <feColorMatrix + in="SourceAlpha" + values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" + ></feColorMatrix> + <feOffset></feOffset> + <feGaussianBlur stdDeviation="20"></feGaussianBlur> + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"></feColorMatrix> + <feBlend in2="BackgroundImageFix" result="effect1_dropShadow"></feBlend> + <feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"></feBlend> + </filter> + </defs> +</svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/backup-animation-2.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/backup-animation-2.svg new file mode 100644 index 00000000..414816b6 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/backup-animation-2.svg @@ -0,0 +1,33 @@ +<svg + class="backup__animation-el-2" + width="248" + height="200" + fill="none" + xmlns="http://www.w3.org/2000/svg" +> + <g filter="url(#filter2_d)"> + <rect x="40" y="40" width="168" height="120" rx="3" fill="#F2D76B"></rect> + </g> + <defs> + <filter + id="filter2_d" + x="0" + y="0" + width="248" + height="200" + filterUnits="userSpaceOnUse" + color-interpolation-filters="sRGB" + > + <feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> + <feColorMatrix + in="SourceAlpha" + values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" + ></feColorMatrix> + <feOffset></feOffset> + <feGaussianBlur stdDeviation="20"></feGaussianBlur> + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"></feColorMatrix> + <feBlend in2="BackgroundImageFix" result="effect2_dropShadow"></feBlend> + <feBlend in="SourceGraphic" in2="effect2_dropShadow" result="shape"></feBlend> + </filter> + </defs> +</svg> diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/backup-animation-3.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/backup-animation-3.svg new file mode 100644 index 00000000..eb3ff3a2 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/backup-animation-3.svg @@ -0,0 +1,42 @@ +<svg + class="backup__animation-el-3" + width="536" + height="196" + fill="none" + xmlns="http://www.w3.org/2000/svg" +> + <g filter="url(#filter3_d)"> + <rect x="40" y="40" width="456" height="116" rx="8" fill="#fff"></rect> + </g> + <path + d="M475.35 62.04A7.49 7.49 0 00468 56c-2.89 0-5.4 1.64-6.65 4.04A5.994 5.994 0 00456 66c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z" + fill="#E9EFF5" + ></path> + <circle cx="100" cy="98" r="36" fill="#F7A8C3"></circle> + <path + d="M160 84a6 6 0 016-6h174a6 6 0 110 12H166a6 6 0 01-6-6zM160 112a6 6 0 016-6h276a6 6 0 110 12H166a6 6 0 01-6-6z" + fill="#E9EFF5" + ></path> + <defs> + <filter + id="filter3_d" + x="0" + y="0" + width="536" + height="196" + filterUnits="userSpaceOnUse" + color-interpolation-filters="sRGB" + > + <feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood> + <feColorMatrix + in="SourceAlpha" + values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" + ></feColorMatrix> + <feOffset></feOffset> + <feGaussianBlur stdDeviation="20"></feGaussianBlur> + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"></feColorMatrix> + <feBlend in2="BackgroundImageFix" result="effect3_dropShadow"></feBlend> + <feBlend in="SourceGraphic" in2="effect3_dropShadow" result="shape"></feBlend> + </filter> + </defs> +</svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/cloud-alert.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/cloud-alert.svg new file mode 100644 index 00000000..9440bdd0 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/cloud-alert.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="32" height="32" viewBox="0 0 24 24"><path fill="#d63639" d="M19 20H6C2.7 20 0 17.3 0 14C0 10.9 2.3 8.4 5.3 8C6.6 5.6 9.1 4 12 4C15.6 4 18.7 6.6 19.4 10C22 10.2 24 12.3 24 15C24 17.7 21.7 20 19 20M11 15V17H13V15H11M11 13H13V7H11V13Z" /></svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/cloud.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/cloud.svg new file mode 100644 index 00000000..ca7a6171 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/cloud.svg @@ -0,0 +1 @@ +<svg width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="a" maskUnits="userSpaceOnUse" x="0" y="5" width="32" height="22"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 5.333c4.853 0 8.893 3.453 9.8 8.053 3.467.24 6.2 3.094 6.2 6.614a6.67 6.67 0 01-6.667 6.666H8c-4.413 0-8-3.586-8-8 0-4.12 3.12-7.52 7.133-7.946A9.994 9.994 0 0116 5.333zM8.667 18l4.666 4.666 8.787-8.786L20.24 12l-6.907 6.906-2.786-2.786L8.667 18z" fill="#fff"></path></mask><g mask="url(#a)"><path fill="#069E08" d="M0 0h32v32H0z"></path></g></svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/jetpack.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/jetpack.svg new file mode 100644 index 00000000..baf8e47a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/jetpack.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 480 480" xmlns="http://www.w3.org/2000/svg" width="2500" height="2500"><path d="M252.1 447.56S387.8 188.22 387.35 187.9c.44.32-145.7-.23-146.15-.54.45.3-1.2-161.78-1.2-161.78s-24.73.55-25.16.24c.43.3-130.88 262.4-131.32 262.1.44.3 131.75-.25 131.32-.56.43.3 9.23 156.9 8.8 156.6.43.3 28.45 3.6 28.45 3.6z" fill="#fff"/><path d="M240 0C107.63 0 0 107.63 0 240s107.63 240 240 240 240-107.63 240-240S372.37 0 240 0zm-12.37 279.85H108.1L227.62 47.18v232.67zm24.28 152.52V199.7h119.55L251.9 432.36z" fill="#069e08"/></svg> diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/plugins.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/plugins.svg new file mode 100644 index 00000000..22419452 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/plugins.svg @@ -0,0 +1 @@ +<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="4.75" y="7.75" width="14.5" height="10.5" rx="1.25" stroke="#069E08" stroke-width="1.5"></rect><path fill="#069E08" d="M6 5h5v3H6zM13 5h5v3h-5z"></path></svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/posts.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/posts.svg new file mode 100644 index 00000000..9299c527 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/posts.svg @@ -0,0 +1 @@ +<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 7L8 13.5c-.167-1.167 1-5.167 1.5-6 .365-.608 1-1.5 2.5-2.5s5-2 5-2c0 1-1 2.5-2.5 4z" fill="#069E08"></path><path d="M7 16l1-2.5m0 0L14.5 7C16 5.5 17 4 17 3c0 0-3.5 1-5 2S9.865 6.892 9.5 7.5c-.5.833-1.667 4.833-1.5 6z" stroke="#069E08" stroke-width="1.5" stroke-linecap="round"></path><path d="M17.743 3.1a.75.75 0 10-1.486-.2l1.486.2zm-1.486-.2c-.089.662-.131 1.443-.17 2.235-.04.804-.075 1.63-.146 2.423-.072.795-.176 1.525-.344 2.134-.17.62-.386 1.036-.627 1.278l1.06 1.06c.509-.508.814-1.216 1.013-1.94.203-.735.317-1.568.392-2.398.074-.831.111-1.694.15-2.483.04-.802.08-1.52.158-2.11l-1.486-.198zm-1.287 8.07c-.276.275-.767.574-1.435.866-.653.287-1.415.541-2.175.754-.758.213-1.502.38-2.114.493-.63.117-1.071.167-1.246.167v1.5c.325 0 .885-.075 1.52-.192a26.28 26.28 0 002.245-.523 18.402 18.402 0 002.372-.825c.722-.316 1.419-.705 1.893-1.18l-1.06-1.06z" fill="#069E08"></path><path stroke="#069E08" stroke-width="1.5" d="M6 19.25h8"></path></svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/themes.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/themes.svg new file mode 100644 index 00000000..8e3afcae --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/themes.svg @@ -0,0 +1 @@ +<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.44 13.905a5.345 5.345 0 01-10.69 0c0-.652.307-1.557.866-2.619.547-1.039 1.284-2.137 2.034-3.15a47.06 47.06 0 012.445-3.014 48.194 48.194 0 012.445 3.015c.75 1.012 1.488 2.11 2.034 3.15.56 1.061.866 1.966.866 2.618z" stroke="#069E08" stroke-width="1.5"></path></svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/uploads.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/uploads.svg new file mode 100644 index 00000000..57132bfd --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/icons/uploads.svg @@ -0,0 +1 @@ +<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.293 13.758a7.503 7.503 0 01-14.168 1.243l3.67-2.177 3.456 1.217a.75.75 0 00.686-.098l2.887-2.073.08.04c.296.145.703.349 1.15.58.78.406 1.64.877 2.239 1.268zm.206-1.635a37.63 37.63 0 00-1.754-.964 63.44 63.44 0 00-1.538-.771l-.099-.048-.026-.012-.01-.005a.75.75 0 00-.76.068l-2.932 2.105-3.417-1.203a.75.75 0 00-.631.062l-3.675 2.18A7.5 7.5 0 1119.5 12.123zM21 12a9 9 0 11-18 0 9 9 0 0118 0z" fill="#069E08"></path></svg>
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/masthead/calypso-colors.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/masthead/calypso-colors.scss new file mode 100644 index 00000000..7237b4d4 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/masthead/calypso-colors.scss @@ -0,0 +1,60 @@ +// Blues +$blue-wordpress: #0087be; +$blue-light: #78dcfa; +$blue-medium: #3582c4; +$blue-dark: #005082; +$blue-medium-dark: #2271b1; +$blue-grey-light: #f6f7f7; +$blue-grey-dark: #0a4b78; +$light-gray-700: #c3c4c7; + + +// Grays +$gray-original: #87a6bc; +$gray: desaturate( $gray-original, 100% ); // Intermediary transform to match dotcom's colors + +// $gray color functions: +// +// lighten( $gray, 10% ) +// lighten( $gray, 20% ) +// lighten( $gray, 30% ) +// darken( $gray, 10% ) +// darken( $gray, 20% ) +// darken( $gray, 30% ) +// +// See wordpress.com/design-handbook/colors/ for more info. + +$gray-light: lighten( $gray, 33% ); //#f6f6f6 +$gray-dark: darken( $gray, 38% ); //#404040 + +// $gray-text: ideal for standard, non placeholder text +// $gray-text-min: minimum contrast needed for WCAG 2.0 AA on white background +$gray-text: $gray-dark; +$gray-text-min: darken( $gray, 18% ); //#537994 + +// Shades of gray +$gray-lighten-10: lighten( $gray, 10% ); // #a8bece +$gray-lighten-20: lighten( $gray, 20% ); // #c8d7e1 +$gray-lighten-30: lighten( $gray, 30% ); // #e9eff3 +$gray-darken-10: darken( $gray, 10% ); // #668eaa +$gray-darken-20: darken( $gray, 20% ); // #4f748e +$gray-darken-30: darken( $gray, 30% ); // #3d596d + +// Oranges +$orange-jazzy: #f0821e; +$orange-fire: #d63638; + +// Alerts +$alert-yellow: #f0b849; +$alert-red: #d94f4f; +$alert-green: #4ab866; +$alert-purple: #855DA6; + +// Link hovers +$link-highlight: tint($blue-medium, 20%); + +// Essentials +$white: rgba(255,255,255,1); +$transparent: rgba(255,255,255,0); + +$border-ultra-light-gray: #e8f0f5;
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/masthead/calypso-mixins.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/masthead/calypso-mixins.scss new file mode 100644 index 00000000..7db8b157 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/masthead/calypso-mixins.scss @@ -0,0 +1,351 @@ +@use "sass:math"; + +$full-width: 960px; +$one-col: 660px; +$mobile: 480px; + +$sidebar-width: 269px; + +@mixin responsive($width) { + @if $width == full-width { + @media only screen and (max-width: $full-width) { @content; } + } + @else if $width == one-col { + @media only screen and (max-width: $one-col) { @content; } + } + @else if $width == mobile { + @media only screen and (max-width: $mobile) { @content; } + } +} + +@mixin mobile-first-responsive($width) { + @if $width == full-width { + @media only screen and (min-width: $one-col) { @content; } + } + @else if $width == full-width-really { + @media only screen and (min-width: $full-width) { @content; } + } + @else if $width == one-col { + @media only screen and (min-width: $mobile) { @content; } + } +} + +// ========================================================================== +// Breakpoint Mixin +// See https://wpcalypso.wordpress.com/devdocs/docs/coding-guidelines/css.md#media-queries +// ========================================================================== + +$breakpoints: 480px, 660px, 960px, 1040px; // Think very carefully before adding a new breakpoint + +@mixin breakpoint( $size ){ + @if type-of($size) == string { + $approved-value: 0; + @each $breakpoint in $breakpoints { + $and-larger: ">" + $breakpoint; + $and-smaller: "<" + $breakpoint; + + @if $size == $and-smaller { + $approved-value: 1; + @media ( max-width: $breakpoint ) { + @content; + } + } + @else { + @if $size == $and-larger { + $approved-value: 2; + @media ( min-width: $breakpoint + 1 ) { + @content; + } + } + @else { + @each $breakpoint-end in $breakpoints { + $range: $breakpoint + "-" + $breakpoint-end; + @if $size == $range { + $approved-value: 3; + @media ( min-width: $breakpoint + 1 ) and ( max-width: $breakpoint-end ) { + @content; + } + } + } + } + } + } + @if $approved-value == 0 { + $sizes: ""; + @each $breakpoint in $breakpoints { + $sizes: $sizes + " " + $breakpoint; + } + // TODO - change this to use @error, when it is supported by node-sass + @warn "ERROR in breakpoint( #{ $size } ): You can only use these sizes[ #{$sizes} ] using the following syntax [ <#{ nth( $breakpoints, 1 ) } >#{ nth( $breakpoints, 1 ) } #{ nth( $breakpoints, 1 ) }-#{ nth( $breakpoints, 2 ) } ]"; + } + } + @else { + $sizes: ""; + @each $breakpoint in $breakpoints { + $sizes: $sizes + " " + $breakpoint; + } + // TODO - change this to use @error, when it is supported by node-sass + @warn "ERROR in breakpoint( #{ $size } ): Please wrap the breakpoint $size in parenthesis. You can use these sizes[ #{$sizes} ] using the following syntax [ <#{ nth( $breakpoints, 1 ) } >#{ nth( $breakpoints, 1 ) } #{ nth( $breakpoints, 1 ) }-#{ nth( $breakpoints, 2 ) } ]"; + } +} + + +@mixin calc($property, $expression) { + #{$property}: -moz-calc(#{$expression}); + #{$property}: -o-calc(#{$expression}); + #{$property}: -webkit-calc(#{$expression}); + #{$property}: calc(#{$expression}); +} + +@mixin clear-fix { + &:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } +} + +@mixin noticon($char, $size: null) { + // This isn't very clean, but... we'll see ;) + @if $size != 0 { + font-size: $size; + } + content: $char; + + // Copied verbatim + vertical-align: top; + text-align: center; + display: inline-block; + font-family: "Noticons"; + font-style: normal; + font-weight: normal; + font-variant: normal; + line-height: 1; + text-decoration: inherit; + text-transform: none; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + speak: none; +} + +@mixin border-box { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +// Turn a list into a dropdown menu +@mixin dropdown-menu { + display: none; + background: $white; + float: none; + line-height: 46px; + min-width: 220px; + overflow: visible; + padding: 0; + position: absolute; + width: auto; + z-index: 1; + box-sizing: border-box; + box-shadow: 0 0 2px rgba(0,0,0,0.15), 0 3px 8px rgba(0,0,0,0.1); + + &:after { + border: 6px solid transparent; + border-bottom-color: $white; + content: ' '; + height: 0; + position: absolute; + top: -12px; + left: 73px; + width: 0; + } + + li { + display: block; + float: none; + + a, + a.selected { + border-bottom: 1px solid rgba(0,0,0,0.1); + color: $blue-wordpress; + display: block; + float: none; + height: auto; + margin: 0; + padding: 0 14px; + text-align: left; + + &:hover { + border-bottom: 1px solid rgba(0,0,0,0.1); + background: none; // Remove inherited background color + color: $link-highlight; + box-shadow: none; // Remove inherited box shadow + } + } + + a.selected { + color: $gray-dark; + } + + &:last-child a { + border-bottom: none; // Last child in the dropdown doesn't need a bottom border + } + } +} + +// Can't use the @extend in a media query, use this instead +@mixin clear-text { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +// courtesy: http://codeboxers.com/sass-mixin-for-transitions/ +@mixin transition($transition-property, $transition-time, $method) { + -webkit-transition: $transition-property $transition-time $method; + -moz-transition: $transition-property $transition-time $method; + -ms-transition: $transition-property $transition-time $method; + -o-transition: $transition-property $transition-time $method; + transition: $transition-property $transition-time $method; +} + +@mixin box-shadow($shadows...) { + -webkit-box-shadow: $shadows; + -moz-box-shadow: $shadows; + -ms-box-shadow: $shadows; + -o-box-shadow: $shadows; + box-shadow: $shadows; +} + +@mixin site-icon($size, $icon-size) { + position: relative; + display: inline-block; + width: $size; + height: $size; + overflow: hidden; + background: lighten( $gray, 20% ); + + &::before { + content: '\f475'; + display: inline-block; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font: normal math.div($icon-size, 1) 'Noticons'; + color: $white; + position: absolute; + top: 0; + left: 0; + height: $size; + width: $size; + line-height: $size; + text-align: center; + z-index: 0; + } + + img { + background: $white; + position: relative; + } +} + +@mixin debug(){ + box-shadow: 0px 0px 10px $alert-red inset; +} + +@mixin stats-fade-text($toColor) { + background-image: linear-gradient(to right, $transparent 0%, $toColor 90%); + position: absolute; + z-index: 1; + left: -48px; + top: 0; + bottom: 0; + content: ""; + display: block; + width: 48px; +} + +@mixin hide-content-accessibly { + clip: rect( 1px, 1px, 1px, 1px ); + height: 1px; + overflow: hidden; + position: absolute; + width: 1px; +} + +// Creates a fading overlay to signify that the content is longer +// than the space allows. +@mixin long-content-fade( $direction: right, $size: 20%, $color: #fff, $edge: 0px, $z-index: false) { + content: ''; + display: block; + position: absolute; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + + @if $z-index { + z-index: $z-index; + } + + @if $direction == 'bottom' { + background: linear-gradient( to top, rgba( $color, 0 ), $color 90% ); + left: $edge; + right: $edge; + top: $edge; + bottom: calc(100% - $size); + width: auto; + } + + @if $direction == 'top' { + background: linear-gradient( to bottom, rgba( $color, 0 ), $color 90% ); + top: calc(100% - $size); + left: $edge; + right: $edge; + bottom: $edge; + width: auto; + } + + @if $direction == 'left'{ + background: linear-gradient( to left, rgba( $color, 0 ), $color 90% ); + top: $edge; + left: $edge; + bottom: $edge; + right: auto; + width: $size; + height: auto; + } + + @if $direction == 'right' { + background: linear-gradient( to right, rgba( $color, 0 ), $color 90% ); + top: $edge; + bottom: $edge; + right: $edge; + left: auto; + width: $size; + height: auto; + } +} + +@mixin placeholder( $lighten-percentage: 30% ) { + animation: loading-fade 1.6s ease-in-out infinite; + background-color: lighten( $gray, $lighten-percentage ); + color: transparent; + + &:after { + content: '\00a0'; + } +} + +// Simple animation to make elements appear +@keyframes appear { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/masthead/masthead-style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/masthead/masthead-style.scss new file mode 100644 index 00000000..2dc28d05 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/masthead/masthead-style.scss @@ -0,0 +1,89 @@ +@import './calypso-mixins'; +@import './calypso-colors'; + +.jp-masthead { + padding: 40px 0; + background-color: $white; + text-align: center; + @media (max-width: rem( 782px ) ) { + padding: 0 rem( 24px ); + + .jetpack-masterbar & { + padding-left: rem( 64px ); + } + } +} + +.jp-masthead__inside-container { + display: flex; + flex-wrap: wrap; + margin: 0 auto; + width: 100%; + max-width: rem( 1040px ); + padding-bottom: rem( 6px ); + + @media (max-width: 1250px) { + max-width: 95%; + } +} + +.jp-masthead__logo-container { + flex-grow: 0; + flex-shrink: 0; + padding: rem( 11px ) 0 0; + + @include breakpoint( "<480px" ) { + margin-right: rem( 16px ); + } +} + +.jp-masthead__logo-link { + display: inline-block; + outline: none; + vertical-align: middle; + + &:focus { + line-height: 0; // fixes rectangle gap + box-shadow: 0 0 0 2px $blue-light; + } + + & + code { + margin: 0 10px; + padding: 5px 9px; + border-radius: 2px; + background: #e6ecf1; + color: #647a88; + } +} + +.jp-masthead__nav { + display: flex; + flex-wrap: nowrap; + flex-grow: 1; + flex-shrink: 0; + text-align: right; + margin-top: rem( 6px ); + padding: rem( 4px ) 0; + + .dops-button-group { + flex-grow: 1; + align-self: center; + /* This fixes an unwanted space between the buttons in the network settings caused by a line break. */ + /* Fixed here to keep PHP code readable. It's safe: .dops-button and .dops-button.is-compact specify a font size. */ + font-size: 0; + } + @include breakpoint( "<480px" ) { + text-align: left; + } +} + +#sandbox-domain-badge { + background: #d63638; + text-transform: uppercase; + letter-spacing: 0.2em; + text-shadow: none; + font-size: 9px; + font-weight: bold; + cursor: pointer; + color: #ffffff; +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/stat-block-style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/stat-block-style.scss new file mode 100644 index 00000000..469e292b --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/components/stat-block-style.scss @@ -0,0 +1,46 @@ +.stat-block { + display: flex; + flex-direction: column; + flex: 1; + + .icon { + img { + margin-top: 24px; + height: 24px; + width: 24px; + } + flex: 2; + } + + .label { + flex: 1; + font-weight: bold; + } + + .value { + flex: 1; + } + + .large-text { + font-size: 2em; + font-weight: bold; + } +} + +.backup__card { + padding: 24px; + background:var( --jp-white ); + box-shadow: 0px 0px 40px rgba( 0, 0, 0, 0.08 ); + border-radius: var( --jp-border-radius ); +} + +.backup__card-details-items { + margin: 16px 0 -8px; + font-weight: 500; +} + +.backup__card-details-amount { + margin-bottom: -12px; + font-size: var( --font-title-large ); + font-weight: 600; +}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/hooks/assets/connect-right.png b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/hooks/assets/connect-right.png Binary files differnew file mode 100644 index 00000000..66f8710a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/hooks/assets/connect-right.png diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/hooks/useConnection.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/hooks/useConnection.js new file mode 100644 index 00000000..dd7b34a1 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/hooks/useConnection.js @@ -0,0 +1,76 @@ +/** + * External dependencies + */ +import React from 'react'; +import { useState, useEffect } from '@wordpress/element'; +import apiFetch from '@wordpress/api-fetch'; +import { useSelect } from '@wordpress/data'; +import { ConnectScreenRequiredPlan, CONNECTION_STORE_ID } from '@automattic/jetpack-connection'; +import { __ } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +import { STORE_ID } from '../store'; + +/** + * Expose the `connectionStatus` state object and `renderConnectScreen()` to show a component used for connection. + * + * @returns {Array} connectionStatus, renderConnectScreen + */ +export default function useConnection() { + const APINonce = useSelect( select => select( STORE_ID ).getAPINonce(), [] ); + const APIRoot = useSelect( select => select( STORE_ID ).getAPIRoot(), [] ); + const registrationNonce = useSelect( select => select( STORE_ID ).getRegistrationNonce(), [] ); + const connectionStatus = useSelect( + select => select( CONNECTION_STORE_ID ).getConnectionStatus(), + [] + ); + const [ price, setPrice ] = useState( 0 ); + const [ priceAfter, setPriceAfter ] = useState( 0 ); + + useEffect( () => { + apiFetch( { path: '/jetpack/v4/backup-promoted-product-info' } ).then( res => { + setPrice( res.cost / 12 ); + if ( res.introductory_offer ) { + setPriceAfter( res.introductory_offer.cost_per_interval / 12 ); + } else { + setPriceAfter( res.cost / 12 ); + } + } ); + }, [] ); + + const renderConnectScreen = () => { + return ( + <ConnectScreenRequiredPlan + buttonLabel={ __( 'Get Jetpack Backup', 'jetpack-backup-pkg' ) } + priceAfter={ priceAfter } + priceBefore={ price } + pricingIcon="data:image/svg+xml,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m21.092 15.164.019-1.703v-.039c0-1.975-1.803-3.866-4.4-3.866-2.17 0-3.828 1.351-4.274 2.943l-.426 1.524-1.581-.065a2.92 2.92 0 0 0-.12-.002c-1.586 0-2.977 1.344-2.977 3.133 0 1.787 1.388 3.13 2.973 3.133H22.399c1.194 0 2.267-1.016 2.267-2.4 0-1.235-.865-2.19-1.897-2.368l-1.677-.29Zm-10.58-3.204a4.944 4.944 0 0 0-.201-.004c-2.75 0-4.978 2.298-4.978 5.133s2.229 5.133 4.978 5.133h12.088c2.357 0 4.267-1.97 4.267-4.4 0-2.18-1.538-3.99-3.556-4.339v-.06c0-3.24-2.865-5.867-6.4-5.867-2.983 0-5.49 1.871-6.199 4.404Z' fill='%23000'/%3E%3C/svg%3E" + pricingTitle={ __( 'Jetpack Backup', 'jetpack-backup-pkg' ) } + title={ __( 'The best real‑time WordPress backups', 'jetpack-backup-pkg' ) } + apiRoot={ APIRoot } + apiNonce={ APINonce } + registrationNonce={ registrationNonce } + from="jetpack-backup" + redirectUri="admin.php?page=jetpack-backup" + > + <h3> + { __( + 'Save every change and get back online quickly with one‑click restores.', + 'jetpack-backup-pkg' + ) } + </h3> + <ul> + <li>{ __( 'Automated real-time backups', 'jetpack-backup-pkg' ) }</li> + <li>{ __( 'Easy one-click restores', 'jetpack-backup-pkg' ) }</li> + <li>{ __( 'Complete list of all site changes', 'jetpack-backup-pkg' ) }</li> + <li>{ __( 'Global server infrastructure', 'jetpack-backup-pkg' ) }</li> + <li>{ __( 'Best-in-class support', 'jetpack-backup-pkg' ) }</li> + </ul> + </ConnectScreenRequiredPlan> + ); + }; + + return [ connectionStatus, renderConnectScreen ]; +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/index.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/index.js new file mode 100644 index 00000000..3f682358 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/index.js @@ -0,0 +1,30 @@ +/** + * External dependencies + */ +import React from 'react'; +import ReactDOM from 'react-dom'; +import { createReduxStore, register } from '@wordpress/data'; + +/** + * Internal dependencies + */ +import Admin from './components/Admin'; +import { STORE_ID, storeConfig } from './store'; + +const store = createReduxStore( STORE_ID, storeConfig ); +register( store ); + +/** + * Initial render function. + */ +function render() { + const container = document.getElementById( 'jetpack-backup-root' ); + + if ( null === container ) { + return; + } + + ReactDOM.render( <Admin />, container ); +} + +render(); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/api.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/api.js new file mode 100644 index 00000000..4ae3dab2 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/api.js @@ -0,0 +1,5 @@ +const API = ( state = {} ) => { + return state; +}; + +export default API; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/assets.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/assets.js new file mode 100644 index 00000000..45b16088 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/assets.js @@ -0,0 +1,5 @@ +const assets = ( state = {} ) => { + return state; +}; + +export default assets; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/connected-plugins.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/connected-plugins.js new file mode 100644 index 00000000..42689a3a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/connected-plugins.js @@ -0,0 +1,5 @@ +const connectedPlugins = ( state = {} ) => { + return state; +}; + +export default connectedPlugins; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/index.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/index.js new file mode 100644 index 00000000..61e2f2b2 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/index.js @@ -0,0 +1,23 @@ +/** + * External dependencies + */ +import { combineReducers } from '@wordpress/data'; + +/** + * Internal dependencies + */ +import API from './api'; +import jetpackStatus from './jetpack-status'; +import assets from './assets'; +import connectedPlugins from './connected-plugins'; +import siteData from './site-data'; + +const reducer = combineReducers( { + connectedPlugins, + API, + jetpackStatus, + assets, + siteData, +} ); + +export default reducer; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/jetpack-status.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/jetpack-status.js new file mode 100644 index 00000000..201bfa0d --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/jetpack-status.js @@ -0,0 +1,5 @@ +const jetpackStatus = ( state = {} ) => { + return state; +}; + +export default jetpackStatus; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/reducer/site-data.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/site-data.js index 8e1a578d..8e1a578d 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/reducer/site-data.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/reducers/site-data.js diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/api.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/api.js new file mode 100644 index 00000000..3dcd244c --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/api.js @@ -0,0 +1,7 @@ +const APISelectors = { + getAPIRoot: state => state.API.WP_API_root || null, + getAPINonce: state => state.API.WP_API_nonce || null, + getRegistrationNonce: state => state.API.registrationNonce || null, +}; + +export default APISelectors; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/connected-plugins.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/connected-plugins.js new file mode 100644 index 00000000..9103e174 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/connected-plugins.js @@ -0,0 +1,5 @@ +const connectedPluginsSelectors = { + getConnectedPlugins: state => state.connectedPlugins || [], +}; + +export default connectedPluginsSelectors; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/index.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/index.js new file mode 100644 index 00000000..78d0074f --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/index.js @@ -0,0 +1,16 @@ +/** + * Internal dependencies + */ +import APISelectors from './api'; +import jetpackStatusSelectors from './jetpack-status'; +import connectedPluginsSelectors from './connected-plugins'; +import siteDataSelectors from './site-data'; + +const selectors = { + ...APISelectors, + ...jetpackStatusSelectors, + ...connectedPluginsSelectors, + ...siteDataSelectors, +}; + +export default selectors; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/jetpack-status.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/jetpack-status.js new file mode 100644 index 00000000..65e75b19 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/jetpack-status.js @@ -0,0 +1,5 @@ +const jetpackStatusSelectors = { + getCalypsoSlug: state => state.jetpackStatus.calypsoSlug || {}, +}; + +export default jetpackStatusSelectors; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/site-data.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/site-data.js new file mode 100644 index 00000000..bae01921 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/selectors/site-data.js @@ -0,0 +1,6 @@ +const siteDataSelectors = { + getSiteData: state => state.siteData || [], + getSiteTitle: state => state.siteData?.title || '', +}; + +export default siteDataSelectors; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/store.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/store.js new file mode 100644 index 00000000..dc67b390 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/src/js/store.js @@ -0,0 +1,12 @@ +/** + * Internal dependencies + */ +import reducer from './reducers'; +import selectors from './selectors'; + +export const STORE_ID = 'jetpack-backup-plugin'; +export const storeConfig = { + reducer, + selectors, + initialState: window.JPBACKUP_INITIAL_STATE || {}, +}; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/webpack.config.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/webpack.config.js new file mode 100644 index 00000000..c4ba408f --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-backup/webpack.config.js @@ -0,0 +1,60 @@ +/** + * External dependencies + */ +const jetpackWebpackConfig = require( '@automattic/jetpack-webpack-config/webpack' ); +const path = require( 'path' ); + +module.exports = [ + { + entry: { + index: './src/js/index.js', + }, + mode: jetpackWebpackConfig.mode, + devtool: jetpackWebpackConfig.isDevelopment ? 'source-map' : false, + output: { + ...jetpackWebpackConfig.output, + path: path.resolve( './build' ), + }, + optimization: { + ...jetpackWebpackConfig.optimization, + }, + resolve: { + ...jetpackWebpackConfig.resolve, + }, + node: false, + plugins: [ + ...jetpackWebpackConfig.StandardPlugins( { + DependencyExtractionPlugin: { injectPolyfill: true }, + } ), + ], + module: { + strictExportPresence: true, + rules: [ + // Transpile JavaScript + jetpackWebpackConfig.TranspileRule( { + exclude: /node_modules\//, + } ), + + // Transpile @automattic/jetpack-* in node_modules too. + jetpackWebpackConfig.TranspileRule( { + includeNodeModules: [ '@automattic/jetpack-' ], + } ), + + // Handle CSS. + jetpackWebpackConfig.CssRule( { + extensions: [ 'css', 'sass', 'scss' ], + extraLoaders: [ 'sass-loader' ], + } ), + + // Handle images. + jetpackWebpackConfig.FileRule(), + ], + }, + externals: { + ...jetpackWebpackConfig.externals, + jetpackConfig: JSON.stringify( { + consumer_slug: 'jetpack-backup', + } ), + }, + }, +]; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-blocks/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-blocks/CHANGELOG.md index 83a23092..978d4e5d 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-blocks/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-blocks/CHANGELOG.md @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.4.12] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.4.11] - 2022-01-25 +### Changed +- Updated package dependencies. + +## [1.4.10] - 2022-01-18 +### Changed +- Updated package dependencies. + ## [1.4.9] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -92,6 +104,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Blocks: introduce new package for block management +[1.4.12]: https://github.com/Automattic/jetpack-blocks/compare/v1.4.11...v1.4.12 +[1.4.11]: https://github.com/Automattic/jetpack-blocks/compare/v1.4.10...v1.4.11 +[1.4.10]: https://github.com/Automattic/jetpack-blocks/compare/v1.4.9...v1.4.10 [1.4.9]: https://github.com/Automattic/jetpack-blocks/compare/v1.4.8...v1.4.9 [1.4.8]: https://github.com/Automattic/jetpack-blocks/compare/v1.4.7...v1.4.8 [1.4.7]: https://github.com/Automattic/jetpack-blocks/compare/v1.4.6...v1.4.7 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/.phpcs.dir.xml b/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/.phpcs.dir.xml new file mode 100644 index 00000000..fcc30188 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/.phpcs.dir.xml @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<ruleset> + + <rule ref="WordPress.WP.I18n"> + <properties> + <property name="text_domain" type="array"> + <element value="jetpack-compat" /> + </property> + </properties> + </rule> + <rule ref="Jetpack.Functions.I18n"> + <properties> + <property name="text_domain" value="jetpack-compat" /> + </properties> + </rule> + + <rule ref="WordPress.Utils.I18nTextDomainFixer"> + <properties> + <property name="old_text_domain" type="array" /> + <property name="new_text_domain" value="jetpack-compat" /> + </properties> + </rule> + +</ruleset> diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/CHANGELOG.md index 76993fe5..8a0f801b 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/CHANGELOG.md @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.7.2] - 2022-05-18 +### Fixed +- Fix new PHPCS sniffs. [#24366] + +## [1.7.1] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.7.0] - 2022-03-23 +### Added +- Migrated GlotPress locale classes into compat pkg + ## [1.6.8] - 2021-12-14 ### Changed - Updated package dependencies. @@ -97,6 +109,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Jetpack 7.5: Back compatibility package +[1.7.2]: https://github.com/Automattic/jetpack-compat/compare/v1.7.1...v1.7.2 +[1.7.1]: https://github.com/Automattic/jetpack-compat/compare/v1.7.0...v1.7.1 +[1.7.0]: https://github.com/Automattic/jetpack-compat/compare/v1.6.8...v1.7.0 [1.6.8]: https://github.com/Automattic/jetpack-compat/compare/v1.6.7...v1.6.8 [1.6.7]: https://github.com/Automattic/jetpack-compat/compare/v1.6.6...v1.6.7 [1.6.6]: https://github.com/Automattic/jetpack-compat/compare/v1.6.5...v1.6.6 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/functions.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/functions.php index 42f73915..95da9151 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/functions.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/functions.php @@ -19,7 +19,7 @@ if ( function_exists( 'add_filter' ) ) { 'function' => $cb, ); }; - $add_action = $add_filter; + $add_action = $add_filter; } /** diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/lib/locales.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/lib/locales.php new file mode 100644 index 00000000..769b4b2f --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-compat/lib/locales.php @@ -0,0 +1,2398 @@ +<?php // phpcs:disable +// This file is copied over from GlotPress/GlotPress-WP project and does not nessitate linting. + +if ( ! class_exists( 'GP_Locale' ) ) : + + class GP_Locale { + public $english_name; + public $native_name; + public $text_direction = 'ltr'; + public $lang_code_iso_639_1 = null; + public $lang_code_iso_639_2 = null; + public $lang_code_iso_639_3 = null; + public $country_code; + public $wp_locale; + public $slug; + public $nplurals = 2; + public $plural_expression = 'n != 1'; + public $google_code = null; + public $preferred_sans_serif_font_family = null; + public $facebook_locale = null; + // TODO: days, months, decimals, quotes + + private $_index_for_number; + + public function __construct( $args = array() ) { + foreach ( $args as $key => $value ) { + $this->$key = $value; + } + } + + public static function __set_state( $state ) { + return new GP_Locale( $state ); + } + + /** + * Make deprecated properties checkable for backwards compatibility. + * + * @param string $name Property to check if set. + * @return bool Whether the property is set. + */ + public function __isset( $name ) { + if ( 'rtl' == $name ) { + return isset( $this->text_direction ); + } + } + + /** + * Make deprecated properties readable for backwards compatibility. + * + * @param string $name Property to get. + * @return mixed Property. + */ + public function __get( $name ) { + if ( 'rtl' == $name ) { + return ( 'rtl' === $this->text_direction ); + } + } + + public function combined_name() { + /* translators: combined name for locales: 1: name in English, 2: native name */ + return sprintf( _x( '%1$s/%2$s', 'locales', 'jetpack-compat' ), $this->english_name, $this->native_name ); + } + + public function numbers_for_index( $index, $how_many = 3, $test_up_to = 1000 ) { + $numbers = array(); + + for ( $number = 0; $number < $test_up_to; ++$number ) { + if ( $this->index_for_number( $number ) == $index ) { + $numbers[] = $number; + + if ( count( $numbers ) >= $how_many ) { + break; + } + } + } + + return $numbers; + } + + public function index_for_number( $number ) { + if ( ! isset( $this->_index_for_number ) ) { + $gettext = new Gettext_Translations(); + $expression = $gettext->parenthesize_plural_exression( $this->plural_expression ); + $this->_index_for_number = $gettext->make_plural_form_function( $this->nplurals, $expression ); + } + + $f = $this->_index_for_number; + + return $f( $number ); + } + + } + +endif; + +if ( ! class_exists( 'GP_Locales' ) ) : + + class GP_Locales { + + public $locales = array(); + + public function __construct() { + $aa = new GP_Locale(); + $aa->english_name = 'Afar'; + $aa->native_name = 'Afaraf'; + $aa->lang_code_iso_639_1 = 'aa'; + $aa->lang_code_iso_639_2 = 'aar'; + $aa->slug = 'aa'; + + $ae = new GP_Locale(); + $ae->english_name = 'Avestan'; + $ae->native_name = 'Avesta'; + $ae->lang_code_iso_639_1 = 'ae'; + $ae->lang_code_iso_639_2 = 'ave'; + $ae->slug = 'ae'; + + $af = new GP_Locale(); + $af->english_name = 'Afrikaans'; + $af->native_name = 'Afrikaans'; + $af->lang_code_iso_639_1 = 'af'; + $af->lang_code_iso_639_2 = 'afr'; + $af->country_code = 'za'; + $af->wp_locale = 'af'; + $af->slug = 'af'; + $af->google_code = 'af'; + $af->facebook_locale = 'af_ZA'; + + $ak = new GP_Locale(); + $ak->english_name = 'Akan'; + $ak->native_name = 'Akan'; + $ak->lang_code_iso_639_1 = 'ak'; + $ak->lang_code_iso_639_2 = 'aka'; + $ak->wp_locale = 'ak'; + $ak->slug = 'ak'; + $ak->facebook_locale = 'ak_GH'; + + $am = new GP_Locale(); + $am->english_name = 'Amharic'; + $am->native_name = 'አማርኛ'; + $am->lang_code_iso_639_1 = 'am'; + $am->lang_code_iso_639_2 = 'amh'; + $am->country_code = 'et'; + $am->wp_locale = 'am'; + $am->slug = 'am'; + $am->facebook_locale = 'am_ET'; + + $an = new GP_Locale(); + $an->english_name = 'Aragonese'; + $an->native_name = 'Aragonés'; + $an->lang_code_iso_639_1 = 'an'; + $an->lang_code_iso_639_2 = 'arg'; + $an->country_code = 'es'; + $an->slug = 'an'; + + $ar = new GP_Locale(); + $ar->english_name = 'Arabic'; + $ar->native_name = 'العربية'; + $ar->lang_code_iso_639_1 = 'ar'; + $ar->lang_code_iso_639_2 = 'ara'; + $ar->wp_locale = 'ar'; + $ar->slug = 'ar'; + $ar->nplurals = 6; + $ar->plural_expression = 'n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5'; + $ar->text_direction = 'rtl'; + $ar->preferred_sans_serif_font_family = 'Tahoma'; + $ar->google_code = 'ar'; + $ar->facebook_locale = 'ar_AR'; + + $arq = new GP_Locale(); + $arq->english_name = 'Algerian Arabic'; + $arq->native_name = 'الدارجة الجزايرية'; + $arq->lang_code_iso_639_1 = 'ar'; + $arq->lang_code_iso_639_3 = 'arq'; + $arq->country_code = 'dz'; + $arq->wp_locale = 'arq'; + $arq->slug = 'arq'; + $arq->nplurals = 6; + $arq->plural_expression = 'n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5'; + $arq->text_direction = 'rtl'; + + $ary = new GP_Locale(); + $ary->english_name = 'Moroccan Arabic'; + $ary->native_name = 'العربية المغربية'; + $ary->lang_code_iso_639_1 = 'ar'; + $ary->lang_code_iso_639_3 = 'ary'; + $ary->country_code = 'ma'; + $ary->wp_locale = 'ary'; + $ary->slug = 'ary'; + $ary->nplurals = 6; + $ary->plural_expression = 'n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5'; + $ary->text_direction = 'rtl'; + + $as = new GP_Locale(); + $as->english_name = 'Assamese'; + $as->native_name = 'অসমীয়া'; + $as->lang_code_iso_639_1 = 'as'; + $as->lang_code_iso_639_2 = 'asm'; + $as->lang_code_iso_639_3 = 'asm'; + $as->country_code = 'in'; + $as->wp_locale = 'as'; + $as->slug = 'as'; + $as->facebook_locale = 'as_IN'; + + $ast = new GP_Locale(); + $ast->english_name = 'Asturian'; + $ast->native_name = 'Asturianu'; + $ast->lang_code_iso_639_2 = 'ast'; + $ast->lang_code_iso_639_3 = 'ast'; + $ast->country_code = 'es'; + $ast->wp_locale = 'ast'; + $ast->slug = 'ast'; + + $av = new GP_Locale(); + $av->english_name = 'Avaric'; + $av->native_name = 'авар мацӀ'; + $av->lang_code_iso_639_1 = 'av'; + $av->lang_code_iso_639_2 = 'ava'; + $av->slug = 'av'; + + $ay = new GP_Locale(); + $ay->english_name = 'Aymara'; + $ay->native_name = 'aymar aru'; + $ay->lang_code_iso_639_1 = 'ay'; + $ay->lang_code_iso_639_2 = 'aym'; + $ay->slug = 'ay'; + $ay->nplurals = 1; + $ay->plural_expression = '0'; + $ay->facebook_locale = 'ay_BO'; + + $az = new GP_Locale(); + $az->english_name = 'Azerbaijani'; + $az->native_name = 'Azərbaycan dili'; + $az->lang_code_iso_639_1 = 'az'; + $az->lang_code_iso_639_2 = 'aze'; + $az->country_code = 'az'; + $az->wp_locale = 'az'; + $az->slug = 'az'; + $az->google_code = 'az'; + $az->facebook_locale = 'az_AZ'; + + $azb = new GP_Locale(); + $azb->english_name = 'South Azerbaijani'; + $azb->native_name = 'گؤنئی آذربایجان'; + $azb->lang_code_iso_639_1 = 'az'; + $azb->lang_code_iso_639_3 = 'azb'; + $azb->country_code = 'ir'; + $azb->wp_locale = 'azb'; + $azb->slug = 'azb'; + $azb->text_direction = 'rtl'; + + $az_tr = new GP_Locale(); + $az_tr->english_name = 'Azerbaijani (Turkey)'; + $az_tr->native_name = 'Azərbaycan Türkcəsi'; + $az_tr->lang_code_iso_639_1 = 'az'; + $az_tr->lang_code_iso_639_2 = 'aze'; + $az_tr->country_code = 'tr'; + $az_tr->wp_locale = 'az_TR'; + $az_tr->slug = 'az-tr'; + + $ba = new GP_Locale(); + $ba->english_name = 'Bashkir'; + $ba->native_name = 'башҡорт теле'; + $ba->lang_code_iso_639_1 = 'ba'; + $ba->lang_code_iso_639_2 = 'bak'; + $ba->wp_locale = 'ba'; + $ba->slug = 'ba'; + + $bal = new GP_Locale(); + $bal->english_name = 'Catalan (Balear)'; + $bal->native_name = 'Català (Balear)'; + $bal->lang_code_iso_639_2 = 'bal'; + $bal->country_code = 'es'; + $bal->wp_locale = 'bal'; + $bal->slug = 'bal'; + + $bcc = new GP_Locale(); + $bcc->english_name = 'Balochi Southern'; + $bcc->native_name = 'بلوچی مکرانی'; + $bcc->lang_code_iso_639_3 = 'bcc'; + $bcc->country_code = 'pk'; + $bcc->wp_locale = 'bcc'; + $bcc->slug = 'bcc'; + $bcc->nplurals = 1; + $bcc->plural_expression = '0'; + $bcc->text_direction = 'rtl'; + + $be = new GP_Locale(); + $be->english_name = 'Belarusian'; + $be->native_name = 'Беларуская мова'; + $be->lang_code_iso_639_1 = 'be'; + $be->lang_code_iso_639_2 = 'bel'; + $be->country_code = 'by'; + $be->wp_locale = 'bel'; + $be->slug = 'bel'; + $be->nplurals = 3; + $be->plural_expression = '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'; + $be->google_code = 'be'; + $be->facebook_locale = 'be_BY'; + + $bg = new GP_Locale(); + $bg->english_name = 'Bulgarian'; + $bg->native_name = 'Български'; + $bg->lang_code_iso_639_1 = 'bg'; + $bg->lang_code_iso_639_2 = 'bul'; + $bg->country_code = 'bg'; + $bg->wp_locale = 'bg_BG'; + $bg->slug = 'bg'; + $bg->google_code = 'bg'; + $bg->facebook_locale = 'bg_BG'; + + $bh = new GP_Locale(); + $bh->english_name = 'Bihari'; + $bh->native_name = 'भोजपुरी'; + $bh->lang_code_iso_639_1 = 'bh'; + $bh->lang_code_iso_639_2 = 'bih'; + $bh->slug = 'bh'; + + $bi = new GP_Locale(); + $bi->english_name = 'Bislama'; + $bi->native_name = 'Bislama'; + $bi->lang_code_iso_639_1 = 'bi'; + $bi->lang_code_iso_639_2 = 'bis'; + $bi->country_code = 'vu'; + $bi->slug = 'bi'; + + $bm = new GP_Locale(); + $bm->english_name = 'Bambara'; + $bm->native_name = 'Bamanankan'; + $bm->lang_code_iso_639_1 = 'bm'; + $bm->lang_code_iso_639_2 = 'bam'; + $bm->slug = 'bm'; + + $bn_bd = new GP_Locale(); + $bn_bd->english_name = 'Bengali'; + $bn_bd->native_name = 'বাংলা'; + $bn_bd->lang_code_iso_639_1 = 'bn'; + $bn_bd->country_code = 'bn'; + $bn_bd->wp_locale = 'bn_BD'; + $bn_bd->slug = 'bn'; + $bn_bd->google_code = 'bn'; + $bn_bd->facebook_locale = 'bn_IN'; + + $bo = new GP_Locale(); + $bo->english_name = 'Tibetan'; + $bo->native_name = 'བོད་ཡིག'; + $bo->lang_code_iso_639_1 = 'bo'; + $bo->lang_code_iso_639_2 = 'tib'; + $bo->wp_locale = 'bo'; + $bo->slug = 'bo'; + $bo->nplurals = 1; + $bo->plural_expression = '0'; + + $br = new GP_Locale(); + $br->english_name = 'Breton'; + $br->native_name = 'Brezhoneg'; + $br->lang_code_iso_639_1 = 'br'; + $br->lang_code_iso_639_2 = 'bre'; + $br->lang_code_iso_639_3 = 'bre'; + $br->country_code = 'fr'; + $br->wp_locale = 'bre'; + $br->slug = 'br'; + $br->nplurals = 2; + $br->plural_expression = '(n > 1)'; + $br->facebook_locale = 'br_FR'; + + $bs = new GP_Locale(); + $bs->english_name = 'Bosnian'; + $bs->native_name = 'Bosanski'; + $bs->lang_code_iso_639_1 = 'bs'; + $bs->lang_code_iso_639_2 = 'bos'; + $bs->country_code = 'ba'; + $bs->wp_locale = 'bs_BA'; + $bs->slug = 'bs'; + $bs->nplurals = 3; + $bs->plural_expression = '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'; + $bs->google_code = 'bs'; + $bs->facebook_locale = 'bs_BA'; + + $ca = new GP_Locale(); + $ca->english_name = 'Catalan'; + $ca->native_name = 'Català'; + $ca->lang_code_iso_639_1 = 'ca'; + $ca->lang_code_iso_639_2 = 'cat'; + $ca->wp_locale = 'ca'; + $ca->slug = 'ca'; + $ca->google_code = 'ca'; + $ca->facebook_locale = 'ca_ES'; + + $ce = new GP_Locale(); + $ce->english_name = 'Chechen'; + $ce->native_name = 'Нохчийн мотт'; + $ce->lang_code_iso_639_1 = 'ce'; + $ce->lang_code_iso_639_2 = 'che'; + $ce->slug = 'ce'; + + $ceb = new GP_Locale(); + $ceb->english_name = 'Cebuano'; + $ceb->native_name = 'Cebuano'; + $ceb->lang_code_iso_639_2 = 'ceb'; + $ceb->lang_code_iso_639_3 = 'ceb'; + $ceb->country_code = 'ph'; + $ceb->wp_locale = 'ceb'; + $ceb->slug = 'ceb'; + $ceb->facebook_locale = 'cx_PH'; + + $ch = new GP_Locale(); + $ch->english_name = 'Chamorro'; + $ch->native_name = 'Chamoru'; + $ch->lang_code_iso_639_1 = 'ch'; + $ch->lang_code_iso_639_2 = 'cha'; + $ch->slug = 'ch'; + + $ckb = new GP_Locale(); + $ckb->english_name = 'Kurdish (Sorani)'; + $ckb->native_name = 'كوردی'; + $ckb->lang_code_iso_639_1 = 'ku'; + $ckb->lang_code_iso_639_3 = 'ckb'; + $ckb->country_code = 'iq'; + $ckb->wp_locale = 'ckb'; + $ckb->slug = 'ckb'; + $ckb->text_direction = 'rtl'; + $ckb->facebook_locale = 'cb_IQ'; + + $co = new GP_Locale(); + $co->english_name = 'Corsican'; + $co->native_name = 'Corsu'; + $co->lang_code_iso_639_1 = 'co'; + $co->lang_code_iso_639_2 = 'cos'; + $co->country_code = 'it'; + $co->wp_locale = 'co'; + $co->slug = 'co'; + + $cr = new GP_Locale(); + $cr->english_name = 'Cree'; + $cr->native_name = 'ᓀᐦᐃᔭᐍᐏᐣ'; + $cr->lang_code_iso_639_1 = 'cr'; + $cr->lang_code_iso_639_2 = 'cre'; + $cr->country_code = 'ca'; + $cr->slug = 'cr'; + + $cs = new GP_Locale(); + $cs->english_name = 'Czech'; + $cs->native_name = 'Čeština'; + $cs->lang_code_iso_639_1 = 'cs'; + $cs->lang_code_iso_639_2 = 'ces'; + $cs->country_code = 'cz'; + $cs->wp_locale = 'cs_CZ'; + $cs->slug = 'cs'; + $cs->nplurals = 3; + $cs->plural_expression = '(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2'; + $cs->google_code = 'cs'; + $cs->facebook_locale = 'cs_CZ'; + + $csb = new GP_Locale(); + $csb->english_name = 'Kashubian'; + $csb->native_name = 'Kaszëbsczi'; + $csb->lang_code_iso_639_2 = 'csb'; + $csb->slug = 'csb'; + $csb->nplurals = 3; + $csb->plural_expression = 'n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2'; + + $cu = new GP_Locale(); + $cu->english_name = 'Church Slavic'; + $cu->native_name = 'ѩзыкъ словѣньскъ'; + $cu->lang_code_iso_639_1 = 'cu'; + $cu->lang_code_iso_639_2 = 'chu'; + $cu->slug = 'cu'; + + $cv = new GP_Locale(); + $cv->english_name = 'Chuvash'; + $cv->native_name = 'чӑваш чӗлхи'; + $cv->lang_code_iso_639_1 = 'cv'; + $cv->lang_code_iso_639_2 = 'chv'; + $cv->country_code = 'ru'; + $cv->slug = 'cv'; + + $cy = new GP_Locale(); + $cy->english_name = 'Welsh'; + $cy->native_name = 'Cymraeg'; + $cy->lang_code_iso_639_1 = 'cy'; + $cy->lang_code_iso_639_2 = 'cym'; + $cy->country_code = 'gb'; + $cy->wp_locale = 'cy'; + $cy->slug = 'cy'; + $cy->nplurals = 4; + $cy->plural_expression = '(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3'; + $cy->google_code = 'cy'; + $cy->facebook_locale = 'cy_GB'; + + $da = new GP_Locale(); + $da->english_name = 'Danish'; + $da->native_name = 'Dansk'; + $da->lang_code_iso_639_1 = 'da'; + $da->lang_code_iso_639_2 = 'dan'; + $da->country_code = 'dk'; + $da->wp_locale = 'da_DK'; + $da->slug = 'da'; + $da->google_code = 'da'; + $da->facebook_locale = 'da_DK'; + + $de = new GP_Locale(); + $de->english_name = 'German'; + $de->native_name = 'Deutsch'; + $de->lang_code_iso_639_1 = 'de'; + $de->country_code = 'de'; + $de->wp_locale = 'de_DE'; + $de->slug = 'de'; + $de->google_code = 'de'; + $de->facebook_locale = 'de_DE'; + + $de_ch = new GP_Locale(); + $de_ch->english_name = 'German (Switzerland)'; + $de_ch->native_name = 'Deutsch (Schweiz)'; + $de_ch->lang_code_iso_639_1 = 'de'; + $de_ch->country_code = 'ch'; + $de_ch->wp_locale = 'de_CH'; + $de_ch->slug = 'de-ch'; + $de_ch->google_code = 'de'; + + $dv = new GP_Locale(); + $dv->english_name = 'Dhivehi'; + $dv->native_name = 'ދިވެހި'; + $dv->lang_code_iso_639_1 = 'dv'; + $dv->lang_code_iso_639_2 = 'div'; + $dv->country_code = 'mv'; + $dv->wp_locale = 'dv'; + $dv->slug = 'dv'; + $dv->text_direction = 'rtl'; + + $dzo = new GP_Locale(); + $dzo->english_name = 'Dzongkha'; + $dzo->native_name = 'རྫོང་ཁ'; + $dzo->lang_code_iso_639_1 = 'dz'; + $dzo->lang_code_iso_639_2 = 'dzo'; + $dzo->country_code = 'bt'; + $dzo->wp_locale = 'dzo'; + $dzo->slug = 'dzo'; + $dzo->nplurals = 1; + $dzo->plural_expression = '0'; + + $ewe = new GP_Locale(); + $ewe->english_name = 'Ewe'; + $ewe->native_name = 'Eʋegbe'; + $ewe->lang_code_iso_639_1 = 'ee'; + $ewe->lang_code_iso_639_2 = 'ewe'; + $ewe->lang_code_iso_639_3 = 'ewe'; + $ewe->country_code = 'gh'; + $ewe->wp_locale = 'ewe'; + $ewe->slug = 'ee'; + + $el_po = new GP_Locale(); + $el_po->english_name = 'Greek (Polytonic)'; + $el_po->native_name = 'Greek (Polytonic)'; // TODO + $el_po->country_code = 'gr'; + $el_po->slug = 'el-po'; + + $el = new GP_Locale(); + $el->english_name = 'Greek'; + $el->native_name = 'Ελληνικά'; + $el->lang_code_iso_639_1 = 'el'; + $el->lang_code_iso_639_2 = 'ell'; + $el->country_code = 'gr'; + $el->wp_locale = 'el'; + $el->slug = 'el'; + $el->google_code = 'el'; + $el->facebook_locale = 'el_GR'; + + $emoji = new GP_Locale(); + $emoji->english_name = 'Emoji'; + $emoji->native_name = "\xf0\x9f\x8c\x8f\xf0\x9f\x8c\x8d\xf0\x9f\x8c\x8e (Emoji)"; + $emoji->lang_code_iso_639_2 = 'art'; + $emoji->wp_locale = 'art_xemoji'; + $emoji->slug = 'art-xemoji'; + $emoji->nplurals = 1; + $emoji->plural_expression = '0'; + + $en = new GP_Locale(); + $en->english_name = 'English'; + $en->native_name = 'English'; + $en->lang_code_iso_639_1 = 'en'; + $en->country_code = 'us'; + $en->wp_locale = 'en_US'; + $en->slug = 'en'; + $en->google_code = 'en'; + $en->facebook_locale = 'en_US'; + + $en_au = new GP_Locale(); + $en_au->english_name = 'English (Australia)'; + $en_au->native_name = 'English (Australia)'; + $en_au->lang_code_iso_639_1 = 'en'; + $en_au->lang_code_iso_639_2 = 'eng'; + $en_au->lang_code_iso_639_3 = 'eng'; + $en_au->country_code = 'au'; + $en_au->wp_locale = 'en_AU'; + $en_au->slug = 'en-au'; + $en_au->google_code = 'en'; + + $en_ca = new GP_Locale(); + $en_ca->english_name = 'English (Canada)'; + $en_ca->native_name = 'English (Canada)'; + $en_ca->lang_code_iso_639_1 = 'en'; + $en_ca->lang_code_iso_639_2 = 'eng'; + $en_ca->lang_code_iso_639_3 = 'eng'; + $en_ca->country_code = 'ca'; + $en_ca->wp_locale = 'en_CA'; + $en_ca->slug = 'en-ca'; + $en_ca->google_code = 'en'; + + $en_gb = new GP_Locale(); + $en_gb->english_name = 'English (UK)'; + $en_gb->native_name = 'English (UK)'; + $en_gb->lang_code_iso_639_1 = 'en'; + $en_gb->lang_code_iso_639_2 = 'eng'; + $en_gb->lang_code_iso_639_3 = 'eng'; + $en_gb->country_code = 'gb'; + $en_gb->wp_locale = 'en_GB'; + $en_gb->slug = 'en-gb'; + $en_gb->google_code = 'en'; + $en_gb->facebook_locale = 'en_GB'; + + $en_nz = new GP_Locale(); + $en_nz->english_name = 'English (New Zealand)'; + $en_nz->native_name = 'English (New Zealand)'; + $en_nz->lang_code_iso_639_1 = 'en'; + $en_nz->lang_code_iso_639_2 = 'eng'; + $en_nz->lang_code_iso_639_3 = 'eng'; + $en_nz->country_code = 'nz'; + $en_nz->wp_locale = 'en_NZ'; + $en_nz->slug = 'en-nz'; + $en_nz->google_code = 'en'; + + $en_za = new GP_Locale(); + $en_za->english_name = 'English (South Africa)'; + $en_za->native_name = 'English (South Africa)'; + $en_za->lang_code_iso_639_1 = 'en'; + $en_za->lang_code_iso_639_2 = 'eng'; + $en_za->lang_code_iso_639_3 = 'eng'; + $en_za->country_code = 'za'; + $en_za->wp_locale = 'en_ZA'; + $en_za->slug = 'en-za'; + $en_za->google_code = 'en'; + + $eo = new GP_Locale(); + $eo->english_name = 'Esperanto'; + $eo->native_name = 'Esperanto'; + $eo->lang_code_iso_639_1 = 'eo'; + $eo->lang_code_iso_639_2 = 'epo'; + $eo->wp_locale = 'eo'; + $eo->slug = 'eo'; + $eo->google_code = 'eo'; + $eo->facebook_locale = 'eo_EO'; + + $es = new GP_Locale(); + $es->english_name = 'Spanish (Spain)'; + $es->native_name = 'Español'; + $es->lang_code_iso_639_1 = 'es'; + $es->lang_code_iso_639_2 = 'spa'; + $es->lang_code_iso_639_3 = 'spa'; + $es->country_code = 'es'; + $es->wp_locale = 'es_ES'; + $es->slug = 'es'; + $es->google_code = 'es'; + $es->facebook_locale = 'es_ES'; + + $es_ar = new GP_Locale(); + $es_ar->english_name = 'Spanish (Argentina)'; + $es_ar->native_name = 'Español de Argentina'; + $es_ar->lang_code_iso_639_1 = 'es'; + $es_ar->lang_code_iso_639_2 = 'spa'; + $es_ar->lang_code_iso_639_3 = 'spa'; + $es_ar->country_code = 'ar'; + $es_ar->wp_locale = 'es_AR'; + $es_ar->slug = 'es-ar'; + $es_ar->google_code = 'es'; + $es_ar->facebook_locale = 'es_LA'; + + $es_cl = new GP_Locale(); + $es_cl->english_name = 'Spanish (Chile)'; + $es_cl->native_name = 'Español de Chile'; + $es_cl->lang_code_iso_639_1 = 'es'; + $es_cl->lang_code_iso_639_2 = 'spa'; + $es_cl->lang_code_iso_639_3 = 'spa'; + $es_cl->country_code = 'cl'; + $es_cl->wp_locale = 'es_CL'; + $es_cl->slug = 'es-cl'; + $es_cl->google_code = 'es'; + $es_cl->facebook_locale = 'es_CL'; + + $es_co = new GP_Locale(); + $es_co->english_name = 'Spanish (Colombia)'; + $es_co->native_name = 'Español de Colombia'; + $es_co->lang_code_iso_639_1 = 'es'; + $es_co->lang_code_iso_639_2 = 'spa'; + $es_co->lang_code_iso_639_3 = 'spa'; + $es_co->country_code = 'co'; + $es_co->wp_locale = 'es_CO'; + $es_co->slug = 'es-co'; + $es_co->google_code = 'es'; + $es_co->facebook_locale = 'es_CO'; + + $es_cr = new GP_Locale(); + $es_cr->english_name = 'Spanish (Costa Rica)'; + $es_cr->native_name = 'Español de Costa Rica'; + $es_cr->lang_code_iso_639_1 = 'es'; + $es_cr->lang_code_iso_639_2 = 'spa'; + $es_cr->lang_code_iso_639_3 = 'spa'; + $es_cr->country_code = 'cr'; + $es_cr->wp_locale = 'es_CR'; + $es_cr->slug = 'es-cr'; + + $es_gt = new GP_Locale(); + $es_gt->english_name = 'Spanish (Guatemala)'; + $es_gt->native_name = 'Español de Guatemala'; + $es_gt->lang_code_iso_639_1 = 'es'; + $es_gt->lang_code_iso_639_2 = 'spa'; + $es_gt->lang_code_iso_639_3 = 'spa'; + $es_gt->country_code = 'gt'; + $es_gt->wp_locale = 'es_GT'; + $es_gt->slug = 'es-gt'; + $es_gt->google_code = 'es'; + $es_gt->facebook_locale = 'es_LA'; + + $es_mx = new GP_Locale(); + $es_mx->english_name = 'Spanish (Mexico)'; + $es_mx->native_name = 'Español de México'; + $es_mx->lang_code_iso_639_1 = 'es'; + $es_mx->lang_code_iso_639_2 = 'spa'; + $es_mx->lang_code_iso_639_3 = 'spa'; + $es_mx->country_code = 'mx'; + $es_mx->wp_locale = 'es_MX'; + $es_mx->slug = 'es-mx'; + $es_mx->google_code = 'es'; + $es_mx->facebook_locale = 'es_MX'; + + $es_pe = new GP_Locale(); + $es_pe->english_name = 'Spanish (Peru)'; + $es_pe->native_name = 'Español de Perú'; + $es_pe->lang_code_iso_639_1 = 'es'; + $es_pe->lang_code_iso_639_2 = 'spa'; + $es_pe->lang_code_iso_639_3 = 'spa'; + $es_pe->country_code = 'pe'; + $es_pe->wp_locale = 'es_PE'; + $es_pe->slug = 'es-pe'; + $es_pe->google_code = 'es'; + $es_pe->facebook_locale = 'es_LA'; + + $es_pr = new GP_Locale(); + $es_pr->english_name = 'Spanish (Puerto Rico)'; + $es_pr->native_name = 'Español de Puerto Rico'; + $es_pr->lang_code_iso_639_1 = 'es'; + $es_pr->lang_code_iso_639_2 = 'spa'; + $es_pr->lang_code_iso_639_3 = 'spa'; + $es_pr->country_code = 'pr'; + $es_pr->wp_locale = 'es_PR'; + $es_pr->slug = 'es-pr'; + $es_pr->google_code = 'es'; + $es_pr->facebook_locale = 'es_LA'; + + $es_us = new GP_Locale(); + $es_us->english_name = 'Spanish (US)'; + $es_us->native_name = 'Español de los Estados Unidos'; + $es_us->lang_code_iso_639_1 = 'es'; + $es_us->lang_code_iso_639_2 = 'spa'; + $es_us->lang_code_iso_639_3 = 'spa'; + $es_us->country_code = 'us'; + $es_us->slug = 'es-us'; + + $es_ve = new GP_Locale(); + $es_ve->english_name = 'Spanish (Venezuela)'; + $es_ve->native_name = 'Español de Venezuela'; + $es_ve->lang_code_iso_639_1 = 'es'; + $es_ve->lang_code_iso_639_2 = 'spa'; + $es_ve->lang_code_iso_639_3 = 'spa'; + $es_ve->country_code = 've'; + $es_ve->wp_locale = 'es_VE'; + $es_ve->slug = 'es-ve'; + $es_ve->google_code = 'es'; + $es_ve->facebook_locale = 'es_VE'; + + $et = new GP_Locale(); + $et->english_name = 'Estonian'; + $et->native_name = 'Eesti'; + $et->lang_code_iso_639_1 = 'et'; + $et->lang_code_iso_639_2 = 'est'; + $et->country_code = 'ee'; + $et->wp_locale = 'et'; + $et->slug = 'et'; + $et->google_code = 'et'; + $et->facebook_locale = 'et_EE'; + + $eu = new GP_Locale(); + $eu->english_name = 'Basque'; + $eu->native_name = 'Euskara'; + $eu->lang_code_iso_639_1 = 'eu'; + $eu->lang_code_iso_639_2 = 'eus'; + $eu->country_code = 'es'; + $eu->wp_locale = 'eu'; + $eu->slug = 'eu'; + $eu->google_code = 'eu'; + $eu->facebook_locale = 'eu_ES'; + + $fa = new GP_Locale(); + $fa->english_name = 'Persian'; + $fa->native_name = 'فارسی'; + $fa->lang_code_iso_639_1 = 'fa'; + $fa->lang_code_iso_639_2 = 'fas'; + $fa->wp_locale = 'fa_IR'; + $fa->slug = 'fa'; + $fa->nplurals = 1; + $fa->plural_expression = '0'; + $fa->text_direction = 'rtl'; + $fa->google_code = 'fa'; + $fa->facebook_locale = 'fa_IR'; + + $fa_af = new GP_Locale(); + $fa_af->english_name = 'Persian (Afghanistan)'; + $fa_af->native_name = '(فارسی (افغانستان'; + $fa_af->lang_code_iso_639_1 = 'fa'; + $fa_af->lang_code_iso_639_2 = 'fas'; + $fa_af->wp_locale = 'fa_AF'; + $fa_af->slug = 'fa-af'; + $fa_af->nplurals = 1; + $fa_af->plural_expression = '0'; + $fa_af->text_direction = 'rtl'; + $fa_af->google_code = 'fa'; + + $ff_sn = new GP_Locale(); + $ff_sn->english_name = 'Fulah'; + $ff_sn->native_name = 'Pulaar'; + $ff_sn->lang_code_iso_639_1 = 'ff'; + $ff_sn->lang_code_iso_639_2 = 'fuc'; + $ff_sn->country_code = 'sn'; + $ff_sn->wp_locale = 'fuc'; + $ff_sn->slug = 'fuc'; + $ff_sn->plural_expression = 'n!=1'; + + $fi = new GP_Locale(); + $fi->english_name = 'Finnish'; + $fi->native_name = 'Suomi'; + $fi->lang_code_iso_639_1 = 'fi'; + $fi->lang_code_iso_639_2 = 'fin'; + $fi->country_code = 'fi'; + $fi->wp_locale = 'fi'; + $fi->slug = 'fi'; + $fi->google_code = 'fi'; + $fi->facebook_locale = 'fi_FI'; + + $fj = new GP_Locale(); + $fj->english_name = 'Fijian'; + $fj->native_name = 'Vosa Vakaviti'; + $fj->lang_code_iso_639_1 = 'fj'; + $fj->lang_code_iso_639_2 = 'fij'; + $fj->country_code = 'fj'; + $fj->slug = 'fj'; + + $fo = new GP_Locale(); + $fo->english_name = 'Faroese'; + $fo->native_name = 'Føroyskt'; + $fo->lang_code_iso_639_1 = 'fo'; + $fo->lang_code_iso_639_2 = 'fao'; + $fo->country_code = 'fo'; + $fo->wp_locale = 'fo'; + $fo->slug = 'fo'; + $fo->facebook_locale = 'fo_FO'; + + $fr = new GP_Locale(); + $fr->english_name = 'French (France)'; + $fr->native_name = 'Français'; + $fr->lang_code_iso_639_1 = 'fr'; + $fr->country_code = 'fr'; + $fr->wp_locale = 'fr_FR'; + $fr->slug = 'fr'; + $fr->nplurals = 2; + $fr->plural_expression = 'n > 1'; + $fr->google_code = 'fr'; + $fr->facebook_locale = 'fr_FR'; + + $fr_be = new GP_Locale(); + $fr_be->english_name = 'French (Belgium)'; + $fr_be->native_name = 'Français de Belgique'; + $fr_be->lang_code_iso_639_1 = 'fr'; + $fr_be->lang_code_iso_639_2 = 'fra'; + $fr_be->country_code = 'be'; + $fr_be->wp_locale = 'fr_BE'; + $fr_be->slug = 'fr-be'; + + $fr_ca = new GP_Locale(); + $fr_ca->english_name = 'French (Canada)'; + $fr_ca->native_name = 'Français du Canada'; + $fr_ca->lang_code_iso_639_1 = 'fr'; + $fr_ca->lang_code_iso_639_2 = 'fra'; + $fr_ca->country_code = 'ca'; + $fr_ca->wp_locale = 'fr_CA'; + $fr_ca->slug = 'fr-ca'; + $fr_ca->facebook_locale = 'fr_CA'; + + $fr_ch = new GP_Locale(); + $fr_ch->english_name = 'French (Switzerland)'; + $fr_ch->native_name = 'Français de Suisse'; + $fr_ch->lang_code_iso_639_1 = 'fr'; + $fr_ch->lang_code_iso_639_2 = 'fra'; + $fr_ch->country_code = 'ch'; + $fr_ch->slug = 'fr-ch'; + + $frp = new GP_Locale(); + $frp->english_name = 'Arpitan'; + $frp->native_name = 'Arpitan'; + $frp->lang_code_iso_639_3 = 'frp'; + $frp->country_code = 'fr'; + $frp->wp_locale = 'frp'; + $frp->slug = 'frp'; + $frp->nplurals = 2; + $frp->plural_expression = 'n > 1'; + + $fur = new GP_Locale(); + $fur->english_name = 'Friulian'; + $fur->native_name = 'Friulian'; + $fur->lang_code_iso_639_2 = 'fur'; + $fur->lang_code_iso_639_3 = 'fur'; + $fur->country_code = 'it'; + $fur->wp_locale = 'fur'; + $fur->slug = 'fur'; + + $fy = new GP_Locale(); + $fy->english_name = 'Frisian'; + $fy->native_name = 'Frysk'; + $fy->lang_code_iso_639_1 = 'fy'; + $fy->lang_code_iso_639_2 = 'fry'; + $fy->country_code = 'nl'; + $fy->wp_locale = 'fy'; + $fy->slug = 'fy'; + $fy->facebook_locale = 'fy_NL'; + + $ga = new GP_Locale(); + $ga->english_name = 'Irish'; + $ga->native_name = 'Gaelige'; + $ga->lang_code_iso_639_1 = 'ga'; + $ga->lang_code_iso_639_2 = 'gle'; + $ga->country_code = 'ie'; + $ga->slug = 'ga'; + $ga->wp_locale = 'ga'; + $ga->nplurals = 5; + $ga->plural_expression = 'n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4'; + $ga->google_code = 'ga'; + $ga->facebook_locale = 'ga_IE'; + + $gd = new GP_Locale(); + $gd->english_name = 'Scottish Gaelic'; + $gd->native_name = 'Gàidhlig'; + $gd->lang_code_iso_639_1 = 'gd'; + $gd->lang_code_iso_639_2 = 'gla'; + $gd->lang_code_iso_639_3 = 'gla'; + $gd->country_code = 'gb'; + $gd->wp_locale = 'gd'; + $gd->slug = 'gd'; + $gd->nplurals = 4; + $gd->plural_expression = '(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3'; + $gd->google_code = 'gd'; + + $gl = new GP_Locale(); + $gl->english_name = 'Galician'; + $gl->native_name = 'Galego'; + $gl->lang_code_iso_639_1 = 'gl'; + $gl->lang_code_iso_639_2 = 'glg'; + $gl->country_code = 'es'; + $gl->wp_locale = 'gl_ES'; + $gl->slug = 'gl'; + $gl->google_code = 'gl'; + $gl->facebook_locale = 'gl_ES'; + + $gn = new GP_Locale(); + $gn->english_name = 'Guaraní'; + $gn->native_name = 'Avañe\'ẽ'; + $gn->lang_code_iso_639_1 = 'gn'; + $gn->lang_code_iso_639_2 = 'grn'; + $gn->wp_locale = 'gn'; + $gn->slug = 'gn'; + + $gsw = new GP_Locale(); + $gsw->english_name = 'Swiss German'; + $gsw->native_name = 'Schwyzerdütsch'; + $gsw->lang_code_iso_639_2 = 'gsw'; + $gsw->lang_code_iso_639_3 = 'gsw'; + $gsw->country_code = 'ch'; + $gsw->wp_locale = 'gsw'; + $gsw->slug = 'gsw'; + + $gu = new GP_Locale(); + $gu->english_name = 'Gujarati'; + $gu->native_name = 'ગુજરાતી'; + $gu->lang_code_iso_639_1 = 'gu'; + $gu->lang_code_iso_639_2 = 'guj'; + $gu->wp_locale = 'gu'; + $gu->slug = 'gu'; + $gu->google_code = 'gu'; + $gu->facebook_locale = 'gu_IN'; + + $ha = new GP_Locale(); + $ha->english_name = 'Hausa (Arabic)'; + $ha->native_name = 'هَوُسَ'; + $ha->lang_code_iso_639_1 = 'ha'; + $ha->lang_code_iso_639_2 = 'hau'; + $ha->slug = 'ha'; + $ha->text_direction = 'rtl'; + $ha->google_code = 'ha'; + + $hat = new GP_Locale(); + $hat->english_name = 'Haitian Creole'; + $hat->native_name = 'Kreyol ayisyen'; + $hat->lang_code_iso_639_1 = 'ht'; + $hat->lang_code_iso_639_2 = 'hat'; + $hat->lang_code_iso_639_3 = 'hat'; + $hat->country_code = 'ht'; + $hat->wp_locale = 'hat'; + $hat->slug = 'hat'; + + $hau = new GP_Locale(); + $hau->english_name = 'Hausa'; + $hau->native_name = 'Harshen Hausa'; + $hau->lang_code_iso_639_1 = 'ha'; + $hau->lang_code_iso_639_2 = 'hau'; + $hau->lang_code_iso_639_3 = 'hau'; + $hau->country_code = 'ng'; + $hau->wp_locale = 'hau'; + $hau->slug = 'hau'; + $hau->google_code = 'ha'; + $hau->facebook_locale = 'ha_NG'; + + $haw = new GP_Locale(); + $haw->english_name = 'Hawaiian'; + $haw->native_name = 'Ōlelo Hawaiʻi'; + $haw->lang_code_iso_639_2 = 'haw'; + $haw->country_code = 'us'; + $haw->wp_locale = 'haw_US'; + $haw->slug = 'haw'; + + $haz = new GP_Locale(); + $haz->english_name = 'Hazaragi'; + $haz->native_name = 'هزاره گی'; + $haz->lang_code_iso_639_3 = 'haz'; + $haz->country_code = 'af'; + $haz->wp_locale = 'haz'; + $haz->slug = 'haz'; + $haz->text_direction = 'rtl'; + + $he = new GP_Locale(); + $he->english_name = 'Hebrew'; + $he->native_name = 'עִבְרִית'; + $he->lang_code_iso_639_1 = 'he'; + $he->country_code = 'il'; + $he->wp_locale = 'he_IL'; + $he->slug = 'he'; + $he->text_direction = 'rtl'; + $he->google_code = 'iw'; + $he->facebook_locale = 'he_IL'; + + $hi = new GP_Locale(); + $hi->english_name = 'Hindi'; + $hi->native_name = 'हिन्दी'; + $hi->lang_code_iso_639_1 = 'hi'; + $hi->lang_code_iso_639_2 = 'hin'; + $hi->country_code = 'in'; + $hi->wp_locale = 'hi_IN'; + $hi->slug = 'hi'; + $hi->google_code = 'hi'; + $hi->facebook_locale = 'hi_IN'; + + $hr = new GP_Locale(); + $hr->english_name = 'Croatian'; + $hr->native_name = 'Hrvatski'; + $hr->lang_code_iso_639_1 = 'hr'; + $hr->lang_code_iso_639_2 = 'hrv'; + $hr->country_code = 'hr'; + $hr->wp_locale = 'hr'; + $hr->slug = 'hr'; + $hr->nplurals = 3; + $hr->plural_expression = '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'; + $hr->google_code = 'hr'; + $hr->facebook_locale = 'hr_HR'; + + $hu = new GP_Locale(); + $hu->english_name = 'Hungarian'; + $hu->native_name = 'Magyar'; + $hu->lang_code_iso_639_1 = 'hu'; + $hu->lang_code_iso_639_2 = 'hun'; + $hu->country_code = 'hu'; + $hu->wp_locale = 'hu_HU'; + $hu->slug = 'hu'; + $hu->google_code = 'hu'; + $hu->facebook_locale = 'hu_HU'; + + $hy = new GP_Locale(); + $hy->english_name = 'Armenian'; + $hy->native_name = 'Հայերեն'; + $hy->lang_code_iso_639_1 = 'hy'; + $hy->lang_code_iso_639_2 = 'hye'; + $hy->country_code = 'am'; + $hy->wp_locale = 'hy'; + $hy->slug = 'hy'; + $hy->google_code = 'hy'; + $hy->facebook_locale = 'hy_AM'; + + $ia = new GP_Locale(); + $ia->english_name = 'Interlingua'; + $ia->native_name = 'Interlingua'; + $ia->lang_code_iso_639_1 = 'ia'; + $ia->lang_code_iso_639_2 = 'ina'; + $ia->slug = 'ia'; + + $id = new GP_Locale(); + $id->english_name = 'Indonesian'; + $id->native_name = 'Bahasa Indonesia'; + $id->lang_code_iso_639_1 = 'id'; + $id->lang_code_iso_639_2 = 'ind'; + $id->country_code = 'id'; + $id->wp_locale = 'id_ID'; + $id->slug = 'id'; + $id->nplurals = 2; + $id->plural_expression = 'n > 1'; + $id->google_code = 'id'; + $id->facebook_locale = 'id_ID'; + + $ido = new GP_Locale(); + $ido->english_name = 'Ido'; + $ido->native_name = 'Ido'; + $ido->lang_code_iso_639_1 = 'io'; + $ido->lang_code_iso_639_2 = 'ido'; + $ido->lang_code_iso_639_3 = 'ido'; + $ido->wp_locale = 'ido'; + $ido->slug = 'ido'; + + $ike = new GP_Locale(); + $ike->english_name = 'Inuktitut'; + $ike->native_name = 'ᐃᓄᒃᑎᑐᑦ'; + $ike->lang_code_iso_639_1 = 'iu'; + $ike->lang_code_iso_639_2 = 'iku'; + $ike->country_code = 'ca'; + $ike->slug = 'ike'; + + $ilo = new GP_Locale(); + $ilo->english_name = 'Iloko'; + $ilo->native_name = 'Pagsasao nga Iloko'; + $ilo->lang_code_iso_639_2 = 'ilo'; + $ilo->country_code = 'ph'; + $ilo->slug = 'ilo'; + + $is = new GP_Locale(); + $is->english_name = 'Icelandic'; + $is->native_name = 'Íslenska'; + $is->lang_code_iso_639_1 = 'is'; + $is->lang_code_iso_639_2 = 'isl'; + $is->country_code = 'is'; + $is->slug = 'is'; + $is->wp_locale = 'is_IS'; + $is->nplurals = 2; + $is->plural_expression = '(n % 100 != 1 && n % 100 != 21 && n % 100 != 31 && n % 100 != 41 && n % 100 != 51 && n % 100 != 61 && n % 100 != 71 && n % 100 != 81 && n % 100 != 91)'; + $is->google_code = 'is'; + $is->facebook_locale = 'is_IS'; + + $it = new GP_Locale(); + $it->english_name = 'Italian'; + $it->native_name = 'Italiano'; + $it->lang_code_iso_639_1 = 'it'; + $it->lang_code_iso_639_2 = 'ita'; + $it->country_code = 'it'; + $it->wp_locale = 'it_IT'; + $it->slug = 'it'; + $it->google_code = 'it'; + $it->facebook_locale = 'it_IT'; + + $ja = new GP_Locale(); + $ja->english_name = 'Japanese'; + $ja->native_name = '日本語'; + $ja->lang_code_iso_639_1 = 'ja'; + $ja->country_code = 'jp'; + $ja->wp_locale = 'ja'; + $ja->slug = 'ja'; + $ja->google_code = 'ja'; + $ja->facebook_locale = 'ja_JP'; + $ja->nplurals = 1; + $ja->plural_expression = '0'; + + $jv = new GP_Locale(); + $jv->english_name = 'Javanese'; + $jv->native_name = 'Basa Jawa'; + $jv->lang_code_iso_639_1 = 'jv'; + $jv->lang_code_iso_639_2 = 'jav'; + $jv->country_code = 'id'; + $jv->wp_locale = 'jv_ID'; + $jv->slug = 'jv'; + $jv->google_code = 'jw'; + $jv->facebook_locale = 'jv_ID'; + + $ka = new GP_Locale(); + $ka->english_name = 'Georgian'; + $ka->native_name = 'ქართული'; + $ka->lang_code_iso_639_1 = 'ka'; + $ka->lang_code_iso_639_2 = 'kat'; + $ka->country_code = 'ge'; + $ka->wp_locale = 'ka_GE'; + $ka->slug = 'ka'; + $ka->nplurals = 1; + $ka->plural_expression = '0'; + $ka->google_code = 'ka'; + $ka->facebook_locale = 'ka_GE'; + + $kab = new GP_Locale(); + $kab->english_name = 'Kabyle'; + $kab->native_name = 'Taqbaylit'; + $kab->lang_code_iso_639_2 = 'kab'; + $kab->lang_code_iso_639_3 = 'kab'; + $kab->country_code = 'dz'; + $kab->wp_locale = 'kab'; + $kab->slug = 'kab'; + $kab->nplurals = 2; + $kab->plural_expression = '(n > 1)'; + + $kal = new GP_Locale(); + $kal->english_name = 'Greenlandic'; + $kal->native_name = 'Kalaallisut'; + $kal->lang_code_iso_639_1 = 'kl'; + $kal->lang_code_iso_639_2 = 'kal'; + $kal->lang_code_iso_639_3 = 'kal'; + $kal->country_code = 'gl'; + $kal->wp_locale = 'kal'; + $kal->slug = 'kal'; + + $kin = new GP_Locale(); + $kin->english_name = 'Kinyarwanda'; + $kin->native_name = 'Ikinyarwanda'; + $kin->lang_code_iso_639_1 = 'rw'; + $kin->lang_code_iso_639_2 = 'kin'; + $kin->lang_code_iso_639_3 = 'kin'; + $kin->wp_locale = 'kin'; + $kin->country_code = 'rw'; + $kin->slug = 'kin'; + $kin->facebook_locale = 'rw_RW'; + + $kk = new GP_Locale(); + $kk->english_name = 'Kazakh'; + $kk->native_name = 'Қазақ тілі'; + $kk->lang_code_iso_639_1 = 'kk'; + $kk->lang_code_iso_639_2 = 'kaz'; + $kk->country_code = 'kz'; + $kk->wp_locale = 'kk'; + $kk->slug = 'kk'; + $kk->google_code = 'kk'; + $kk->facebook_locale = 'kk_KZ'; + + $km = new GP_Locale(); + $km->english_name = 'Khmer'; + $km->native_name = 'ភាសាខ្មែរ'; + $km->lang_code_iso_639_1 = 'km'; + $km->lang_code_iso_639_2 = 'khm'; + $km->country_code = 'kh'; + $km->wp_locale = 'km'; + $km->slug = 'km'; + $km->nplurals = 1; + $km->plural_expression = '0'; + $km->google_code = 'km'; + $km->facebook_locale = 'km_KH'; + + $kmr = new GP_Locale(); + $kmr->english_name = 'Kurdish (Kurmanji)'; + $kmr->native_name = 'Kurdî'; + $kmr->lang_code_iso_639_1 = 'ku'; + $kmr->lang_code_iso_639_3 = 'kmr'; + $kmr->country_code = 'tr'; + $kmr->slug = 'kmr'; + $kmr->facebook_locale = 'ku_TR'; + + $kn = new GP_Locale(); + $kn->english_name = 'Kannada'; + $kn->native_name = 'ಕನ್ನಡ'; + $kn->lang_code_iso_639_1 = 'kn'; + $kn->lang_code_iso_639_2 = 'kan'; + $kn->country_code = 'in'; + $kn->wp_locale = 'kn'; + $kn->slug = 'kn'; + $kn->google_code = 'kn'; + $kn->facebook_locale = 'kn_IN'; + + $ko = new GP_Locale(); + $ko->english_name = 'Korean'; + $ko->native_name = '한국어'; + $ko->lang_code_iso_639_1 = 'ko'; + $ko->lang_code_iso_639_2 = 'kor'; + $ko->country_code = 'kr'; + $ko->wp_locale = 'ko_KR'; + $ko->slug = 'ko'; + $ko->nplurals = 1; + $ko->plural_expression = '0'; + $ko->google_code = 'ko'; + $ko->facebook_locale = 'ko_KR'; + + $ks = new GP_Locale(); + $ks->english_name = 'Kashmiri'; + $ks->native_name = 'कश्मीरी'; + $ks->lang_code_iso_639_1 = 'ks'; + $ks->lang_code_iso_639_2 = 'kas'; + $ks->slug = 'ks'; + + $kir = new GP_Locale(); + $kir->english_name = 'Kyrgyz'; + $kir->native_name = 'Кыргызча'; + $kir->lang_code_iso_639_1 = 'ky'; + $kir->lang_code_iso_639_2 = 'kir'; + $kir->lang_code_iso_639_3 = 'kir'; + $kir->country_code = 'kg'; + $kir->wp_locale = 'kir'; + $kir->slug = 'kir'; + $kir->nplurals = 1; + $kir->plural_expression = '0'; + $kir->google_code = 'ky'; + + $la = new GP_Locale(); + $la->english_name = 'Latin'; + $la->native_name = 'Latine'; + $la->lang_code_iso_639_1 = 'la'; + $la->lang_code_iso_639_2 = 'lat'; + $la->slug = 'la'; + $la->google_code = 'la'; + $la->facebook_locale = 'la_VA'; + + $lb = new GP_Locale(); + $lb->english_name = 'Luxembourgish'; + $lb->native_name = 'Lëtzebuergesch'; + $lb->lang_code_iso_639_1 = 'lb'; + $lb->country_code = 'lu'; + $lb->wp_locale = 'lb_LU'; + $lb->slug = 'lb'; + + $li = new GP_Locale(); + $li->english_name = 'Limburgish'; + $li->native_name = 'Limburgs'; + $li->lang_code_iso_639_1 = 'li'; + $li->lang_code_iso_639_2 = 'lim'; + $li->lang_code_iso_639_3 = 'lim'; + $li->country_code = 'nl'; + $li->wp_locale = 'li'; + $li->slug = 'li'; + $li->facebook_locale = 'li_NL'; + + $lin = new GP_Locale(); + $lin->english_name = 'Lingala'; + $lin->native_name = 'Ngala'; + $lin->lang_code_iso_639_1 = 'ln'; + $lin->lang_code_iso_639_2 = 'lin'; + $lin->country_code = 'cd'; + $lin->wp_locale = 'lin'; + $lin->slug = 'lin'; + $lin->nplurals = 2; + $lin->plural_expression = 'n>1'; + $lin->facebook_locale = 'ln_CD'; + + $lmo = new GP_Locale(); + $lmo->english_name = 'Lombard'; + $lmo->native_name = 'Lombardo'; + $lmo->lang_code_iso_639_3 = 'lmo'; + $lmo->country_code = 'it'; + $lmo->wp_locale = 'lmo'; + $lmo->slug = 'lmo'; + + $lo = new GP_Locale(); + $lo->english_name = 'Lao'; + $lo->native_name = 'ພາສາລາວ'; + $lo->lang_code_iso_639_1 = 'lo'; + $lo->lang_code_iso_639_2 = 'lao'; + $lo->country_code = 'LA'; + $lo->wp_locale = 'lo'; + $lo->slug = 'lo'; + $lo->nplurals = 1; + $lo->plural_expression = '0'; + $lo->google_code = 'lo'; + $lo->facebook_locale = 'lo_LA'; + + $lt = new GP_Locale(); + $lt->english_name = 'Lithuanian'; + $lt->native_name = 'Lietuvių kalba'; + $lt->lang_code_iso_639_1 = 'lt'; + $lt->lang_code_iso_639_2 = 'lit'; + $lt->country_code = 'lt'; + $lt->wp_locale = 'lt_LT'; + $lt->slug = 'lt'; + $lt->nplurals = 3; + $lt->plural_expression = '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2)'; + $lt->google_code = 'lt'; + $lt->facebook_locale = 'lt_LT'; + + $lug = new GP_Locale(); + $lug->english_name = 'Luganda'; + $lug->native_name = 'Oluganda'; + $lug->lang_code_iso_639_1 = 'lg'; + $lug->lang_code_iso_639_2 = 'lug'; + $lug->lang_code_iso_639_3 = 'lug'; + $lug->country_code = 'ug'; + $lug->wp_locale = 'lug'; + $lug->slug = 'lug'; + + $lv = new GP_Locale(); + $lv->english_name = 'Latvian'; + $lv->native_name = 'Latviešu valoda'; + $lv->lang_code_iso_639_1 = 'lv'; + $lv->lang_code_iso_639_2 = 'lav'; + $lv->country_code = 'lv'; + $lv->wp_locale = 'lv'; + $lv->slug = 'lv'; + $lv->nplurals = 3; + $lv->plural_expression = '(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2)'; + $lv->google_code = 'lv'; + $lv->facebook_locale = 'lv_LV'; + + $me = new GP_Locale(); + $me->english_name = 'Montenegrin'; + $me->native_name = 'Crnogorski jezik'; + $me->lang_code_iso_639_1 = 'me'; + $me->country_code = 'me'; + $me->wp_locale = 'me_ME'; + $me->slug = 'me'; + $me->nplurals = 3; + $me->plural_expression = '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'; + + $mfe = new GP_Locale(); + $mfe->english_name = 'Mauritian Creole'; + $mfe->native_name = 'Kreol Morisien'; + $mfe->lang_code_iso_639_3 = 'mfe'; + $mfe->country_code = 'mu'; + $mfe->wp_locale = 'mfe'; + $mfe->slug = 'mfe'; + $mfe->nplurals = 1; + $mfe->plural_expression = '0'; + + $mg = new GP_Locale(); + $mg->english_name = 'Malagasy'; + $mg->native_name = 'Malagasy'; + $mg->lang_code_iso_639_1 = 'mg'; + $mg->lang_code_iso_639_2 = 'mlg'; + $mg->country_code = 'mg'; + $mg->wp_locale = 'mg_MG'; + $mg->slug = 'mg'; + $mg->google_code = 'mg'; + $mg->facebook_locale = 'mg_MG'; + + $mhr = new GP_Locale(); + $mhr->english_name = 'Mari (Meadow)'; + $mhr->native_name = 'Олык марий'; + $mhr->lang_code_iso_639_3 = 'mhr'; + $mhr->country_code = 'ru'; + $mhr->slug = 'mhr'; + + $mk = new GP_Locale(); + $mk->english_name = 'Macedonian'; + $mk->native_name = 'Македонски јазик'; + $mk->lang_code_iso_639_1 = 'mk'; + $mk->lang_code_iso_639_2 = 'mkd'; + $mk->country_code = 'mk'; + $mk->wp_locale = 'mk_MK'; + $mk->slug = 'mk'; + $mk->nplurals = 2; + $mk->plural_expression = 'n==1 || n%10==1 ? 0 : 1'; + $mk->google_code = 'mk'; + $mk->facebook_locale = 'mk_MK'; + + $ml = new GP_Locale(); + $ml->english_name = 'Malayalam'; + $ml->native_name = 'മലയാളം'; + $ml->lang_code_iso_639_1 = 'ml'; + $ml->lang_code_iso_639_2 = 'mal'; + $ml->country_code = 'in'; + $ml->wp_locale = 'ml_IN'; + $ml->slug = 'ml'; + $ml->google_code = 'ml'; + $ml->facebook_locale = 'ml_IN'; + + $mlt = new GP_Locale(); + $mlt->english_name = 'Maltese'; + $mlt->native_name = 'Malti'; + $mlt->lang_code_iso_639_1 = 'mt'; + $mlt->lang_code_iso_639_2 = 'mlt'; + $mlt->lang_code_iso_639_3 = 'mlt'; + $mlt->country_code = 'mt'; + $mlt->wp_locale = 'mlt'; + $mlt->slug = 'mlt'; + $mlt->nplurals = 4; + $mlt->plural_expression = '(n==1 ? 0 : n==0 || ( n%100>1 && n%100<11) ? 1 : (n%100>10 && n%100<20 ) ? 2 : 3)'; + $mlt->google_code = 'mt'; + $mlt->facebook_locale = 'mt_MT'; + + $mn = new GP_Locale(); + $mn->english_name = 'Mongolian'; + $mn->native_name = 'Монгол'; + $mn->lang_code_iso_639_1 = 'mn'; + $mn->lang_code_iso_639_2 = 'mon'; + $mn->country_code = 'mn'; + $mn->wp_locale = 'mn'; + $mn->slug = 'mn'; + $mn->google_code = 'mn'; + $mn->facebook_locale = 'mn_MN'; + + $mr = new GP_Locale(); + $mr->english_name = 'Marathi'; + $mr->native_name = 'मराठी'; + $mr->lang_code_iso_639_1 = 'mr'; + $mr->lang_code_iso_639_2 = 'mar'; + $mr->wp_locale = 'mr'; + $mr->slug = 'mr'; + $mr->google_code = 'mr'; + $mr->facebook_locale = 'mr_IN'; + + $mri = new GP_Locale(); + $mri->english_name = 'Maori'; + $mri->native_name = 'Te Reo Māori'; + $mri->lang_code_iso_639_1 = 'mi'; + $mri->lang_code_iso_639_3 = 'mri'; + $mri->country_code = 'nz'; + $mri->slug = 'mri'; + $mri->wp_locale = 'mri'; + $mri->nplurals = 2; + $mri->plural_expression = '(n > 1)'; + $mri->google_code = 'mi'; + + $mrj = new GP_Locale(); + $mrj->english_name = 'Mari (Hill)'; + $mrj->native_name = 'Кырык мары'; + $mrj->lang_code_iso_639_3 = 'mrj'; + $mrj->country_code = 'ru'; + $mrj->slug = 'mrj'; + + $ms = new GP_Locale(); + $ms->english_name = 'Malay'; + $ms->native_name = 'Bahasa Melayu'; + $ms->lang_code_iso_639_1 = 'ms'; + $ms->lang_code_iso_639_2 = 'msa'; + $ms->wp_locale = 'ms_MY'; + $ms->slug = 'ms'; + $ms->nplurals = 1; + $ms->plural_expression = '0'; + $ms->google_code = 'ms'; + $ms->facebook_locale = 'ms_MY'; + + $mwl = new GP_Locale(); + $mwl->english_name = 'Mirandese'; + $mwl->native_name = 'Mirandés'; + $mwl->lang_code_iso_639_2 = 'mwl'; + $mwl->slug = 'mwl'; + + $my = new GP_Locale(); + $my->english_name = 'Myanmar (Burmese)'; + $my->native_name = 'ဗမာစာ'; + $my->lang_code_iso_639_1 = 'my'; + $my->lang_code_iso_639_2 = 'mya'; + $my->country_code = 'mm'; + $my->wp_locale = 'my_MM'; + $my->slug = 'mya'; + $my->google_code = 'my'; + + $ne = new GP_Locale(); + $ne->english_name = 'Nepali'; + $ne->native_name = 'नेपाली'; + $ne->lang_code_iso_639_1 = 'ne'; + $ne->lang_code_iso_639_2 = 'nep'; + $ne->country_code = 'np'; + $ne->wp_locale = 'ne_NP'; + $ne->slug = 'ne'; + $ne->google_code = 'ne'; + $ne->facebook_locale = 'ne_NP'; + + $nb = new GP_Locale(); + $nb->english_name = 'Norwegian (Bokmål)'; + $nb->native_name = 'Norsk bokmål'; + $nb->lang_code_iso_639_1 = 'nb'; + $nb->lang_code_iso_639_2 = 'nob'; + $nb->country_code = 'no'; + $nb->wp_locale = 'nb_NO'; + $nb->slug = 'nb'; + $nb->google_code = 'no'; + $nb->facebook_locale = 'nb_NO'; + + $nl = new GP_Locale(); + $nl->english_name = 'Dutch'; + $nl->native_name = 'Nederlands'; + $nl->lang_code_iso_639_1 = 'nl'; + $nl->lang_code_iso_639_2 = 'nld'; + $nl->country_code = 'nl'; + $nl->wp_locale = 'nl_NL'; + $nl->slug = 'nl'; + $nl->google_code = 'nl'; + $nl->facebook_locale = 'nl_NL'; + + $nl_be = new GP_Locale(); + $nl_be->english_name = 'Dutch (Belgium)'; + $nl_be->native_name = 'Nederlands (België)'; + $nl_be->lang_code_iso_639_1 = 'nl'; + $nl_be->lang_code_iso_639_2 = 'nld'; + $nl_be->country_code = 'be'; + $nl_be->wp_locale = 'nl_BE'; + $nl_be->slug = 'nl-be'; + $nl_be->google_code = 'nl'; + + $nn = new GP_Locale(); + $nn->english_name = 'Norwegian (Nynorsk)'; + $nn->native_name = 'Norsk nynorsk'; + $nn->lang_code_iso_639_1 = 'nn'; + $nn->lang_code_iso_639_2 = 'nno'; + $nn->country_code = 'no'; + $nn->wp_locale = 'nn_NO'; + $nn->slug = 'nn'; + $nn->google_code = 'no'; + $nn->facebook_locale = 'nn_NO'; + + $no = new GP_Locale(); + $no->english_name = 'Norwegian'; + $no->native_name = 'Norsk'; + $no->lang_code_iso_639_1 = 'no'; + $no->lang_code_iso_639_2 = 'nor'; + $no->country_code = 'no'; + $no->slug = 'no'; + $no->google_code = 'no'; + + $oci = new GP_Locale(); + $oci->english_name = 'Occitan'; + $oci->native_name = 'Occitan'; + $oci->lang_code_iso_639_1 = 'oc'; + $oci->lang_code_iso_639_2 = 'oci'; + $oci->country_code = 'fr'; + $oci->wp_locale = 'oci'; + $oci->slug = 'oci'; + $oci->nplurals = 2; + $oci->plural_expression = '(n > 1)'; + + $orm = new GP_Locale(); + $orm->english_name = 'Oromo'; + $orm->native_name = 'Afaan Oromo'; + $orm->lang_code_iso_639_1 = 'om'; + $orm->lang_code_iso_639_2 = 'orm'; + $orm->lang_code_iso_639_3 = 'orm'; + $orm->slug = 'orm'; + $orm->plural_expression = '(n > 1)'; + + $ory = new GP_Locale(); + $ory->english_name = 'Oriya'; + $ory->native_name = 'ଓଡ଼ିଆ'; + $ory->lang_code_iso_639_1 = 'or'; + $ory->lang_code_iso_639_2 = 'ory'; + $ory->country_code = 'in'; + $ory->wp_locale = 'ory'; + $ory->slug = 'ory'; + $ory->facebook_locale = 'or_IN'; + + $os = new GP_Locale(); + $os->english_name = 'Ossetic'; + $os->native_name = 'Ирон'; + $os->lang_code_iso_639_1 = 'os'; + $os->lang_code_iso_639_2 = 'oss'; + $os->wp_locale = 'os'; + $os->slug = 'os'; + + $pa = new GP_Locale(); + $pa->english_name = 'Punjabi'; + $pa->native_name = 'ਪੰਜਾਬੀ'; + $pa->lang_code_iso_639_1 = 'pa'; + $pa->lang_code_iso_639_2 = 'pan'; + $pa->country_code = 'in'; + $pa->wp_locale = 'pa_IN'; + $pa->slug = 'pa'; + $pa->google_code = 'pa'; + $pa->facebook_locale = 'pa_IN'; + + $pap = new GP_Locale(); + $pap->english_name = 'Papiamento'; + $pap->native_name = 'Papiamentu'; + $pap->lang_code_iso_639_2 = 'pap'; + $pap->lang_code_iso_639_3 = 'pap'; + $pap->country_code = 'cw'; + $pap->wp_locale = 'pap'; + $pap->slug = 'pap'; + + $pirate = new GP_Locale(); + $pirate->english_name = 'English (Pirate)'; + $pirate->native_name = 'English (Pirate)'; + $pirate->lang_code_iso_639_2 = 'art'; + $pirate->wp_locale = 'art_xpirate'; + $pirate->slug = 'pirate'; + $pirate->google_code = 'xx-pirate'; + $pirate->facebook_locale = 'en_PI'; + + $pl = new GP_Locale(); + $pl->english_name = 'Polish'; + $pl->native_name = 'Polski'; + $pl->lang_code_iso_639_1 = 'pl'; + $pl->lang_code_iso_639_2 = 'pol'; + $pl->country_code = 'pl'; + $pl->wp_locale = 'pl_PL'; + $pl->slug = 'pl'; + $pl->nplurals = 3; + $pl->plural_expression = '(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'; + $pl->google_code = 'pl'; + $pl->facebook_locale = 'pl_PL'; + + $pt_br = new GP_Locale(); + $pt_br->english_name = 'Portuguese (Brazil)'; + $pt_br->native_name = 'Português do Brasil'; + $pt_br->lang_code_iso_639_1 = 'pt'; + $pt_br->lang_code_iso_639_2 = 'por'; + $pt_br->country_code = 'br'; + $pt_br->wp_locale = 'pt_BR'; + $pt_br->slug = 'pt-br'; + $pt_br->nplurals = 2; + $pt_br->plural_expression = '(n > 1)'; + $pt_br->google_code = 'pt-BR'; + $pt_br->facebook_locale = 'pt_BR'; + + $pt = new GP_Locale(); + $pt->english_name = 'Portuguese (Portugal)'; + $pt->native_name = 'Português'; + $pt->lang_code_iso_639_1 = 'pt'; + $pt->country_code = 'pt'; + $pt->wp_locale = 'pt_PT'; + $pt->slug = 'pt'; + $pt->google_code = 'pt-PT'; + $pt->facebook_locale = 'pt_PT'; + + $ps = new GP_Locale(); + $ps->english_name = 'Pashto'; + $ps->native_name = 'پښتو'; + $ps->lang_code_iso_639_1 = 'ps'; + $ps->lang_code_iso_639_2 = 'pus'; + $ps->country_code = 'af'; + $ps->wp_locale = 'ps'; + $ps->slug = 'ps'; + $ps->text_direction = 'rtl'; + $ps->facebook_locale = 'ps_AF'; + + $rhg = new GP_Locale(); + $rhg->english_name = 'Rohingya'; + $rhg->native_name = 'Ruáinga'; + $rhg->lang_code_iso_639_3 = 'rhg'; + $rhg->country_code = 'mm'; + $rhg->wp_locale = 'rhg'; + $rhg->slug = 'rhg'; + $rhg->nplurals = 1; + $rhg->plural_expression = '0'; + + $ro = new GP_Locale(); + $ro->english_name = 'Romanian'; + $ro->native_name = 'Română'; + $ro->lang_code_iso_639_1 = 'ro'; + $ro->lang_code_iso_639_2 = 'ron'; + $ro->country_code = 'ro'; + $ro->wp_locale = 'ro_RO'; + $ro->slug = 'ro'; + $ro->nplurals = 3; + $ro->plural_expression = '(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2)'; + $ro->google_code = 'ro'; + $ro->facebook_locale = 'ro_RO'; + + $roh = new GP_Locale(); + $roh->english_name = 'Romansh'; + $roh->native_name = 'Rumantsch'; + $roh->lang_code_iso_639_2 = 'rm'; + $roh->lang_code_iso_639_3 = 'roh'; + $roh->country_code = 'ch'; + $roh->wp_locale = 'roh'; + $roh->slug = 'roh'; + + $ru = new GP_Locale(); + $ru->english_name = 'Russian'; + $ru->native_name = 'Русский'; + $ru->lang_code_iso_639_1 = 'ru'; + $ru->lang_code_iso_639_2 = 'rus'; + $ru->country_code = 'ru'; + $ru->wp_locale = 'ru_RU'; + $ru->slug = 'ru'; + $ru->nplurals = 3; + $ru->plural_expression = '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'; + $ru->google_code = 'ru'; + $ru->facebook_locale = 'ru_RU'; + + $rue = new GP_Locale(); + $rue->english_name = 'Rusyn'; + $rue->native_name = 'Русиньскый'; + $rue->lang_code_iso_639_3 = 'rue'; + $rue->wp_locale = 'rue'; + $rue->slug = 'rue'; + $rue->nplurals = 3; + $rue->plural_expression = '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'; + + $rup = new GP_Locale(); + $rup->english_name = 'Aromanian'; + $rup->native_name = 'Armãneashce'; + $rup->lang_code_iso_639_2 = 'rup'; + $rup->lang_code_iso_639_3 = 'rup'; + $rup->country_code = 'mk'; + $rup->wp_locale = 'rup_MK'; + $rup->slug = 'rup'; + + $sah = new GP_Locale(); + $sah->english_name = 'Sakha'; + $sah->native_name = 'Сахалыы'; + $sah->lang_code_iso_639_2 = 'sah'; + $sah->lang_code_iso_639_3 = 'sah'; + $sah->country_code = 'ru'; + $sah->wp_locale = 'sah'; + $sah->slug = 'sah'; + + $sa_in = new GP_Locale(); + $sa_in->english_name = 'Sanskrit'; + $sa_in->native_name = 'भारतम्'; + $sa_in->lang_code_iso_639_1 = 'sa'; + $sa_in->lang_code_iso_639_2 = 'san'; + $sa_in->lang_code_iso_639_3 = 'san'; + $sa_in->country_code = 'in'; + $sa_in->wp_locale = 'sa_IN'; + $sa_in->slug = 'sa-in'; + $sa_in->facebook_locale = 'sa_IN'; + + $scn = new GP_Locale(); + $scn->english_name = 'Sicilian'; + $scn->native_name = 'Sicilianu'; + $scn->lang_code_iso_639_3 = 'scn'; + $scn->country_code = 'it'; + $scn->wp_locale = 'scn'; + $scn->slug = 'scn'; + + $si = new GP_Locale(); + $si->english_name = 'Sinhala'; + $si->native_name = 'සිංහල'; + $si->lang_code_iso_639_1 = 'si'; + $si->lang_code_iso_639_2 = 'sin'; + $si->country_code = 'lk'; + $si->wp_locale = 'si_LK'; + $si->slug = 'si'; + $si->google_code = 'si'; + $si->facebook_locale = 'si_LK'; + + $sk = new GP_Locale(); + $sk->english_name = 'Slovak'; + $sk->native_name = 'Slovenčina'; + $sk->lang_code_iso_639_1 = 'sk'; + $sk->lang_code_iso_639_2 = 'slk'; + $sk->country_code = 'sk'; + $sk->slug = 'sk'; + $sk->wp_locale = 'sk_SK'; + $sk->nplurals = 3; + $sk->plural_expression = '(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2'; + $sk->google_code = 'sk'; + $sk->facebook_locale = 'sk_SK'; + + $skr = new GP_Locale(); + $skr->english_name = 'Saraiki'; + $skr->native_name = 'سرائیکی'; + $skr->lang_code_iso_639_3 = 'skr'; + $skr->country_code = 'pk'; + $skr->wp_locale = 'skr'; + $skr->slug = 'skr'; + $skr->nplurals = 2; + $skr->plural_expression = '(n > 1)'; + $skr->text_direction = 'rtl'; + + $sl = new GP_Locale(); + $sl->english_name = 'Slovenian'; + $sl->native_name = 'Slovenščina'; + $sl->lang_code_iso_639_1 = 'sl'; + $sl->lang_code_iso_639_2 = 'slv'; + $sl->country_code = 'si'; + $sl->wp_locale = 'sl_SI'; + $sl->slug = 'sl'; + $sl->nplurals = 4; + $sl->plural_expression = '(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3)'; + $sl->google_code = 'sl'; + $sl->facebook_locale = 'sl_SI'; + + $sna = new GP_Locale(); + $sna->english_name = 'Shona'; + $sna->native_name = 'ChiShona'; + $sna->lang_code_iso_639_1 = 'sn'; + $sna->lang_code_iso_639_3 = 'sna'; + $sna->country_code = 'zw'; + $sna->wp_locale = 'sna'; + $sna->slug = 'sna'; + + $snd = new GP_Locale(); + $snd->english_name = 'Sindhi'; + $snd->native_name = 'سنڌي'; + $snd->lang_code_iso_639_1 = 'sd'; + $snd->lang_code_iso_639_2 = 'sd'; + $snd->lang_code_iso_639_3 = 'snd'; + $snd->country_code = 'pk'; + $snd->wp_locale = 'snd'; + $snd->slug = 'snd'; + $snd->text_direction = 'rtl'; + + $so = new GP_Locale(); + $so->english_name = 'Somali'; + $so->native_name = 'Afsoomaali'; + $so->lang_code_iso_639_1 = 'so'; + $so->lang_code_iso_639_2 = 'som'; + $so->lang_code_iso_639_3 = 'som'; + $so->country_code = 'so'; + $so->wp_locale = 'so_SO'; + $so->slug = 'so'; + $so->google_code = 'so'; + $so->facebook_locale = 'so_SO'; + + $sq = new GP_Locale(); + $sq->english_name = 'Albanian'; + $sq->native_name = 'Shqip'; + $sq->lang_code_iso_639_1 = 'sq'; + $sq->lang_code_iso_639_2 = 'sqi'; + $sq->wp_locale = 'sq'; + $sq->country_code = 'al'; + $sq->slug = 'sq'; + $sq->google_code = 'sq'; + $sq->facebook_locale = 'sq_AL'; + + $sq_xk = new GP_Locale(); + $sq_xk->english_name = 'Shqip (Kosovo)'; + $sq_xk->native_name = 'Për Kosovën Shqip'; + $sq_xk->lang_code_iso_639_1 = 'sq'; + $sq_xk->country_code = 'xk'; // Temporary country code until Kosovo is assigned an ISO code. + $sq_xk->wp_locale = 'sq_XK'; + $sq_xk->slug = 'sq-xk'; + + $sr = new GP_Locale(); + $sr->english_name = 'Serbian'; + $sr->native_name = 'Српски језик'; + $sr->lang_code_iso_639_1 = 'sr'; + $sr->lang_code_iso_639_2 = 'srp'; + $sr->country_code = 'rs'; + $sr->wp_locale = 'sr_RS'; + $sr->slug = 'sr'; + $sr->nplurals = 3; + $sr->plural_expression = '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'; + $sr->google_code = 'sr'; + $sr->facebook_locale = 'sr_RS'; + + $srd = new GP_Locale(); + $srd->english_name = 'Sardinian'; + $srd->native_name = 'Sardu'; + $srd->lang_code_iso_639_1 = 'sc'; + $srd->lang_code_iso_639_2 = 'srd'; + $srd->country_code = 'it'; + $srd->wp_locale = 'srd'; + $srd->slug = 'srd'; + $srd->facebook_locale = 'sc_IT'; + + $ssw = new GP_Locale(); + $ssw->english_name = 'Swati'; + $ssw->native_name = 'SiSwati'; + $ssw->lang_code_iso_639_1 = 'ss'; + $ssw->lang_code_iso_639_2 = 'ssw'; + $ssw->lang_code_iso_639_3 = 'ssw'; + $ssw->country_code = 'sz'; + $ssw->wp_locale = 'ssw'; + $ssw->slug = 'ssw'; + + $su = new GP_Locale(); + $su->english_name = 'Sundanese'; + $su->native_name = 'Basa Sunda'; + $su->lang_code_iso_639_1 = 'su'; + $su->lang_code_iso_639_2 = 'sun'; + $su->country_code = 'id'; + $su->wp_locale = 'su_ID'; + $su->slug = 'su'; + $su->nplurals = 1; + $su->plural_expression = '0'; + $su->google_code = 'su'; + + $sv = new GP_Locale(); + $sv->english_name = 'Swedish'; + $sv->native_name = 'Svenska'; + $sv->lang_code_iso_639_1 = 'sv'; + $sv->lang_code_iso_639_2 = 'swe'; + $sv->country_code = 'se'; + $sv->wp_locale = 'sv_SE'; + $sv->slug = 'sv'; + $sv->google_code = 'sv'; + $sv->facebook_locale = 'sv_SE'; + + $sw = new GP_Locale(); + $sw->english_name = 'Swahili'; + $sw->native_name = 'Kiswahili'; + $sw->lang_code_iso_639_1 = 'sw'; + $sw->lang_code_iso_639_2 = 'swa'; + $sw->wp_locale = 'sw'; + $sw->slug = 'sw'; + $sw->google_code = 'sw'; + $sw->facebook_locale = 'sw_KE'; + + $syr = new GP_Locale(); + $syr->english_name = 'Syriac'; + $syr->native_name = 'Syriac'; + $syr->lang_code_iso_639_3 = 'syr'; + $syr->country_code = 'iq'; + $syr->wp_locale = 'syr'; + $syr->slug = 'syr'; + + $szl = new GP_Locale(); + $szl->english_name = 'Silesian'; + $szl->native_name = 'Ślōnskŏ gŏdka'; + $szl->lang_code_iso_639_3 = 'szl'; + $szl->country_code = 'pl'; + $szl->wp_locale = 'szl'; + $szl->slug = 'szl'; + $szl->nplurals = 3; + $szl->plural_expression = '(n==1 ? 0 : n%10>=2 && n%10<=4 && n%100==20 ? 1 : 2)'; + $szl->facebook_locale = 'sz_PL'; + + $ta = new GP_Locale(); + $ta->english_name = 'Tamil'; + $ta->native_name = 'தமிழ்'; + $ta->lang_code_iso_639_1 = 'ta'; + $ta->lang_code_iso_639_2 = 'tam'; + $ta->country_code = 'in'; + $ta->wp_locale = 'ta_IN'; + $ta->slug = 'ta'; + $ta->google_code = 'ta'; + $ta->facebook_locale = 'ta_IN'; + + $ta_lk = new GP_Locale(); + $ta_lk->english_name = 'Tamil (Sri Lanka)'; + $ta_lk->native_name = 'தமிழ்'; + $ta_lk->lang_code_iso_639_1 = 'ta'; + $ta_lk->lang_code_iso_639_2 = 'tam'; + $ta_lk->country_code = 'lk'; + $ta_lk->wp_locale = 'ta_LK'; + $ta_lk->slug = 'ta-lk'; + $ta_lk->google_code = 'ta'; + + $tah = new GP_Locale(); + $tah->english_name = 'Tahitian'; + $tah->native_name = 'Reo Tahiti'; + $tah->lang_code_iso_639_1 = 'ty'; + $tah->lang_code_iso_639_2 = 'tah'; + $tah->lang_code_iso_639_3 = 'tah'; + $tah->country_code = 'fr'; + $tah->wp_locale = 'tah'; + $tah->slug = 'tah'; + $tah->nplurals = 2; + $tah->plural_expression = '(n > 1)'; + + $te = new GP_Locale(); + $te->english_name = 'Telugu'; + $te->native_name = 'తెలుగు'; + $te->lang_code_iso_639_1 = 'te'; + $te->lang_code_iso_639_2 = 'tel'; + $te->wp_locale = 'te'; + $te->slug = 'te'; + $te->google_code = 'te'; + $te->facebook_locale = 'te_IN'; + + $tg = new GP_Locale(); + $tg->english_name = 'Tajik'; + $tg->native_name = 'Тоҷикӣ'; + $tg->lang_code_iso_639_1 = 'tg'; + $tg->lang_code_iso_639_2 = 'tgk'; + $tah->country_code = 'tj'; + $tg->wp_locale = 'tg'; + $tg->slug = 'tg'; + $tg->google_code = 'tg'; + $tg->facebook_locale = 'tg_TJ'; + + $th = new GP_Locale(); + $th->english_name = 'Thai'; + $th->native_name = 'ไทย'; + $th->lang_code_iso_639_1 = 'th'; + $th->lang_code_iso_639_2 = 'tha'; + $th->wp_locale = 'th'; + $th->slug = 'th'; + $th->nplurals = 1; + $th->plural_expression = '0'; + $th->google_code = 'th'; + $th->facebook_locale = 'th_TH'; + + $tir = new GP_Locale(); + $tir->english_name = 'Tigrinya'; + $tir->native_name = 'ትግርኛ'; + $tir->lang_code_iso_639_1 = 'ti'; + $tir->lang_code_iso_639_2 = 'tir'; + $tir->country_code = 'er'; + $tir->wp_locale = 'tir'; + $tir->slug = 'tir'; + $tir->nplurals = 1; + $tir->plural_expression = '0'; + + $tlh = new GP_Locale(); + $tlh->english_name = 'Klingon'; + $tlh->native_name = 'TlhIngan'; + $tlh->lang_code_iso_639_2 = 'tlh'; + $tlh->slug = 'tlh'; + $tlh->nplurals = 1; + $tlh->plural_expression = '0'; + $tlh->facebook_locale = 'tl_ST'; + + $tl = new GP_Locale(); + $tl->english_name = 'Tagalog'; + $tl->native_name = 'Tagalog'; + $tl->lang_code_iso_639_1 = 'tl'; + $tl->lang_code_iso_639_2 = 'tgl'; + $tl->country_code = 'ph'; + $tl->wp_locale = 'tl'; + $tl->slug = 'tl'; + $tl->google_code = 'tl'; + $tl->facebook_locale = 'tl_PH'; + + $tr = new GP_Locale(); + $tr->english_name = 'Turkish'; + $tr->native_name = 'Türkçe'; + $tr->lang_code_iso_639_1 = 'tr'; + $tr->lang_code_iso_639_2 = 'tur'; + $tr->country_code = 'tr'; + $tr->wp_locale = 'tr_TR'; + $tr->slug = 'tr'; + $tr->nplurals = 2; + $tr->plural_expression = '(n > 1)'; + $tr->google_code = 'tr'; + $tr->facebook_locale = 'tr_TR'; + + $tt_ru = new GP_Locale(); + $tt_ru->english_name = 'Tatar'; + $tt_ru->native_name = 'Татар теле'; + $tt_ru->lang_code_iso_639_1 = 'tt'; + $tt_ru->lang_code_iso_639_2 = 'tat'; + $tt_ru->country_code = 'ru'; + $tt_ru->wp_locale = 'tt_RU'; + $tt_ru->slug = 'tt'; + $tt_ru->nplurals = 1; + $tt_ru->plural_expression = '0'; + $tt_ru->facebook_locale = 'tt_RU'; + + $tuk = new GP_Locale(); + $tuk->english_name = 'Turkmen'; + $tuk->native_name = 'Türkmençe'; + $tuk->lang_code_iso_639_1 = 'tk'; + $tuk->lang_code_iso_639_2 = 'tuk'; + $tuk->country_code = 'tm'; + $tuk->wp_locale = 'tuk'; + $tuk->slug = 'tuk'; + $tuk->nplurals = 2; + $tuk->plural_expression = '(n > 1)'; + $tuk->facebook_locale = 'tk_TM'; + + $twd = new GP_Locale(); + $twd->english_name = 'Tweants'; + $twd->native_name = 'Twents'; + $twd->lang_code_iso_639_3 = 'twd'; + $twd->country_code = 'nl'; + $twd->wp_locale = 'twd'; + $twd->slug = 'twd'; + + $tzm = new GP_Locale(); + $tzm->english_name = 'Tamazight (Central Atlas)'; + $tzm->native_name = 'ⵜⴰⵎⴰⵣⵉⵖⵜ'; + $tzm->lang_code_iso_639_2 = 'tzm'; + $tzm->country_code = 'ma'; + $tzm->wp_locale = 'tzm'; + $tzm->slug = 'tzm'; + $tzm->nplurals = 2; + $tzm->plural_expression = '(n > 1)'; + + $udm = new GP_Locale(); + $udm->english_name = 'Udmurt'; + $udm->native_name = 'Удмурт кыл'; + $udm->lang_code_iso_639_2 = 'udm'; + $udm->slug = 'udm'; + + $ug = new GP_Locale(); + $ug->english_name = 'Uighur'; + $ug->native_name = 'ئۇيغۇرچە'; + $ug->lang_code_iso_639_1 = 'ug'; + $ug->lang_code_iso_639_2 = 'uig'; + $ug->country_code = 'cn'; + $ug->wp_locale = 'ug_CN'; + $ug->slug = 'ug'; + $ug->text_direction = 'rtl'; + + $uk = new GP_Locale(); + $uk->english_name = 'Ukrainian'; + $uk->native_name = 'Українська'; + $uk->lang_code_iso_639_1 = 'uk'; + $uk->lang_code_iso_639_2 = 'ukr'; + $uk->country_code = 'ua'; + $uk->wp_locale = 'uk'; + $uk->slug = 'uk'; + $uk->nplurals = 3; + $uk->plural_expression = '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'; + $uk->google_code = 'uk'; + $uk->facebook_locale = 'uk_UA'; + + $ur = new GP_Locale(); + $ur->english_name = 'Urdu'; + $ur->native_name = 'اردو'; + $ur->lang_code_iso_639_1 = 'ur'; + $ur->lang_code_iso_639_2 = 'urd'; + $ur->country_code = 'pk'; + $ur->wp_locale = 'ur'; + $ur->slug = 'ur'; + $ur->text_direction = 'rtl'; + $ur->google_code = 'ur'; + $ur->facebook_locale = 'ur_PK'; + + $uz = new GP_Locale(); + $uz->english_name = 'Uzbek'; + $uz->native_name = 'O‘zbekcha'; + $uz->lang_code_iso_639_1 = 'uz'; + $uz->lang_code_iso_639_2 = 'uzb'; + $uz->country_code = 'uz'; + $uz->wp_locale = 'uz_UZ'; + $uz->slug = 'uz'; + $uz->nplurals = 1; + $uz->plural_expression = '0'; + $uz->google_code = 'uz'; + $uz->facebook_locale = 'uz_UZ'; + + $vec = new GP_Locale(); + $vec->english_name = 'Venetian'; + $vec->native_name = 'Vèneta'; + $vec->lang_code_iso_639_2 = 'roa'; + $vec->lang_code_iso_639_3 = 'vec'; + $vec->country_code = 'it'; + $vec->slug = 'vec'; + + $vi = new GP_Locale(); + $vi->english_name = 'Vietnamese'; + $vi->native_name = 'Tiếng Việt'; + $vi->lang_code_iso_639_1 = 'vi'; + $vi->lang_code_iso_639_2 = 'vie'; + $vi->country_code = 'vn'; + $vi->wp_locale = 'vi'; + $vi->slug = 'vi'; + $vi->nplurals = 1; + $vi->plural_expression = '0'; + $vi->google_code = 'vi'; + $vi->facebook_locale = 'vi_VN'; + + $wa = new GP_Locale(); + $wa->english_name = 'Walloon'; + $wa->native_name = 'Walon'; + $wa->lang_code_iso_639_1 = 'wa'; + $wa->lang_code_iso_639_2 = 'wln'; + $wa->country_code = 'be'; + $wa->wp_locale = 'wa'; + $wa->slug = 'wa'; + + $xho = new GP_Locale(); + $xho->english_name = 'Xhosa'; + $xho->native_name = 'isiXhosa'; + $xho->lang_code_iso_639_1 = 'xh'; + $xho->lang_code_iso_639_2 = 'xho'; + $xho->lang_code_iso_639_3 = 'xho'; + $xho->country_code = 'za'; + $xho->wp_locale = 'xho'; + $xho->slug = 'xho'; + $xho->google_code = 'xh'; + $xho->facebook_locale = 'xh_ZA'; + + $xmf = new GP_Locale(); + $xmf->english_name = 'Mingrelian'; + $xmf->native_name = 'მარგალური ნინა'; + $xmf->lang_code_iso_639_3 = 'xmf'; + $xmf->country_code = 'ge'; + $xmf->wp_locale = 'xmf'; + $xmf->slug = 'xmf'; + + $yi = new GP_Locale(); + $yi->english_name = 'Yiddish'; + $yi->native_name = 'ייִדיש'; + $yi->lang_code_iso_639_1 = 'yi'; + $yi->lang_code_iso_639_2 = 'yid'; + $yi->slug = 'yi'; + $yi->text_direction = 'rtl'; + $yi->google_code = 'yi'; + + $yor = new GP_Locale(); + $yor->english_name = 'Yoruba'; + $yor->native_name = 'Yorùbá'; + $yor->lang_code_iso_639_1 = 'yo'; + $yor->lang_code_iso_639_2 = 'yor'; + $yor->lang_code_iso_639_3 = 'yor'; + $yor->country_code = 'ng'; + $yor->wp_locale = 'yor'; + $yor->slug = 'yor'; + $yor->google_code = 'yo'; + $yor->facebook_locale = 'yo_NG'; + + $zh_cn = new GP_Locale(); + $zh_cn->english_name = 'Chinese (China)'; + $zh_cn->native_name = '简体中文'; + $zh_cn->lang_code_iso_639_1 = 'zh'; + $zh_cn->lang_code_iso_639_2 = 'zho'; + $zh_cn->country_code = 'cn'; + $zh_cn->wp_locale = 'zh_CN'; + $zh_cn->slug = 'zh-cn'; + $zh_cn->nplurals = 1; + $zh_cn->plural_expression = '0'; + $zh_cn->google_code = 'zh-CN'; + $zh_cn->facebook_locale = 'zh_CN'; + + $zh_hk = new GP_Locale(); + $zh_hk->english_name = 'Chinese (Hong Kong)'; + $zh_hk->native_name = '香港中文版 '; + $zh_hk->lang_code_iso_639_1 = 'zh'; + $zh_hk->lang_code_iso_639_2 = 'zho'; + $zh_hk->country_code = 'hk'; + $zh_hk->wp_locale = 'zh_HK'; + $zh_hk->slug = 'zh-hk'; + $zh_hk->nplurals = 1; + $zh_hk->plural_expression = '0'; + $zh_hk->facebook_locale = 'zh_HK'; + + $zh_sg = new GP_Locale(); + $zh_sg->english_name = 'Chinese (Singapore)'; + $zh_sg->native_name = '中文'; + $zh_sg->lang_code_iso_639_1 = 'zh'; + $zh_sg->lang_code_iso_639_2 = 'zho'; + $zh_sg->country_code = 'sg'; + $zh_sg->wp_locale = 'zh_SG'; + $zh_sg->slug = 'zh-sg'; + $zh_sg->nplurals = 1; + $zh_sg->plural_expression = '0'; + + $zh_tw = new GP_Locale(); + $zh_tw->english_name = 'Chinese (Taiwan)'; + $zh_tw->native_name = '繁體中文'; + $zh_tw->lang_code_iso_639_1 = 'zh'; + $zh_tw->lang_code_iso_639_2 = 'zho'; + $zh_tw->country_code = 'tw'; + $zh_tw->slug = 'zh-tw'; + $zh_tw->wp_locale = 'zh_TW'; + $zh_tw->nplurals = 1; + $zh_tw->plural_expression = '0'; + $zh_tw->google_code = 'zh-TW'; + $zh_tw->facebook_locale = 'zh_TW'; + + $zh = new GP_Locale(); + $zh->english_name = 'Chinese'; + $zh->native_name = '中文'; + $zh->lang_code_iso_639_1 = 'zh'; + $zh->lang_code_iso_639_2 = 'zho'; + $zh->slug = 'zh'; + $zh->nplurals = 1; + $zh->plural_expression = '0'; + + $zul = new GP_Locale(); + $zul->english_name = 'Zulu'; + $zul->native_name = 'isiZulu'; + $zul->lang_code_iso_639_1 = 'zu'; + $zul->lang_code_iso_639_2 = 'zul'; + $zul->lang_code_iso_639_3 = 'zul'; + $zul->country_code = 'za'; + $zul->wp_locale = 'zul'; + $zul->slug = 'zul'; + $zul->google_code = 'zu'; + + foreach ( get_defined_vars() as $locale ) { + $this->locales[ $locale->slug ] = $locale; + } + } + + public static function &instance() { + if ( ! isset( $GLOBALS['gp_locales'] ) ) { + $GLOBALS['gp_locales'] = new GP_Locales(); + } + + return $GLOBALS['gp_locales']; + } + + public static function locales() { + $instance = self::instance(); + return $instance->locales; + } + + public static function exists( $slug ) { + $instance = self::instance(); + return isset( $instance->locales[ $slug ] ); + } + + public static function by_slug( $slug ) { + $instance = self::instance(); + return isset( $instance->locales[ $slug ] ) ? $instance->locales[ $slug ] : null; + } + + public static function by_field( $field_name, $field_value ) { + $instance = self::instance(); + $result = false; + + foreach ( $instance->locales() as $locale ) { + if ( isset( $locale->$field_name ) && $locale->$field_name == $field_value ) { + $result = $locale; + break; + } + } + + return $result; + } + } + +endif; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/CHANGELOG.md index 2774b4b4..ef8093b9 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/CHANGELOG.md @@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.9.0] - 2022-05-18 +### Added +- Configuration for waf package [#24153] + +## [1.8.0] - 2022-04-26 +### Added +- Added the publicize package to be configured via the config package. + +### Changed +- Updated package dependencies. + +## [1.7.2] - 2022-04-19 +### Added +- Enable WordAds from Config class + +## [1.7.1] - 2022-04-06 +### Removed +- Removed tracking dependency. + +## [1.7.0] - 2022-03-23 +### Added +- Search: added search initialization + +## [1.6.1] - 2022-02-09 +### Added +- Allow sync package consumers to provide custom data settings. + ## [1.6.0] - 2022-01-04 ### Added - Accept options for the IDC package. @@ -93,6 +120,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Trying to add deterministic initialization. +[1.9.0]: https://github.com/Automattic/jetpack-config/compare/v1.8.0...v1.9.0 +[1.8.0]: https://github.com/Automattic/jetpack-config/compare/v1.7.2...v1.8.0 +[1.7.2]: https://github.com/Automattic/jetpack-config/compare/v1.7.1...v1.7.2 +[1.7.1]: https://github.com/Automattic/jetpack-config/compare/v1.7.0...v1.7.1 +[1.7.0]: https://github.com/Automattic/jetpack-config/compare/v1.6.1...v1.7.0 +[1.6.1]: https://github.com/Automattic/jetpack-config/compare/v1.6.0...v1.6.1 [1.6.0]: https://github.com/Automattic/jetpack-config/compare/v1.5.4...v1.6.0 [1.5.4]: https://github.com/Automattic/jetpack-config/compare/v1.5.3...v1.5.4 [1.5.3]: https://github.com/Automattic/jetpack-config/compare/v1.5.2...v1.5.3 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php index 8d275d68..05025245 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php @@ -17,7 +17,11 @@ use Automattic\Jetpack\Connection\Plugin; use Automattic\Jetpack\JITM as JITM; use Automattic\Jetpack\JITMS\JITM as JITMS_JITM; use Automattic\Jetpack\Post_List\Post_List as Post_List; +use Automattic\Jetpack\Publicize\Publicize_Setup as Publicize_Setup; +use Automattic\Jetpack\Search\Initializer as Jetpack_Search_Main; use Automattic\Jetpack\Sync\Main as Sync_Main; +use Automattic\Jetpack\Waf\Waf_Initializer as Jetpack_Waf_Main; +use Automattic\Jetpack\WordAds\Initializer as Jetpack_WordAds_Main; /** * The configuration class. @@ -39,6 +43,10 @@ class Config { 'sync' => false, 'post_list' => false, 'identity_crisis' => false, + 'search' => false, + 'publicize' => false, + 'wordads' => false, + 'waf' => false, ); /** @@ -57,7 +65,6 @@ class Config { * being constructed on priority 1. */ add_action( 'plugins_loaded', array( $this, 'on_plugins_loaded' ), 2 ); - } /** @@ -106,6 +113,26 @@ class Config { $this->ensure_class( 'Automattic\Jetpack\Identity_Crisis' ) && $this->ensure_feature( 'identity_crisis' ); } + + if ( $this->config['search'] ) { + $this->ensure_class( 'Automattic\Jetpack\Search\Initializer' ) + && $this->ensure_feature( 'search' ); + } + + if ( $this->config['publicize'] ) { + $this->ensure_class( 'Automattic\Jetpack\Publicize\Publicize_UI' ) && $this->ensure_class( 'Automattic\Jetpack\Publicize\Publicize' ) + && $this->ensure_feature( 'publicize' ); + } + + if ( $this->config['wordads'] ) { + $this->ensure_class( 'Automattic\Jetpack\WordAds\Initializer' ) + && $this->ensure_feature( 'wordads' ); + } + + if ( $this->config['waf'] ) { + $this->ensure_class( 'Automattic\Jetpack\Waf\Waf_Initializer' ) + && $this->ensure_feature( 'waf' ); + } } /** @@ -220,6 +247,38 @@ class Config { } /** + * Enables the search feature. + */ + protected function enable_search() { + Jetpack_Search_Main::init(); + } + + /** + * Enables the Publicize feature. + */ + protected function enable_publicize() { + Publicize_Setup::configure(); + + return true; + } + + /** + * Enables WordAds. + */ + protected function enable_wordads() { + Jetpack_WordAds_Main::init(); + } + + /** + * Enables Waf. + */ + protected function enable_waf() { + Jetpack_Waf_Main::init(); + + return true; + } + + /** * Setup the Connection options. */ protected function ensure_options_connection() { @@ -264,6 +323,18 @@ class Config { } /** + * Setup the Sync options. + */ + protected function ensure_options_sync() { + $options = $this->get_feature_options( 'sync' ); + if ( method_exists( 'Automattic\Jetpack\Sync\Main', 'set_sync_data_options' ) ) { + Sync_Main::set_sync_data_options( $options ); + } + + return true; + } + + /** * Temporary save initialization options for a feature. * * @param string $feature The feature slug. diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/CHANGELOG.md index b6b82ab7..e0f4b1b0 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/CHANGELOG.md @@ -5,6 +5,91 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.4.5] - 2022-05-31 +### Changed +- Updated package dependencies. [#24573] + +## [2.4.4] - 2022-05-18 +### Changed +- Updated package dependencies [#24372] + +## [2.4.3] - 2022-05-10 +### Changed +- Updated package dependencies. [#24189] + +## [2.4.2] - 2022-05-04 +### Changed +- Remove use of `pnpx` in preparation for pnpm 7.0. [#24210] +- Updated package dependencies. [#24095] [#24198] + +## [2.4.1] - 2022-04-26 +### Changed +- Updated package dependencies. +- Update package.json metadata. + +## [2.4.0] - 2022-04-19 +### Deprecated +- Deprecated in-place connection. + +## [2.3.14] - 2022-04-12 +### Changed +- Updated package dependencies. + +## [2.3.13] - 2022-04-06 +### Changed +- Updated package dependencies + +## [2.3.12] - 2022-03-29 +### Changed +- Updated package dependencies. + +## [2.3.11] - 2022-03-23 +### Changed +- Updated package dependencies + +## [2.3.10] - 2022-03-15 +### Changed +- Updated package dependencies. + +## [2.3.9] - 2022-03-08 +### Changed +- Updated package dependencies. + +## [2.3.8] - 2022-03-02 +### Changed +- Updated package dependencies + +## [2.3.7] - 2022-02-22 +### Changed +- Updated package dependencies. + +## [2.3.6] - 2022-02-16 +### Changed +- Updated package dependencies. + +## [2.3.5] - 2022-02-09 +### Changed +- Updated package dependencies + +## [2.3.4] - 2022-02-02 +### Changed +- Updated package dependencies. + +## [2.3.3] - 2022-01-25 +### Added +- connection initial state + +### Changed +- Updated package dependencies. + +## [2.3.2] - 2022-01-18 +### Changed +- General: update required node version to v16.13.2 + +## [2.3.1] - 2022-01-11 +### Changed +- Updated package dependencies. + ## [2.3.0] - 2022-01-04 ### Changed - Drop isRegistered and isUserConnected params from ConnectionStatusCard component @@ -162,6 +247,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Connection UI: Building the Framework +[2.4.5]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.4.4...v2.4.5 +[2.4.4]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.4.3...v2.4.4 +[2.4.3]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.4.2...v2.4.3 +[2.4.2]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.4.1...v2.4.2 +[2.4.1]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.4.0...v2.4.1 +[2.4.0]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.14...v2.4.0 +[2.3.14]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.13...v2.3.14 +[2.3.13]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.12...v2.3.13 +[2.3.12]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.11...v2.3.12 +[2.3.11]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.10...v2.3.11 +[2.3.10]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.9...v2.3.10 +[2.3.9]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.8...v2.3.9 +[2.3.8]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.7...v2.3.8 +[2.3.7]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.6...v2.3.7 +[2.3.6]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.5...v2.3.6 +[2.3.5]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.4...v2.3.5 +[2.3.4]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.3...v2.3.4 +[2.3.3]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.2...v2.3.3 +[2.3.2]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.1...v2.3.2 +[2.3.1]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.3.0...v2.3.1 [2.3.0]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.2.0...v2.3.0 [2.2.0]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.1.4...v2.2.0 [2.1.4]: https://github.com/Automattic/jetpack-connection-ui/compare/v2.1.3...v2.1.4 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.asset.php index 6486fa68..409a9b45 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.asset.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.asset.php @@ -1 +1 @@ -<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'cf7c4416c6aebd1c4977dbe9905998f7');
\ No newline at end of file +<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '08ed8865db19f8e4fc4f'); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.css index 60f69f98..968b4990 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.css +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.css @@ -1 +1 @@ -#jetpack-connection-ui-container .jetpack-cui__header h1{font-size:4.6em;line-height:1.2em;text-align:left}#jetpack-connection-ui-container{margin:40px}#jetpack-connection-ui-container p{font-size:1.23em;line-height:1.5em}.jp-connection-status-card h3{color:var(--jp-black);font-size:36px;font-weight:400;line-height:40px;margin:0}.jp-connection-status-card a,.jp-connection-status-card a:active,.jp-connection-status-card a:hover{color:var(--jp-black)}.jp-connection-status-card p{color:var(--jp-black);margin:16px 0}.jp-connection-status-card a,.jp-connection-status-card li,.jp-connection-status-card p{font-size:16px;line-height:24px}.jp-connection-status-card--status{align-items:center;display:flex;margin:24px 0 24px -6px}.jp-connection-status-card--cloud{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDIiIGhlaWdodD0iNDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PG1hc2sgaWQ9ImEiIG1hc2stdHlwZT0iYWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjciIHk9IjkiIHdpZHRoPSIyOCIgaGVpZ2h0PSIyMSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMC4zMzMgMTcuNjk3di0uMDhjMC00LjI1My0zLjc2LTcuNy04LjQtNy43LTMuOTE2IDAtNy4yMDYgMi40NTctOC4xMzYgNS43OGE2LjM4NiA2LjM4NiAwIDAgMC0uMjY0LS4wMDVDOS45MjUgMTUuNjkyIDcgMTguNzA4IDcgMjIuNDI5czIuOTI1IDYuNzM4IDYuNTMzIDYuNzM4SDI5LjRjMy4wOTMgMCA1LjYtMi41ODYgNS42LTUuNzc1IDAtMi44NjEtMi4wMTgtNS4yMzctNC42NjYtNS42OTVaIiBmaWxsPSIjZmZmIi8+PC9tYXNrPjxnIG1hc2s9InVybCgjYSkiPjxwYXRoIGQ9Im0zMC4zMzMgMTcuNjk3LTIuNjI1LS4wMy0uMDI1IDIuMjM1IDIuMjAyLjM4MS40NDgtMi41ODZabS0xNi41MzctMi0uMTA3IDIuNjIzIDIuMDc1LjA4NS41Ni0yLTIuNTI4LS43MDhabS0uMjYzIDEzLjQ3djIuNjI1aC4wMDhsLS4wMDgtMi42MjVabS4wNCAwdi0yLjYyNWgtLjAwOWwuMDA4IDIuNjI1Wm0xNS43OTUgMCAuMDE1LTIuNjI1aC0uMDE1djIuNjI1Wm0zLjU5LTExLjQ0MXYtLjExaC01LjI1di4wNTJsNS4yNS4wNThabTAtLjExYzAtNS45MTItNS4xNTUtMTAuMzI0LTExLjAyNS0xMC4zMjR2NS4yNWMzLjQxIDAgNS43NzUgMi40ODIgNS43NzUgNS4wNzVoNS4yNVpNMjEuOTMzIDcuMjkzYy00Ljk4NCAwLTkuMzg4IDMuMTM5LTEwLjY2NCA3LjY5OGw1LjA1NSAxLjQxNWMuNTg1LTIuMDg5IDIuNzYyLTMuODYzIDUuNjEtMy44NjN2LTUuMjVabS04LjAzIDUuNzgyYTkuMTExIDkuMTExIDAgMCAwLS4zNy0uMDA3djUuMjVjLjA1MyAwIC4xMDUuMDAxLjE1Ni4wMDNsLjIxNS01LjI0NlptLS4zNy0uMDA3Yy01LjEzMyAwLTkuMTU4IDQuMjY4LTkuMTU4IDkuMzYyaDUuMjVjMC0yLjM0OCAxLjgyNS00LjExMiAzLjkwOC00LjExMnYtNS4yNVptLTkuMTU4IDkuMzYyYzAgNS4wOTUgNC4wMjUgOS4zNjMgOS4xNTggOS4zNjN2LTUuMjVjLTIuMDgzIDAtMy45MDgtMS43NjUtMy45MDgtNC4xMTNoLTUuMjVabTkuMTY2IDkuMzYzaC4wNGwtLjAxNy01LjI1aC0uMDM5bC4wMTYgNS4yNVptLjAzMSAwaDE1Ljc5NnYtNS4yNUgxMy41NzJ2NS4yNVptMTUuODI3LTUuMjVoLS4wMTZsLS4wMyA1LjI1aC4wNDZ2LTUuMjVabTIuOTc1LTMuMTVjMCAxLjgxNi0xLjQwNyAzLjE1LTIuOTc1IDMuMTV2NS4yNWM0LjYxOCAwIDguMjI1LTMuODM4IDguMjI1LTguNGgtNS4yNVptLTIuNDg5LTMuMTA5YzEuMzU1LjIzNSAyLjQ5IDEuNDg4IDIuNDkgMy4xMDloNS4yNWMwLTQuMTAyLTIuOTAyLTcuNi02Ljg0NC04LjI4MmwtLjg5NiA1LjE3M1oiIGZpbGw9IiMxRTFFMUUiLz48L2c+PC9zdmc+);height:42px;margin-right:4px;width:42px}.jp-connection-status-card--jetpack-logo{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE2IDMyYzguODM3IDAgMTYtNy4xNjMgMTYtMTZTMjQuODM3IDAgMTYgMCAwIDcuMTYzIDAgMTZzNy4xNjMgMTYgMTYgMTZaIiBmaWxsPSIjMDAwIi8+PHBhdGggZD0iTTE2Ljc5NCAxMy4zMTN2MTUuNTExbDgtMTUuNTEyaC04Wk0xNS4xNzUgMTguNjU3VjMuMTc2bC03Ljk2OSAxNS40OGg3Ljk3WiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==);height:32px;margin-left:11px;width:32px}.jp-connection-status-card--btn-connect-user{background:var(--jp-black)!important;border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection-status-card--avatar{background-color:var(--jp-white);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='16' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.498 27.123C6.038 24.165 10.916 21.5 16 21.5c5.084 0 9.963 2.665 11.502 5.623a15.952 15.952 0 0 1-11.257 4.875L16 32l-.245-.002a15.952 15.952 0 0 1-11.257-4.875zM16 8a6 6 0 1 1 0 12 6 6 0 0 1 0-12z' fill='%23A2AAB2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;border:0;border-radius:20px;height:32px;margin-left:-10px;width:32px}.jp-connection-status-card--line{border-top:2px solid var(--jp-black);height:0;width:67px}.jp-connection-status-card--line.jp-connection-status-card--site-only{border-top-style:dashed}.jp-connection-status-card--list{list-style-type:none;margin:16px 0}.jp-connection-status-card--list li{color:var(--jp-black);margin:0 0 8px -3px;padding-left:25px}.jp-connection-status-card--list-item-success{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTE4LjkzNSA2LTguOSAxMS45Ny01LjE2Mi0zLjgzNyIgc3Ryb2tlPSIjMUUxRTFFIiBzdHJva2Utd2lkdGg9IjEuNSIvPjwvc3ZnPg==) no-repeat 0 0}.jp-connection-status-card--list-item-error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 0 0;color:var(--jp-red)!important}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-small);font-weight:600;line-height:1.2;margin-top:0}.jp-connection__disconnect-dialog h2{font-size:var(--font-title-small);font-weight:400;line-height:1.2;margin:0}.jp-connection__disconnect-dialog p{font-size:var(--font-body);margin-top:0}.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text{font-size:1.25rem}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link,.jp-connection__disconnect-dialog__link{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:hover,.jp-connection__disconnect-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:focus,.jp-connection__disconnect-dialog__link:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link--bold,.jp-connection__disconnect-dialog__link--bold{font-weight:700}.jp-connection__disconnect-dialog .components-button{border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection__disconnect-dialog .components-modal__content{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0}.jp-connection__disconnect-dialog .components-modal__content:before,.jp-connection__disconnect-dialog .components-modal__header{display:none}.jp-connection__disconnect-dialog .jp-row{align-items:center;width:calc(100% - 48px)}.jp-connection__disconnect-dialog__content{align-items:center;background:var(--jp-white-off);border-radius:4px;display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0;padding:2rem 1rem;text-align:center}.jp-connection__disconnect-dialog__actions{background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;padding:2rem 0;position:sticky}.jp-connection__disconnect-dialog__actions p{margin-bottom:0}.jp-connection__disconnect-dialog__actions:before{background:linear-gradient(to bottom,transparent,var(--jp-white-off));bottom:calc(100% + 1px);content:"";display:block;height:80px;left:0;position:absolute;width:100%}.jp-connection__disconnect-dialog__btn-dismiss,.jp-connection__disconnect-dialog__btn-dismiss.components-button{background:var(--jp-black)!important;margin-right:10px}.jp-connection__disconnect-dialog__btn-disconnect{background:var(--jp-red)!important}.jp-connection__disconnect-dialog__btn-back-to-wp{background:var(--jp-black)!important}.jp-connection__disconnect-dialog__button-wrap{text-align:left}@media(min-width:960px){.jp-connection__disconnect-dialog__button-wrap{text-align:center}}.jp-connection__disconnect-dialog__error{color:var(--jp-red)}.jp-connection__disconnect-dialog__survey{margin-bottom:1.5rem;max-width:100%}.jp-connection__disconnect-dialog__step-copy{margin:0 auto;max-width:800px}.jp-connection__disconnect-dialog__step-copy--narrow{max-width:600px}@media(max-height:900px){.jp-connection__disconnect-dialog__content .jp-components__decorative-card{display:none}}@media(min-width:600px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{max-width:calc(100% - 32px);width:100%}.jp-connection__disconnect-dialog__actions,.jp-connection__disconnect-dialog__content{padding:2rem}}@media(min-width:960px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{display:flex;flex-direction:column;height:900px;width:1200px}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-large)}.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text{font-size:1.5rem}.jp-connection__disconnect-dialog__content{padding:80px}.jp-connection__disconnect-dialog__actions{padding:2rem 3rem}.jp-row{margin-left:0}}.jp-connection__disconnect-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:0 auto 1rem;max-width:100%;padding:1rem 2rem;text-align:left;width:800px}.jp-connection__disconnect-card__group{margin-bottom:1rem;max-width:100%}.jp-connection__disconnect-card__card-content{display:block;font-size:.875rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-content{align-items:center;display:flex;justify-content:space-between}}.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{flex-shrink:0;font-size:1.25rem;font-weight:600;margin-bottom:0;margin-top:0}@media only screen and (min-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{font-size:1.5rem;margin-right:1.5rem}}@media only screen and (max-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block,.jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block{margin-top:.5rem}}.jp-connection__disconnect-card__card-stat-block{align-items:baseline;display:flex;flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat-block{flex-direction:row-reverse}}.jp-connection__disconnect-card__card-description{flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-description{text-align:right}}.jp-connection__disconnect-card__card-stat{font-size:1rem;font-weight:600;margin-right:.5rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat{font-size:1.5rem;margin-left:1rem;margin-right:0}}.jp-components__decorative-card{border-radius:8px;box-shadow:0 0 15px var(--jp-gray);display:flex;height:280px;margin:0 auto 3rem;max-width:100%;overflow:hidden;position:relative;width:360px}.jp-components__decorative-card__content,.jp-components__decorative-card__image{width:50%}.jp-components__decorative-card__image{background:var(--jp-gray);background-size:cover;position:relative}.jp-components__decorative-card__image:before{background-image:url('data:image/svg+xml;uf8,<svg width="38" height="8" viewBox="0 0 38 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 7C1 7 2.37087 1 6.89831 1C11.4257 1 14.3709 7 18.8983 7C23.4257 7 26.7777 1 31.3051 1C35.912 1 37 7 37 7" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>');content:"";display:block;height:8px;left:24px;position:absolute;top:24px;width:38px}.jp-components__decorative-card__content{background:#fff;padding:2rem}.jp-components__decorative-card__icon-container{background:var(--jp-red);border-radius:50px;height:80px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:80px}.jp-components__decorative-card__icon{background-position:50%,50%;background-repeat:no-repeat;height:40px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:40px}.jp-components__decorative-card__icon--unlink{background-image:url('data:image/svg+xml;uf8,<svg width="34" height="37" viewBox="0 0 34 37" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.3335 10.001H25.0002C29.4184 10.001 33.0002 13.5827 33.0002 18.001V19.7788C33.0002 24.197 29.4184 27.7788 25.0002 27.7788H22.3335" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M11.6675 27.7783L9.00082 27.7783C4.58254 27.7783 1.00081 24.1966 1.00081 19.7783L1.00081 18.0005C1.00081 13.5823 4.58253 10.0005 9.00081 10.0005L11.6675 10.0005" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M10.9998 19.167L16.9998 19.167" stroke="white" stroke-width="1.5"/> <path d="M8.99951 35.998L24.9995 0.998048" stroke="white"/> </svg>')}.jp-components__decorative-card__lines,.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{background:#e9eff5;border-radius:6px;display:block;height:12px;position:relative;width:100%}.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{content:"";top:calc(100% + 16px)}.jp-components__decorative-card__lines:after{top:calc(100% + 32px);width:75%}.jp-components__decorative-card--vertical{flex-direction:column}.jp-components__decorative-card--vertical .jp-components__decorative-card__content,.jp-components__decorative-card--vertical .jp-components__decorative-card__image{height:50%;width:100%}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines{margin-left:auto;margin-right:auto;max-width:135px}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:after,.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:before{margin-left:auto;margin-right:auto}.jp-connect__disconnect-survey-card{border:2px solid transparent;border-radius:4px;box-shadow:0 0 15px var(--jp-gray-off);margin-left:auto;margin-right:auto;max-width:100%;padding:1rem;position:relative;text-align:left;width:800px}.jp-connect__disconnect-survey-card--selected{background:var(--jp-gray-off);border-color:var(--jp-black)}.jp-connect__disconnect-survey-card:after{border-right:2px solid var(--jp-black);border-top:2px solid var(--jp-black);content:"";display:block;height:5px;position:absolute;right:1.5rem;top:50%;transform:translateY(-50%) rotate(45deg);width:5px}.jp-connect__disconnect-survey-card:hover{cursor:pointer}.jp-connect__disconnect-survey-card:focus:not(.jp-disconnect-survey-card--selected),.jp-connect__disconnect-survey-card:hover:not(.jp-disconnect-survey-card--selected){border-color:var(--jp-black-80)}.jp-connect__disconnect-survey-card__answer{align-items:center;display:flex;font-weight:700;margin:0}input.jp-connect__disconnect-survey-card__input{-webkit-appearance:none;background-color:transparent;border:none;color:var(--jp-black-80);flex-grow:1;max-width:calc(100% - 40px);padding-right:40px}@media(min-width:1080px){.jp-connection__connect-screen-layout__left{width:70%}.jp-connection__connect-screen-required-plan{background:linear-gradient(90deg,#fff 70%,#f9f9f6 0);position:relative}}.jp-connection__connect-screen-required-plan__loading{display:none}@media(min-width:1080px){.jp-connection__connect-screen-required-plan__pricing-card{left:62%;position:absolute;top:14%}}.jp-connection__connect-screen-required-plan__pricing-card .components-button{align-items:center;background:var(--jp-black)!important;border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;font-weight:500;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-connection__connect-screen-required-plan__with-subscription{margin-top:38px}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button{display:inline}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button{background:inherit!important;color:var(--jp-black)!important;display:inline;font-size:var(--font-title-small);font:inherit;height:auto;line-height:20px;min-width:0;padding:0;text-decoration:underline;width:auto}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button:hover{background:inherit;text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button:focus{background:inherit;box-shadow:none!important}.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__inner,.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__outer{border-right-color:var(--jp-black);border-top-color:var(--jp-black)}.jp-action-button--button{background:#000}.jp-action-button--button,.jp-action-button--button.components-button{border-radius:4px;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-style:normal;font-weight:600;height:40px;line-height:18px;min-width:264px;text-align:center}.jp-action-button__error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 0 0;color:var(--jp-red)!important;line-height:25px!important;padding-left:25px}@keyframes rotate-spinner{to{transform:rotate(1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-right-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}.jp-connection__connect-screen-layout{background:var(--jp-white);border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.08)}.jp-connection__connect-screen-layout__loading{display:none}.jp-connection__connect-screen-layout__left,.jp-connection__connect-screen-layout__right{box-sizing:border-box}.jp-connection__connect-screen-layout__left{padding:25px}@media(min-width:600px){.jp-connection__connect-screen-layout__left{padding:64px 96px}}.jp-connection__connect-screen-layout__left .jetpack-logo{margin-bottom:24px}.jp-connection__connect-screen-layout__left h2{color:var(--jp-black);font-size:36px;font-style:normal;font-weight:700;line-height:40px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left h3{color:var(--jp-black);font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left li,.jp-connection__connect-screen-layout__left p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.jp-connection__connect-screen-layout__left p{color:#101517;margin:16px 0}.jp-connection__connect-screen-layout__left a{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__connect-screen-layout__left a:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-layout__left a:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__connect-screen-layout__left ul{list-style-type:none;padding:0}.jp-connection__connect-screen-layout__left ul li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-left:30px}.jp-connection__connect-screen-layout__right{padding:64px 0}.jp-connection__connect-screen-layout__right img{max-width:100%}.jp-connection__connect-screen-layout__two-columns{display:flex;flex-wrap:wrap}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:100%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:52%}}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{background:#f9f9f6;display:none;flex-basis:47%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{display:block}}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-20:#a7aaad;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-80:#8a2424;--jp-gray-off:#e2e2df;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-components__pricing-card{background:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 10px 40px rgba(0,0,0,.08);max-width:384px;padding:24px 24px 32px;width:-moz-fit-content;width:fit-content}@media screen and (min-width:600px){.jp-components__pricing-card{padding:32px 32px 44px}}.jp-components__pricing-card__icon img{height:32px;width:32px}.jp-components__pricing-card__title{color:#101517;font-size:32px;line-height:38px;margin:16px 0 24px}.jp-components__pricing-card__pricing{display:flex;flex-wrap:wrap}.jp-components__pricing-card__price-after,.jp-components__pricing-card__price-before{display:inline-block;font-size:54px;font-weight:700;line-height:40px;margin-bottom:8px;padding:0 2px}.jp-components__pricing-card__price-before{color:var(--jp-gray-20);margin-right:16px;position:relative}.jp-components__pricing-card__price-strikethrough{background:var(--jp-pink);border-radius:1.5px;height:3px;left:0;position:absolute;top:20px;width:100%}.jp-components__pricing-card__price-after{color:var(--jp-black)}.jp-components__pricing-card__currency{font-size:var(--font-title-small);font-weight:400;line-height:20px;vertical-align:super}.jp-components__pricing-card__price-details{align-self:flex-end;color:var(--jp-gray-50);font-size:14px;font-weight:400;letter-spacing:-.02em;line-height:17px;margin-bottom:8px}.jp-components__pricing-card__price-decimal{font-size:var(--font-label);line-height:14px;vertical-align:top}.jp-components__pricing-card__button{align-items:center;background:var(--jp-black);border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-components__pricing-card__info{color:var(--jp-gray-60);font-size:var(--font-label);letter-spacing:-.02em;line-height:20px}
\ No newline at end of file +#jetpack-connection-ui-container .jetpack-cui__header h1{font-size:4.6em;line-height:1.2em;text-align:left}#jetpack-connection-ui-container{margin:40px}#jetpack-connection-ui-container p{font-size:1.23em;line-height:1.5em}.jp-connection-status-card h3{color:var(--jp-black);font-size:var(--font-title-large);font-weight:700;line-height:1.1;margin:0}.jp-connection-status-card a,.jp-connection-status-card a:active,.jp-connection-status-card a:hover{color:var(--jp-black)}.jp-connection-status-card p{color:var(--jp-black);margin:16px 0}.jp-connection-status-card a,.jp-connection-status-card li,.jp-connection-status-card p{font-size:var(--font-body);line-height:24px}.jp-connection-status-card--status{align-items:center;display:flex;margin:24px 0 24px -6px}.jp-connection-status-card--cloud{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDIiIGhlaWdodD0iNDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PG1hc2sgaWQ9ImEiIG1hc2stdHlwZT0iYWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjciIHk9IjkiIHdpZHRoPSIyOCIgaGVpZ2h0PSIyMSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMC4zMzMgMTcuNjk3di0uMDhjMC00LjI1My0zLjc2LTcuNy04LjQtNy43LTMuOTE2IDAtNy4yMDYgMi40NTctOC4xMzYgNS43OGE2LjM4NiA2LjM4NiAwIDAgMC0uMjY0LS4wMDVDOS45MjUgMTUuNjkyIDcgMTguNzA4IDcgMjIuNDI5czIuOTI1IDYuNzM4IDYuNTMzIDYuNzM4SDI5LjRjMy4wOTMgMCA1LjYtMi41ODYgNS42LTUuNzc1IDAtMi44NjEtMi4wMTgtNS4yMzctNC42NjYtNS42OTVaIiBmaWxsPSIjZmZmIi8+PC9tYXNrPjxnIG1hc2s9InVybCgjYSkiPjxwYXRoIGQ9Im0zMC4zMzMgMTcuNjk3LTIuNjI1LS4wMy0uMDI1IDIuMjM1IDIuMjAyLjM4MS40NDgtMi41ODZabS0xNi41MzctMi0uMTA3IDIuNjIzIDIuMDc1LjA4NS41Ni0yLTIuNTI4LS43MDhabS0uMjYzIDEzLjQ3djIuNjI1aC4wMDhsLS4wMDgtMi42MjVabS4wNCAwdi0yLjYyNWgtLjAwOWwuMDA4IDIuNjI1Wm0xNS43OTUgMCAuMDE1LTIuNjI1aC0uMDE1djIuNjI1Wm0zLjU5LTExLjQ0MXYtLjExaC01LjI1di4wNTJsNS4yNS4wNThabTAtLjExYzAtNS45MTItNS4xNTUtMTAuMzI0LTExLjAyNS0xMC4zMjR2NS4yNWMzLjQxIDAgNS43NzUgMi40ODIgNS43NzUgNS4wNzVoNS4yNVpNMjEuOTMzIDcuMjkzYy00Ljk4NCAwLTkuMzg4IDMuMTM5LTEwLjY2NCA3LjY5OGw1LjA1NSAxLjQxNWMuNTg1LTIuMDg5IDIuNzYyLTMuODYzIDUuNjEtMy44NjN2LTUuMjVabS04LjAzIDUuNzgyYTkuMTExIDkuMTExIDAgMCAwLS4zNy0uMDA3djUuMjVjLjA1MyAwIC4xMDUuMDAxLjE1Ni4wMDNsLjIxNS01LjI0NlptLS4zNy0uMDA3Yy01LjEzMyAwLTkuMTU4IDQuMjY4LTkuMTU4IDkuMzYyaDUuMjVjMC0yLjM0OCAxLjgyNS00LjExMiAzLjkwOC00LjExMnYtNS4yNVptLTkuMTU4IDkuMzYyYzAgNS4wOTUgNC4wMjUgOS4zNjMgOS4xNTggOS4zNjN2LTUuMjVjLTIuMDgzIDAtMy45MDgtMS43NjUtMy45MDgtNC4xMTNoLTUuMjVabTkuMTY2IDkuMzYzaC4wNGwtLjAxNy01LjI1aC0uMDM5bC4wMTYgNS4yNVptLjAzMSAwaDE1Ljc5NnYtNS4yNUgxMy41NzJ2NS4yNVptMTUuODI3LTUuMjVoLS4wMTZsLS4wMyA1LjI1aC4wNDZ2LTUuMjVabTIuOTc1LTMuMTVjMCAxLjgxNi0xLjQwNyAzLjE1LTIuOTc1IDMuMTV2NS4yNWM0LjYxOCAwIDguMjI1LTMuODM4IDguMjI1LTguNGgtNS4yNVptLTIuNDg5LTMuMTA5YzEuMzU1LjIzNSAyLjQ5IDEuNDg4IDIuNDkgMy4xMDloNS4yNWMwLTQuMTAyLTIuOTAyLTcuNi02Ljg0NC04LjI4MmwtLjg5NiA1LjE3M1oiIGZpbGw9IiMxRTFFMUUiLz48L2c+PC9zdmc+);height:42px;margin-right:4px;width:42px}.jp-connection-status-card--jetpack-logo{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE2IDMyYzguODM3IDAgMTYtNy4xNjMgMTYtMTZTMjQuODM3IDAgMTYgMCAwIDcuMTYzIDAgMTZzNy4xNjMgMTYgMTYgMTZaIiBmaWxsPSIjMDAwIi8+PHBhdGggZD0iTTE2Ljc5NCAxMy4zMTN2MTUuNTExbDgtMTUuNTEyaC04Wk0xNS4xNzUgMTguNjU3VjMuMTc2bC03Ljk2OSAxNS40OGg3Ljk3WiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==);height:32px;margin-left:11px;width:32px}.jp-connection-status-card--btn-connect-user{font-size:var(--font-body);font-weight:400;line-height:24px}.jp-connection-status-card--avatar{background-color:var(--jp-white);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='16' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.498 27.123C6.038 24.165 10.916 21.5 16 21.5c5.084 0 9.963 2.665 11.502 5.623a15.952 15.952 0 0 1-11.257 4.875L16 32l-.245-.002a15.952 15.952 0 0 1-11.257-4.875zM16 8a6 6 0 1 1 0 12 6 6 0 0 1 0-12z' fill='%23A2AAB2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;border:0;border-radius:20px;height:32px;margin-left:-10px;width:32px}.jp-connection-status-card--line{border-top:2px solid var(--jp-black);height:0;width:67px}.jp-connection-status-card--line.jp-connection-status-card--site-only{border-top-style:dashed}.jp-connection-status-card--list{list-style-type:none;margin:16px 0}.jp-connection-status-card--list li{color:var(--jp-black);margin:0 0 8px -3px;padding-left:25px}.jp-connection-status-card--list-item-success{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTE4LjkzNSA2LTguOSAxMS45Ny01LjE2Mi0zLjgzNyIgc3Ryb2tlPSIjMUUxRTFFIiBzdHJva2Utd2lkdGg9IjEuNSIvPjwvc3ZnPg==) no-repeat 0 0}.jp-connection-status-card--list-item-error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 0 0;color:var(--jp-red-60)!important}.jp-connection-status-card--list-item-info{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjMDAwIi8+PC9zdmc+) no-repeat 0 0}.WQVtrU6q0L1Igcj7wCrQ{margin:0;padding:0}.UujoBFTnQNY2cWU2SIsH{font-size:var(--font-headline-medium);font-weight:700;line-height:52px}.TeGO5V_thHw5lDAm1_2M{font-weight:700}.TeGO5V_thHw5lDAm1_2M,.WolQzb2MsSgiNmLtc7_j{font-size:var(--font-headline-small);line-height:40px}.WolQzb2MsSgiNmLtc7_j{font-weight:400}.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);font-weight:500;line-height:32px}.zY2No8Ga4b8shbOQGhnv{font-size:var(--font-title-small);font-weight:500;line-height:30px}.tIj0D1t8Cc892ikmgFPZ{font-size:var(--font-body);font-weight:400;line-height:24px}.KdcN0BnOaVeVhyLRKqhS{font-size:var(--font-body-small);font-weight:400;line-height:24px}.dso3Rh3tl3Xv1GumBktz{font-size:var(--font-body-extra-small);font-weight:400;line-height:20px}.PItlW5vRExLnTj4a8eLE{font-size:var(--font-body-extra-small);font-weight:600;line-height:16px}.TwRpPlktzxhmFVeua7P5{margin:calc(var( --spacing-base )*0)}.zVfqx7gyb3o9mxfGynn1{margin-left:calc(var( --spacing-base )*0);margin-right:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy{margin-bottom:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy,.xqDIp6cNVr_E6RXaiPyD{margin-top:calc(var( --spacing-base )*0)}.S8EwaXk1kyPizt6x4WH2{margin-right:calc(var( --spacing-base )*0)}.ODX5Vr1TARoLFkDDFooD{margin-bottom:calc(var( --spacing-base )*0)}.cphJ8dCpfimnky7P2FHg{margin-left:calc(var( --spacing-base )*0)}.PFgIhNxIyiSuNvQjAIYj{margin:calc(var( --spacing-base )*1)}.M2jKmUzDxvJjjVEPU3zn{margin-left:calc(var( --spacing-base )*1);margin-right:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk{margin-bottom:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk,.rcTN5uw9xIEeMEGL3Xi_{margin-top:calc(var( --spacing-base )*1)}.CQSkybjq2TcRM1Xo9COV{margin-right:calc(var( --spacing-base )*1)}.hfqOWgq6_MEGdFE82eOY{margin-bottom:calc(var( --spacing-base )*1)}.I8MxZQYTbuu595yfesWA{margin-left:calc(var( --spacing-base )*1)}.kQkc6rmdpvLKPkyoJtVQ{margin:calc(var( --spacing-base )*2)}.j6vFPxWuu4Jan2ldoxpp{margin-left:calc(var( --spacing-base )*2);margin-right:calc(var( --spacing-base )*2)}.hqr39dC4H_AbactPAkCG{margin-bottom:calc(var( --spacing-base )*2)}.c3dQnMi16C6J6Ecy4283,.hqr39dC4H_AbactPAkCG{margin-top:calc(var( --spacing-base )*2)}.YNZmHOuRo6hU7zzKfPdP{margin-right:calc(var( --spacing-base )*2)}.Db8lbak1_wunpPk8NwKU{margin-bottom:calc(var( --spacing-base )*2)}.ftsYE5J9hLzquQ0tA5dY{margin-left:calc(var( --spacing-base )*2)}.Det4MHzLUW7EeDnafPzq{margin:calc(var( --spacing-base )*3)}.h_8EEAztC29Vve1datb5{margin-left:calc(var( --spacing-base )*3);margin-right:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM{margin-bottom:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM,.soADBBkcIKCBXzCTuV9_{margin-top:calc(var( --spacing-base )*3)}.zSX59ziEaEWGjnpZa4uV{margin-right:calc(var( --spacing-base )*3)}.yrVTnq_WBMbejg89c2ZQ{margin-bottom:calc(var( --spacing-base )*3)}.UKtHPJnI2cXBWtPDm5hM{margin-left:calc(var( --spacing-base )*3)}.guexok_Tqd5Tf52hRlbT{margin:calc(var( --spacing-base )*4)}.oS1E2KfTBZkJ3F0tN7T6{margin-left:calc(var( --spacing-base )*4);margin-right:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd{margin-bottom:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd,.ot2kkMcYHv53hLZ4LSn0{margin-top:calc(var( --spacing-base )*4)}.A1krOZZhlQ6Sp8Cy4bly{margin-right:calc(var( --spacing-base )*4)}.pkDbXXXL32237M0hokEh{margin-bottom:calc(var( --spacing-base )*4)}.XXv4kDTGvEnQeuGKOPU3{margin-left:calc(var( --spacing-base )*4)}.yGqHk1a57gaISwkXwXe6{margin:calc(var( --spacing-base )*5)}.X8cghM358X3DkXLc9aNK{margin-left:calc(var( --spacing-base )*5);margin-right:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f{margin-bottom:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f,.yqeuzwyGQ7zG0avrGqi_{margin-top:calc(var( --spacing-base )*5)}.g9emeCkuHvYhveiJbfXO{margin-right:calc(var( --spacing-base )*5)}.Lvk3dqcyHbZ07QCRlrUQ{margin-bottom:calc(var( --spacing-base )*5)}.r3yQECDQ9qX0XZzXlVAg{margin-left:calc(var( --spacing-base )*5)}.aQhlPwht2Cz1X_63Miw0{margin:calc(var( --spacing-base )*6)}.JyHb0vK3wJgpblL9s5j8{margin-left:calc(var( --spacing-base )*6);margin-right:calc(var( --spacing-base )*6)}.cY2gULL1lAv6WPNIRuf3{margin-bottom:calc(var( --spacing-base )*6)}.NBWQ9Lwhh_fnry3lg_p7,.cY2gULL1lAv6WPNIRuf3{margin-top:calc(var( --spacing-base )*6)}.yIOniNe5E40C8fWvBm5V{margin-right:calc(var( --spacing-base )*6)}.t30usboNSyqfQWIwHvT3{margin-bottom:calc(var( --spacing-base )*6)}.Nm_TyFkYCMhOoghoToKJ{margin-left:calc(var( --spacing-base )*6)}.C4qJKoBXpgKtpmrqtEKB{margin:calc(var( --spacing-base )*7)}.S93Srbu6NQ_PBr7DmTiD{margin-left:calc(var( --spacing-base )*7);margin-right:calc(var( --spacing-base )*7)}.fJj8k6gGJDks3crUZxOS{margin-bottom:calc(var( --spacing-base )*7)}.cW6D6djs7Ppm7fD7TeoV,.fJj8k6gGJDks3crUZxOS{margin-top:calc(var( --spacing-base )*7)}.DuCnqNfcxcP3Z__Yo5Ro{margin-right:calc(var( --spacing-base )*7)}.im8407m2fw5vOg7O2zsw{margin-bottom:calc(var( --spacing-base )*7)}.G0fbeBgvz2sh3uTP9gNl{margin-left:calc(var( --spacing-base )*7)}.kvW3sBCxRxUqz1jrVMJl{margin:calc(var( --spacing-base )*8)}.tOjEqjLONQdkiYx_XRnw{margin-left:calc(var( --spacing-base )*8);margin-right:calc(var( --spacing-base )*8)}.op5hFSx318zgxsoZZNLN{margin-bottom:calc(var( --spacing-base )*8)}.c9WfNHP6TFKWIfLxv52J,.op5hFSx318zgxsoZZNLN{margin-top:calc(var( --spacing-base )*8)}.sBA75QqcqRwwYSHJh2wc{margin-right:calc(var( --spacing-base )*8)}.GpL6idrXmSOM6jB8Ohsf{margin-bottom:calc(var( --spacing-base )*8)}.HbtWJoQwpgGycz8dGzeT{margin-left:calc(var( --spacing-base )*8)}.uxX3khU88VQ_Ah49Ejsa{padding:calc(var( --spacing-base )*0)}.KX0FhpBKwKzs9fOUdbNz{padding-left:calc(var( --spacing-base )*0);padding-right:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz{padding-bottom:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz,.emxLHRjQuJsImnPbQIzE{padding-top:calc(var( --spacing-base )*0)}.kJ8WzlpTVgdViXt8ukP9{padding-right:calc(var( --spacing-base )*0)}.tg_UIUI11VBzrTAn2AzJ{padding-bottom:calc(var( --spacing-base )*0)}.uczvl8kaz84oPQJ2DB2R{padding-left:calc(var( --spacing-base )*0)}.o7UHPcdVK3lt7q3lqV4o{padding:calc(var( --spacing-base )*1)}.IDqEOxvDoYrFYxELPmtX{padding-left:calc(var( --spacing-base )*1);padding-right:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2{padding-bottom:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2,.npy3hw4A5QSkDicb2CJJ{padding-top:calc(var( --spacing-base )*1)}.LgbptTApNY5NwLQvEFAt{padding-right:calc(var( --spacing-base )*1)}.WZQy2SZuZso59bUsXXyl{padding-bottom:calc(var( --spacing-base )*1)}.o331apInxNunbYB3SfPE{padding-left:calc(var( --spacing-base )*1)}.fMPIyD9Vqki1Lrc_yJnG{padding:calc(var( --spacing-base )*2)}.i2pMcTcdrr10IQoiSm_L{padding-left:calc(var( --spacing-base )*2);padding-right:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH{padding-bottom:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH,.o9bGieUKcYc8o0Ij9oZX{padding-top:calc(var( --spacing-base )*2)}.SwZcFez1RDqWsOFjB5iG{padding-right:calc(var( --spacing-base )*2)}.eHpLc_idmuEqeqCTvqkN{padding-bottom:calc(var( --spacing-base )*2)}.vU39i2B4P1fUTMB2l6Vo{padding-left:calc(var( --spacing-base )*2)}.JHWNzBnE29awhdu5BEh1{padding:calc(var( --spacing-base )*3)}.X72lGbb56L3KFzC2xQ9N{padding-left:calc(var( --spacing-base )*3);padding-right:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e{padding-bottom:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e,.srV0KSDC83a2fiimSMMQ{padding-top:calc(var( --spacing-base )*3)}.lUWfkmbQjCskhcNwkyCm{padding-right:calc(var( --spacing-base )*3)}.Ts0dIlc3aTSL7V4cIHis{padding-bottom:calc(var( --spacing-base )*3)}.CzlqQXXhX6MvorArFZ8B{padding-left:calc(var( --spacing-base )*3)}.TqMPkQtR_DdZuKb5vBoV{padding:calc(var( --spacing-base )*4)}.a7UrjhI69Vetlcj9ZVzz{padding-left:calc(var( --spacing-base )*4);padding-right:calc(var( --spacing-base )*4)}.StEhBzGs2Gi5dDEkjhAv{padding-bottom:calc(var( --spacing-base )*4)}.FGneZfZyvYrt1dG0zcnm,.StEhBzGs2Gi5dDEkjhAv{padding-top:calc(var( --spacing-base )*4)}.APEH216rpdlJWgD2fHc8{padding-right:calc(var( --spacing-base )*4)}.oGwXC3ohCic9XnAj6x69{padding-bottom:calc(var( --spacing-base )*4)}.U6gnT9y42ViPNOcNzBwb{padding-left:calc(var( --spacing-base )*4)}.IpdRLBwnHqbqFrixgbYC{padding:calc(var( --spacing-base )*5)}.HgNeXvkBa9o3bQ5fvFZm{padding-left:calc(var( --spacing-base )*5);padding-right:calc(var( --spacing-base )*5)}.tJtFZM3XfPG9v9TSDfN1{padding-bottom:calc(var( --spacing-base )*5)}.PdifHW45QeXYfK568uD8,.tJtFZM3XfPG9v9TSDfN1{padding-top:calc(var( --spacing-base )*5)}.mbLkWTTZ0Za_BBbFZ5b2{padding-right:calc(var( --spacing-base )*5)}.vVWpZpLlWrkTt0hMk8XU{padding-bottom:calc(var( --spacing-base )*5)}.RxfaJj5a1Nt6IavEo5Zl{padding-left:calc(var( --spacing-base )*5)}.SppJULDGdnOGcjZNCYBy{padding:calc(var( --spacing-base )*6)}.palY2nLwdoyooPUm9Hhk{padding-left:calc(var( --spacing-base )*6);padding-right:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_{padding-bottom:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_,.YEEJ9b90ueQaPfiU8aeN{padding-top:calc(var( --spacing-base )*6)}.QE0ssnsKvWJMqlhPbY5u{padding-right:calc(var( --spacing-base )*6)}.n8yA3jHlMRyLd5UIfoND{padding-bottom:calc(var( --spacing-base )*6)}.tXHmxYnHzbwtfxEaG51n{padding-left:calc(var( --spacing-base )*6)}.kBTsPKkO_3g_tLkj77Um{padding:calc(var( --spacing-base )*7)}.RyhrFx6Y1FGDrGAAyaxm{padding-left:calc(var( --spacing-base )*7);padding-right:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO{padding-bottom:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO,.vQVSq6SvWKbOMu6r4H6b{padding-top:calc(var( --spacing-base )*7)}.oBy5__aEADMsH46mrgFX{padding-right:calc(var( --spacing-base )*7)}.KVEXoJqf1s92j0JMdNmN{padding-bottom:calc(var( --spacing-base )*7)}.ZMXGNrNaKW3k_3TLz0Fq{padding-left:calc(var( --spacing-base )*7)}.tuiR9PhkHXhGyEgzRZRI{padding:calc(var( --spacing-base )*8)}.U7454qyWkQNa2iaSJziu{padding-left:calc(var( --spacing-base )*8);padding-right:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8{padding-bottom:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8,.X1rm9DQ1zLGLfogja5Gn{padding-top:calc(var( --spacing-base )*8)}.JS7G6kAuqJo5GIuF8S5t{padding-right:calc(var( --spacing-base )*8)}.Y8F9ga1TDCMbM1lj4gUz{padding-bottom:calc(var( --spacing-base )*8)}.AJuyNGrI63BOWql719H8{padding-left:calc(var( --spacing-base )*8)}.zI5tJ_qhWE6Oe6Lk75GY{--wp-admin-theme-color:var(--jp-black);--wp-admin-theme-color-darker-10:var(--jp-black-80);--wp-admin-theme-color-darker-20:var(--jp-black-80);--wp-admin-border-width-focus:1.5px;border-radius:var(--jp-border-radius);font-weight:600;justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF{font-size:var(--font-body);height:auto;line-height:24px;padding:var(--spacing-base) calc(var(--spacing-base)*3)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF.paGLQwtPEaJmtArCcmyK{padding:var(--spacing-base) calc(var(--spacing-base)*2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14{font-size:var(--font-body-extra-small);height:auto;line-height:20px;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14.paGLQwtPEaJmtArCcmyK>svg:first-child{margin-right:calc(var(--spacing-base)/2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14>.components-spinner{height:20px}.zI5tJ_qhWE6Oe6Lk75GY.lZAo6_oGfclXOO9CC6Rd{font-weight:400}.zI5tJ_qhWE6Oe6Lk75GY.is-primary:disabled,.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:disabled{background:var(--jp-gray);color:var(--jp-gray-20)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:active:not(:disabled),.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:hover:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-link.Na39I683LAaSA99REg14,.zI5tJ_qhWE6Oe6Lk75GY.is-link.ipS7tKy9GntCS4R3vekF{padding:0}.zI5tJ_qhWE6Oe6Lk75GY.is-link:hover:not(:disabled){text-decoration-thickness:3px}.zI5tJ_qhWE6Oe6Lk75GY.is-link:focus:not(:disabled){text-decoration-line:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:not(:disabled){background:var(--jp-red-50);box-shadow:inset 0 0 0 1px var(--jp-red-50);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:hover:not(:disabled){background:var(--jp-red-60);box-shadow:inset 0 0 0 1px var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:focus:not(:disabled){background:var(--jp-red-70);box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:active:not(:disabled){background:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:not(:disabled){background:var(--jp-white);box-shadow:inset 0 0 0 1px var(--jp-red-50);color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:hover:not(:disabled){background:var(--jp-red-0);box-shadow:inset 0 0 0 1px var(--jp-red-60);color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:active:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:not(:disabled){color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:hover:not(:disabled){box-shadow:none;color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6{position:relative}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6.has-icon{justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>:not(.components-spinner){visibility:hidden}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>.components-spinner{margin:0;position:absolute}.CDuBjJp_8jxzx5j6Nept{margin-left:calc(var(--spacing-base)/2)}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-small);font-weight:600;line-height:1.2;margin-top:0}.jp-connection__disconnect-dialog h2{font-size:var(--font-title-small);font-weight:400;line-height:1.2;margin:0}.jp-connection__disconnect-dialog p{font-size:var(--font-body);margin-top:0}.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog__large-text{font-size:1.25rem}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link,.jp-connection__disconnect-dialog__link{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:hover,.jp-connection__disconnect-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:focus,.jp-connection__disconnect-dialog__link:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link--bold,.jp-connection__disconnect-dialog__link--bold{font-weight:700}.jp-connection__disconnect-dialog .components-button{border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection__disconnect-dialog .components-modal__content{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0}.jp-connection__disconnect-dialog .components-modal__content:before,.jp-connection__disconnect-dialog .components-modal__header{display:none}.jp-connection__disconnect-dialog .jp-row{align-items:center;width:calc(100% - 48px)}.jp-connection__disconnect-dialog__content{align-items:center;background:var(--jp-white-off);border-radius:4px;display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0;padding:2rem 1rem;text-align:center}.jp-connection__disconnect-dialog__actions{background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;padding:2rem 0;position:sticky}.jp-connection__disconnect-dialog__actions p{margin-bottom:0}.jp-connection__disconnect-dialog__actions:before{background:linear-gradient(to bottom,transparent,var(--jp-white-off));bottom:calc(100% + 1px);content:"";display:block;height:80px;left:0;position:absolute;width:100%}.jp-connection__disconnect-dialog__btn-dismiss,.jp-connection__disconnect-dialog__btn-dismiss.components-button{background:var(--jp-black)!important;margin-right:10px}.jp-connection__disconnect-dialog__btn-disconnect{background:var(--jp-red)!important}.jp-connection__disconnect-dialog__btn-back-to-wp{background:var(--jp-black)!important}.jp-connection__disconnect-dialog__button-wrap{text-align:left}@media(min-width:960px){.jp-connection__disconnect-dialog__button-wrap{text-align:center}}.jp-connection__disconnect-dialog__error{color:var(--jp-red)}.jp-connection__disconnect-dialog__survey{margin-bottom:1.5rem;max-width:100%}.jp-connection__disconnect-dialog__step-copy{margin:0 auto;max-width:800px}.jp-connection__disconnect-dialog__step-copy--narrow{max-width:600px}@media(max-height:900px){.jp-connection__disconnect-dialog__content .jp-components__decorative-card{display:none}}@media(min-width:600px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{max-width:calc(100% - 32px);width:100%}.jp-connection__disconnect-dialog__actions,.jp-connection__disconnect-dialog__content{padding:2rem}}@media(min-width:960px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{display:flex;flex-direction:column;height:900px;width:1200px}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-large)}.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog__large-text{font-size:1.5rem}.jp-connection__disconnect-dialog__content{padding:80px}.jp-connection__disconnect-dialog__actions{padding:2rem 3rem}.jp-row{margin-left:0}}.jp-connection__disconnect-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:0 auto 1rem;max-width:100%;padding:1rem 2rem;text-align:left;width:800px}.jp-connection__disconnect-card__group{margin-bottom:1rem;max-width:100%}.jp-connection__disconnect-card__card-content{display:block;font-size:.875rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-content{align-items:center;display:flex;justify-content:space-between}}.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{flex-shrink:0;font-size:1.25rem;font-weight:600;margin-bottom:0;margin-top:0}@media only screen and (min-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{font-size:1.5rem;margin-right:1.5rem}}@media only screen and (max-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block,.jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block{margin-top:.5rem}}.jp-connection__disconnect-card__card-stat-block{align-items:baseline;display:flex;flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat-block{flex-direction:row-reverse}}.jp-connection__disconnect-card__card-description{flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-description{text-align:right}}.jp-connection__disconnect-card__card-stat{font-size:1rem;font-weight:600;margin-right:.5rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat{font-size:1.5rem;margin-left:1rem;margin-right:0}}.jp-components__decorative-card{border-radius:8px;box-shadow:0 0 15px var(--jp-gray);display:flex;height:280px;margin:0 auto 3rem;max-width:100%;overflow:hidden;position:relative;width:360px}.jp-components__decorative-card__content,.jp-components__decorative-card__image{width:50%}.jp-components__decorative-card__image{background:var(--jp-gray);background-size:cover;position:relative}.jp-components__decorative-card__image:before{background-image:url('data:image/svg+xml;uf8,<svg width="38" height="8" viewBox="0 0 38 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 7C1 7 2.37087 1 6.89831 1C11.4257 1 14.3709 7 18.8983 7C23.4257 7 26.7777 1 31.3051 1C35.912 1 37 7 37 7" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>');content:"";display:block;height:8px;left:24px;position:absolute;top:24px;width:38px}.jp-components__decorative-card__content{background:#fff;padding:2rem}.jp-components__decorative-card__icon-container{background:var(--jp-red);border-radius:50px;height:80px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:80px}.jp-components__decorative-card__icon{background-position:50%,50%;background-repeat:no-repeat;height:40px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:40px}.jp-components__decorative-card__icon--unlink{background-image:url('data:image/svg+xml;uf8,<svg width="34" height="37" viewBox="0 0 34 37" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.3335 10.001H25.0002C29.4184 10.001 33.0002 13.5827 33.0002 18.001V19.7788C33.0002 24.197 29.4184 27.7788 25.0002 27.7788H22.3335" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M11.6675 27.7783L9.00082 27.7783C4.58254 27.7783 1.00081 24.1966 1.00081 19.7783L1.00081 18.0005C1.00081 13.5823 4.58253 10.0005 9.00081 10.0005L11.6675 10.0005" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M10.9998 19.167L16.9998 19.167" stroke="white" stroke-width="1.5"/> <path d="M8.99951 35.998L24.9995 0.998048" stroke="white"/> </svg>')}.jp-components__decorative-card__lines,.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{background:#e9eff5;border-radius:6px;display:block;height:12px;position:relative;width:100%}.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{content:"";top:calc(100% + 16px)}.jp-components__decorative-card__lines:after{top:calc(100% + 32px);width:75%}.jp-components__decorative-card--vertical{flex-direction:column}.jp-components__decorative-card--vertical .jp-components__decorative-card__content,.jp-components__decorative-card--vertical .jp-components__decorative-card__image{height:50%;width:100%}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines{margin-left:auto;margin-right:auto;max-width:135px}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:after,.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:before{margin-left:auto;margin-right:auto}.jp-connect__disconnect-survey-card{border:2px solid transparent;border-radius:4px;box-shadow:0 0 15px var(--jp-gray-off);margin-left:auto;margin-right:auto;max-width:100%;padding:1rem;position:relative;text-align:left;width:800px}.jp-connect__disconnect-survey-card--selected{background:var(--jp-gray-off);border-color:var(--jp-black)}.jp-connect__disconnect-survey-card:after{border-right:2px solid var(--jp-black);border-top:2px solid var(--jp-black);content:"";display:block;height:5px;position:absolute;right:1.5rem;top:50%;transform:translateY(-50%) rotate(45deg);width:5px}.jp-connect__disconnect-survey-card:hover{cursor:pointer}.jp-connect__disconnect-survey-card:focus:not(.jp-disconnect-survey-card--selected),.jp-connect__disconnect-survey-card:hover:not(.jp-disconnect-survey-card--selected){border-color:var(--jp-black-80)}.jp-connect__disconnect-survey-card__answer{align-items:center;display:flex;font-weight:700;margin:0}input.jp-connect__disconnect-survey-card__input{-webkit-appearance:none;background-color:transparent;border:none;color:var(--jp-black-80);flex-grow:1;max-width:calc(100% - 40px);padding-right:40px}@media(min-width:1080px){.jp-connection__connect-screen-layout__left{width:70%}.jp-connection__connect-screen-required-plan{background:linear-gradient(90deg,#fff 70%,#f9f9f6 0);position:relative}}.jp-connection__connect-screen-required-plan__loading{display:none}@media(min-width:1080px){.jp-connection__connect-screen-required-plan__pricing-card{left:62%;position:absolute;top:14%}}.jp-connection__connect-screen-required-plan__pricing-card .jp-action-button--button.components-button{align-items:center;background:var(--jp-black)!important;border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;font-weight:500;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-connection__connect-screen-required-plan__with-subscription{margin-top:38px}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button{display:inline}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button{background:inherit!important;color:var(--jp-black)!important;display:inline;font-size:var(--font-title-small);font:inherit;height:auto;line-height:20px;min-width:0;padding:0;text-decoration:underline;width:auto}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button:hover{background:inherit;text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button:focus{background:inherit;box-shadow:none!important}.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__inner,.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__outer{border-right-color:var(--jp-black);border-top-color:var(--jp-black)}.jp-action-button--button{background:#000}.jp-action-button--button,.jp-action-button--button.components-button{border-radius:4px;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-style:normal;font-weight:600;height:40px;line-height:18px;min-width:264px;text-align:center}.jp-action-button__error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 0 0;color:var(--jp-red)!important;line-height:25px!important;padding-left:25px}.jp-connection__connect-screen-layout{background:var(--jp-white);border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.08)}.jp-connection__connect-screen-layout__loading{display:none}.jp-connection__connect-screen-layout__left,.jp-connection__connect-screen-layout__right{box-sizing:border-box}.jp-connection__connect-screen-layout__left{padding:25px}@media(min-width:600px){.jp-connection__connect-screen-layout__left{padding:64px 96px}}.jp-connection__connect-screen-layout__left .jetpack-logo{margin-bottom:24px}.jp-connection__connect-screen-layout__left h2{color:var(--jp-black);font-size:36px;font-style:normal;font-weight:700;line-height:40px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left h3{color:var(--jp-black);font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left li,.jp-connection__connect-screen-layout__left p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.jp-connection__connect-screen-layout__left p{color:#101517;margin:16px 0}.jp-connection__connect-screen-layout__left a{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__connect-screen-layout__left a:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-layout__left a:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__connect-screen-layout__left ul{list-style-type:none;padding:0}.jp-connection__connect-screen-layout__left ul li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-left:30px}.jp-connection__connect-screen-layout__right{padding:64px 0}.jp-connection__connect-screen-layout__right img{max-width:100%}.jp-connection__connect-screen-layout__two-columns{display:flex;flex-wrap:wrap}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:100%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:52%}}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{background:#f9f9f6;display:none;flex-basis:47%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{display:block}}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-10:#f2cf75;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-components__pricing-card{background:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 10px 40px rgba(0,0,0,.08);max-width:384px;padding:24px 24px 32px;width:-moz-fit-content;width:fit-content}@media screen and (min-width:600px){.jp-components__pricing-card{padding:32px 32px 44px}}.jp-components__pricing-card__icon img{height:32px;width:32px}.jp-components__pricing-card__title{color:#101517;font-size:32px;line-height:38px;margin:16px 0 24px}.jp-components__pricing-card__pricing{display:flex;flex-wrap:wrap}.jp-components__pricing-card__price-after,.jp-components__pricing-card__price-before{display:inline-block;font-size:54px;font-weight:700;line-height:40px;margin-bottom:8px;padding:0 2px}.jp-components__pricing-card__price-before{color:var(--jp-gray-20);margin-right:16px;position:relative}.jp-components__pricing-card__price-strikethrough{background:var(--jp-pink);border-radius:1.5px;height:3px;left:0;position:absolute;top:20px;width:100%}.jp-components__pricing-card__price-after{color:var(--jp-black)}.jp-components__pricing-card__currency{font-size:var(--font-title-small);font-weight:400;line-height:20px;vertical-align:super}.jp-components__pricing-card__price-details{align-self:flex-end;color:var(--jp-gray-50);font-size:14px;font-weight:400;letter-spacing:-.02em;line-height:17px;margin-bottom:8px}.jp-components__pricing-card__price-decimal{font-size:var(--font-label);line-height:14px;vertical-align:top}.jp-components__pricing-card__button{align-items:center;background:var(--jp-black);border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-components__pricing-card__info{color:var(--jp-gray-60);font-size:var(--font-label);letter-spacing:-.02em;line-height:20px}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.js index c8a04c5d..5dfeba6d 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.js @@ -1,4 +1,4 @@ /*! For license information please see index.js.LICENSE.txt */ -!function(){var e={4728:function(e,t,n){"use strict";n.d(t,{X:function(){return o}});var i={AED:{symbol:"د.إ.",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function o(e){return i[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},6078:function(e,t,n){"use strict";n.d(t,{LR:function(){return c}});var i=n(2141),o=n(3807),r=n(4728);function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},c=(0,r.X)(t);if(!c||isNaN(e))return null;var s=(0,i.Z)({},c,n),a=s.decimal,u=s.grouping,l=s.precision,p=s.symbol,d=e<0?"-":"",g=Math.abs(e),m=Math.floor(g),f=(0,o.Y4)(m,{decimals:0,thousandsSep:u,decPoint:a}),h=l>0?(0,o.Y4)(g-m,{decimals:l,thousandsSep:u,decPoint:a}).slice(1):"";return{sign:d,symbol:p,integer:f,fraction:h}}},8772:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var i=n(9196),o=n(5592);function r(e,t){let n,o,c=[];for(let i=0;i<e.length;i++){const r=e[i];if("string"!==r.type){if(void 0===t[r.value])throw new Error(`Invalid interpolation, missing component node: \`${r.value}\``);if("object"!=typeof t[r.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${r.value}\``);if("componentClose"===r.type)throw new Error(`Missing opening component token: \`${r.value}\``);if("componentOpen"===r.type){n=t[r.value],o=i;break}c.push(t[r.value])}else c.push(r.value)}if(n){const s=function(e,t){const n=t[e];let i=0;for(let o=e+1;o<t.length;o++){const e=t[o];if(e.value===n.value){if("componentOpen"===e.type){i++;continue}if("componentClose"===e.type){if(0===i)return o;i--}}}throw new Error("Missing closing component token `"+n.value+"`")}(o,e),a=r(e.slice(o+1,s),t),u=(0,i.cloneElement)(n,{},a);if(c.push(u),s<e.length-1){const n=r(e.slice(s+1),t);c=c.concat(n)}}return c=c.filter(Boolean),0===c.length?null:1===c.length?c[0]:(0,i.createElement)(i.Fragment,null,...c)}function c(e){const{mixedString:t,components:n,throwErrors:i}=e;if(!n)return t;if("object"!=typeof n){if(i)throw new Error(`Interpolation Error: unable to process \`${t}\` because components is not an object`);return t}const c=(0,o.Z)(t);try{return r(c,n)}catch(e){if(i)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}},5592:function(e,t,n){"use strict";function i(e){return e.startsWith("{{/")?{type:"componentClose",value:e.replace(/\W/g,"")}:e.endsWith("/}}")?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.startsWith("{{")?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}function o(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(i)}n.d(t,{Z:function(){return o}})},7538:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},9183:function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},8172:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(1354),o=n(4803);function r(e){var t=(0,i.Z)(e);return function(e){return(0,o.Z)(t,e)}}},4803:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function o(e,t){var n,o,r,c,s,a,u=[];for(n=0;n<e.length;n++){if(s=e[n],c=i[s]){for(o=c.length,r=Array(o);o--;)r[o]=u.pop();try{a=c.apply(null,r)}catch(e){return e}}else a=t.hasOwnProperty(s)?t[s]:+s;u.push(a)}return u[0]}},7478:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(8172);function o(e){var t=(0,i.Z)(e);return function(e){return+t({n:e})}}},1354:function(e,t,n){"use strict";var i,o,r,c;function s(e){for(var t,n,s,a,u=[],l=[];t=e.match(c);){for(n=t[0],(s=e.substr(0,t.index).trim())&&u.push(s);a=l.pop();){if(r[n]){if(r[n][0]===a){n=r[n][1]||n;break}}else if(o.indexOf(a)>=0||i[a]<i[n]){l.push(a);break}u.push(a)}r[n]||l.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&u.push(e),u.concat(l.reverse())}n.d(t,{Z:function(){return s}}),i={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},o=["(","?"],r={")":["("],":":["?","?:"]},c=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/},702:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function o(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(i,(function(){var e,i,o,r,c;return e=arguments[3],i=arguments[5],"%"===(r=arguments[9])?"%":("*"===(o=arguments[7])&&(o=t[n-1],n++),void 0!==i?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(i)&&(c=t[0][i]):(void 0===e&&(e=n),n++,c=t[e-1]),"f"===r?c=parseFloat(c)||0:"d"===r&&(c=parseInt(c)||0),void 0!==o&&("f"===r?c=c.toFixed(o):"s"===r&&(c=c.substr(0,o))),null!=c?c:"")}))}},9105:function(e,t){var n;!function(){"use strict";var i={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var c=o.apply(null,n);c&&e.push(c)}}else if("object"===r)if(n.toString===Object.prototype.toString)for(var s in n)i.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},5771:function(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(o=i))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(1244)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},1244:function(e,t,n){e.exports=function(e){function t(e){let n,o,r,c=null;function s(...e){if(!s.enabled)return;const i=s,o=Number(new Date),r=o-(n||o);i.diff=r,i.prev=n,i.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let c=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";c++;const r=t.formatters[o];if("function"==typeof r){const t=e[c];n=r.call(i,t),e.splice(c,1),c--}return n})),t.formatArgs.call(i,e);(i.log||t.log).apply(i,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==c?c:(o!==t.namespaces&&(o=t.namespaces,r=t.enabled(e)),r),set:e=>{c=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),o=i.length;for(n=0;n<o;n++)i[n]&&("-"===(e=i[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,i;for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1;for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(2002),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},2571:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function r(){r.init.call(this)}e.exports=r,e.exports.once=function(e,t){return new Promise((function(n,i){function o(n){e.removeListener(t,r),i(n)}function r(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}f(e,t,r,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,n)}(e,o,{once:!0})}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var c=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function u(e,t,n,i){var o,r,c,u;if(s(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),c=r[t]),void 0===c)c=r[t]=n,++e._eventsCount;else if("function"==typeof c?c=r[t]=i?[n,c]:[c,n]:i?c.unshift(n):c.push(n),(o=a(e))>0&&c.length>o&&!c.warned){c.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=c.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=l.bind(i);return o.listener=n,i.wrapFn=o,o}function d(e,t,n){var i=e._events;if(void 0===i)return[];var o=i[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):m(o,o.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function f(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(r){i.once&&e.removeEventListener(t,o),n(r)}))}}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),r.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return a(this)},r.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,r=this._events;if(void 0!==r)o=o&&void 0===r.error;else if(!o)return!1;if(o){var c;if(t.length>0&&(c=t[0]),c instanceof Error)throw c;var s=new Error("Unhandled error."+(c?" ("+c.message+")":""));throw s.context=c,s}var a=r[e];if(void 0===a)return!1;if("function"==typeof a)i(a,this,t);else{var u=a.length,l=m(a,u);for(n=0;n<u;++n)i(l[n],this,t)}return!0},r.prototype.addListener=function(e,t){return u(this,e,t,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(e,t){return u(this,e,t,!0)},r.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},r.prototype.removeListener=function(e,t){var n,i,o,r,c;if(s(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){c=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,c||t)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(o=r[i])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},r.prototype.listeners=function(e){return d(this,e,!0)},r.prototype.rawListeners=function(e){return d(this,e,!1)},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},r.prototype.listenerCount=g,r.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},5949:function(e,t,n){"use strict";var i=n(3566),o=n(8282);function r(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=r,r.prototype.update=function(e,t){if(e=i.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=i.join32(e,0,e.length-n,this.endian);for(var o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},r.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},r.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,i=new Array(n+this.padLength);i[0]=128;for(var o=1;o<n;o++)i[o]=0;if(e<<=3,"big"===this.endian){for(var r=8;r<this.padLength;r++)i[o++]=0;i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=e>>>24&255,i[o++]=e>>>16&255,i[o++]=e>>>8&255,i[o++]=255&e}else for(i[o++]=255&e,i[o++]=e>>>8&255,i[o++]=e>>>16&255,i[o++]=e>>>24&255,i[o++]=0,i[o++]=0,i[o++]=0,i[o++]=0,r=8;r<this.padLength;r++)i[o++]=0;return i}},9016:function(e,t,n){"use strict";var i=n(3566),o=n(5949),r=n(7574),c=i.rotl32,s=i.sum32,a=i.sum32_5,u=r.ft_1,l=o.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(d,l),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i<n.length;i++)n[i]=c(n[i-3]^n[i-8]^n[i-14]^n[i-16],1);var o=this.h[0],r=this.h[1],l=this.h[2],d=this.h[3],g=this.h[4];for(i=0;i<n.length;i++){var m=~~(i/20),f=a(c(o,5),u(m,r,l,d),g,n[i],p[m]);g=d,d=l,l=c(r,30),r=o,o=f}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],r),this.h[2]=s(this.h[2],l),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],g)},d.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},7574:function(e,t,n){"use strict";var i=n(3566).rotr32;function o(e,t,n){return e&t^~e&n}function r(e,t,n){return e&t^e&n^t&n}function c(e,t,n){return e^t^n}t.ft_1=function(e,t,n,i){return 0===e?o(t,n,i):1===e||3===e?c(t,n,i):2===e?r(t,n,i):void 0},t.ch32=o,t.maj32=r,t.p32=c,t.s0_256=function(e){return i(e,2)^i(e,13)^i(e,22)},t.s1_256=function(e){return i(e,6)^i(e,11)^i(e,25)},t.g0_256=function(e){return i(e,7)^i(e,18)^e>>>3},t.g1_256=function(e){return i(e,17)^i(e,19)^e>>>10}},3566:function(e,t,n){"use strict";var i=n(8282),o=n(9503);function r(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function c(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var i=0,o=0;o<e.length;o++){var c=e.charCodeAt(o);c<128?n[i++]=c:c<2048?(n[i++]=c>>6|192,n[i++]=63&c|128):r(e,o)?(c=65536+((1023&c)<<10)+(1023&e.charCodeAt(++o)),n[i++]=c>>18|240,n[i++]=c>>12&63|128,n[i++]=c>>6&63|128,n[i++]=63&c|128):(n[i++]=c>>12|224,n[i++]=c>>6&63|128,n[i++]=63&c|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=c,t.toHex32=function(e,t){for(var n="",i=0;i<e.length;i++){var o=e[i];"little"===t&&(o=c(o)),n+=a(o.toString(16))}return n},t.zero2=s,t.zero8=a,t.join32=function(e,t,n,o){var r=n-t;i(r%4==0);for(var c=new Array(r/4),s=0,a=t;s<c.length;s++,a+=4){var u;u="big"===o?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],c[s]=u>>>0}return c},t.split32=function(e,t){for(var n=new Array(4*e.length),i=0,o=0;i<e.length;i++,o+=4){var r=e[i];"big"===t?(n[o]=r>>>24,n[o+1]=r>>>16&255,n[o+2]=r>>>8&255,n[o+3]=255&r):(n[o+3]=r>>>24,n[o+2]=r>>>16&255,n[o+1]=r>>>8&255,n[o]=255&r)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,i){return e+t+n+i>>>0},t.sum32_5=function(e,t,n,i,o){return e+t+n+i+o>>>0},t.sum64=function(e,t,n,i){var o=e[t],r=i+e[t+1]>>>0,c=(r<i?1:0)+n+o;e[t]=c>>>0,e[t+1]=r},t.sum64_hi=function(e,t,n,i){return(t+i>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,i){return t+i>>>0},t.sum64_4_hi=function(e,t,n,i,o,r,c,s){var a=0,u=t;return a+=(u=u+i>>>0)<t?1:0,a+=(u=u+r>>>0)<r?1:0,e+n+o+c+(a+=(u=u+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,i,o,r,c,s){return t+i+r+s>>>0},t.sum64_5_hi=function(e,t,n,i,o,r,c,s,a,u){var l=0,p=t;return l+=(p=p+i>>>0)<t?1:0,l+=(p=p+r>>>0)<r?1:0,l+=(p=p+s>>>0)<s?1:0,e+n+o+c+a+(l+=(p=p+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,n,i,o,r,c,s,a,u){return t+i+r+s+u>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},8617:function(e,t,n){"use strict";var i=n(9128),o=n(8086),r=n(5771),c=n.n(r),s=n(8772),a=n(8090),u=n(5565),l=n.n(u),p=n(9016),d=n.n(p),g=n(2571),m=n(702),f=n(2846),h=c()("i18n-calypso"),y="number_format_decimals",v="number_format_thousands_sep",b="messages",_=[function(e){return e}],k={};function w(){N.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function j(e){return Array.prototype.slice.call(e)}function C(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&w("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",j(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&w("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",j(e));for(var n={},i=0;i<e.length;i++)"object"==typeof e[i]&&(n=e[i]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function E(e,t){return e.dcnpgettext(b,t.context,t.original,t.plural,t.count)}function S(e,t){for(var n=_.length-1;n>=0;n--){var i=_[n](Object.assign({},t)),o=i.context?i.context+""+i.original:i.original;if(e.state.locale[o])return E(e.state.tannin,i)}return null}function N(){if(!(this instanceof N))return new N;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:l()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new g.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}N.throwErrors=!1,N.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},N.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},N.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},N.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,i=t.decPoint||this.state.numberFormatSettings.decimal_point||".",o=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return(0,f.Z)(e,n,i,o)},N.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},N.prototype.setLocale=function(e){var t,n,i;if(e&&e[""]&&e[""]["key-hash"]){var r=e[""]["key-hash"],c=function(e,t){var n=!1===t?"":String(t);if(void 0!==k[n+e])return k[n+e];var i=d()().update(e).digest("hex");return k[n+e]=t?i.substr(0,t):i},s=function(e){return function(t){return t.context?(t.original=c(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=c(t.original,e),t}};if("sha1"===r.substr(0,4))if(4===r.length)_.push(s(!1));else{var u=r.substr(5).indexOf("-");if(u<0){var l=Number(r.substr(5));_.push(s(l))}else for(var p=Number(r.substr(5,u)),g=Number(r.substr(6+u)),m=p;m<=g;m++)_.push(s(m))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(i=n.momentjs_locale)||void 0===i?void 0:i.textDirection),this.state.tannin=new a.Z((0,o.Z)({},b,this.state.locale)),this.state.numberFormatSettings.decimal_point=E(this.state.tannin,C([y])),this.state.numberFormatSettings.thousands_sep=E(this.state.tannin,C([v])),this.state.numberFormatSettings.decimal_point===y&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===v&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},N.prototype.getLocale=function(){return this.state.locale},N.prototype.getLocaleSlug=function(){return this.state.localeSlug},N.prototype.isRtl=function(){return"rtl"===this.state.textDirection},N.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},N.prototype.hasTranslation=function(){return!!S(this,C(arguments))},N.prototype.translate=function(){var e=C(arguments),t=S(this,e);if(t||(t=E(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=m.Z.apply(void 0,(0,i.Z)(n))}catch(e){if(!window||!window.console)return;var o=this.throwErrors?"error":"warn";"string"!=typeof e?window.console[o](e):window.console[o]("i18n sprintf error:",n)}}return e.components&&(t=(0,s.Z)({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},N.prototype.reRenderTranslations=function(){h("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},N.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},N.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)},t.Z=N},3807:function(e,t,n){"use strict";n.d(t,{Y4:function(){return a}});var i=n(8617),o=n(2928),r=n(975),c=n(4531),s=new i.Z,a=s.numberFormat.bind(s),u=(s.translate.bind(s),s.configure.bind(s),s.setLocale.bind(s),s.getLocale.bind(s),s.getLocaleSlug.bind(s),s.addTranslations.bind(s),s.reRenderTranslations.bind(s),s.registerComponentUpdateHook.bind(s),s.registerTranslateHook.bind(s),s.state,s.stateObserver,s.on.bind(s),s.off.bind(s),s.emit.bind(s),(0,o.Z)(s),(0,r.Z)(s),(0,c.Z)(s));u.useRtl,u.withRtl},2928:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var i=n(9591),o=n(1687),r=n(3772),c=n(5200),s=n(2104),a=n(9057),u=n(8086),l=n(9196),p=n.n(l);function d(e){var t={numberFormat:e.numberFormat.bind(e),translate:e.translate.bind(e)};return function(n){var l,d,g=n.displayName||n.name||"";return d=l=function(l){(0,s.Z)(g,l);var d=(0,a.Z)(g);function g(){var e;(0,o.Z)(this,g);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e=d.call.apply(d,[this].concat(n)),(0,u.Z)((0,c.Z)(e),"boundForceUpdate",e.forceUpdate.bind((0,c.Z)(e))),e}return(0,r.Z)(g,[{key:"componentDidMount",value:function(){e.on("change",this.boundForceUpdate)}},{key:"componentWillUnmount",value:function(){e.off("change",this.boundForceUpdate)}},{key:"render",value:function(){var o=(0,i.Z)({locale:e.getLocaleSlug()},this.props,{},t);return p().createElement(n,o)}}]),g}(p().Component),(0,u.Z)(l,"displayName","Localized("+g+")"),d}}},2846:function(e,t,n){"use strict";function i(e,t,n,i){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,r=isFinite(+t)?Math.abs(t):0,c=void 0===i?",":i,s=void 0===n?".":n,a="";return a=(r?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,r):""+Math.round(o)).split("."),a[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,c)),(a[1]||"").length<r&&(a[1]=a[1]||"",a[1]+=new Array(r-a[1].length+1).join("0")),a.join(s)}n.d(t,{Z:function(){return i}})},4531:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var i=n(5672),o=n(9196),r=n.n(o),c=n(36),s=n(4333);function a(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return(0,c.useSubscription)(t)}var a=(0,s.createHigherOrderComponent)((function(e){return(0,o.forwardRef)((function(t,o){var c=n();return r().createElement(e,(0,i.Z)({},t,{isRtl:c,ref:o}))}))}),"WithRTL");return{useRtl:n,withRtl:a}}},975:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var i=n(572),o=n(9196),r=n.n(o);function c(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}return function(){var n=r().useState(t),o=(0,i.Z)(n,2),c=o[0],s=o[1];return r().useEffect((function(){var n=function(){return s(t)};return e.on("change",n),function(){return e.off("change",n)}}),[]),c}}},9503:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},5565:function(e,t,n){var i=n(2571),o=n(9503);function r(e){if(!(this instanceof r))return new r(e);"number"==typeof e&&(e={max:e}),e||(e={}),i.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=r,o(r,i.EventEmitter),Object.defineProperty(r.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),r.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},r.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},r.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},r.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},r.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},r.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},r.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},r.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},4125:function(){},8776:function(){},7394:function(){},6212:function(){},4959:function(){},2961:function(){},404:function(){},1294:function(){},1545:function(){},843:function(){},8282:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},2002:function(e){var t=1e3,n=60*t,i=60*n,o=24*i,r=7*o,c=365.25*o;function s(e,t,n,i){var o=t>=1.5*n;return Math.round(e/n)+" "+i+(o?"s":"")}e.exports=function(e,a){a=a||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*c;case"weeks":case"week":case"w":return a*r;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&isFinite(e))return a.long?function(e){var r=Math.abs(e);if(r>=o)return s(e,r,o,"day");if(r>=i)return s(e,r,i,"hour");if(r>=n)return s(e,r,n,"minute");if(r>=t)return s(e,r,t,"second");return e+" ms"}(e):function(e){var r=Math.abs(e);if(r>=o)return Math.round(e/o)+"d";if(r>=i)return Math.round(e/i)+"h";if(r>=n)return Math.round(e/n)+"m";if(r>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},1625:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var c,s,a=o(e),u=1;u<arguments.length;u++){for(var l in c=Object(arguments[u]))n.call(c,l)&&(a[l]=c[l]);if(t){s=t(c);for(var p=0;p<s.length;p++)i.call(c,s[p])&&(a[s[p]]=c[s[p]])}}return a}},9587:function(e,t,n){"use strict";var i=n(5843);function o(){}function r(){}r.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,r,c){if(c!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:o};return n.PropTypes=n,n}},1268:function(e,t,n){e.exports=n(9587)()},5843:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},8090:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(7478),o={contextDelimiter:"",onMissingKey:null};function r(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},o)this.options[n]=void 0!==t&&n in t?t[n]:o[n]}r.prototype.getPluralForm=function(e,t){var n,o,r,c=this.pluralForms[e];return c||("function"!=typeof(r=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(o=function(e){var t,n,i;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(i=t[n].trim()).indexOf("plural="))return i.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),r=(0,i.Z)(o)),c=this.pluralForms[e]=r),c(t)},r.prototype.dcnpgettext=function(e,t,n,i,o){var r,c,s;return r=void 0===o?0:this.getPluralForm(e,o),c=n,t&&(c=t+this.options.contextDelimiter+n),(s=this.data[e][c])&&s[r]?s[r]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===r?n:i)}},816:function(e,t,n){"use strict";var i=n(5771),o=n.n(i),r=n(2819);const c=o()("dops:analytics");let s,a;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const u={initialize:function(e,t,n){u.setUser(e,t),u.setSuperProps(n),u.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){a={ID:e,username:t}},setSuperProps:function(e){s=e},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);c("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),c('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);this.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);c("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),c('Built stat "%s" in group "%s"',t,e);return n}(e,t);this.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){u.tracks.recordPageView(e),u.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,i,o,r,c){u.ga.recordPurchase(e,t,n,i,o,r,c)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(s&&(c("- Super Props: %o",s),t=(0,r.assign)(t,s)),c('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):c('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};u.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){u.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){c("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};u.ga.initialized||(a&&(e={userId:"u-"+a.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),u.ga.initialized=!0)},recordPageView:function(e,t){u.ga.initialize(),c("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,i){u.ga.initialize();let o="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(o+=" [Option Label: "+n+"]"),void 0!==i&&(o+=" [Option Value: "+i+"]"),c(o),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,i)},recordPurchase:function(e,t,n,i,o,r,c){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:i,currency:c}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:o,quantity:r}),window.ga("ecommerce:send")}},identifyUser:function(){a&&window._tkq.push(["identifyUser",a.ID,a.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};t.Z=u},9570:function(e,t,n){"use strict";var i=n(2819),o=n(6483),r=n(6251);function c(e){class t extends Error{constructor(){super(...arguments),this.name=e}}return t}const s=c("JsonParseError"),a=c("JsonParseAfterRedirectError"),u=c("Api404Error"),l=c("Api404AfterRedirectError"),p=c("FetchNetworkError");const d=new function(e,t){let n=e,c={"X-WP-Nonce":t},s={credentials:"same-origin",headers:c},a={method:"post",credentials:"same-origin",headers:(0,i.assign)({},c,{"Content-type":"application/json"})},u=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",i=n.length?n.split("&"):[];return i.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+i.join("&")};const l={setApiRoot(e){n=e},setApiNonce(e){c={"X-WP-Nonce":e},s={credentials:"same-origin",headers:c},a={method:"post",credentials:"same-origin",headers:(0,i.assign)({},c,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{u=e},registerSite:(e,t)=>{const i={registration_nonce:e,no_iframe:!0};return(0,r.jetpackConfigHas)("consumer_slug")&&(i.plugin_slug=(0,r.jetpackConfigGet)("consumer_slug")),null!==t&&(i.redirect_uri=t),d(`${n}jetpack/v4/connection/register`,a,{body:JSON.stringify(i)}).then(g).then(m)},fetchAuthorizationUrl:e=>p((0,o.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),s).then(g).then(m),fetchSiteConnectionData:()=>p(`${n}jetpack/v4/connection/data`,s).then(m),fetchSiteConnectionStatus:()=>p(`${n}jetpack/v4/connection`,s).then(m),fetchSiteConnectionTest:()=>p(`${n}jetpack/v4/connection/test`,s).then(g).then(m),fetchUserConnectionData:()=>p(`${n}jetpack/v4/connection/data`,s).then(m),fetchUserTrackingSettings:()=>p(`${n}jetpack/v4/tracking/settings`,s).then(g).then(m),updateUserTrackingSettings:e=>d(`${n}jetpack/v4/tracking/settings`,a,{body:JSON.stringify(e)}).then(g).then(m),disconnectSite:()=>d(`${n}jetpack/v4/connection`,a,{body:JSON.stringify({isActive:!1})}).then(g).then(m),fetchConnectUrl:()=>p(`${n}jetpack/v4/connection/url`,s).then(g).then(m),unlinkUser:()=>d(`${n}jetpack/v4/connection/user`,a,{body:JSON.stringify({linked:!1})}).then(g).then(m),reconnect:()=>d(`${n}jetpack/v4/connection/reconnect`,a).then(g).then(m),fetchConnectedPlugins:()=>p(`${n}jetpack/v4/connection/plugins`,s).then(g).then(m),setHasSeenWCConnectionModal:()=>d(`${n}jetpack/v4/seen-wc-connection-modal`,a).then(g).then(m),fetchModules:()=>p(`${n}jetpack/v4/module/all`,s).then(g).then(m),fetchModule:e=>p(`${n}jetpack/v4/module/${e}`,s).then(g).then(m),activateModule:e=>d(`${n}jetpack/v4/module/${e}/active`,a,{body:JSON.stringify({active:!0})}).then(g).then(m),deactivateModule:e=>d(`${n}jetpack/v4/module/${e}/active`,a,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>d(`${n}jetpack/v4/module/${e}`,a,{body:JSON.stringify(t)}).then(g).then(m),updateSettings:e=>d(`${n}jetpack/v4/settings`,a,{body:JSON.stringify(e)}).then(g).then(m),getProtectCount:()=>p(`${n}jetpack/v4/module/protect/data`,s).then(g).then(m),resetOptions:e=>d(`${n}jetpack/v4/options/${e}`,a,{body:JSON.stringify({reset:!0})}).then(g).then(m),activateVaultPress:()=>d(`${n}jetpack/v4/plugins`,a,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(g).then(m),getVaultPressData:()=>p(`${n}jetpack/v4/module/vaultpress/data`,s).then(g).then(m),installPlugin:(e,t)=>{const i={slug:e,status:"active"};return t&&(i.source=t),d(`${n}jetpack/v4/plugins`,a,{body:JSON.stringify(i)}).then(g).then(m)},activateAkismet:()=>d(`${n}jetpack/v4/plugins`,a,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(g).then(m),getAkismetData:()=>p(`${n}jetpack/v4/module/akismet/data`,s).then(g).then(m),checkAkismetKey:()=>p(`${n}jetpack/v4/module/akismet/key/check`,s).then(g).then(m),checkAkismetKeyTyped:e=>d(`${n}jetpack/v4/module/akismet/key/check`,a,{body:JSON.stringify({api_key:e})}).then(g).then(m),fetchStatsData:e=>p(function(e){let t=`${n}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),s).then(g).then(m).then(f),getPluginUpdates:()=>p(`${n}jetpack/v4/updates/plugins`,s).then(g).then(m),getPlans:()=>p(`${n}jetpack/v4/plans`,s).then(g).then(m),fetchSettings:()=>p(`${n}jetpack/v4/settings`,s).then(g).then(m),updateSetting:e=>d(`${n}jetpack/v4/settings`,a,{body:JSON.stringify(e)}).then(g).then(m),fetchSiteData:()=>p(`${n}jetpack/v4/site`,s).then(g).then(m).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>p(`${n}jetpack/v4/site/features`,s).then(g).then(m).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>p(`${n}jetpack/v4/site/products`,s).then(g).then(m),fetchSitePurchases:()=>p(`${n}jetpack/v4/site/purchases`,s).then(g).then(m).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>p(`${n}jetpack/v4/site/benefits`,s).then(g).then(m).then((e=>JSON.parse(e.data))),fetchSetupQuestionnaire:()=>p(`${n}jetpack/v4/setup/questionnaire`,s).then(g).then(m),fetchRecommendationsData:()=>p(`${n}jetpack/v4/recommendations/data`,s).then(g).then(m),fetchRecommendationsProductSuggestions:()=>p(`${n}jetpack/v4/recommendations/product-suggestions`,s).then(g).then(m),fetchRecommendationsUpsell:()=>p(`${n}jetpack/v4/recommendations/upsell`,s).then(g).then(m),saveRecommendationsData:e=>d(`${n}jetpack/v4/recommendations/data`,a,{body:JSON.stringify({data:e})}).then(g),fetchProducts:()=>p(`${n}jetpack/v4/products`,s).then(g).then(m),fetchRewindStatus:()=>p(`${n}jetpack/v4/rewind`,s).then(g).then(m).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>p(`${n}jetpack/v4/scan`,s).then(g).then(m).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>d(`${n}jetpack/v4/notice/${e}`,a,{body:JSON.stringify({dismissed:!0})}).then(g).then(m),fetchPluginsData:()=>p(`${n}jetpack/v4/plugins`,s).then(g).then(m),fetchVerifySiteGoogleStatus:e=>p(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,s).then(g).then(m),verifySiteGoogle:e=>d(`${n}jetpack/v4/verify-site/google`,a,{body:JSON.stringify({keyring_id:e})}).then(g).then(m),sendMobileLoginEmail:()=>d(`${n}jetpack/v4/mobile/send-login-email`,a).then(g).then(m),submitSurvey:e=>d(`${n}jetpack/v4/marketing/survey`,a,{body:JSON.stringify(e)}).then(g).then(m),saveSetupQuestionnaire:e=>d(`${n}jetpack/v4/setup/questionnaire`,a,{body:JSON.stringify(e)}).then(g).then(m),updateLicensingError:e=>d(`${n}jetpack/v4/licensing/error`,a,{body:JSON.stringify(e)}).then(g).then(m),updateLicenseKey:e=>d(`${n}jetpack/v4/licensing/set-license`,a,{body:JSON.stringify({license:e})}).then(g).then(m),getUserLicensesCounts:()=>p(`${n}jetpack/v4/licensing/user/counts`,s).then(g).then(m),updateLicensingActivationNoticeDismiss:e=>d(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,a,{body:JSON.stringify({last_detached_count:e})}).then(g).then(m),updateRecommendationsStep:e=>d(`${n}jetpack/v4/recommendations/step`,a,{body:JSON.stringify({step:e})}).then(g),confirmIDCSafeMode:()=>d(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,a).then(g),startIDCFresh:e=>d(`${n}jetpack/v4/identity-crisis/start-fresh`,a,{body:JSON.stringify({redirect_uri:e})}).then(g).then(m),migrateIDC:()=>d(`${n}jetpack/v4/identity-crisis/migrate`,a).then(g),attachLicenses:e=>d(`${n}jetpack/v4/licensing/attach-licenses`,a,{body:JSON.stringify({licenses:e})}).then(g).then(m),fetchSearchPlanInfo:()=>p(`${n}jetpack/v4/search/plan`,s).then(g).then(m),fetchSearchSettings:()=>p(`${n}jetpack/v4/search/settings`,s).then(g).then(m),updateSearchSettings:e=>d(`${n}jetpack/v4/search/settings`,a,{body:JSON.stringify(e)}).then(g).then(m)};function p(e,t){return fetch(u(e),t)}function d(e,t,n){return fetch(e,(0,i.assign)({},t,n)).catch(h)}function f(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}(0,i.assign)(this,l)};function g(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new l(e.redirected):new u})):e.json().catch((e=>f(e))).then((t=>{const n=new Error(`${t.message} (Status ${e.status})`);throw n.response=t,n.name="ApiError",n}))}function m(e){return e.json().catch((t=>f(t,e.redirected,e.url)))}function f(e,t,n){throw t?new a(n):new s}function h(){throw new p}t.ZP=d},1583:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(5736),c=n(5609),s=n(1268),a=n.n(s),u=(n(4125),n(7262));const __=r.__,l=e=>{const{label:t,onClick:n,isLoading:i,displayError:r,errorMessage:s}=e;return o().createElement("div",{className:"jp-action-button"},o().createElement(c.Button,{className:"jp-action-button--button",label:t,onClick:n,isPrimary:!0,disabled:i},i?o().createElement(u.Z,null):t),r&&o().createElement("p",{className:"jp-action-button__error"},s))};l.propTypes={label:a().string.isRequired,onClick:a().func,isLoading:a().bool,displayError:a().bool,errorMessage:a().string},l.defaultProps={isLoading:!1,displayError:!1,errorMessage:__("An error occurred. Please try again.","jetpack-connection-ui")},t.Z=l},9697:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r);n(8776);const s=e=>{const{format:t,icon:n,imageUrl:i}=e;return o().createElement("div",{className:"jp-components__decorative-card "+(t?"jp-components__decorative-card--"+t:"")},o().createElement("div",{className:"jp-components__decorative-card__image",style:{backgroundImage:i?`url( ${i} )`:""}}),o().createElement("div",{className:"jp-components__decorative-card__content"},o().createElement("div",{className:"jp-components__decorative-card__lines"})),(()=>{if(n)return o().createElement("div",{className:"jp-components__decorative-card__icon-container"},o().createElement("span",{className:"jp-components__decorative-card__icon jp-components__decorative-card__icon--"+n}))})())};s.propTypes={format:c().oneOf(["horizontal","vertical"]),icon:c().oneOf(["unlink"]),imageUrl:c().string},s.defaultProps={format:"horizontal"},t.Z=s},1546:function(e,t,n){"use strict";var i=n(9183),o=n.n(i),r=n(7538),c=n.n(r),s=n(1268),a=n.n(s),u=n(9196),l=n.n(u),p=n(9105),d=n.n(p),g=n(5736);const __=g.__;class m extends l().Component{render(){const{logoColor:e,showText:t,className:n,...i}=this.props,r=t?"0 0 118 32":"0 0 32 32";return l().createElement("svg",o()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:r,className:d()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title"},i),l().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-connection-ui")),l().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&l().createElement(u.Fragment,null,l().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),l().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),l().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),l().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),l().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),l().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),l().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}c()(m,"propTypes",{className:a().string,width:a().number,height:a().number,showText:a().bool,logoColor:a().string}),c()(m,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"}),t.Z=m},2678:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r),s=n(5609),a=n(6078),u=n(5736);n(7394);const __=u.__,l=e=>-1===e.fraction.indexOf("00"),p=e=>{const t=(0,a.LR)(e.priceBefore,e.currencyCode),n=(0,a.LR)(e.priceAfter,e.currencyCode);return o().createElement("div",{className:"jp-components__pricing-card"},e.icon&&o().createElement("div",{className:"jp-components__pricing-card__icon"},o().createElement("img",{src:e.icon,alt:(0,u.sprintf)( +!function(){var e={9487:function(e,n,t){"use strict";t.d(n,{X:function(){return o}});const i={AED:{symbol:"د.إ.",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function o(e){return i[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},8899:function(e,n,t){"use strict";t.d(n,{LR:function(){return c}});var i=t(9487),o=t(2003);function c(e,n,t={}){const c=(0,i.X)(n);if(!c||isNaN(e))return null;const{decimal:r,grouping:s,precision:a,symbol:l}={...c,...t},u=e<0?"-":"",p=Math.abs(e),d=Math.floor(p);return{sign:u,symbol:l,integer:(0,o.Z)(p,a,r,s).split(r)[0],fraction:a>0?(0,o.Z)(p-d,a,r,s).slice(1):""}}},2003:function(e,n,t){"use strict";function i(e,n=0,t=".",i=","){const o=(e+"").replace(/[^0-9+\-Ee.]/g,""),c=isFinite(+o)?+o:0,r=isFinite(+n)?Math.abs(n):0,s=(r?function(e,n){const t=Math.pow(10,n);return""+(Math.round(e*t)/t).toFixed(n)}(c,r):""+Math.round(c)).split(".");return s[0].length>3&&(s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(s[1]||"").length<r&&(s[1]=s[1]||"",s[1]+=new Array(r-s[1].length+1).join("0")),s.join(t)}t.d(n,{Z:function(){return i}})},8294:function(e){e.exports=function(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e},e.exports.__esModule=!0,e.exports.default=e.exports},2402:function(e){function n(){return e.exports=n=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},1074:function(e,n,t){"use strict";var i=t(9307);n.Z=function(e){let{icon:n,size:t=24,...o}=e;return(0,i.cloneElement)(n,{width:t,height:t,...o})}},5381:function(e,n,t){"use strict";var i=t(9307),o=t(444);const c=(0,i.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(o.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));n.Z=c},5235:function(e,n){var t;!function(){"use strict";var i={}.hasOwnProperty;function o(){for(var e=[],n=0;n<arguments.length;n++){var t=arguments[n];if(t){var c=typeof t;if("string"===c||"number"===c)e.push(t);else if(Array.isArray(t)){if(t.length){var r=o.apply(null,t);r&&e.push(r)}}else if("object"===c)if(t.toString===Object.prototype.toString)for(var s in t)i.call(t,s)&&t[s]&&e.push(s);else e.push(t.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(t=function(){return o}.apply(n,[]))||(e.exports=t)}()},951:function(e,n,t){n.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const t="color: "+this.color;n.splice(1,0,t,"color: inherit");let i=0,o=0;n[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(o=i))})),n.splice(o,0,t)},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug")}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},n.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage=function(){try{return localStorage}catch(e){}}(),n.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||(()=>{}),e.exports=t(1741)(n);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},1741:function(e,n,t){e.exports=function(e){function n(e){let t,o,c,r=null;function s(...e){if(!s.enabled)return;const i=s,o=Number(new Date),c=o-(t||o);i.diff=c,i.prev=t,i.curr=o,t=o,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let r=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,o)=>{if("%%"===t)return"%";r++;const c=n.formatters[o];if("function"==typeof c){const n=e[r];t=c.call(i,n),e.splice(r,1),r--}return t})),n.formatArgs.call(i,e);(i.log||n.log).apply(i,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=i,s.destroy=n.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==r?r:(o!==n.namespaces&&(o=n.namespaces,c=n.enabled(e)),c),set:e=>{r=e}}),"function"==typeof n.init&&n.init(s),s}function i(e,t){const i=n(this.namespace+(void 0===t?":":t)+e);return i.log=this.log,i}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},n.disable=function(){const e=[...n.names.map(o),...n.skips.map(o).map((e=>"-"+e))].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.namespaces=e,n.names=[],n.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),o=i.length;for(t=0;t<o;t++)i[t]&&("-"===(e=i[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))},n.enabled=function(e){if("*"===e[e.length-1])return!0;let t,i;for(t=0,i=n.skips.length;t<i;t++)if(n.skips[t].test(e))return!1;for(t=0,i=n.names.length;t<i;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=t(3171),n.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((t=>{n[t]=e[t]})),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}},9710:function(){},3466:function(e,n){"use strict";n.Z={button:"zI5tJ_qhWE6Oe6Lk75GY",normal:"ipS7tKy9GntCS4R3vekF",icon:"paGLQwtPEaJmtArCcmyK",small:"Na39I683LAaSA99REg14",regular:"lZAo6_oGfclXOO9CC6Rd",loading:"q_tVWqMjl39RcY6WtQA6","external-icon":"CDuBjJp_8jxzx5j6Nept"}},2404:function(){},9478:function(){},3280:function(e,n){"use strict";n.Z={reset:"WQVtrU6q0L1Igcj7wCrQ","headline-medium":"UujoBFTnQNY2cWU2SIsH","headline-small":"TeGO5V_thHw5lDAm1_2M","headline-small-regular":"WolQzb2MsSgiNmLtc7_j","title-medium":"hUB0JT8p1T2Hw28N6qC8","title-small":"zY2No8Ga4b8shbOQGhnv",body:"tIj0D1t8Cc892ikmgFPZ","body-small":"KdcN0BnOaVeVhyLRKqhS","body-extra-small":"dso3Rh3tl3Xv1GumBktz",label:"PItlW5vRExLnTj4a8eLE","m-0":"TwRpPlktzxhmFVeua7P5","mx-0":"zVfqx7gyb3o9mxfGynn1","my-0":"iSHVzNiB9iVleGljaQxy","mt-0":"xqDIp6cNVr_E6RXaiPyD","mr-0":"S8EwaXk1kyPizt6x4WH2","mb-0":"ODX5Vr1TARoLFkDDFooD","ml-0":"cphJ8dCpfimnky7P2FHg","m-1":"PFgIhNxIyiSuNvQjAIYj","mx-1":"M2jKmUzDxvJjjVEPU3zn","my-1":"io15gAh8tMTNbSEfwJKk","mt-1":"rcTN5uw9xIEeMEGL3Xi_","mr-1":"CQSkybjq2TcRM1Xo9COV","mb-1":"hfqOWgq6_MEGdFE82eOY","ml-1":"I8MxZQYTbuu595yfesWA","m-2":"kQkc6rmdpvLKPkyoJtVQ","mx-2":"j6vFPxWuu4Jan2ldoxpp","my-2":"hqr39dC4H_AbactPAkCG","mt-2":"c3dQnMi16C6J6Ecy4283","mr-2":"YNZmHOuRo6hU7zzKfPdP","mb-2":"Db8lbak1_wunpPk8NwKU","ml-2":"ftsYE5J9hLzquQ0tA5dY","m-3":"Det4MHzLUW7EeDnafPzq","mx-3":"h_8EEAztC29Vve1datb5","my-3":"YXIXJ0h1k47u6hzK8KcM","mt-3":"soADBBkcIKCBXzCTuV9_","mr-3":"zSX59ziEaEWGjnpZa4uV","mb-3":"yrVTnq_WBMbejg89c2ZQ","ml-3":"UKtHPJnI2cXBWtPDm5hM","m-4":"guexok_Tqd5Tf52hRlbT","mx-4":"oS1E2KfTBZkJ3F0tN7T6","my-4":"DN1OhhXi6AoBgEdDSbGd","mt-4":"ot2kkMcYHv53hLZ4LSn0","mr-4":"A1krOZZhlQ6Sp8Cy4bly","mb-4":"pkDbXXXL32237M0hokEh","ml-4":"XXv4kDTGvEnQeuGKOPU3","m-5":"yGqHk1a57gaISwkXwXe6","mx-5":"X8cghM358X3DkXLc9aNK","my-5":"GdfSmGwHlFnN2S6xBn1f","mt-5":"yqeuzwyGQ7zG0avrGqi_","mr-5":"g9emeCkuHvYhveiJbfXO","mb-5":"Lvk3dqcyHbZ07QCRlrUQ","ml-5":"r3yQECDQ9qX0XZzXlVAg","m-6":"aQhlPwht2Cz1X_63Miw0","mx-6":"JyHb0vK3wJgpblL9s5j8","my-6":"cY2gULL1lAv6WPNIRuf3","mt-6":"NBWQ9Lwhh_fnry3lg_p7","mr-6":"yIOniNe5E40C8fWvBm5V","mb-6":"t30usboNSyqfQWIwHvT3","ml-6":"Nm_TyFkYCMhOoghoToKJ","m-7":"C4qJKoBXpgKtpmrqtEKB","mx-7":"S93Srbu6NQ_PBr7DmTiD","my-7":"fJj8k6gGJDks3crUZxOS","mt-7":"cW6D6djs7Ppm7fD7TeoV","mr-7":"DuCnqNfcxcP3Z__Yo5Ro","mb-7":"im8407m2fw5vOg7O2zsw","ml-7":"G0fbeBgvz2sh3uTP9gNl","m-8":"kvW3sBCxRxUqz1jrVMJl","mx-8":"tOjEqjLONQdkiYx_XRnw","my-8":"op5hFSx318zgxsoZZNLN","mt-8":"c9WfNHP6TFKWIfLxv52J","mr-8":"sBA75QqcqRwwYSHJh2wc","mb-8":"GpL6idrXmSOM6jB8Ohsf","ml-8":"HbtWJoQwpgGycz8dGzeT","p-0":"uxX3khU88VQ_Ah49Ejsa","px-0":"KX0FhpBKwKzs9fOUdbNz","py-0":"PfK8vKDyN32dnimlzYjz","pt-0":"emxLHRjQuJsImnPbQIzE","pr-0":"kJ8WzlpTVgdViXt8ukP9","pb-0":"tg_UIUI11VBzrTAn2AzJ","pl-0":"uczvl8kaz84oPQJ2DB2R","p-1":"o7UHPcdVK3lt7q3lqV4o","px-1":"IDqEOxvDoYrFYxELPmtX","py-1":"DdywPW2qSYlu2pt8tpO2","pt-1":"npy3hw4A5QSkDicb2CJJ","pr-1":"LgbptTApNY5NwLQvEFAt","pb-1":"WZQy2SZuZso59bUsXXyl","pl-1":"o331apInxNunbYB3SfPE","p-2":"fMPIyD9Vqki1Lrc_yJnG","px-2":"i2pMcTcdrr10IQoiSm_L","py-2":"eA702gn32kwptiI1obXH","pt-2":"o9bGieUKcYc8o0Ij9oZX","pr-2":"SwZcFez1RDqWsOFjB5iG","pb-2":"eHpLc_idmuEqeqCTvqkN","pl-2":"vU39i2B4P1fUTMB2l6Vo","p-3":"JHWNzBnE29awhdu5BEh1","px-3":"X72lGbb56L3KFzC2xQ9N","py-3":"BzfNhRG8wXdCEB5ocQ6e","pt-3":"srV0KSDC83a2fiimSMMQ","pr-3":"lUWfkmbQjCskhcNwkyCm","pb-3":"Ts0dIlc3aTSL7V4cIHis","pl-3":"CzlqQXXhX6MvorArFZ8B","p-4":"TqMPkQtR_DdZuKb5vBoV","px-4":"a7UrjhI69Vetlcj9ZVzz","py-4":"StEhBzGs2Gi5dDEkjhAv","pt-4":"FGneZfZyvYrt1dG0zcnm","pr-4":"APEH216rpdlJWgD2fHc8","pb-4":"oGwXC3ohCic9XnAj6x69","pl-4":"U6gnT9y42ViPNOcNzBwb","p-5":"IpdRLBwnHqbqFrixgbYC","px-5":"HgNeXvkBa9o3bQ5fvFZm","py-5":"tJtFZM3XfPG9v9TSDfN1","pt-5":"PdifHW45QeXYfK568uD8","pr-5":"mbLkWTTZ0Za_BBbFZ5b2","pb-5":"vVWpZpLlWrkTt0hMk8XU","pl-5":"RxfaJj5a1Nt6IavEo5Zl","p-6":"SppJULDGdnOGcjZNCYBy","px-6":"palY2nLwdoyooPUm9Hhk","py-6":"WYw1JvZC0ppLdvSAPhr_","pt-6":"YEEJ9b90ueQaPfiU8aeN","pr-6":"QE0ssnsKvWJMqlhPbY5u","pb-6":"n8yA3jHlMRyLd5UIfoND","pl-6":"tXHmxYnHzbwtfxEaG51n","p-7":"kBTsPKkO_3g_tLkj77Um","px-7":"RyhrFx6Y1FGDrGAAyaxm","py-7":"CBwRpB0bDN3iEdQPPMJO","pt-7":"vQVSq6SvWKbOMu6r4H6b","pr-7":"oBy5__aEADMsH46mrgFX","pb-7":"KVEXoJqf1s92j0JMdNmN","pl-7":"ZMXGNrNaKW3k_3TLz0Fq","p-8":"tuiR9PhkHXhGyEgzRZRI","px-8":"U7454qyWkQNa2iaSJziu","py-8":"VLYIv2GVocjuN93e8HC8","pt-8":"X1rm9DQ1zLGLfogja5Gn","pr-8":"JS7G6kAuqJo5GIuF8S5t","pb-8":"Y8F9ga1TDCMbM1lj4gUz","pl-8":"AJuyNGrI63BOWql719H8"}},9610:function(){},2917:function(){},2427:function(){},4220:function(){},287:function(){},9823:function(){},3171:function(e){var n=1e3,t=60*n,i=60*t,o=24*i,c=7*o,r=365.25*o;function s(e,n,t,i){var o=n>=1.5*t;return Math.round(e/t)+" "+i+(o?"s":"")}e.exports=function(e,a){a=a||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*r;case"weeks":case"week":case"w":return a*c;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===l&&isFinite(e))return a.long?function(e){var c=Math.abs(e);if(c>=o)return s(e,c,o,"day");if(c>=i)return s(e,c,i,"hour");if(c>=t)return s(e,c,t,"minute");if(c>=n)return s(e,c,n,"second");return e+" ms"}(e):function(e){var c=Math.abs(e);if(c>=o)return Math.round(e/o)+"d";if(c>=i)return Math.round(e/i)+"h";if(c>=t)return Math.round(e/t)+"m";if(c>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},469:function(e,n,t){"use strict";var i=t(758);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,n,t,o,c,r){if(r!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:c,resetWarningCache:o};return t.PropTypes=t,t}},5162:function(e,n,t){e.exports=t(469)()},758:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6975:function(e,n,t){"use strict";var i=t(951),o=t.n(i),c=t(2819);const r=o()("dops:analytics");let s,a;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const l={initialize:function(e,n,t){l.setUser(e,n),l.setSuperProps(t),l.identifyUser()},setGoogleAnalyticsEnabled:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=n},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,n){a={ID:e,username:n}},setSuperProps:function(e){s=e},assignSuperProps:function(e){s=(0,c.assign)(s,e)},mc:{bumpStat:function(e,n){const t=function(e,n){let t="";if("object"==typeof e){for(const n in e)t+="&x_"+encodeURIComponent(n)+"="+encodeURIComponent(e[n]);r("Bumping stats %o",e)}else t="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(n),r('Bumping stat "%s" in group "%s"',n,e);return t}(e,n);l.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+t+"&t="+Math.random())},bumpStatWithPageView:function(e,n){const t=function(e,n){let t="";if("object"==typeof e){for(const n in e)t+="&"+encodeURIComponent(n)+"="+encodeURIComponent(e[n]);r("Built stats %o",e)}else t="&"+encodeURIComponent(e)+"="+encodeURIComponent(n),r('Built stat "%s" in group "%s"',n,e);return t}(e,n);l.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+t+"&t="+Math.random())}},pageView:{record:function(e,n){l.tracks.recordPageView(e),l.ga.recordPageView(e,n)}},purchase:{record:function(e,n,t,i,o,c,r){l.ga.recordPurchase(e,n,t,i,o,c,r)}},tracks:{recordEvent:function(e,n){n=n||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(s&&(r("- Super Props: %o",s),n=(0,c.assign)(n,s)),r('Record event "%s" called with props %s',e,JSON.stringify(n)),window._tkq.push(["recordEvent",e,n])):r('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const n="object"==typeof e?e:{target:e};l.tracks.recordEvent("jetpack_wpa_click",n)},recordPageView:function(e){l.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){r("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};l.ga.initialized||(a&&(e={userId:"u-"+a.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),l.ga.initialized=!0)},recordPageView:function(e,n){l.ga.initialize(),r("Recording Page View ~ [URL: "+e+"] [Title: "+n+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:n}))},recordEvent:function(e,n,t,i){l.ga.initialize();let o="Recording Event ~ [Category: "+e+"] [Action: "+n+"]";void 0!==t&&(o+=" [Option Label: "+t+"]"),void 0!==i&&(o+=" [Option Value: "+i+"]"),r(o),this.googleAnalyticsEnabled&&window.ga("send","event",e,n,t,i)},recordPurchase:function(e,n,t,i,o,c,r){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:i,currency:r}),window.ga("ecommerce:addItem",{id:e,name:n,sku:t,price:o,quantity:c}),window.ga("ecommerce:send")}},identifyUser:function(){a&&window._tkq.push(["identifyUser",a.ID,a.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};n.Z=l},4743:function(e,n,t){"use strict";var i=t(2819),o=t(6483),c=t(1132);function r(e){class n extends Error{constructor(){super(...arguments),this.name=e}}return n}const s=r("JsonParseError"),a=r("JsonParseAfterRedirectError"),l=r("Api404Error"),u=r("Api404AfterRedirectError"),p=r("FetchNetworkError");const d=new function(e,n){let t=e,r={"X-WP-Nonce":n},s={credentials:"same-origin",headers:r},a={method:"post",credentials:"same-origin",headers:(0,i.assign)({},r,{"Content-type":"application/json"})},l=function(e){const n=e.split("?"),t=n.length>1?n[1]:"",i=t.length?t.split("&"):[];return i.push("_cacheBuster="+(new Date).getTime()),n[0]+"?"+i.join("&")};const u={setApiRoot(e){t=e},setApiNonce(e){r={"X-WP-Nonce":e},s={credentials:"same-origin",headers:r},a={method:"post",credentials:"same-origin",headers:(0,i.assign)({},r,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{l=e},registerSite:(e,n)=>{const i={registration_nonce:e,no_iframe:!0};return(0,c.jetpackConfigHas)("consumer_slug")&&(i.plugin_slug=(0,c.jetpackConfigGet)("consumer_slug")),null!==n&&(i.redirect_uri=n),d(`${t}jetpack/v4/connection/register`,a,{body:JSON.stringify(i)}).then(g).then(m)},fetchAuthorizationUrl:e=>p((0,o.addQueryArgs)(`${t}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),s).then(g).then(m),fetchSiteConnectionData:()=>p(`${t}jetpack/v4/connection/data`,s).then(m),fetchSiteConnectionStatus:()=>p(`${t}jetpack/v4/connection`,s).then(m),fetchSiteConnectionTest:()=>p(`${t}jetpack/v4/connection/test`,s).then(g).then(m),fetchUserConnectionData:()=>p(`${t}jetpack/v4/connection/data`,s).then(m),fetchUserTrackingSettings:()=>p(`${t}jetpack/v4/tracking/settings`,s).then(g).then(m),updateUserTrackingSettings:e=>d(`${t}jetpack/v4/tracking/settings`,a,{body:JSON.stringify(e)}).then(g).then(m),disconnectSite:()=>d(`${t}jetpack/v4/connection`,a,{body:JSON.stringify({isActive:!1})}).then(g).then(m),fetchConnectUrl:()=>p(`${t}jetpack/v4/connection/url`,s).then(g).then(m),unlinkUser:()=>d(`${t}jetpack/v4/connection/user`,a,{body:JSON.stringify({linked:!1})}).then(g).then(m),reconnect:()=>d(`${t}jetpack/v4/connection/reconnect`,a).then(g).then(m),fetchConnectedPlugins:()=>p(`${t}jetpack/v4/connection/plugins`,s).then(g).then(m),setHasSeenWCConnectionModal:()=>d(`${t}jetpack/v4/seen-wc-connection-modal`,a).then(g).then(m),fetchModules:()=>p(`${t}jetpack/v4/module/all`,s).then(g).then(m),fetchModule:e=>p(`${t}jetpack/v4/module/${e}`,s).then(g).then(m),activateModule:e=>d(`${t}jetpack/v4/module/${e}/active`,a,{body:JSON.stringify({active:!0})}).then(g).then(m),deactivateModule:e=>d(`${t}jetpack/v4/module/${e}/active`,a,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,n)=>d(`${t}jetpack/v4/module/${e}`,a,{body:JSON.stringify(n)}).then(g).then(m),updateSettings:e=>d(`${t}jetpack/v4/settings`,a,{body:JSON.stringify(e)}).then(g).then(m),getProtectCount:()=>p(`${t}jetpack/v4/module/protect/data`,s).then(g).then(m),resetOptions:e=>d(`${t}jetpack/v4/options/${e}`,a,{body:JSON.stringify({reset:!0})}).then(g).then(m),activateVaultPress:()=>d(`${t}jetpack/v4/plugins`,a,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(g).then(m),getVaultPressData:()=>p(`${t}jetpack/v4/module/vaultpress/data`,s).then(g).then(m),installPlugin:(e,n)=>{const i={slug:e,status:"active"};return n&&(i.source=n),d(`${t}jetpack/v4/plugins`,a,{body:JSON.stringify(i)}).then(g).then(m)},activateAkismet:()=>d(`${t}jetpack/v4/plugins`,a,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(g).then(m),getAkismetData:()=>p(`${t}jetpack/v4/module/akismet/data`,s).then(g).then(m),checkAkismetKey:()=>p(`${t}jetpack/v4/module/akismet/key/check`,s).then(g).then(m),checkAkismetKeyTyped:e=>d(`${t}jetpack/v4/module/akismet/key/check`,a,{body:JSON.stringify({api_key:e})}).then(g).then(m),fetchStatsData:e=>p(function(e){let n=`${t}jetpack/v4/module/stats/data`;-1!==n.indexOf("?")?n+=`&range=${encodeURIComponent(e)}`:n+=`?range=${encodeURIComponent(e)}`;return n}(e),s).then(g).then(m).then(f),getPluginUpdates:()=>p(`${t}jetpack/v4/updates/plugins`,s).then(g).then(m),getPlans:()=>p(`${t}jetpack/v4/plans`,s).then(g).then(m),fetchSettings:()=>p(`${t}jetpack/v4/settings`,s).then(g).then(m),updateSetting:e=>d(`${t}jetpack/v4/settings`,a,{body:JSON.stringify(e)}).then(g).then(m),fetchSiteData:()=>p(`${t}jetpack/v4/site`,s).then(g).then(m).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>p(`${t}jetpack/v4/site/features`,s).then(g).then(m).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>p(`${t}jetpack/v4/site/products`,s).then(g).then(m),fetchSitePurchases:()=>p(`${t}jetpack/v4/site/purchases`,s).then(g).then(m).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>p(`${t}jetpack/v4/site/benefits`,s).then(g).then(m).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>p(`${t}jetpack/v4/site/discount`,s).then(g).then(m).then((e=>e.data)),fetchSetupQuestionnaire:()=>p(`${t}jetpack/v4/setup/questionnaire`,s).then(g).then(m),fetchRecommendationsData:()=>p(`${t}jetpack/v4/recommendations/data`,s).then(g).then(m),fetchRecommendationsProductSuggestions:()=>p(`${t}jetpack/v4/recommendations/product-suggestions`,s).then(g).then(m),fetchRecommendationsUpsell:()=>p(`${t}jetpack/v4/recommendations/upsell`,s).then(g).then(m),fetchRecommendationsConditional:()=>p(`${t}jetpack/v4/recommendations/conditional`,s).then(g).then(m),saveRecommendationsData:e=>d(`${t}jetpack/v4/recommendations/data`,a,{body:JSON.stringify({data:e})}).then(g),fetchProducts:()=>p(`${t}jetpack/v4/products`,s).then(g).then(m),fetchRewindStatus:()=>p(`${t}jetpack/v4/rewind`,s).then(g).then(m).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>p(`${t}jetpack/v4/scan`,s).then(g).then(m).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>d(`${t}jetpack/v4/notice/${e}`,a,{body:JSON.stringify({dismissed:!0})}).then(g).then(m),fetchPluginsData:()=>p(`${t}jetpack/v4/plugins`,s).then(g).then(m),fetchIntroOffers:()=>p(`${t}jetpack/v4/intro-offers`,s).then(g).then(m),fetchVerifySiteGoogleStatus:e=>p(null!==e?`${t}jetpack/v4/verify-site/google/${e}`:`${t}jetpack/v4/verify-site/google`,s).then(g).then(m),verifySiteGoogle:e=>d(`${t}jetpack/v4/verify-site/google`,a,{body:JSON.stringify({keyring_id:e})}).then(g).then(m),sendMobileLoginEmail:()=>d(`${t}jetpack/v4/mobile/send-login-email`,a).then(g).then(m),submitSurvey:e=>d(`${t}jetpack/v4/marketing/survey`,a,{body:JSON.stringify(e)}).then(g).then(m),saveSetupQuestionnaire:e=>d(`${t}jetpack/v4/setup/questionnaire`,a,{body:JSON.stringify(e)}).then(g).then(m),updateLicensingError:e=>d(`${t}jetpack/v4/licensing/error`,a,{body:JSON.stringify(e)}).then(g).then(m),updateLicenseKey:e=>d(`${t}jetpack/v4/licensing/set-license`,a,{body:JSON.stringify({license:e})}).then(g).then(m),getUserLicensesCounts:()=>p(`${t}jetpack/v4/licensing/user/counts`,s).then(g).then(m),getUserLicenses:()=>p(`${t}jetpack/v4/licensing/user/licenses`,s).then(g).then(m),updateLicensingActivationNoticeDismiss:e=>d(`${t}jetpack/v4/licensing/user/activation-notice-dismiss`,a,{body:JSON.stringify({last_detached_count:e})}).then(g).then(m),updateRecommendationsStep:e=>d(`${t}jetpack/v4/recommendations/step`,a,{body:JSON.stringify({step:e})}).then(g),confirmIDCSafeMode:()=>d(`${t}jetpack/v4/identity-crisis/confirm-safe-mode`,a).then(g),startIDCFresh:e=>d(`${t}jetpack/v4/identity-crisis/start-fresh`,a,{body:JSON.stringify({redirect_uri:e})}).then(g).then(m),migrateIDC:()=>d(`${t}jetpack/v4/identity-crisis/migrate`,a).then(g),attachLicenses:e=>d(`${t}jetpack/v4/licensing/attach-licenses`,a,{body:JSON.stringify({licenses:e})}).then(g).then(m),fetchSearchPlanInfo:()=>p(`${t}jetpack/v4/search/plan`,s).then(g).then(m),fetchSearchSettings:()=>p(`${t}jetpack/v4/search/settings`,s).then(g).then(m),updateSearchSettings:e=>d(`${t}jetpack/v4/search/settings`,a,{body:JSON.stringify(e)}).then(g).then(m),fetchSearchStats:()=>p(`${t}jetpack/v4/search/stats`,s).then(g).then(m),fetchWafSettings:()=>p(`${t}jetpack/v4/waf`,s).then(g).then(m),fetchWordAdsSettings:()=>p(`${t}jetpack/v4/wordads/settings`,s).then(g).then(m),updateWordAdsSettings:e=>d(`${t}jetpack/v4/wordads/settings`,a,{body:JSON.stringify(e)}),fetchSearchPricing:()=>p(`${t}jetpack/v4/search/pricing`,s).then(g).then(m)};function p(e,n){return fetch(l(e),n)}function d(e,n,t){return fetch(e,(0,i.assign)({},n,t)).catch(h)}function f(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}(0,i.assign)(this,u)};function g(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new u(e.redirected):new l})):e.json().catch((e=>f(e))).then((n=>{const t=new Error(`${n.message} (Status ${e.status})`);throw t.response=n,t.name="ApiError",t}))}function m(e){return e.json().catch((n=>f(n,e.redirected,e.url)))}function f(e,n,t){throw n?new a(t):new s}function h(){throw new p}n.ZP=d},7121:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5736),r=t(5609),s=t(5162),a=t.n(s);t(9710);const __=c.__,l=e=>{const{label:n,onClick:t,isLoading:i,displayError:c,errorMessage:s}=e;return o().createElement("div",{className:"jp-action-button"},o().createElement(r.Button,{className:"jp-action-button--button",label:n,onClick:t,variant:"primary",disabled:i},i?o().createElement(r.Spinner,null):n),c&&o().createElement("p",{className:"jp-action-button__error"},s))};l.propTypes={label:a().string.isRequired,onClick:a().func,isLoading:a().bool,displayError:a().bool,errorMessage:a().string},l.defaultProps={isLoading:!1,displayError:!1,errorMessage:__("An error occurred. Please try again.","jetpack-connection-ui")},n.Z=l},526:function(e,n,t){"use strict";var i=t(2402),o=t.n(i),c=t(5609),r=t(1074),s=t(5381),a=t(5235),l=t.n(a),u=t(3466);n.Z=e=>{let{children:n,variant:t="primary",size:i="normal",weight:a="bold",icon:p,iconSize:d,disabled:g,isDestructive:m,isLoading:f,isExternalLink:h,className:y,text:b,..._}=e;const k=l()(u.Z.button,y,{[u.Z.normal]:"normal"===i,[u.Z.small]:"small"===i,[u.Z.icon]:Boolean(p),[u.Z.loading]:f,[u.Z.regular]:"regular"===a}),v="normal"===i?20:16,C=h&&React.createElement(r.Z,{size:v,icon:s.Z,className:u.Z["external-icon"]}),E=h?"_blank":void 0;return React.createElement(c.Button,o()({target:E,variant:t,className:k,icon:h?void 0:p,iconSize:d,disabled:g,isDestructive:m,text:b},_),f&&React.createElement(c.Spinner,null),React.createElement("span",null,n),C)}},1133:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c);t(2404);const s=e=>{const{format:n,icon:t,imageUrl:i}=e;return o().createElement("div",{className:"jp-components__decorative-card "+(n?"jp-components__decorative-card--"+n:"")},o().createElement("div",{className:"jp-components__decorative-card__image",style:{backgroundImage:i?`url( ${i} )`:""}}),o().createElement("div",{className:"jp-components__decorative-card__content"},o().createElement("div",{className:"jp-components__decorative-card__lines"})),(()=>{if(t)return o().createElement("div",{className:"jp-components__decorative-card__icon-container"},o().createElement("span",{className:"jp-components__decorative-card__icon jp-components__decorative-card__icon--"+t}))})())};s.propTypes={format:r().oneOf(["horizontal","vertical"]),icon:r().oneOf(["unlink"]),imageUrl:r().string},s.defaultProps={format:"horizontal"},n.Z=s},1202:function(e,n,t){"use strict";var i=t(2402),o=t.n(i),c=t(8294),r=t.n(c),s=t(5162),a=t.n(s),l=t(9196),u=t.n(l),p=t(5235),d=t.n(p),g=t(5736);const __=g.__;class m extends u().Component{render(){const{logoColor:e,showText:n,className:t,...i}=this.props,c=n?"0 0 118 32":"0 0 32 32";return u().createElement("svg",o()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:c,className:d()("jetpack-logo",t),"aria-labelledby":"jetpack-logo-title"},i),u().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-connection-ui")),u().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),n&&u().createElement(l.Fragment,null,u().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),u().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),u().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),u().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),u().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),u().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),u().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}r()(m,"propTypes",{className:a().string,width:a().number,height:a().number,showText:a().bool,logoColor:a().string}),r()(m,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"}),n.Z=m},667:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c),s=t(5609),a=t(8899),l=t(5736);t(9478);const __=l.__,u=e=>-1===e.fraction.indexOf("00"),p=e=>{const n=(0,a.LR)(e.priceBefore,e.currencyCode),t=(0,a.LR)(e.priceAfter,e.currencyCode);return o().createElement("div",{className:"jp-components__pricing-card"},e.icon&&o().createElement("div",{className:"jp-components__pricing-card__icon"},o().createElement("img",{src:e.icon,alt:(0,l.sprintf)( /* translators: placeholder is a product name */ -__("Icon for the product %s","jetpack-connection-ui"),e.title)})),o().createElement("h1",{className:"jp-components__pricing-card__title"},e.title),o().createElement("div",{className:"jp-components__pricing-card__pricing"},e.priceBefore!==e.priceAfter&&o().createElement("div",{className:"jp-components__pricing-card__price-before"},o().createElement("span",{className:"jp-components__pricing-card__currency"},t.symbol),o().createElement("span",{className:"jp-components__pricing-card__price"},t.integer),l(t)&&o().createElement("span",{className:"jp-components__pricing-card__price-decimal"}," ",t.fraction),o().createElement("div",{className:"jp-components__pricing-card__price-strikethrough"})),o().createElement("div",{className:"jp-components__pricing-card__price-after"},o().createElement("span",{className:"jp-components__pricing-card__currency"},n.symbol),o().createElement("span",{className:"jp-components__pricing-card__price"},n.integer),l(n)&&o().createElement("span",{className:"jp-components__pricing-card__price-decimal"},n.fraction)),o().createElement("span",{className:"jp-components__pricing-card__price-details"},e.priceDetails)),e.children&&o().createElement("div",{className:"jp-components__pricing-card__extra-content-wrapper"},e.children),e.ctaText&&o().createElement("div",{className:"jp-components__pricing-card__cta"},o().createElement(s.Button,{className:"jp-components__pricing-card__button",label:e.ctaText,onClick:e.onCtaClick},e.ctaText)),e.infoText&&o().createElement("div",{className:"jp-components__pricing-card__info"},e.infoText))};p.propTypes={title:c().string.isRequired,icon:c().string,priceBefore:c().number.isRequired,priceAfter:c().number.isRequired,priceDetails:c().string,currencyCode:c().string,ctaText:c().string,onCtaClick:c().func,infoText:c().oneOfType([c().string,c().object])},p.defaultProps={currencyCode:"USD",priceDetails:__("/month, paid yearly","jetpack-connection-ui")},t.Z=p},7262:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r);n(6212);const s=e=>{const t=e.className+" jp-components-spinner",n={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},i={borderTopColor:e.color,borderRightColor:e.color};return o().createElement("div",{className:t},o().createElement("div",{className:"jp-components-spinner__outer",style:n},o().createElement("div",{className:"jp-components-spinner__inner",style:i})))};s.propTypes={color:c().string,className:c().string,size:c().number},s.defaultProps={color:"#FFFFFF",className:"",size:20},t.Z=s},1415:function(e,t,n){"use strict";function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let i;if("undefined"!=typeof window&&(i=window.Initial_State?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);Object.keys(t).map((e=>{n[e]=encodeURIComponent(t[e])})),!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),i&&(n.calypso_env=i);const o=Object.keys(n).map((e=>e+"="+n[e])).join("&");return"https://jetpack.com/redirect/?"+o}n.d(t,{Z:function(){return i}})},6251:function(e,t,n){let i={};try{i=n(Object(function(){var e=new Error("Cannot find module 'jetpackConfig'");throw e.code="MODULE_NOT_FOUND",e}()))}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),i={missingConfig:!0}}const o=e=>i.hasOwnProperty(e);e.exports={jetpackConfigHas:o,jetpackConfigGet:e=>{if(!o(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return i[e]}}},4254:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r);const s=e=>{const{images:t,assetBaseUrl:n}=e;if(!t.length)return null;const i=t.map(((e,t)=>o().createElement(o().Fragment,{key:t},o().createElement("img",{src:n+e,alt:""}))));return o().createElement("div",{className:"jp-connection__connect-screen__image-slider"},i)};s.propTypes={images:c().arrayOf(c().string).isRequired,assetBaseUrl:c().string},s.defaultProps={assetBaseUrl:""},t.Z=s},7865:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r),s=n(1546),a=n(4254);n(4959);const u=e=>{const{title:t,children:n,className:i,assetBaseUrl:r,images:c}=e,u=c?.length;return o().createElement("div",{className:"jp-connection__connect-screen-layout"+(u?" jp-connection__connect-screen-layout__two-columns":"")+(i?" "+i:"")},o().createElement("div",{className:"jp-connection__connect-screen-layout__left"},o().createElement(s.Z,null),o().createElement("h2",null,t),n),u?o().createElement("div",{className:"jp-connection__connect-screen-layout__right"},o().createElement(a.Z,{images:c,assetBaseUrl:r})):null)};u.propTypes={title:c().string,className:c().string,images:c().arrayOf(c().string),assetBaseUrl:c().string},t.Z=u},1213:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r),s=n(9818),a=n(5736),u=n(5731),l=n(2199),p=n(1631);const __=a.__,d=e=>{const{title:t,autoTrigger:n,buttonLabel:i,apiRoot:r,apiNonce:c,registrationNonce:a,from:d,redirectUri:g,children:m,priceBefore:f,priceAfter:h,pricingIcon:y,pricingTitle:v,pricingCurrencyCode:b}=e,{handleRegisterSite:_,isRegistered:k,isUserConnected:w,siteIsRegistering:j,userIsConnecting:C,registrationError:E}=(0,p.Z)({registrationNonce:a,redirectUri:g,apiRoot:r,apiNonce:c,autoTrigger:n,from:d}),S=!k||!w,N=(0,s.useSelect)((e=>e(l.t).getConnectionStatusIsFetching())),O=Boolean(E),P=j||C;return o().createElement(u.Z,{title:t,buttonLabel:i,priceBefore:f,priceAfter:h,pricingIcon:y,pricingTitle:v,pricingCurrencyCode:b,isLoading:N,handleButtonClick:_,showConnectButton:S,displayButtonError:O,buttonIsLoading:P},m)};d.propTypes={title:c().string,buttonLabel:c().string,apiRoot:c().string.isRequired,apiNonce:c().string.isRequired,registrationNonce:c().string.isRequired,from:c().string,redirectUri:c().string.isRequired,autoTrigger:c().bool,pricingTitle:c().string.isRequired,icon:c().string,priceBefore:c().number.isRequired,priceAfter:c().number.isRequired,pricingCurrencyCode:c().string},d.defaultProps={title:__("Over 5 million WordPress sites are faster and more secure","jetpack-connection-ui"),buttonLabel:__("Set up Jetpack","jetpack-connection-ui"),pricingCurrencyCode:"USD",autoTrigger:!1},t.Z=d},5731:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r),s=n(5736),a=n(1415),u=n(1583),l=n(2678),p=n(9307),d=n(7865);n(2961);const __=s.__,g=e=>{const{title:t,buttonLabel:n,children:i,priceBefore:r,priceAfter:c,pricingIcon:s,pricingTitle:g,pricingCurrencyCode:m,isLoading:f,handleButtonClick:h,showConnectButton:y,displayButtonError:v,buttonIsLoading:b}=e,_=(0,p.createInterpolateElement)(__("By clicking the button above, you agree to our <tosLink>Terms of Service</tosLink> and to <shareDetailsLink>share details</shareDetailsLink> with WordPress.com.","jetpack-connection-ui"),{tosLink:o().createElement("a",{href:(0,a.Z)("wpcom-tos"),rel:"noopener noreferrer",target:"_blank"}),shareDetailsLink:o().createElement("a",{href:(0,a.Z)("jetpack-support-what-data-does-jetpack-sync"),rel:"noopener noreferrer",target:"_blank"})}),k=(0,p.createInterpolateElement)(__("Already have a subscription? <connectButton/> to get started.","jetpack-connection-ui"),{connectButton:o().createElement(u.Z,{label:__("Log in","jetpack-connection-ui"),onClick:h,isLoading:b})});return o().createElement(d.Z,{title:t,className:"jp-connection__connect-screen-required-plan"+(f?" jp-connection__connect-screen-required-plan__loading":"")},o().createElement("div",{className:"jp-connection__connect-screen-required-plan__content"},i,o().createElement("div",{className:"jp-connection__connect-screen-required-plan__pricing-card"},o().createElement(l.Z,{title:g,icon:s,priceBefore:r,currencyCode:m,priceAfter:c,infoText:y?_:""},y&&o().createElement(u.Z,{label:n,onClick:h,displayError:v,isLoading:b}))),y&&o().createElement("div",{className:"jp-connection__connect-screen-required-plan__with-subscription"},k)))};g.propTypes={pricingTitle:c().string.isRequired,priceBefore:c().number.isRequired,priceAfter:c().number.isRequired,pricingCurrencyCode:c().string,title:c().string,buttonLabel:c().string,pricingIcon:c().string,isLoading:c().bool,handleButtonClick:c().func,showConnectButton:c().bool,displayButtonError:c().bool,buttonIsLoading:c().bool},g.defaultProps={pricingCurrencyCode:"USD",showConnectButton:!0,isLoading:!1,buttonIsLoading:!1,displayButtonError:!1,handleButtonClick:()=>{}},t.Z=g},9565:function(e,t,n){"use strict";var i=n(9196),o=n(1268),r=n.n(o),c=n(9570);const s=e=>{const{redirectFunc:t,connectUrl:n,redirectUri:o,from:r}=e,[s,a]=(0,i.useState)(null);return n&&n!==s&&a(n),(0,i.useEffect)((()=>{s||c.ZP.fetchAuthorizationUrl(o).then((e=>a(e.authorizeUrl))).catch((e=>{throw e}))}),[]),s?(t(s+(r?(s.includes("?")?"&":"?")+"from="+encodeURIComponent(r):"")),null):null};s.propTypes={connectUrl:r().string,redirectUri:r().string.isRequired,from:r().string,redirectFunc:r().func},s.defaultProps={redirectFunc:e=>window.location.assign(e),redirectUri:null},t.Z=s},3593:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r),s=n(5736),a=n(2332);const __=s.__,u=e=>{const{connectedPlugins:t,disconnectingPlugin:n}=e,r=(0,i.useMemo)((()=>{if(t){return Object.keys(t).map((e=>Object.assign({slug:e},t[e]))).filter((e=>n!==e.slug))}return[]}),[t,n]);return t&&r.length>0?o().createElement(o().Fragment,null,o().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},o().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is powering other plugins on your site. If you disconnect, these plugins will no longer work.","jetpack-connection-ui"))),o().createElement("div",{className:"jp-connection__disconnect-card__group"},r.map((e=>o().createElement(a.Z,{title:e.name}))))):null};u.PropTypes={connectedPlugins:c().object,disconnectingPlugin:c().string},t.Z=u},7132:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(5736),c=n(5609),s=n(1268),a=n.n(s),u=n(9570),l=n(9818),p=n(9565),d=n(5628),g=n(2199),m=n(1631);n(404);const __=r.__,f=e=>{const{apiRoot:t,apiNonce:n,redirectUri:r,title:s,connectionInfoText:a,onDisconnected:f,connectedPlugins:h,connectedSiteId:y,context:v}=e,{isRegistered:b,isUserConnected:_}=(0,m.Z)({apiRoot:t,apiNonce:n}),[k,w]=(0,i.useState)(!1),[j,C]=(0,i.useState)({}),[E,S]=(0,i.useState)(!1),N=(0,l.useSelect)((e=>e(g.t).getUserIsConnecting()),[]),{setConnectionStatus:O,setUserIsConnecting:P}=(0,l.useDispatch)(g.t),Z=(0,i.useRef)();(0,i.useEffect)((()=>{u.ZP.setApiRoot(t),u.ZP.setApiNonce(n)}),[t,n]),(0,i.useEffect)((()=>{w(!0),u.ZP.fetchSiteConnectionData().then((e=>{w(!1),C(e.currentUser?.wpcomUser);const t=e.currentUser?.wpcomUser?.avatar;t&&(Z.current.style.backgroundImage=`url('${t}')`)})).catch((e=>{throw w(!1),e}))}),[w,C]);const R=(0,i.useCallback)((e=>{e&&e.preventDefault(),S(!0)}),[S]),x=(0,i.useCallback)((e=>{e&&e.preventDefault(),S(!1)}),[S]),F=(0,i.useCallback)((e=>{e&&e.preventDefault(),O({isActive:!1,isRegistered:!1,isUserConnected:!1}),f&&"[object Function]"==={}.toString.call(f)&&f()}),[f,O]);return b?o().createElement("div",{className:"jp-connection-status-card"},o().createElement("h3",null,s),o().createElement("p",null,a),o().createElement("div",{className:"jp-connection-status-card--status"},o().createElement("div",{className:"jp-connection-status-card--cloud"}),o().createElement("div",{className:"jp-connection-status-card--line"+(_?"":" jp-connection-status-card--site-only")}),o().createElement("div",{className:"jp-connection-status-card--jetpack-logo"}),o().createElement("div",{className:"jp-connection-status-card--avatar",ref:Z})),o().createElement("ul",{className:"jp-connection-status-card--list"},o().createElement("li",{className:"jp-connection-status-card--list-item-success"},__("Site connected.","jetpack-connection-ui")," ",o().createElement(c.Button,{variant:"link",onClick:R,className:"jp-connection__disconnect-dialog__link"},__("Disconnect","jetpack-connection-ui")),o().createElement(d.Z,{apiRoot:t,apiNonce:n,onDisconnected:F,connectedPlugins:h,connectedSiteId:y,connectedUser:j,isOpen:E,onClose:x,context:v})),_&&!k&&o().createElement("li",{className:"jp-connection-status-card--list-item-success"},__("Logged in as","jetpack-connection-ui")," ",j?.display_name),!_&&!k&&o().createElement("li",{className:"jp-connection-status-card--list-item-error"},__("Your WordPress.com account is not connected.","jetpack-connection-ui"))),!_&&!k&&o().createElement(c.Button,{isPrimary:!0,disabled:N,onClick:P,className:"jp-connection-status-card--btn-connect-user"},__("Connect your WordPress.com account","jetpack-connection-ui")),N&&o().createElement(p.Z,{redirectUri:r})):null};f.propTypes={apiRoot:a().string.isRequired,apiNonce:a().string.isRequired,redirectUri:a().string.isRequired,connectedPlugins:a().object,connectedSiteId:a().number,title:a().string,connectionInfoText:a().string,onDisconnected:a().func,context:a().string},f.defaultProps={title:__("Connection","jetpack-connection-ui"),connectionInfoText:__("Leverages the Jetpack Cloud for more features on your side.","jetpack-connection-ui")},t.Z=f},2332:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r);n(1294);const s=e=>{const{title:t,value:n,description:i}=e;return o().createElement("div",{className:"jp-connection__disconnect-card card"},o().createElement("div",{className:"jp-connection__disconnect-card__card-content"},o().createElement("p",{className:"jp-connection__disconnect-card__card-headline"},t),(n||i)&&o().createElement("div",{className:"jp-connection__disconnect-card__card-stat-block"},o().createElement("span",{className:"jp-connection__disconnect-card__card-stat"},n),o().createElement("div",{className:"jp-connection__disconnect-card__card-description"},i))))};s.propTypes={title:c().string,value:c().string|c().number,description:c().number},t.Z=s},5628:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r),s=n(5736),a=n(5609),u=n(9570),l=n(816),p=n(6251),d=(n(1545),n(163)),g=n(1496),m=n(4130),f=n(5700);const __=s.__,h=e=>{const[t,n]=(0,i.useState)(!1),[r,c]=(0,i.useState)(!1),[s,h]=(0,i.useState)(!1),[y,v]=(0,i.useState)(!1),[b,_]=(0,i.useState)(!1),[k,w]=(0,i.useState)(!1),{apiRoot:j,apiNonce:C,connectedPlugins:E,title:S,pluginScreenDisconnectCallback:N,onDisconnected:O,onError:P,disconnectStepComponent:Z,context:R,connectedUser:x,connectedSiteId:F,isOpen:T,onClose:I}=e;let A="";(0,p.jetpackConfigHas)("consumer_slug")&&(A=(0,p.jetpackConfigGet)("consumer_slug"));const L=(0,i.useMemo)((()=>({context:R,plugin:A})),[R,A]);(0,i.useEffect)((()=>{u.ZP.setApiRoot(j),u.ZP.setApiNonce(C)}),[j,C]),(0,i.useEffect)((()=>{x&&x.ID&&x.login&&l.Z.initialize(x.ID,x.login)}),[x,x.ID,x.login]),(0,i.useEffect)((()=>{T&&l.Z.tracks.recordEvent("jetpack_disconnect_dialog_open",L)}),[T,L]),(0,i.useEffect)((()=>{T&&(r?!r||y||b?y&&!b?l.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"survey"},L)):b&&l.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"thank_you"},L)):l.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect_confirm"},L)):l.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect"},L)))}),[T,r,y,b,L]);const U=(0,i.useCallback)((()=>{u.ZP.disconnectSite().then((()=>{n(!1),c(!0)})).catch((e=>{n(!1),h(e),P&&P(e)}))}),[n,c,h,P]),D=(0,i.useCallback)(((e,t)=>{w(!0),fetch("https://public-api.wordpress.com/wpcom/v2/marketing/feedback-survey",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)}).then((e=>e.json())).then((e=>{if(!0!==e.success)throw new Error("Survey endpoint returned error code "+e.code);l.Z.tracks.recordEvent("jetpack_disconnect_survey_submit",t),_(!0),w(!1)})).catch((e=>{l.Z.tracks.recordEvent("jetpack_disconnect_survey_error",Object.assign({},{error:e.message},t)),_(!0),w(!1)}))}),[w,_]),$=(0,i.useCallback)((e=>{e&&e.preventDefault(),h(!1),n(!0),"plugins"!==R?U():N&&N(e)}),[h,n,N,R,U]),B=(0,i.useCallback)((()=>x.ID&&F),[x,F]),M=(0,i.useCallback)(((e,t,n)=>{if(n&&n.preventDefault(),!B())return void _(!0);const i={site_id:F,user_id:x.ID,survey_id:"jetpack-plugin-disconnect",survey_responses:{"why-cancel":{response:e,text:t||null}}},o=Object.assign({},L,{disconnect_reason:e});D(i,o)}),[D,_,B,F,x,L]),z=(0,i.useCallback)((e=>{e&&e.preventDefault(),O&&O(),I()}),[O,I]),J=(0,i.useCallback)((e=>{e&&e.preventDefault(),v(!0)}),[v]);return o().createElement(o().Fragment,null,T&&o().createElement(a.Modal,{title:"",contentLabel:S,aria:{labelledby:"jp-connection__disconnect-dialog__heading"},onRequestClose:I,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"jp-connection__disconnect-dialog"+(r?" jp-connection__disconnect-dialog__success":"")},r?!r||y||b?y&&!b?o().createElement(m.Z,{isSubmittingFeedback:k,onFeedBackProvided:M,onExit:z}):b?o().createElement(f.Z,{onExit:z}):void 0:o().createElement(g.Z,{canProvideFeedback:B(),onProvideFeedback:J,onExit:z}):o().createElement(d.Z,{title:S,connectedPlugins:E,disconnectStepComponent:Z,isDisconnecting:t,closeModal:I,onDisconnect:$,disconnectError:s,context:R,disconnectingPlugin:A})))};h.propTypes={apiRoot:c().string.isRequired,apiNonce:c().string.isRequired,title:c().string,onDisconnected:c().func,onError:c().func,context:c().string,connectedPlugins:c().object,pluginScreenDisconnectCallback:c().func,disconnectStepComponent:c().element,connectedUser:c().object,connectedSiteId:c().number,isOpen:c().bool,onClose:c().func},h.defaultProps={title:__("Are you sure you want to disconnect?","jetpack-connection-ui"),context:"jetpack-dashboard",connectedUser:{}},t.Z=h},1496:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r),s=n(9307),a=n(5736),u=n(5609),l=n(9697),p=n(2042);const __=a.__,d=e=>{const{onExit:t,canProvideFeedback:n,onProvideFeedback:i}=e;return o().createElement("div",{className:"jp-connection__disconnect-dialog__content"},o().createElement(l.Z,{icon:"unlink",imageUrl:p}),o().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy jp-connection__disconnect-dialog__step-copy--narrow"},o().createElement("h1",null,(0,s.createInterpolateElement)(__("Jetpack has been <br/>successfully disconnected.","jetpack-connection-ui"),{br:o().createElement("br",null)})),n&&o().createElement(o().Fragment,null,o().createElement("p",null,__("We’re sorry to see you go. Here at Jetpack, we’re always striving to provide the best experience for our customers. Please take our short survey (2 minutes, promise).","jetpack-connection-ui")),o().createElement("p",null,o().createElement(u.Button,{isPrimary:!0,onClick:i,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Help us improve","jetpack-connection-ui"))),o().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:t},__("No thank you","jetpack-connection-ui"))),!n&&o().createElement(o().Fragment,null,o().createElement("p",null,o().createElement(u.Button,{isPrimary:!0,onClick:t,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack-connection-ui"))))))};d.PropTypes={onExit:c().func,onProvideFeedback:c().func,canProvideFeedback:c().bool},t.Z=d},163:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(9307),c=n(5736),s=n(1415),a=n(5609),u=n(1268),l=n.n(u),p=n(3593);const __=c.__,d=e=>{const{title:t,isDisconnecting:n,onDisconnect:i,disconnectError:c,disconnectStepComponent:u,connectedPlugins:l,disconnectingPlugin:d,closeModal:g,context:m}=e;return o().createElement(o().Fragment,null,o().createElement("div",{className:"jp-connection__disconnect-dialog__content"},o().createElement("h1",{id:"jp-connection__disconnect-dialog__heading"},t),o().createElement(p.Z,{connectedPlugins:l,disconnectingPlugin:d}),u,(()=>{if(!l&&!u)return o().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},o().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is currently powering multiple products on your site.","jetpack-connection-ui"),o().createElement("br",null),__("Once you disconnect Jetpack, these will no longer work.","jetpack-connection-ui")))})()),o().createElement("div",{className:"jp-connection__disconnect-dialog__actions"},o().createElement("div",{className:"jp-row"},o().createElement("div",{className:"lg-col-span-7 md-col-span-8 sm-col-span-4"},o().createElement("p",null,(0,r.createInterpolateElement)(__("<strong>Need help?</strong> Learn more about the <jpConnectionInfoLink>Jetpack connection</jpConnectionInfoLink> or <jpSupportLink>contact Jetpack support</jpSupportLink>.","jetpack-connection-ui"),{strong:o().createElement("strong",null),jpConnectionInfoLink:o().createElement("a",{href:(0,s.Z)("why-the-wordpress-com-connection-is-important-for-jetpack"),rel:"noopener noreferrer",target:"_blank",className:"jp-connection__disconnect-dialog__link"}),jpSupportLink:o().createElement("a",{href:(0,s.Z)("jetpack-support"),rel:"noopener noreferrer",target:"_blank",className:"jp-connection__disconnect-dialog__link"})}))),o().createElement("div",{className:"jp-connection__disconnect-dialog__button-wrap lg-col-span-5 md-col-span-8 sm-col-span-4"},o().createElement(a.Button,{isPrimary:!0,disabled:n,onClick:g,className:"jp-connection__disconnect-dialog__btn-dismiss"},__("Stay connected","jetpack-connection-ui")),(()=>{let e=__("Disconnect","jetpack-connection-ui");return n?e=__("Disconnecting…","jetpack-connection-ui"):"plugins"===m&&(e=__("Disconnect and Deactivate","jetpack-connection-ui")),o().createElement(a.Button,{isPrimary:!0,disabled:n,onClick:i,className:"jp-connection__disconnect-dialog__btn-disconnect"},e)})())),c&&o().createElement("p",{className:"jp-connection__disconnect-dialog__error"},c)))};d.propTypes={title:l().string,isDisconnecting:l().bool,onDisconnect:l().func,disconnectError:l().bool,disconnectStepComponent:l().elementType,connectedPlugins:l().array,disconnectingPlugin:l().string,closeModal:l().func,context:l().string},t.Z=d},4130:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r),s=n(5736),a=(n(843),n(1194));const __=s.__,u=e=>{const{onExit:t,onFeedBackProvided:n,isSubmittingFeedback:i}=e;return o().createElement("div",{className:"jp-connection__disconnect-dialog__content"},o().createElement("h1",null,__("Before you go, help us improve Jetpack","jetpack-connection-ui")),o().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Let us know what didn‘t work for you","jetpack-connection-ui")),o().createElement(a.Z,{onSubmit:n,isSubmittingFeedback:i}),o().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:t},__("Skip for now","jetpack-connection-ui")))};u.PropTypes={onExit:c().func,onFeedBackProvided:c().func,isSubmittingFeedback:c().bool},t.Z=u},5700:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r),s=n(9697),a=n(5736),u=n(5609),l=n(9307),p=n(724);const __=a.__,d=e=>{const{onExit:t}=e;return o().createElement("div",{className:"jp-connection__disconnect-dialog__content"},o().createElement(s.Z,{format:"vertical",imageUrl:p}),o().createElement("div",{className:"jp-connection__disconnect-dialog__copy"},o().createElement("h1",null,__("Thank you!","jetpack-connection-ui")),o().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},(0,l.createInterpolateElement)(__("Your answer has been submitted. <br/>Thanks for your input on how we can improve Jetpack.","jetpack-connection-ui"),{br:o().createElement("br",null)})),o().createElement(u.Button,{isPrimary:!0,onClick:t,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack-connection-ui"))))};d.PropTypes={onExit:c().func,assetBaseUrl:c().string},t.Z=d},1194:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(1268),c=n.n(r),s=n(5609),a=n(5736),u=n(7215);const __=a.__,l=e=>{const{onSubmit:t,isSubmittingFeedback:n}=e,[r,c]=(0,i.useState)(),[a,l]=(0,i.useState)(),p=[{id:"troubleshooting",answerText:__("Troubleshooting - I'll be reconnecting afterwards.","jetpack-connection-ui")},{id:"not-working",answerText:__("I can't get it to work.","jetpack-connection-ui")},{id:"slowed-down-site",answerText:__("It slowed down my site.","jetpack-connection-ui")},{id:"buggy",answerText:__("It's buggy.","jetpack-connection-ui")},{id:"what-does-it-do",answerText:__("I don't know what it does.","jetpack-connection-ui")}],d="another-reason",g=(0,i.useCallback)((()=>{t(r,r===d?a:"")}),[t,d,a,r]),m=(0,i.useCallback)((e=>{const t=e.target.value;e.stopPropagation(),l(t)}),[l]),f=e=>e===r?"jp-connect__disconnect-survey-card--selected":"",h=(0,i.useCallback)(((e,t)=>{switch(t.key){case"Enter":case"Space":case"Spacebar":case" ":c(e)}}),[c]);return o().createElement(o().Fragment,null,o().createElement("div",{className:"jp-connection__disconnect-dialog__survey"},p.map((e=>o().createElement(u.Z,{id:e.id,onClick:c,onKeyDown:h,className:"card jp-connect__disconnect-survey-card "+f(e.id)},o().createElement("p",{className:"jp-connect__disconnect-survey-card__answer"},e.answerText)))),o().createElement(u.Z,{id:d,onClick:c,onKeyDown:h,className:"card jp-connect__disconnect-survey-card "+f(d)},o().createElement("p",{className:"jp-connect__disconnect-survey-card__answer"},__("Other:","jetpack-connection-ui")," ",o().createElement("input",{placeholder:__("share your experience","jetpack-connection-ui"),className:"jp-connect__disconnect-survey-card__input",type:"text",value:a,onChange:m,maxLength:1e3})))),o().createElement("p",null,o().createElement(s.Button,{disabled:!r||n,isPrimary:!0,onClick:g,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},n?__("Submitting…","jetpack-connection-ui"):__("Submit Feedback","jetpack-connection-ui",0))))};l.PropTypes={onSubmit:c().func,isSubmittingFeedback:c().bool},t.Z=l},7215:function(e,t,n){"use strict";var i=n(9196),o=n.n(i);n(843);t.Z=e=>{const{id:t,onClick:n,onKeyDown:r,children:c,className:s}=e,a=(0,i.useCallback)((()=>{n(t)}),[t,n]),u=(0,i.useCallback)((e=>{r(t,e)}),[t,r]);return o().createElement("div",{tabIndex:"0",role:"button",onClick:a,onKeyDown:u,className:"card jp-connect__disconnect-survey-card "+s},c)}},1631:function(e,t,n){"use strict";var i=n(9196),o=n(9818),r=n(9570),c=n(2199);t.Z=e=>{let{registrationNonce:t,redirectUri:n,apiRoot:s,apiNonce:a,autoTrigger:u,from:l}=e;const{registerSite:p,connectUser:d}=(0,o.useDispatch)(c.t),g=(0,o.useSelect)((e=>e(c.t).getRegistrationError())),{siteIsRegistering:m,userIsConnecting:f,isRegistered:h,isUserConnected:y}=(0,o.useSelect)((e=>({siteIsRegistering:e(c.t).getSiteIsRegistering(),userIsConnecting:e(c.t).getUserIsConnecting(),...e(c.t).getConnectionStatus()}))),v=()=>d({from:l}),b=e=>{e&&e.preventDefault(),h?v():p({registrationNonce:t,redirectUri:n}).then((()=>{v()}))};return(0,i.useEffect)((()=>{r.ZP.setApiRoot(s),r.ZP.setApiNonce(a)}),[s,a]),(0,i.useEffect)((()=>{!u||m||f||b()}),[]),{handleRegisterSite:b,handleConnectUser:v,isRegistered:h,isUserConnected:y,siteIsRegistering:m,userIsConnecting:f,registrationError:g}}},6973:function(e,t,n){"use strict";n.d(t,{i6:function(){return i},LI:function(){return o},r7:function(){return r},N4:function(){return c},qV:function(){return s},T1:function(){return a},TS:function(){return u},ZP:function(){return y}});const i="SET_CONNECTION_STATUS",o="SET_CONNECTION_STATUS_IS_FETCHING",r="SET_SITE_IS_REGISTERING",c="SET_USER_IS_CONNECTING",s="SET_REGISTRATION_ERROR",a="CLEAR_REGISTRATION_ERROR",u="SET_AUTHORIZATION_URL",l="CONNECT_USER",p=e=>({type:i,connectionStatus:e}),d=e=>({type:r,isRegistering:e}),g=e=>({type:c,isConnecting:e}),m=e=>({type:s,registrationError:e}),f=()=>({type:a}),h=e=>({type:u,authorizationUrl:e});const y={setConnectionStatus:p,setConnectionStatusIsFetching:e=>({type:o,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:d,setUserIsConnecting:g,setRegistrationError:m,clearRegistrationError:f,setAuthorizationUrl:h,registerSite:function*(e){let{registrationNonce:t,redirectUri:n}=e;yield f(),yield d(!0);try{const e=yield{type:"REGISTER_SITE",registrationNonce:t,redirectUri:n};return yield p({isRegistered:!0}),yield h(e.authorizeUrl),yield d(!1),Promise.resolve(e)}catch(e){return yield m(e),yield d(!1),Promise.reject(e)}},connectUser:function*(){let{from:e,redirectFunc:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yield g(!0),yield{type:l,from:e,redirectFunc:t}}}},4213:function(e,t,n){"use strict";var i=n(9570),o=n(9818),r=n(2199);const c=(0,o.createRegistryControl)((e=>{let{resolveSelect:t}=e;return function(){let{from:e,redirectFunc:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((i,o)=>{t(r.t).getAuthorizationUrl().then((t=>{const o=n||(e=>window.location.assign(e)),r=new URL(t);e&&r.searchParams.set("from",encodeURIComponent(e));const c=r.toString();o(c),i(c)})).catch((e=>{o(e)}))}))}}));t.Z={FETCH_CONNECTION_STATUS:()=>new Promise(((e,t)=>{i.ZP.fetchSiteConnectionStatus().then((t=>e(t))).catch((e=>t(e)))})),FETCH_AUTHORIZATION_URL:e=>{let{redirectUri:t}=e;return i.ZP.fetchAuthorizationUrl(t)},REGISTER_SITE:e=>{let{registrationNonce:t,redirectUri:n}=e;return i.ZP.registerSite(t,n)},CONNECT_USER:c}},1147:function(e,t,n){"use strict";var i=n(9818),o=n(6973);const r=(0,i.combineReducers)({connectionStatus:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===o.i6?{...e,...t.connectionStatus}:e},connectionStatusIsFetching:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.LI?t.isFetching:e},siteIsRegistering:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.r7?t.isRegistering:e},userIsConnecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.N4?t.isConnecting:e},registrationError:(e,t)=>{switch(t.type){case o.T1:return!1;case o.qV:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===o.TS?t.authorizationUrl:e});t.Z=r},8310:function(e,t,n){"use strict";var i=n(9818),o=n(6973),r=n(2199);const c={*getConnectionStatus(){yield o.ZP.setConnectionStatusIsFetching(!0);const e=yield o.ZP.fetchConnectionStatus();return yield o.ZP.setConnectionStatusIsFetching(!1),o.ZP.setConnectionStatus(e)},getAuthorizationUrl:{isFulfilled:function(e){const t=Boolean(e.authorizationUrl);for(var n=arguments.length,o=new Array(n>1?n-1:0),c=1;c<n;c++)o[c-1]=arguments[c];const s=(0,i.select)(r.t).hasFinishedResolution("getAuthorizationUrl",o);return t&&!s&&(0,i.dispatch)(r.t).finishResolution("getAuthorizationUrl",o),t},*fulfill(e){const t=yield o.ZP.fetchAuthorizationUrl(e);yield o.ZP.setAuthorizationUrl(t.authorizeUrl)}}};t.Z={...c}},387:function(e,t){"use strict";const n={getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:e=>e.connectionStatusIsFetching||!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1};t.Z=n},5333:function(e,t,n){"use strict";var i=n(7538),o=n.n(i),r=n(9818);class c{static mayBeInit(e,t){null===c.store&&(c.store=(0,r.createReduxStore)(e,t),(0,r.register)(c.store),c.resolveResolvers(e,t.initialState))}static resolveResolvers(e,t){t.connectionStatus&&t.connectionStatus.hasOwnProperty("isRegistered")&&(0,r.dispatch)(e).finishResolution("getConnectionStatus",[])}}o()(c,"store",null),t.Z=c},2199:function(e,t,n){"use strict";n.d(t,{t:function(){return u}});var i=n(1147),o=n(6973),r=n(387),c=n(5333),s=n(8310),a=n(4213);const u="jetpack-connection";c.Z.mayBeInit(u,{reducer:i.Z,actions:o.ZP,selectors:r.Z,resolvers:s.Z,controls:a.Z,initialState:window.JP_CONNECTION_INITIAL_STATE||{}})},8509:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(9818),c=n(5736),s=n(9570),a=n(7132),u=n(1213),l=n(2199),p=n(682),d=n(8547);const __=c.__;t.Z=(0,r.withSelect)((e=>({connectionStatus:e(l.t).getConnectionStatus()})))((e=>{const t=(0,r.useSelect)((e=>e(p.t).getAPINonce()),[]),n=(0,r.useSelect)((e=>e(p.t).getAPIRoot()),[]),c=(0,r.useSelect)((e=>e(p.t).getRegistrationNonce()),[]),{hasIDC:l,canManageConnection:g,isSafeModeConfirmed:m}=(0,r.useSelect)((e=>e(p.t).getIDCData()),[]),{connectionStatus:f}=e;return(0,i.useEffect)((()=>{s.ZP.setApiRoot(n),s.ZP.setApiNonce(t)}),[n,t]),o().createElement(o().Fragment,null,(!l||m)&&o().createElement(d.Z,null),(!l||m)&&g&&f.isRegistered&&o().createElement(a.Z,{apiRoot:n,apiNonce:t,redirectUri:"tools.php?page=wpcom-connection-manager"}),(!l||m)&&g&&!f.isRegistered&&o().createElement(u.Z,{connectionStatus:f,apiRoot:n,apiNonce:t,registrationNonce:c,from:"connection-ui",redirectUri:"tools.php?page=wpcom-connection-manager",pricingIcon:"data:image/svg+xml,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m21.092 15.164.019-1.703v-.039c0-1.975-1.803-3.866-4.4-3.866-2.17 0-3.828 1.351-4.274 2.943l-.426 1.524-1.581-.065a2.92 2.92 0 0 0-.12-.002c-1.586 0-2.977 1.344-2.977 3.133 0 1.787 1.388 3.13 2.973 3.133H22.399c1.194 0 2.267-1.016 2.267-2.4 0-1.235-.865-2.19-1.897-2.368l-1.677-.29Zm-10.58-3.204a4.944 4.944 0 0 0-.201-.004c-2.75 0-4.978 2.298-4.978 5.133s2.229 5.133 4.978 5.133h12.088c2.357 0 4.267-1.97 4.267-4.4 0-2.18-1.538-3.99-3.556-4.339v-.06c0-3.24-2.865-5.867-6.4-5.867-2.983 0-5.49 1.871-6.199 4.404Z' fill='%23000'/%3E%3C/svg%3E",priceBefore:9,priceAfter:4.5,pricingTitle:__("Jetpack Backup","jetpack-connection-ui"),buttonLabel:__("Get Jetpack Backup","jetpack-connection-ui")},o().createElement("p",null,__("Secure and speed up your site for free with Jetpack's powerful WordPress tools.","jetpack-connection-ui")),o().createElement("ul",null,o().createElement("li",null,__("Measure your impact with beautiful stats","jetpack-connection-ui")),o().createElement("li",null,__("Speed up your site with optimized images","jetpack-connection-ui")),o().createElement("li",null,__("Protect your site against bot attacks","jetpack-connection-ui")),o().createElement("li",null,__("Get notifications if your site goes offline","jetpack-connection-ui")),o().createElement("li",null,__("Enhance your site with dozens of other features","jetpack-connection-ui")))),(!l||m)&&!g&&o().createElement("p",null,"You need to be an admin to access this page."))}))},8547:function(e,t,n){"use strict";var i=n(9196),o=n.n(i),r=n(5736);const __=r.__;t.Z=()=>o().createElement("div",{className:"jetpack-cui__header"},o().createElement("h1",null,__("Connection Manager","jetpack-connection-ui")))},5472:function(e,t){"use strict";t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e}},3379:function(e,t){"use strict";t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e}},2310:function(e,t){"use strict";t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e}},4665:function(e,t,n){"use strict";var i=n(9818),o=n(5472),r=n(3379),c=n(2310);const s=(0,i.combineReducers)({API:o.Z,assets:r.Z,IDC:c.Z});t.Z=s},6931:function(e,t){"use strict";t.Z={getAPIRoot:e=>e.API.WP_API_root||null,getAPINonce:e=>e.API.WP_API_nonce||null,getRegistrationNonce:e=>e.API.registrationNonce||null}},4447:function(e,t){"use strict";t.Z={getAssetBuildUrl:e=>e.assets.buildUrl||null}},9546:function(e,t){"use strict";t.Z={getIDCData:e=>e.IDC||{}}},246:function(e,t,n){"use strict";var i=n(6931),o=n(4447),r=n(9546);const c={...i.Z,...o.Z,...r.Z};t.Z=c},682:function(e,t,n){"use strict";n.d(t,{t:function(){return r},i:function(){return c}});var i=n(4665),o=n(246);const r="jetpack-connection-ui",c={reducer:i.Z,selectors:o.Z,initialState:window.CUI_INITIAL_STATE||{}}},1043:function(e,t,n){"use strict";var i=n(1625),o=n(9196);t.useSubscription=function(e){var t=e.getCurrentValue,n=e.subscribe,r=o.useState((function(){return{getCurrentValue:t,subscribe:n,value:t()}}));e=r[0];var c=r[1];return r=e.value,e.getCurrentValue===t&&e.subscribe===n||(r=t(),c({getCurrentValue:t,subscribe:n,value:r})),o.useDebugValue(r),o.useEffect((function(){function e(){if(!o){var e=t();c((function(o){return o.getCurrentValue!==t||o.subscribe!==n||o.value===e?o:i({},o,{value:e})}))}}var o=!1,r=n(e);return e(),function(){o=!0,r()}}),[t,n]),r}},36:function(e,t,n){"use strict";e.exports=n(1043)},2042:function(e,t,n){"use strict";e.exports=n.p+"images/disconnect-confirm-dc9fe8f5c68cfd1320e0.jpg"},724:function(e,t,n){"use strict";e.exports=n.p+"images/disconnect-thanks-5873bfac56a9bd7322cd.jpg"},9196:function(e){"use strict";e.exports=window.React},1850:function(e){"use strict";e.exports=window.ReactDOM},2819:function(e){"use strict";e.exports=window.lodash},5609:function(e){"use strict";e.exports=window.wp.components},4333:function(e){"use strict";e.exports=window.wp.compose},9818:function(e){"use strict";e.exports=window.wp.data},9307:function(e){"use strict";e.exports=window.wp.element},5736:function(e){"use strict";e.exports=window.wp.i18n},6483:function(e){"use strict";e.exports=window.wp.url},8134:function(e,t,n){"use strict";function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}n.d(t,{Z:function(){return i}})},4316:function(e,t,n){"use strict";function i(e){if(Array.isArray(e))return e}n.d(t,{Z:function(){return i}})},7024:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(8134);function o(e){if(Array.isArray(e))return(0,i.Z)(e)}},5200:function(e,t,n){"use strict";function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return i}})},1687:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return i}})},3772:function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}n.d(t,{Z:function(){return o}})},9057:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var i=n(2406),o=n(8189),r=n(4621);function c(e){var t=(0,o.Z)();return function(){var n,o=(0,i.Z)(e);if(t){var c=(0,i.Z)(this).constructor;n=Reflect.construct(o,arguments,c)}else n=o.apply(this,arguments);return(0,r.Z)(this,n)}}},8086:function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return i}})},5672:function(e,t,n){"use strict";function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},i.apply(this,arguments)}n.d(t,{Z:function(){return i}})},2406:function(e,t,n){"use strict";function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}n.d(t,{Z:function(){return i}})},2104:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(3051);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,i.Z)(e,t)}},8189:function(e,t,n){"use strict";function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{Z:function(){return i}})},613:function(e,t,n){"use strict";function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{Z:function(){return i}})},120:function(e,t,n){"use strict";function i(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r=[],_n=!0,c=!1;try{for(n=n.call(e);!(_n=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);_n=!0);}catch(e){c=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(c)throw o}}return r}}n.d(t,{Z:function(){return i}})},1722:function(e,t,n){"use strict";function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:function(){return i}})},6083:function(e,t,n){"use strict";function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:function(){return i}})},2141:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(8086);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach((function(t){(0,i.Z)(e,t,n[t])}))}return e}},9591:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(8086);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},4621:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(9504),o=n(5200);function r(e,t){if(t&&("object"===(0,i.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}},3051:function(e,t,n){"use strict";function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}n.d(t,{Z:function(){return i}})},572:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var i=n(4316),o=n(120),r=n(3611),c=n(1722);function s(e,t){return(0,i.Z)(e)||(0,o.Z)(e,t)||(0,r.Z)(e,t)||(0,c.Z)()}},9128:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var i=n(7024),o=n(613),r=n(3611),c=n(6083);function s(e){return(0,i.Z)(e)||(0,o.Z)(e)||(0,r.Z)(e)||(0,c.Z)()}},9504:function(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}n.d(t,{Z:function(){return i}})},3611:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(8134);function o(e,t){if(e){if("string"==typeof e)return(0,i.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,i.Z)(e,t):void 0}}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");i.length&&(e=i[i.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e}(),function(){"use strict";var e=n(1850),t=n.n(e),i=n(9196),o=n.n(i),r=n(9818),c=n(8509),s=n(682);const a=(0,r.createReduxStore)(s.t,s.i);(0,r.register)(a),function(){const e=document.getElementById("jetpack-connection-ui-container");null!==e&&t().render(o().createElement(c.Z,null),e)}()}()}();
\ No newline at end of file +__("Icon for the product %s","jetpack-connection-ui"),e.title)})),o().createElement("h1",{className:"jp-components__pricing-card__title"},e.title),o().createElement("div",{className:"jp-components__pricing-card__pricing"},e.priceBefore!==e.priceAfter&&o().createElement("div",{className:"jp-components__pricing-card__price-before"},o().createElement("span",{className:"jp-components__pricing-card__currency"},n.symbol),o().createElement("span",{className:"jp-components__pricing-card__price"},n.integer),u(n)&&o().createElement("span",{className:"jp-components__pricing-card__price-decimal"}," ",n.fraction),o().createElement("div",{className:"jp-components__pricing-card__price-strikethrough"})),o().createElement("div",{className:"jp-components__pricing-card__price-after"},o().createElement("span",{className:"jp-components__pricing-card__currency"},t.symbol),o().createElement("span",{className:"jp-components__pricing-card__price"},t.integer),u(t)&&o().createElement("span",{className:"jp-components__pricing-card__price-decimal"},t.fraction)),o().createElement("span",{className:"jp-components__pricing-card__price-details"},e.priceDetails)),e.children&&o().createElement("div",{className:"jp-components__pricing-card__extra-content-wrapper"},e.children),e.ctaText&&o().createElement("div",{className:"jp-components__pricing-card__cta"},o().createElement(s.Button,{className:"jp-components__pricing-card__button",label:e.ctaText,onClick:e.onCtaClick},e.ctaText)),e.infoText&&o().createElement("div",{className:"jp-components__pricing-card__info"},e.infoText))};p.propTypes={title:r().string.isRequired,icon:r().string,priceBefore:r().number.isRequired,priceAfter:r().number.isRequired,priceDetails:r().string,currencyCode:r().string,ctaText:r().string,onCtaClick:r().func,infoText:r().oneOfType([r().string,r().object])},p.defaultProps={currencyCode:"USD",priceDetails:__("/month, paid yearly","jetpack-connection-ui")},n.Z=p},6017:function(e,n,t){"use strict";t.d(n,{h:function(){return i},s:function(){return o}});const i={"headline-medium":"h1","headline-small":"h2","headline-small-regular":"h2","title-medium":"h3","title-small":"h4",body:"p","body-small":"p","body-extra-small":"p",label:"p"},o=["mt","mr","mb","ml","mx","my","m","pt","pr","pb","pl","px","py","p"]},5106:function(e,n,t){"use strict";t.d(n,{H3:function(){return d}});var i=t(2402),o=t.n(i),c=t(9196),r=t.n(c),s=t(5235),a=t.n(s),l=t(3280),u=t(6017);const p=e=>{let{variant:n="body",children:t,component:i,className:s,...p}=e;const d=i||u.h[n]||"span",g=(0,c.useMemo)((()=>u.s.reduce(((e,n)=>(void 0!==p[n]&&(e+=l.Z[`${n}-${p[n]}`]+" ",delete p[n]),e)),"")),[p]);return r().createElement(d,o()({className:a()(l.Z.reset,l.Z[n],s,g)},p),t)};n.ZP=p;const d=e=>{let{children:n,weight:t="bold",...i}=e;const c="headline-small"+("bold"===t?"":`-${t}`);return r().createElement(p,o()({variant:c,mb:3},i),n)}},9922:function(e,n,t){"use strict";function i(e,n,t,i){const o=new URL("https://wordpress.com/checkout/"),c=new URL(`${o}${n}/${e}`);return c.searchParams.set("redirect_to",t),i||c.searchParams.set("unlinked",1),c.searchParams.set("site",n),c.toString()}t.d(n,{Z:function(){return i}})},6324:function(e,n,t){"use strict";function i(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const t={};let i;var o;"undefined"!=typeof window&&(i=null===(o=window.Initial_State)||void 0===o?void 0:o.calypsoEnv);if(0===e.search("https://")){const n=new URL(e);e=`https://${n.host}${n.pathname}`,t.url=encodeURIComponent(e)}else t.source=encodeURIComponent(e);Object.keys(n).map((e=>{t[e]=encodeURIComponent(n[e])})),!Object.keys(t).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(t.site=jetpack_redirects.currentSiteRawUrl),i&&(t.calypso_env=i);const c=Object.keys(t).map((e=>e+"="+t[e])).join("&");return"https://jetpack.com/redirect/?"+c}t.d(n,{Z:function(){return i}})},1132:function(e,n,t){let i={};try{i=t(Object(function(){var e=new Error("Cannot find module 'jetpackConfig'");throw e.code="MODULE_NOT_FOUND",e}()))}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),i={missingConfig:!0}}const o=e=>i.hasOwnProperty(e);e.exports={jetpackConfigHas:o,jetpackConfigGet:e=>{if(!o(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return i[e]}}},2458:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c);const s=e=>{const{images:n,assetBaseUrl:t}=e;if(!n.length)return null;const i=n.map(((e,n)=>o().createElement(o().Fragment,{key:n},o().createElement("img",{src:t+e,alt:""}))));return o().createElement("div",{className:"jp-connection__connect-screen__image-slider"},i)};s.propTypes={images:r().arrayOf(r().string).isRequired,assetBaseUrl:r().string},s.defaultProps={assetBaseUrl:""},n.Z=s},8524:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c),s=t(1202),a=t(2458);t(9610);const l=e=>{const{title:n,children:t,className:i,assetBaseUrl:c,images:r}=e,l=null==r?void 0:r.length;return o().createElement("div",{className:"jp-connection__connect-screen-layout"+(l?" jp-connection__connect-screen-layout__two-columns":"")+(i?" "+i:"")},o().createElement("div",{className:"jp-connection__connect-screen-layout__left"},o().createElement(s.Z,null),o().createElement("h2",null,n),t),l?o().createElement("div",{className:"jp-connection__connect-screen-layout__right"},o().createElement(a.Z,{images:r,assetBaseUrl:c})):null)};l.propTypes={title:r().string,className:r().string,images:r().arrayOf(r().string),assetBaseUrl:r().string},n.Z=l},7710:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c),s=t(5736),a=t(4082),l=t(1294),u=t(8258);const __=s.__,p=e=>{const{title:n,autoTrigger:t,buttonLabel:i,apiRoot:c,apiNonce:r,registrationNonce:s,from:p,redirectUri:d,children:g,priceBefore:m,priceAfter:f,pricingIcon:h,pricingTitle:y,pricingCurrencyCode:b,wpcomProductSlug:_,siteProductAvailabilityHandler:k}=e,{handleRegisterSite:v,isRegistered:C,isUserConnected:E,siteIsRegistering:j,userIsConnecting:w,registrationError:S}=(0,l.Z)({registrationNonce:s,redirectUri:d,apiRoot:c,apiNonce:r,autoTrigger:t,from:p}),N=_||"",{run:P,hasCheckoutStarted:R}=(0,u.Z)({productSlug:N,redirectUrl:d,siteProductAvailabilityHandler:k,from:p}),T=!C||!E,I=Boolean(S),U=j||w||R,Z=N?P:v;return o().createElement(a.Z,{title:n,buttonLabel:i,priceBefore:m,priceAfter:f,pricingIcon:h,pricingTitle:y,pricingCurrencyCode:b,handleButtonClick:Z,showConnectButton:T,displayButtonError:I,buttonIsLoading:U},g)};p.propTypes={title:r().string,buttonLabel:r().string,apiRoot:r().string.isRequired,apiNonce:r().string.isRequired,registrationNonce:r().string.isRequired,from:r().string,redirectUri:r().string.isRequired,autoTrigger:r().bool,pricingTitle:r().string.isRequired,icon:r().string,priceBefore:r().number.isRequired,priceAfter:r().number.isRequired,pricingCurrencyCode:r().string,wpcomProductSlug:r().string,checkSiteHasWpcomProduct:r().func},p.defaultProps={title:__("Over 5 million WordPress sites are faster and more secure","jetpack-connection-ui"),buttonLabel:__("Set up Jetpack","jetpack-connection-ui"),pricingCurrencyCode:"USD",autoTrigger:!1},n.Z=p},4082:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c),s=t(5736),a=t(6324),l=t(7121),u=t(667),p=t(9307),d=t(8524);t(2917);const __=s.__,g=e=>{const{title:n,buttonLabel:t,children:i,priceBefore:c,priceAfter:r,pricingIcon:s,pricingTitle:g,pricingCurrencyCode:m,isLoading:f,handleButtonClick:h,showConnectButton:y,displayButtonError:b,buttonIsLoading:_}=e,k=(0,p.createInterpolateElement)(__("By clicking the button above, you agree to our <tosLink>Terms of Service</tosLink> and to <shareDetailsLink>share details</shareDetailsLink> with WordPress.com.","jetpack-connection-ui"),{tosLink:o().createElement("a",{href:(0,a.Z)("wpcom-tos"),rel:"noopener noreferrer",target:"_blank"}),shareDetailsLink:o().createElement("a",{href:(0,a.Z)("jetpack-support-what-data-does-jetpack-sync"),rel:"noopener noreferrer",target:"_blank"})}),v=(0,p.createInterpolateElement)(__("Already have a subscription? <connectButton/>","jetpack-connection-ui"),{connectButton:o().createElement(l.Z,{label:__("Log in to get started","jetpack-connection-ui"),onClick:h,isLoading:_})});return o().createElement(d.Z,{title:n,className:"jp-connection__connect-screen-required-plan"+(f?" jp-connection__connect-screen-required-plan__loading":"")},o().createElement("div",{className:"jp-connection__connect-screen-required-plan__content"},i,o().createElement("div",{className:"jp-connection__connect-screen-required-plan__pricing-card"},o().createElement(u.Z,{title:g,icon:s,priceBefore:c,currencyCode:m,priceAfter:r,infoText:y?k:""},y&&o().createElement(l.Z,{label:t,onClick:h,displayError:b,isLoading:_}))),y&&o().createElement("div",{className:"jp-connection__connect-screen-required-plan__with-subscription"},v)))};g.propTypes={pricingTitle:r().string.isRequired,priceBefore:r().number.isRequired,priceAfter:r().number.isRequired,pricingCurrencyCode:r().string,title:r().string,buttonLabel:r().string,pricingIcon:r().string,isLoading:r().bool,handleButtonClick:r().func,showConnectButton:r().bool,displayButtonError:r().bool,buttonIsLoading:r().bool},g.defaultProps={pricingCurrencyCode:"USD",showConnectButton:!0,isLoading:!1,buttonIsLoading:!1,displayButtonError:!1,handleButtonClick:()=>{}},n.Z=g},9625:function(e,n,t){"use strict";var i=t(9196),o=t(5162),c=t.n(o),r=t(4743);const s=e=>{const{redirectFunc:n,connectUrl:t,redirectUri:o,from:c}=e,[s,a]=(0,i.useState)(null);return t&&t!==s&&a(t),(0,i.useEffect)((()=>{s||r.ZP.fetchAuthorizationUrl(o).then((e=>a(e.authorizeUrl))).catch((e=>{throw e}))}),[]),s?(n(s+(c?(s.includes("?")?"&":"?")+"from="+encodeURIComponent(c):"")),null):null};s.propTypes={connectUrl:c().string,redirectUri:c().string.isRequired,from:c().string,redirectFunc:c().func},s.defaultProps={redirectFunc:e=>window.location.assign(e),redirectUri:null},n.Z=s},7879:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c),s=t(5736),a=t(4322);const __=s.__,l=e=>{const{connectedPlugins:n,disconnectingPlugin:t}=e,c=(0,i.useMemo)((()=>{if(n){return Object.keys(n).map((e=>Object.assign({slug:e},n[e]))).filter((e=>t!==e.slug))}return[]}),[n,t]);return n&&c.length>0?o().createElement(o().Fragment,null,o().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},o().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is powering other plugins on your site. If you disconnect, these plugins will no longer work.","jetpack-connection-ui"))),o().createElement("div",{className:"jp-connection__disconnect-card__group"},c.map((e=>o().createElement(a.Z,{title:e.name,key:e.slug}))))):null};l.propTypes={connectedPlugins:r().array,disconnectingPlugin:r().string},n.Z=l},9159:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5736),r=t(5162),s=t.n(r),a=t(4743),l=t(5106),u=t(526),p=t(9818),d=t(9625),g=t(6168),m=t(428),f=t(1294);t(2427);const __=c.__,h=e=>{var n,t,c,r;const{apiRoot:s,apiNonce:h,redirectUri:y,title:b,connectionInfoText:_,onDisconnected:k,connectedPlugins:v,connectedSiteId:C,context:E,onConnectUser:j,requiresUserConnection:w}=e,{isRegistered:S,isUserConnected:N,userConnectionData:P,hasConnectedOwner:R}=(0,f.Z)({apiRoot:s,apiNonce:h}),T=w&&!R,I=(0,i.useRef)(),U=null===(n=P.currentUser)||void 0===n||null===(t=n.wpcomUser)||void 0===t?void 0:t.avatar;(0,i.useEffect)((()=>{U&&(I.current.style.backgroundImage=`url('${U}')`)}),[U]);const[Z,O]=(0,i.useState)(!1),D=(0,p.useSelect)((e=>e(m.t).getUserIsConnecting()),[]),{setConnectionStatus:x,setUserIsConnecting:F}=(0,p.useDispatch)(m.t),A=j||F;(0,i.useEffect)((()=>{a.ZP.setApiRoot(s),a.ZP.setApiNonce(h)}),[s,h]);const L=(0,i.useCallback)((e=>{e&&e.preventDefault(),O(!0)}),[O]),B=(0,i.useCallback)((e=>{e&&e.preventDefault(),O(!1)}),[O]),$=(0,i.useCallback)((e=>{e&&e.preventDefault(),x({isActive:!1,isRegistered:!1,isUserConnected:!1}),k&&"[object Function]"==={}.toString.call(k)&&k()}),[k,x]);return S?o().createElement("div",{className:"jp-connection-status-card"},o().createElement(l.H3,null,b),o().createElement(l.ZP,{variant:"body"},_),o().createElement("div",{className:"jp-connection-status-card--status"},o().createElement("div",{className:"jp-connection-status-card--cloud"}),o().createElement("div",{className:"jp-connection-status-card--line"+(N?"":" jp-connection-status-card--site-only")}),o().createElement("div",{className:"jp-connection-status-card--jetpack-logo"}),o().createElement("div",{className:"jp-connection-status-card--avatar",ref:I})),o().createElement("ul",{className:"jp-connection-status-card--list"},o().createElement("li",{className:"jp-connection-status-card--list-item-success"},__("Site connected.","jetpack-connection-ui")," ",o().createElement(u.Z,{variant:"link",weight:"regular",onClick:L,className:"jp-connection__disconnect-dialog__link"},__("Disconnect","jetpack-connection-ui")),o().createElement(g.Z,{apiRoot:s,apiNonce:h,onDisconnected:$,connectedPlugins:v,connectedSiteId:C,connectedUser:P,isOpen:Z,onClose:B,context:E})),N&&o().createElement("li",{className:"jp-connection-status-card--list-item-success"},__("Logged in as","jetpack-connection-ui")," ",null===(c=P.currentUser)||void 0===c||null===(r=c.wpcomUser)||void 0===r?void 0:r.display_name),(!N||!R)&&o().createElement("li",{className:"jp-connection-status-card--list-item-"+(T?"error":"info")},T&&__("Requires user connection.","jetpack-connection-ui")," ",o().createElement(u.Z,{variant:"link",disabled:D,onClick:A,className:"jp-connection-status-card--btn-connect-user"},__("Connect your user account","jetpack-connection-ui")))),D&&o().createElement(d.Z,{redirectUri:y})):null};h.propTypes={apiRoot:s().string.isRequired,apiNonce:s().string.isRequired,redirectUri:s().string,connectedPlugins:s().array,connectedSiteId:s().number,title:s().string,connectionInfoText:s().string,onDisconnected:s().func,context:s().string,onConnectUser:s().func,requiresUserConnection:s().bool},h.defaultProps={title:__("Connection","jetpack-connection-ui"),connectionInfoText:__("Leverages the cloud for more powerful Jetpack features.","jetpack-connection-ui"),redirectUri:null,onConnectUser:null,requiresUserConnection:!0},n.Z=h},4322:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c);t(4220);const s=e=>{const{title:n,value:t,description:i}=e;return o().createElement("div",{className:"jp-connection__disconnect-card card"},o().createElement("div",{className:"jp-connection__disconnect-card__card-content"},o().createElement("p",{className:"jp-connection__disconnect-card__card-headline"},n),(t||i)&&o().createElement("div",{className:"jp-connection__disconnect-card__card-stat-block"},o().createElement("span",{className:"jp-connection__disconnect-card__card-stat"},t),o().createElement("div",{className:"jp-connection__disconnect-card__card-description"},i))))};s.propTypes={title:r().string,value:r().oneOfType([r().string,r().number]),description:r().number},n.Z=s},6168:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c),s=t(5736),a=t(5609),l=t(4743),u=t(6975),p=t(1132),d=(t(287),t(9015)),g=t(5995),m=t(1702),f=t(1166);const __=s.__,h=e=>{const[n,t]=(0,i.useState)(!1),[c,r]=(0,i.useState)(!1),[s,h]=(0,i.useState)(!1),[y,b]=(0,i.useState)(!1),[_,k]=(0,i.useState)(!1),[v,C]=(0,i.useState)(!1),{apiRoot:E,apiNonce:j,connectedPlugins:w,title:S,pluginScreenDisconnectCallback:N,onDisconnected:P,onError:R,disconnectStepComponent:T,context:I,connectedUser:U,connectedSiteId:Z,isOpen:O,onClose:D}=e;let x="";(0,p.jetpackConfigHas)("consumer_slug")&&(x=(0,p.jetpackConfigGet)("consumer_slug"));const F=(0,i.useMemo)((()=>({context:I,plugin:x})),[I,x]);(0,i.useEffect)((()=>{l.ZP.setApiRoot(E),l.ZP.setApiNonce(j)}),[E,j]),(0,i.useEffect)((()=>{U&&U.ID&&U.login&&u.Z.initialize(U.ID,U.login)}),[U,U.ID,U.login]),(0,i.useEffect)((()=>{O&&u.Z.tracks.recordEvent("jetpack_disconnect_dialog_open",F)}),[O,F]),(0,i.useEffect)((()=>{O&&(c?!c||y||_?y&&!_?u.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"survey"},F)):_&&u.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"thank_you"},F)):u.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect_confirm"},F)):u.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect"},F)))}),[O,c,y,_,F]);const A=(0,i.useCallback)((()=>{l.ZP.disconnectSite().then((()=>{t(!1),r(!0)})).catch((e=>{t(!1),h(e),R&&R(e)}))}),[t,r,h,R]),L=(0,i.useCallback)(((e,n)=>{C(!0),fetch("https://public-api.wordpress.com/wpcom/v2/marketing/feedback-survey",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)}).then((e=>e.json())).then((e=>{if(!0!==e.success)throw new Error("Survey endpoint returned error code "+e.code);u.Z.tracks.recordEvent("jetpack_disconnect_survey_submit",n),k(!0),C(!1)})).catch((e=>{u.Z.tracks.recordEvent("jetpack_disconnect_survey_error",Object.assign({},{error:e.message},n)),k(!0),C(!1)}))}),[C,k]),B=(0,i.useCallback)((e=>{e&&e.preventDefault(),h(!1),t(!0),"plugins"!==I?A():N&&N(e)}),[h,t,N,I,A]),$=(0,i.useCallback)((e=>u.Z.tracks.recordEvent(e,F)),[F]),M=(0,i.useCallback)((()=>U.ID&&Z),[U,Z]),J=(0,i.useCallback)(((e,n,t)=>{if(t&&t.preventDefault(),!M())return void k(!0);const i={site_id:Z,user_id:U.ID,survey_id:"jetpack-plugin-disconnect",survey_responses:{"why-cancel":{response:e,text:n||null}}},o=Object.assign({},F,{disconnect_reason:e});L(i,o)}),[L,k,M,Z,U,F]),z=(0,i.useCallback)((e=>{e&&e.preventDefault(),P&&P(),D()}),[P,D]),q=(0,i.useCallback)((e=>{e&&e.preventDefault(),b(!0)}),[b]);return o().createElement(o().Fragment,null,O&&o().createElement(a.Modal,{title:"",contentLabel:S,aria:{labelledby:"jp-connection__disconnect-dialog__heading"},onRequestClose:D,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"jp-connection__disconnect-dialog"+(c?" jp-connection__disconnect-dialog__success":"")},c?!c||y||_?y&&!_?o().createElement(m.Z,{isSubmittingFeedback:v,onFeedBackProvided:J,onExit:z}):_?o().createElement(f.Z,{onExit:z}):void 0:o().createElement(g.Z,{canProvideFeedback:M(),onProvideFeedback:q,onExit:z}):o().createElement(d.Z,{title:S,connectedPlugins:w,disconnectStepComponent:T,isDisconnecting:n,closeModal:D,onDisconnect:B,disconnectError:s,context:I,disconnectingPlugin:x,trackModalClick:$})))};h.propTypes={apiRoot:r().string.isRequired,apiNonce:r().string.isRequired,title:r().string,onDisconnected:r().func,onError:r().func,context:r().string,connectedPlugins:r().oneOfType([r().array,r().object]),pluginScreenDisconnectCallback:r().func,disconnectStepComponent:r().element,connectedUser:r().object,connectedSiteId:r().number,isOpen:r().bool,onClose:r().func},h.defaultProps={title:__("Are you sure you want to disconnect?","jetpack-connection-ui"),context:"jetpack-dashboard",connectedUser:{}},n.Z=h},5995:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c),s=t(9307),a=t(5736),l=t(5609),u=t(1133),p=t(2042);const __=a.__,d=e=>{const{onExit:n,canProvideFeedback:t,onProvideFeedback:i}=e;return o().createElement("div",{className:"jp-connection__disconnect-dialog__content"},o().createElement(u.Z,{icon:"unlink",imageUrl:p}),o().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy jp-connection__disconnect-dialog__step-copy--narrow"},o().createElement("h1",null,(0,s.createInterpolateElement)(__("Jetpack has been <br/>successfully disconnected.","jetpack-connection-ui"),{br:o().createElement("br",null)})),t&&o().createElement(o().Fragment,null,o().createElement("p",null,__("We’re sorry to see you go. Here at Jetpack, we’re always striving to provide the best experience for our customers. Please take our short survey (2 minutes, promise).","jetpack-connection-ui")),o().createElement("p",null,o().createElement(l.Button,{variant:"primary",onClick:i,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Help us improve","jetpack-connection-ui"))),o().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:n},__("No thank you","jetpack-connection-ui"))),!t&&o().createElement(o().Fragment,null,o().createElement("p",null,o().createElement(l.Button,{variant:"primary",onClick:n,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack-connection-ui"))))))};d.propTypes={onExit:r().func,onProvideFeedback:r().func,canProvideFeedback:r().bool},n.Z=d},9015:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(9307),r=t(5736),s=t(6324),a=t(5609),l=t(5162),u=t.n(l),p=t(7879);const __=r.__,d=e=>{const{title:n,isDisconnecting:t,onDisconnect:r,disconnectError:l,disconnectStepComponent:u,connectedPlugins:d,disconnectingPlugin:g,closeModal:m,context:f,trackModalClick:h}=e,y=(0,i.useCallback)((()=>h("jetpack_disconnect_dialog_click_learn_about")),[h]),b=(0,i.useCallback)((()=>h("jetpack_disconnect_dialog_click_support")),[h]),_=(0,i.useCallback)((()=>{h("jetpack_disconnect_dialog_click_stay_connected"),m()}),[h,m]),k=(0,i.useCallback)((e=>{h("jetpack_disconnect_dialog_click_disconnect"),r(e)}),[h,r]);return o().createElement(o().Fragment,null,o().createElement("div",{className:"jp-connection__disconnect-dialog__content"},o().createElement("h1",{id:"jp-connection__disconnect-dialog__heading"},n),o().createElement(p.Z,{connectedPlugins:d,disconnectingPlugin:g}),u,(()=>{if(!(d&&Object.keys(d).filter((e=>e!==g)).length)&&!u)return o().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},o().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is currently powering multiple products on your site.","jetpack-connection-ui"),o().createElement("br",null),__("Once you disconnect Jetpack, these will no longer work.","jetpack-connection-ui")))})()),o().createElement("div",{className:"jp-connection__disconnect-dialog__actions"},o().createElement("div",{className:"jp-row"},o().createElement("div",{className:"lg-col-span-7 md-col-span-8 sm-col-span-4"},o().createElement("p",null,(0,c.createInterpolateElement)(__("<strong>Need help?</strong> Learn more about the <jpConnectionInfoLink>Jetpack connection</jpConnectionInfoLink> or <jpSupportLink>contact Jetpack support</jpSupportLink>.","jetpack-connection-ui"),{strong:o().createElement("strong",null),jpConnectionInfoLink:o().createElement("a",{href:(0,s.Z)("why-the-wordpress-com-connection-is-important-for-jetpack"),rel:"noopener noreferrer",target:"_blank",className:"jp-connection__disconnect-dialog__link",onClick:y}),jpSupportLink:o().createElement("a",{href:(0,s.Z)("jetpack-support"),rel:"noopener noreferrer",target:"_blank",className:"jp-connection__disconnect-dialog__link",onClick:b})}))),o().createElement("div",{className:"jp-connection__disconnect-dialog__button-wrap lg-col-span-5 md-col-span-8 sm-col-span-4"},o().createElement(a.Button,{variant:"primary",disabled:t,onClick:_,className:"jp-connection__disconnect-dialog__btn-dismiss"},"plugins"===f?__("Cancel","jetpack-connection-ui"):__("Stay connected","jetpack-connection-ui",0)),(()=>{let e=__("Disconnect","jetpack-connection-ui");return t?e=__("Disconnecting…","jetpack-connection-ui"):"plugins"===f&&(e=__("Deactivate","jetpack-connection-ui")),o().createElement(a.Button,{variant:"primary",disabled:t,onClick:k,className:"jp-connection__disconnect-dialog__btn-disconnect"},e)})())),l&&o().createElement("p",{className:"jp-connection__disconnect-dialog__error"},l)))};d.propTypes={title:u().string,isDisconnecting:u().bool,onDisconnect:u().func,disconnectError:u().bool,disconnectStepComponent:u().elementType,connectedPlugins:u().array,disconnectingPlugin:u().string,closeModal:u().func,context:u().string,trackModalClick:u().func},n.Z=d},1702:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c),s=t(5736),a=(t(9823),t(6336));const __=s.__,l=e=>{const{onExit:n,onFeedBackProvided:t,isSubmittingFeedback:i}=e;return o().createElement("div",{className:"jp-connection__disconnect-dialog__content"},o().createElement("h1",null,__("Before you go, help us improve Jetpack","jetpack-connection-ui")),o().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Let us know what didn‘t work for you","jetpack-connection-ui")),o().createElement(a.Z,{onSubmit:t,isSubmittingFeedback:i}),o().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:n},__("Skip for now","jetpack-connection-ui")))};l.PropTypes={onExit:r().func,onFeedBackProvided:r().func,isSubmittingFeedback:r().bool},n.Z=l},1166:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c),s=t(1133),a=t(5736),l=t(5609),u=t(9307),p=t(724);const __=a.__,d=e=>{const{onExit:n}=e;return o().createElement("div",{className:"jp-connection__disconnect-dialog__content"},o().createElement(s.Z,{format:"vertical",imageUrl:p}),o().createElement("div",{className:"jp-connection__disconnect-dialog__copy"},o().createElement("h1",null,__("Thank you!","jetpack-connection-ui")),o().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},(0,u.createInterpolateElement)(__("Your answer has been submitted. <br/>Thanks for your input on how we can improve Jetpack.","jetpack-connection-ui"),{br:o().createElement("br",null)})),o().createElement(l.Button,{variant:"primary",onClick:n,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack-connection-ui"))))};d.PropTypes={onExit:r().func,assetBaseUrl:r().string},n.Z=d},6336:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5162),r=t.n(c),s=t(5609),a=t(5736),l=t(4372);const __=a.__,u=e=>{const{onSubmit:n,isSubmittingFeedback:t}=e,[c,r]=(0,i.useState)(),[a,u]=(0,i.useState)(),p=[{id:"troubleshooting",answerText:__("Troubleshooting - I'll be reconnecting afterwards.","jetpack-connection-ui")},{id:"not-working",answerText:__("I can't get it to work.","jetpack-connection-ui")},{id:"slowed-down-site",answerText:__("It slowed down my site.","jetpack-connection-ui")},{id:"buggy",answerText:__("It's buggy.","jetpack-connection-ui")},{id:"what-does-it-do",answerText:__("I don't know what it does.","jetpack-connection-ui")}],d="another-reason",g=(0,i.useCallback)((()=>{n(c,c===d?a:"")}),[n,d,a,c]),m=(0,i.useCallback)((e=>{const n=e.target.value;e.stopPropagation(),u(n)}),[u]),f=e=>e===c?"jp-connect__disconnect-survey-card--selected":"",h=(0,i.useCallback)(((e,n)=>{switch(n.key){case"Enter":case"Space":case"Spacebar":case" ":r(e)}}),[r]);return o().createElement(o().Fragment,null,o().createElement("div",{className:"jp-connection__disconnect-dialog__survey"},p.map((e=>o().createElement(l.Z,{id:e.id,onClick:r,onKeyDown:h,className:"card jp-connect__disconnect-survey-card "+f(e.id)},o().createElement("p",{className:"jp-connect__disconnect-survey-card__answer"},e.answerText)))),o().createElement(l.Z,{id:d,onClick:r,onKeyDown:h,className:"card jp-connect__disconnect-survey-card "+f(d)},o().createElement("p",{className:"jp-connect__disconnect-survey-card__answer"},__("Other:","jetpack-connection-ui")," ",o().createElement("input",{placeholder:__("share your experience","jetpack-connection-ui"),className:"jp-connect__disconnect-survey-card__input",type:"text",value:a,onChange:m,maxLength:1e3})))),o().createElement("p",null,o().createElement(s.Button,{disabled:!c||t,variant:"primary",onClick:g,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},t?__("Submitting…","jetpack-connection-ui"):__("Submit Feedback","jetpack-connection-ui",0))))};u.PropTypes={onSubmit:r().func,isSubmittingFeedback:r().bool},n.Z=u},4372:function(e,n,t){"use strict";var i=t(9196),o=t.n(i);t(9823);n.Z=e=>{const{id:n,onClick:t,onKeyDown:c,children:r,className:s}=e,a=(0,i.useCallback)((()=>{t(n)}),[n,t]),l=(0,i.useCallback)((e=>{c(n,e)}),[n,c]);return o().createElement("div",{tabIndex:"0",role:"button",onClick:a,onKeyDown:l,className:"card jp-connect__disconnect-survey-card "+s},r)}},1294:function(e,n,t){"use strict";var i,o=t(9196),c=t(9818),r=t(4743),s=t(428);const a=null!==(i=window)&&void 0!==i&&i.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};n.Z=function(){let{registrationNonce:e=a.registrationNonce,apiRoot:n=a.apiRoot,apiNonce:t=a.apiNonce,redirectUri:i,autoTrigger:l,from:u,skipUserConnection:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{registerSite:d,connectUser:g,refreshConnectedPlugins:m}=(0,c.useDispatch)(s.t),f=(0,c.useSelect)((e=>e(s.t).getRegistrationError())),{siteIsRegistering:h,userIsConnecting:y,userConnectionData:b,connectedPlugins:_,isRegistered:k,isUserConnected:v,hasConnectedOwner:C}=(0,c.useSelect)((e=>({siteIsRegistering:e(s.t).getSiteIsRegistering(),userIsConnecting:e(s.t).getUserIsConnecting(),userConnectionData:e(s.t).getUserConnectionData(),connectedPlugins:e(s.t).getConnectedPlugins(),...e(s.t).getConnectionStatus()}))),E=()=>{p?i&&(window.location=i):g({from:u,redirectUri:i})},j=n=>{n&&n.preventDefault(),k?E():d({registrationNonce:e,redirectUri:i}).then((()=>{E()}))};return(0,o.useEffect)((()=>{r.ZP.setApiRoot(n),r.ZP.setApiNonce(t)}),[n,t]),(0,o.useEffect)((()=>{!l||h||y||j()}),[]),{handleRegisterSite:j,handleConnectUser:E,refreshConnectedPlugins:m,isRegistered:k,isUserConnected:v,siteIsRegistering:h,userIsConnecting:y,registrationError:f,userConnectionData:b,hasConnectedOwner:C,connectedPlugins:_}}},8258:function(e,n,t){"use strict";t.d(n,{Z:function(){return m}});var i,o=t(9196),c=t(9818),r=t(4743),s=t(9922),a=t(428),l=t(1294);const{registrationNonce:u,apiRoot:p,apiNonce:d,siteSuffix:g}=null!==(i=window)&&void 0!==i&&i.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};function m(){let{productSlug:e,redirectUrl:n,siteSuffix:t=g,siteProductAvailabilityHandler:i=null,from:m}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[f,h]=(0,o.useState)(!1),{registerSite:y}=(0,c.useDispatch)(a.t),{isUserConnected:b,isRegistered:_,handleConnectUser:k}=(0,l.Z)({redirectUri:n,from:m}),v=(0,s.Z)(e,t,n,b),C=()=>Promise.resolve(i&&i()).then((e=>{if(e)return k();window.location.href=v})),E=e=>{if(e&&e.preventDefault(),h(!0),_)return C();y({registrationNonce:u,redirectUri:n}).then(C)};return(0,o.useEffect)((()=>{r.ZP.setApiRoot(p),r.ZP.setApiNonce(d)}),[]),{run:E,isRegistered:_,hasCheckoutStarted:f}}},7523:function(e,n,t){"use strict";t.d(n,{LI:function(){return c},N4:function(){return s},T1:function(){return l},TS:function(){return u},ZP:function(){return k},i6:function(){return o},qV:function(){return a},r7:function(){return r},wQ:function(){return d}});var i=t(4743);const o="SET_CONNECTION_STATUS",c="SET_CONNECTION_STATUS_IS_FETCHING",r="SET_SITE_IS_REGISTERING",s="SET_USER_IS_CONNECTING",a="SET_REGISTRATION_ERROR",l="CLEAR_REGISTRATION_ERROR",u="SET_AUTHORIZATION_URL",p="CONNECT_USER",d="SET_CONNECTED_PLUGINS",g=e=>({type:o,connectionStatus:e}),m=e=>({type:r,isRegistering:e}),f=e=>({type:s,isConnecting:e}),h=e=>({type:a,registrationError:e}),y=()=>({type:l}),b=e=>({type:u,authorizationUrl:e}),_=e=>({type:d,connectedPlugins:e});const k={setConnectionStatus:g,setConnectionStatusIsFetching:e=>({type:c,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:m,setUserIsConnecting:f,setRegistrationError:h,clearRegistrationError:y,setAuthorizationUrl:b,registerSite:function*(e){let{registrationNonce:n,redirectUri:t}=e;yield y(),yield m(!0);try{const e=yield{type:"REGISTER_SITE",registrationNonce:n,redirectUri:t};return yield g({isRegistered:!0}),yield b(e.authorizeUrl),yield m(!1),Promise.resolve(e)}catch(e){return yield h(e),yield m(!1),Promise.reject(e)}},connectUser:function*(){let{from:e,redirectFunc:n,redirectUri:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yield f(!0),yield{type:p,from:e,redirectFunc:n,redirectUri:t}},setConnectedPlugins:_,refreshConnectedPlugins:()=>async e=>{let{dispatch:n}=e;return await new Promise((e=>i.ZP.fetchConnectedPlugins().then((t=>{n(_(t)),e(t)}))))}}},1432:function(e,n,t){"use strict";var i=t(4743),o=t(9818),c=t(428);const r=(0,o.createRegistryControl)((e=>{let{resolveSelect:n}=e;return function(){let{from:e,redirectFunc:t,redirectUri:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((o,r)=>{n(c.t).getAuthorizationUrl(i).then((n=>{const i=t||(e=>window.location.assign(e)),c=new URL(n);e&&c.searchParams.set("from",encodeURIComponent(e));const r=c.toString();i(r),o(r)})).catch((e=>{r(e)}))}))}}));n.Z={FETCH_AUTHORIZATION_URL:e=>{let{redirectUri:n}=e;return i.ZP.fetchAuthorizationUrl(n)},REGISTER_SITE:e=>{let{registrationNonce:n,redirectUri:t}=e;return i.ZP.registerSite(n,t)},CONNECT_USER:r}},1479:function(e,n,t){"use strict";var i=t(9818),o=t(7523);const c=(0,i.combineReducers)({connectionStatus:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return n.type===o.i6?{...e,...n.connectionStatus}:e},connectionStatusIsFetching:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0;return n.type===o.LI?n.isFetching:e},siteIsRegistering:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0;return n.type===o.r7?n.isRegistering:e},userIsConnecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0;return n.type===o.N4?n.isConnecting:e},registrationError:(e,n)=>{switch(n.type){case o.T1:return!1;case o.qV:return n.registrationError;default:return e}},authorizationUrl:(e,n)=>n.type===o.TS?n.authorizationUrl:e,userConnectionData:(e,n)=>(n.type,e),connectedPlugins:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return n.type===o.wQ?n.connectedPlugins:e}});n.Z=c},7728:function(e,n,t){"use strict";var i=t(9818),o=t(7523),c=t(428);const r={getAuthorizationUrl:{isFulfilled:function(e){const n=Boolean(e.authorizationUrl);for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];const s=(0,i.select)(c.t).hasFinishedResolution("getAuthorizationUrl",o);return n&&!s&&(0,i.dispatch)(c.t).finishResolution("getAuthorizationUrl",o),n},*fulfill(e){const n=yield o.ZP.fetchAuthorizationUrl(e);yield o.ZP.setAuthorizationUrl(n.authorizeUrl)}}};n.Z={...r}},2725:function(e,n){"use strict";const t={getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1,getUserConnectionData:e=>e.userConnectionData||!1,getConnectedPlugins:e=>e.connectedPlugins||[]};n.Z=t},3535:function(e,n,t){"use strict";var i=t(8294),o=t.n(i),c=t(9818);class r{static mayBeInit(e,n){null===r.store&&(r.store=(0,c.createReduxStore)(e,n),(0,c.register)(r.store))}}o()(r,"store",null),n.Z=r},428:function(e,n,t){"use strict";t.d(n,{t:function(){return l}});var i=t(1479),o=t(7523),c=t(2725),r=t(7728),s=t(1432),a=t(3535);const l="jetpack-connection",u=window.JP_CONNECTION_INITIAL_STATE;u||console.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),a.Z.mayBeInit(l,{__experimentalUseThunks:!0,reducer:i.Z,actions:o.ZP,selectors:c.Z,resolvers:r.Z,controls:s.Z,initialState:u||{}})},934:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(9818),r=t(5736),s=t(4743),a=t(9159),l=t(7710),u=t(428),p=t(7281),d=t(245);const __=r.__;n.Z=(0,c.withSelect)((e=>({connectionStatus:e(u.t).getConnectionStatus()})))((e=>{const n=(0,c.useSelect)((e=>e(p.t).getAPINonce()),[]),t=(0,c.useSelect)((e=>e(p.t).getAPIRoot()),[]),r=(0,c.useSelect)((e=>e(p.t).getRegistrationNonce()),[]),{hasIDC:u,canManageConnection:g,isSafeModeConfirmed:m}=(0,c.useSelect)((e=>e(p.t).getIDCData()),[]),{connectionStatus:f}=e;return(0,i.useEffect)((()=>{s.ZP.setApiRoot(t),s.ZP.setApiNonce(n)}),[t,n]),o().createElement(o().Fragment,null,(!u||m)&&o().createElement(d.Z,null),(!u||m)&&g&&f.isRegistered&&o().createElement(a.Z,{apiRoot:t,apiNonce:n,redirectUri:"tools.php?page=wpcom-connection-manager"}),(!u||m)&&g&&!f.isRegistered&&o().createElement(l.Z,{connectionStatus:f,apiRoot:t,apiNonce:n,registrationNonce:r,from:"connection-ui",redirectUri:"tools.php?page=wpcom-connection-manager",pricingIcon:"data:image/svg+xml,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m21.092 15.164.019-1.703v-.039c0-1.975-1.803-3.866-4.4-3.866-2.17 0-3.828 1.351-4.274 2.943l-.426 1.524-1.581-.065a2.92 2.92 0 0 0-.12-.002c-1.586 0-2.977 1.344-2.977 3.133 0 1.787 1.388 3.13 2.973 3.133H22.399c1.194 0 2.267-1.016 2.267-2.4 0-1.235-.865-2.19-1.897-2.368l-1.677-.29Zm-10.58-3.204a4.944 4.944 0 0 0-.201-.004c-2.75 0-4.978 2.298-4.978 5.133s2.229 5.133 4.978 5.133h12.088c2.357 0 4.267-1.97 4.267-4.4 0-2.18-1.538-3.99-3.556-4.339v-.06c0-3.24-2.865-5.867-6.4-5.867-2.983 0-5.49 1.871-6.199 4.404Z' fill='%23000'/%3E%3C/svg%3E",priceBefore:9,priceAfter:4.5,pricingTitle:__("Jetpack Backup","jetpack-connection-ui"),buttonLabel:__("Get Jetpack Backup","jetpack-connection-ui")},o().createElement("p",null,__("Secure and speed up your site for free with Jetpack's powerful WordPress tools.","jetpack-connection-ui")),o().createElement("ul",null,o().createElement("li",null,__("Measure your impact with beautiful stats","jetpack-connection-ui")),o().createElement("li",null,__("Speed up your site with optimized images","jetpack-connection-ui")),o().createElement("li",null,__("Protect your site against bot attacks","jetpack-connection-ui")),o().createElement("li",null,__("Get notifications if your site goes offline","jetpack-connection-ui")),o().createElement("li",null,__("Enhance your site with dozens of other features","jetpack-connection-ui")))),(!u||m)&&!g&&o().createElement("p",null,"You need to be an admin to access this page."))}))},245:function(e,n,t){"use strict";var i=t(9196),o=t.n(i),c=t(5736);const __=c.__;n.Z=()=>o().createElement("div",{className:"jetpack-cui__header"},o().createElement("h1",null,__("Connection Manager","jetpack-connection-ui")))},8209:function(e,n){"use strict";n.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e}},8610:function(e,n){"use strict";n.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e}},8365:function(e,n){"use strict";n.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e}},5327:function(e,n,t){"use strict";var i=t(9818),o=t(8209),c=t(8610),r=t(8365);const s=(0,i.combineReducers)({API:o.Z,assets:c.Z,IDC:r.Z});n.Z=s},8907:function(e,n){"use strict";n.Z={getAPIRoot:e=>e.API.WP_API_root||null,getAPINonce:e=>e.API.WP_API_nonce||null,getRegistrationNonce:e=>e.API.registrationNonce||null}},4770:function(e,n){"use strict";n.Z={getAssetBuildUrl:e=>e.assets.buildUrl||null}},1483:function(e,n){"use strict";n.Z={getIDCData:e=>e.IDC||{}}},75:function(e,n,t){"use strict";var i=t(8907),o=t(4770),c=t(1483);const r={...i.Z,...o.Z,...c.Z};n.Z=r},7281:function(e,n,t){"use strict";t.d(n,{i:function(){return r},t:function(){return c}});var i=t(5327),o=t(75);const c="jetpack-connection-ui",r={reducer:i.Z,selectors:o.Z,initialState:window.CUI_INITIAL_STATE||{}}},2042:function(e,n,t){"use strict";e.exports=t.p+"images/disconnect-confirm-dc9fe8f5c68cfd1320e0.jpg"},724:function(e,n,t){"use strict";e.exports=t.p+"images/disconnect-thanks-5873bfac56a9bd7322cd.jpg"},9196:function(e){"use strict";e.exports=window.React},1850:function(e){"use strict";e.exports=window.ReactDOM},2819:function(e){"use strict";e.exports=window.lodash},5609:function(e){"use strict";e.exports=window.wp.components},9818:function(e){"use strict";e.exports=window.wp.data},9307:function(e){"use strict";e.exports=window.wp.element},5736:function(e){"use strict";e.exports=window.wp.i18n},444:function(e){"use strict";e.exports=window.wp.primitives},6483:function(e){"use strict";e.exports=window.wp.url}},n={};function t(i){var o=n[i];if(void 0!==o)return o.exports;var c=n[i]={exports:{}};return e[i](c,c.exports,t),c.exports}t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},t.d=function(e,n){for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},function(){var e;t.g.importScripts&&(e=t.g.location+"");var n=t.g.document;if(!e&&n&&(n.currentScript&&(e=n.currentScript.src),!e)){var i=n.getElementsByTagName("script");i.length&&(e=i[i.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=e}(),function(){"use strict";var e=t(1850),n=t.n(e),i=t(9196),o=t.n(i),c=t(9818),r=t(934),s=t(7281);const a=(0,c.createReduxStore)(s.t,s.i);(0,c.register)(a),function(){const e=document.getElementById("jetpack-connection-ui-container");null!==e&&n().render(o().createElement(r.Z,null),e)}()}()}();
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.js.LICENSE.txt b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.js.LICENSE.txt index 00db07be..2d8ad0cf 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.js.LICENSE.txt +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.js.LICENSE.txt @@ -6,23 +6,8 @@ * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js */ -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ - /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ - -/** @license React vundefined - * use-subscription.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.rtl.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.rtl.css index 5924baa9..3f4d00dc 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.rtl.css +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/build/index.rtl.css @@ -1 +1 @@ -#jetpack-connection-ui-container .jetpack-cui__header h1{font-size:4.6em;line-height:1.2em;text-align:right}#jetpack-connection-ui-container{margin:40px}#jetpack-connection-ui-container p{font-size:1.23em;line-height:1.5em}.jp-connection-status-card h3{color:var(--jp-black);font-size:36px;font-weight:400;line-height:40px;margin:0}.jp-connection-status-card a,.jp-connection-status-card a:active,.jp-connection-status-card a:hover{color:var(--jp-black)}.jp-connection-status-card p{color:var(--jp-black);margin:16px 0}.jp-connection-status-card a,.jp-connection-status-card li,.jp-connection-status-card p{font-size:16px;line-height:24px}.jp-connection-status-card--status{align-items:center;display:flex;margin:24px -6px 24px 0}.jp-connection-status-card--cloud{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDIiIGhlaWdodD0iNDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PG1hc2sgaWQ9ImEiIG1hc2stdHlwZT0iYWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjciIHk9IjkiIHdpZHRoPSIyOCIgaGVpZ2h0PSIyMSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMC4zMzMgMTcuNjk3di0uMDhjMC00LjI1My0zLjc2LTcuNy04LjQtNy43LTMuOTE2IDAtNy4yMDYgMi40NTctOC4xMzYgNS43OGE2LjM4NiA2LjM4NiAwIDAgMC0uMjY0LS4wMDVDOS45MjUgMTUuNjkyIDcgMTguNzA4IDcgMjIuNDI5czIuOTI1IDYuNzM4IDYuNTMzIDYuNzM4SDI5LjRjMy4wOTMgMCA1LjYtMi41ODYgNS42LTUuNzc1IDAtMi44NjEtMi4wMTgtNS4yMzctNC42NjYtNS42OTVaIiBmaWxsPSIjZmZmIi8+PC9tYXNrPjxnIG1hc2s9InVybCgjYSkiPjxwYXRoIGQ9Im0zMC4zMzMgMTcuNjk3LTIuNjI1LS4wMy0uMDI1IDIuMjM1IDIuMjAyLjM4MS40NDgtMi41ODZabS0xNi41MzctMi0uMTA3IDIuNjIzIDIuMDc1LjA4NS41Ni0yLTIuNTI4LS43MDhabS0uMjYzIDEzLjQ3djIuNjI1aC4wMDhsLS4wMDgtMi42MjVabS4wNCAwdi0yLjYyNWgtLjAwOWwuMDA4IDIuNjI1Wm0xNS43OTUgMCAuMDE1LTIuNjI1aC0uMDE1djIuNjI1Wm0zLjU5LTExLjQ0MXYtLjExaC01LjI1di4wNTJsNS4yNS4wNThabTAtLjExYzAtNS45MTItNS4xNTUtMTAuMzI0LTExLjAyNS0xMC4zMjR2NS4yNWMzLjQxIDAgNS43NzUgMi40ODIgNS43NzUgNS4wNzVoNS4yNVpNMjEuOTMzIDcuMjkzYy00Ljk4NCAwLTkuMzg4IDMuMTM5LTEwLjY2NCA3LjY5OGw1LjA1NSAxLjQxNWMuNTg1LTIuMDg5IDIuNzYyLTMuODYzIDUuNjEtMy44NjN2LTUuMjVabS04LjAzIDUuNzgyYTkuMTExIDkuMTExIDAgMCAwLS4zNy0uMDA3djUuMjVjLjA1MyAwIC4xMDUuMDAxLjE1Ni4wMDNsLjIxNS01LjI0NlptLS4zNy0uMDA3Yy01LjEzMyAwLTkuMTU4IDQuMjY4LTkuMTU4IDkuMzYyaDUuMjVjMC0yLjM0OCAxLjgyNS00LjExMiAzLjkwOC00LjExMnYtNS4yNVptLTkuMTU4IDkuMzYyYzAgNS4wOTUgNC4wMjUgOS4zNjMgOS4xNTggOS4zNjN2LTUuMjVjLTIuMDgzIDAtMy45MDgtMS43NjUtMy45MDgtNC4xMTNoLTUuMjVabTkuMTY2IDkuMzYzaC4wNGwtLjAxNy01LjI1aC0uMDM5bC4wMTYgNS4yNVptLjAzMSAwaDE1Ljc5NnYtNS4yNUgxMy41NzJ2NS4yNVptMTUuODI3LTUuMjVoLS4wMTZsLS4wMyA1LjI1aC4wNDZ2LTUuMjVabTIuOTc1LTMuMTVjMCAxLjgxNi0xLjQwNyAzLjE1LTIuOTc1IDMuMTV2NS4yNWM0LjYxOCAwIDguMjI1LTMuODM4IDguMjI1LTguNGgtNS4yNVptLTIuNDg5LTMuMTA5YzEuMzU1LjIzNSAyLjQ5IDEuNDg4IDIuNDkgMy4xMDloNS4yNWMwLTQuMTAyLTIuOTAyLTcuNi02Ljg0NC04LjI4MmwtLjg5NiA1LjE3M1oiIGZpbGw9IiMxRTFFMUUiLz48L2c+PC9zdmc+);height:42px;margin-left:4px;width:42px}.jp-connection-status-card--jetpack-logo{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE2IDMyYzguODM3IDAgMTYtNy4xNjMgMTYtMTZTMjQuODM3IDAgMTYgMCAwIDcuMTYzIDAgMTZzNy4xNjMgMTYgMTYgMTZaIiBmaWxsPSIjMDAwIi8+PHBhdGggZD0iTTE2Ljc5NCAxMy4zMTN2MTUuNTExbDgtMTUuNTEyaC04Wk0xNS4xNzUgMTguNjU3VjMuMTc2bC03Ljk2OSAxNS40OGg3Ljk3WiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==);height:32px;margin-right:11px;width:32px}.jp-connection-status-card--btn-connect-user{background:var(--jp-black)!important;border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection-status-card--avatar{background-color:var(--jp-white);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='16' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.498 27.123C6.038 24.165 10.916 21.5 16 21.5c5.084 0 9.963 2.665 11.502 5.623a15.952 15.952 0 0 1-11.257 4.875L16 32l-.245-.002a15.952 15.952 0 0 1-11.257-4.875zM16 8a6 6 0 1 1 0 12 6 6 0 0 1 0-12z' fill='%23A2AAB2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;border:0;border-radius:20px;height:32px;margin-right:-10px;width:32px}.jp-connection-status-card--line{border-top:2px solid var(--jp-black);height:0;width:67px}.jp-connection-status-card--line.jp-connection-status-card--site-only{border-top-style:dashed}.jp-connection-status-card--list{list-style-type:none;margin:16px 0}.jp-connection-status-card--list li{color:var(--jp-black);margin:0 -3px 8px 0;padding-right:25px}.jp-connection-status-card--list-item-success{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTE4LjkzNSA2LTguOSAxMS45Ny01LjE2Mi0zLjgzNyIgc3Ryb2tlPSIjMUUxRTFFIiBzdHJva2Utd2lkdGg9IjEuNSIvPjwvc3ZnPg==) no-repeat 100% 0}.jp-connection-status-card--list-item-error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 100% 0;color:var(--jp-red)!important}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-small);font-weight:600;line-height:1.2;margin-top:0}.jp-connection__disconnect-dialog h2{font-size:var(--font-title-small);font-weight:400;line-height:1.2;margin:0}.jp-connection__disconnect-dialog p{font-size:var(--font-body);margin-top:0}.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text{font-size:1.25rem}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link,.jp-connection__disconnect-dialog__link{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:hover,.jp-connection__disconnect-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:focus,.jp-connection__disconnect-dialog__link:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link--bold,.jp-connection__disconnect-dialog__link--bold{font-weight:700}.jp-connection__disconnect-dialog .components-button{border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection__disconnect-dialog .components-modal__content{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0}.jp-connection__disconnect-dialog .components-modal__content:before,.jp-connection__disconnect-dialog .components-modal__header{display:none}.jp-connection__disconnect-dialog .jp-row{align-items:center;width:calc(100% - 48px)}.jp-connection__disconnect-dialog__content{align-items:center;background:var(--jp-white-off);border-radius:4px;display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0;padding:2rem 1rem;text-align:center}.jp-connection__disconnect-dialog__actions{background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;padding:2rem 0;position:sticky}.jp-connection__disconnect-dialog__actions p{margin-bottom:0}.jp-connection__disconnect-dialog__actions:before{background:linear-gradient(to bottom,transparent,var(--jp-white-off));bottom:calc(100% + 1px);content:"";display:block;height:80px;position:absolute;right:0;width:100%}.jp-connection__disconnect-dialog__btn-dismiss,.jp-connection__disconnect-dialog__btn-dismiss.components-button{background:var(--jp-black)!important;margin-left:10px}.jp-connection__disconnect-dialog__btn-disconnect{background:var(--jp-red)!important}.jp-connection__disconnect-dialog__btn-back-to-wp{background:var(--jp-black)!important}.jp-connection__disconnect-dialog__button-wrap{text-align:right}@media(min-width:960px){.jp-connection__disconnect-dialog__button-wrap{text-align:center}}.jp-connection__disconnect-dialog__error{color:var(--jp-red)}.jp-connection__disconnect-dialog__survey{margin-bottom:1.5rem;max-width:100%}.jp-connection__disconnect-dialog__step-copy{margin:0 auto;max-width:800px}.jp-connection__disconnect-dialog__step-copy--narrow{max-width:600px}@media(max-height:900px){.jp-connection__disconnect-dialog__content .jp-components__decorative-card{display:none}}@media(min-width:600px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{max-width:calc(100% - 32px);width:100%}.jp-connection__disconnect-dialog__actions,.jp-connection__disconnect-dialog__content{padding:2rem}}@media(min-width:960px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{display:flex;flex-direction:column;height:900px;width:1200px}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-large)}.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text{font-size:1.5rem}.jp-connection__disconnect-dialog__content{padding:80px}.jp-connection__disconnect-dialog__actions{padding:2rem 3rem}.jp-row{margin-right:0}}.jp-connection__disconnect-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:0 auto 1rem;max-width:100%;padding:1rem 2rem;text-align:right;width:800px}.jp-connection__disconnect-card__group{margin-bottom:1rem;max-width:100%}.jp-connection__disconnect-card__card-content{display:block;font-size:.875rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-content{align-items:center;display:flex;justify-content:space-between}}.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{flex-shrink:0;font-size:1.25rem;font-weight:600;margin-bottom:0;margin-top:0}@media only screen and (min-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{font-size:1.5rem;margin-left:1.5rem}}@media only screen and (max-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block,.jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block{margin-top:.5rem}}.jp-connection__disconnect-card__card-stat-block{align-items:baseline;display:flex;flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat-block{flex-direction:row-reverse}}.jp-connection__disconnect-card__card-description{flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-description{text-align:left}}.jp-connection__disconnect-card__card-stat{font-size:1rem;font-weight:600;margin-left:.5rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat{font-size:1.5rem;margin-left:0;margin-right:1rem}}.jp-components__decorative-card{border-radius:8px;box-shadow:0 0 15px var(--jp-gray);display:flex;height:280px;margin:0 auto 3rem;max-width:100%;overflow:hidden;position:relative;width:360px}.jp-components__decorative-card__content,.jp-components__decorative-card__image{width:50%}.jp-components__decorative-card__image{background:var(--jp-gray);background-size:cover;position:relative}.jp-components__decorative-card__image:before{background-image:url('data:image/svg+xml;uf8,<svg width="38" height="8" viewBox="0 0 38 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 7C1 7 2.37087 1 6.89831 1C11.4257 1 14.3709 7 18.8983 7C23.4257 7 26.7777 1 31.3051 1C35.912 1 37 7 37 7" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>');content:"";display:block;height:8px;position:absolute;right:24px;top:24px;width:38px}.jp-components__decorative-card__content{background:#fff;padding:2rem}.jp-components__decorative-card__icon-container{background:var(--jp-red);border-radius:50px;height:80px;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:80px}.jp-components__decorative-card__icon{background-position:50%,50%;background-repeat:no-repeat;height:40px;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:40px}.jp-components__decorative-card__icon--unlink{background-image:url('data:image/svg+xml;uf8,<svg width="34" height="37" viewBox="0 0 34 37" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.3335 10.001H25.0002C29.4184 10.001 33.0002 13.5827 33.0002 18.001V19.7788C33.0002 24.197 29.4184 27.7788 25.0002 27.7788H22.3335" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M11.6675 27.7783L9.00082 27.7783C4.58254 27.7783 1.00081 24.1966 1.00081 19.7783L1.00081 18.0005C1.00081 13.5823 4.58253 10.0005 9.00081 10.0005L11.6675 10.0005" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M10.9998 19.167L16.9998 19.167" stroke="white" stroke-width="1.5"/> <path d="M8.99951 35.998L24.9995 0.998048" stroke="white"/> </svg>')}.jp-components__decorative-card__lines,.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{background:#e9eff5;border-radius:6px;display:block;height:12px;position:relative;width:100%}.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{content:"";top:calc(100% + 16px)}.jp-components__decorative-card__lines:after{top:calc(100% + 32px);width:75%}.jp-components__decorative-card--vertical{flex-direction:column}.jp-components__decorative-card--vertical .jp-components__decorative-card__content,.jp-components__decorative-card--vertical .jp-components__decorative-card__image{height:50%;width:100%}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines{margin-left:auto;margin-right:auto;max-width:135px}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:after,.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:before{margin-left:auto;margin-right:auto}.jp-connect__disconnect-survey-card{border:2px solid transparent;border-radius:4px;box-shadow:0 0 15px var(--jp-gray-off);margin-left:auto;margin-right:auto;max-width:100%;padding:1rem;position:relative;text-align:right;width:800px}.jp-connect__disconnect-survey-card--selected{background:var(--jp-gray-off);border-color:var(--jp-black)}.jp-connect__disconnect-survey-card:after{border-left:2px solid var(--jp-black);border-top:2px solid var(--jp-black);content:"";display:block;height:5px;left:1.5rem;position:absolute;top:50%;transform:translateY(-50%) rotate(-45deg);width:5px}.jp-connect__disconnect-survey-card:hover{cursor:pointer}.jp-connect__disconnect-survey-card:focus:not(.jp-disconnect-survey-card--selected),.jp-connect__disconnect-survey-card:hover:not(.jp-disconnect-survey-card--selected){border-color:var(--jp-black-80)}.jp-connect__disconnect-survey-card__answer{align-items:center;display:flex;font-weight:700;margin:0}input.jp-connect__disconnect-survey-card__input{-webkit-appearance:none;background-color:transparent;border:none;color:var(--jp-black-80);flex-grow:1;max-width:calc(100% - 40px);padding-left:40px}@media(min-width:1080px){.jp-connection__connect-screen-layout__left{width:70%}.jp-connection__connect-screen-required-plan{background:linear-gradient(270deg,#fff 70%,#f9f9f6 0);position:relative}}.jp-connection__connect-screen-required-plan__loading{display:none}@media(min-width:1080px){.jp-connection__connect-screen-required-plan__pricing-card{position:absolute;right:62%;top:14%}}.jp-connection__connect-screen-required-plan__pricing-card .components-button{align-items:center;background:var(--jp-black)!important;border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;font-weight:500;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-connection__connect-screen-required-plan__with-subscription{margin-top:38px}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button{display:inline}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button{background:inherit!important;color:var(--jp-black)!important;display:inline;font-size:var(--font-title-small);font:inherit;height:auto;line-height:20px;min-width:0;padding:0;text-decoration:underline;width:auto}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button:hover{background:inherit;text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button:focus{background:inherit;box-shadow:none!important}.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__inner,.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__outer{border-left-color:var(--jp-black);border-top-color:var(--jp-black)}.jp-action-button--button{background:#000}.jp-action-button--button,.jp-action-button--button.components-button{border-radius:4px;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-style:normal;font-weight:600;height:40px;line-height:18px;min-width:264px;text-align:center}.jp-action-button__error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 100% 0;color:var(--jp-red)!important;line-height:25px!important;padding-right:25px}@keyframes rotate-spinner{to{transform:rotate(-1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-left-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}.jp-connection__connect-screen-layout{background:var(--jp-white);border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.08)}.jp-connection__connect-screen-layout__loading{display:none}.jp-connection__connect-screen-layout__left,.jp-connection__connect-screen-layout__right{box-sizing:border-box}.jp-connection__connect-screen-layout__left{padding:25px}@media(min-width:600px){.jp-connection__connect-screen-layout__left{padding:64px 96px}}.jp-connection__connect-screen-layout__left .jetpack-logo{margin-bottom:24px}.jp-connection__connect-screen-layout__left h2{color:var(--jp-black);font-size:36px;font-style:normal;font-weight:700;line-height:40px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left h3{color:var(--jp-black);font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left li,.jp-connection__connect-screen-layout__left p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.jp-connection__connect-screen-layout__left p{color:#101517;margin:16px 0}.jp-connection__connect-screen-layout__left a{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__connect-screen-layout__left a:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-layout__left a:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__connect-screen-layout__left ul{list-style-type:none;padding:0}.jp-connection__connect-screen-layout__left ul li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-right:30px}.jp-connection__connect-screen-layout__right{padding:64px 0}.jp-connection__connect-screen-layout__right img{max-width:100%}.jp-connection__connect-screen-layout__two-columns{display:flex;flex-wrap:wrap}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:100%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:52%}}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{background:#f9f9f6;display:none;flex-basis:47%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{display:block}}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-20:#a7aaad;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-80:#8a2424;--jp-gray-off:#e2e2df;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-components__pricing-card{background:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 10px 40px rgba(0,0,0,.08);max-width:384px;padding:24px 24px 32px;width:-moz-fit-content;width:fit-content}@media screen and (min-width:600px){.jp-components__pricing-card{padding:32px 32px 44px}}.jp-components__pricing-card__icon img{height:32px;width:32px}.jp-components__pricing-card__title{color:#101517;font-size:32px;line-height:38px;margin:16px 0 24px}.jp-components__pricing-card__pricing{display:flex;flex-wrap:wrap}.jp-components__pricing-card__price-after,.jp-components__pricing-card__price-before{display:inline-block;font-size:54px;font-weight:700;line-height:40px;margin-bottom:8px;padding:0 2px}.jp-components__pricing-card__price-before{color:var(--jp-gray-20);margin-left:16px;position:relative}.jp-components__pricing-card__price-strikethrough{background:var(--jp-pink);border-radius:1.5px;height:3px;position:absolute;right:0;top:20px;width:100%}.jp-components__pricing-card__price-after{color:var(--jp-black)}.jp-components__pricing-card__currency{font-size:var(--font-title-small);font-weight:400;line-height:20px;vertical-align:super}.jp-components__pricing-card__price-details{align-self:flex-end;color:var(--jp-gray-50);font-size:14px;font-weight:400;letter-spacing:-.02em;line-height:17px;margin-bottom:8px}.jp-components__pricing-card__price-decimal{font-size:var(--font-label);line-height:14px;vertical-align:top}.jp-components__pricing-card__button{align-items:center;background:var(--jp-black);border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-components__pricing-card__info{color:var(--jp-gray-60);font-size:var(--font-label);letter-spacing:-.02em;line-height:20px}
\ No newline at end of file +#jetpack-connection-ui-container .jetpack-cui__header h1{font-size:4.6em;line-height:1.2em;text-align:right}#jetpack-connection-ui-container{margin:40px}#jetpack-connection-ui-container p{font-size:1.23em;line-height:1.5em}.jp-connection-status-card h3{color:var(--jp-black);font-size:var(--font-title-large);font-weight:700;line-height:1.1;margin:0}.jp-connection-status-card a,.jp-connection-status-card a:active,.jp-connection-status-card a:hover{color:var(--jp-black)}.jp-connection-status-card p{color:var(--jp-black);margin:16px 0}.jp-connection-status-card a,.jp-connection-status-card li,.jp-connection-status-card p{font-size:var(--font-body);line-height:24px}.jp-connection-status-card--status{align-items:center;display:flex;margin:24px -6px 24px 0}.jp-connection-status-card--cloud{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDIiIGhlaWdodD0iNDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PG1hc2sgaWQ9ImEiIG1hc2stdHlwZT0iYWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjciIHk9IjkiIHdpZHRoPSIyOCIgaGVpZ2h0PSIyMSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMC4zMzMgMTcuNjk3di0uMDhjMC00LjI1My0zLjc2LTcuNy04LjQtNy43LTMuOTE2IDAtNy4yMDYgMi40NTctOC4xMzYgNS43OGE2LjM4NiA2LjM4NiAwIDAgMC0uMjY0LS4wMDVDOS45MjUgMTUuNjkyIDcgMTguNzA4IDcgMjIuNDI5czIuOTI1IDYuNzM4IDYuNTMzIDYuNzM4SDI5LjRjMy4wOTMgMCA1LjYtMi41ODYgNS42LTUuNzc1IDAtMi44NjEtMi4wMTgtNS4yMzctNC42NjYtNS42OTVaIiBmaWxsPSIjZmZmIi8+PC9tYXNrPjxnIG1hc2s9InVybCgjYSkiPjxwYXRoIGQ9Im0zMC4zMzMgMTcuNjk3LTIuNjI1LS4wMy0uMDI1IDIuMjM1IDIuMjAyLjM4MS40NDgtMi41ODZabS0xNi41MzctMi0uMTA3IDIuNjIzIDIuMDc1LjA4NS41Ni0yLTIuNTI4LS43MDhabS0uMjYzIDEzLjQ3djIuNjI1aC4wMDhsLS4wMDgtMi42MjVabS4wNCAwdi0yLjYyNWgtLjAwOWwuMDA4IDIuNjI1Wm0xNS43OTUgMCAuMDE1LTIuNjI1aC0uMDE1djIuNjI1Wm0zLjU5LTExLjQ0MXYtLjExaC01LjI1di4wNTJsNS4yNS4wNThabTAtLjExYzAtNS45MTItNS4xNTUtMTAuMzI0LTExLjAyNS0xMC4zMjR2NS4yNWMzLjQxIDAgNS43NzUgMi40ODIgNS43NzUgNS4wNzVoNS4yNVpNMjEuOTMzIDcuMjkzYy00Ljk4NCAwLTkuMzg4IDMuMTM5LTEwLjY2NCA3LjY5OGw1LjA1NSAxLjQxNWMuNTg1LTIuMDg5IDIuNzYyLTMuODYzIDUuNjEtMy44NjN2LTUuMjVabS04LjAzIDUuNzgyYTkuMTExIDkuMTExIDAgMCAwLS4zNy0uMDA3djUuMjVjLjA1MyAwIC4xMDUuMDAxLjE1Ni4wMDNsLjIxNS01LjI0NlptLS4zNy0uMDA3Yy01LjEzMyAwLTkuMTU4IDQuMjY4LTkuMTU4IDkuMzYyaDUuMjVjMC0yLjM0OCAxLjgyNS00LjExMiAzLjkwOC00LjExMnYtNS4yNVptLTkuMTU4IDkuMzYyYzAgNS4wOTUgNC4wMjUgOS4zNjMgOS4xNTggOS4zNjN2LTUuMjVjLTIuMDgzIDAtMy45MDgtMS43NjUtMy45MDgtNC4xMTNoLTUuMjVabTkuMTY2IDkuMzYzaC4wNGwtLjAxNy01LjI1aC0uMDM5bC4wMTYgNS4yNVptLjAzMSAwaDE1Ljc5NnYtNS4yNUgxMy41NzJ2NS4yNVptMTUuODI3LTUuMjVoLS4wMTZsLS4wMyA1LjI1aC4wNDZ2LTUuMjVabTIuOTc1LTMuMTVjMCAxLjgxNi0xLjQwNyAzLjE1LTIuOTc1IDMuMTV2NS4yNWM0LjYxOCAwIDguMjI1LTMuODM4IDguMjI1LTguNGgtNS4yNVptLTIuNDg5LTMuMTA5YzEuMzU1LjIzNSAyLjQ5IDEuNDg4IDIuNDkgMy4xMDloNS4yNWMwLTQuMTAyLTIuOTAyLTcuNi02Ljg0NC04LjI4MmwtLjg5NiA1LjE3M1oiIGZpbGw9IiMxRTFFMUUiLz48L2c+PC9zdmc+);height:42px;margin-left:4px;width:42px}.jp-connection-status-card--jetpack-logo{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE2IDMyYzguODM3IDAgMTYtNy4xNjMgMTYtMTZTMjQuODM3IDAgMTYgMCAwIDcuMTYzIDAgMTZzNy4xNjMgMTYgMTYgMTZaIiBmaWxsPSIjMDAwIi8+PHBhdGggZD0iTTE2Ljc5NCAxMy4zMTN2MTUuNTExbDgtMTUuNTEyaC04Wk0xNS4xNzUgMTguNjU3VjMuMTc2bC03Ljk2OSAxNS40OGg3Ljk3WiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==);height:32px;margin-right:11px;width:32px}.jp-connection-status-card--btn-connect-user{font-size:var(--font-body);font-weight:400;line-height:24px}.jp-connection-status-card--avatar{background-color:var(--jp-white);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='16' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.498 27.123C6.038 24.165 10.916 21.5 16 21.5c5.084 0 9.963 2.665 11.502 5.623a15.952 15.952 0 0 1-11.257 4.875L16 32l-.245-.002a15.952 15.952 0 0 1-11.257-4.875zM16 8a6 6 0 1 1 0 12 6 6 0 0 1 0-12z' fill='%23A2AAB2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;border:0;border-radius:20px;height:32px;margin-right:-10px;width:32px}.jp-connection-status-card--line{border-top:2px solid var(--jp-black);height:0;width:67px}.jp-connection-status-card--line.jp-connection-status-card--site-only{border-top-style:dashed}.jp-connection-status-card--list{list-style-type:none;margin:16px 0}.jp-connection-status-card--list li{color:var(--jp-black);margin:0 -3px 8px 0;padding-right:25px}.jp-connection-status-card--list-item-success{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTE4LjkzNSA2LTguOSAxMS45Ny01LjE2Mi0zLjgzNyIgc3Ryb2tlPSIjMUUxRTFFIiBzdHJva2Utd2lkdGg9IjEuNSIvPjwvc3ZnPg==) no-repeat 100% 0}.jp-connection-status-card--list-item-error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 100% 0;color:var(--jp-red-60)!important}.jp-connection-status-card--list-item-info{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjMDAwIi8+PC9zdmc+) no-repeat 100% 0}.WQVtrU6q0L1Igcj7wCrQ{margin:0;padding:0}.UujoBFTnQNY2cWU2SIsH{font-size:var(--font-headline-medium);font-weight:700;line-height:52px}.TeGO5V_thHw5lDAm1_2M{font-weight:700}.TeGO5V_thHw5lDAm1_2M,.WolQzb2MsSgiNmLtc7_j{font-size:var(--font-headline-small);line-height:40px}.WolQzb2MsSgiNmLtc7_j{font-weight:400}.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);font-weight:500;line-height:32px}.zY2No8Ga4b8shbOQGhnv{font-size:var(--font-title-small);font-weight:500;line-height:30px}.tIj0D1t8Cc892ikmgFPZ{font-size:var(--font-body);font-weight:400;line-height:24px}.KdcN0BnOaVeVhyLRKqhS{font-size:var(--font-body-small);font-weight:400;line-height:24px}.dso3Rh3tl3Xv1GumBktz{font-size:var(--font-body-extra-small);font-weight:400;line-height:20px}.PItlW5vRExLnTj4a8eLE{font-size:var(--font-body-extra-small);font-weight:600;line-height:16px}.TwRpPlktzxhmFVeua7P5{margin:calc(var( --spacing-base )*0)}.zVfqx7gyb3o9mxfGynn1{margin-left:calc(var( --spacing-base )*0);margin-right:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy{margin-bottom:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy,.xqDIp6cNVr_E6RXaiPyD{margin-top:calc(var( --spacing-base )*0)}.S8EwaXk1kyPizt6x4WH2{margin-left:calc(var( --spacing-base )*0)}.ODX5Vr1TARoLFkDDFooD{margin-bottom:calc(var( --spacing-base )*0)}.cphJ8dCpfimnky7P2FHg{margin-right:calc(var( --spacing-base )*0)}.PFgIhNxIyiSuNvQjAIYj{margin:calc(var( --spacing-base )*1)}.M2jKmUzDxvJjjVEPU3zn{margin-left:calc(var( --spacing-base )*1);margin-right:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk{margin-bottom:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk,.rcTN5uw9xIEeMEGL3Xi_{margin-top:calc(var( --spacing-base )*1)}.CQSkybjq2TcRM1Xo9COV{margin-left:calc(var( --spacing-base )*1)}.hfqOWgq6_MEGdFE82eOY{margin-bottom:calc(var( --spacing-base )*1)}.I8MxZQYTbuu595yfesWA{margin-right:calc(var( --spacing-base )*1)}.kQkc6rmdpvLKPkyoJtVQ{margin:calc(var( --spacing-base )*2)}.j6vFPxWuu4Jan2ldoxpp{margin-left:calc(var( --spacing-base )*2);margin-right:calc(var( --spacing-base )*2)}.hqr39dC4H_AbactPAkCG{margin-bottom:calc(var( --spacing-base )*2)}.c3dQnMi16C6J6Ecy4283,.hqr39dC4H_AbactPAkCG{margin-top:calc(var( --spacing-base )*2)}.YNZmHOuRo6hU7zzKfPdP{margin-left:calc(var( --spacing-base )*2)}.Db8lbak1_wunpPk8NwKU{margin-bottom:calc(var( --spacing-base )*2)}.ftsYE5J9hLzquQ0tA5dY{margin-right:calc(var( --spacing-base )*2)}.Det4MHzLUW7EeDnafPzq{margin:calc(var( --spacing-base )*3)}.h_8EEAztC29Vve1datb5{margin-left:calc(var( --spacing-base )*3);margin-right:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM{margin-bottom:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM,.soADBBkcIKCBXzCTuV9_{margin-top:calc(var( --spacing-base )*3)}.zSX59ziEaEWGjnpZa4uV{margin-left:calc(var( --spacing-base )*3)}.yrVTnq_WBMbejg89c2ZQ{margin-bottom:calc(var( --spacing-base )*3)}.UKtHPJnI2cXBWtPDm5hM{margin-right:calc(var( --spacing-base )*3)}.guexok_Tqd5Tf52hRlbT{margin:calc(var( --spacing-base )*4)}.oS1E2KfTBZkJ3F0tN7T6{margin-left:calc(var( --spacing-base )*4);margin-right:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd{margin-bottom:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd,.ot2kkMcYHv53hLZ4LSn0{margin-top:calc(var( --spacing-base )*4)}.A1krOZZhlQ6Sp8Cy4bly{margin-left:calc(var( --spacing-base )*4)}.pkDbXXXL32237M0hokEh{margin-bottom:calc(var( --spacing-base )*4)}.XXv4kDTGvEnQeuGKOPU3{margin-right:calc(var( --spacing-base )*4)}.yGqHk1a57gaISwkXwXe6{margin:calc(var( --spacing-base )*5)}.X8cghM358X3DkXLc9aNK{margin-left:calc(var( --spacing-base )*5);margin-right:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f{margin-bottom:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f,.yqeuzwyGQ7zG0avrGqi_{margin-top:calc(var( --spacing-base )*5)}.g9emeCkuHvYhveiJbfXO{margin-left:calc(var( --spacing-base )*5)}.Lvk3dqcyHbZ07QCRlrUQ{margin-bottom:calc(var( --spacing-base )*5)}.r3yQECDQ9qX0XZzXlVAg{margin-right:calc(var( --spacing-base )*5)}.aQhlPwht2Cz1X_63Miw0{margin:calc(var( --spacing-base )*6)}.JyHb0vK3wJgpblL9s5j8{margin-left:calc(var( --spacing-base )*6);margin-right:calc(var( --spacing-base )*6)}.cY2gULL1lAv6WPNIRuf3{margin-bottom:calc(var( --spacing-base )*6)}.NBWQ9Lwhh_fnry3lg_p7,.cY2gULL1lAv6WPNIRuf3{margin-top:calc(var( --spacing-base )*6)}.yIOniNe5E40C8fWvBm5V{margin-left:calc(var( --spacing-base )*6)}.t30usboNSyqfQWIwHvT3{margin-bottom:calc(var( --spacing-base )*6)}.Nm_TyFkYCMhOoghoToKJ{margin-right:calc(var( --spacing-base )*6)}.C4qJKoBXpgKtpmrqtEKB{margin:calc(var( --spacing-base )*7)}.S93Srbu6NQ_PBr7DmTiD{margin-left:calc(var( --spacing-base )*7);margin-right:calc(var( --spacing-base )*7)}.fJj8k6gGJDks3crUZxOS{margin-bottom:calc(var( --spacing-base )*7)}.cW6D6djs7Ppm7fD7TeoV,.fJj8k6gGJDks3crUZxOS{margin-top:calc(var( --spacing-base )*7)}.DuCnqNfcxcP3Z__Yo5Ro{margin-left:calc(var( --spacing-base )*7)}.im8407m2fw5vOg7O2zsw{margin-bottom:calc(var( --spacing-base )*7)}.G0fbeBgvz2sh3uTP9gNl{margin-right:calc(var( --spacing-base )*7)}.kvW3sBCxRxUqz1jrVMJl{margin:calc(var( --spacing-base )*8)}.tOjEqjLONQdkiYx_XRnw{margin-left:calc(var( --spacing-base )*8);margin-right:calc(var( --spacing-base )*8)}.op5hFSx318zgxsoZZNLN{margin-bottom:calc(var( --spacing-base )*8)}.c9WfNHP6TFKWIfLxv52J,.op5hFSx318zgxsoZZNLN{margin-top:calc(var( --spacing-base )*8)}.sBA75QqcqRwwYSHJh2wc{margin-left:calc(var( --spacing-base )*8)}.GpL6idrXmSOM6jB8Ohsf{margin-bottom:calc(var( --spacing-base )*8)}.HbtWJoQwpgGycz8dGzeT{margin-right:calc(var( --spacing-base )*8)}.uxX3khU88VQ_Ah49Ejsa{padding:calc(var( --spacing-base )*0)}.KX0FhpBKwKzs9fOUdbNz{padding-left:calc(var( --spacing-base )*0);padding-right:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz{padding-bottom:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz,.emxLHRjQuJsImnPbQIzE{padding-top:calc(var( --spacing-base )*0)}.kJ8WzlpTVgdViXt8ukP9{padding-left:calc(var( --spacing-base )*0)}.tg_UIUI11VBzrTAn2AzJ{padding-bottom:calc(var( --spacing-base )*0)}.uczvl8kaz84oPQJ2DB2R{padding-right:calc(var( --spacing-base )*0)}.o7UHPcdVK3lt7q3lqV4o{padding:calc(var( --spacing-base )*1)}.IDqEOxvDoYrFYxELPmtX{padding-left:calc(var( --spacing-base )*1);padding-right:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2{padding-bottom:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2,.npy3hw4A5QSkDicb2CJJ{padding-top:calc(var( --spacing-base )*1)}.LgbptTApNY5NwLQvEFAt{padding-left:calc(var( --spacing-base )*1)}.WZQy2SZuZso59bUsXXyl{padding-bottom:calc(var( --spacing-base )*1)}.o331apInxNunbYB3SfPE{padding-right:calc(var( --spacing-base )*1)}.fMPIyD9Vqki1Lrc_yJnG{padding:calc(var( --spacing-base )*2)}.i2pMcTcdrr10IQoiSm_L{padding-left:calc(var( --spacing-base )*2);padding-right:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH{padding-bottom:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH,.o9bGieUKcYc8o0Ij9oZX{padding-top:calc(var( --spacing-base )*2)}.SwZcFez1RDqWsOFjB5iG{padding-left:calc(var( --spacing-base )*2)}.eHpLc_idmuEqeqCTvqkN{padding-bottom:calc(var( --spacing-base )*2)}.vU39i2B4P1fUTMB2l6Vo{padding-right:calc(var( --spacing-base )*2)}.JHWNzBnE29awhdu5BEh1{padding:calc(var( --spacing-base )*3)}.X72lGbb56L3KFzC2xQ9N{padding-left:calc(var( --spacing-base )*3);padding-right:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e{padding-bottom:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e,.srV0KSDC83a2fiimSMMQ{padding-top:calc(var( --spacing-base )*3)}.lUWfkmbQjCskhcNwkyCm{padding-left:calc(var( --spacing-base )*3)}.Ts0dIlc3aTSL7V4cIHis{padding-bottom:calc(var( --spacing-base )*3)}.CzlqQXXhX6MvorArFZ8B{padding-right:calc(var( --spacing-base )*3)}.TqMPkQtR_DdZuKb5vBoV{padding:calc(var( --spacing-base )*4)}.a7UrjhI69Vetlcj9ZVzz{padding-left:calc(var( --spacing-base )*4);padding-right:calc(var( --spacing-base )*4)}.StEhBzGs2Gi5dDEkjhAv{padding-bottom:calc(var( --spacing-base )*4)}.FGneZfZyvYrt1dG0zcnm,.StEhBzGs2Gi5dDEkjhAv{padding-top:calc(var( --spacing-base )*4)}.APEH216rpdlJWgD2fHc8{padding-left:calc(var( --spacing-base )*4)}.oGwXC3ohCic9XnAj6x69{padding-bottom:calc(var( --spacing-base )*4)}.U6gnT9y42ViPNOcNzBwb{padding-right:calc(var( --spacing-base )*4)}.IpdRLBwnHqbqFrixgbYC{padding:calc(var( --spacing-base )*5)}.HgNeXvkBa9o3bQ5fvFZm{padding-left:calc(var( --spacing-base )*5);padding-right:calc(var( --spacing-base )*5)}.tJtFZM3XfPG9v9TSDfN1{padding-bottom:calc(var( --spacing-base )*5)}.PdifHW45QeXYfK568uD8,.tJtFZM3XfPG9v9TSDfN1{padding-top:calc(var( --spacing-base )*5)}.mbLkWTTZ0Za_BBbFZ5b2{padding-left:calc(var( --spacing-base )*5)}.vVWpZpLlWrkTt0hMk8XU{padding-bottom:calc(var( --spacing-base )*5)}.RxfaJj5a1Nt6IavEo5Zl{padding-right:calc(var( --spacing-base )*5)}.SppJULDGdnOGcjZNCYBy{padding:calc(var( --spacing-base )*6)}.palY2nLwdoyooPUm9Hhk{padding-left:calc(var( --spacing-base )*6);padding-right:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_{padding-bottom:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_,.YEEJ9b90ueQaPfiU8aeN{padding-top:calc(var( --spacing-base )*6)}.QE0ssnsKvWJMqlhPbY5u{padding-left:calc(var( --spacing-base )*6)}.n8yA3jHlMRyLd5UIfoND{padding-bottom:calc(var( --spacing-base )*6)}.tXHmxYnHzbwtfxEaG51n{padding-right:calc(var( --spacing-base )*6)}.kBTsPKkO_3g_tLkj77Um{padding:calc(var( --spacing-base )*7)}.RyhrFx6Y1FGDrGAAyaxm{padding-left:calc(var( --spacing-base )*7);padding-right:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO{padding-bottom:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO,.vQVSq6SvWKbOMu6r4H6b{padding-top:calc(var( --spacing-base )*7)}.oBy5__aEADMsH46mrgFX{padding-left:calc(var( --spacing-base )*7)}.KVEXoJqf1s92j0JMdNmN{padding-bottom:calc(var( --spacing-base )*7)}.ZMXGNrNaKW3k_3TLz0Fq{padding-right:calc(var( --spacing-base )*7)}.tuiR9PhkHXhGyEgzRZRI{padding:calc(var( --spacing-base )*8)}.U7454qyWkQNa2iaSJziu{padding-left:calc(var( --spacing-base )*8);padding-right:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8{padding-bottom:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8,.X1rm9DQ1zLGLfogja5Gn{padding-top:calc(var( --spacing-base )*8)}.JS7G6kAuqJo5GIuF8S5t{padding-left:calc(var( --spacing-base )*8)}.Y8F9ga1TDCMbM1lj4gUz{padding-bottom:calc(var( --spacing-base )*8)}.AJuyNGrI63BOWql719H8{padding-right:calc(var( --spacing-base )*8)}.zI5tJ_qhWE6Oe6Lk75GY{--wp-admin-theme-color:var(--jp-black);--wp-admin-theme-color-darker-10:var(--jp-black-80);--wp-admin-theme-color-darker-20:var(--jp-black-80);--wp-admin-border-width-focus:1.5px;border-radius:var(--jp-border-radius);font-weight:600;justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF{font-size:var(--font-body);height:auto;line-height:24px;padding:var(--spacing-base) calc(var(--spacing-base)*3)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF.paGLQwtPEaJmtArCcmyK{padding:var(--spacing-base) calc(var(--spacing-base)*2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14{font-size:var(--font-body-extra-small);height:auto;line-height:20px;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14.paGLQwtPEaJmtArCcmyK>svg:first-child{margin-left:calc(var(--spacing-base)/2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14>.components-spinner{height:20px}.zI5tJ_qhWE6Oe6Lk75GY.lZAo6_oGfclXOO9CC6Rd{font-weight:400}.zI5tJ_qhWE6Oe6Lk75GY.is-primary:disabled,.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:disabled{background:var(--jp-gray);color:var(--jp-gray-20)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:active:not(:disabled),.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:hover:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-link.Na39I683LAaSA99REg14,.zI5tJ_qhWE6Oe6Lk75GY.is-link.ipS7tKy9GntCS4R3vekF{padding:0}.zI5tJ_qhWE6Oe6Lk75GY.is-link:hover:not(:disabled){text-decoration-thickness:3px}.zI5tJ_qhWE6Oe6Lk75GY.is-link:focus:not(:disabled){text-decoration-line:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:not(:disabled){background:var(--jp-red-50);box-shadow:inset 0 0 0 1px var(--jp-red-50);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:hover:not(:disabled){background:var(--jp-red-60);box-shadow:inset 0 0 0 1px var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:focus:not(:disabled){background:var(--jp-red-70);box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:active:not(:disabled){background:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:not(:disabled){background:var(--jp-white);box-shadow:inset 0 0 0 1px var(--jp-red-50);color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:hover:not(:disabled){background:var(--jp-red-0);box-shadow:inset 0 0 0 1px var(--jp-red-60);color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:active:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:not(:disabled){color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:hover:not(:disabled){box-shadow:none;color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6{position:relative}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6.has-icon{justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>:not(.components-spinner){visibility:hidden}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>.components-spinner{margin:0;position:absolute}.CDuBjJp_8jxzx5j6Nept{margin-right:calc(var(--spacing-base)/2)}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-small);font-weight:600;line-height:1.2;margin-top:0}.jp-connection__disconnect-dialog h2{font-size:var(--font-title-small);font-weight:400;line-height:1.2;margin:0}.jp-connection__disconnect-dialog p{font-size:var(--font-body);margin-top:0}.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog__large-text{font-size:1.25rem}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link,.jp-connection__disconnect-dialog__link{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:hover,.jp-connection__disconnect-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:focus,.jp-connection__disconnect-dialog__link:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link--bold,.jp-connection__disconnect-dialog__link--bold{font-weight:700}.jp-connection__disconnect-dialog .components-button{border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection__disconnect-dialog .components-modal__content{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0}.jp-connection__disconnect-dialog .components-modal__content:before,.jp-connection__disconnect-dialog .components-modal__header{display:none}.jp-connection__disconnect-dialog .jp-row{align-items:center;width:calc(100% - 48px)}.jp-connection__disconnect-dialog__content{align-items:center;background:var(--jp-white-off);border-radius:4px;display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0;padding:2rem 1rem;text-align:center}.jp-connection__disconnect-dialog__actions{background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;padding:2rem 0;position:sticky}.jp-connection__disconnect-dialog__actions p{margin-bottom:0}.jp-connection__disconnect-dialog__actions:before{background:linear-gradient(to bottom,transparent,var(--jp-white-off));bottom:calc(100% + 1px);content:"";display:block;height:80px;position:absolute;right:0;width:100%}.jp-connection__disconnect-dialog__btn-dismiss,.jp-connection__disconnect-dialog__btn-dismiss.components-button{background:var(--jp-black)!important;margin-left:10px}.jp-connection__disconnect-dialog__btn-disconnect{background:var(--jp-red)!important}.jp-connection__disconnect-dialog__btn-back-to-wp{background:var(--jp-black)!important}.jp-connection__disconnect-dialog__button-wrap{text-align:right}@media(min-width:960px){.jp-connection__disconnect-dialog__button-wrap{text-align:center}}.jp-connection__disconnect-dialog__error{color:var(--jp-red)}.jp-connection__disconnect-dialog__survey{margin-bottom:1.5rem;max-width:100%}.jp-connection__disconnect-dialog__step-copy{margin:0 auto;max-width:800px}.jp-connection__disconnect-dialog__step-copy--narrow{max-width:600px}@media(max-height:900px){.jp-connection__disconnect-dialog__content .jp-components__decorative-card{display:none}}@media(min-width:600px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{max-width:calc(100% - 32px);width:100%}.jp-connection__disconnect-dialog__actions,.jp-connection__disconnect-dialog__content{padding:2rem}}@media(min-width:960px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{display:flex;flex-direction:column;height:900px;width:1200px}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-large)}.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog__large-text{font-size:1.5rem}.jp-connection__disconnect-dialog__content{padding:80px}.jp-connection__disconnect-dialog__actions{padding:2rem 3rem}.jp-row{margin-right:0}}.jp-connection__disconnect-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:0 auto 1rem;max-width:100%;padding:1rem 2rem;text-align:right;width:800px}.jp-connection__disconnect-card__group{margin-bottom:1rem;max-width:100%}.jp-connection__disconnect-card__card-content{display:block;font-size:.875rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-content{align-items:center;display:flex;justify-content:space-between}}.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{flex-shrink:0;font-size:1.25rem;font-weight:600;margin-bottom:0;margin-top:0}@media only screen and (min-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{font-size:1.5rem;margin-left:1.5rem}}@media only screen and (max-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block,.jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block{margin-top:.5rem}}.jp-connection__disconnect-card__card-stat-block{align-items:baseline;display:flex;flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat-block{flex-direction:row-reverse}}.jp-connection__disconnect-card__card-description{flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-description{text-align:left}}.jp-connection__disconnect-card__card-stat{font-size:1rem;font-weight:600;margin-left:.5rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat{font-size:1.5rem;margin-left:0;margin-right:1rem}}.jp-components__decorative-card{border-radius:8px;box-shadow:0 0 15px var(--jp-gray);display:flex;height:280px;margin:0 auto 3rem;max-width:100%;overflow:hidden;position:relative;width:360px}.jp-components__decorative-card__content,.jp-components__decorative-card__image{width:50%}.jp-components__decorative-card__image{background:var(--jp-gray);background-size:cover;position:relative}.jp-components__decorative-card__image:before{background-image:url('data:image/svg+xml;uf8,<svg width="38" height="8" viewBox="0 0 38 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 7C1 7 2.37087 1 6.89831 1C11.4257 1 14.3709 7 18.8983 7C23.4257 7 26.7777 1 31.3051 1C35.912 1 37 7 37 7" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>');content:"";display:block;height:8px;position:absolute;right:24px;top:24px;width:38px}.jp-components__decorative-card__content{background:#fff;padding:2rem}.jp-components__decorative-card__icon-container{background:var(--jp-red);border-radius:50px;height:80px;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:80px}.jp-components__decorative-card__icon{background-position:50%,50%;background-repeat:no-repeat;height:40px;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:40px}.jp-components__decorative-card__icon--unlink{background-image:url('data:image/svg+xml;uf8,<svg width="34" height="37" viewBox="0 0 34 37" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.3335 10.001H25.0002C29.4184 10.001 33.0002 13.5827 33.0002 18.001V19.7788C33.0002 24.197 29.4184 27.7788 25.0002 27.7788H22.3335" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M11.6675 27.7783L9.00082 27.7783C4.58254 27.7783 1.00081 24.1966 1.00081 19.7783L1.00081 18.0005C1.00081 13.5823 4.58253 10.0005 9.00081 10.0005L11.6675 10.0005" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M10.9998 19.167L16.9998 19.167" stroke="white" stroke-width="1.5"/> <path d="M8.99951 35.998L24.9995 0.998048" stroke="white"/> </svg>')}.jp-components__decorative-card__lines,.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{background:#e9eff5;border-radius:6px;display:block;height:12px;position:relative;width:100%}.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{content:"";top:calc(100% + 16px)}.jp-components__decorative-card__lines:after{top:calc(100% + 32px);width:75%}.jp-components__decorative-card--vertical{flex-direction:column}.jp-components__decorative-card--vertical .jp-components__decorative-card__content,.jp-components__decorative-card--vertical .jp-components__decorative-card__image{height:50%;width:100%}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines{margin-left:auto;margin-right:auto;max-width:135px}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:after,.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:before{margin-left:auto;margin-right:auto}.jp-connect__disconnect-survey-card{border:2px solid transparent;border-radius:4px;box-shadow:0 0 15px var(--jp-gray-off);margin-left:auto;margin-right:auto;max-width:100%;padding:1rem;position:relative;text-align:right;width:800px}.jp-connect__disconnect-survey-card--selected{background:var(--jp-gray-off);border-color:var(--jp-black)}.jp-connect__disconnect-survey-card:after{border-left:2px solid var(--jp-black);border-top:2px solid var(--jp-black);content:"";display:block;height:5px;left:1.5rem;position:absolute;top:50%;transform:translateY(-50%) rotate(-45deg);width:5px}.jp-connect__disconnect-survey-card:hover{cursor:pointer}.jp-connect__disconnect-survey-card:focus:not(.jp-disconnect-survey-card--selected),.jp-connect__disconnect-survey-card:hover:not(.jp-disconnect-survey-card--selected){border-color:var(--jp-black-80)}.jp-connect__disconnect-survey-card__answer{align-items:center;display:flex;font-weight:700;margin:0}input.jp-connect__disconnect-survey-card__input{-webkit-appearance:none;background-color:transparent;border:none;color:var(--jp-black-80);flex-grow:1;max-width:calc(100% - 40px);padding-left:40px}@media(min-width:1080px){.jp-connection__connect-screen-layout__left{width:70%}.jp-connection__connect-screen-required-plan{background:linear-gradient(270deg,#fff 70%,#f9f9f6 0);position:relative}}.jp-connection__connect-screen-required-plan__loading{display:none}@media(min-width:1080px){.jp-connection__connect-screen-required-plan__pricing-card{position:absolute;right:62%;top:14%}}.jp-connection__connect-screen-required-plan__pricing-card .jp-action-button--button.components-button{align-items:center;background:var(--jp-black)!important;border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;font-weight:500;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-connection__connect-screen-required-plan__with-subscription{margin-top:38px}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button{display:inline}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button{background:inherit!important;color:var(--jp-black)!important;display:inline;font-size:var(--font-title-small);font:inherit;height:auto;line-height:20px;min-width:0;padding:0;text-decoration:underline;width:auto}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button:hover{background:inherit;text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button:focus{background:inherit;box-shadow:none!important}.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__inner,.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__outer{border-left-color:var(--jp-black);border-top-color:var(--jp-black)}.jp-action-button--button{background:#000}.jp-action-button--button,.jp-action-button--button.components-button{border-radius:4px;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-style:normal;font-weight:600;height:40px;line-height:18px;min-width:264px;text-align:center}.jp-action-button__error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 100% 0;color:var(--jp-red)!important;line-height:25px!important;padding-right:25px}.jp-connection__connect-screen-layout{background:var(--jp-white);border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.08)}.jp-connection__connect-screen-layout__loading{display:none}.jp-connection__connect-screen-layout__left,.jp-connection__connect-screen-layout__right{box-sizing:border-box}.jp-connection__connect-screen-layout__left{padding:25px}@media(min-width:600px){.jp-connection__connect-screen-layout__left{padding:64px 96px}}.jp-connection__connect-screen-layout__left .jetpack-logo{margin-bottom:24px}.jp-connection__connect-screen-layout__left h2{color:var(--jp-black);font-size:36px;font-style:normal;font-weight:700;line-height:40px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left h3{color:var(--jp-black);font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left li,.jp-connection__connect-screen-layout__left p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.jp-connection__connect-screen-layout__left p{color:#101517;margin:16px 0}.jp-connection__connect-screen-layout__left a{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__connect-screen-layout__left a:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-layout__left a:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__connect-screen-layout__left ul{list-style-type:none;padding:0}.jp-connection__connect-screen-layout__left ul li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-right:30px}.jp-connection__connect-screen-layout__right{padding:64px 0}.jp-connection__connect-screen-layout__right img{max-width:100%}.jp-connection__connect-screen-layout__two-columns{display:flex;flex-wrap:wrap}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:100%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:52%}}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{background:#f9f9f6;display:none;flex-basis:47%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{display:block}}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-10:#f2cf75;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-components__pricing-card{background:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 10px 40px rgba(0,0,0,.08);max-width:384px;padding:24px 24px 32px;width:-moz-fit-content;width:fit-content}@media screen and (min-width:600px){.jp-components__pricing-card{padding:32px 32px 44px}}.jp-components__pricing-card__icon img{height:32px;width:32px}.jp-components__pricing-card__title{color:#101517;font-size:32px;line-height:38px;margin:16px 0 24px}.jp-components__pricing-card__pricing{display:flex;flex-wrap:wrap}.jp-components__pricing-card__price-after,.jp-components__pricing-card__price-before{display:inline-block;font-size:54px;font-weight:700;line-height:40px;margin-bottom:8px;padding:0 2px}.jp-components__pricing-card__price-before{color:var(--jp-gray-20);margin-left:16px;position:relative}.jp-components__pricing-card__price-strikethrough{background:var(--jp-pink);border-radius:1.5px;height:3px;position:absolute;right:0;top:20px;width:100%}.jp-components__pricing-card__price-after{color:var(--jp-black)}.jp-components__pricing-card__currency{font-size:var(--font-title-small);font-weight:400;line-height:20px;vertical-align:super}.jp-components__pricing-card__price-details{align-self:flex-end;color:var(--jp-gray-50);font-size:14px;font-weight:400;letter-spacing:-.02em;line-height:17px;margin-bottom:8px}.jp-components__pricing-card__price-decimal{font-size:var(--font-label);line-height:14px;vertical-align:top}.jp-components__pricing-card__button{align-items:center;background:var(--jp-black);border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-components__pricing-card__info{color:var(--jp-gray-60);font-size:var(--font-label);letter-spacing:-.02em;line-height:20px}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/src/class-admin.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/src/class-admin.php index 1a76c464..abae02b2 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/src/class-admin.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/src/class-admin.php @@ -8,6 +8,7 @@ namespace Automattic\Jetpack\ConnectionUI; use Automattic\Jetpack\Assets; +use Automattic\Jetpack\Connection\Initial_State as Connection_Initial_State; /** * The Connection UI Admin Area @@ -73,6 +74,7 @@ class Admin { ); Assets::enqueue_script( 'jetpack_connection_ui' ); wp_add_inline_script( 'jetpack_connection_ui', $this->get_initial_state(), 'before' ); + wp_add_inline_script( 'jetpack_connection_ui', Connection_Initial_State::render(), 'before' ); } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/src/class-initial-state.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/src/class-initial-state.php index 803b655f..48da9ae3 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/src/class-initial-state.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection-ui/src/class-initial-state.php @@ -45,8 +45,6 @@ class Initial_State { * @return string */ public function render() { - add_action( 'jetpack_use_iframe_authorization_flow', '__return_true' ); - return 'var CUI_INITIAL_STATE=JSON.parse(decodeURIComponent("' . rawurlencode( wp_json_encode( $this->get_data() ) ) . '"));'; } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/CHANGELOG.md index ffc65326..883d1103 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/CHANGELOG.md @@ -5,6 +5,123 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.40.4] - 2022-05-24 +### Added +- Allow plugins to filter the list of available modules. Only activate and consider active modules that are available [#24454] + +## [1.40.3] - 2022-05-19 +### Added +- PHPCS updates. [#24418] + +## [1.40.2] - 2022-05-18 +### Changed +- Updated package dependencies [#24372] + +### Fixed +- Fix new PHPCS sniffs. [#24366] + +## [1.40.1] - 2022-05-10 +### Added +- Bundle and transpile JavaScript with Webpack. [#24216] + +### Changed +- Deprecate soft disconnect [#24105] + +## [1.40.0] - 2022-05-04 +### Added +- Connection: Expose wpVersion and siteSuffix in the global initial state var [#24137] + +### Deprecated +- Moved the options class into Connection. [#24095] + +## [1.39.2] - 2022-05-19 +### Added +- PHPCS updates. + +## [1.39.1] - 2022-04-27 +### Fixed +- Reverts soft disconnect deprecation + +## [1.39.0] - 2022-04-26 +### Changed +- Make remove_connection a proxy method to ensure all trackings are triggered +- Updated package dependencies. + +### Deprecated +- Removed Heartbeat by hoisting it into Connection. + +### Removed +- Deprecated Soft disconnect + +## [1.38.0] - 2022-04-19 +### Added +- Added list of connected list to the connection initial state +- Add token lock functionality. + +### Changed +- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` + +### Deprecated +- Deprecated in-place connection. + +## [1.37.6] - 2022-04-12 +### Changed +- Updated package dependencies. + +## [1.37.5] - 2022-04-06 +### Removed +- Removed tracking dependency. + +## [1.37.4] - 2022-04-05 +### Changed +- Updated package dependencies. + +## [1.37.3] - 2022-03-29 +### Changed +- Microperformance: Use === null instead of is_null + +### Fixed +- Fix regression added to Jetpack webhooks handling + +## [1.37.2] - 2022-03-23 +### Changed +- Jetpack now relies on Connection Webooks for authorize and authorize_redirect actions + +### Removed +- Removed a reference to the terms-of-service package. + +## [1.37.1] - 2022-03-15 +### Added +- Handle the Authorization Redirect from the Connection package + +## [1.37.0] - 2022-03-02 +### Added +- Moved the ToS package to Connection. + +## [1.36.4] - 2022-02-22 +### Changed +- Updated package dependencies. + +## [1.36.3] - 2022-02-16 +### Added +- Add the 'jetpack_site_before_disconnected' action hook. + +## [1.36.2] - 2022-02-09 +### Fixed +- Fixed some new PHPCS warnings. + +## [1.36.1] - 2022-01-25 +### Changed +- Updated package dependencies. + +## [1.36.0] - 2022-01-18 +### Added +- Debugging: Add a filter to add XDEBUG_PROFILE to requests made to the sandbox. + +## [1.35.0] - 2022-01-13 +### Changed +- Added user data to initial state + ## [1.34.0] - 2022-01-04 ### Added - Jetpack Connection: Added fallback for keeping `jetpack_connection_active_plugins` consistent on WPCOM when Sync is not present. @@ -491,6 +608,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Separate the connection library into its own package. +[1.40.4]: https://github.com/Automattic/jetpack-connection/compare/v1.40.3...v1.40.4 +[1.40.3]: https://github.com/Automattic/jetpack-connection/compare/v1.40.2...v1.40.3 +[1.40.2]: https://github.com/Automattic/jetpack-connection/compare/v1.40.1...v1.40.2 +[1.40.1]: https://github.com/Automattic/jetpack-connection/compare/v1.40.0...v1.40.1 +[1.40.0]: https://github.com/Automattic/jetpack-connection/compare/v1.39.1...v1.40.0 +[1.39.2]: https://github.com/Automattic/jetpack-connection/compare/v1.39.1...v1.39.2 +[1.39.1]: https://github.com/Automattic/jetpack-connection/compare/v1.39.0...v1.39.1 +[1.39.0]: https://github.com/Automattic/jetpack-connection/compare/v1.38.0...v1.39.0 +[1.38.0]: https://github.com/Automattic/jetpack-connection/compare/v1.37.6...v1.38.0 +[1.37.6]: https://github.com/Automattic/jetpack-connection/compare/v1.37.5...v1.37.6 +[1.37.5]: https://github.com/Automattic/jetpack-connection/compare/v1.37.4...v1.37.5 +[1.37.4]: https://github.com/Automattic/jetpack-connection/compare/v1.37.3...v1.37.4 +[1.37.3]: https://github.com/Automattic/jetpack-connection/compare/v1.37.2...v1.37.3 +[1.37.2]: https://github.com/Automattic/jetpack-connection/compare/v1.37.1...v1.37.2 +[1.37.1]: https://github.com/Automattic/jetpack-connection/compare/v1.37.0...v1.37.1 +[1.37.0]: https://github.com/Automattic/jetpack-connection/compare/v1.36.4...v1.37.0 +[1.36.4]: https://github.com/Automattic/jetpack-connection/compare/v1.36.3...v1.36.4 +[1.36.3]: https://github.com/Automattic/jetpack-connection/compare/v1.36.2...v1.36.3 +[1.36.2]: https://github.com/Automattic/jetpack-connection/compare/v1.36.1...v1.36.2 +[1.36.1]: https://github.com/Automattic/jetpack-connection/compare/v1.36.0...v1.36.1 +[1.36.0]: https://github.com/Automattic/jetpack-connection/compare/v1.35.0...v1.36.0 +[1.35.0]: https://github.com/Automattic/jetpack-connection/compare/v1.34.0...v1.35.0 [1.34.0]: https://github.com/Automattic/jetpack-connection/compare/v1.33.0...v1.34.0 [1.33.0]: https://github.com/Automattic/jetpack-connection/compare/v1.32.0...v1.33.0 [1.32.0]: https://github.com/Automattic/jetpack-connection/compare/v1.31.0...v1.32.0 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/TRACKING.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/TRACKING.md new file mode 100644 index 00000000..06754b3e --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/TRACKING.md @@ -0,0 +1,122 @@ +# Jetpack Tracking package + +A package containing functionality to track events to the a8c Tracks system + +## Usage + +There are several ways to track events using this package. + +* Ajax: Probably the easiest one. You can simply add a class to a link and it will be tracked or you can make your own ajax call +* PHP: Track an event on the backend +* Tracking pixel: An alternative way to track events by dynamically adding a pixel to the DOM + +### Tracking via Ajax + +This is useful to track simple click events without the need of any additional js. Just add the appropriate class to your links and it will be tracked. + +#### 1. enqueue script + +Note: Not needed if you are using the Jetpack plugin in the admin context as the script is already loaded by Jetpack. + +See `Automattic\Jetpack\Tracking::enqueue_tracks_scripts()` + +```PHP +add_action( 'admin_enqueue_scripts', array( new Tracking( 'plugin-slug' ), 'enqueue_tracks_scripts' ) ); +``` + +#### 2. Add the class and the event attributes. + +Add the `jptracks` class to any `a` element or to its parent element. + +The event needs a name. This can be informed with the `data-jptracks-name` attritbute. + +```HTML +<a class="jptracks" data-jptracks-name="my-awesome-event">Click me</a> +``` + +And that's it. Your event will be tracked. Every time this element is clicked an ajax call will be triggered to the Tracking package and it will send it to wpcom. + +**Note:** Event name will be automatically prefixed with `jetpack_`. + +#### 3. Additional parameters + +You can also inform additional parameters to your event using the `data-jptracks-prop` attribute. Anything in this attr will be stored in the `clicked` attribute in the event. + +#### 4. Making your own ajax calls + +In your JS you can set up your own ajax calls. Example: + +```JS +window.jpTracksAJAX.record_ajax_event( 'my_event_name', 'click', { prop1: value1, prop2: value2 } ); +``` + +**Note:** Event name will be automatically prefixed with `jetpack_`. + +##### Waiting for the ajax call to complete before doing anything else + +If you need to do a subsequent action but wants to wait for this event to be tracked, you can do the following: + +```JS +window.jpTracksAJAX + .record_ajax_event( 'my_event_name', 'click', { prop1: value1, prop2: value2 } ) + .always( function() { + // do something + } ); +``` + +### Tracking in PHP + +Use `Automattic\Jetpack\Tracking::record_user_event()` to track events on the backend. + +```PHP +$connection_manager = new Automattic\Jetpack\Connection\Manager( 'plugin-slug' ); +$tracking = new Tracking( 'plugin-slug', $connection_manager ); +$tracking->record_user_event( + $event_name, + array( + 'property_key' => 'value', + ) +); +``` + +### Tracking pixel + +This approach to track events uses `//stats.wp.com/w.js` and dynamically adds a tracking pixel to the DOM to do the tracking. + +#### 1. Enqueue the scripts + +```PHP +Tracking::register_tracks_functions_scripts( true ); +``` + +#### 2. Inform the user data + +```PHP +wp_localize_script( + 'my_script', + 'varname', + array( + 'tracksUserData' => Jetpack_Tracks_Client::get_connected_user_tracks_identity(), + ) +); +``` + +#### 3. Track! + +In your JS: + +```JS +var tracksUser = varname.tracksUserData; + +analytics.initialize( tracksUser.userid, tracksUser.username ); + +analytics.tracks.recordEvent( 'jetpack_my_event_name', { prop1: value1, prop2: value2 } ); +``` + +## Debugging + +You can watch your events being tracked in the browser console. In order to activate that, run the following command in the console: + +```JS +localStorage.setItem( 'debug', 'dops:analytics*' ); +``` diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/dist/tracks-ajax.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/dist/tracks-ajax.asset.php new file mode 100644 index 00000000..3b9ce528 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/dist/tracks-ajax.asset.php @@ -0,0 +1 @@ +<?php return array('dependencies' => array(), 'version' => 'd77ffaebc89bc263c90b4947ca52ec64');
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/dist/tracks-ajax.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/dist/tracks-ajax.js new file mode 100644 index 00000000..7b630222 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/dist/tracks-ajax.js @@ -0,0 +1 @@ +!function(t,a){window.jpTracksAJAX=window.jpTracksAJAX||{};const c="dops:analytics"===localStorage.getItem("debug");window.jpTracksAJAX.record_ajax_event=function(n,e,r){const o={tracksNonce:a.jpTracksAJAX_nonce,action:"jetpack_tracks",tracksEventType:e,tracksEventName:n,tracksEventProp:r||!1};return t.ajax({type:"POST",url:a.ajaxurl,data:o,success:function(t){c&&console.log("AJAX tracks event recorded: ",o,t)}})},t(document).ready((function(){t("body").on("click",".jptracks a, a.jptracks",(function(a){const c=t(a.target),n=c.closest(".jptracks"),e=n.attr("data-jptracks-name");if(void 0===e)return;const r=n.attr("data-jptracks-prop")||!1,o=c.attr("href"),s=c.get(0).target;let i=null;o&&s&&"_self"!==s&&(i=window.open("",s),i.opener=null),a.preventDefault(),window.jpTracksAJAX.record_ajax_event(e,"click",r).always((function(){if(o&&!c.hasClass("thickbox")){if(i)return void(i.location=o);window.location=o}}))}))}))}(jQuery,jpTracksAJAX);
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/dist/tracks-callables.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/dist/tracks-callables.asset.php new file mode 100644 index 00000000..5f359c31 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/dist/tracks-callables.asset.php @@ -0,0 +1 @@ +<?php return array('dependencies' => array(), 'version' => '6a523a75718ae929383b31ce65ae3d2a');
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/dist/tracks-callables.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/dist/tracks-callables.js new file mode 100644 index 00000000..fe1068ce --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/dist/tracks-callables.js @@ -0,0 +1 @@ +!function(){var e={775:function(e){let n;window._tkq=window._tkq||[];const t=console.error;const o={initialize:function(e,n){o.setUser(e,n),o.identifyUser()},mc:{bumpStat:function(e,n){const t=function(e,n){let t="";if("object"==typeof e)for(const n in e)t+="&x_"+encodeURIComponent(n)+"="+encodeURIComponent(e[n]);else t="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(n);return t}(e,n);(new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+t+"&t="+Math.random()}},tracks:{recordEvent:function(e,n){n=n||{},0===e.indexOf("jetpack_")?window._tkq.push(["recordEvent",e,n]):t('- Event name must be prefixed by "jetpack_"')},recordPageView:function(e){o.tracks.recordEvent("jetpack_page_view",{path:e})}},setUser:function(e,t){n={ID:e,username:t}},identifyUser:function(){n&&window._tkq.push(["identifyUser",n.ID,n.username])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};e.exports=o}},n={};var t=function t(o){var r=n[o];if(void 0!==r)return r.exports;var i=n[o]={exports:{}};return e[o](i,i.exports,t),i.exports}(775);window.analytics=t}();
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php index 5349506c..b1b8a362 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php @@ -120,11 +120,11 @@ class Jetpack_IXR_Client extends IXR_Client { * @return WP_Error Error object. */ public function get_jetpack_error( $fault_code = null, $fault_string = null ) { - if ( is_null( $fault_code ) ) { + if ( $fault_code === null ) { $fault_code = $this->error->code; } - if ( is_null( $fault_string ) ) { + if ( $fault_string === null ) { $fault_string = $this->error->message; } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-options/legacy/class-jetpack-options.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-options.php index 164ff111..54b1f3ca 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-options/legacy/class-jetpack-options.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-options.php @@ -2,7 +2,7 @@ /** * Legacy Jetpack_Options class. * - * @package automattic/jetpack-options + * @package automattic/jetpack-connection */ use Automattic\Jetpack\Constants; @@ -82,6 +82,7 @@ class Jetpack_Options { 'user_token', // (string) The User Token of this site. (deprecated) 'user_tokens', // (array) User Tokens for each user of this site who has connected to jetpack.wordpress.com. 'purchase_token', // (string) Token for logged out user purchases. + 'token_lock', // (string) Token lock in format `expiration_date|||site_url`. ); case 'network': @@ -120,6 +121,7 @@ class Jetpack_Options { 'recommendations_banner_enabled', // (bool) Whether the recommendations are enabled or not. 'recommendations_data', // (array) The user choice and other data for the recommendations. 'recommendations_step', // (string) The current step of the recommendations. + 'recommendations_conditional', // (array) An array of action-based recommendations. 'licensing_activation_notice_dismiss', // (array) The `last_detached_count` and the `last_dismissed_time` for the user-license activation notice. 'has_seen_wc_connection_modal', // (bool) Whether the site has displayed the WooCommerce Connection modal 'partner_coupon', // (string) A Jetpack partner issued coupon to promote a sale together with Jetpack. @@ -147,14 +149,14 @@ class Jetpack_Options { return empty( $result ); } - if ( is_null( $group ) || 'non_compact' === $group ) { + if ( $group === null || 'non_compact' === $group ) { if ( in_array( $name, self::get_option_names( $group ), true ) ) { return true; } } foreach ( array_keys( self::$grouped_options ) as $_group ) { - if ( is_null( $group ) || $group === $_group ) { + if ( $group === null || $group === $_group ) { if ( in_array( $name, self::get_option_names( $_group ), true ) ) { return true; } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php index 125aa20a..444ed380 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php @@ -76,11 +76,12 @@ class Jetpack_Signature { $port = $this->get_current_request_port(); - $this->current_request_url = "{$scheme}://{$_SERVER['HTTP_HOST']}:{$port}" . stripslashes( $_SERVER['REQUEST_URI'] ); + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidatedNotSanitized -- Sniff misses the esc_url_raw wrapper. + $this->current_request_url = esc_url_raw( wp_unslash( "{$scheme}://{$_SERVER['HTTP_HOST']}:{$port}" . ( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '' ) ) ); if ( array_key_exists( 'body', $override ) && ! empty( $override['body'] ) ) { $body = $override['body']; - } elseif ( 'POST' === strtoupper( $_SERVER['REQUEST_METHOD'] ) ) { + } elseif ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === strtoupper( $_SERVER['REQUEST_METHOD'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating. $body = isset( $GLOBALS['HTTP_RAW_POST_DATA'] ) ? $GLOBALS['HTTP_RAW_POST_DATA'] : null; // Convert the $_POST to the body, if the body was empty. This is how arrays are hashed @@ -91,7 +92,7 @@ class Jetpack_Signature { $body = $_POST; // phpcs:ignore WordPress.Security.NonceVerification.Missing } } - } elseif ( 'PUT' === strtoupper( $_SERVER['REQUEST_METHOD'] ) ) { + } elseif ( isset( $_SERVER['REQUEST_METHOD'] ) && 'PUT' === strtoupper( $_SERVER['REQUEST_METHOD'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating. // This is a little strange-looking, but there doesn't seem to be another way to get the PUT body. $raw_put_data = file_get_contents( 'php://input' ); parse_str( $raw_put_data, $body ); @@ -116,11 +117,11 @@ class Jetpack_Signature { $a[ $parameter ] = $override[ $parameter ]; } else { // phpcs:ignore WordPress.Security.NonceVerification.Recommended - $a[ $parameter ] = isset( $_GET[ $parameter ] ) ? stripslashes( $_GET[ $parameter ] ) : ''; + $a[ $parameter ] = isset( $_GET[ $parameter ] ) ? filter_var( wp_unslash( $_GET[ $parameter ] ) ) : ''; } } - $method = isset( $override['method'] ) ? $override['method'] : $_SERVER['REQUEST_METHOD']; + $method = isset( $override['method'] ) ? $override['method'] : ( isset( $_SERVER['REQUEST_METHOD'] ) ? filter_var( wp_unslash( $_SERVER['REQUEST_METHOD'] ) ) : null ); return $this->sign_request( $a['token'], $a['timestamp'], $a['nonce'], $a['body-hash'], $method, $this->current_request_url, $body, true ); } @@ -169,7 +170,7 @@ class Jetpack_Signature { } $required_parameters = array( 'token', 'timestamp', 'nonce', 'method', 'url' ); - if ( ! is_null( $body ) ) { + if ( $body !== null ) { $required_parameters[] = 'body_hash'; if ( ! is_string( $body ) ) { return new WP_Error( 'invalid_body', 'Body is malformed.', compact( 'signature_details' ) ); @@ -346,9 +347,9 @@ class Jetpack_Signature { * @return string The port to be used in the signature */ public function get_current_request_port() { - $host_port = isset( $_SERVER['HTTP_X_FORWARDED_PORT'] ) ? $this->sanitize_host_post( $_SERVER['HTTP_X_FORWARDED_PORT'] ) : ''; + $host_port = isset( $_SERVER['HTTP_X_FORWARDED_PORT'] ) ? $this->sanitize_host_post( $_SERVER['HTTP_X_FORWARDED_PORT'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating. if ( '' === $host_port && isset( $_SERVER['SERVER_PORT'] ) ) { - $host_port = $this->sanitize_host_post( $_SERVER['SERVER_PORT'] ); + $host_port = $this->sanitize_host_post( $_SERVER['SERVER_PORT'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating. } /** diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/legacy/class-jetpack-tracks-client.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-client.php index 07829b6c..a17ad84f 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/legacy/class-jetpack-tracks-client.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-client.php @@ -184,8 +184,8 @@ class Jetpack_Tracks_Client { if ( ! isset( $anon_id ) ) { // Did the browser send us a cookie? - if ( isset( $_COOKIE['tk_ai'] ) && preg_match( '#^[A-Za-z0-9+/=]{24}$#', $_COOKIE['tk_ai'] ) ) { - $anon_id = $_COOKIE['tk_ai']; + if ( isset( $_COOKIE['tk_ai'] ) && preg_match( '#^[A-Za-z0-9+/=]{24}$#', $_COOKIE['tk_ai'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating. + $anon_id = $_COOKIE['tk_ai']; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating. } else { $binary = ''; @@ -202,7 +202,7 @@ class Jetpack_Tracks_Client { && ! ( defined( 'REST_REQUEST' ) && REST_REQUEST ) && ! ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) ) { - setcookie( 'tk_ai', $anon_id ); + setcookie( 'tk_ai', $anon_id, 0, COOKIEPATH, COOKIE_DOMAIN, is_ssl(), false ); // phpcs:ignore Jetpack.Functions.SetCookie -- This is a random value and should be fine. } } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/legacy/class-jetpack-tracks-event.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-event.php index be77a397..be77a397 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/legacy/class-jetpack-tracks-event.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-event.php diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php index 37acf8a4..7e236de3 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php @@ -636,7 +636,7 @@ class Jetpack_XMLRPC_Server { do_action( 'jetpack_xmlrpc_server_event', $event_name, 'fail', $error, $user ); } - if ( ! is_null( $error ) ) { + if ( $error !== null ) { $this->error = $error; } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-client.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-client.php index fea9e9c7..a99817d7 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-client.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-client.php @@ -135,7 +135,7 @@ class Client { } // Kind of annoying. Maybe refactor Jetpack_Signature to handle body-hashing. - if ( is_null( $body ) ) { + if ( $body === null ) { $body_hash = ''; } else { @@ -310,7 +310,7 @@ class Client { $code = wp_remote_retrieve_response_code( $response ); // Only trust the Date header on some responses. - if ( 200 != $code && 304 != $code && 400 != $code && 401 != $code ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison + if ( 200 != $code && 304 != $code && 400 != $code && 401 != $code ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseNotEqual return; } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php index 9da55442..53b06818 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php @@ -188,7 +188,7 @@ class Error_Handler { * @return Error_Handler $instance */ public static function get_instance() { - if ( is_null( self::$instance ) ) { + if ( self::$instance === null ) { self::$instance = new self(); } return self::$instance; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-heartbeat/src/class-heartbeat.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-heartbeat.php index 0cca49bb..9f1b0dbd 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-heartbeat/src/class-heartbeat.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-heartbeat.php @@ -2,7 +2,7 @@ /** * Jetpack Heartbeat package. * - * @package automattic/jetpack-heartbeat + * @package automattic/jetpack-connection */ namespace Automattic\Jetpack; @@ -227,7 +227,7 @@ class Heartbeat { if ( isset( $args[0] ) && ! in_array( $args[0], $allowed_args, true ) ) { /* translators: %s is a command like "prompt" */ - WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack-heartbeat' ), $args[0] ) ); + WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack-connection' ), $args[0] ) ); } $stats = self::generate_stats_array(); @@ -247,7 +247,7 @@ class Heartbeat { if ( $last_heartbeat ) { $last_date = gmdate( 'Y-m-d H:i:s', $last_heartbeat ); /* translators: %s is the full datetime of the last heart beat e.g. 2020-01-01 12:21:23 */ - WP_CLI::line( sprintf( __( 'Last heartbeat sent at: %s', 'jetpack-heartbeat' ), $last_date ) ); + WP_CLI::line( sprintf( __( 'Last heartbeat sent at: %s', 'jetpack-connection' ), $last_date ) ); } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php index 0ee6d7ab..8f4e1336 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php @@ -7,6 +7,8 @@ namespace Automattic\Jetpack\Connection; +use Automattic\Jetpack\Status; + /** * The React initial state. */ @@ -25,11 +27,17 @@ class Initial_State { * @return array */ private static function get_data() { + global $wp_version; + return array( - 'WP_API_root' => esc_url_raw( rest_url() ), - 'WP_API_nonce' => wp_create_nonce( 'wp_rest' ), - 'registrationNonce' => wp_create_nonce( 'jetpack-registration-nonce' ), - 'connectionStatus' => REST_Connector::connection_status( false ), + 'apiRoot' => esc_url_raw( rest_url() ), + 'apiNonce' => wp_create_nonce( 'wp_rest' ), + 'registrationNonce' => wp_create_nonce( 'jetpack-registration-nonce' ), + 'connectionStatus' => REST_Connector::connection_status( false ), + 'userConnectionData' => REST_Connector::get_user_connection_data( false ), + 'connectedPlugins' => REST_Connector::get_connection_plugins( false ), + 'wpVersion' => $wp_version, + 'siteSuffix' => ( new Status() )->get_site_suffix(), ); } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php index 0c95bde8..3f0c25bb 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php @@ -315,7 +315,7 @@ class Manager { * @return false|array */ public function verify_xml_rpc_signature() { - if ( is_null( $this->xmlrpc_verification ) ) { + if ( $this->xmlrpc_verification === null ) { $this->xmlrpc_verification = $this->internal_verify_xml_rpc_signature(); if ( is_wp_error( $this->xmlrpc_verification ) ) { @@ -347,7 +347,7 @@ class Manager { * @todo Refactor to use proper nonce verification. */ private function internal_verify_xml_rpc_signature() { - // phpcs:disable WordPress.Security.NonceVerification.Recommended + // phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized // It's not for us. if ( ! isset( $_GET['token'] ) || empty( $_GET['signature'] ) ) { return false; @@ -358,14 +358,14 @@ class Manager { 'timestamp' => isset( $_GET['timestamp'] ) ? wp_unslash( $_GET['timestamp'] ) : '', 'nonce' => isset( $_GET['nonce'] ) ? wp_unslash( $_GET['nonce'] ) : '', 'body_hash' => isset( $_GET['body-hash'] ) ? wp_unslash( $_GET['body-hash'] ) : '', - 'method' => wp_unslash( $_SERVER['REQUEST_METHOD'] ), - 'url' => wp_unslash( $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ), // Temp - will get real signature URL later. + 'method' => isset( $_SERVER['REQUEST_METHOD'] ) ? wp_unslash( $_SERVER['REQUEST_METHOD'] ) : null, + 'url' => wp_unslash( ( isset( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : null ) . ( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : null ) ), // Temp - will get real signature URL later. 'signature' => isset( $_GET['signature'] ) ? wp_unslash( $_GET['signature'] ) : '', ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged @list( $token_key, $version, $user_id ) = explode( ':', wp_unslash( $_GET['token'] ) ); - // phpcs:enable WordPress.Security.NonceVerification.Recommended + // phpcs:enable WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized $jetpack_api_version = Constants::get_constant( 'JETPACK__API_VERSION' ); @@ -433,7 +433,7 @@ class Manager { ksort( $post_data ); $body = http_build_query( stripslashes_deep( $post_data ) ); - } elseif ( is_null( $this->raw_post_data ) ) { + } elseif ( $this->raw_post_data === null ) { $body = file_get_contents( 'php://input' ); } else { $body = null; @@ -441,7 +441,7 @@ class Manager { // phpcs:enable $signature = $jetpack_signature->sign_current_request( - array( 'body' => is_null( $body ) ? $this->raw_post_data : $body ) + array( 'body' => $body === null ? $this->raw_post_data : $body ) ); $signature_details['url'] = $jetpack_signature->current_request_url; @@ -458,7 +458,7 @@ class Manager { // phpcs:disable WordPress.Security.NonceVerification.Recommended $timestamp = (int) $_GET['timestamp']; - $nonce = stripslashes( (string) $_GET['nonce'] ); + $nonce = wp_unslash( (string) $_GET['nonce'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- WP Core doesn't sanitize nonces either. // phpcs:enable WordPress.Security.NonceVerification.Recommended // Use up the nonce regardless of whether the signature matches. @@ -476,7 +476,7 @@ class Manager { $signature_details['expected'] = $signature; // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( ! hash_equals( $signature, $_GET['signature'] ) ) { + if ( ! hash_equals( $signature, wp_unslash( $_GET['signature'] ) ) ) { return new \WP_Error( 'signature_mismatch', 'Signature mismatch', @@ -976,21 +976,6 @@ class Manager { $api_version = '/' . Constants::get_constant( 'JETPACK__API_VERSION' ) . '/'; /** - * Filters whether the connection manager should use the iframe authorization - * flow instead of the regular redirect-based flow. - * - * @since 1.9.0 - * - * @param Boolean $is_iframe_flow_used should the iframe flow be used, defaults to false. - */ - $iframe_flow = apply_filters( 'jetpack_use_iframe_authorization_flow', false ); - - // Do not modify anything that is not related to authorize requests. - if ( 'authorize' === $relative_url && $iframe_flow ) { - $relative_url = 'authorize_iframe'; - } - - /** * Filters the API URL that Jetpack uses for server communication. * * @since 1.7.0 @@ -1159,19 +1144,12 @@ class Manager { $this->get_tokens()->update_blog_token( (string) $registration_details->jetpack_secret ); - $allow_inplace_authorization = isset( $registration_details->allow_inplace_authorization ) ? $registration_details->allow_inplace_authorization : false; $alternate_authorization_url = isset( $registration_details->alternate_authorization_url ) ? $registration_details->alternate_authorization_url : ''; - if ( ! $allow_inplace_authorization ) { - // Forces register_site REST endpoint to return the Calypso authorization URL. - add_filter( 'jetpack_use_iframe_authorization_flow', '__return_false', 20 ); - } - add_filter( 'jetpack_register_site_rest_response', - function ( $response ) use ( $allow_inplace_authorization, $alternate_authorization_url ) { - $response['allowInplaceAuthorization'] = $allow_inplace_authorization; - $response['alternateAuthorizeUrl'] = $alternate_authorization_url; + function ( $response ) use ( $alternate_authorization_url ) { + $response['alternateAuthorizeUrl'] = $alternate_authorization_url; return $response; } ); @@ -1658,16 +1636,15 @@ class Manager { * This function will automatically perform "soft" or "hard" disconnect depending on whether other plugins are using the connection. * This is a proxy method to simplify the Connection package API. * - * @see Manager::disable_plugin() - * @see Manager::disconnect_site_wpcom() - * @see Manager::delete_all_connection_tokens() + * @see Manager::disconnect_site() * + * @param boolean $disconnect_wpcom Should disconnect_site_wpcom be called. + * @param bool $ignore_connected_plugins Delete the tokens even if there are other connected plugins. * @return bool */ - public function remove_connection() { - $this->disable_plugin(); - $this->disconnect_site_wpcom(); - $this->delete_all_connection_tokens(); + public function remove_connection( $disconnect_wpcom = true, $ignore_connected_plugins = false ) { + + $this->disconnect_site( $disconnect_wpcom, $ignore_connected_plugins ); return true; } @@ -1998,22 +1975,34 @@ class Manager { * Forgets all connection details and tells the Jetpack servers to do the same. * * @param boolean $disconnect_wpcom Should disconnect_site_wpcom be called. + * @param bool $ignore_connected_plugins Delete the tokens even if there are other connected plugins. */ - public function disconnect_site( $disconnect_wpcom = true ) { + public function disconnect_site( $disconnect_wpcom = true, $ignore_connected_plugins = true ) { + if ( ! $ignore_connected_plugins && null !== $this->plugin && ! $this->plugin->is_only() ) { + return false; + } + wp_clear_scheduled_hook( 'jetpack_clean_nonces' ); ( new Nonce_Handler() )->clean_all(); + /** + * Fires when a site is disconnected. + * + * @since 1.36.3 + */ + do_action( 'jetpack_site_before_disconnected' ); + // If the site is in an IDC because sync is not allowed, // let's make sure to not disconnect the production site. if ( $disconnect_wpcom ) { $tracking = new Tracking(); $tracking->record_user_event( 'disconnect_site', array() ); - $this->disconnect_site_wpcom( true ); + $this->disconnect_site_wpcom( $ignore_connected_plugins ); } - $this->delete_all_connection_tokens( true ); + $this->delete_all_connection_tokens( $ignore_connected_plugins ); // Remove tracked package versions, since they depend on the Jetpack Connection. delete_option( Package_Version_Tracker::PACKAGE_VERSION_OPTION ); @@ -2339,14 +2328,11 @@ class Manager { * Force plugin disconnect. After its called, the plugin will not be allowed to use the connection. * Note: this method does not remove any access tokens. * + * @deprecated since 1.39.0 * @return bool */ public function disable_plugin() { - if ( ! $this->plugin ) { - return false; - } - - return $this->plugin->disable(); + return null; } /** @@ -2354,14 +2340,11 @@ class Manager { * After its called, the plugin will be allowed to use the connection again. * Note: this method does not initialize access tokens. * + * @deprecated since 1.39.0. * @return bool */ public function enable_plugin() { - if ( ! $this->plugin ) { - return false; - } - - return $this->plugin->enable(); + return null; } /** diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php index d5790b1f..a3bfaed2 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php @@ -96,7 +96,7 @@ class Nonce_Handler { $this->db->prepare( "SELECT 1 FROM `{$this->db->options}` WHERE option_name = %s", "jetpack_nonce_{$timestamp}_{$nonce}" ) ); - if ( is_null( $old_nonce ) ) { + if ( $old_nonce === null ) { $return = (bool) $this->db->query( $this->db->prepare( "INSERT INTO `{$this->db->options}` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, %s)", diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php index 2514b606..7d77c808 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php @@ -38,7 +38,7 @@ class Package_Version_Tracker { /** * Obtains the package versions. * - * @since $$next_version$$ + * @since 1.30.2 * * @param array An associative array of Jetpack package slugs and their corresponding versions as key/value pairs. */ diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php index 4064bf62..b79ea6d9 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php @@ -12,7 +12,7 @@ namespace Automattic\Jetpack\Connection; */ class Package_Version { - const PACKAGE_VERSION = '1.34.0'; + const PACKAGE_VERSION = '1.40.4'; const PACKAGE_SLUG = 'connection'; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php index 8bf1884f..a7c510d9 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php @@ -16,6 +16,12 @@ class Plugin_Storage { const ACTIVE_PLUGINS_OPTION_NAME = 'jetpack_connection_active_plugins'; + /** + * Options where disabled plugins were stored + * + * @deprecated since 1.39.0. + * @var string + */ const PLUGINS_DISABLED_OPTION_NAME = 'jetpack_connection_disabled_plugins'; /** @@ -93,18 +99,20 @@ class Plugin_Storage { * Even if you don't use Jetpack Config, it may be introduced later by other plugins, * so please make sure not to run the method too early in the code. * - * @param bool $connected_only Exclude plugins that were explicitly disconnected. + * @since 1.39.0 deprecated the $connected_only argument. + * + * @param null $deprecated null plugins that were explicitly disconnected. Deprecated, there's no such a thing as disconnecting only specific plugins anymore. * * @return array|WP_Error */ - public static function get_all( $connected_only = false ) { + public static function get_all( $deprecated = null ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable $maybe_error = self::ensure_configured(); if ( $maybe_error instanceof WP_Error ) { return $maybe_error; } - return $connected_only ? array_diff_key( self::$plugins, array_flip( self::get_all_disabled_plugins() ) ) : self::$plugins; + return self::$plugins; } /** @@ -164,6 +172,7 @@ class Plugin_Storage { } // If a plugin was activated or deactivated. + // self::$plugins is populated in Config::ensure_options_connection(). $number_of_plugins_differ = count( self::$plugins ) !== count( (array) get_option( self::ACTIVE_PLUGINS_OPTION_NAME, array() ) ); if ( $number_of_plugins_differ || true === self::$refresh_connected_plugins ) { @@ -191,47 +200,38 @@ class Plugin_Storage { /** * Add the plugin to the set of disconnected ones. * + * @deprecated since 1.39.0. + * * @param string $slug Plugin slug. * * @return bool */ - public static function disable_plugin( $slug ) { - $disconnects = self::get_all_disabled_plugins(); - - if ( ! in_array( $slug, $disconnects, true ) ) { - $disconnects[] = $slug; - update_option( self::PLUGINS_DISABLED_OPTION_NAME, $disconnects ); - } - + public static function disable_plugin( $slug ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable return true; } /** * Remove the plugin from the set of disconnected ones. * + * @deprecated since 1.39.0. + * * @param string $slug Plugin slug. * * @return bool */ - public static function enable_plugin( $slug ) { - $disconnects = self::get_all_disabled_plugins(); - - $slug_index = array_search( $slug, $disconnects, true ); - if ( false !== $slug_index ) { - unset( $disconnects[ $slug_index ] ); - update_option( self::PLUGINS_DISABLED_OPTION_NAME, $disconnects ); - } - + public static function enable_plugin( $slug ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable return true; } /** * Get all plugins that were disconnected by user. * + * @deprecated since 1.39.0. + * * @return array */ - public static function get_all_disabled_plugins() { - return (array) get_option( self::PLUGINS_DISABLED_OPTION_NAME, array() ); + public static function get_all_disabled_plugins() { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + return array(); } /** @@ -239,7 +239,7 @@ class Plugin_Storage { * This is a fallback to ensure this option is always up to date on WPCOM in case * Sync is not present or disabled. * - * @since $$next_version$$ + * @since 1.34.0 */ private static function update_active_plugins_wpcom_no_sync_fallback() { $connection = new Manager(); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php index 92914350..143fe001 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php @@ -91,28 +91,32 @@ class Plugin { /** * Add the plugin to the set of disconnected ones. * + * @deprecated since 1.39.0. + * * @return bool */ public function disable() { - return Plugin_Storage::disable_plugin( $this->slug ); + return true; } /** * Remove the plugin from the set of disconnected ones. * + * @deprecated since 1.39.0. + * * @return bool */ public function enable() { - return Plugin_Storage::enable_plugin( $this->slug ); + return true; } /** * Whether this plugin is allowed to use the connection. * + * @deprecated since $next-version$$ * @return bool */ public function is_enabled() { - return ! in_array( $this->slug, Plugin_Storage::get_all_disabled_plugins(), true ); + return true; } - } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php index c327d7df..a348d0c6 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php @@ -145,7 +145,7 @@ class REST_Connector { '/connection/plugins', array( 'methods' => WP_REST_Server::READABLE, - 'callback' => array( $this, 'get_connection_plugins' ), + 'callback' => array( __CLASS__, 'get_connection_plugins' ), 'permission_callback' => __CLASS__ . '::connection_plugins_permission_check', ) ); @@ -179,10 +179,6 @@ class REST_Connector { 'type' => 'string', 'required' => true, ), - 'no_iframe' => array( - 'description' => __( 'Disable In-Place connection flow and go straight to Calypso', 'jetpack-connection' ), - 'type' => 'boolean', - ), 'redirect_uri' => array( 'description' => __( 'URI of the admin page where the user should be redirected after connection flow', 'jetpack-connection' ), 'type' => 'string', @@ -204,10 +200,6 @@ class REST_Connector { 'callback' => array( $this, 'connection_authorize_url' ), 'permission_callback' => __CLASS__ . '::user_connection_data_permission_check', 'args' => array( - 'no_iframe' => array( - 'description' => __( 'Disable In-Place connection flow and go straight to Calypso', 'jetpack-connection' ), - 'type' => 'boolean', - ), 'redirect_uri' => array( 'description' => __( 'URI of the admin page where the user should be redirected after connection flow', 'jetpack-connection' ), 'type' => 'string', @@ -323,7 +315,7 @@ class REST_Connector { 'filter' => ( apply_filters( 'jetpack_development_mode', false ) || apply_filters( 'jetpack_offline_mode', false ) ), // jetpack_development_mode is deprecated. 'wpLocalConstant' => defined( 'WP_LOCAL_DEV' ) && WP_LOCAL_DEV, ), - 'isPublic' => '1' == get_option( 'blog_public' ), // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison + 'isPublic' => '1' == get_option( 'blog_public' ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual ); /** @@ -347,12 +339,15 @@ class REST_Connector { /** * Get plugins connected to the Jetpack. * + * @param bool $rest_response Should we return a rest response or a simple array. Default to rest response. + * * @since 1.13.1 + * @since 1.38.0 Added $rest_response param. * * @return WP_REST_Response|WP_Error Response or error object, depending on the request result. */ - public function get_connection_plugins() { - $plugins = $this->connection->get_connected_plugins(); + public static function get_connection_plugins( $rest_response = true ) { + $plugins = ( new Manager() )->get_connected_plugins(); if ( is_wp_error( $plugins ) ) { return $plugins; @@ -365,7 +360,12 @@ class REST_Connector { } ); - return rest_ensure_response( array_values( $plugins ) ); + if ( $rest_response ) { + return rest_ensure_response( array_values( $plugins ) ); + } + + return array_values( $plugins ); + } /** @@ -425,11 +425,13 @@ class REST_Connector { * Information about the master/primary user. * Information about the current user. * + * @param bool $rest_response Should we return a rest response or a simple array. Default to rest response. + * * @since 1.30.1 * - * @return \WP_REST_Response + * @return \WP_REST_Response|array */ - public static function get_user_connection_data() { + public static function get_user_connection_data( $rest_response = true ) { $connection = new Manager(); $current_user = wp_get_current_user(); @@ -484,7 +486,13 @@ class REST_Connector { 'currentUser' => $current_user_connection_data, 'connectionOwner' => $owner_display_name, ); - return rest_ensure_response( $response ); + + if ( $rest_response ) { + return rest_ensure_response( $response ); + } + + return $response; + } /** @@ -523,13 +531,13 @@ class REST_Connector { return false; } - $signature = base64_decode( $_GET['signature'] ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode + $signature = base64_decode( filter_var( wp_unslash( $_GET['signature'] ) ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode $signature_data = wp_json_encode( array( - 'rest_route' => $_GET['rest_route'], + 'rest_route' => filter_var( wp_unslash( $_GET['rest_route'] ) ), 'timestamp' => (int) $_GET['timestamp'], - 'url' => wp_unslash( $_GET['url'] ), + 'url' => filter_var( wp_unslash( $_GET['url'] ) ), ) ); @@ -668,17 +676,9 @@ class REST_Connector { $redirect_uri = $request->get_param( 'redirect_uri' ) ? admin_url( $request->get_param( 'redirect_uri' ) ) : null; if ( class_exists( 'Jetpack' ) ) { - $authorize_url = \Jetpack::build_authorize_url( $redirect_uri, ! $request->get_param( 'no_iframe' ) ); + $authorize_url = \Jetpack::build_authorize_url( $redirect_uri ); } else { - if ( ! $request->get_param( 'no_iframe' ) ) { - add_filter( 'jetpack_use_iframe_authorization_flow', '__return_true' ); - } - $authorize_url = $this->connection->get_authorization_url( null, $redirect_uri ); - - if ( ! $request->get_param( 'no_iframe' ) ) { - remove_filter( 'jetpack_use_iframe_authorization_flow', '__return_true' ); - } } /** @@ -711,18 +711,9 @@ class REST_Connector { * @return \WP_REST_Response|WP_Error */ public function connection_authorize_url( $request ) { - $redirect_uri = $request->get_param( 'redirect_uri' ) ? admin_url( $request->get_param( 'redirect_uri' ) ) : null; - - if ( ! $request->get_param( 'no_iframe' ) ) { - add_filter( 'jetpack_use_iframe_authorization_flow', '__return_true' ); - } - + $redirect_uri = $request->get_param( 'redirect_uri' ) ? admin_url( $request->get_param( 'redirect_uri' ) ) : null; $authorize_url = $this->connection->get_authorization_url( null, $redirect_uri ); - if ( ! $request->get_param( 'no_iframe' ) ) { - remove_filter( 'jetpack_use_iframe_authorization_flow', '__return_true' ); - } - return rest_ensure_response( array( 'authorizeUrl' => $authorize_url, diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php index 619194ad..2d45a0b6 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php @@ -26,14 +26,14 @@ class Server_Sandbox { return; } - add_action( 'requests-requests.before_request', array( $this, 'server_sandbox' ), 10, 2 ); + add_action( 'requests-requests.before_request', array( $this, 'server_sandbox' ), 10, 4 ); add_action( 'admin_bar_menu', array( $this, 'admin_bar_add_sandbox_item' ), 999 ); /** * Fires when the server sandbox is initialized. This action is used to ensure that * the server sandbox action hooks are set up only once. * - * @since $$next_version$$ + * @since 1.30.7 */ do_action( 'jetpack_server_sandbox_init' ); } @@ -44,16 +44,20 @@ class Server_Sandbox { * @param string $sandbox Sandbox domain. * @param string $url URL of request about to be made. * @param array $headers Headers of request about to be made. + * @param string $data The body of request about to be made. + * @param string $method The method of request about to be made. * - * @return array [ 'url' => new URL, 'host' => new Host ] + * @return array [ 'url' => new URL, 'host' => new Host, 'new_signature => New signature if url was changed ] */ - public function server_sandbox_request_parameters( $sandbox, $url, $headers ) { - $host = ''; + public function server_sandbox_request_parameters( $sandbox, $url, $headers, $data = null, $method = 'GET' ) { + $host = ''; + $new_signature = ''; if ( ! is_string( $sandbox ) || ! is_string( $url ) ) { return array( - 'url' => $url, - 'host' => $host, + 'url' => $url, + 'host' => $host, + 'new_signature' => $new_signature, ); } @@ -64,16 +68,118 @@ class Server_Sandbox { case 'jetpack.wordpress.com': case 'jetpack.com': case 'dashboard.wordpress.com': - $host = isset( $headers['Host'] ) ? $headers['Host'] : $url_host; - $url = preg_replace( + $host = isset( $headers['Host'] ) ? $headers['Host'] : $url_host; + $original_url = $url; + $url = preg_replace( '@^(https?://)' . preg_quote( $url_host, '@' ) . '(?=[/?#].*|$)@', '${1}' . $sandbox, $url, 1 ); + + /** + * Whether to add the X Debug query parameter to the request made to the Sandbox + * + * @since 1.36.0 + * + * @param bool $add_parameter Whether to add the parameter to the request or not. Default is to false. + * @param string $url The URL of the request being made. + * @param string $host The host of the request being made. + */ + if ( apply_filters( 'jetpack_sandbox_add_profile_parameter', false, $url, $host ) ) { + $url = add_query_arg( 'XDEBUG_PROFILE', 1, $url ); + + // URL has been modified since the signature was created. We'll need a new one. + $original_url = add_query_arg( 'XDEBUG_PROFILE', 1, $original_url ); + $new_signature = $this->get_new_signature( $original_url, $headers, $data, $method ); + + } + } + + return compact( 'url', 'host', 'new_signature' ); + } + + /** + * Gets a new signature for the request + * + * @param string $url The new URL to be signed. + * @param array $headers The headers of the request about to be made. + * @param string $data The body of request about to be made. + * @param string $method The method of the request about to be made. + * @return string|null + */ + private function get_new_signature( $url, $headers, $data, $method ) { + + if ( ! empty( $headers['Authorization'] ) ) { + $a_headers = $this->extract_authorization_headers( $headers ); + if ( ! empty( $a_headers ) ) { + $token_details = explode( ':', $a_headers['token'] ); + + if ( count( $token_details ) === 3 ) { + $user_id = $token_details[2]; + $token = ( new Tokens() )->get_access_token( $user_id ); + $time_diff = (int) \Jetpack_Options::get_option( 'time_diff' ); + $jetpack_signature = new \Jetpack_Signature( $token->secret, $time_diff ); + + $signature = $jetpack_signature->sign_request( + $a_headers['token'], + $a_headers['timestamp'], + $a_headers['nonce'], + $a_headers['body-hash'], + $method, + $url, + $data, + false + ); + + if ( $signature && ! is_wp_error( $signature ) ) { + return $signature; + } elseif ( is_wp_error( $signature ) ) { + $this->log_new_signature_error( $signature->get_error_message() ); + } + } else { + $this->log_new_signature_error( 'Malformed token on Authorization Header' ); + } + } else { + $this->log_new_signature_error( 'Error extracting Authorization Header' ); + } + } else { + $this->log_new_signature_error( 'Empty Authorization Header' ); } - return compact( 'url', 'host' ); + } + + /** + * Logs error if the attempt to create a new signature fails + * + * @param string $message The error message. + * @return void + */ + private function log_new_signature_error( $message ) { + if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { + error_log( sprintf( "SANDBOXING: Error re-signing the request. '%s'", $message ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log + } + } + + /** + * Extract the values in the Authorization header into an array + * + * @param array $headers The headers of the request about to be made. + * @return array|null + */ + public function extract_authorization_headers( $headers ) { + if ( ! empty( $headers['Authorization'] ) && is_string( $headers['Authorization'] ) ) { + $header = str_replace( 'X_JETPACK ', '', $headers['Authorization'] ); + $vars = explode( ' ', $header ); + $result = array(); + foreach ( $vars as $var ) { + $elements = explode( '"', $var ); + if ( count( $elements ) === 3 ) { + $result[ substr( $elements[0], 0, -1 ) ] = $elements[1]; + } + } + return $result; + } } /** @@ -82,24 +188,30 @@ class Server_Sandbox { * * Attached to the `requests-requests.before_request` filter. * - * @param string $url URL of request about to be made. - * @param array $headers Headers of request about to be made. + * @param string $url URL of request about to be made. + * @param array $headers Headers of request about to be made. + * @param array|string $data Data of request about to be made. + * @param string $type Type of request about to be made. * @return void */ - public function server_sandbox( &$url, &$headers ) { + public function server_sandbox( &$url, &$headers, &$data = null, &$type = null ) { if ( ! Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ) ) { return; } $original_url = $url; - $request_parameters = $this->server_sandbox_request_parameters( Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ), $url, $headers ); + $request_parameters = $this->server_sandbox_request_parameters( Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ), $url, $headers, $data, $type ); $url = $request_parameters['url']; if ( $request_parameters['host'] ) { $headers['Host'] = $request_parameters['host']; + if ( $request_parameters['new_signature'] ) { + $headers['Authorization'] = preg_replace( '/signature=\"[^\"]+\"/', 'signature="' . $request_parameters['new_signature'] . '"', $headers['Authorization'] ); + } + if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { error_log( sprintf( "SANDBOXING via '%s': '%s'", Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ), $original_url ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-terms-of-service/src/class-terms-of-service.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-terms-of-service.php index 54bdbf1e..c94d4fb5 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-terms-of-service/src/class-terms-of-service.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-terms-of-service.php @@ -2,7 +2,7 @@ /** * A Terms of Service class for Jetpack. * - * @package automattic/jetpack-terms-of-service + * @package automattic/jetpack-connection */ namespace Automattic\Jetpack; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php index 38fb58d4..4a752def 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php @@ -9,6 +9,9 @@ namespace Automattic\Jetpack\Connection; use Automattic\Jetpack\Constants; use Automattic\Jetpack\Roles; +use DateInterval; +use DateTime; +use Exception; use Jetpack_Options; use WP_Error; @@ -20,6 +23,11 @@ class Tokens { const MAGIC_NORMAL_TOKEN_KEY = ';normal;'; /** + * Datetime format. + */ + const DATE_FORMAT_ATOM = 'Y-m-d\TH:i:sP'; + + /** * Deletes all connection tokens and transients from the local Jetpack site. */ public function delete_all() { @@ -30,6 +38,8 @@ class Tokens { 'user_tokens', ) ); + + $this->remove_lock(); } /** @@ -58,7 +68,7 @@ class Tokens { // Cannot validate non-existent tokens. if ( false === $user_token || false === $blog_token ) { return false; - }; + } $method = 'POST'; $body = array( @@ -357,6 +367,11 @@ class Tokens { * @return object|false */ public function get_access_token( $user_id = false, $token_key = false, $suppress_errors = true ) { + if ( $this->is_locked() ) { + $this->delete_all(); + return false; + } + $possible_special_tokens = array(); $possible_normal_tokens = array(); $user_tokens = $this->get_user_tokens(); @@ -592,4 +607,85 @@ class Tokens { public function update_user_tokens( $tokens ) { return Jetpack_Options::update_option( 'user_tokens', $tokens ); } + + /** + * Lock the tokens to the current site URL. + * + * @param int $timespan How long the tokens should be locked, in seconds. + * + * @return bool + */ + public function set_lock( $timespan = HOUR_IN_SECONDS ) { + try { + $expires = ( new DateTime() )->add( DateInterval::createFromDateString( (int) $timespan . ' seconds' ) ); + } catch ( Exception $e ) { + return false; + } + + if ( false === $expires ) { + return false; + } + + // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode + return Jetpack_Options::update_option( 'token_lock', $expires->format( static::DATE_FORMAT_ATOM ) . '|||' . base64_encode( Urls::site_url() ) ); + } + + /** + * Remove the site lock from tokens. + * + * @return bool + */ + public function remove_lock() { + Jetpack_Options::delete_option( 'token_lock' ); + + return true; + } + + /** + * Check if the domain is locked, remove the lock if needed. + * Possible scenarios: + * - lock expired, site URL matches the lock URL: remove the lock, return false. + * - lock not expired, site URL matches the lock URL: return false. + * - site URL does not match the lock URL (expiration date is ignored): return true, do not remove the lock. + * + * @return bool + */ + public function is_locked() { + $the_lock = Jetpack_Options::get_option( 'token_lock' ); + if ( ! $the_lock ) { + // Not locked. + return false; + } + + $the_lock = explode( '|||', $the_lock, 2 ); + if ( count( $the_lock ) !== 2 ) { + // Something's wrong with the lock. + $this->remove_lock(); + return false; + } + + // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode + $locked_site_url = base64_decode( $the_lock[1] ); + $expires = $the_lock[0]; + + $expiration_date = DateTime::createFromFormat( static::DATE_FORMAT_ATOM, $expires ); + if ( false === $expiration_date || ! $locked_site_url ) { + // Something's wrong with the lock. + $this->remove_lock(); + return false; + } + + if ( Urls::site_url() === $locked_site_url ) { + if ( new DateTime() > $expiration_date ) { + // Site lock expired. + // Site URL matches, removing the lock. + $this->remove_lock(); + } + + return false; + } + + // Site URL doesn't match. + return true; + } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/src/class-tracking.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-tracking.php index cc9d1de2..ef1f07eb 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/src/class-tracking.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-tracking.php @@ -2,7 +2,7 @@ /** * Nosara Tracks for Jetpack * - * @package automattic/jetpack-tracking + * @package automattic/jetpack-connection */ namespace Automattic\Jetpack; @@ -15,6 +15,7 @@ class Tracking { * The assets version. * * @since 1.13.1 + * @deprecated since 1.40.1 * * @var string Assets version. */ @@ -43,7 +44,7 @@ class Tracking { public function __construct( $product_name = 'jetpack', $connection = null ) { $this->product_name = $product_name; $this->connection = $connection; - if ( is_null( $this->connection ) ) { + if ( $this->connection === null ) { // TODO We should always pass a Connection. $this->connection = new Connection\Manager(); } @@ -71,17 +72,17 @@ class Tracking { // Check for nonce. if ( empty( $_REQUEST['tracksNonce'] ) - || ! wp_verify_nonce( $_REQUEST['tracksNonce'], 'jp-tracks-ajax-nonce' ) + || ! wp_verify_nonce( $_REQUEST['tracksNonce'], 'jp-tracks-ajax-nonce' ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- WP core doesn't pre-sanitize nonces either. ) { wp_send_json_error( - __( 'You aren’t authorized to do that.', 'jetpack-tracking' ), + __( 'You aren’t authorized to do that.', 'jetpack-connection' ), 403 ); } if ( ! isset( $_REQUEST['tracksEventName'] ) || ! isset( $_REQUEST['tracksEventType'] ) ) { wp_send_json_error( - __( 'No valid event name or type.', 'jetpack-tracking' ), + __( 'No valid event name or type.', 'jetpack-connection' ), 403 ); } @@ -89,13 +90,13 @@ class Tracking { $tracks_data = array(); if ( 'click' === $_REQUEST['tracksEventType'] && isset( $_REQUEST['tracksEventProp'] ) ) { if ( is_array( $_REQUEST['tracksEventProp'] ) ) { - $tracks_data = $_REQUEST['tracksEventProp']; + $tracks_data = array_map( 'filter_var', wp_unslash( $_REQUEST['tracksEventProp'] ) ); } else { - $tracks_data = array( 'clicked' => $_REQUEST['tracksEventProp'] ); + $tracks_data = array( 'clicked' => filter_var( wp_unslash( $_REQUEST['tracksEventProp'] ) ) ); } } - $this->record_user_event( $_REQUEST['tracksEventName'], $tracks_data, null, false ); + $this->record_user_event( filter_var( wp_unslash( $_REQUEST['tracksEventName'] ) ), $tracks_data, null, false ); wp_send_json_success(); } @@ -116,38 +117,33 @@ class Tracking { true ); - if ( $enqueue ) { - // Enqueue jp-tracks-functions script. - wp_enqueue_script( - 'jp-tracks-functions', - Assets::get_file_url_for_environment( 'js/tracks-callables.js', 'js/tracks-callables.js', __FILE__ ), - array( 'jp-tracks' ), - self::ASSETS_VERSION, - true - ); - } else { - // Register jp-tracks-functions script. - wp_register_script( - 'jp-tracks-functions', - Assets::get_file_url_for_environment( 'js/tracks-callables.js', 'js/tracks-callables.js', __FILE__ ), - array( 'jp-tracks' ), - self::ASSETS_VERSION, - true - ); - } - + Assets::register_script( + 'jp-tracks-functions', + '../dist/tracks-callables.js', + __FILE__, + array( + 'dependencies' => array( 'jp-tracks' ), + 'enqueue' => $enqueue, + 'in_footer' => true, + 'nonmin_path' => 'js/tracks-callables.js', + ) + ); } /** * Enqueue script necessary for tracking. */ public function enqueue_tracks_scripts() { - wp_enqueue_script( + Assets::register_script( 'jptracks', - Assets::get_file_url_for_environment( 'js/tracks-ajax.js', 'js/tracks-ajax.js', __FILE__ ), - array(), - self::ASSETS_VERSION, - true + '../dist/tracks-ajax.js', + __FILE__, + array( + 'dependencies' => array( 'jquery' ), + 'enqueue' => true, + 'in_footer' => true, + 'nonmin_path' => 'js/tracks-ajax.js', + ) ); wp_localize_script( @@ -175,9 +171,9 @@ class Tracking { } $site_url = get_option( 'siteurl' ); - $data['_via_ua'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : ''; - $data['_via_ip'] = isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : ''; - $data['_lg'] = isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : ''; + $data['_via_ua'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? filter_var( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : ''; + $data['_via_ip'] = isset( $_SERVER['REMOTE_ADDR'] ) ? filter_var( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : ''; + $data['_lg'] = isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ? filter_var( wp_unslash( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ) : ''; $data['blog_url'] = $site_url; $data['blog_id'] = \Jetpack_Options::get_option( 'id' ); @@ -313,7 +309,7 @@ class Tracking { } if ( ! isset( $_COOKIE['tk_ai'] ) && ! headers_sent() ) { - setcookie( 'tk_ai', $anon_id ); + setcookie( 'tk_ai', $anon_id, 0, COOKIEPATH, COOKIE_DOMAIN, is_ssl(), false ); // phpcs:ignore Jetpack.Functions.SetCookie -- This is a random string and should be fine. } return array( diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-utils.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-utils.php index f8bd065b..468ea59f 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-utils.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-utils.php @@ -41,7 +41,7 @@ class Utils { * @return mixed | null */ public static function jetpack_api_constant_filter( $constant_value, $constant_name ) { - if ( ! is_null( $constant_value ) ) { + if ( $constant_value !== null ) { // If the constant value was already set elsewhere, use that value. return $constant_value; } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php index 72225d19..88f5f05c 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php @@ -41,15 +41,35 @@ class Webhooks { $webhooks = new static( $connection ); add_action( 'init', array( $webhooks, 'controller' ) ); + add_action( 'load-toplevel_page_jetpack', array( $webhooks, 'fallback_jetpack_controller' ) ); + } + + /** + * Jetpack plugin used to trigger this webhooks in Jetpack::admin_page_load() + * + * The Jetpack toplevel menu is still accessible for stand-alone plugins, and while there's no content for that page, there are still + * actions from Calypso and WPCOM that reach that route regardless of the site having the Jetpack plugin or not. That's why we are still handling it here. + */ + public function fallback_jetpack_controller() { + $this->controller( true ); } /** * The "controller" decides which handler we need to run. + * + * @param bool $force Do not check if it's a webhook request and just run the controller. */ - public function controller() { - // The nonce is verified in specific handlers. + public function controller( $force = false ) { + if ( ! $force ) { + // The nonce is verified in specific handlers. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( empty( $_GET['handler'] ) || 'jetpack-connection-webhooks' !== $_GET['handler'] ) { + return; + } + } + // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( empty( $_GET['handler'] ) || empty( $_GET['action'] ) || 'jetpack-connection-webhooks' !== $_GET['handler'] ) { + if ( empty( $_GET['action'] ) ) { return; } @@ -58,10 +78,15 @@ class Webhooks { switch ( $_GET['action'] ) { case 'authorize': $this->handle_authorize(); + $this->do_exit(); break; + case 'authorize_redirect': + $this->handle_authorize_redirect(); + $this->do_exit(); + break; + // Class Jetpack::admin_page_load() still handles other cases. } - $this->do_exit(); } /** @@ -119,6 +144,14 @@ class Webhooks { } /** + * The authorhize_redirect webhook handler + */ + public function handle_authorize_redirect() { + $authorize_redirect_handler = new Webhooks\Authorize_Redirect( $this->connection ); + $authorize_redirect_handler->handle(); + } + + /** * The `exit` is wrapped into a method so we could mock it. */ protected function do_exit() { diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/src/js/tracks-ajax.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/js/tracks-ajax.js index cea7cc04..1b6b878e 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/src/js/tracks-ajax.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/js/tracks-ajax.js @@ -1,10 +1,10 @@ /* global jpTracksAJAX */ ( function ( $, jpTracksAJAX ) { window.jpTracksAJAX = window.jpTracksAJAX || {}; - var debugSet = localStorage.getItem( 'debug' ) === 'dops:analytics'; + const debugSet = localStorage.getItem( 'debug' ) === 'dops:analytics'; window.jpTracksAJAX.record_ajax_event = function ( eventName, eventType, eventProp ) { - var data = { + const data = { tracksNonce: jpTracksAJAX.jpTracksAJAX_nonce, action: 'jetpack_tracks', tracksEventType: eventType, @@ -27,21 +27,22 @@ $( document ).ready( function () { $( 'body' ).on( 'click', '.jptracks a, a.jptracks', function ( event ) { - var $this = $( event.target ); + const $this = $( event.target ); // We know that the jptracks element is either this, or its ancestor - var $jptracks = $this.closest( '.jptracks' ); + const $jptracks = $this.closest( '.jptracks' ); // We need an event name at least - var eventName = $jptracks.attr( 'data-jptracks-name' ); + const eventName = $jptracks.attr( 'data-jptracks-name' ); if ( undefined === eventName ) { return; } - var eventProp = $jptracks.attr( 'data-jptracks-prop' ) || false; + const eventProp = $jptracks.attr( 'data-jptracks-prop' ) || false; - var url = $this.attr( 'href' ); - var target = $this.get( 0 ).target; + const url = $this.attr( 'href' ); + const target = $this.get( 0 ).target; + let newTabWindow = null; if ( url && target && '_self' !== target ) { - var newTabWindow = window.open( '', target ); + newTabWindow = window.open( '', target ); newTabWindow.opener = null; } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/src/js/tracks-callables.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/js/tracks-callables.js index c7fb85d6..b295c823 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/src/js/tracks-callables.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/js/tracks-callables.js @@ -8,14 +8,21 @@ // Load tracking scripts window._tkq = window._tkq || []; -var _user; -var debug = console.error; // eslint-disable-line no-console +let _user; +const debug = console.error; // eslint-disable-line no-console +/** + * Build a query string. + * + * @param {string|object} group - Stat group, or object mapping groups to names. + * @param {string} [name] - Stat name, when `group` is a string. + * @returns {string} Query string fragment. + */ function buildQuerystring( group, name ) { - var uriComponent = ''; + let uriComponent = ''; if ( 'object' === typeof group ) { - for ( var key in group ) { + for ( const key in group ) { uriComponent += '&x_' + encodeURIComponent( key ) + '=' + encodeURIComponent( group[ key ] ); } } else { @@ -25,7 +32,7 @@ function buildQuerystring( group, name ) { return uriComponent; } -var analytics = { +const analytics = { initialize: function ( userId, username ) { analytics.setUser( userId, username ); analytics.identifyUser(); @@ -33,7 +40,7 @@ var analytics = { mc: { bumpStat: function ( group, name ) { - var uriComponent = buildQuerystring( group, name ); // prints debug info + const uriComponent = buildQuerystring( group, name ); // prints debug info new Image().src = document.location.protocol + '//pixel.wp.com/g.gif?v=wpcom-no-pv' + @@ -77,3 +84,11 @@ var analytics = { window._tkq.push( [ 'clearIdentity' ] ); }, }; + +if ( typeof module !== 'undefined' ) { + // Bundled by Webpack. + module.exports = analytics; +} else { + // Direct load. + window.analytics = analytics; +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/webhooks/class-authorize-redirect.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/webhooks/class-authorize-redirect.php new file mode 100644 index 00000000..664d7db8 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-connection/src/webhooks/class-authorize-redirect.php @@ -0,0 +1,197 @@ +<?php +/** + * Authorize_Redirect Webhook handler class. + * + * @package automattic/jetpack-connection + */ + +namespace Automattic\Jetpack\Connection\Webhooks; + +use Automattic\Jetpack\Admin_UI\Admin_Menu; +use Automattic\Jetpack\Constants; +use Automattic\Jetpack\Tracking; +use GP_Locales; +use Jetpack_Network; + +/** + * Authorize_Redirect Webhook handler class. + */ +class Authorize_Redirect { + + /** + * Constructs the object + * + * @param Automattic\Jetpack\Connection\Manager $connection The Connection Manager object. + */ + public function __construct( $connection ) { + $this->connection = $connection; + } + + /** + * Handle the webhook + * + * This method implements what's in Jetpack::admin_page_load when the Jetpack plugin is not present + */ + public function handle() { + + add_filter( + 'allowed_redirect_hosts', + function ( $domains ) { + $domains[] = 'jetpack.com'; + $domains[] = 'jetpack.wordpress.com'; + $domains[] = 'wordpress.com'; + // Calypso envs. + $domains[] = 'http://calypso.localhost:3000/'; + $domains[] = 'https://wpcalypso.wordpress.com/'; + $domains[] = 'https://horizon.wordpress.com/'; + return array_unique( $domains ); + } + ); + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + $dest_url = empty( $_GET['dest_url'] ) ? null : esc_url_raw( wp_unslash( $_GET['dest_url'] ) ); + + if ( ! $dest_url || ( 0 === stripos( $dest_url, 'https://jetpack.com/' ) && 0 === stripos( $dest_url, 'https://wordpress.com/' ) ) ) { + // The destination URL is missing or invalid, nothing to do here. + exit; + } + + if ( $this->connection->is_connected() && $this->connection->is_user_connected() ) { + // The user is either already connected, or finished the connection process. + wp_safe_redirect( $dest_url ); + exit; + } elseif ( ! empty( $_GET['done'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + // The user decided not to proceed with setting up the connection. + + wp_safe_redirect( Admin_Menu::get_top_level_menu_item_url() ); + exit; + } + + $redirect_args = array( + 'page' => 'jetpack', + 'action' => 'authorize_redirect', + 'dest_url' => rawurlencode( $dest_url ), + 'done' => '1', + ); + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( ! empty( $_GET['from'] ) && 'jetpack_site_only_checkout' === $_GET['from'] ) { + $redirect_args['from'] = 'jetpack_site_only_checkout'; + } + + wp_safe_redirect( $this->build_authorize_url( add_query_arg( $redirect_args, admin_url( 'admin.php' ) ) ) ); + exit; + } + + /** + * Create the Jetpack authorization URL. Copied from Jetpack class. + * + * @param bool|string $redirect URL to redirect to. + * + * @todo Update default value for redirect since the called function expects a string. + * + * @return mixed|void + */ + public function build_authorize_url( $redirect = false ) { + + add_filter( 'jetpack_connect_request_body', array( __CLASS__, 'filter_connect_request_body' ) ); + add_filter( 'jetpack_connect_redirect_url', array( __CLASS__, 'filter_connect_redirect_url' ) ); + + $url = $this->connection->get_authorization_url( wp_get_current_user(), $redirect ); + + remove_filter( 'jetpack_connect_request_body', array( __CLASS__, 'filter_connect_request_body' ) ); + remove_filter( 'jetpack_connect_redirect_url', array( __CLASS__, 'filter_connect_redirect_url' ) ); + + /** + * This filter is documented in plugins/jetpack/class-jetpack.php + */ + return apply_filters( 'jetpack_build_authorize_url', $url ); + } + + /** + * Filters the redirection URL that is used for connect requests. The redirect + * URL should return the user back to the Jetpack console. + * Copied from Jetpack class. + * + * @param String $redirect the default redirect URL used by the package. + * @return String the modified URL. + */ + public static function filter_connect_redirect_url( $redirect ) { + $jetpack_admin_page = esc_url_raw( admin_url( 'admin.php?page=jetpack' ) ); + $redirect = $redirect + ? wp_validate_redirect( esc_url_raw( $redirect ), $jetpack_admin_page ) + : $jetpack_admin_page; + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( isset( $_REQUEST['is_multisite'] ) ) { + $redirect = Jetpack_Network::init()->get_url( 'network_admin_page' ); + } + + return $redirect; + } + + /** + * Filters the connection URL parameter array. + * Copied from Jetpack class. + * + * @param array $args default URL parameters used by the package. + * @return array the modified URL arguments array. + */ + public static function filter_connect_request_body( $args ) { + if ( + Constants::is_defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) + && include_once Constants::get_constant( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) + ) { + $gp_locale = GP_Locales::by_field( 'wp_locale', get_locale() ); + $args['locale'] = isset( $gp_locale ) && isset( $gp_locale->slug ) + ? $gp_locale->slug + : ''; + } + + $tracking = new Tracking(); + $tracks_identity = $tracking->tracks_get_identity( $args['state'] ); + + $args = array_merge( + $args, + array( + '_ui' => $tracks_identity['_ui'], + '_ut' => $tracks_identity['_ut'], + ) + ); + + $calypso_env = self::get_calypso_env(); + + if ( ! empty( $calypso_env ) ) { + $args['calypso_env'] = $calypso_env; + } + + return $args; + } + + /** + * Return Calypso environment value; used for developing Jetpack and pairing + * it with different Calypso enrionments, such as localhost. + * Copied from Jetpack class. + * + * @since 1.37.1 + * + * @return string Calypso environment + */ + public static function get_calypso_env() { + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( isset( $_GET['calypso_env'] ) ) { + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + return sanitize_key( $_GET['calypso_env'] ); + } + + if ( getenv( 'CALYPSO_ENV' ) ) { + return sanitize_key( getenv( 'CALYPSO_ENV' ) ); + } + + if ( defined( 'CALYPSO_ENV' ) && CALYPSO_ENV ) { + return sanitize_key( CALYPSO_ENV ); + } + + return ''; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-constants/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-constants/CHANGELOG.md index c4b42f45..1a8c016a 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-constants/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-constants/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.6.16] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.6.15] - 2022-01-25 +### Changed +- Updated package dependencies. + ## [1.6.14] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -118,6 +126,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Packages: Finish the constants package +[1.6.16]: https://github.com/Automattic/jetpack-constants/compare/v1.6.15...v1.6.16 +[1.6.15]: https://github.com/Automattic/jetpack-constants/compare/v1.6.14...v1.6.15 [1.6.14]: https://github.com/Automattic/jetpack-constants/compare/v1.6.13...v1.6.14 [1.6.13]: https://github.com/Automattic/jetpack-constants/compare/v1.6.12...v1.6.13 [1.6.12]: https://github.com/Automattic/jetpack-constants/compare/v1.6.11...v1.6.12 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/CHANGELOG.md index 7330dced..093fcb30 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/CHANGELOG.md @@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.4.16] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.4.15] - 2022-04-19 +### Changed +- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` + +## [1.4.14] - 2022-03-29 +### Changed +- Microperformance: Use === null instead of is_null + +## [1.4.13] - 2022-02-09 +### Fixed +- Fixed some new PHPCS warnings. + +## [1.4.12] - 2022-01-25 +### Changed +- Updated package dependencies. + ## [1.4.11] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -96,6 +116,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Moving jetpack_is_mobile into a package +[1.4.16]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.15...v1.4.16 +[1.4.15]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.14...v1.4.15 +[1.4.14]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.13...v1.4.14 +[1.4.13]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.12...v1.4.13 +[1.4.12]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.11...v1.4.12 [1.4.11]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.10...v1.4.11 [1.4.10]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.9...v1.4.10 [1.4.9]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.8...v1.4.9 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/src/class-device-detection.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/src/class-device-detection.php index 6760c4ef..21b6c3ab 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/src/class-device-detection.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/src/class-device-detection.php @@ -7,7 +7,10 @@ namespace Automattic\Jetpack; +require_once __DIR__ . '/functions.php'; + use Automattic\Jetpack\Device_Detection\User_Agent_Info; +use function Automattic\Jetpack\Device_Detection\wp_unslash; /** * Class Device_Detection @@ -145,12 +148,17 @@ class Device_Detection { $kind = 'any'; } - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) || strpos( strtolower( $_SERVER['HTTP_USER_AGENT'] ), 'ipad' ) ) { + if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { + return false; + } + + $agent = strtolower( filter_var( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) ); + if ( strpos( $agent, 'ipad' ) ) { return false; } // Remove Samsung Galaxy tablets (SCH-I800) from being mobile devices. - if ( strpos( strtolower( $_SERVER['HTTP_USER_AGENT'] ), 'sch-i800' ) ) { + if ( strpos( $agent, 'sch-i800' ) ) { return false; } @@ -174,7 +182,6 @@ class Device_Detection { if ( ! $kinds['smart'] ) { // if smart, we are not dumb so no need to check. $dumb_agents = $ua_info->dumb_agents; - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); foreach ( $dumb_agents as $dumb_agent ) { if ( false !== strpos( $agent, $dumb_agent ) ) { @@ -189,7 +196,7 @@ class Device_Detection { if ( isset( $_SERVER['HTTP_X_WAP_PROFILE'] ) ) { $kinds['dumb'] = true; $matched_agent = 'http_x_wap_profile'; - } elseif ( isset( $_SERVER['HTTP_ACCEPT'] ) && ( preg_match( '/wap\.|\.wap/i', $_SERVER['HTTP_ACCEPT'] ) || false !== strpos( strtolower( $_SERVER['HTTP_ACCEPT'] ), 'application/vnd.wap.xhtml+xml' ) ) ) { + } elseif ( isset( $_SERVER['HTTP_ACCEPT'] ) && ( preg_match( '/wap\.|\.wap/i', $_SERVER['HTTP_ACCEPT'] ) || false !== strpos( strtolower( $_SERVER['HTTP_ACCEPT'] ), 'application/vnd.wap.xhtml+xml' ) ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is doing the validating. $kinds['dumb'] = true; $matched_agent = 'vnd.wap.xhtml+xml'; } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/src/class-user-agent-info.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/src/class-user-agent-info.php index e8d2f20a..7d18ac3c 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/src/class-user-agent-info.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/src/class-user-agent-info.php @@ -13,6 +13,8 @@ namespace Automattic\Jetpack\Device_Detection; +require_once __DIR__ . '/functions.php'; + /** * A class providing device properties detection. */ @@ -136,7 +138,7 @@ class User_Agent_Info { $this->useragent = $ua; } else { if ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - $this->useragent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $this->useragent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This class is all about validating. } } } @@ -433,7 +435,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( ( strpos( $ua, 'iphone' ) !== false ) || ( strpos( $ua, 'ipod' ) !== false ) ) { if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { return false; @@ -461,7 +463,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $is_iphone = ( strpos( $ua, 'iphone' ) !== false ) || ( strpos( $ua, 'ipod' ) !== false ); $is_safari = ( false !== strpos( $ua, 'safari' ) ); @@ -489,7 +491,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( strpos( $ua, 'crios/' ) !== false ) { return true; @@ -509,7 +511,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( strpos( $ua, 'ipad' ) !== false ) { return false; @@ -533,7 +535,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( strpos( $ua, 'twitter for ipad' ) !== false ) { return true; @@ -555,7 +557,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( false === strpos( $ua, 'iphone' ) ) { return false; @@ -583,7 +585,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( false === strpos( $ua, 'ipad' ) ) { return false; @@ -604,7 +606,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( false !== strpos( $ua, 'wp-iphone' ) ) { return true; } else { @@ -628,7 +630,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $is_ipad = ( false !== strpos( $ua, 'ipad' ) ); $is_safari = ( false !== strpos( $ua, 'safari' ) ); @@ -655,7 +657,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( strpos( $ua, 'fennec' ) !== false ) { return true; @@ -677,7 +679,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( false !== strpos( $ua, 'firefox' ) && false === strpos( $ua, 'mobile' ) && false === strpos( $ua, 'tablet' ) ) { return true; @@ -697,7 +699,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( strpos( $ua, 'mozilla' ) !== false && strpos( $ua, 'mobile' ) !== false && strpos( $ua, 'gecko' ) !== false && strpos( $ua, 'firefox' ) !== false ) { return true; @@ -718,7 +720,7 @@ class User_Agent_Info { return false; } - if ( false === strpos( $_SERVER['HTTP_USER_AGENT'], 'OPR/' ) ) { + if ( false === strpos( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ), 'OPR/' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. return false; } @@ -742,7 +744,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'mobi' ) !== false ) { return true; @@ -769,7 +771,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'mini' ) !== false ) { return true; @@ -786,7 +788,7 @@ class User_Agent_Info { if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( self::is_opera_mini() ) { if ( strpos( $ua, 'android' ) !== false || strpos( $ua, 'iphone' ) !== false || strpos( $ua, 'ipod' ) !== false @@ -809,7 +811,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( false === strpos( $ua, 'windows phone os 7' ) ) { return false; @@ -831,7 +833,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( strpos( $ua, 'windows phone 8' ) === false ) { return false; } else { @@ -850,7 +852,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( false === strpos( $ua, 'webos' ) ) { return false; @@ -874,7 +876,7 @@ class User_Agent_Info { return false; } - $http_user_agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $http_user_agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( false !== strpos( $http_user_agent, 'hp-tablet' ) || false !== strpos( $http_user_agent, 'hpwos' ) || false !== strpos( $http_user_agent, 'touchpad' ) ) { if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { return false; @@ -901,7 +903,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { return false; } @@ -932,7 +934,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos_webkit = strpos( $agent, 'webkit' ); if ( false !== $pos_webkit ) { @@ -966,7 +968,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( strpos( $agent, 'series40' ) !== false ) { if ( strpos( $agent, 'nokia' ) !== false || strpos( $agent, 'ovibrowser' ) !== false || strpos( $agent, 'nokiabrowser' ) !== false ) { @@ -988,7 +990,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( strpos( $agent, 'j2me/midp' ) !== false ) { return true; @@ -1007,7 +1009,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos_maemo = strpos( $agent, 'maemo' ); if ( false === $pos_maemo ) { @@ -1035,7 +1037,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( false === strpos( $ua, 'meego' ) ) { return false; @@ -1057,7 +1059,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos_webkit = strpos( $agent, 'webkit' ); @@ -1078,7 +1080,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos_android = strpos( $agent, 'android' ); if ( false !== $pos_android ) { if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { @@ -1102,7 +1104,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos_android = strpos( $agent, 'android' ); $pos_mobile = strpos( $agent, 'mobile' ); @@ -1132,7 +1134,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos_silk = strpos( $agent, 'silk/' ); $pos_silk_acc = strpos( $agent, 'silk-accelerated=' ); if ( false !== $pos_silk && false !== $pos_silk_acc ) { @@ -1153,7 +1155,7 @@ class User_Agent_Info { if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos_kindle_touch = strpos( $agent, 'kindle/3.0+' ); if ( false !== $pos_kindle_touch && false === self::is_kindle_fire() ) { return true; @@ -1170,7 +1172,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos = strpos( $agent, 'msauthhost' ); if ( false !== $pos ) { return true; @@ -1187,7 +1189,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos = strpos( $agent, 'wp-windows8' ); if ( false !== $pos ) { return true; @@ -1204,7 +1206,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos = strpos( $agent, 'WordPressDesktop' ); if ( false !== $pos ) { return true; @@ -1224,7 +1226,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos_playbook = stripos( $agent, 'PlayBook' ); $pos_rim_tablet = stripos( $agent, 'RIM Tablet' ); @@ -1244,7 +1246,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos_blackberry = strpos( $agent, 'blackberry' ); if ( false !== $pos_blackberry ) { @@ -1265,7 +1267,7 @@ class User_Agent_Info { if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. return ( strpos( $agent, 'bb10' ) !== false ) && ( strpos( $agent, 'mobile' ) !== false ); } @@ -1295,7 +1297,7 @@ class User_Agent_Info { return 'blackberry-10'; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. $pos_blackberry = stripos( $agent, 'blackberry' ); if ( false === $pos_blackberry ) { @@ -1380,7 +1382,7 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( self::is_blackberry_10() ) { return 'blackberry-10'; @@ -1435,9 +1437,9 @@ class User_Agent_Info { return false; } - $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - if ( isset( $_SERVER['X_USER_AGENT'] ) && preg_match( '|wp-webos|', $_SERVER['X_USER_AGENT'] ) ) { + if ( isset( $_SERVER['X_USER_AGENT'] ) && preg_match( '|wp-webos|', $_SERVER['X_USER_AGENT'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating. return true; // Wp4webos 1.1 or higher. } @@ -1445,7 +1447,7 @@ class User_Agent_Info { // the mobile reader on iOS has an incorrect UA when loading the reader // currently it is the default one provided by the iOS framework which // causes problems with 2-step-auth - // User-Agent WordPress/3.1.4 CFNetwork/609 Darwin/13.0.0. + // User-Agent WordPress/3.1.4 CFNetwork/609 Darwin/13.0.0. $app_agents[] = 'wordpress/3.1'; foreach ( $app_agents as $app_agent ) { @@ -1467,7 +1469,7 @@ class User_Agent_Info { return false; } - $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); + $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. if ( strpos( $ua, 'nintendo 3ds' ) !== false ) { return true; } @@ -1486,8 +1488,8 @@ class User_Agent_Info { return false; } - if ( is_null( $is_bot ) ) { - $is_bot = self::is_bot_user_agent( $_SERVER['HTTP_USER_AGENT'] ); + if ( $is_bot === null ) { + $is_bot = self::is_bot_user_agent( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. } return $is_bot; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/src/functions.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/src/functions.php new file mode 100644 index 00000000..fbee1788 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-device-detection/src/functions.php @@ -0,0 +1,27 @@ +<?php +/** + * Utility functions for device detection. + * + * @package automattic/jetpack-device-detection + */ + +namespace Automattic\Jetpack\Device_Detection; + +/** + * A wrapper for WordPress's `wp_unslash()`. + * + * Even though PHP itself dropped the option to add slashes to superglobals a decade ago, + * WordPress still does it through some misguided extreme backwards compatibility. 🙄 + * + * If WordPress's function exists, assume it needs to be called. If not, assume it doesn't. + * + * @param string|array $value String or array of data to unslash. + * @return string|array Possibly unslashed $value. + */ +function wp_unslash( $value ) { + if ( function_exists( '\\wp_unslash' ) ) { + return \wp_unslash( $value ); + } else { + return $value; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-error/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-error/CHANGELOG.md index ea0c6df4..53a42326 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-error/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-error/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.3.14] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.3.13] - 2022-01-25 +### Changed +- Updated package dependencies. + ## [1.3.12] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -92,6 +100,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Packages: Introduce a jetpack-error package +[1.3.14]: https://github.com/Automattic/jetpack-error/compare/v1.3.13...v1.3.14 +[1.3.13]: https://github.com/Automattic/jetpack-error/compare/v1.3.12...v1.3.13 [1.3.12]: https://github.com/Automattic/jetpack-error/compare/v1.3.11...v1.3.12 [1.3.11]: https://github.com/Automattic/jetpack-error/compare/v1.3.10...v1.3.11 [1.3.10]: https://github.com/Automattic/jetpack-error/compare/v1.3.9...v1.3.10 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/CHANGELOG.md new file mode 100644 index 00000000..651b55c5 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/CHANGELOG.md @@ -0,0 +1,38 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.3.0] - 2022-04-26 +### Added +- Add functions for enqueueing fonts used in block and global style settings + +### Changed +- Updated package dependencies. +- Update package.json metadata. + +## [0.2.2] - 2022-04-06 +### Added +- Set composer package type to "jetpack-library" so i18n will work. + +## [0.2.1] - 2022-03-29 +### Added +- Set composer package type to "jetpack-library" so i18n will work. + +## [0.2.0] - 2022-03-15 +### Changed +- Updated package dependencies + +### Deprecated +- Google Fonts: update the method used to preconnect Fonts source domain. + +## 0.1.0 - 2022-03-08 +### Added +- Adds a provider for Google Fonts using the new Webfonts API in Gutenberg + +[0.3.0]: https://github.com/Automattic/jetpack-google-fonts-provider/compare/v0.2.2...v0.3.0 +[0.2.2]: https://github.com/Automattic/jetpack-google-fonts-provider/compare/v0.2.1...v0.2.2 +[0.2.1]: https://github.com/Automattic/jetpack-google-fonts-provider/compare/v0.2.0...v0.2.1 +[0.2.0]: https://github.com/Automattic/jetpack-google-fonts-provider/compare/v0.1.0...v0.2.0 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-heartbeat/LICENSE.txt b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/LICENSE.txt index e82774c1..e82774c1 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-heartbeat/LICENSE.txt +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/LICENSE.txt diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-heartbeat/SECURITY.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/SECURITY.md index b4b46c0e..b4b46c0e 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-heartbeat/SECURITY.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/SECURITY.md diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/class-google-fonts-provider.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/class-google-fonts-provider.php new file mode 100644 index 00000000..c2006a54 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/class-google-fonts-provider.php @@ -0,0 +1,359 @@ +<?php +/** + * WordPress webfonts provider for Google Fonts + * + * @package automattic/jetpack-google-fonts-provider + * @since 0.1.0 + */ + +namespace Automattic\Jetpack\Fonts; + +if ( ! class_exists( '\WP_Webfonts_Provider' ) ) { + return; +} + +/** + * Google Font Provider + */ +class Google_Fonts_Provider extends \WP_Webfonts_Provider { + /** + * Font provider ID. + * + * @var string + */ + protected $id = 'jetpack-google-fonts'; + + /** + * The provider's root URL for retrieving font CSS. + * + * @var string + */ + protected $root_url = 'https://fonts.googleapis.com/css2'; + + /** + * Prints out a preconnect link for improving performance when downloading + * Google Font files. + * + * Hook this function into `wp_head` to enable the preconnect link. + * + * @deprecated 0.2.0 Use Automattic\Jetpack\Fonts\Utils::font_source_resource_hint() instead. + * + * @return void + */ + public static function preconnect_font_source() { + _deprecated_function( __METHOD__, '0.2.0', 'Automattic\\Jetpack\\Fonts\\Utils::font_source_resource_hint' ); + + $fonts_url = \set_url_scheme( 'https://fonts.gstatic.com' ); ?> +<link rel="preconnect" href="<?php echo esc_url( $fonts_url ); ?>" crossorigin> + <?php + } + + /** + * Gets cached CSS from a remote URL. + * + * @param string $id An ID used to cache the styles. + * @param string $url The URL to fetch. + + * @return string The styles. + */ + protected function get_cached_remote_styles( $id, $url ) { + $css = \get_site_transient( $id ); + + // Get remote response and cache the CSS if it hasn't been cached already. + if ( false === $css ) { + $css = $this->get_remote_styles( $url ); + + /* + * Early return if the request failed. + * Cache an empty string for 60 seconds to avoid bottlenecks. + */ + if ( empty( $css ) ) { + \set_site_transient( $id, '', MINUTE_IN_SECONDS ); + return ''; + } + + // Cache the CSS for a month. + \set_site_transient( $id, $css, MONTH_IN_SECONDS ); + } + + return $css; + } + + /** + * Gets styles from the remote font service via the given URL. + * + * @param string $url The URL to fetch. + + * @return string The styles on success. Empty string on failure. + */ + protected function get_remote_styles( $url ) { + // Use a modern user-agent, to get woff2 files. + $args = array( 'user-agent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0' ); + + // Get the remote URL contents. + $response = \wp_safe_remote_get( $url, $args ); + + // Early return if the request failed. + if ( \is_wp_error( $response ) || 200 !== \wp_remote_retrieve_response_code( $response ) ) { + return ''; + } + + // Get the response body. + return \wp_remote_retrieve_body( $response ); + } + + /** + * Gets the `@font-face` CSS styles for Google Fonts. + * + * This method does the following processing tasks: + * 1. Orchestrates an optimized Google Fonts API URL for each font-family. + * 2. Caches each URL, if not already cached. + * 3. Does a remote request to the Google Fonts API service to fetch the styles. + * 4. Generates the `@font-face` for all its webfonts. + * + * @return string The `@font-face` CSS. + */ + public function get_css() { + $css = ''; + $urls = $this->build_collection_api_urls(); + + foreach ( $urls as $url ) { + $css .= $this->get_cached_remote_styles( 'jetpack_google_fonts_' . md5( $url ), $url ); + } + + return $css; + } + + /** + * Builds the Google Fonts URL for a collection of webfonts. + * + * For example, if given the following webfonts: + * ``` + * array( + * array( + * 'font-family' => 'Source Serif Pro', + * 'font-style' => 'normal', + * 'font-weight' => '200 400', + * ), + * array( + * 'font-family' => 'Source Serif Pro', + * 'font-style' => 'italic', + * 'font-weight' => '400 600', + * ), + * ) + * ``` + * then the returned collection would be: + * ``` + * array( + * 'https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,200;0,300;0,400;1,400;1,500;1,600&display=fallback' + * ) + * ``` + * + * @return array Collection of font-family urls. + */ + private function build_collection_api_urls() { + $font_families_urls = array(); + + /* + * Iterate over each font-family group to build the Google Fonts API URL + * for that specific family. Each is added to the collection of URLs to be + * returned to the `get_css()` method for making the remote request. + */ + foreach ( $this->organize_webfonts() as $font_display => $font_families ) { + $url_parts = array(); + foreach ( $font_families as $font_family => $webfonts ) { + list( $normal_weights, $italic_weights ) = $this->collect_font_weights( $webfonts ); + + // Build the font-style with its font-weights. + $url_part = rawurlencode( $font_family ); + if ( empty( $italic_weights ) && ! empty( $normal_weights ) ) { + $url_part .= ':wght@' . implode( ';', $normal_weights ); + } elseif ( ! empty( $italic_weights ) && empty( $normal_weights ) ) { + $url_part .= ':ital,wght@1,' . implode( ';', $normal_weights ); + } elseif ( ! empty( $italic_weights ) && ! empty( $normal_weights ) ) { + $url_part .= ':ital,wght@0,' . implode( ';0,', $normal_weights ) . ';1,' . implode( ';1,', $italic_weights ); + } + + // Add it to the collection. + $url_parts[] = $url_part; + } + + // Build the URL for this font-family and add it to the collection. + $font_families_urls[] = $this->root_url . '?family=' . implode( '&family=', $url_parts ) . '&display=' . $font_display; + } + + return $font_families_urls; + } + + /** + * Organizes the webfonts by font-display and then font-family. + * + * To optimizing building the URL for the Google Fonts API request, + * this method organizes the webfonts first by font-display and then + * by font-family. + * + * For example, if given the following webfonts: + * ``` + * array( + * array( + * 'font-family' => 'Source Serif Pro', + * 'font-style' => 'normal', + * 'font-weight' => '200 400', + * ), + * array( + * 'font-family' => 'Source Serif Pro', + * 'font-style' => 'italic', + * 'font-weight' => '400 600', + * ), + * ) + * ``` + * then the returned collection would be: + * ``` + * array( + * 'fallback' => array( + * 'Source Serif Pro' => array( + * array( + * 'font-family' => 'Source Serif Pro', + * 'font-style' => 'normal', + * 'font-weight' => '200 400', + * ), + * array( + * 'font-family' => 'Source Serif Pro', + * 'font-style' => 'italic', + * 'font-weight' => '400 600', + * ), + * ), + * ), + * ) + * + * @return array[][] Webfonts organized by font-display and then font-family. + */ + private function organize_webfonts() { + $font_display_groups = array(); + + /* + * Group by font-display. + * Each font-display will need to be a separate request. + */ + foreach ( $this->webfonts as $webfont ) { + if ( ! isset( $font_display_groups[ $webfont['font-display'] ] ) ) { + $font_display_groups[ $webfont['font-display'] ] = array(); + } + $font_display_groups[ $webfont['font-display'] ][] = $webfont; + } + + /* + * Iterate over each font-display group and group by font-family. + * Multiple font-families can be combined in the same request, + * but their params need to be grouped. + */ + foreach ( $font_display_groups as $font_display => $font_display_group ) { + $font_families = array(); + + foreach ( $font_display_group as $webfont ) { + if ( ! isset( $font_families[ $webfont['font-family'] ] ) ) { + $font_families[ $webfont['font-family'] ] = array(); + } + $font_families[ $webfont['font-family'] ][] = $webfont; + } + + $font_display_groups[ $font_display ] = $font_families; + } + + return $font_display_groups; + } + + /** + * Collects all font-weights grouped by 'normal' and 'italic' font-style. + * + * For example, if given the following webfonts: + * ``` + * array( + * array( + * 'font-family' => 'Source Serif Pro', + * 'font-style' => 'normal', + * 'font-weight' => '200 400', + * ), + * array( + * 'font-family' => 'Source Serif Pro', + * 'font-style' => 'italic', + * 'font-weight' => '400 600', + * ), + * ) + * ``` + * Then the returned collection would be: + * ``` + * array( + * array( 200, 300, 400 ), + * array( 400, 500, 600 ), + * ) + * ``` + * + * @param array $webfonts Webfonts to process. + * @return array[] { + * The font-weights grouped by font-style. + * + * @type array $normal_weights Individual font-weight values for 'normal' font-style. + * @type array $italic_weights Individual font-weight values for 'italic' font-style. + * } + */ + private function collect_font_weights( array $webfonts ) { + $normal_weights = array(); + $italic_weights = array(); + + foreach ( $webfonts as $webfont ) { + $font_weights = $this->get_font_weights( $webfont['font-weight'] ); + // Skip this webfont if it does not have a font-weight defined. + if ( empty( $font_weights ) ) { + continue; + } + + // Add the individual font-weights to the end of font-style array. + if ( 'italic' === $webfont['font-style'] ) { + array_push( $italic_weights, ...$font_weights ); + } else { + array_push( $normal_weights, ...$font_weights ); + } + } + + // Remove duplicates. + $normal_weights = array_unique( $normal_weights ); + $italic_weights = array_unique( $italic_weights ); + + return array( $normal_weights, $italic_weights ); + } + + /** + * Converts the given string of font-weight into an array of individual weight values. + * + * When given a single font-weight, the value is wrapped into an array. + * + * A range of font-weights is specified as '400 600' with the lightest value first, + * a space, and then the heaviest value last. + * + * When given a range of font-weight values, the range is converted into individual + * font-weight values. For example, a range of '400 600' is converted into + * `array( 400, 500, 600 )`. + * + * @param string $font_weights The font-weights string. + * @return array The font-weights array. + */ + private function get_font_weights( $font_weights ) { + $font_weights = trim( $font_weights ); + + // A single font-weight. + if ( false === strpos( $font_weights, ' ' ) ) { + return array( $font_weights ); + } + + // Process a range of font-weight values that are delimited by ' '. + $font_weights = explode( ' ', $font_weights ); + + // If there are 2 values, treat them as a range. + if ( 2 === count( $font_weights ) ) { + $font_weights = range( (int) $font_weights[0], (int) $font_weights[1], 100 ); + } + + return $font_weights; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/class-utils.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/class-utils.php new file mode 100644 index 00000000..3ea69559 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/class-utils.php @@ -0,0 +1,57 @@ +<?php +/** + * Google Fonts package Utils class file. + * + * @package automattic/jetpack-google-fonts-provider + */ + +namespace Automattic\Jetpack\Fonts; + +/** + * Provides utility methods for the Google Fonts Provider package. + */ +class Utils { + /** + * Adds a preconnect link for improving performance when downloading Google Font files. + * Only do so if the site supports the Webfonts API. + * + * @param array $urls Array of resources and their attributes, or URLs to print for resource hints. + * @param string $relation_type The relation type the URLs are printed for, e.g. 'preconnect' or 'prerender'. + */ + public static function font_source_resource_hint( $urls, $relation_type ) { + if ( + 'preconnect' === $relation_type + && class_exists( 'WP_Webfonts_Provider' ) + ) { + $urls[] = array( + 'href' => 'https://fonts.gstatic.com', + 'crossorigin', + ); + } + + return $urls; + } + + /** + * Check if a font family is registered (verifying that it can be enqueued). + * + * This function will not be needed if/when WP_Webfonts provides this functionality. + * + * @link https://github.com/WordPress/gutenberg/pull/39988 + * @link https://github.com/WordPress/gutenberg/blob/e94fffae0684aa5a6dc370ce3eba262cb77071d9/lib/experimental/class-wp-webfonts.php#L217 + * + * @param string $font_family_name Name of font family. + * @return boolean|void Whether the font family is registered, or void if WP_Webfonts is not available. + */ + public static function is_font_family_registered( $font_family_name ) { + if ( ! function_exists( 'wp_webfonts' ) || ! method_exists( 'WP_Webfonts', 'get_font_slug' ) ) { + return; + } + + $wp_webfonts = wp_webfonts(); + + $slug = \WP_Webfonts::get_font_slug( $font_family_name ); + + return isset( $wp_webfonts->get_registered_webfonts()[ $slug ] ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/introspectors/class-blocks.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/introspectors/class-blocks.php new file mode 100644 index 00000000..f715bfdf --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/introspectors/class-blocks.php @@ -0,0 +1,37 @@ +<?php +/** + * Google Fonts package Blocks fonts introspector class file. + * + * @package automattic/jetpack-google-fonts-provider + */ + +namespace Automattic\Jetpack\Fonts\Introspectors; + +use Automattic\Jetpack\Fonts\Utils; + +/** + * Blocks fonts introspector. + */ +class Blocks { + /** + * Enqueue fonts used for block typography settings. + * + * @filter pre_render_block + * + * @param string|null $content The pre-rendered content. Default null. + * @param array $parsed_block The block being rendered. + */ + public static function enqueue_block_fonts( $content, $parsed_block ) { + if ( ! is_admin() && isset( $parsed_block['attrs']['fontFamily'] ) ) { + + $block_font_family = $parsed_block['attrs']['fontFamily']; + $font_is_registered = Utils::is_font_family_registered( $block_font_family ); + + if ( $font_is_registered ) { + wp_enqueue_webfont( $block_font_family ); + } + } + + return $content; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/introspectors/class-global-styles.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/introspectors/class-global-styles.php new file mode 100644 index 00000000..292c42ee --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-google-fonts-provider/src/introspectors/class-global-styles.php @@ -0,0 +1,115 @@ +<?php +/** + * Google Fonts package Global Styles fonts introspector class file. + * + * @package automattic/jetpack-google-fonts-provider + */ + +namespace Automattic\Jetpack\Fonts\Introspectors; + +use Automattic\Jetpack\Fonts\Utils; + +/** + * Global Styles fonts introspector. + */ +class Global_Styles { + /** + * Enqueue fonts used in global styles settings. + * + * @return void + */ + public static function enqueue_global_styles_fonts() { + if ( is_admin() || ! function_exists( 'wp_enqueue_webfont' ) ) { + return; + } + + $global_styles_fonts = self::collect_fonts_from_global_styles(); + + foreach ( $global_styles_fonts as $font ) { + $font_is_registered = Utils::is_font_family_registered( $font ); + + if ( $font_is_registered ) { + wp_enqueue_webfont( $font ); + } + } + } + + /** + * Collect fonts set in Global Styles settings. + * + * @return array Font faces from Global Styles settings. + */ + public static function collect_fonts_from_global_styles() { + if ( ! function_exists( 'gutenberg_get_global_styles' ) ) { + return array(); + } + + $global_styles = gutenberg_get_global_styles(); + + $found_webfonts = array(); + + // Look for fonts in block presets... + if ( isset( $global_styles['blocks'] ) ) { + foreach ( $global_styles['blocks'] as $setting ) { + $font_slug = self::extract_font_slug_from_setting( $setting ); + + if ( $font_slug ) { + $found_webfonts[] = $font_slug; + } + } + } + + // Look for fonts in HTML element presets... + if ( isset( $global_styles['elements'] ) ) { + foreach ( $global_styles['elements'] as $setting ) { + $font_slug = self::extract_font_slug_from_setting( $setting ); + + if ( $font_slug ) { + $found_webfonts[] = $font_slug; + } + } + } + + // Check if a global typography setting was defined. + $font_slug = self::extract_font_slug_from_setting( $global_styles ); + + if ( $font_slug ) { + $found_webfonts[] = $font_slug; + } + + return $found_webfonts; + } + + /** + * Extract the font family slug from a settings array. + * + * @param array $setting The settings object. + * + * @return string|null + */ + protected static function extract_font_slug_from_setting( $setting ) { + if ( ! isset( $setting['typography']['fontFamily'] ) ) { + return null; + } + + $font_family = $setting['typography']['fontFamily']; + + // Full string: var(--wp--preset--font-family--slug). + // We do not care about the origin of the font, only its slug. + preg_match( '/font-family--(?P<slug>.+)\)$/', $font_family, $matches ); + + if ( isset( $matches['slug'] ) ) { + return $matches['slug']; + } + + // Full string: var:preset|font-family|slug + // We do not care about the origin of the font, only its slug. + preg_match( '/font-family\|(?P<slug>.+)$/', $font_family, $matches ); + + if ( isset( $matches['slug'] ) ) { + return $matches['slug']; + } + + return $font_family; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-heartbeat/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-heartbeat/CHANGELOG.md deleted file mode 100644 index ea1f7642..00000000 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-heartbeat/CHANGELOG.md +++ /dev/null @@ -1,123 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [1.4.0] - 2022-01-04 -### Changed -- Updated package textdomain from `jetpack` to `jetpack-heartbeat`. - -## [1.3.15] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.3.14] - 2021-11-30 -### Changed -- Updated package dependencies. - -## [1.3.13] - 2021-10-19 -### Changed -- Updated package dependencies. - -## [1.3.12] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [1.3.11] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.3.10] - 2021-09-03 - -- Clean up doc blocks. - -## [1.3.9] - 2021-08-30 -### Changed -- Updated versions in annotations - -## [1.3.8] - 2021-06-15 -### Changed -- Updated package dependencies. - -## [1.3.7] - 2021-05-25 -### Fixed -- Fixed new PHPCS errors. - -## [1.3.6] - 2021-04-27 -### Changed -- Updated package dependencies. - -## [1.3.5] - 2021-04-08 -### Changed -- Packaging and build changes, no change to the package itself. - -## [1.3.4] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies - -### Changed -- Update package dependencies. - -## [1.3.3] - 2021-02-23 - -- CI: Make tests more generic - -## [1.3.2] - 2021-01-28 - -- Update dependencies to latest stable - -## [1.3.1] - 2021-01-26 - -- Add mirror-repo information to all current composer packages -- Monorepo: Reorganize all projects - -## [1.3.0] - 2021-01-05 - -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.2.2] - 2020-11-24 - -- Version packages for release - -## [1.2.1] - 2020-11-24 - -- Updated PHPCS: Packages and Debugger - -## [1.2.0] - 2020-10-27 - -- Make XMLRPC methods available for blog token - -## [1.1.0] - 2020-09-29 - -- Update dependencies to latest stable - -## 1.0.0 - 2020-08-26 - -- Connection: use heartbeat to send connected plugins info -- Use new heartbeat package -- Creates the Jetpack Heartbeat package - -[1.4.0]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.15...v1.4.0 -[1.3.15]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.14...v1.3.15 -[1.3.14]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.13...v1.3.14 -[1.3.13]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.12...v1.3.13 -[1.3.12]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.11...v1.3.12 -[1.3.11]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.10...v1.3.11 -[1.3.10]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.9...v1.3.10 -[1.3.9]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.8...v1.3.9 -[1.3.8]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.7...v1.3.8 -[1.3.7]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.6...v1.3.7 -[1.3.6]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.5...v1.3.6 -[1.3.5]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.4...v1.3.5 -[1.3.4]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.3...v1.3.4 -[1.3.3]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.2...v1.3.3 -[1.3.2]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.1...v1.3.2 -[1.3.1]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.3.0...v1.3.1 -[1.3.0]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.2.2...v1.3.0 -[1.2.2]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.2.1...v1.2.2 -[1.2.1]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.2.0...v1.2.1 -[1.2.0]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.1.0...v1.2.0 -[1.1.0]: https://github.com/Automattic/jetpack-heartbeat/compare/v1.0.0...v1.1.0 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/CHANGELOG.md index 3039161a..9593fd18 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/CHANGELOG.md @@ -5,6 +5,107 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.8.12] - 2022-05-30 +### Changed +- Updated package dependencies + +## [0.8.11] - 2022-05-18 +### Changed +- Updated package dependencies [#24372] + +## [0.8.10] - 2022-05-10 +### Changed +- Updated package dependencies. [#24302] + +## [0.8.9] - 2022-05-04 +### Added +- Add missing JavaScript dependencies. [#24096] + +### Changed +- Updated package dependencies. [#24095] [#24198] + +### Deprecated +- Moved the options class into Connection. [#24095] + +## [0.8.8] - 2022-04-26 +### Changed +- Updated package dependencies. +- Update package.json metadata. + +## [0.8.7] - 2022-04-19 +### Changed +- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` + +## [0.8.6] - 2022-04-12 +### Changed +- Updated package dependencies. + +## [0.8.5] - 2022-04-06 +### Changed +- Updated package dependencies + +### Removed +- Removed tracking dependency. + +## [0.8.4] - 2022-03-29 +### Changed +- Microperformance: Use === null instead of is_null +- Updated package dependencies. + +## [0.8.3] - 2022-03-23 +### Changed +- Updated package dependencies + +## [0.8.2] - 2022-03-15 +### Changed +- Updated package dependencies. + +## [0.8.1] - 2022-03-08 +### Changed +- Updated package dependencies. + +## [0.8.0] - 2022-03-02 +### Added +- IDC: add detection for possibly dynamic HTTP_HOST being used in WP_SITEURL or WP_HOME. + +### Changed +- Bring back the IDC screen in Staging mode. +- Updated package dependencies. + +## [0.7.4] - 2022-02-22 +### Added +- Add blog ID to event tracking. + +## [0.7.3] - 2022-02-16 +### Changed +- Updated package dependencies. + +## [0.7.2] - 2022-02-09 +### Changed +- Updated package dependencies + +## [0.7.1] - 2022-02-02 +### Changed +- Updated package dependencies. + +## [0.7.0] - 2022-01-27 +### Changed +- IDC "Safe Mode" admin bar button redesign. + +## [0.6.4] - 2022-01-25 +### Changed +- Add class notice to the IDC container div. +- Add missing JS peer dependency. +- Updated package dependencies. + +## [0.6.3] - 2022-01-18 +### Changed +- General: update required node version to v16.13.2 + +## [0.6.2] - 2022-01-11 +### Changed +- Updated package dependencies. + ## [0.6.1] - 2022-01-11 ### Fixed - Do not add IDC query args to authenticated request when in offline or staging mode. @@ -123,6 +224,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated package dependencies. - Use Connection/Urls for home_url and site_url functions migrated from Sync. +[0.8.12]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.11...v0.8.12 +[0.8.11]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.10...v0.8.11 +[0.8.10]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.9...v0.8.10 +[0.8.9]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.8...v0.8.9 +[0.8.8]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.7...v0.8.8 +[0.8.7]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.6...v0.8.7 +[0.8.6]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.5...v0.8.6 +[0.8.5]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.4...v0.8.5 +[0.8.4]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.3...v0.8.4 +[0.8.3]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.2...v0.8.3 +[0.8.2]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.1...v0.8.2 +[0.8.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.0...v0.8.1 +[0.8.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.7.4...v0.8.0 +[0.7.4]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.7.3...v0.7.4 +[0.7.3]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.7.2...v0.7.3 +[0.7.2]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.7.1...v0.7.2 +[0.7.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.7.0...v0.7.1 +[0.7.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.6.4...v0.7.0 +[0.6.4]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.6.3...v0.6.4 +[0.6.3]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.6.2...v0.6.3 +[0.6.2]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.6.1...v0.6.2 [0.6.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.6.0...v0.6.1 [0.6.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.5.0...v0.6.0 [0.5.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.4.4...v0.5.0 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.asset.php index 4ed4784a..ca5a05c6 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.asset.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.asset.php @@ -1 +1 @@ -<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '472c28cf4d566875562ae0cb3c2e44b1');
\ No newline at end of file +<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4a6e6592e7a0125664c9'); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.css index ea21ba25..606cfb74 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.css +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.css @@ -1 +1 @@ -#wp-admin-bar-jetpack-idc.hide{display:none}#wp-admin-bar-jetpack-idc .jp-idc-admin-bar{background:#fff;border-radius:2px;color:#1d2327;font-size:12px;padding:4px 8px}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons{color:#1d2327;font-family:dashicons}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons:before{font-size:16px}#wpadminbar #wp-admin-bar-jetpack-idc:hover .ab-item{background:inherit}#wpadminbar #wp-admin-bar-jetpack-idc:hover .jp-idc-admin-bar{background:#f0f0f1}#jp-identity-crisis-container .jp-idc__idc-screen{margin-bottom:40px;margin-top:40px}.jp-idc__idc-screen{background:#fff;border-left:4px solid #e68b28;border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.04);box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0 auto;max-width:1128px;padding:10px}.jp-idc__idc-screen.jp-idc__idc-screen__success{border-color:#069e08}@media(min-width:600px){.jp-idc__idc-screen{padding:48px}}.jp-idc__idc-screen .jp-idc__idc-screen__header{align-items:center;display:flex}.jp-idc__idc-screen .jp-idc__idc-screen__header .jp-idc__idc-screen__logo-image{max-height:100px;max-width:100px}.jp-idc__idc-screen .jp-idc__idc-screen__header .jp-idc__idc-screen__logo-label{font-size:14px;line-height:22px;margin:-7px 0 0 8px}.jp-idc__idc-screen h2{font-size:24px;font-weight:600;line-height:28px;margin:32px 0 0}.jp-idc__idc-screen h3{font-size:20px;font-weight:600;line-height:28px;margin:24px 0 0}.jp-idc__idc-screen p{color:#2c3338;font-size:16px;line-height:24px;margin:16px 0 0;max-width:710px}.jp-idc__idc-screen a{color:#2c3338}.jp-idc__idc-screen .jp-idc__idc-screen__cards{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap}@media only screen and (min-width:1403px){.jp-idc__idc-screen .jp-idc__idc-screen__cards{align-items:normal;flex-direction:row}}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__cards-separator{align-self:center;color:#23282d;font-size:20px;font-weight:600;line-height:28px;margin:0 24px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base{border:1px solid #c3c4c7;border-radius:4px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;margin:24px 0;max-width:100%;padding:10px;width:480px}@media(min-width:600px){.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base{padding:24px}}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base h4{font-size:20px;font-weight:400;line-height:28px;margin:0 0 8px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base p{margin:0 0 24px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-sitename{background:#f9f9f6;border-radius:33px;box-sizing:border-box;color:#2c3338;font-size:16px;font-weight:700;line-height:24px;overflow-wrap:anywhere;padding:16px;text-align:center;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-separator{display:block;margin:12px auto}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-button{padding:8px 24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-action-button{background:#000;border-radius:4px;color:#fff;font-size:16px;font-weight:600;height:auto;justify-content:center;line-height:24px;margin-top:24px;min-height:40px;padding:8px}.jp-idc__idc-screen .jp-idc__idc-screen__card-action-button-migrated{margin-top:64px;width:141px}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap;margin-top:24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-hostname{border:1px solid #c3c4c7;border-radius:4px;color:#2c3338;flex-grow:1;font-size:16px;font-weight:700;line-height:24px;padding:24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{display:none}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator{display:block}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator,.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{margin:28px}@media only screen and (min-width:1400px){.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated{flex-direction:row;width:auto}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator{display:none}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{display:block}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-hostname{width:auto}}@keyframes rotate-spinner{to{transform:rotate(1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-right-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-20:#a7aaad;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-80:#8a2424;--jp-gray-off:#e2e2df;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-idc__idc-screen .jp-idc__error-message{align-items:center;color:var(--jp-red);display:flex;flex-direction:row;justify-content:center;margin:15px 0}.jp-idc__idc-screen .jp-idc__error-message .error-gridicon{fill:var(--jp-red);margin-right:8px}.jp-idc__idc-screen .jp-idc__error-message a,.jp-idc__idc-screen .jp-idc__error-message span{color:var(--jp-red);font-size:var(--font-body)}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__error-message{margin-top:5px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base{padding-bottom:75px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base.jp-idc__idc-screen__card-action-error{padding-bottom:5px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base .jp-idc__error-message{height:40px}.jp-idc__idc-screen .jp-idc__safe-mode{text-align:center}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__safe-mode__staying-safe{display:flex;justify-content:center;padding:6px}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__safe-mode__staying-safe .jp-components-spinner{margin:0 10px}.jp-idc__idc-screen .jp-idc__safe-mode,.jp-idc__idc-screen .jp-idc__safe-mode button{color:#2c3338;font-size:16px;line-height:24px}.jp-idc__idc-screen .jp-idc__safe-mode button{padding:0;text-decoration:underline}
\ No newline at end of file +#wpadminbar #wp-admin-bar-jetpack-idc{margin-right:5px}#wpadminbar #wp-admin-bar-jetpack-idc .jp-idc-admin-bar{border-radius:2px;color:#efeff0;font-size:14px;font-weight:500;line-height:20px;padding:6px 8px}#wpadminbar #wp-admin-bar-jetpack-idc.hide{display:none}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons{font-family:dashicons;margin-top:-6px}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons:before{font-size:18px}#wpadminbar #wp-admin-bar-jetpack-idc .ab-item{background:#e68b28;padding:0}#jp-identity-crisis-container .jp-idc__idc-screen{margin-bottom:40px;margin-top:40px}#jp-identity-crisis-container.notice{background:none;border:none}.jp-idc__idc-screen{background:#fff;border-left:4px solid #e68b28;border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.04);box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0 auto;max-width:1128px;padding:10px}.jp-idc__idc-screen.jp-idc__idc-screen__success{border-color:#069e08}@media(min-width:600px){.jp-idc__idc-screen{padding:48px}}.jp-idc__idc-screen .jp-idc__idc-screen__header{align-items:center;display:flex}.jp-idc__idc-screen .jp-idc__idc-screen__header .jp-idc__idc-screen__logo-image{max-height:100px;max-width:100px}.jp-idc__idc-screen .jp-idc__idc-screen__header .jp-idc__idc-screen__logo-label{font-size:14px;line-height:22px;margin:-7px 0 0 8px}.jp-idc__idc-screen h2{font-size:24px;font-weight:600;line-height:28px;margin:32px 0 0}.jp-idc__idc-screen h3{font-size:20px;font-weight:600;line-height:28px;margin:24px 0 0}.jp-idc__idc-screen p{color:#2c3338;font-size:16px;line-height:24px;margin:16px 0 0;max-width:710px}.jp-idc__idc-screen a{color:#2c3338}.jp-idc__idc-screen .jp-idc__idc-screen__cards{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap}@media only screen and (min-width:1403px){.jp-idc__idc-screen .jp-idc__idc-screen__cards{align-items:normal;flex-direction:row}}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__cards-separator{align-self:center;color:#23282d;font-size:20px;font-weight:600;line-height:28px;margin:0 24px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base{border:1px solid #c3c4c7;border-radius:4px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;margin:24px 0;max-width:100%;padding:10px;width:480px}@media(min-width:600px){.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base{padding:24px}}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base h4{font-size:20px;font-weight:400;line-height:28px;margin:0 0 8px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base p{margin:0 0 24px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-sitename{background:#f9f9f6;border-radius:33px;box-sizing:border-box;color:#2c3338;font-size:16px;font-weight:700;line-height:24px;overflow-wrap:anywhere;padding:16px;text-align:center;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-separator{display:block;margin:12px auto}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-button{padding:8px 24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-action-button{background:#000;border-radius:4px;color:#fff;font-size:16px;font-weight:600;height:auto;justify-content:center;line-height:24px;margin-top:24px;min-height:40px;padding:8px}.jp-idc__idc-screen .jp-idc__idc-screen__card-action-button-migrated{margin-top:64px;width:141px}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap;margin-top:24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-hostname{border:1px solid #c3c4c7;border-radius:4px;color:#2c3338;flex-grow:1;font-size:16px;font-weight:700;line-height:24px;padding:24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{display:none}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator{display:block}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator,.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{margin:28px}@media only screen and (min-width:1400px){.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated{flex-direction:row;width:auto}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator{display:none}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{display:block}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-hostname{width:auto}}@keyframes rotate-spinner{to{transform:rotate(1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-right-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-10:#f2cf75;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-idc__idc-screen .jp-idc__error-message{align-items:center;color:var(--jp-red);display:flex;flex-direction:row;justify-content:center;margin:15px 0}.jp-idc__idc-screen .jp-idc__error-message .error-gridicon{fill:var(--jp-red);margin-right:8px}.jp-idc__idc-screen .jp-idc__error-message a,.jp-idc__idc-screen .jp-idc__error-message span{color:var(--jp-red);font-size:var(--font-body)}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__error-message{margin-top:5px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base{padding-bottom:75px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base.jp-idc__idc-screen__card-action-error{padding-bottom:5px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base .jp-idc__error-message{height:40px}.jp-idc__idc-screen .jp-idc__safe-mode{text-align:center}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__safe-mode__staying-safe{display:flex;justify-content:center;padding:6px}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__safe-mode__staying-safe .jp-components-spinner{margin:0 10px}.jp-idc__idc-screen .jp-idc__safe-mode,.jp-idc__idc-screen .jp-idc__safe-mode button{color:#2c3338;font-size:16px;line-height:24px}.jp-idc__idc-screen .jp-idc__safe-mode button{padding:0;text-decoration:underline}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.js index 7e9ca216..df6f7481 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.js @@ -1,8 +1,8 @@ /*! For license information please see index.js.LICENSE.txt */ -!function(){var e={7538:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},9183:function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},9105:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var o=s.apply(null,n);o&&e.push(o)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(n=function(){return s}.apply(t,[]))||(e.exports=n)}()},5771:function(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(s=r))})),t.splice(s,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(1244)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},1244:function(e,t,n){e.exports=function(e){function t(e){let n,s,i,o=null;function a(...e){if(!a.enabled)return;const r=a,s=Number(new Date),i=s-(n||s);r.diff=i,r.prev=n,r.curr=s,n=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,s)=>{if("%%"===n)return"%";o++;const i=t.formatters[s];if("function"==typeof i){const t=e[o];n=i.call(r,t),e.splice(o,1),o--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(s!==t.namespaces&&(s=t.namespaces,i=t.enabled(e)),i),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(s),...t.skips.map(s).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),s=r.length;for(n=0;n<s;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(2002),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},6212:function(){},4943:function(){},8911:function(){},2780:function(){},2002:function(e){var t=1e3,n=60*t,r=60*n,s=24*r,i=7*s,o=365.25*s;function a(e,t,n,r){var s=t>=1.5*n;return Math.round(e/n)+" "+r+(s?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*s;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var i=Math.abs(e);if(i>=s)return a(e,i,s,"day");if(i>=r)return a(e,i,r,"hour");if(i>=n)return a(e,i,n,"minute");if(i>=t)return a(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=s)return Math.round(e/s)+"d";if(i>=r)return Math.round(e/r)+"h";if(i>=n)return Math.round(e/n)+"m";if(i>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9587:function(e,t,n){"use strict";var r=n(5843);function s(){}function i(){}i.resetWarningCache=s,e.exports=function(){function e(e,t,n,s,i,o){if(o!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:s};return n.PropTypes=n,n}},1268:function(e,t,n){e.exports=n(9587)()},5843:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},816:function(e,t,n){"use strict";var r=n(5771),s=n.n(r),i=n(2819);const o=s()("dops:analytics");let a,c;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const l={initialize:function(e,t,n){l.setUser(e,t),l.setSuperProps(n),l.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){c={ID:e,username:t}},setSuperProps:function(e){a=e},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);o("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),o('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);this.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);o("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),o('Built stat "%s" in group "%s"',t,e);return n}(e,t);this.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){l.tracks.recordPageView(e),l.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,s,i,o){l.ga.recordPurchase(e,t,n,r,s,i,o)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(a&&(o("- Super Props: %o",a),t=(0,i.assign)(t,a)),o('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):o('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};l.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){l.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){o("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};l.ga.initialized||(c&&(e={userId:"u-"+c.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),l.ga.initialized=!0)},recordPageView:function(e,t){l.ga.initialize(),o("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){l.ga.initialize();let s="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(s+=" [Option Label: "+n+"]"),void 0!==r&&(s+=" [Option Value: "+r+"]"),o(s),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,s,i,o){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:o}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:s,quantity:i}),window.ga("ecommerce:send")}},identifyUser:function(){c&&window._tkq.push(["identifyUser",c.ID,c.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};t.Z=l},9570:function(e,t,n){"use strict";var r=n(2819),s=n(6483),i=n(6251);function o(e){class t extends Error{constructor(){super(...arguments),this.name=e}}return t}const a=o("JsonParseError"),c=o("JsonParseAfterRedirectError"),l=o("Api404Error"),u=o("Api404AfterRedirectError"),d=o("FetchNetworkError");const p=new function(e,t){let n=e,o={"X-WP-Nonce":t},a={credentials:"same-origin",headers:o},c={method:"post",credentials:"same-origin",headers:(0,r.assign)({},o,{"Content-type":"application/json"})},l=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",r=n.length?n.split("&"):[];return r.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+r.join("&")};const u={setApiRoot(e){n=e},setApiNonce(e){o={"X-WP-Nonce":e},a={credentials:"same-origin",headers:o},c={method:"post",credentials:"same-origin",headers:(0,r.assign)({},o,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{l=e},registerSite:(e,t)=>{const r={registration_nonce:e,no_iframe:!0};return(0,i.jetpackConfigHas)("consumer_slug")&&(r.plugin_slug=(0,i.jetpackConfigGet)("consumer_slug")),null!==t&&(r.redirect_uri=t),p(`${n}jetpack/v4/connection/register`,c,{body:JSON.stringify(r)}).then(h).then(m)},fetchAuthorizationUrl:e=>d((0,s.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),a).then(h).then(m),fetchSiteConnectionData:()=>d(`${n}jetpack/v4/connection/data`,a).then(m),fetchSiteConnectionStatus:()=>d(`${n}jetpack/v4/connection`,a).then(m),fetchSiteConnectionTest:()=>d(`${n}jetpack/v4/connection/test`,a).then(h).then(m),fetchUserConnectionData:()=>d(`${n}jetpack/v4/connection/data`,a).then(m),fetchUserTrackingSettings:()=>d(`${n}jetpack/v4/tracking/settings`,a).then(h).then(m),updateUserTrackingSettings:e=>p(`${n}jetpack/v4/tracking/settings`,c,{body:JSON.stringify(e)}).then(h).then(m),disconnectSite:()=>p(`${n}jetpack/v4/connection`,c,{body:JSON.stringify({isActive:!1})}).then(h).then(m),fetchConnectUrl:()=>d(`${n}jetpack/v4/connection/url`,a).then(h).then(m),unlinkUser:()=>p(`${n}jetpack/v4/connection/user`,c,{body:JSON.stringify({linked:!1})}).then(h).then(m),reconnect:()=>p(`${n}jetpack/v4/connection/reconnect`,c).then(h).then(m),fetchConnectedPlugins:()=>d(`${n}jetpack/v4/connection/plugins`,a).then(h).then(m),setHasSeenWCConnectionModal:()=>p(`${n}jetpack/v4/seen-wc-connection-modal`,c).then(h).then(m),fetchModules:()=>d(`${n}jetpack/v4/module/all`,a).then(h).then(m),fetchModule:e=>d(`${n}jetpack/v4/module/${e}`,a).then(h).then(m),activateModule:e=>p(`${n}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!0})}).then(h).then(m),deactivateModule:e=>p(`${n}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>p(`${n}jetpack/v4/module/${e}`,c,{body:JSON.stringify(t)}).then(h).then(m),updateSettings:e=>p(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(h).then(m),getProtectCount:()=>d(`${n}jetpack/v4/module/protect/data`,a).then(h).then(m),resetOptions:e=>p(`${n}jetpack/v4/options/${e}`,c,{body:JSON.stringify({reset:!0})}).then(h).then(m),activateVaultPress:()=>p(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(h).then(m),getVaultPressData:()=>d(`${n}jetpack/v4/module/vaultpress/data`,a).then(h).then(m),installPlugin:(e,t)=>{const r={slug:e,status:"active"};return t&&(r.source=t),p(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify(r)}).then(h).then(m)},activateAkismet:()=>p(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(h).then(m),getAkismetData:()=>d(`${n}jetpack/v4/module/akismet/data`,a).then(h).then(m),checkAkismetKey:()=>d(`${n}jetpack/v4/module/akismet/key/check`,a).then(h).then(m),checkAkismetKeyTyped:e=>p(`${n}jetpack/v4/module/akismet/key/check`,c,{body:JSON.stringify({api_key:e})}).then(h).then(m),fetchStatsData:e=>d(function(e){let t=`${n}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),a).then(h).then(m).then(g),getPluginUpdates:()=>d(`${n}jetpack/v4/updates/plugins`,a).then(h).then(m),getPlans:()=>d(`${n}jetpack/v4/plans`,a).then(h).then(m),fetchSettings:()=>d(`${n}jetpack/v4/settings`,a).then(h).then(m),updateSetting:e=>p(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(h).then(m),fetchSiteData:()=>d(`${n}jetpack/v4/site`,a).then(h).then(m).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>d(`${n}jetpack/v4/site/features`,a).then(h).then(m).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>d(`${n}jetpack/v4/site/products`,a).then(h).then(m),fetchSitePurchases:()=>d(`${n}jetpack/v4/site/purchases`,a).then(h).then(m).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>d(`${n}jetpack/v4/site/benefits`,a).then(h).then(m).then((e=>JSON.parse(e.data))),fetchSetupQuestionnaire:()=>d(`${n}jetpack/v4/setup/questionnaire`,a).then(h).then(m),fetchRecommendationsData:()=>d(`${n}jetpack/v4/recommendations/data`,a).then(h).then(m),fetchRecommendationsProductSuggestions:()=>d(`${n}jetpack/v4/recommendations/product-suggestions`,a).then(h).then(m),fetchRecommendationsUpsell:()=>d(`${n}jetpack/v4/recommendations/upsell`,a).then(h).then(m),saveRecommendationsData:e=>p(`${n}jetpack/v4/recommendations/data`,c,{body:JSON.stringify({data:e})}).then(h),fetchProducts:()=>d(`${n}jetpack/v4/products`,a).then(h).then(m),fetchRewindStatus:()=>d(`${n}jetpack/v4/rewind`,a).then(h).then(m).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>d(`${n}jetpack/v4/scan`,a).then(h).then(m).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>p(`${n}jetpack/v4/notice/${e}`,c,{body:JSON.stringify({dismissed:!0})}).then(h).then(m),fetchPluginsData:()=>d(`${n}jetpack/v4/plugins`,a).then(h).then(m),fetchVerifySiteGoogleStatus:e=>d(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,a).then(h).then(m),verifySiteGoogle:e=>p(`${n}jetpack/v4/verify-site/google`,c,{body:JSON.stringify({keyring_id:e})}).then(h).then(m),sendMobileLoginEmail:()=>p(`${n}jetpack/v4/mobile/send-login-email`,c).then(h).then(m),submitSurvey:e=>p(`${n}jetpack/v4/marketing/survey`,c,{body:JSON.stringify(e)}).then(h).then(m),saveSetupQuestionnaire:e=>p(`${n}jetpack/v4/setup/questionnaire`,c,{body:JSON.stringify(e)}).then(h).then(m),updateLicensingError:e=>p(`${n}jetpack/v4/licensing/error`,c,{body:JSON.stringify(e)}).then(h).then(m),updateLicenseKey:e=>p(`${n}jetpack/v4/licensing/set-license`,c,{body:JSON.stringify({license:e})}).then(h).then(m),getUserLicensesCounts:()=>d(`${n}jetpack/v4/licensing/user/counts`,a).then(h).then(m),updateLicensingActivationNoticeDismiss:e=>p(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,c,{body:JSON.stringify({last_detached_count:e})}).then(h).then(m),updateRecommendationsStep:e=>p(`${n}jetpack/v4/recommendations/step`,c,{body:JSON.stringify({step:e})}).then(h),confirmIDCSafeMode:()=>p(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,c).then(h),startIDCFresh:e=>p(`${n}jetpack/v4/identity-crisis/start-fresh`,c,{body:JSON.stringify({redirect_uri:e})}).then(h).then(m),migrateIDC:()=>p(`${n}jetpack/v4/identity-crisis/migrate`,c).then(h),attachLicenses:e=>p(`${n}jetpack/v4/licensing/attach-licenses`,c,{body:JSON.stringify({licenses:e})}).then(h).then(m),fetchSearchPlanInfo:()=>d(`${n}jetpack/v4/search/plan`,a).then(h).then(m),fetchSearchSettings:()=>d(`${n}jetpack/v4/search/settings`,a).then(h).then(m),updateSearchSettings:e=>p(`${n}jetpack/v4/search/settings`,c,{body:JSON.stringify(e)}).then(h).then(m)};function d(e,t){return fetch(l(e),t)}function p(e,t,n){return fetch(e,(0,r.assign)({},t,n)).catch(f)}function g(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}(0,r.assign)(this,u)};function h(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new u(e.redirected):new l})):e.json().catch((e=>g(e))).then((t=>{const n=new Error(`${t.message} (Status ${e.status})`);throw n.response=t,n.name="ApiError",n}))}function m(e){return e.json().catch((t=>g(t,e.redirected,e.url)))}function g(e,t,n){throw t?new c(n):new a}function f(){throw new d}t.ZP=p},1546:function(e,t,n){"use strict";var r=n(9183),s=n.n(r),i=n(7538),o=n.n(i),a=n(1268),c=n.n(a),l=n(9196),u=n.n(l),d=n(9105),p=n.n(d),h=n(5736);const __=h.__;class m extends u().Component{render(){const{logoColor:e,showText:t,className:n,...r}=this.props,i=t?"0 0 118 32":"0 0 32 32";return u().createElement("svg",s()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:i,className:p()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title"},r),u().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-idc")),u().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&u().createElement(l.Fragment,null,u().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),u().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),u().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),u().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),u().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),u().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),u().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}o()(m,"propTypes",{className:c().string,width:c().number,height:c().number,showText:c().bool,logoColor:c().string}),o()(m,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"}),t.Z=m},7262:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(1268),o=n.n(i);n(6212);const a=e=>{const t=e.className+" jp-components-spinner",n={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},r={borderTopColor:e.color,borderRightColor:e.color};return s().createElement("div",{className:t},s().createElement("div",{className:"jp-components-spinner__outer",style:n},s().createElement("div",{className:"jp-components-spinner__inner",style:r})))};a.propTypes={color:o().string,className:o().string,size:o().number},a.defaultProps={color:"#FFFFFF",className:"",size:20},t.Z=a},1415:function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let r;if("undefined"!=typeof window&&(r=window.Initial_State?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);Object.keys(t).map((e=>{n[e]=encodeURIComponent(t[e])})),!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),r&&(n.calypso_env=r);const s=Object.keys(n).map((e=>e+"="+n[e])).join("&");return"https://jetpack.com/redirect/?"+s}n.d(t,{Z:function(){return r}})},6251:function(e,t,n){let r={};try{r=n(8510)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),r={missingConfig:!0}}const s=e=>r.hasOwnProperty(e);e.exports={jetpackConfigHas:s,jetpackConfigGet:e=>{if(!s(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return r[e]}}},7226:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(1268),o=n.n(i),a=n(5609),c=n(9818),l=n(9307),u=n(5736),d=n(1415),p=n(7262),h=n(7619),m=n(2690),g=n(2665),f=n(8086);const __=u.__,C=e=>{const{isStartingFresh:t,startFreshCallback:n,customContent:r,hasError:i}=e,o=(0,m.Z)(e.wpcomHomeUrl),g=(0,m.Z)(e.currentUrl),C=(0,c.useSelect)((e=>e(h.t).getIsActionInProgress()),[]),y=__("Create a fresh connection","jetpack-idc");return s().createElement("div",{className:"jp-idc__idc-screen__card-action-base"+(i?" jp-idc__idc-screen__card-action-error":"")},s().createElement("div",{className:"jp-idc__idc-screen__card-action-top"},s().createElement("h4",null,r.startFreshCardTitle||__("Treat each site as independent sites","jetpack-idc")),s().createElement("p",null,r.startFreshCardBodyText||(0,l.createInterpolateElement)((0,u.sprintf)( +!function(){var e={8294:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},2402:function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5235:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=s.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var o in n)r.call(n,o)&&n[o]&&e.push(o);else e.push(n.toString())}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(n=function(){return s}.apply(t,[]))||(e.exports=n)}()},951:function(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(s=r))})),t.splice(s,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(1741)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},1741:function(e,t,n){e.exports=function(e){function t(e){let n,s,i,a=null;function o(...e){if(!o.enabled)return;const r=o,s=Number(new Date),i=s-(n||s);r.diff=i,r.prev=n,r.curr=s,n=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,s)=>{if("%%"===n)return"%";a++;const i=t.formatters[s];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return o.namespace=e,o.useColors=t.useColors(),o.color=t.selectColor(e),o.extend=r,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(s!==t.namespaces&&(s=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(o),o}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(s),...t.skips.map(s).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),s=r.length;for(n=0;n<s;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(3171),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},1683:function(){},6611:function(){},7724:function(){},310:function(){},3171:function(e){var t=1e3,n=60*t,r=60*n,s=24*r,i=7*s,a=365.25*s;function o(e,t,n,r){var s=t>=1.5*n;return Math.round(e/n)+" "+r+(s?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!o)return;var c=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*a;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*s;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var i=Math.abs(e);if(i>=s)return o(e,i,s,"day");if(i>=r)return o(e,i,r,"hour");if(i>=n)return o(e,i,n,"minute");if(i>=t)return o(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=s)return Math.round(e/s)+"d";if(i>=r)return Math.round(e/r)+"h";if(i>=n)return Math.round(e/n)+"m";if(i>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},469:function(e,t,n){"use strict";var r=n(758);function s(){}function i(){}i.resetWarningCache=s,e.exports=function(){function e(e,t,n,s,i,a){if(a!==r){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:s};return n.PropTypes=n,n}},5162:function(e,t,n){e.exports=n(469)()},758:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6975:function(e,t,n){"use strict";var r=n(951),s=n.n(r),i=n(2819);const a=s()("dops:analytics");let o,c;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const l={initialize:function(e,t,n){l.setUser(e,t),l.setSuperProps(n),l.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){c={ID:e,username:t}},setSuperProps:function(e){o=e},assignSuperProps:function(e){o=(0,i.assign)(o,e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);a("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);l.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);a("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('Built stat "%s" in group "%s"',t,e);return n}(e,t);l.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){l.tracks.recordPageView(e),l.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,s,i,a){l.ga.recordPurchase(e,t,n,r,s,i,a)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(o&&(a("- Super Props: %o",o),t=(0,i.assign)(t,o)),a('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):a('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};l.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){l.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){a("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};l.ga.initialized||(c&&(e={userId:"u-"+c.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),l.ga.initialized=!0)},recordPageView:function(e,t){l.ga.initialize(),a("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){l.ga.initialize();let s="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(s+=" [Option Label: "+n+"]"),void 0!==r&&(s+=" [Option Value: "+r+"]"),a(s),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,s,i,a){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:a}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:s,quantity:i}),window.ga("ecommerce:send")}},identifyUser:function(){c&&window._tkq.push(["identifyUser",c.ID,c.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};t.Z=l},4743:function(e,t,n){"use strict";var r=n(2819),s=n(6483),i=n(1132);function a(e){class t extends Error{constructor(){super(...arguments),this.name=e}}return t}const o=a("JsonParseError"),c=a("JsonParseAfterRedirectError"),l=a("Api404Error"),u=a("Api404AfterRedirectError"),d=a("FetchNetworkError");const p=new function(e,t){let n=e,a={"X-WP-Nonce":t},o={credentials:"same-origin",headers:a},c={method:"post",credentials:"same-origin",headers:(0,r.assign)({},a,{"Content-type":"application/json"})},l=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",r=n.length?n.split("&"):[];return r.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+r.join("&")};const u={setApiRoot(e){n=e},setApiNonce(e){a={"X-WP-Nonce":e},o={credentials:"same-origin",headers:a},c={method:"post",credentials:"same-origin",headers:(0,r.assign)({},a,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{l=e},registerSite:(e,t)=>{const r={registration_nonce:e,no_iframe:!0};return(0,i.jetpackConfigHas)("consumer_slug")&&(r.plugin_slug=(0,i.jetpackConfigGet)("consumer_slug")),null!==t&&(r.redirect_uri=t),p(`${n}jetpack/v4/connection/register`,c,{body:JSON.stringify(r)}).then(m).then(h)},fetchAuthorizationUrl:e=>d((0,s.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),o).then(m).then(h),fetchSiteConnectionData:()=>d(`${n}jetpack/v4/connection/data`,o).then(h),fetchSiteConnectionStatus:()=>d(`${n}jetpack/v4/connection`,o).then(h),fetchSiteConnectionTest:()=>d(`${n}jetpack/v4/connection/test`,o).then(m).then(h),fetchUserConnectionData:()=>d(`${n}jetpack/v4/connection/data`,o).then(h),fetchUserTrackingSettings:()=>d(`${n}jetpack/v4/tracking/settings`,o).then(m).then(h),updateUserTrackingSettings:e=>p(`${n}jetpack/v4/tracking/settings`,c,{body:JSON.stringify(e)}).then(m).then(h),disconnectSite:()=>p(`${n}jetpack/v4/connection`,c,{body:JSON.stringify({isActive:!1})}).then(m).then(h),fetchConnectUrl:()=>d(`${n}jetpack/v4/connection/url`,o).then(m).then(h),unlinkUser:()=>p(`${n}jetpack/v4/connection/user`,c,{body:JSON.stringify({linked:!1})}).then(m).then(h),reconnect:()=>p(`${n}jetpack/v4/connection/reconnect`,c).then(m).then(h),fetchConnectedPlugins:()=>d(`${n}jetpack/v4/connection/plugins`,o).then(m).then(h),setHasSeenWCConnectionModal:()=>p(`${n}jetpack/v4/seen-wc-connection-modal`,c).then(m).then(h),fetchModules:()=>d(`${n}jetpack/v4/module/all`,o).then(m).then(h),fetchModule:e=>d(`${n}jetpack/v4/module/${e}`,o).then(m).then(h),activateModule:e=>p(`${n}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!0})}).then(m).then(h),deactivateModule:e=>p(`${n}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>p(`${n}jetpack/v4/module/${e}`,c,{body:JSON.stringify(t)}).then(m).then(h),updateSettings:e=>p(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(m).then(h),getProtectCount:()=>d(`${n}jetpack/v4/module/protect/data`,o).then(m).then(h),resetOptions:e=>p(`${n}jetpack/v4/options/${e}`,c,{body:JSON.stringify({reset:!0})}).then(m).then(h),activateVaultPress:()=>p(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(m).then(h),getVaultPressData:()=>d(`${n}jetpack/v4/module/vaultpress/data`,o).then(m).then(h),installPlugin:(e,t)=>{const r={slug:e,status:"active"};return t&&(r.source=t),p(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify(r)}).then(m).then(h)},activateAkismet:()=>p(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(m).then(h),getAkismetData:()=>d(`${n}jetpack/v4/module/akismet/data`,o).then(m).then(h),checkAkismetKey:()=>d(`${n}jetpack/v4/module/akismet/key/check`,o).then(m).then(h),checkAkismetKeyTyped:e=>p(`${n}jetpack/v4/module/akismet/key/check`,c,{body:JSON.stringify({api_key:e})}).then(m).then(h),fetchStatsData:e=>d(function(e){let t=`${n}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),o).then(m).then(h).then(g),getPluginUpdates:()=>d(`${n}jetpack/v4/updates/plugins`,o).then(m).then(h),getPlans:()=>d(`${n}jetpack/v4/plans`,o).then(m).then(h),fetchSettings:()=>d(`${n}jetpack/v4/settings`,o).then(m).then(h),updateSetting:e=>p(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(m).then(h),fetchSiteData:()=>d(`${n}jetpack/v4/site`,o).then(m).then(h).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>d(`${n}jetpack/v4/site/features`,o).then(m).then(h).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>d(`${n}jetpack/v4/site/products`,o).then(m).then(h),fetchSitePurchases:()=>d(`${n}jetpack/v4/site/purchases`,o).then(m).then(h).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>d(`${n}jetpack/v4/site/benefits`,o).then(m).then(h).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>d(`${n}jetpack/v4/site/discount`,o).then(m).then(h).then((e=>e.data)),fetchSetupQuestionnaire:()=>d(`${n}jetpack/v4/setup/questionnaire`,o).then(m).then(h),fetchRecommendationsData:()=>d(`${n}jetpack/v4/recommendations/data`,o).then(m).then(h),fetchRecommendationsProductSuggestions:()=>d(`${n}jetpack/v4/recommendations/product-suggestions`,o).then(m).then(h),fetchRecommendationsUpsell:()=>d(`${n}jetpack/v4/recommendations/upsell`,o).then(m).then(h),fetchRecommendationsConditional:()=>d(`${n}jetpack/v4/recommendations/conditional`,o).then(m).then(h),saveRecommendationsData:e=>p(`${n}jetpack/v4/recommendations/data`,c,{body:JSON.stringify({data:e})}).then(m),fetchProducts:()=>d(`${n}jetpack/v4/products`,o).then(m).then(h),fetchRewindStatus:()=>d(`${n}jetpack/v4/rewind`,o).then(m).then(h).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>d(`${n}jetpack/v4/scan`,o).then(m).then(h).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>p(`${n}jetpack/v4/notice/${e}`,c,{body:JSON.stringify({dismissed:!0})}).then(m).then(h),fetchPluginsData:()=>d(`${n}jetpack/v4/plugins`,o).then(m).then(h),fetchIntroOffers:()=>d(`${n}jetpack/v4/intro-offers`,o).then(m).then(h),fetchVerifySiteGoogleStatus:e=>d(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,o).then(m).then(h),verifySiteGoogle:e=>p(`${n}jetpack/v4/verify-site/google`,c,{body:JSON.stringify({keyring_id:e})}).then(m).then(h),sendMobileLoginEmail:()=>p(`${n}jetpack/v4/mobile/send-login-email`,c).then(m).then(h),submitSurvey:e=>p(`${n}jetpack/v4/marketing/survey`,c,{body:JSON.stringify(e)}).then(m).then(h),saveSetupQuestionnaire:e=>p(`${n}jetpack/v4/setup/questionnaire`,c,{body:JSON.stringify(e)}).then(m).then(h),updateLicensingError:e=>p(`${n}jetpack/v4/licensing/error`,c,{body:JSON.stringify(e)}).then(m).then(h),updateLicenseKey:e=>p(`${n}jetpack/v4/licensing/set-license`,c,{body:JSON.stringify({license:e})}).then(m).then(h),getUserLicensesCounts:()=>d(`${n}jetpack/v4/licensing/user/counts`,o).then(m).then(h),getUserLicenses:()=>d(`${n}jetpack/v4/licensing/user/licenses`,o).then(m).then(h),updateLicensingActivationNoticeDismiss:e=>p(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,c,{body:JSON.stringify({last_detached_count:e})}).then(m).then(h),updateRecommendationsStep:e=>p(`${n}jetpack/v4/recommendations/step`,c,{body:JSON.stringify({step:e})}).then(m),confirmIDCSafeMode:()=>p(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,c).then(m),startIDCFresh:e=>p(`${n}jetpack/v4/identity-crisis/start-fresh`,c,{body:JSON.stringify({redirect_uri:e})}).then(m).then(h),migrateIDC:()=>p(`${n}jetpack/v4/identity-crisis/migrate`,c).then(m),attachLicenses:e=>p(`${n}jetpack/v4/licensing/attach-licenses`,c,{body:JSON.stringify({licenses:e})}).then(m).then(h),fetchSearchPlanInfo:()=>d(`${n}jetpack/v4/search/plan`,o).then(m).then(h),fetchSearchSettings:()=>d(`${n}jetpack/v4/search/settings`,o).then(m).then(h),updateSearchSettings:e=>p(`${n}jetpack/v4/search/settings`,c,{body:JSON.stringify(e)}).then(m).then(h),fetchSearchStats:()=>d(`${n}jetpack/v4/search/stats`,o).then(m).then(h),fetchWafSettings:()=>d(`${n}jetpack/v4/waf`,o).then(m).then(h),fetchWordAdsSettings:()=>d(`${n}jetpack/v4/wordads/settings`,o).then(m).then(h),updateWordAdsSettings:e=>p(`${n}jetpack/v4/wordads/settings`,c,{body:JSON.stringify(e)}),fetchSearchPricing:()=>d(`${n}jetpack/v4/search/pricing`,o).then(m).then(h)};function d(e,t){return fetch(l(e),t)}function p(e,t,n){return fetch(e,(0,r.assign)({},t,n)).catch(f)}function g(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}(0,r.assign)(this,u)};function m(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new u(e.redirected):new l})):e.json().catch((e=>g(e))).then((t=>{const n=new Error(`${t.message} (Status ${e.status})`);throw n.response=t,n.name="ApiError",n}))}function h(e){return e.json().catch((t=>g(t,e.redirected,e.url)))}function g(e,t,n){throw t?new c(n):new o}function f(){throw new d}t.ZP=p},1202:function(e,t,n){"use strict";var r=n(2402),s=n.n(r),i=n(8294),a=n.n(i),o=n(5162),c=n.n(o),l=n(9196),u=n.n(l),d=n(5235),p=n.n(d),m=n(5736);const __=m.__;class h extends u().Component{render(){const{logoColor:e,showText:t,className:n,...r}=this.props,i=t?"0 0 118 32":"0 0 32 32";return u().createElement("svg",s()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:i,className:p()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title"},r),u().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-idc")),u().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&u().createElement(l.Fragment,null,u().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),u().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),u().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),u().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),u().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),u().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),u().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}a()(h,"propTypes",{className:c().string,width:c().number,height:c().number,showText:c().bool,logoColor:c().string}),a()(h,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"}),t.Z=h},5033:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(5162),a=n.n(i);n(1683);const o=e=>{const t=e.className+" jp-components-spinner",n={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},r={borderTopColor:e.color,borderRightColor:e.color};return s().createElement("div",{className:t},s().createElement("div",{className:"jp-components-spinner__outer",style:n},s().createElement("div",{className:"jp-components-spinner__inner",style:r})))};o.propTypes={color:a().string,className:a().string,size:a().number},o.defaultProps={color:"#FFFFFF",className:"",size:20},t.Z=o},6324:function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let r;var s;"undefined"!=typeof window&&(r=null===(s=window.Initial_State)||void 0===s?void 0:s.calypsoEnv);if(0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);Object.keys(t).map((e=>{n[e]=encodeURIComponent(t[e])})),!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),r&&(n.calypso_env=r);const i=Object.keys(n).map((e=>e+"="+n[e])).join("&");return"https://jetpack.com/redirect/?"+i}n.d(t,{Z:function(){return r}})},1132:function(e,t,n){let r={};try{r=n(8510)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),r={missingConfig:!0}}const s=e=>r.hasOwnProperty(e);e.exports={jetpackConfigHas:s,jetpackConfigGet:e=>{if(!s(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return r[e]}}},9477:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(5162),a=n.n(i),o=n(5609),c=n(9818),l=n(9307),u=n(5736),d=n(6324),p=n(5033),m=n(2678),h=n(2115),g=n(7144),f=n(6637);const __=u.__,y=e=>{const{isStartingFresh:t,startFreshCallback:n,customContent:r,hasError:i}=e,a=(0,h.Z)(e.wpcomHomeUrl),g=(0,h.Z)(e.currentUrl),y=(0,c.useSelect)((e=>e(m.t).getIsActionInProgress()),[]),k=r.startFreshButtonLabel||__("Create a fresh connection","jetpack-idc");return s().createElement("div",{className:"jp-idc__idc-screen__card-action-base"+(i?" jp-idc__idc-screen__card-action-error":"")},s().createElement("div",{className:"jp-idc__idc-screen__card-action-top"},s().createElement("h4",null,r.startFreshCardTitle?(0,l.createInterpolateElement)(r.startFreshCardTitle,{em:s().createElement("em",null)}):__("Treat each site as independent sites","jetpack-idc")),s().createElement("p",null,(0,l.createInterpolateElement)(r.startFreshCardBodyText||(0,u.sprintf)( /* translators: %1$s: The current site domain name. %2$s: The original site domain name. */ -__("<hostname>%1$s</hostname> settings, stats, and subscribers will start fresh. <hostname>%2$s</hostname> will keep its data as is.","jetpack-idc"),g,o),{hostname:s().createElement("strong",null)}))),s().createElement("div",{className:"jp-idc__idc-screen__card-action-bottom"},s().createElement("div",{className:"jp-idc__idc-screen__card-action-sitename"},o),s().createElement(a.Dashicon,{icon:"minus",className:"jp-idc__idc-screen__card-action-separator"}),s().createElement("div",{className:"jp-idc__idc-screen__card-action-sitename"},g),s().createElement(a.Button,{className:"jp-idc__idc-screen__card-action-button",label:y,onClick:n,disabled:C},t?s().createElement(p.Z,null):y),i&&s().createElement(f.Z,null,(0,l.createInterpolateElement)(__("Could not create the connection. Retry or find out more <a>here</a>.","jetpack-idc"),{a:s().createElement("a",{href:(0,d.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"})}))))};C.propTypes={wpcomHomeUrl:o().string.isRequired,currentUrl:o().string.isRequired,isStartingFresh:o().bool.isRequired,startFreshCallback:o().func.isRequired,customContent:o().shape(g.Z),hasError:o().bool.isRequired},C.defaultProps={isStartingFresh:!1,startFreshCallback:()=>{},customContent:{},hasError:!1},t.Z=C},3023:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(1268),o=n.n(i),a=n(5609),c=n(9818),l=n(9307),u=n(5736),d=n(1415),p=n(7262),h=n(7619),m=n(2690),g=n(2665),f=n(8086);const __=u.__,C=e=>{const t=(0,m.Z)(e.wpcomHomeUrl),n=(0,m.Z)(e.currentUrl),r=(0,c.useSelect)((e=>e(h.t).getIsActionInProgress()),[]),{isMigrating:i,migrateCallback:o,customContent:g,hasError:C}=e,y=__("Move your settings","jetpack-idc");return s().createElement("div",{className:"jp-idc__idc-screen__card-action-base"+(C?" jp-idc__idc-screen__card-action-error":"")},s().createElement("div",{className:"jp-idc__idc-screen__card-action-top"},s().createElement("h4",null,g.migrateCardTitle||__("Move Jetpack data","jetpack-idc")),s().createElement("p",null,g.migrateCardBodyText||(0,l.createInterpolateElement)((0,u.sprintf)( +__("<hostname>%1$s</hostname> settings, stats, and subscribers will start fresh. <hostname>%2$s</hostname> will keep its data as is.","jetpack-idc"),g,a),{hostname:s().createElement("strong",null),em:s().createElement("em",null),strong:s().createElement("strong",null)}))),s().createElement("div",{className:"jp-idc__idc-screen__card-action-bottom"},s().createElement("div",{className:"jp-idc__idc-screen__card-action-sitename"},a),s().createElement(o.Dashicon,{icon:"minus",className:"jp-idc__idc-screen__card-action-separator"}),s().createElement("div",{className:"jp-idc__idc-screen__card-action-sitename"},g),s().createElement(o.Button,{className:"jp-idc__idc-screen__card-action-button",label:k,onClick:n,disabled:y},t?s().createElement(p.Z,null):k),i&&(C=r.supportURL,s().createElement(f.Z,null,(0,l.createInterpolateElement)(__("Could not create the connection. Retry or find out more <a>here</a>.","jetpack-idc"),{a:s().createElement("a",{href:C||(0,d.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"})})))));var C};y.propTypes={wpcomHomeUrl:a().string.isRequired,currentUrl:a().string.isRequired,isStartingFresh:a().bool.isRequired,startFreshCallback:a().func.isRequired,customContent:a().shape(g.Z),hasError:a().bool.isRequired},y.defaultProps={isStartingFresh:!1,startFreshCallback:()=>{},customContent:{},hasError:!1},t.Z=y},6596:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(5162),a=n.n(i),o=n(5609),c=n(9818),l=n(9307),u=n(5736),d=n(6324),p=n(5033),m=n(2678),h=n(2115),g=n(7144),f=n(6637);const __=u.__,y=e=>{const t=(0,h.Z)(e.wpcomHomeUrl),n=(0,h.Z)(e.currentUrl),r=(0,c.useSelect)((e=>e(m.t).getIsActionInProgress()),[]),{isMigrating:i,migrateCallback:a,customContent:g,hasError:y}=e,k=g.migrateButtonLabel||__("Move your settings","jetpack-idc");return s().createElement("div",{className:"jp-idc__idc-screen__card-action-base"+(y?" jp-idc__idc-screen__card-action-error":"")},s().createElement("div",{className:"jp-idc__idc-screen__card-action-top"},s().createElement("h4",null,g.migrateCardTitle?(0,l.createInterpolateElement)(g.migrateCardTitle,{em:s().createElement("em",null)}):__("Move Jetpack data","jetpack-idc")),s().createElement("p",null,(0,l.createInterpolateElement)(g.migrateCardBodyText||(0,u.sprintf)( /* translators: %1$s: The current site domain name. %2$s: The original site domain name. */ -__("Move all your settings, stats and subscribers to your other URL, <hostname>%1$s</hostname>. <hostname>%2$s</hostname> will be disconnected from Jetpack.","jetpack-idc"),n,t),{hostname:s().createElement("strong",null)}))),s().createElement("div",{className:"jp-idc__idc-screen__card-action-bottom"},s().createElement("div",{className:"jp-idc__idc-screen__card-action-sitename"},t),s().createElement(a.Dashicon,{icon:"arrow-down-alt",className:"jp-idc__idc-screen__card-action-separator"}),s().createElement("div",{className:"jp-idc__idc-screen__card-action-sitename"},n),s().createElement(a.Button,{className:"jp-idc__idc-screen__card-action-button",label:y,onClick:o,disabled:r},i?s().createElement(p.Z,null):y),C&&s().createElement(f.Z,null,(0,l.createInterpolateElement)(__("Could not move your settings. Retry or find out more <a>here</a>.","jetpack-idc"),{a:s().createElement("a",{href:(0,d.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"})}))))};C.propTypes={wpcomHomeUrl:o().string.isRequired,currentUrl:o().string.isRequired,isMigrating:o().bool.isRequired,migrateCallback:o().func.isRequired,customContent:o().shape(g.Z),hasError:o().bool.isRequired},C.defaultProps={isMigrating:!1,migrateCallback:()=>{},customContent:{},hasError:!1},t.Z=C},7090:function(e,t,n){"use strict";var r=n(9196),s=n.n(r);t.Z=()=>s().createElement("svg",{className:"error-gridicon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:24},s().createElement("rect",{x:"0",fill:"none",width:"24",height:"24"}),s().createElement("g",null,s().createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))},8086:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(7090);n(4943);t.Z=e=>{const{children:t}=e;return s().createElement("div",{className:"jp-idc__error-message"},s().createElement(i.Z,null),s().createElement("span",null,t))}},5643:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(1268),o=n.n(i),a=n(816),c=n(9570),l=n(9818),u=n(7436),d=n(5853),p=n(463),h=n(8970),m=n(1517),g=n(2665),f=n(7619);const C=e=>{const{logo:t,customContent:n,wpcomHomeUrl:i,currentUrl:o,apiNonce:g,apiRoot:C,redirectUri:y,tracksUserData:k,tracksEventData:_,isAdmin:v}=e,[w,b]=(0,r.useState)(!1),E=(0,l.useSelect)((e=>e(f.t).getErrorType()),[]),{isMigrating:j,migrateCallback:S}=(0,p.Z)((0,r.useCallback)((()=>{b(!0)}),[b])),{isStartingFresh:F,startFreshCallback:I}=(0,m.Z)(y),{isFinishingMigration:R,finishMigrationCallback:P}=(0,h.Z)();return(0,r.useEffect)((()=>{c.ZP.setApiRoot(C),c.ZP.setApiNonce(g),k&&k.hasOwnProperty("userid")&&k.hasOwnProperty("username")&&a.Z.initialize(k.userid,k.username),_&&(_.hasOwnProperty("isAdmin")&&_.isAdmin?(0,d.Z)("notice_view"):(0,d.Z)("non_admin_notice_view",{page:!!_.hasOwnProperty("currentScreen")&&_.currentScreen}))}),[C,g,k,_]),s().createElement(u.Z,{logo:t,customContent:n,wpcomHomeUrl:i,currentUrl:o,redirectUri:y,isMigrating:j,migrateCallback:S,isMigrated:w,finishMigrationCallback:P,isFinishingMigration:R,isStartingFresh:F,startFreshCallback:I,isAdmin:v,hasStaySafeError:"safe-mode"===E,hasFreshError:"start-fresh"===E,hasMigrateError:"migrate"===E})};C.propTypes={logo:o().object,customContent:o().shape(g.Z),wpcomHomeUrl:o().string.isRequired,currentUrl:o().string.isRequired,redirectUri:o().string.isRequired,apiRoot:o().string.isRequired,apiNonce:o().string.isRequired,tracksUserData:o().object,tracksEventData:o().object,isAdmin:o().bool.isRequired},C.defaultProps={customContent:{}},t.Z=C},2027:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(1268),o=n.n(i),a=n(9307),c=n(5736),l=n(1415),u=n(3023),d=n(7226),p=n(1693),h=n(2665);const __=c.__,m=e=>{const{wpcomHomeUrl:t,currentUrl:n,isMigrating:r,migrateCallback:i,isStartingFresh:o,startFreshCallback:c,customContent:h,hasMigrateError:m,hasFreshError:g,hasStaySafeError:f}=e;return s().createElement(s().Fragment,null,s().createElement("h2",null,h.mainTitle||__("Safe Mode has been activated","jetpack-idc")),s().createElement("p",null,h.mainBodyText||(0,a.createInterpolateElement)(__("Your site is in Safe Mode because you have 2 Jetpack-powered sites that appear to be duplicates. 2 sites that are telling Jetpack they’re the same site. <safeModeLink>Learn more about safe mode.</safeModeLink>","jetpack-idc"),{safeModeLink:s().createElement("a",{href:(0,l.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"})})),s().createElement("h3",null,__("Please select an option","jetpack-idc")),s().createElement("div",{className:"jp-idc__idc-screen__cards"+(m||g?" jp-idc__idc-screen__cards-error":"")},s().createElement(u.Z,{wpcomHomeUrl:t,currentUrl:n,isMigrating:r,migrateCallback:i,customContent:h,hasError:m}),s().createElement("div",{className:"jp-idc__idc-screen__cards-separator"},"or"),s().createElement(d.Z,{wpcomHomeUrl:t,currentUrl:n,isStartingFresh:o,startFreshCallback:c,customContent:h,hasError:g})),s().createElement(p.Z,{hasError:f}))};m.propTypes={wpcomHomeUrl:o().string.isRequired,currentUrl:o().string.isRequired,isMigrating:o().bool.isRequired,migrateCallback:o().func,isStartingFresh:o().bool.isRequired,startFreshCallback:o().func,customContent:o().shape(h.Z),hasMigrateError:o().bool.isRequired,hasFreshError:o().bool.isRequired,hasStaySafeError:o().bool.isRequired},m.defaultProps={isMigrating:!1,isStartingFresh:!1,customContent:{},hasMigrateError:!1,hasFreshError:!1,hasStaySafeError:!1},t.Z=m},4642:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(1268),o=n.n(i),a=n(5609),c=n(9307),l=n(5736),u=n(7262),d=n(2690),p=n(2665);const __=l.__,h=e=>{const{finishCallback:t,isFinishing:n,customContent:r}=e,i=(0,d.Z)(e.wpcomHomeUrl),o=(0,d.Z)(e.currentUrl),p=__("Got it, thanks","jetpack-idc");return s().createElement(s().Fragment,null,s().createElement("h2",null,r.migratedTitle||__("Your Jetpack settings have migrated successfully","jetpack-idc")),s().createElement("p",null,r.migratedBodyText||(0,c.createInterpolateElement)((0,l.sprintf)( +__("Move all your settings, stats and subscribers to your other URL, <hostname>%1$s</hostname>. <hostname>%2$s</hostname> will be disconnected from Jetpack.","jetpack-idc"),n,t),{hostname:s().createElement("strong",null),em:s().createElement("em",null),strong:s().createElement("strong",null)}))),s().createElement("div",{className:"jp-idc__idc-screen__card-action-bottom"},s().createElement("div",{className:"jp-idc__idc-screen__card-action-sitename"},t),s().createElement(o.Dashicon,{icon:"arrow-down-alt",className:"jp-idc__idc-screen__card-action-separator"}),s().createElement("div",{className:"jp-idc__idc-screen__card-action-sitename"},n),s().createElement(o.Button,{className:"jp-idc__idc-screen__card-action-button",label:k,onClick:a,disabled:r},i?s().createElement(p.Z,null):k),y&&(C=g.supportURL,s().createElement(f.Z,null,(0,l.createInterpolateElement)(__("Could not move your settings. Retry or find out more <a>here</a>.","jetpack-idc"),{a:s().createElement("a",{href:C||(0,d.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"})})))));var C};y.propTypes={wpcomHomeUrl:a().string.isRequired,currentUrl:a().string.isRequired,isMigrating:a().bool.isRequired,migrateCallback:a().func.isRequired,customContent:a().shape(g.Z),hasError:a().bool.isRequired},y.defaultProps={isMigrating:!1,migrateCallback:()=>{},customContent:{},hasError:!1},t.Z=y},5489:function(e,t,n){"use strict";var r=n(9196),s=n.n(r);t.Z=()=>s().createElement("svg",{className:"error-gridicon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:24},s().createElement("rect",{x:"0",fill:"none",width:"24",height:"24"}),s().createElement("g",null,s().createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))},6637:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(5489);n(6611);t.Z=e=>{const{children:t}=e;return s().createElement("div",{className:"jp-idc__error-message"},s().createElement(i.Z,null),s().createElement("span",null,t))}},7381:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(5162),a=n.n(i),o=n(4743),c=n(9818),l=n(567),u=n(6521),d=n(970),p=n(1272),m=n(3105),h=n(7144),g=n(2678);const f=e=>{const{logo:t,customContent:n,wpcomHomeUrl:i,currentUrl:a,apiNonce:h,apiRoot:f,redirectUri:y,tracksUserData:k,tracksEventData:C,isAdmin:v,possibleDynamicSiteUrlDetected:_}=e,[b,w]=(0,r.useState)(!1),E=(0,c.useSelect)((e=>e(g.t).getErrorType()),[]),{isMigrating:j,migrateCallback:S}=(0,d.Z)((0,r.useCallback)((()=>{w(!0)}),[w])),{isStartingFresh:F,startFreshCallback:I}=(0,m.Z)(y),{isFinishingMigration:U,finishMigrationCallback:R}=(0,p.Z)();return(0,r.useEffect)((()=>{o.ZP.setApiRoot(f),o.ZP.setApiNonce(h),(0,u.M)(C,k),C&&(C.hasOwnProperty("isAdmin")&&C.isAdmin?(0,u.Z)("notice_view"):(0,u.Z)("non_admin_notice_view",{page:!!C.hasOwnProperty("currentScreen")&&C.currentScreen}))}),[f,h,k,C]),s().createElement(l.Z,{logo:t,customContent:n,wpcomHomeUrl:i,currentUrl:a,redirectUri:y,isMigrating:j,migrateCallback:S,isMigrated:b,finishMigrationCallback:R,isFinishingMigration:U,isStartingFresh:F,startFreshCallback:I,isAdmin:v,hasStaySafeError:"safe-mode"===E,hasFreshError:"start-fresh"===E,hasMigrateError:"migrate"===E,possibleDynamicSiteUrlDetected:_})};f.propTypes={logo:a().object,customContent:a().shape(h.Z),wpcomHomeUrl:a().string.isRequired,currentUrl:a().string.isRequired,redirectUri:a().string.isRequired,apiRoot:a().string.isRequired,apiNonce:a().string.isRequired,tracksUserData:a().object,tracksEventData:a().object,isAdmin:a().bool.isRequired,possibleDynamicSiteUrlDetected:a().bool},f.defaultProps={customContent:{}},t.Z=f},5533:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(5162),a=n.n(i),o=n(9307),c=n(5736),l=n(6324),u=n(6596),d=n(9477),p=n(2533),m=n(7144);const __=c.__,h=e=>{const{wpcomHomeUrl:t,currentUrl:n,isMigrating:r,migrateCallback:i,isStartingFresh:a,startFreshCallback:c,customContent:m,hasMigrateError:h,hasFreshError:g,hasStaySafeError:f,possibleDynamicSiteUrlDetected:y}=e;return s().createElement(s().Fragment,null,s().createElement("h2",null,m.mainTitle?(0,o.createInterpolateElement)(m.mainTitle,{em:s().createElement("em",null)}):__("Safe Mode has been activated","jetpack-idc")),s().createElement("p",null,(0,o.createInterpolateElement)(m.mainBodyText||__("Your site is in Safe Mode because you have 2 Jetpack-powered sites that appear to be duplicates. 2 sites that are telling Jetpack they’re the same site. <safeModeLink>Learn more about safe mode.</safeModeLink>","jetpack-idc"),{safeModeLink:s().createElement("a",{href:m.supportURL||(0,l.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"}),em:s().createElement("em",null),strong:s().createElement("strong",null)})),y&&s().createElement("p",null,(0,o.createInterpolateElement)(m.dynamicSiteUrlText||__("<strong>Notice:</strong> It appears that your 'wp-config.php' file might be using dynamic site URL values. Dynamic site URLs could cause Jetpack to enter Safe Mode. <dynamicSiteUrlSupportLink>Learn how to set a static site URL.</dynamicSiteUrlSupportLink>","jetpack-idc"),{dynamicSiteUrlSupportLink:s().createElement("a",{href:m.dynamicSiteUrlSupportLink||(0,l.Z)("jetpack-idcscreen-dynamic-site-urls"),rel:"noopener noreferrer",target:"_blank"}),em:s().createElement("em",null),strong:s().createElement("strong",null)})),s().createElement("h3",null,__("Please select an option","jetpack-idc")),s().createElement("div",{className:"jp-idc__idc-screen__cards"+(h||g?" jp-idc__idc-screen__cards-error":"")},s().createElement(u.Z,{wpcomHomeUrl:t,currentUrl:n,isMigrating:r,migrateCallback:i,customContent:m,hasError:h}),s().createElement("div",{className:"jp-idc__idc-screen__cards-separator"},"or"),s().createElement(d.Z,{wpcomHomeUrl:t,currentUrl:n,isStartingFresh:a,startFreshCallback:c,customContent:m,hasError:g})),s().createElement(p.Z,{hasError:f,customContent:m}))};h.propTypes={wpcomHomeUrl:a().string.isRequired,currentUrl:a().string.isRequired,isMigrating:a().bool.isRequired,migrateCallback:a().func,isStartingFresh:a().bool.isRequired,startFreshCallback:a().func,customContent:a().shape(m.Z),hasMigrateError:a().bool.isRequired,hasFreshError:a().bool.isRequired,hasStaySafeError:a().bool.isRequired,possibleDynamicSiteUrlDetected:a().bool},h.defaultProps={isMigrating:!1,isStartingFresh:!1,customContent:{},hasMigrateError:!1,hasFreshError:!1,hasStaySafeError:!1,possibleDynamicSiteUrlDetected:!1},t.Z=h},1052:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(5162),a=n.n(i),o=n(5609),c=n(9307),l=n(5736),u=n(5033),d=n(2115),p=n(7144);const __=l.__,m=e=>{const{finishCallback:t,isFinishing:n,customContent:r}=e,i=(0,d.Z)(e.wpcomHomeUrl),a=(0,d.Z)(e.currentUrl),p=__("Got it, thanks","jetpack-idc");return s().createElement(s().Fragment,null,s().createElement("h2",null,r.migratedTitle?(0,c.createInterpolateElement)(r.migratedTitle,{em:s().createElement("em",null)}):__("Your Jetpack settings have migrated successfully","jetpack-idc")),s().createElement("p",null,(0,c.createInterpolateElement)(r.migratedBodyText||(0,l.sprintf)( /* translators: %1$s: The current site domain name. */ -__("Safe Mode has been switched off for <hostname>%1$s</hostname> website and Jetpack is fully functional.","jetpack-idc"),o),{hostname:s().createElement("strong",null)})),s().createElement("div",{className:"jp-idc__idc-screen__card-migrated"},s().createElement("div",{className:"jp-idc__idc-screen__card-migrated-hostname"},i),s().createElement(a.Dashicon,{icon:"arrow-down-alt",className:"jp-idc__idc-screen__card-migrated-separator"}),s().createElement(a.Dashicon,{icon:"arrow-right-alt",className:"jp-idc__idc-screen__card-migrated-separator-wide"}),s().createElement("div",{className:"jp-idc__idc-screen__card-migrated-hostname"},o)),s().createElement(a.Button,{className:"jp-idc__idc-screen__card-action-button jp-idc__idc-screen__card-action-button-migrated",onClick:t,label:p},n?s().createElement(u.Z,null):p))};h.propTypes={wpcomHomeUrl:o().string.isRequired,currentUrl:o().string.isRequired,finishCallback:o().func,isFinishing:o().bool.isRequired,customContent:o().shape(p.Z)},h.defaultProps={finishCallback:()=>{},isFinishing:!1,customContent:{}},t.Z=h},4523:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(1268),o=n.n(i),a=n(9307),c=n(5736),l=n(1415),u=n(2665);const __=c.__,d=e=>{const{customContent:t}=e;return s().createElement(s().Fragment,null,s().createElement("h2",null,t.nonAdminTitle||__("Safe Mode has been activated","jetpack-idc")),s().createElement("p",null,t.nonAdminBodyText||(0,a.createInterpolateElement)(__("This site is in Safe Mode because there are 2 Jetpack-powered sites that appear to be duplicates. 2 sites that are telling Jetpack they’re the same site. <safeModeLink>Learn more about safe mode.</safeModeLink>","jetpack-idc"),{safeModeLink:s().createElement("a",{href:(0,l.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"})})),t.nonAdminBodyText?"":s().createElement("p",null,__("An administrator of this site can take Jetpack out of Safe Mode.","jetpack-idc")))};d.propTypes={customContent:o().shape(u.Z)},d.defaultProps={customContent:{}},t.Z=d},7436:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(1268),o=n.n(i),a=n(5736),c=n(1546),l=n(2027),u=n(4523),d=n(4642),p=n(2665);n(8911);const __=a.__,h=e=>{const{logo:t,customContent:n,wpcomHomeUrl:r,currentUrl:i,redirectUri:o,isMigrating:a,migrateCallback:c,isMigrated:p,finishMigrationCallback:h,isFinishingMigration:m,isStartingFresh:g,startFreshCallback:f,isAdmin:C,hasMigrateError:y,hasFreshError:k,hasStaySafeError:_}=e,v=C?"":s().createElement(u.Z,{customContent:n});let w="";return C&&(w=p?s().createElement(d.Z,{wpcomHomeUrl:r,currentUrl:i,finishCallback:h,isFinishing:m,customContent:n}):s().createElement(l.Z,{wpcomHomeUrl:r,currentUrl:i,redirectUri:o,customContent:n,isMigrating:a,migrateCallback:c,isStartingFresh:g,startFreshCallback:f,hasMigrateError:y,hasFreshError:k,hasStaySafeError:_})),s().createElement("div",{className:"jp-idc__idc-screen"+(p?" jp-idc__idc-screen__success":"")},s().createElement("div",{className:"jp-idc__idc-screen__header"},s().createElement("div",{className:"jp-idc__idc-screen__logo"},((e,t)=>"string"==typeof e||e instanceof String?s().createElement("img",{src:e,alt:t,className:"jp-idc__idc-screen__logo-image"}):e)(t,n.logoAlt||"")),s().createElement("div",{className:"jp-idc__idc-screen__logo-label"},n.headerText||__("Safe Mode","jetpack-idc"))),v,w)};h.propTypes={logo:o().object.isRequired,customContent:o().shape(p.Z),wpcomHomeUrl:o().string.isRequired,currentUrl:o().string.isRequired,redirectUri:o().string.isRequired,isMigrating:o().bool.isRequired,migrateCallback:o().func,isMigrated:o().bool.isRequired,finishMigrationCallback:o().func,isFinishingMigration:o().bool.isRequired,isStartingFresh:o().bool.isRequired,startFreshCallback:o().func,isAdmin:o().bool.isRequired,hasMigrateError:o().bool.isRequired,hasFreshError:o().bool.isRequired,hasStaySafeError:o().bool.isRequired},h.defaultProps={logo:s().createElement(c.Z,{height:24}),isMigrated:!1,isFinishingMigration:!1,isMigrating:!1,isStartingFresh:!1,customContent:{},hasMigrateError:!1,hasFreshError:!1,hasStaySafeError:!1},t.Z=h},1693:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(1268),o=n.n(i),a=n(4333),c=n(9818),l=n(9307),u=n(5609),d=n(5736),p=n(6483),h=n(9570),m=n(7262),g=n(1415),f=n(7619),C=n(5853),y=n(8086);n(2780);const __=d.__,k=e=>{const{isActionInProgress:t,setIsActionInProgress:n,setErrorType:i,clearErrorType:o,hasError:a}=e,[c,d]=(0,r.useState)(!1),f=(0,r.useCallback)((()=>{t||(d(!0),n(!0),o(),(0,C.Z)("confirm_safe_mode"),h.ZP.confirmIDCSafeMode().then((()=>{window.location.href=(0,p.removeQueryArgs)(window.location.href,"jetpack_idc_clear_confirmation","_wpnonce")})).catch((e=>{throw n(!1),d(!1),i("safe-mode"),e})))}),[t,n,i,o]);return s().createElement("div",{className:"jp-idc__safe-mode"},c?s().createElement("div",{className:"jp-idc__safe-mode__staying-safe"},s().createElement(m.Z,{color:"black"}),s().createElement("span",null,__("Finishing setting up Safe mode…","jetpack-idc"))):(k=f,_=t,(0,l.createInterpolateElement)(__("Or decide later and stay in <button>Safe mode</button>","jetpack-idc"),{button:s().createElement(u.Button,{label:__("Safe mode","jetpack-idc"),variant:"link",onClick:k,disabled:_})})),a&&s().createElement(y.Z,null,(0,l.createInterpolateElement)(__("Could not stay in safe mode. Retry or find out more <a>here</a>.","jetpack-idc"),{a:s().createElement("a",{href:(0,g.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"})})));var k,_};k.propTypes={isActionInProgress:o().bool,setIsActionInProgress:o().func.isRequired,setErrorType:o().func.isRequired,clearErrorType:o().func.isRequired,hasError:o().bool.isRequired},k.defaultProps={hasError:!1},t.Z=(0,a.compose)([(0,c.withSelect)((e=>({isActionInProgress:e(f.t).getIsActionInProgress()}))),(0,c.withDispatch)((e=>({setIsActionInProgress:e(f.t).setIsActionInProgress,setErrorType:e(f.t).setErrorType,clearErrorType:e(f.t).clearErrorType})))])(k)},8970:function(e,t,n){"use strict";var r=n(9196);t.Z=()=>{const[e,t]=(0,r.useState)(!1),n=(0,r.useCallback)((()=>{e||(t(!0),window.location.reload())}),[e,t]);return{isFinishingMigration:e,finishMigrationCallback:n}}},463:function(e,t,n){"use strict";var r=n(9196),s=n(9818),i=n(9570),o=n(5853),a=n(7619);t.Z=e=>{const[t,n]=(0,r.useState)(!1),c=(0,s.useSelect)((e=>e(a.t).getIsActionInProgress()),[]),{setIsActionInProgress:l,setErrorType:u,clearErrorType:d}=(0,s.useDispatch)(a.t);return{isMigrating:t,migrateCallback:(0,r.useCallback)((()=>{c||((0,o.Z)("migrate"),l(!0),n(!0),d(),i.ZP.migrateIDC().then((()=>{n(!1),e&&"[object Function]"==={}.toString.call(e)&&e()})).catch((e=>{throw l(!1),n(!1),u("migrate"),e})))}),[n,e,c,l,u,d])}}},1517:function(e,t,n){"use strict";var r=n(9196),s=n(9818),i=n(9570),o=n(5853),a=n(7619);t.Z=e=>{const[t,n]=(0,r.useState)(!1),c=(0,s.useSelect)((e=>e(a.t).getIsActionInProgress()),[]),{setIsActionInProgress:l,setErrorType:u,clearErrorType:d}=(0,s.useDispatch)(a.t);return{isStartingFresh:t,startFreshCallback:(0,r.useCallback)((()=>{c||((0,o.Z)("start_fresh"),l(!0),n(!0),d(),i.ZP.startIDCFresh(e).then((e=>{window.location.href=e+"&from=idc-notice"})).catch((e=>{throw l(!1),n(!1),u("start-fresh"),e})))}),[n,c,l,e,u,d])}}},8401:function(e,t,n){"use strict";n.d(t,{hG:function(){return r},vC:function(){return s},jk:function(){return i},ZP:function(){return o}});const r="SET_IS_ACTION_IN_PROGRESS",s="SET_ERROR_TYPE",i="CLEAR_ERROR_TYPE",o={setIsActionInProgress:e=>({type:r,isInProgress:e}),setErrorType:e=>({type:s,errorType:e}),clearErrorType:()=>({type:i})}},2944:function(e,t,n){"use strict";var r=n(9818),s=n(8401);const i=(0,r.combineReducers)({isActionInProgress:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===s.hG?t.isInProgress:e},errorType:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.vC:return t.errorType;case s.jk:return null}return e}});t.Z=i},3642:function(e,t){"use strict";t.Z={getIsActionInProgress:e=>e.isActionInProgress||!1,getErrorType:e=>e.errorType||null}},9520:function(e,t,n){"use strict";var r=n(7538),s=n.n(r),i=n(9818);class o{static mayBeInit(e,t){null===o.store&&(o.store=(0,i.createReduxStore)(e,t),(0,i.register)(o.store))}}s()(o,"store",null),t.Z=o},7619:function(e,t,n){"use strict";n.d(t,{t:function(){return a}});var r=n(2944),s=n(8401),i=n(3642),o=n(9520);const a="jetpack-idc";o.Z.mayBeInit(a,{reducer:r.Z,actions:s.ZP,selectors:i.Z})},2665:function(e,t,n){"use strict";var r=n(1268),s=n.n(r);t.Z={headerText:s().string,logoAlt:s().string,mainTitle:s().string,mainBodyText:s().string,migratedTitle:s().string,migratedBodyText:s().string,migrateCardTitle:s().string,migrateCardBodyText:s().string,startFreshCardTitle:s().string,startFreshCardBodyText:s().string,nonAdminTitle:s().string,nonAdminBodyText:s().string}},2690:function(e,t){"use strict";t.Z=e=>/^https?:\/\//.test(e)?new URL(e).hostname:e.replace(/\/$/,"")},5853:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(816);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0!==t&&"object"==typeof t||(t={}),e&&e.length&&void 0!==r.Z&&r.Z.tracks&&r.Z.mc&&(e=0!==(e=e.replace(/-/g,"_")).indexOf("jetpack_idc_")?"jetpack_idc_"+e:e,r.Z.tracks.recordEvent(e,t),e=(e=e.replace("jetpack_idc_","")).replace(/_/g,"-"),r.Z.mc.bumpStat("jetpack-idc",e))}},8510:function(e){"use strict";if(void 0==={consumer_slug:"identity_crisis"}){var t=new Error('Cannot find module \'{"consumer_slug":"identity_crisis"}\'');throw t.code="MODULE_NOT_FOUND",t}e.exports={consumer_slug:"identity_crisis"}},9196:function(e){"use strict";e.exports=window.React},1850:function(e){"use strict";e.exports=window.ReactDOM},2819:function(e){"use strict";e.exports=window.lodash},5609:function(e){"use strict";e.exports=window.wp.components},4333:function(e){"use strict";e.exports=window.wp.compose},9818:function(e){"use strict";e.exports=window.wp.data},9307:function(e){"use strict";e.exports=window.wp.element},5736:function(e){"use strict";e.exports=window.wp.i18n},6483:function(e){"use strict";e.exports=window.wp.url}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=n(1850),t=n.n(e),r=n(9196),s=n.n(r),i=n(5643);!function(){const e=document.getElementById("jp-identity-crisis-container");if(null===e||!window.hasOwnProperty("JP_IDENTITY_CRISIS__INITIAL_STATE"))return;const{WP_API_root:n,WP_API_nonce:r,wpcomHomeUrl:o,currentUrl:a,redirectUri:c,tracksUserData:l,tracksEventData:u,isSafeModeConfirmed:d,consumerData:p,isAdmin:h}=window.JP_IDENTITY_CRISIS__INITIAL_STATE;d||t().render(s().createElement(i.Z,{wpcomHomeUrl:o,currentUrl:a,apiRoot:n,apiNonce:r,redirectUri:c,tracksUserData:l,tracksEventData:u,customContent:p.hasOwnProperty("customContent")?p.customContent:{},isAdmin:h,logo:p.hasOwnProperty("logo")?p.logo:void 0}),e)}()}()}();
\ No newline at end of file +__("Safe Mode has been switched off for <hostname>%1$s</hostname> website and Jetpack is fully functional.","jetpack-idc"),a),{hostname:s().createElement("strong",null),em:s().createElement("em",null),strong:s().createElement("strong",null)})),s().createElement("div",{className:"jp-idc__idc-screen__card-migrated"},s().createElement("div",{className:"jp-idc__idc-screen__card-migrated-hostname"},i),s().createElement(o.Dashicon,{icon:"arrow-down-alt",className:"jp-idc__idc-screen__card-migrated-separator"}),s().createElement(o.Dashicon,{icon:"arrow-right-alt",className:"jp-idc__idc-screen__card-migrated-separator-wide"}),s().createElement("div",{className:"jp-idc__idc-screen__card-migrated-hostname"},a)),s().createElement(o.Button,{className:"jp-idc__idc-screen__card-action-button jp-idc__idc-screen__card-action-button-migrated",onClick:t,label:p},n?s().createElement(u.Z,null):p))};m.propTypes={wpcomHomeUrl:a().string.isRequired,currentUrl:a().string.isRequired,finishCallback:a().func,isFinishing:a().bool.isRequired,customContent:a().shape(p.Z)},m.defaultProps={finishCallback:()=>{},isFinishing:!1,customContent:{}},t.Z=m},1064:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(5162),a=n.n(i),o=n(9307),c=n(5736),l=n(6324),u=n(7144);const __=c.__,d=e=>{const{customContent:t}=e;return s().createElement(s().Fragment,null,s().createElement("h2",null,t.nonAdminTitle?(0,o.createInterpolateElement)(t.nonAdminTitle,{em:s().createElement("em",null)}):__("Safe Mode has been activated","jetpack-idc")),s().createElement("p",null,(0,o.createInterpolateElement)(t.nonAdminBodyText||__("This site is in Safe Mode because there are 2 Jetpack-powered sites that appear to be duplicates. 2 sites that are telling Jetpack they’re the same site. <safeModeLink>Learn more about safe mode.</safeModeLink>","jetpack-idc"),{safeModeLink:s().createElement("a",{href:t.supportURL||(0,l.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"}),em:s().createElement("em",null),strong:s().createElement("strong",null)})),t.nonAdminBodyText?"":s().createElement("p",null,__("An administrator of this site can take Jetpack out of Safe Mode.","jetpack-idc")))};d.propTypes={customContent:a().shape(u.Z)},d.defaultProps={customContent:{}},t.Z=d},567:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(5162),a=n.n(i),o=n(9307),c=n(5736),l=n(1202),u=n(5533),d=n(1064),p=n(1052),m=n(7144);n(7724);const __=c.__,h=e=>{const{logo:t,customContent:n,wpcomHomeUrl:r,currentUrl:i,redirectUri:a,isMigrating:c,migrateCallback:l,isMigrated:m,finishMigrationCallback:h,isFinishingMigration:g,isStartingFresh:f,startFreshCallback:y,isAdmin:k,hasMigrateError:C,hasFreshError:v,hasStaySafeError:_,possibleDynamicSiteUrlDetected:b}=e,w=k?"":s().createElement(d.Z,{customContent:n});let E="";return k&&(E=m?s().createElement(p.Z,{wpcomHomeUrl:r,currentUrl:i,finishCallback:h,isFinishing:g,customContent:n}):s().createElement(u.Z,{wpcomHomeUrl:r,currentUrl:i,redirectUri:a,customContent:n,isMigrating:c,migrateCallback:l,isStartingFresh:f,startFreshCallback:y,hasMigrateError:C,hasFreshError:v,hasStaySafeError:_,possibleDynamicSiteUrlDetected:b})),s().createElement("div",{className:"jp-idc__idc-screen"+(m?" jp-idc__idc-screen__success":"")},s().createElement("div",{className:"jp-idc__idc-screen__header"},s().createElement("div",{className:"jp-idc__idc-screen__logo"},((e,t)=>"string"==typeof e||e instanceof String?s().createElement("img",{src:e,alt:t,className:"jp-idc__idc-screen__logo-image"}):e)(t,n.logoAlt||"")),s().createElement("div",{className:"jp-idc__idc-screen__logo-label"},n.headerText?(0,o.createInterpolateElement)(n.headerText,{em:s().createElement("em",null),strong:s().createElement("strong",null)}):__("Safe Mode","jetpack-idc"))),w,E)};h.propTypes={logo:a().object.isRequired,customContent:a().shape(m.Z),wpcomHomeUrl:a().string.isRequired,currentUrl:a().string.isRequired,redirectUri:a().string.isRequired,isMigrating:a().bool.isRequired,migrateCallback:a().func,isMigrated:a().bool.isRequired,finishMigrationCallback:a().func,isFinishingMigration:a().bool.isRequired,isStartingFresh:a().bool.isRequired,startFreshCallback:a().func,isAdmin:a().bool.isRequired,hasMigrateError:a().bool.isRequired,hasFreshError:a().bool.isRequired,hasStaySafeError:a().bool.isRequired,possibleDynamicSiteUrlDetected:a().bool},h.defaultProps={logo:s().createElement(l.Z,{height:24}),isMigrated:!1,isFinishingMigration:!1,isMigrating:!1,isStartingFresh:!1,customContent:{},hasMigrateError:!1,hasFreshError:!1,hasStaySafeError:!1,possibleDynamicSiteUrlDetected:!1},t.Z=h},2533:function(e,t,n){"use strict";var r=n(9196),s=n.n(r),i=n(5162),a=n.n(i),o=n(4333),c=n(9818),l=n(9307),u=n(5609),d=n(5736),p=n(6483),m=n(4743),h=n(5033),g=n(6324),f=n(2678),y=n(6521),k=n(6637),C=(n(310),n(7144));const __=d.__,v=e=>{const{isActionInProgress:t,setIsActionInProgress:n,setErrorType:i,clearErrorType:a,hasError:o,customContent:c}=e,[d,f]=(0,r.useState)(!1),C=(0,r.useCallback)((()=>{t||(f(!0),n(!0),a(),(0,y.Z)("confirm_safe_mode"),m.ZP.confirmIDCSafeMode().then((()=>{window.location.href=(0,p.removeQueryArgs)(window.location.href,"jetpack_idc_clear_confirmation","_wpnonce")})).catch((e=>{throw n(!1),f(!1),i("safe-mode"),e})))}),[t,n,i,a]);return s().createElement("div",{className:"jp-idc__safe-mode"},d?s().createElement("div",{className:"jp-idc__safe-mode__staying-safe"},s().createElement(h.Z,{color:"black"}),s().createElement("span",null,__("Finishing setting up Safe mode…","jetpack-idc"))):(_=C,b=t,(0,l.createInterpolateElement)(__("Or decide later and stay in <button>Safe mode</button>","jetpack-idc"),{button:s().createElement(u.Button,{label:__("Safe mode","jetpack-idc"),variant:"link",onClick:_,disabled:b})})),o&&(v=c.supportURL,s().createElement(k.Z,null,(0,l.createInterpolateElement)(__("Could not stay in safe mode. Retry or find out more <a>here</a>.","jetpack-idc"),{a:s().createElement("a",{href:v||(0,g.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"})}))));var v,_,b};v.propTypes={isActionInProgress:a().bool,setIsActionInProgress:a().func.isRequired,setErrorType:a().func.isRequired,clearErrorType:a().func.isRequired,hasError:a().bool.isRequired,customContent:a().shape(C.Z)},v.defaultProps={hasError:!1},t.Z=(0,o.compose)([(0,c.withSelect)((e=>({isActionInProgress:e(f.t).getIsActionInProgress()}))),(0,c.withDispatch)((e=>({setIsActionInProgress:e(f.t).setIsActionInProgress,setErrorType:e(f.t).setErrorType,clearErrorType:e(f.t).clearErrorType})))])(v)},1272:function(e,t,n){"use strict";var r=n(9196);t.Z=()=>{const[e,t]=(0,r.useState)(!1),n=(0,r.useCallback)((()=>{e||(t(!0),window.location.reload())}),[e,t]);return{isFinishingMigration:e,finishMigrationCallback:n}}},970:function(e,t,n){"use strict";var r=n(9196),s=n(9818),i=n(4743),a=n(6521),o=n(2678);t.Z=e=>{const[t,n]=(0,r.useState)(!1),c=(0,s.useSelect)((e=>e(o.t).getIsActionInProgress()),[]),{setIsActionInProgress:l,setErrorType:u,clearErrorType:d}=(0,s.useDispatch)(o.t);return{isMigrating:t,migrateCallback:(0,r.useCallback)((()=>{c||((0,a.Z)("migrate"),l(!0),n(!0),d(),i.ZP.migrateIDC().then((()=>{n(!1),e&&"[object Function]"==={}.toString.call(e)&&e()})).catch((e=>{throw l(!1),n(!1),u("migrate"),e})))}),[n,e,c,l,u,d])}}},3105:function(e,t,n){"use strict";var r=n(9196),s=n(9818),i=n(4743),a=n(6521),o=n(2678);t.Z=e=>{const[t,n]=(0,r.useState)(!1),c=(0,s.useSelect)((e=>e(o.t).getIsActionInProgress()),[]),{setIsActionInProgress:l,setErrorType:u,clearErrorType:d}=(0,s.useDispatch)(o.t);return{isStartingFresh:t,startFreshCallback:(0,r.useCallback)((()=>{c||((0,a.Z)("start_fresh"),l(!0),n(!0),d(),i.ZP.startIDCFresh(e).then((e=>{window.location.href=e+"&from=idc-notice"})).catch((e=>{throw l(!1),n(!1),u("start-fresh"),e})))}),[n,c,l,e,u,d])}}},136:function(e,t,n){"use strict";n.d(t,{ZP:function(){return a},hG:function(){return r},jk:function(){return i},vC:function(){return s}});const r="SET_IS_ACTION_IN_PROGRESS",s="SET_ERROR_TYPE",i="CLEAR_ERROR_TYPE",a={setIsActionInProgress:e=>({type:r,isInProgress:e}),setErrorType:e=>({type:s,errorType:e}),clearErrorType:()=>({type:i})}},7773:function(e,t,n){"use strict";var r=n(9818),s=n(136);const i=(0,r.combineReducers)({isActionInProgress:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===s.hG?t.isInProgress:e},errorType:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.vC:return t.errorType;case s.jk:return null}return e}});t.Z=i},9416:function(e,t){"use strict";t.Z={getIsActionInProgress:e=>e.isActionInProgress||!1,getErrorType:e=>e.errorType||null}},5943:function(e,t,n){"use strict";var r=n(8294),s=n.n(r),i=n(9818);class a{static mayBeInit(e,t){null===a.store&&(a.store=(0,i.createReduxStore)(e,t),(0,i.register)(a.store))}}s()(a,"store",null),t.Z=a},2678:function(e,t,n){"use strict";n.d(t,{t:function(){return o}});var r=n(7773),s=n(136),i=n(9416),a=n(5943);const o="jetpack-idc";a.Z.mayBeInit(o,{reducer:r.Z,actions:s.ZP,selectors:i.Z})},7144:function(e,t,n){"use strict";var r=n(5162),s=n.n(r);t.Z={headerText:s().string,logoAlt:s().string,mainTitle:s().string,mainBodyText:s().string,migratedTitle:s().string,migratedBodyText:s().string,migrateCardTitle:s().string,migrateButtonLabel:s().string,migrateCardBodyText:s().string,startFreshCardTitle:s().string,startFreshCardBodyText:s().string,startFreshButtonLabel:s().string,nonAdminTitle:s().string,nonAdminBodyText:s().string,supportURL:s().string}},2115:function(e,t){"use strict";t.Z=e=>/^https?:\/\//.test(e)?new URL(e).hostname:e.replace(/\/$/,"")},6521:function(e,t,n){"use strict";n.d(t,{M:function(){return s},Z:function(){return i}});var r=n(6975);function s(e,t){t&&t.hasOwnProperty("userid")&&t.hasOwnProperty("username")&&r.Z.initialize(t.userid,t.username),e&&(e.hasOwnProperty("blogID")&&r.Z.assignSuperProps({blog_id:e.blogID}),e.hasOwnProperty("platform")&&r.Z.assignSuperProps({platform:e.platform})),r.Z.setMcAnalyticsEnabled(!0)}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0!==t&&"object"==typeof t||(t={}),e&&e.length&&void 0!==r.Z&&r.Z.tracks&&r.Z.mc&&(e=0!==(e=e.replace(/-/g,"_")).indexOf("jetpack_idc_")?"jetpack_idc_"+e:e,r.Z.tracks.recordEvent(e,t),e=(e=e.replace("jetpack_idc_","")).replace(/_/g,"-"),r.Z.mc.bumpStat("jetpack-idc",e))}},8510:function(e){"use strict";if(void 0==={consumer_slug:"identity_crisis"}){var t=new Error('Cannot find module \'{"consumer_slug":"identity_crisis"}\'');throw t.code="MODULE_NOT_FOUND",t}e.exports={consumer_slug:"identity_crisis"}},9196:function(e){"use strict";e.exports=window.React},1850:function(e){"use strict";e.exports=window.ReactDOM},2819:function(e){"use strict";e.exports=window.lodash},5609:function(e){"use strict";e.exports=window.wp.components},4333:function(e){"use strict";e.exports=window.wp.compose},9818:function(e){"use strict";e.exports=window.wp.data},9307:function(e){"use strict";e.exports=window.wp.element},5736:function(e){"use strict";e.exports=window.wp.i18n},6483:function(e){"use strict";e.exports=window.wp.url}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=n(1850),t=n.n(e),r=n(9196),s=n.n(r),i=n(7381);!function(){const e=document.getElementById("jp-identity-crisis-container");if(null===e||!window.hasOwnProperty("JP_IDENTITY_CRISIS__INITIAL_STATE"))return;const{WP_API_root:n,WP_API_nonce:r,wpcomHomeUrl:a,currentUrl:o,redirectUri:c,tracksUserData:l,tracksEventData:u,isSafeModeConfirmed:d,consumerData:p,isAdmin:m,possibleDynamicSiteUrlDetected:h}=window.JP_IDENTITY_CRISIS__INITIAL_STATE;d||t().render(s().createElement(i.Z,{wpcomHomeUrl:a,currentUrl:o,apiRoot:n,apiNonce:r,redirectUri:c,tracksUserData:l||{},tracksEventData:u,customContent:p.hasOwnProperty("customContent")?p.customContent:{},isAdmin:m,logo:p.hasOwnProperty("logo")?p.logo:void 0,possibleDynamicSiteUrlDetected:h}),e)}()}()}();
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.rtl.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.rtl.css index 5c2ffd77..4522f440 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.rtl.css +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.rtl.css @@ -1 +1 @@ -#wp-admin-bar-jetpack-idc.hide{display:none}#wp-admin-bar-jetpack-idc .jp-idc-admin-bar{background:#fff;border-radius:2px;color:#1d2327;font-size:12px;padding:4px 8px}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons{color:#1d2327;font-family:dashicons}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons:before{font-size:16px}#wpadminbar #wp-admin-bar-jetpack-idc:hover .ab-item{background:inherit}#wpadminbar #wp-admin-bar-jetpack-idc:hover .jp-idc-admin-bar{background:#f0f0f1}#jp-identity-crisis-container .jp-idc__idc-screen{margin-bottom:40px;margin-top:40px}.jp-idc__idc-screen{background:#fff;border-radius:4px;border-right:4px solid #e68b28;box-shadow:0 0 40px rgba(0,0,0,.04);box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0 auto;max-width:1128px;padding:10px}.jp-idc__idc-screen.jp-idc__idc-screen__success{border-color:#069e08}@media(min-width:600px){.jp-idc__idc-screen{padding:48px}}.jp-idc__idc-screen .jp-idc__idc-screen__header{align-items:center;display:flex}.jp-idc__idc-screen .jp-idc__idc-screen__header .jp-idc__idc-screen__logo-image{max-height:100px;max-width:100px}.jp-idc__idc-screen .jp-idc__idc-screen__header .jp-idc__idc-screen__logo-label{font-size:14px;line-height:22px;margin:-7px 8px 0 0}.jp-idc__idc-screen h2{font-size:24px;font-weight:600;line-height:28px;margin:32px 0 0}.jp-idc__idc-screen h3{font-size:20px;font-weight:600;line-height:28px;margin:24px 0 0}.jp-idc__idc-screen p{color:#2c3338;font-size:16px;line-height:24px;margin:16px 0 0;max-width:710px}.jp-idc__idc-screen a{color:#2c3338}.jp-idc__idc-screen .jp-idc__idc-screen__cards{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap}@media only screen and (min-width:1403px){.jp-idc__idc-screen .jp-idc__idc-screen__cards{align-items:normal;flex-direction:row}}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__cards-separator{align-self:center;color:#23282d;font-size:20px;font-weight:600;line-height:28px;margin:0 24px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base{border:1px solid #c3c4c7;border-radius:4px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;margin:24px 0;max-width:100%;padding:10px;width:480px}@media(min-width:600px){.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base{padding:24px}}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base h4{font-size:20px;font-weight:400;line-height:28px;margin:0 0 8px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base p{margin:0 0 24px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-sitename{background:#f9f9f6;border-radius:33px;box-sizing:border-box;color:#2c3338;font-size:16px;font-weight:700;line-height:24px;overflow-wrap:anywhere;padding:16px;text-align:center;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-separator{display:block;margin:12px auto}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-button{padding:8px 24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-action-button{background:#000;border-radius:4px;color:#fff;font-size:16px;font-weight:600;height:auto;justify-content:center;line-height:24px;margin-top:24px;min-height:40px;padding:8px}.jp-idc__idc-screen .jp-idc__idc-screen__card-action-button-migrated{margin-top:64px;width:141px}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap;margin-top:24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-hostname{border:1px solid #c3c4c7;border-radius:4px;color:#2c3338;flex-grow:1;font-size:16px;font-weight:700;line-height:24px;padding:24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{display:none}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator{display:block}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator,.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{margin:28px}@media only screen and (min-width:1400px){.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated{flex-direction:row;width:auto}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator{display:none}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{display:block}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-hostname{width:auto}}@keyframes rotate-spinner{to{transform:rotate(-1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-left-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-20:#a7aaad;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-80:#8a2424;--jp-gray-off:#e2e2df;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-idc__idc-screen .jp-idc__error-message{align-items:center;color:var(--jp-red);display:flex;flex-direction:row;justify-content:center;margin:15px 0}.jp-idc__idc-screen .jp-idc__error-message .error-gridicon{fill:var(--jp-red);margin-left:8px}.jp-idc__idc-screen .jp-idc__error-message a,.jp-idc__idc-screen .jp-idc__error-message span{color:var(--jp-red);font-size:var(--font-body)}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__error-message{margin-top:5px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base{padding-bottom:75px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base.jp-idc__idc-screen__card-action-error{padding-bottom:5px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base .jp-idc__error-message{height:40px}.jp-idc__idc-screen .jp-idc__safe-mode{text-align:center}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__safe-mode__staying-safe{display:flex;justify-content:center;padding:6px}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__safe-mode__staying-safe .jp-components-spinner{margin:0 10px}.jp-idc__idc-screen .jp-idc__safe-mode,.jp-idc__idc-screen .jp-idc__safe-mode button{color:#2c3338;font-size:16px;line-height:24px}.jp-idc__idc-screen .jp-idc__safe-mode button{padding:0;text-decoration:underline}
\ No newline at end of file +#wpadminbar #wp-admin-bar-jetpack-idc{margin-left:5px}#wpadminbar #wp-admin-bar-jetpack-idc .jp-idc-admin-bar{border-radius:2px;color:#efeff0;font-size:14px;font-weight:500;line-height:20px;padding:6px 8px}#wpadminbar #wp-admin-bar-jetpack-idc.hide{display:none}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons{font-family:dashicons;margin-top:-6px}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons:before{font-size:18px}#wpadminbar #wp-admin-bar-jetpack-idc .ab-item{background:#e68b28;padding:0}#jp-identity-crisis-container .jp-idc__idc-screen{margin-bottom:40px;margin-top:40px}#jp-identity-crisis-container.notice{background:none;border:none}.jp-idc__idc-screen{background:#fff;border-radius:4px;border-right:4px solid #e68b28;box-shadow:0 0 40px rgba(0,0,0,.04);box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0 auto;max-width:1128px;padding:10px}.jp-idc__idc-screen.jp-idc__idc-screen__success{border-color:#069e08}@media(min-width:600px){.jp-idc__idc-screen{padding:48px}}.jp-idc__idc-screen .jp-idc__idc-screen__header{align-items:center;display:flex}.jp-idc__idc-screen .jp-idc__idc-screen__header .jp-idc__idc-screen__logo-image{max-height:100px;max-width:100px}.jp-idc__idc-screen .jp-idc__idc-screen__header .jp-idc__idc-screen__logo-label{font-size:14px;line-height:22px;margin:-7px 8px 0 0}.jp-idc__idc-screen h2{font-size:24px;font-weight:600;line-height:28px;margin:32px 0 0}.jp-idc__idc-screen h3{font-size:20px;font-weight:600;line-height:28px;margin:24px 0 0}.jp-idc__idc-screen p{color:#2c3338;font-size:16px;line-height:24px;margin:16px 0 0;max-width:710px}.jp-idc__idc-screen a{color:#2c3338}.jp-idc__idc-screen .jp-idc__idc-screen__cards{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap}@media only screen and (min-width:1403px){.jp-idc__idc-screen .jp-idc__idc-screen__cards{align-items:normal;flex-direction:row}}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__cards-separator{align-self:center;color:#23282d;font-size:20px;font-weight:600;line-height:28px;margin:0 24px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base{border:1px solid #c3c4c7;border-radius:4px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;margin:24px 0;max-width:100%;padding:10px;width:480px}@media(min-width:600px){.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base{padding:24px}}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base h4{font-size:20px;font-weight:400;line-height:28px;margin:0 0 8px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base p{margin:0 0 24px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-sitename{background:#f9f9f6;border-radius:33px;box-sizing:border-box;color:#2c3338;font-size:16px;font-weight:700;line-height:24px;overflow-wrap:anywhere;padding:16px;text-align:center;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-separator{display:block;margin:12px auto}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-button{padding:8px 24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-action-button{background:#000;border-radius:4px;color:#fff;font-size:16px;font-weight:600;height:auto;justify-content:center;line-height:24px;margin-top:24px;min-height:40px;padding:8px}.jp-idc__idc-screen .jp-idc__idc-screen__card-action-button-migrated{margin-top:64px;width:141px}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap;margin-top:24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-hostname{border:1px solid #c3c4c7;border-radius:4px;color:#2c3338;flex-grow:1;font-size:16px;font-weight:700;line-height:24px;padding:24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{display:none}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator{display:block}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator,.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{margin:28px}@media only screen and (min-width:1400px){.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated{flex-direction:row;width:auto}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator{display:none}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{display:block}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-hostname{width:auto}}@keyframes rotate-spinner{to{transform:rotate(-1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-left-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-10:#f2cf75;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-idc__idc-screen .jp-idc__error-message{align-items:center;color:var(--jp-red);display:flex;flex-direction:row;justify-content:center;margin:15px 0}.jp-idc__idc-screen .jp-idc__error-message .error-gridicon{fill:var(--jp-red);margin-left:8px}.jp-idc__idc-screen .jp-idc__error-message a,.jp-idc__idc-screen .jp-idc__error-message span{color:var(--jp-red);font-size:var(--font-body)}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__error-message{margin-top:5px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base{padding-bottom:75px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base.jp-idc__idc-screen__card-action-error{padding-bottom:5px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base .jp-idc__error-message{height:40px}.jp-idc__idc-screen .jp-idc__safe-mode{text-align:center}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__safe-mode__staying-safe{display:flex;justify-content:center;padding:6px}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__safe-mode__staying-safe .jp-components-spinner{margin:0 10px}.jp-idc__idc-screen .jp-idc__safe-mode,.jp-idc__idc-screen .jp-idc__safe-mode button{color:#2c3338;font-size:16px;line-height:24px}.jp-idc__idc-screen .jp-idc__safe-mode button{padding:0;text-decoration:underline}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin-bar.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin-bar.scss index cd2008cf..262b0819 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin-bar.scss +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin-bar.scss @@ -1,28 +1,30 @@ -#wp-admin-bar-jetpack-idc.hide { - display: none; -} +#wpadminbar #wp-admin-bar-jetpack-idc { + margin-right: 5px; -#wp-admin-bar-jetpack-idc .jp-idc-admin-bar { - background: #fff; - border-radius: 2px; - color: #1d2327; - padding: 4px 8px; - font-size: 12px; -} + .jp-idc-admin-bar { + border-radius: 2px; + font-weight: 500; + font-size: 14px; + line-height: 20px; + color: #EFEFF0; + padding: 6px 8px; + } -#wpadminbar #wp-admin-bar-jetpack-idc .dashicons { - color: #1d2327; - font-family: 'dashicons'; -} + &.hide { + display: none; + } -#wpadminbar #wp-admin-bar-jetpack-idc .dashicons:before { - font-size: 16px; -} + .dashicons { + font-family: 'dashicons'; + margin-top: -6px; -#wpadminbar #wp-admin-bar-jetpack-idc:hover .ab-item { - background: inherit; -} + &:before { + font-size: 18px; + } + } -#wpadminbar #wp-admin-bar-jetpack-idc:hover .jp-idc-admin-bar { - background: #f0f0f1; + .ab-item { + padding: 0; + background: #E68B28; + } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin.jsx index 296b1898..75f66477 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin.jsx +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin.jsx @@ -32,6 +32,7 @@ function render() { isSafeModeConfirmed, consumerData, isAdmin, + possibleDynamicSiteUrlDetected, } = window.JP_IDENTITY_CRISIS__INITIAL_STATE; if ( ! isSafeModeConfirmed ) { @@ -42,13 +43,14 @@ function render() { apiRoot={ WP_API_root } apiNonce={ WP_API_nonce } redirectUri={ redirectUri } - tracksUserData={ tracksUserData } + tracksUserData={ tracksUserData || {} } tracksEventData={ tracksEventData } customContent={ consumerData.hasOwnProperty( 'customContent' ) ? consumerData.customContent : {} } isAdmin={ isAdmin } logo={ consumerData.hasOwnProperty( 'logo' ) ? consumerData.logo : undefined } + possibleDynamicSiteUrlDetected={ possibleDynamicSiteUrlDetected } />, container ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/style.scss index 0b9ccb86..14f09db9 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/style.scss +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/style.scss @@ -2,3 +2,8 @@ margin-top: 40px; margin-bottom: 40px; } + +#jp-identity-crisis-container.notice { + background: none; + border: none; +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-identity-crisis.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-identity-crisis.php index cae3ed16..878b8e81 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-identity-crisis.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-identity-crisis.php @@ -28,7 +28,7 @@ class Identity_Crisis { /** * Package Version */ - const PACKAGE_VERSION = '0.6.1'; + const PACKAGE_VERSION = '0.8.12'; /** * Instance of the object. @@ -65,7 +65,7 @@ class Identity_Crisis { * @return object */ public static function init() { - if ( is_null( self::$instance ) ) { + if ( self::$instance === null ) { self::$instance = new Identity_Crisis(); } @@ -169,7 +169,7 @@ class Identity_Crisis { if ( current_user_can( 'jetpack_disconnect' ) ) { if ( isset( $_GET['jetpack_idc_clear_confirmation'], $_GET['_wpnonce'] ) && - wp_verify_nonce( $_GET['_wpnonce'], 'jetpack_idc_clear_confirmation' ) + wp_verify_nonce( $_GET['_wpnonce'], 'jetpack_idc_clear_confirmation' ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- WordPress core doesn't unslash or verify nonces either. ) { Jetpack_Options::delete_option( 'safe_mode_confirmed' ); self::$is_safe_mode_confirmed = false; @@ -193,7 +193,6 @@ class Identity_Crisis { $status = new Status(); if ( ! is_string( $url ) || $status->is_offline_mode() - || $status->is_staging_site() || self::validate_sync_error_idc_option() ) { return $url; } @@ -247,10 +246,15 @@ class Identity_Crisis { $href = wp_nonce_url( $href, 'jetpack_idc_clear_confirmation' ); + $consumer_data = UI::get_consumer_data(); + $label = isset( $consumer_data['customContent']['adminBarSafeModeLabel'] ) + ? esc_html( $consumer_data['customContent']['adminBarSafeModeLabel'] ) + : esc_html__( 'Jetpack Safe Mode', 'jetpack-idc' ); + $title = sprintf( '<span class="jp-idc-admin-bar">%s %s</span>', - '<span class="dashicons dashicons-warning"></span>', - esc_html__( 'Jetpack Safe Mode', 'jetpack-idc' ) + '<span class="dashicons dashicons-info-outline"></span>', + $label ); $menu = array( @@ -375,6 +379,8 @@ class Identity_Crisis { 'migrate_for_idc', ) ); + + delete_transient( 'jetpack_idc_possible_dynamic_site_url_detected' ); } /** @@ -1216,4 +1222,68 @@ class Identity_Crisis { 'current_url' => $data['home'], ); } + + /** + * Try to detect $_SERVER['HTTP_HOST'] being used within WP_SITEURL or WP_HOME definitions inside of wp-config. + * + * If `HTTP_HOST` usage is found, it's possbile (though not certain) that site URLs are dynamic. + * + * When a site URL is dynamic, it can lead to a Jetpack IDC. If potentially dynamic usage is detected, + * helpful support info will be shown on the IDC UI about setting a static site/home URL. + * + * @return bool True if potentially dynamic site urls were detected in wp-config, false otherwise. + */ + public static function detect_possible_dynamic_site_url() { + $transient_key = 'jetpack_idc_possible_dynamic_site_url_detected'; + $transient_val = get_transient( $transient_key ); + + if ( false !== $transient_val ) { + return (bool) $transient_val; + } + + $path = self::locate_wp_config(); + $wp_config = $path ? file_get_contents( $path ) : false; // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents + if ( $wp_config ) { + $matched = preg_match( + '/define ?\( ?[\'"](?:WP_SITEURL|WP_HOME).+(?:HTTP_HOST).+\);/', + $wp_config + ); + + if ( $matched ) { + set_transient( $transient_key, 1, HOUR_IN_SECONDS ); + return true; + } + } + + set_transient( $transient_key, 0, HOUR_IN_SECONDS ); + return false; + } + + /** + * Gets path to WordPress configuration. + * Source: https://github.com/wp-cli/wp-cli/blob/master/php/utils.php + * + * @return string + */ + public static function locate_wp_config() { + static $path; + + if ( null === $path ) { + $path = false; + + if ( getenv( 'WP_CONFIG_PATH' ) && file_exists( getenv( 'WP_CONFIG_PATH' ) ) ) { + $path = getenv( 'WP_CONFIG_PATH' ); + } elseif ( file_exists( ABSPATH . 'wp-config.php' ) ) { + $path = ABSPATH . 'wp-config.php'; + } elseif ( file_exists( dirname( ABSPATH ) . '/wp-config.php' ) && ! file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) { + $path = dirname( ABSPATH ) . '/wp-config.php'; + } + + if ( $path ) { + $path = realpath( $path ); + } + } + + return $path; + } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php index a3c2694a..0b0a31e4 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php @@ -9,7 +9,9 @@ namespace Automattic\Jetpack\IdentityCrisis; use Automattic\Jetpack\Assets; use Automattic\Jetpack\Identity_Crisis; +use Automattic\Jetpack\Status\Host; use Automattic\Jetpack\Tracking as Tracking; +use Jetpack_Options; use Jetpack_Tracks_Client; /** @@ -18,6 +20,13 @@ use Jetpack_Tracks_Client; class UI { /** + * Temporary storage for consumer data. + * + * @var array + */ + private static $consumers; + + /** * Initialization. */ public static function init() { @@ -69,7 +78,7 @@ class UI { */ public static function render_container() { ?> - <div id="jp-identity-crisis-container"></div> + <div id="jp-identity-crisis-container" class="notice"></div> <?php } @@ -88,24 +97,28 @@ class UI { * @return array */ private static function get_initial_state_data() { - $idc_urls = Identity_Crisis::get_mismatched_urls(); - $current_screen = get_current_screen(); - $is_admin = current_user_can( 'jetpack_disconnect' ); + $idc_urls = Identity_Crisis::get_mismatched_urls(); + $current_screen = get_current_screen(); + $is_admin = current_user_can( 'jetpack_disconnect' ); + $possible_dynamic_site_url_detected = (bool) Identity_Crisis::detect_possible_dynamic_site_url(); return array( - 'WP_API_root' => esc_url_raw( rest_url() ), - 'WP_API_nonce' => wp_create_nonce( 'wp_rest' ), - 'wpcomHomeUrl' => ( is_array( $idc_urls ) && array_key_exists( 'wpcom_url', $idc_urls ) ) ? $idc_urls['wpcom_url'] : null, - 'currentUrl' => ( is_array( $idc_urls ) && array_key_exists( 'current_url', $idc_urls ) ) ? $idc_urls['current_url'] : null, - 'redirectUri' => str_replace( '/wp-admin/', '/', $_SERVER['REQUEST_URI'] ), - 'tracksUserData' => Jetpack_Tracks_Client::get_connected_user_tracks_identity(), - 'tracksEventData' => array( + 'WP_API_root' => esc_url_raw( rest_url() ), + 'WP_API_nonce' => wp_create_nonce( 'wp_rest' ), + 'wpcomHomeUrl' => ( is_array( $idc_urls ) && array_key_exists( 'wpcom_url', $idc_urls ) ) ? $idc_urls['wpcom_url'] : null, + 'currentUrl' => ( is_array( $idc_urls ) && array_key_exists( 'current_url', $idc_urls ) ) ? $idc_urls['current_url'] : null, + 'redirectUri' => isset( $_SERVER['REQUEST_URI'] ) ? str_replace( '/wp-admin/', '/', filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) : '', + 'tracksUserData' => Jetpack_Tracks_Client::get_connected_user_tracks_identity(), + 'tracksEventData' => array( 'isAdmin' => $is_admin, 'currentScreen' => $current_screen ? $current_screen->id : false, + 'blogID' => Jetpack_Options::get_option( 'id' ), + 'platform' => static::get_platform(), ), - 'isSafeModeConfirmed' => Identity_Crisis::$is_safe_mode_confirmed, - 'consumerData' => static::get_consumer_data(), - 'isAdmin' => $is_admin, + 'isSafeModeConfirmed' => Identity_Crisis::$is_safe_mode_confirmed, + 'consumerData' => static::get_consumer_data(), + 'isAdmin' => $is_admin, + 'possibleDynamicSiteUrlDetected' => $possible_dynamic_site_url_detected, ); } @@ -114,7 +127,11 @@ class UI { * * @return array */ - private static function get_consumer_data() { + public static function get_consumer_data() { + if ( null !== static::$consumers ) { + return static::$consumers; + } + $consumers = apply_filters( 'jetpack_idc_consumers', array() ); if ( ! $consumers ) { @@ -139,13 +156,38 @@ class UI { continue; } - if ( 0 === strpos( $_SERVER['REQUEST_URI'], $consumer['admin_page'] ) && strlen( $consumer['admin_page'] ) > $consumer_url_length ) { + if ( isset( $_SERVER['REQUEST_URI'] ) && 0 === strpos( filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ) ), $consumer['admin_page'] ) && strlen( $consumer['admin_page'] ) > $consumer_url_length ) { $consumer_chosen = $consumer; $consumer_url_length = strlen( $consumer['admin_page'] ); } } - return $consumer_chosen ? $consumer_chosen : array_shift( $consumers ); + static::$consumers = $consumer_chosen ? $consumer_chosen : array_shift( $consumers ); + + return static::$consumers; + } + + /** + * Get the site platform. + * + * @return string + */ + private static function get_platform() { + $host = new Host(); + + if ( $host->is_woa_site() ) { + return 'woa'; + } + + if ( $host->is_vip_site() ) { + return 'vip'; + } + + if ( $host->is_newspack_site() ) { + return 'newspack'; + } + + return 'self-hosted'; } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/CHANGELOG.md index f734a12f..eef2050f 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/CHANGELOG.md @@ -5,6 +5,83 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.2.17] - 2022-05-18 +### Changed +- Updated package dependencies [#24372] + +## [2.2.16] - 2022-05-10 +### Changed +- Updated package dependencies. [#24302] + +## [2.2.15] - 2022-05-04 +### Changed +- Remove use of `pnpx` in preparation for pnpm 7.0. [#24210] +- Updated package dependencies. [#24095] + +### Deprecated +- Moved the options class into Connection. [#24095] + +## [2.2.14] - 2022-04-26 +### Changed +- Updated package dependencies. +- Update package.json metadata. + +## [2.2.13] - 2022-04-19 +### Changed +- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` + +## [2.2.12] - 2022-04-12 +### Changed +- Updated package dependencies. + +## [2.2.11] - 2022-04-06 +### Changed +- Updated package dependencies + +### Removed +- Removed tracking dependency. + +## [2.2.10] - 2022-03-29 +### Changed +- Updated package dependencies. + +## [2.2.9] - 2022-03-23 +### Changed +- Updated package dependencies. + +## [2.2.8] - 2022-03-02 +### Changed +- Updated package dependencies + +## [2.2.7] - 2022-02-22 +### Changed +- Updated package dependencies. + +## [2.2.6] - 2022-02-16 +### Changed +- Updated package dependencies. + +## [2.2.5] - 2022-02-09 +### Changed +- Updated package dependencies. + +## [2.2.4] - 2022-02-02 +### Changed +- Build: remove unneeded files from production build. +- Update use of old jQuery interfaces + +## [2.2.3] - 2022-01-25 +### Changed +- Updated package dependencies. + +## [2.2.2] - 2022-01-18 +### Changed +- General: update required node version to v16.13.2 + +## [2.2.1] - 2022-01-11 +### Changed +- Updated package dependencies. + ## [2.2.0] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -361,6 +438,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update Jetpack to use new JITM package +[2.2.17]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.16...v2.2.17 +[2.2.16]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.15...v2.2.16 +[2.2.15]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.14...v2.2.15 +[2.2.14]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.13...v2.2.14 +[2.2.13]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.12...v2.2.13 +[2.2.12]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.11...v2.2.12 +[2.2.11]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.10...v2.2.11 +[2.2.10]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.9...v2.2.10 +[2.2.9]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.8...v2.2.9 +[2.2.8]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.7...v2.2.8 +[2.2.7]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.6...v2.2.7 +[2.2.6]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.5...v2.2.6 +[2.2.5]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.4...v2.2.5 +[2.2.4]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.3...v2.2.4 +[2.2.3]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.2...v2.2.3 +[2.2.2]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.1...v2.2.2 +[2.2.1]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.0...v2.2.1 [2.2.0]: https://github.com/Automattic/jetpack-jitm/compare/v2.1.1...v2.2.0 [2.1.1]: https://github.com/Automattic/jetpack-jitm/compare/v2.1.0...v2.1.1 [2.1.0]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.8...v2.1.0 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php index 72b05048..5620bc84 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php @@ -1 +1 @@ -<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'dd5a50b1bccd783c463742176b0af4b9');
\ No newline at end of file +<?php return array('dependencies' => array('wp-polyfill'), 'version' => '364e5936cbf9aa7a5e2ca24dae6433e6');
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/build/index.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/build/index.js index 718bf770..98f26c3f 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/build/index.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/build/index.js @@ -1 +1 @@ -!function(){"use strict";jQuery(document).ready((function(t){var a={default:function(a){var e='<div class="jitm-card jitm-banner '+(a.CTA.message?"has-call-to-action":"")+" is-upgrade-premium "+a.content.classes+'" data-stats_url="'+a.jitm_stats_url+'">';if(e+='<div class="jitm-banner__content">',e+='<div class="jitm-banner__icon-plan">'+a.content.icon+"</div>",e+='<div class="jitm-banner__info">',e+='<div class="jitm-banner__title">'+a.content.message+"</div>",a.content.description&&""!==a.content.description){if(e+='<div class="jitm-banner__description">'+a.content.description,a.content.list.length>0){e+='<ul class="banner__list">';for(var i=0;i<a.content.list.length;i++){var n=a.content.list[i].item;a.content.list[i].url&&(n='<a href="'+a.content.list[i].url+'" target="_blank" rel="noopener noreferrer" data-module="'+a.feature_class+'" data-jptracks-name="nudge_item_click" data-jptracks-prop="jitm-'+a.id+'">'+n+"</a>"),e+='<li><svg class="gridicon gridicons-checkmark" height="16" width="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414" /></g></svg>'+n+"</li>"}}e+="</div>"}if(e+="</div>",e+="</div>",e+='<div class="jitm-banner__buttons_container">',a.activate_module&&(e+='<div class="jitm-banner__action" id="jitm-banner__activate">',e+='<a href="#" data-module="'+a.activate_module+'" type="button" class="jitm-button is-compact is-primary jptracks" data-jptracks-name="nudge_click" data-jptracks-prop="jitm-'+a.id+'-activate_module">'+window.jitm_config.activate_module_text+"</a>",e+="</div>"),a.CTA.message){var c="jitm-button is-compact jptracks";a.CTA.primary&&null===a.activate_module&&(c+=" is-primary");var o=a.CTA.ajax_action;e+='<div class="jitm-banner__action">',e+='<a href="'+(a.CTA.hasOwnProperty("link")&&a.CTA.link.length?a.CTA.link:a.url)+'" target="'+(!1===a.CTA.newWindow||o?"_self":"_blank")+'" rel="noopener noreferrer" title="'+a.CTA.message+'" data-module="'+a.feature_class+'" type="button" class="'+c+'" data-jptracks-name="nudge_click" data-jptracks-prop="jitm-'+a.id+'" '+(o?'data-ajax-action="'+o+'"':"")+">"+a.CTA.message+"</a>",e+="</div>"}return e+="</div>",a.is_dismissible&&(e+='<a href="#" data-module="'+a.feature_class+'" class="jitm-banner__dismiss"></a>'),t(e+="</div>")}},e=function(){t(".jetpack-jitm-message").each((function(){var e=t(this),i=e.data("message-path"),n=e.data("query"),c=e.data("redirect"),o=location.hash;"_dashboard"!==(o=o.replace(/#\//,"_"))&&(i=i.replace("toplevel_page_jetpack","toplevel_page_jetpack"+o));var r=!!t(".jetpack-logo__masthead").length;t.get(window.jitm_config.api_root+"jetpack/v4/jitm",{message_path:i,query:n,full_jp_logo_exists:r,_wpnonce:e.data("nonce")}).then((function(i){"object"==typeof i&&i[1]&&(i=[i[1]]),0!==i.length&&i[0].content&&function(e,i,n){var c;(c=i.template)&&a[c]||(c="default"),i.url=i.url+"&redirect="+n;var o,r=a[c](i);r.find(".jitm-banner__dismiss").click((o=r,function(a){a.preventDefault(),o.hide(),t.ajax({url:window.jitm_config.api_root+"jetpack/v4/jitm",method:"POST",beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",window.jitm_config.nonce)},data:{id:i.id,feature_class:i.feature_class}})})),t("#jp-admin-notices").length>0?(e.innerHTML=r,t("#jp-admin-notices").find(".jitm-card")&&t(".jitm-card").replaceWith(r),r.prependTo(t("#jp-admin-notices"))):e.replaceWith(r),r.find("#jitm-banner__activate a").click((function(){var a=t(this);if(a.attr("disabled"))return!1;t.ajax({url:window.jitm_config.api_root+"jetpack/v4/module/"+a.data("module")+"/active",method:"POST",beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",e.data("nonce")),t("#jitm-banner__activate a").text(window.jitm_config.activating_module_text),t("#jitm-banner__activate a").attr("disabled",!0)}}).done((function(){t("#jitm-banner__activate a").text(window.jitm_config.activated_module_text),t("#jitm-banner__activate a").attr("disabled",!0),setTimeout((function(){r.fadeOut("slow")}),2e3)}))})),r.find(".jitm-button[data-ajax-action]").click((function(a){a.preventDefault();var i=t(this);return i.attr("disabled",!0),t.post(window.ajaxurl,{action:i.data("ajax-action"),_nonce:e.data("ajax-nonce")}).done((function(){r.fadeOut("slow")})).fail((function(){i.attr("disabled",!1)})),!1}))}(e,i[0],c)}))}))};e(),t(window).bind("hashchange",(function(t){if(t.originalEvent.newURL.indexOf("jetpack#/")>=0){var a=document.querySelector(".jitm-card");a&&a.remove(),e()}}))}))}();
\ No newline at end of file +!function(){"use strict";jQuery(document).ready((function(t){var a={default:function(a){var e='<div class="jitm-card jitm-banner '+(a.CTA.message?"has-call-to-action":"")+" is-upgrade-premium "+a.content.classes+'" data-stats_url="'+a.jitm_stats_url+'">';if(e+='<div class="jitm-banner__content">',e+='<div class="jitm-banner__icon-plan">'+a.content.icon+"</div>",e+='<div class="jitm-banner__info">',e+='<div class="jitm-banner__title">'+a.content.message+"</div>",a.content.description&&""!==a.content.description){if(e+='<div class="jitm-banner__description">'+a.content.description,a.content.list.length>0){e+='<ul class="banner__list">';for(var i=0;i<a.content.list.length;i++){var n=a.content.list[i].item;a.content.list[i].url&&(n='<a href="'+a.content.list[i].url+'" target="_blank" rel="noopener noreferrer" data-module="'+a.feature_class+'" data-jptracks-name="nudge_item_click" data-jptracks-prop="jitm-'+a.id+'">'+n+"</a>"),e+='<li><svg class="gridicon gridicons-checkmark" height="16" width="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414" /></g></svg>'+n+"</li>"}}e+="</div>"}if(e+="</div>",e+="</div>",e+='<div class="jitm-banner__buttons_container">',a.activate_module&&(e+='<div class="jitm-banner__action" id="jitm-banner__activate">',e+='<a href="#" data-module="'+a.activate_module+'" type="button" class="jitm-button is-compact is-primary jptracks" data-jptracks-name="nudge_click" data-jptracks-prop="jitm-'+a.id+'-activate_module">'+window.jitm_config.activate_module_text+"</a>",e+="</div>"),a.CTA.message){var c="jitm-button is-compact jptracks";a.CTA.primary&&null===a.activate_module&&(c+=" is-primary");var o=a.CTA.ajax_action;e+='<div class="jitm-banner__action">',e+='<a href="'+(a.CTA.hasOwnProperty("link")&&a.CTA.link.length?a.CTA.link:a.url)+'" target="'+(!1===a.CTA.newWindow||o?"_self":"_blank")+'" rel="noopener noreferrer" title="'+a.CTA.message+'" data-module="'+a.feature_class+'" type="button" class="'+c+'" data-jptracks-name="nudge_click" data-jptracks-prop="jitm-'+a.id+'" '+(o?'data-ajax-action="'+o+'"':"")+">"+a.CTA.message+"</a>",e+="</div>"}return e+="</div>",a.is_dismissible&&(e+='<a href="#" data-module="'+a.feature_class+'" class="jitm-banner__dismiss"></a>'),t(e+="</div>")}},e=function(){t(".jetpack-jitm-message").each((function(){var e=t(this),i=e.data("message-path"),n=e.data("query"),c=e.data("redirect"),o=location.hash;"_dashboard"!==(o=o.replace(/#\//,"_"))&&(i=i.replace("toplevel_page_jetpack","toplevel_page_jetpack"+o));var r=!!t(".jetpack-logo__masthead").length;t.get(window.jitm_config.api_root+"jetpack/v4/jitm",{message_path:i,query:n,full_jp_logo_exists:r,_wpnonce:e.data("nonce")}).then((function(i){"object"==typeof i&&i[1]&&(i=[i[1]]),0!==i.length&&i[0].content&&function(e,i,n){var c;(c=i.template)&&a[c]||(c="default"),i.url=i.url+"&redirect="+n;var o,r=a[c](i);r.find(".jitm-banner__dismiss").on("click",(o=r,function(a){a.preventDefault(),o.hide(),t.ajax({url:window.jitm_config.api_root+"jetpack/v4/jitm",method:"POST",beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",window.jitm_config.nonce)},data:{id:i.id,feature_class:i.feature_class}})})),t("#jp-admin-notices").length>0?(e.innerHTML=r,t("#jp-admin-notices").find(".jitm-card")&&t(".jitm-card").replaceWith(r),r.prependTo(t("#jp-admin-notices"))):e.replaceWith(r),r.find("#jitm-banner__activate a").on("click",(function(){var a=t(this);if(a.attr("disabled"))return!1;t.ajax({url:window.jitm_config.api_root+"jetpack/v4/module/"+a.data("module")+"/active",method:"POST",beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",e.data("nonce")),t("#jitm-banner__activate a").text(window.jitm_config.activating_module_text),t("#jitm-banner__activate a").attr("disabled",!0)}}).done((function(){t("#jitm-banner__activate a").text(window.jitm_config.activated_module_text),t("#jitm-banner__activate a").attr("disabled",!0),setTimeout((function(){r.fadeOut("slow")}),2e3)}))})),r.find(".jitm-button[data-ajax-action]").on("click",(function(a){a.preventDefault();var i=t(this);return i.attr("disabled",!0),t.post(window.ajaxurl,{action:i.data("ajax-action"),_nonce:e.data("ajax-nonce")}).done((function(){r.fadeOut("slow")})).fail((function(){i.attr("disabled",!1)})),!1}))}(e,i[0],c)}))}))};e(),t(window).on("hashchange",(function(t){if(t.originalEvent.newURL.indexOf("jetpack#/")>=0){var a=document.querySelector(".jitm-card");a&&a.remove(),e()}}))}))}();
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php index 12577b09..9f66d436 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php @@ -20,7 +20,7 @@ use Automattic\Jetpack\Status; */ class JITM { - const PACKAGE_VERSION = '2.2.0'; + const PACKAGE_VERSION = '2.2.17'; /** * The configuration method that is called from the jetpack-config package. @@ -198,7 +198,7 @@ class JITM { $message_path = $this->get_message_path(); $query_string = _http_build_query( $_GET, '', ',' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended - $current_screen = wp_unslash( $_SERVER['REQUEST_URI'] ); + $current_screen = isset( $_SERVER['REQUEST_URI'] ) ? wp_unslash( $_SERVER['REQUEST_URI'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- Escaped below ?> <div class="jetpack-jitm-message" data-nonce="<?php echo esc_attr( wp_create_nonce( 'wp_rest' ) ); ?>" diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/src/js/jetpack-jitm.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/src/js/jetpack-jitm.js index 785a38a7..61c5837a 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/src/js/jetpack-jitm.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-jitm/src/js/jetpack-jitm.js @@ -73,7 +73,9 @@ jQuery( document ).ready( function ( $ ) { html += '<div class="jitm-banner__action">'; html += '<a href="' + - ( envelope.CTA.hasOwnProperty( 'link' ) && envelope.CTA.link.length ? envelope.CTA.link : envelope.url ) + + ( envelope.CTA.hasOwnProperty( 'link' ) && envelope.CTA.link.length + ? envelope.CTA.link + : envelope.url ) + '" target="' + ( envelope.CTA.newWindow === false || ajaxAction ? '_self' : '_blank' ) + '" rel="noopener noreferrer" title="' + @@ -139,7 +141,7 @@ jQuery( document ).ready( function ( $ ) { response.url = response.url + '&redirect=' + redirect; var $template = templates[ template ]( response ); - $template.find( '.jitm-banner__dismiss' ).click( render( $template ) ); + $template.find( '.jitm-banner__dismiss' ).on( 'click', render( $template ) ); if ( $( '#jp-admin-notices' ).length > 0 ) { // Add to Jetpack notices within the Jetpack settings app. @@ -158,7 +160,7 @@ jQuery( document ).ready( function ( $ ) { } // Handle Module activation button if it exists. - $template.find( '#jitm-banner__activate a' ).click( function () { + $template.find( '#jitm-banner__activate a' ).on( 'click', function () { var $activate_button = $( this ); // Do not allow any requests if the button is disabled. @@ -193,7 +195,7 @@ jQuery( document ).ready( function ( $ ) { } ); // Handle CTA ajax actions. - $template.find( '.jitm-button[data-ajax-action]' ).click( function ( e ) { + $template.find( '.jitm-button[data-ajax-action]' ).on( 'click', function ( e ) { e.preventDefault(); var button = $( this ); button.attr( 'disabled', true ); @@ -253,7 +255,7 @@ jQuery( document ).ready( function ( $ ) { reFetch(); - $( window ).bind( 'hashchange', function ( e ) { + $( window ).on( 'hashchange', function ( e ) { var newURL = e.originalEvent.newURL; if ( newURL.indexOf( 'jetpack#/' ) >= 0 ) { diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/CHANGELOG.md index fbeb8c83..f61c00d0 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/CHANGELOG.md @@ -5,6 +5,71 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.1.15] - 2022-05-24 +### Fixed +- Do not lazy-load images when in RSS feeds. [#24471] + +## [2.1.14] - 2022-05-18 +### Changed +- Setup lazy-images filters to run on 'the_post' hook not 'wp_head' to fix a variety of issues. [#24277] +- Updated package dependencies [#24372] + +## [2.1.13] - 2022-05-10 +### Changed +- Updated package dependencies. [#24302] + +## [2.1.12] - 2022-05-04 +### Added +- Add missing JavaScript dependencies. [#24096] + +### Changed +- Update JS sources to modern syntax. [#24213] + +## [2.1.11] - 2022-04-26 +### Changed +- Updated package dependencies. +- Update package.json metadata. + +## [2.1.10] - 2022-04-06 +### Changed +- Microperformance: Use === null instead of is_null + +## [2.1.9] - 2022-03-29 +### Changed +- Microperformance: Use === null instead of is_null + +## [2.1.8] - 2022-03-23 +### Changed +- Updated package dependencies. + +## [2.1.7] - 2022-03-02 +### Changed +- Updated package dependencies. + +## [2.1.6] - 2022-02-16 +### Changed +- Updated package dependencies. + +## [2.1.5] - 2022-02-09 +### Changed +- Updated package dependencies. + +## [2.1.4] - 2022-02-02 +### Changed +- Updated package dependencies. + +## [2.1.3] - 2022-01-25 +### Changed +- Updated package dependencies. + +## [2.1.2] - 2022-01-18 +### Changed +- General: update required node version to v16.13.2 + +## [2.1.1] - 2022-01-11 +### Changed +- Updated package dependencies. + ## [2.1.0] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -160,6 +225,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Lazy Images: Move into a package +[2.1.15]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.14...v2.1.15 +[2.1.14]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.13...v2.1.14 +[2.1.13]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.12...v2.1.13 +[2.1.12]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.11...v2.1.12 +[2.1.11]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.10...v2.1.11 +[2.1.10]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.9...v2.1.10 +[2.1.9]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.8...v2.1.9 +[2.1.8]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.7...v2.1.8 +[2.1.7]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.6...v2.1.7 +[2.1.6]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.5...v2.1.6 +[2.1.5]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.4...v2.1.5 +[2.1.4]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.3...v2.1.4 +[2.1.3]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.2...v2.1.3 +[2.1.2]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.1...v2.1.2 +[2.1.1]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.1.0...v2.1.1 [2.1.0]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.0.10...v2.1.0 [2.0.10]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.0.9...v2.0.10 [2.0.9]: https://github.com/Automattic/jetpack-lazy-images/compare/v2.0.8...v2.0.9 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/dist/intersection-observer.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/dist/intersection-observer.asset.php index d56f1d1f..e3fc4a44 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/dist/intersection-observer.asset.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/dist/intersection-observer.asset.php @@ -1 +1 @@ -<?php return array('dependencies' => array(), 'version' => '6ae6d91d4b64fe31e32c2797e7c3dd42');
\ No newline at end of file +<?php return array('dependencies' => array(), 'version' => 'f5a9d453c5a79e347f9ee90353c1abdf');
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/dist/lazy-images.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/dist/lazy-images.asset.php index 13eb125f..e6bfccc1 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/dist/lazy-images.asset.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/dist/lazy-images.asset.php @@ -1 +1 @@ -<?php return array('dependencies' => array(), 'version' => '22d8bb42bcd6edc9c8ef53eb9b087d17');
\ No newline at end of file +<?php return array('dependencies' => array(), 'version' => '25eafb3f2ad93939cdfaaa7782cb8b85');
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/dist/lazy-images.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/dist/lazy-images.js index d606a494..b553eb23 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/dist/lazy-images.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/dist/lazy-images.js @@ -1 +1 @@ -!function(){var e=function(){var e,t,n,a={rootMargin:"200px 0px",threshold:.01},i=[];d();var r=document.querySelector("body");function d(){e=[].slice.call(document.querySelectorAll("img.jetpack-lazy-image:not(.jetpack-lazy-image--handled)")),n&&n.disconnect(),"IntersectionObserver"in window?(n=new IntersectionObserver(l,a),e.forEach((function(e){e.getAttribute("data-lazy-loaded")||n.observe(e)})),window.addEventListener("beforeprint",c),window.matchMedia&&window.matchMedia("print").addListener((function(e){e.matches&&c()}))):o()}function o(){for(n&&n.disconnect();e.length>0;)s(e[0])}function l(t){for(var a=0;a<t.length;a++){var i=t[a];i.intersectionRatio>0&&(n.unobserve(i.target),s(i.target))}0===e.length&&n.disconnect()}function c(){if(!t&&(e.length>0||i.length>0)){(t=document.createElement("div")).id="loadingWarning",t.style.fontWeight="bold",t.innerText=jetpackLazyImagesL10n.loading_warning;var n=document.createElement("style");n.innerHTML="#loadingWarning { display: none; }\n@media print {\n#loadingWarning { display: block; }\nbody > #loadingWarning ~ * { display: none !important; }\n}",t.appendChild(n),r.insertBefore(t,r.firstChild)}e.length>0&&o(),t&&alert(jetpackLazyImagesL10n.loading_warning)}function s(t){var n;if(t instanceof HTMLImageElement){var a=t.getAttribute("data-lazy-srcset"),r=t.getAttribute("data-lazy-sizes");t.removeAttribute("data-lazy-srcset"),t.removeAttribute("data-lazy-sizes"),t.removeAttribute("data-lazy-src"),t.classList.add("jetpack-lazy-image--handled"),t.setAttribute("data-lazy-loaded",1),r&&t.setAttribute("sizes",r),a?t.setAttribute("srcset",a):t.removeAttribute("srcset"),t.setAttribute("loading","eager"),i.push(t);var d=e.indexOf(t);d>=0&&e.splice(d,1),t.complete?g.call(t,null):(t.addEventListener("load",g,{once:!0}),t.addEventListener("error",g,{once:!0}));try{n=new Event("jetpack-lazy-loaded-image",{bubbles:!0,cancelable:!0})}catch(e){(n=document.createEvent("Event")).initEvent("jetpack-lazy-loaded-image",!0,!0)}t.dispatchEvent(n)}}function g(){var n=i.indexOf(this);n>=0&&i.splice(n,1),t&&0===e.length&&0===i.length&&(t.parentNode.removeChild(t),t=null)}r&&(r.addEventListener("is.post-load",d),r.addEventListener("jetpack-lazy-images-load",d))};"interactive"===document.readyState||"complete"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)}();
\ No newline at end of file +!function(){const e=function(){const e={rootMargin:"200px 0px",threshold:.01},t=[];let n,a,i;d();const o=document.querySelector("body");function d(){n=Array.from(document.querySelectorAll("img.jetpack-lazy-image:not(.jetpack-lazy-image--handled)")),i&&i.disconnect(),"IntersectionObserver"in window?(i=new IntersectionObserver(c,e),n.forEach((function(e){e.getAttribute("data-lazy-loaded")||i.observe(e)})),window.addEventListener("beforeprint",l),window.matchMedia&&window.matchMedia("print").addListener((function(e){e.matches&&l()}))):r()}function r(){for(i&&i.disconnect();n.length>0;)s(n[0])}function c(e){for(let t=0;t<e.length;t++){const n=e[t];n.intersectionRatio>0&&(i.unobserve(n.target),s(n.target))}0===n.length&&i.disconnect()}function l(){if(!a&&(n.length>0||t.length>0)){a=document.createElement("div"),a.id="loadingWarning",a.style.fontWeight="bold",a.innerText=jetpackLazyImagesL10n.loading_warning;const e=document.createElement("style");e.innerHTML="#loadingWarning { display: none; }\n@media print {\n#loadingWarning { display: block; }\nbody > #loadingWarning ~ * { display: none !important; }\n}",a.appendChild(e),o.insertBefore(a,o.firstChild)}n.length>0&&r(),a&&alert(jetpackLazyImagesL10n.loading_warning)}function s(e){let a;if(!(e instanceof HTMLImageElement))return;const i=e.getAttribute("data-lazy-srcset"),o=e.getAttribute("data-lazy-sizes");e.removeAttribute("data-lazy-srcset"),e.removeAttribute("data-lazy-sizes"),e.removeAttribute("data-lazy-src"),e.classList.add("jetpack-lazy-image--handled"),e.setAttribute("data-lazy-loaded",1),o&&e.setAttribute("sizes",o),i?e.setAttribute("srcset",i):e.removeAttribute("srcset"),e.setAttribute("loading","eager"),t.push(e);const d=n.indexOf(e);d>=0&&n.splice(d,1),e.complete?g.call(e,null):(e.addEventListener("load",g,{once:!0}),e.addEventListener("error",g,{once:!0}));try{a=new Event("jetpack-lazy-loaded-image",{bubbles:!0,cancelable:!0})}catch(e){a=document.createEvent("Event"),a.initEvent("jetpack-lazy-loaded-image",!0,!0)}e.dispatchEvent(a)}function g(){const e=t.indexOf(this);e>=0&&t.splice(e,1),a&&0===n.length&&0===t.length&&(a.parentNode.removeChild(a),a=null)}o&&(o.addEventListener("is.post-load",d),o.addEventListener("jetpack-lazy-images-load",d))};"interactive"===document.readyState||"complete"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)}();
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/src/js/lazy-images.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/src/js/lazy-images.js index 92b4f217..4dded3fb 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/src/js/lazy-images.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/src/js/lazy-images.js @@ -1,17 +1,17 @@ /* global jetpackLazyImagesL10n */ -var jetpackLazyImagesModule = function () { - var config = { +const jetpackLazyImagesModule = function () { + const config = { // If the image gets within 200px in the Y axis, start the download. rootMargin: '200px 0px', threshold: 0.01, }; - var loadingImages = []; - var lazyImages, loadingWarning, observer; + const loadingImages = []; + let lazyImages, loadingWarning, observer; lazy_load_init(); - var bodyEl = document.querySelector( 'body' ); + const bodyEl = document.querySelector( 'body' ); if ( bodyEl ) { // Lazy load images that are brought in from Infinite Scroll bodyEl.addEventListener( 'is.post-load', lazy_load_init ); @@ -24,8 +24,7 @@ var jetpackLazyImagesModule = function () { * Initialize the module. */ function lazy_load_init() { - // @todo: Use Array.from once es6 is allowed. - lazyImages = [].slice.call( + lazyImages = Array.from( document.querySelectorAll( 'img.jetpack-lazy-image:not(.jetpack-lazy-image--handled)' ) ); @@ -81,8 +80,8 @@ var jetpackLazyImagesModule = function () { */ function onIntersection( entries ) { // Loop through the entries - for ( var i = 0; i < entries.length; i++ ) { - var entry = entries[ i ]; + for ( let i = 0; i < entries.length; i++ ) { + const entry = entries[ i ]; // Are we in viewport? if ( entry.intersectionRatio > 0 ) { @@ -111,7 +110,7 @@ var jetpackLazyImagesModule = function () { loadingWarning.style.fontWeight = 'bold'; loadingWarning.innerText = jetpackLazyImagesL10n.loading_warning; - var s = document.createElement( 'style' ); + const s = document.createElement( 'style' ); s.innerHTML = '#loadingWarning { display: none; }\n@media print {\n#loadingWarning { display: block; }\nbody > #loadingWarning ~ * { display: none !important; }\n}'; loadingWarning.appendChild( s ); @@ -136,14 +135,14 @@ var jetpackLazyImagesModule = function () { * @param {Element} image - The image object. */ function applyImage( image ) { - var lazyLoadedImageEvent; + let lazyLoadedImageEvent; if ( ! ( image instanceof HTMLImageElement ) ) { return; } - var srcset = image.getAttribute( 'data-lazy-srcset' ); - var sizes = image.getAttribute( 'data-lazy-sizes' ); + const srcset = image.getAttribute( 'data-lazy-srcset' ); + const sizes = image.getAttribute( 'data-lazy-sizes' ); // Remove lazy attributes. image.removeAttribute( 'data-lazy-srcset' ); @@ -169,7 +168,7 @@ var jetpackLazyImagesModule = function () { image.setAttribute( 'loading', 'eager' ); loadingImages.push( image ); - var idx = lazyImages.indexOf( image ); + const idx = lazyImages.indexOf( image ); if ( idx >= 0 ) { lazyImages.splice( idx, 1 ); } @@ -199,7 +198,7 @@ var jetpackLazyImagesModule = function () { * An image from applyImage() finished loading. */ function loadedImage() { - var idx = loadingImages.indexOf( this ); + const idx = loadingImages.indexOf( this ); if ( idx >= 0 ) { loadingImages.splice( idx, 1 ); } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/src/lazy-images.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/src/lazy-images.php index 8be08ed5..0cbbcb6f 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/src/lazy-images.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-lazy-images/src/lazy-images.php @@ -51,7 +51,7 @@ class Jetpack_Lazy_Images { * @return object The class instance. */ public static function instance() { - if ( is_null( self::$instance ) ) { + if ( self::$instance === null ) { self::$instance = new Jetpack_Lazy_Images(); } @@ -114,7 +114,7 @@ class Jetpack_Lazy_Images { return; } - add_action( 'wp_head', array( $this, 'setup_filters' ), 9999 ); // We don't really want to modify anything in <head> since it's mostly all metadata. + add_action( 'the_post', array( $this, 'setup_filters' ), 9999 ); add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_assets' ) ); // Do not lazy load avatar in admin bar. @@ -133,6 +133,11 @@ class Jetpack_Lazy_Images { * @return void */ public function setup_filters() { + // Do not lazy-load images in RSS feeds. + if ( is_feed() ) { + return; + } + add_filter( 'the_content', array( $this, 'add_image_placeholders' ), PHP_INT_MAX ); // Run this later, so other content filters have run, including image_add_wh on WP.com. add_filter( 'post_thumbnail_html', array( $this, 'add_image_placeholders' ), PHP_INT_MAX ); add_filter( 'get_avatar', array( $this, 'add_image_placeholders' ), PHP_INT_MAX ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/CHANGELOG.md index 259c8b2c..31d40981 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/CHANGELOG.md @@ -5,6 +5,37 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.7.2] - 2022-05-04 +### Changed +- Updated package dependencies. [#24095] + +### Deprecated +- Moved the options class into Connection. [#24095] + +## [1.7.1] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.7.0] - 2022-04-19 +### Changed +- Moved licensing endpoints from the Jetpack plugin to the Licensing package + +## [1.6.4] - 2022-04-12 +### Changed +- Updated package dependencies. + +## [1.6.3] - 2022-03-02 +### Changed +- Updated package dependencies. + +## [1.6.2] - 2022-01-25 +### Changed +- Updated package dependencies. + +## [1.6.1] - 2022-01-18 +### Changed +- Updated package dependencies. + ## [1.6.0] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -151,6 +182,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Licensing: Add support for Jetpack licenses +[1.7.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.1...v1.7.2 +[1.7.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.0...v1.7.1 +[1.7.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.6.4...v1.7.0 +[1.6.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.6.3...v1.6.4 +[1.6.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.6.2...v1.6.3 +[1.6.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.6.1...v1.6.2 +[1.6.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.6.0...v1.6.1 [1.6.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.5.4...v1.6.0 [1.5.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.5.3...v1.5.4 [1.5.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.5.2...v1.5.3 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php new file mode 100644 index 00000000..06a4ea21 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php @@ -0,0 +1,448 @@ +<?php +/** + * A Licensing Endpoints class for Jetpack. + * + * @package automattic/jetpack-licensing + */ + +namespace Automattic\Jetpack\Licensing; + +use Automattic\Jetpack\Connection\Client; +use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Licensing; +use Automattic\Jetpack\Status\Visitor; +use Jetpack_Options; +use WP_Error; + +/** + * Class Endpoints. + * Helper class that is responsible for registering and responding to licensing endpoint requests. + * + * @since 1.7.0 + */ +class Endpoints { + /** + * This property stores the localized "Insufficient Permissions" error message. + * + * @var string Generic error message when user is not allowed to perform an action. + */ + private static $user_permissions_error_msg; + + /** + * Constructor. + */ + public function __construct() { + self::$user_permissions_error_msg = esc_html__( + 'You do not have the correct user permissions to perform this action. + Please contact your site admin if you think this is a mistake.', + 'jetpack-licensing' + ); + } + + /** + * Declare the endpoints for the licensing package. + * + * @since 1.7.0 + * + * @since-jetpack 10.9.0 + */ + public function register_endpoints() { + /* + * Get and update the last licensing error message. + */ + register_rest_route( + 'jetpack/v4', + '/licensing/error', + array( + array( + 'methods' => \WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_licensing_error', + 'permission_callback' => __CLASS__ . '::can_manage_options_check', + ), + array( + 'methods' => \WP_REST_Server::EDITABLE, + 'callback' => __CLASS__ . '::update_licensing_error', + 'permission_callback' => __CLASS__ . '::can_manage_options_check', + 'args' => array( + 'error' => array( + 'required' => true, + 'type' => 'string', + 'validate_callback' => __CLASS__ . '::validate_string', + 'sanitize_callback' => 'sanitize_text_field', + ), + ), + ), + ) + ); + + /** + * Sets a license. This is still used as part of the first pass at licensing done for partners. + * + * See https://github.com/Automattic/jetpack/pull/23687 for more details. + */ + register_rest_route( + 'jetpack/v4', + '/licensing/set-license', + array( + 'methods' => \WP_REST_Server::EDITABLE, + 'callback' => __CLASS__ . '::set_jetpack_license', + 'permission_callback' => __CLASS__ . '::set_jetpack_license_key_permission_check', + 'args' => array( + 'license' => array( + 'required' => true, + 'type' => 'string', + 'validate_callback' => __CLASS__ . '::validate_string', + 'sanitize_callback' => 'sanitize_text_field', + ), + ), + ) + ); + + /** + * Get Jetpack user licenses. + */ + register_rest_route( + 'jetpack/v4', + 'licensing/user/licenses', + array( + 'methods' => \WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_user_licenses', + 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', + ) + ); + + /** + * Get Jetpack user license counts. + */ + register_rest_route( + 'jetpack/v4', + 'licensing/user/counts', + array( + 'methods' => \WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_user_license_counts', + 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', + ) + ); + + /** + * Update user-licensing activation notice dismiss info. + */ + register_rest_route( + 'jetpack/v4', + 'licensing/user/activation-notice-dismiss', + array( + 'methods' => \WP_REST_Server::EDITABLE, + 'callback' => __CLASS__ . '::update_licensing_activation_notice_dismiss', + 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', + 'args' => array( + 'last_detached_count' => array( + 'required' => true, + 'type' => 'integer', + 'validate_callback' => __CLASS__ . '::validate_non_neg_int', + ), + ), + ) + ); + + /** + * Attach licenses to user account + */ + register_rest_route( + 'jetpack/v4', + '/licensing/attach-licenses', + array( + 'methods' => \WP_REST_Server::EDITABLE, + 'callback' => __CLASS__ . '::attach_jetpack_licenses', + 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', + 'args' => array( + 'licenses' => array( + 'required' => true, + 'type' => 'array', + 'items' => array( + 'type' => 'string', + ), + ), + ), + ) + ); + } + + /** + * Verify that the user can set a Jetpack license key + * + * @since 1.7.0 + * + * @since-jetpack 9.5.0 + * + * @return bool|WP_Error True if user is able to set a Jetpack license key + */ + public static function set_jetpack_license_key_permission_check() { + if ( Licensing::instance()->is_licensing_input_enabled() ) { + return true; + } + + return new WP_Error( 'invalid_user_permission_set_jetpack_license_key', self::$user_permissions_error_msg, array( 'status' => rest_authorization_required_code() ) ); + + } + + /** + * Verify that user can view and update user-licensing data. + * + * @since 1.7.0 + * + * @return bool Whether the user is currently connected and they are the connection owner. + */ + public static function user_licensing_permission_check() { + $connection_manager = new Connection_Manager( 'jetpack' ); + + if ( $connection_manager->is_user_connected() && $connection_manager->is_connection_owner() ) { + return true; + } + + return new WP_Error( 'invalid_permission_manage_user_licenses', self::$user_permissions_error_msg, array( 'status' => rest_authorization_required_code() ) ); + } + + /** + * Verify that user can manage_options + * + * @since 1.7.0 + * + * @return bool Whether user has the capability 'manage_options'. + */ + public static function can_manage_options_check() { + if ( current_user_can( 'manage_options' ) ) { + return true; + } + + return new WP_Error( 'invalid_user_permission_view_admin', self::$user_permissions_error_msg, array( 'status' => rest_authorization_required_code() ) ); + } + + /** + * Validates that the parameter is a string. + * + * @since 1.7.0 + * + * @since-jetpack 4.3.0 + * + * @param string $value Value to check. + * @param WP_REST_Request $request The request sent to the WP REST API. + * @param string $param Name of the parameter passed to endpoint holding $value. + * + * @return bool|WP_Error + */ + public static function validate_string( $value, $request, $param ) { + if ( ! is_string( $value ) ) { + /* translators: %s: The literal parameter name. Should not be translated. */ + return new WP_Error( 'invalid_param', sprintf( esc_html__( '%s must be a string.', 'jetpack-licensing' ), $param ) ); + } + return true; + } + + /** + * Validates that the parameter is a non-negative integer (includes 0). + * + * @since 1.7.0 + * + * @since-jetpack 10.4.0 + * + * @param int $value Value to check. + * @param WP_REST_Request $request The request sent to the WP REST API. + * @param string $param Name of the parameter passed to endpoint holding $value. + * + * @return bool|WP_Error + */ + public static function validate_non_neg_int( $value, $request, $param ) { + if ( ! is_numeric( $value ) || $value < 0 ) { + return new WP_Error( + 'invalid_param', + /* translators: %s: The literal parameter name. Should not be translated. */ + sprintf( esc_html__( '%s must be a non-negative integer.', 'jetpack-licensing' ), $param ) + ); + } + return true; + } + + /** + * Update the last licensing error message. + * + * @since 1.7.0 + * + * @since-jetpack 9.0.0 + * + * @param WP_REST_Request $request The request. + * + * @return bool true. + */ + public static function update_licensing_error( $request ) { + Licensing::instance()->log_error( $request['error'] ); + + return true; + } + + /** + * Get the last licensing error message, if any. + * + * @since 1.7.0 + * + * @since-jetpack 9.0.0 + * + * @return string Licensing error message or empty string. + */ + public static function get_licensing_error() { + return Licensing::instance()->last_error(); + } + + /** + * Set a Jetpack license + * + * @since 1.7.0 + * + * @since-jetpack 9.6.0 + * + * @param WP_REST_Request $request The request. + * + * @return WP_REST_Response|WP_Error A response object if the option was successfully updated, or a WP_Error if it failed. + */ + public static function set_jetpack_license( $request ) { + $license = trim( sanitize_text_field( $request['license'] ) ); + + if ( Licensing::instance()->append_license( $license ) ) { + return rest_ensure_response( array( 'code' => 'success' ) ); + } + + return new WP_Error( + 'setting_license_key_failed', + esc_html__( 'Could not set this license key. Please try again.', 'jetpack-licensing' ), + array( 'status' => 500 ) + ); + } + + /** + * Gets the users licenses. + * + * @since 1.7.0 + * + * @since-jetpack 10.4.0 + * + * @return string|WP_Error A JSON object of user licenses if the request was successful, or a WP_Error otherwise. + */ + public static function get_user_licenses() { + $wpcom_request = Client::wpcom_json_api_request_as_user( + '/jetpack-licensing/user/licenses', + '2', + array( + 'method' => 'GET', + 'headers' => array( + 'Content-Type' => 'application/json', + 'X-Forwarded-For' => ( new Visitor() )->get_ip( true ), + ), + ) + ); + + $response_code = wp_remote_retrieve_response_code( $wpcom_request ); + if ( 200 === $response_code ) { + $licenses = json_decode( wp_remote_retrieve_body( $wpcom_request ) ); + return $licenses; + } else { + return new WP_Error( + 'failed_to_fetch_data', + esc_html__( 'Unable to fetch the requested data.', 'jetpack-licensing' ), + array( 'status' => $response_code ) + ); + } + } + + /** + * Gets the users licenses counts. + * + * @since 1.7.0 + * + * @since-jetpack 10.4.0 + * + * @return string|WP_Error A JSON object of user license counts if the request was successful, or a WP_Error otherwise. + */ + public static function get_user_license_counts() { + $wpcom_request = Client::wpcom_json_api_request_as_user( + '/jetpack-licensing/user/licenses/counts', + '2', + array( + 'method' => 'GET', + 'headers' => array( + 'Content-Type' => 'application/json', + 'X-Forwarded-For' => ( new Visitor() )->get_ip( true ), + ), + ) + ); + + $response_code = wp_remote_retrieve_response_code( $wpcom_request ); + if ( 200 === $response_code ) { + $license_counts = json_decode( wp_remote_retrieve_body( $wpcom_request ) ); + return $license_counts; + } else { + return new WP_Error( + 'failed_to_fetch_data', + esc_html__( 'Unable to fetch the requested data.', 'jetpack-licensing' ), + array( 'status' => $response_code ) + ); + } + } + + /** + * Update the user-licenses activation notice dismissal data. + * + * @since 1.7.0 + * + * @since-jetpack 10.4.0 + * + * @param WP_REST_Request $request The request sent to the WP REST API. + * + * @return array|WP_Error + */ + public static function update_licensing_activation_notice_dismiss( $request ) { + + if ( ! isset( $request['last_detached_count'] ) ) { + return new WP_Error( 'invalid_param', esc_html__( 'Missing parameter "last_detached_count".', 'jetpack-licensing' ), array( 'status' => 404 ) ); + } + + $default = array( + 'last_detached_count' => null, + 'last_dismissed_time' => null, + ); + $last_detached_count = ( '' === $request['last_detached_count'] ) + ? $default['last_detached_count'] + : $request['last_detached_count']; + $last_dismissed_time = ( '' === $request['last_detached_count'] ) + ? $default['last_dismissed_time'] + // Use UTC timezone and convert to ISO8601 format(DateTime::W3C) for best compatibility with JavaScript Date in all browsers. + : ( new \DateTime( 'NOW', new \DateTimeZone( 'UTC' ) ) )->format( \DateTime::W3C ); + + $notice_data = array( + 'last_detached_count' => $last_detached_count, + 'last_dismissed_time' => $last_dismissed_time, + ); + + Jetpack_Options::update_option( 'licensing_activation_notice_dismiss', $notice_data, true ); + return rest_ensure_response( $notice_data ); + } + + /** + * Attach Jetpack licenses + * + * @since 1.7.0 + * + * @since-jetpack 10.4.0 + * + * @param WP_REST_Request $request The request. + * + * @return WP_REST_Response|WP_Error A response object + */ + public static function attach_jetpack_licenses( $request ) { + $licenses = array_map( + function ( $license ) { + return trim( sanitize_text_field( $license ) ); + }, + $request['licenses'] + ); + return rest_ensure_response( Licensing::instance()->attach_licenses( $licenses ) ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php index 056004f5..e333bc76 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php @@ -8,6 +8,7 @@ namespace Automattic\Jetpack; use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Licensing\Endpoints; use Jetpack_IXR_ClientMulticall; use Jetpack_Options; use WP_Error; @@ -62,6 +63,19 @@ class Licensing { add_action( 'add_option_' . self::LICENSES_OPTION_NAME, array( $this, 'attach_stored_licenses' ) ); add_action( 'update_option_' . self::LICENSES_OPTION_NAME, array( $this, 'attach_stored_licenses' ) ); add_action( 'jetpack_authorize_ending_authorized', array( $this, 'attach_stored_licenses_on_connection' ) ); + add_action( 'rest_api_init', array( $this, 'initialize_endpoints' ) ); + } + + /** + * Initialize endpoints required for Licensing package. + * + * @since 1.7.0 + * + * @return void + */ + public function initialize_endpoints() { + $endpoints = new Endpoints(); + $endpoints->register_endpoints(); } /** diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-logo/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-logo/CHANGELOG.md index c922a297..36898b3d 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-logo/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-logo/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.15] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.5.14] - 2022-01-25 +### Changed +- Updated package dependencies. + ## [1.5.13] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -110,6 +118,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Packages: Add a basic Jetpack Logo package +[1.5.15]: https://github.com/Automattic/jetpack-logo/compare/v1.5.14...v1.5.15 +[1.5.14]: https://github.com/Automattic/jetpack-logo/compare/v1.5.13...v1.5.14 [1.5.13]: https://github.com/Automattic/jetpack-logo/compare/v1.5.12...v1.5.13 [1.5.12]: https://github.com/Automattic/jetpack-logo/compare/v1.5.11...v1.5.12 [1.5.11]: https://github.com/Automattic/jetpack-logo/compare/v1.5.10...v1.5.11 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md index 117d759f..5ac1507e 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md @@ -5,6 +5,455 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.6.0] - 2022-05-30 +### Added +- Added Social to My Jetpack. + +### Changed +- Make My Jetpack use the new Modules class +- Replace deprecated external-link variation by using isExternalLink prop +- Updated package dependencies + +## [1.5.0] - 2022-05-24 +### Changed +- Default licensing UI in My Jetpack to be enabled [#24396] +- Updated package dependencies. [#24449] + +## [1.4.1] - 2022-05-19 +### Changed +- Updated package dependencies. [#24395] + +## [1.4.0] - 2022-05-18 +### Added +- Added a filter to allow stand-alone plugins to add product specific activation routines [#24334] +- My Jetpack: Add Protect class [#24347] +- My Jetpack: compute Search plugin price based on price tier [#24337] + +### Changed +- Add tiered pricing copy and update titles for Jetpack Search [#24357] +- Hide Activate a license link if there is no user connection since user connection is required [#24251] +- My Jetpack Hybrid products: Install Jetpack if stand-alone plugin installation fails [#24335] +- Updated Jetpack Scan feature list. [#23863] [#23795] [#24361] [#24372] + +## [1.3.0] - 2022-05-10 +### Changed +- Adds from arg to connection screen in My Jetpack so that we can begin tracking connections originating from My Jetpack [#24283] +- Updated package dependencies. [#24189] +- Updated references to old licensing activation UI to licensing activation UI in My Jetpack [#24189] + +## [1.2.1] - 2022-05-04 +### Added +- Add missing JavaScript dependencies. [#24096] + +### Changed +- My Jetpack: remove duplicated site suffix stored on rawUrl. Use siteSuffix instead. [#24094] +- Updated package dependencies. [#24095] [#24198] + +### Deprecated +- Moved the options class into Connection. [#24095] + +## [1.2.0] - 2022-04-26 +### Added +- Added activation screen component to My Jetpack licensing page + +### Changed +- Updated package dependencies. +- Update package.json metadata. + +## [1.1.0] - 2022-04-19 +### Added +- Adds a skeleton for the licensing UI along with a feature flag +- Better error handling for when the WPCOM server is unreachable +- Introduced ConnectedProductOffer component + +### Changed +- Turn Search into a Hybrid Product +- Updated package dependencies +- use connected plugin list from the connection store and ask for an update after activating a product + +## [1.0.2] - 2022-04-12 +### Changed +- Updated package dependencies. + +### Fixed +- Fixed bug in checkout URLs for sites installed in subdirs. + +## [1.0.1] - 2022-04-06 +### Removed +- Removed tracking dependency. + +## [1.0.0] - 2022-04-05 +### Added +- My Jetpack: improve Product and Interstitial components. + +### Changed +- Bump My Jetpack package to major version 1.0.0. +- My Jetpack: align price boxes in the interstitial product page. +- Updated package dependencies. + +## [0.6.13] - 2022-03-31 +### Added +- Added tracking events to Plans section external links + +### Changed +- My Jetpack: tweak plans section typography and descriptive text + +## [0.6.12] - 2022-03-29 +### Added +- Add missing JS peer dependencies. + +### Changed +- Microperformance: Use === null instead of is_null +- My Jetpack: Moved in product icon components +- My Jetpack: Tweak plan sections styles/sizes +- My Jetpack: Update ProductDetailCard to use components and theme variables +- My Jetpack: Use components to render headers elements +- Use different URLs for manage and purchase links in plans section + +### Fixed +- My Jetpack: Connect Screen logos quality + +## [0.6.11] - 2022-03-23 +### Added +- My Jetpack: add error styles to the whole Product card component +- My Jetpack: Make whole Product card clickable + +### Changed +- Changed opacity of product icons to 40% +- Changed title +- Improved should_initialize method +- My Jetpack: remove dropdown from CTA button in Product cards +- My Jetpack: Use Text and CSS vars on ProductCard +- Updated Boost product icon for clarity +- Updated package dependencies. +- Updated package dependencies. +- Updated styles for each product card status +- Update organization and copy of the Plans section + +### Removed +- My Jetpack: Remove client code that allows to deactivate a product + +### Fixed +- Fix Plans section top margin for plan list +- My Jetpack: jetpack_my_jetpack_should_initialize filter now respected when set to true. + +## [0.6.10] - 2022-03-15 +### Changed +- Make Backup go through the purchase flow after activation +- My Jetpack: Use ThemeProvider instead base-styles +- Updated package dependencies + +### Removed +- Removed Beta badge from menu item + +## [0.6.9] - 2022-03-09 +### Changed +- Updated package dependencies. + +## [0.6.8] - 2022-03-08 +### Added +- Added connected plugins slugs to My Jetpack tracking events +- Add link to jetpack.com in the footer +- My Jetpack: Add jetpack features link on connection screen +- My Jetpack: tidy Product card component +- My Jetpack: update Spinner in checkout button + +### Changed +- Components: update attributes used within the Button component to match recent deprecations and changes. +- My Jetpack: Add Connected Product Card stories +- My Jetpack: Add connection screen footer +- My Jetpack: clean/tidy Product data +- My Jetpack: Remove Layout component +- Only consider Backup product active when the plan is purchased + +### Fixed +- Fixed Backup flow when Jetpack plugin is active +- My Jetpack: align CTA buttons of My Jetpack overview +- My Jetpack: Fix button height in the Interstitial pages + +## [0.6.7] - 2022-03-02 +### Added +- Add My Jetpack action link to all Jetpack plugins +- My Jetpack: Handle cosmetic tweaks +- My Jetpack: Pass requiresUserConnection to ConnectionStatusCard + +### Changed +- Refactor and simplify Products class +- Updated package dependencies. + +### Fixed +- Disable browser cache for My Jetpack +- My Jetpack: fix products card section story +- My Jetpack: fix stories for the Interstitial pages + +## [0.6.6] - 2022-02-28 +### Fixed +- Re-doing 0.6.5 to fixup bad release. + +## [0.6.5] - 2022-02-28 +### Changed +- Tweak product card box model. + +### Fixed +- Use namespace in My Jetpack REST Products class to prevent fatal + +## [0.6.4] - 2022-02-25 +### Added +- Activate Jetpack plugin from Extras product card +- Added list of connected plugins to Disconnect dialog in My Jetpack +- Add Extras interstitial page +- My Jetpack: Handle cosmetic tweaks +- My Jetpack: Remove global notices when in my jetpack page +- My Jetpack: set height of Jetpack logo in the footer +- My Jetpack: tweak height of Jetpack Logo +- My Jetpack: update Product logos + +### Changed +- Disable My Jetpack on MS +- My Jetpack: compress extras product image +- Updated package dependencies. +- Update My Jetpack dashboard headline + +### Removed +- Remove unnecessary line from My Jetpack Initial state + +### Fixed +- Fix beta badge for RTL languages +- Handle plugin activating from Hybrid class +- Memoized RecordEvent from usAnalytics hook +- My Jetpack: Fix post activation url redirect +- My Jetpack: Move product list that requires user connection to selector +- Products::get_products_names should not load all product information +- Update automattic logo href in the footer + +## [0.6.3] - 2022-02-22 +### Changed +- Updated inline documentation + +### Fixed +- Use Jetpack namespace to fix fatal error + +## [0.6.2] - 2022-02-22 +### Added +- Add Beta badge +- Add Extras class +- Apply coupon discount to Product price when it exists +- Filesystem write access to the initial state +- Improve Product detail layout +- Implement close link on layout nav +- Prevent calling activation hook when activating backup + +### Changed +- Bump package versions. +- Improve My Jetpack link styles +- Improve redirect process after installing Product +- Fix interstitial CTA buttons layout +- Move from isPressed to CSS vars +- Redirect connect user to connection interstitial +- Point the link of the Manage button of CRM to its dashboard +- Redirect to post_activation_url after product activation from iterstitial screen +- Remove conditional loading depending on constant +- Send My Jetpack version with fired events +- Update the layout of interstitial page when it has an upgradable bundle + +### Fixed +- Check if product is active before checking if requires plan +- Fix check for plugin installation for hybrid products +- Fix click on security and add click on My Jetpack interstitial +- Fix clicks on VideoPress and CRM cards +- Fix Product prices +- Make Scan and Search interstitials install the plugin +- Purchases: ensure we retrieve translated version of active purchases +- Return needs purchase status for products module + +## [0.6.1] - 2022-02-16 +### Added +- Add Anti-Spam Product detail card +- Add CRM interstitial page +- Added wpcom plan slug to product info +- add manage and post activation urls +- Add Scan product: interstitial, route, data, etc... +- Add Security Product Bundle +- Add VideoPress data +- Add VideoPress interstitial cmp. Story. +- Add `#/add-videopress` route +- Change the discount value for all Products to 50 +- checks and activation for Security Bundle +- consume prices dynamically +- Do not show Porduct price when plan has required plan +- Finish Backup, Anti-Spam and Scan interstitial pages +- Fire Tracks Event when user clicks on Product Interstitial Back link +- Install proudcts from interstitial pages +- Make click on Fix connection show connection route +- package version to main class +- Pull product discount from wpcom +- Refactoring -> add icons component -> tweak icons for interstitial pages +- Register `#/add-anti-spam` route. Connect with interstitial page +- Restore Security bundle card in the UI +- Set default values for product data in the client (custom hook) +- set product status as error if active and requiring a missing user connection +- Set properly the checkout link for Products +- Set unlink=1 in the checkout URL when the user is not connected +- Tidy Product stories +- Update Backup product data. Tweak Icon. +- Update mock data for Search product. useMyJetpackNavigate() hook + +### Changed +- Adapt Scan actiavtion behavior as it is not a module +- Add global notices for activate/deactivate failures +- Add manage redirect +- Apply correct style for CTA buttons on Interstitial +- Avoid usage of 100vh on layout +- Fix setting height of the Product title in the detail component +- Implement is fulfilled handler for product resolver +- Improve global notice layout +- Reduce size of boost and search interstitial images +- Update structure with Layout component +- Only pass a productUrl if the product is not free on interstitial pages +- Only show the deactivate action when it makes sense +- Pass slug prop to event firing on product card button actions instead of name +- Remove unnecessary payload from request to activate or deactivate a product +- Replace renderActionButton function for ActionButton component +- Updated package dependencies. +- Use useMyJetpackNavigate when it's worth it + +### Fixed +- Fixed connection check labels and error message +- Fix upgradability for anti-spam and backup products +- Remove duplicted Icon in Product Card story +- Use key when looping through product detail icons + +## [0.6.0] - 2022-02-09 +### Added +- Add Boost interstitial cmp. +- Add has_required_plan to product info and implement method in Search +- Add Product princign harcoded data +- Add search product data +- Add title and features to products data +- anti spam product class +- Connect Boost card with the interstitial page via /add-boost root +- Fire Tracks event when clicking CTA button on product Interstitial page +- Fire Tracks event when clicking Manage button on product card +- Fire Tracks event when clickn Add link on My Jetpack product card +- Fire Tracks event when showing the Interstitial page +- Implement Free price for Boost product +- Implement Search product interstitial +- Introduce basic Layout component. Add GoBackLink component +- Introduce ProductDetailCard component +- My Jetpack: Add Connection screen +- Pass slug prop to ProductCard' +- Plan verification for Backup and Scan +- Restore getProduct() resolver +- Set the checkout URL for the Product detail component +- useCallback for functions that are bound to onEvents + +### Changed +- My Jetpack: Implement handler of connection notices +- My Jetpack: Update notice style and implements redirect for connection route +- Support multiple possible folder for each plugin +- Updated package dependencies + +### Removed +- dependency from search package + +### Fixed +- Fix My Jetpack's reducer for SET_PRODUCT_STATUS +- Fix the redirect URL value +- Show discounted price in Product Detail card +- typo + +## [0.5.0] - 2022-02-02 +### Added +- Added plugin installation functionality +- Adds Tracks events for activating and deactivating products from the product cards +- Fixes stories for ProductCard component +- Handle when site is not connected +- Initial approach to handle global notice +- Module Products +- My Jetpack: Add route handling +- My Jetpack: connect all product cards with data provider +- My Jetpack: connect Backup product class with Product class. Add long description and features fields. +- My Jetpack: handle redirect when no connection #22549 +- My Jetpack: reorganize stores by project/name +- Remove getProduct() resolver +- Support to Hybrid products +- Tweak dimms of the Product card status +- Update data handling - Implement request status in Product Card +- User connection requirement to product info +- uses the Plugin Installer package to safely checks plugins statuses + +### Changed +- Added filter for disabling the initialization of the My Jetpack package +- Build: remove unneeded files from production build. +- Do not initialize My Jetpack id site is not connected +- My Jetpack: Refactor styles to use layout components and theme provider +- My Jetpack: Update gap between product cards section +- Pick API root and nonce values from a new window var myJetpackRest +- Updated package dependencies. +- Update plugin absent status consistently + +### Fixed +- added unit test mock for new global variable myJetpackRest +- Fix tests +- Fix unsafe optional chaining. +- my-jetpack: fix tracking event when activating product +- Resolved minor code standard violation after implementing a stricter rule. + +## [0.4.0] - 2022-01-25 +### Added +- add API endpoints to manipulate products +- Added css module for My Jetpack Plans Section +- Added useAnalytics hook +- Added Visitor class for status regarding the site visitor. +- Add first data approach +- Add Products and REST_Products basic classes +- Adds very basic product cards section component to my jetpack +- My Jetpack: Add Product Card component +- My Jetpack: check user connectivity before to hit wpcom side +- My Jetpack: Implement data handling for enable/disable products +- Removed endpoint plans superseded by purchases + +### Changed +- Add Connections Section wrapping the Connection Status Card to My Jetpack +- Build: do not ship raw files in production bundle. + +### Removed +- Remove unused usePlans() custom react hook + +### Fixed +- Fixed svg attribute strokeWidth for Boost Card + +## [0.3.3] - 2022-01-18 +### Added +- Added redux store specific to my-jetpack +- Implement plans list properly in the PlansSection +- My Jetpack: Add scripts for JS tests +- My Jetpack: Include wordpress components as dep +- Reduxify purchases data + +### Changed +- General: update required node version to v16.13.2 +- Properly style the Plans Section according to proposed design +- Updated package dependencies. + +## [0.3.2] - 2022-01-13 +### Added +- My Jetpack: add story to `<PlanSection />` component +- My Jetpack: first PlanSection implementation + +### Fixed +- Rename method enqueue_scritps to enqueue_scripts + +## [0.3.1] - 2022-01-11 +### Added +- Add devvelopment testing instructions to doc. + +### Changed +- Updated package dependencies. + +### Removed +- Remove use of deprecated `~` in sass-loader imports. + ## [0.3.0] - 2022-01-04 ### Changed - Drop isRegistered and isUserConnected params from ConnectionStatusCard component @@ -44,6 +493,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Created package +[1.6.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.5.0...1.6.0 +[1.5.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.4.1...1.5.0 +[1.4.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.4.0...1.4.1 +[1.4.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.3.0...1.4.0 +[1.3.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.2.1...1.3.0 +[1.2.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.2.0...1.2.1 +[1.2.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.0.2...1.1.0 +[1.0.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.0.0...1.0.1 +[1.0.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.13...1.0.0 +[0.6.13]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.12...0.6.13 +[0.6.12]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.11...0.6.12 +[0.6.11]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.10...0.6.11 +[0.6.10]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.9...0.6.10 +[0.6.9]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.8...0.6.9 +[0.6.8]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.7...0.6.8 +[0.6.7]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.6...0.6.7 +[0.6.6]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.5...0.6.6 +[0.6.5]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.4...0.6.5 +[0.6.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.3...0.6.4 +[0.6.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.2...0.6.3 +[0.6.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.1...0.6.2 +[0.6.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.0...0.6.1 +[0.6.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.5.0...0.6.0 +[0.5.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.4.0...0.5.0 +[0.4.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.3.3...0.4.0 +[0.3.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.3.2...0.3.3 +[0.3.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.3.1...0.3.2 +[0.3.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.3.0...0.3.1 [0.3.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.2.0...0.3.0 [0.2.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.1.3...0.2.0 [0.1.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.1.2...0.1.3 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/_inc/admin.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/_inc/admin.jsx deleted file mode 100644 index feb7a69c..00000000 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/_inc/admin.jsx +++ /dev/null @@ -1,25 +0,0 @@ -/** - * External dependencies - */ -import ReactDOM from 'react-dom'; -import React from 'react'; - -/** - * Internal dependencies - */ -import MyJetpackScreen from './components/my-jetpack-screen'; - -/** - * The initial renderer function. - */ -function render() { - const container = document.getElementById( 'my-jetpack-container' ); - - if ( null === container ) { - return; - } - - ReactDOM.render( <MyJetpackScreen />, container ); -} - -render(); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/_inc/components/my-jetpack-screen/index.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/_inc/components/my-jetpack-screen/index.jsx deleted file mode 100644 index 8bfe39f5..00000000 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/_inc/components/my-jetpack-screen/index.jsx +++ /dev/null @@ -1,63 +0,0 @@ -/* global myJetpackInitialState */ - -/** - * External dependencies - */ -import React, { useCallback } from 'react'; -import { __ } from '@wordpress/i18n'; -import { - AdminSection, - AdminSectionHero, - AdminPage, - Row, - Col, -} from '@automattic/jetpack-components'; -import { ConnectionStatusCard } from '@automattic/jetpack-connection'; - -import './style.scss'; - -/** - * The My Jetpack App Main Screen. - * - * @returns {object} The MyJetpackScreen component. - */ -export default function MyJetpackScreen() { - const redirectAfterDisconnect = useCallback( () => { - window.location = myJetpackInitialState.topJetpackMenuItemUrl; - }, [] ); - - return ( - <div className="jp-my-jetpack-screen"> - <AdminPage> - <AdminSectionHero> - <Row> - <Col lg={ 12 } md={ 8 } sm={ 4 }> - <h1> - { __( - 'Manage your Jetpack plan and products all in one place', - 'jetpack-my-jetpack' - ) } - </h1> - </Col> - </Row> - </AdminSectionHero> - - <AdminSection> - <Row> - <Col lg={ 6 } sm={ 4 }> - <h1>{ __( 'My Plan', 'jetpack-my-jetpack' ) }</h1> - </Col> - <Col lg={ 6 } sm={ 4 }> - <ConnectionStatusCard - apiRoot={ myJetpackInitialState.apiRoot } - apiNonce={ myJetpackInitialState.apiNonce } - redirectUri={ myJetpackInitialState.redirectUri } - onDisconnected={ redirectAfterDisconnect } - /> - </Col> - </Row> - </AdminSection> - </AdminPage> - </div> - ); -} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/_inc/components/my-jetpack-screen/style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/_inc/components/my-jetpack-screen/style.scss deleted file mode 100644 index 358c0418..00000000 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/_inc/components/my-jetpack-screen/style.scss +++ /dev/null @@ -1 +0,0 @@ -@import '~@automattic/jetpack-base-styles/style'; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/apple-92dacafad84e79708a74.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/apple-92dacafad84e79708a74.svg new file mode 100644 index 00000000..478fcfd9 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/apple-92dacafad84e79708a74.svg @@ -0,0 +1,3 @@ +<svg width="14" height="17" viewBox="0 0 14 17" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M9.3584 2.68018C9.85059 2.08545 10.1992 1.26514 10.1992 0.444824C10.1992 0.332031 10.189 0.219238 10.1685 0.126953C9.36865 0.157715 8.39453 0.660156 7.82031 1.33691C7.35889 1.85986 6.93848 2.68018 6.93848 3.51074C6.93848 3.63379 6.95898 3.75684 6.96924 3.79785C7.02051 3.80811 7.10254 3.81836 7.18457 3.81836C7.9126 3.81836 8.8252 3.33643 9.3584 2.68018ZM9.92236 3.99268C8.7124 3.99268 7.72803 4.73096 7.10254 4.73096C6.43604 4.73096 5.5542 4.03369 4.49805 4.03369C2.49854 4.03369 0.478516 5.69482 0.478516 8.80176C0.478516 10.75 1.22705 12.7905 2.1499 14.1133C2.94971 15.231 3.64697 16.1538 4.6416 16.1538C5.63623 16.1538 6.06689 15.4873 7.29736 15.4873C8.54834 15.4873 8.83545 16.1333 9.92236 16.1333C11.0093 16.1333 11.7373 15.1387 12.4141 14.1543C13.1831 13.0264 13.501 11.9395 13.5112 11.8779C13.4497 11.8574 11.3682 11.0166 11.3682 8.6377C11.3682 6.57666 13.0088 5.66406 13.1011 5.59229C12.0244 4.03369 10.3838 3.99268 9.92236 3.99268Z" fill="black"/> +</svg> diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/boost-a54137485af36fdffe9c.png b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/boost-a54137485af36fdffe9c.png Binary files differnew file mode 100644 index 00000000..dd818e46 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/boost-a54137485af36fdffe9c.png diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/connect-f27775ac15cf885713c2.png b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/connect-f27775ac15cf885713c2.png Binary files differnew file mode 100644 index 00000000..66f8710a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/connect-f27775ac15cf885713c2.png diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/crm-7e7684ae2c40327d8fed.png b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/crm-7e7684ae2c40327d8fed.png Binary files differnew file mode 100644 index 00000000..cfec3eed --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/crm-7e7684ae2c40327d8fed.png diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/extras-26daf36507504c96d066.png b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/extras-26daf36507504c96d066.png Binary files differnew file mode 100644 index 00000000..d4d49627 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/extras-26daf36507504c96d066.png diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/google-dec2a429bf1d8e83f9ad.svg b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/google-dec2a429bf1d8e83f9ad.svg new file mode 100644 index 00000000..5794583d --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/google-dec2a429bf1d8e83f9ad.svg @@ -0,0 +1 @@ +<svg class="social-icons social-icons__google social-icons--enabled" width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M19.6 10.227c0-.709-.064-1.39-.182-2.045H10v3.868h5.382a4.6 4.6 0 0 1-1.996 3.018v2.51h3.232c1.891-1.742 2.982-4.305 2.982-7.35z" fill="#4285F4"></path><path d="M10 20c2.7 0 4.964-.895 6.618-2.423l-3.232-2.509c-.895.6-2.04.955-3.386.955-2.605 0-4.81-1.76-5.595-4.123H1.064v2.59A9.996 9.996 0 0 0 10 20z" fill="#34A853"></path><path d="M4.405 11.9c-.2-.6-.314-1.24-.314-1.9 0-.66.114-1.3.314-1.9V5.51H1.064A9.996 9.996 0 0 0 0 10c0 1.614.386 3.14 1.064 4.49l3.34-2.59z" fill="#FBBC05"></path><path d="M10 3.977c1.468 0 2.786.505 3.823 1.496l2.868-2.868C14.959.99 12.695 0 10 0 6.09 0 2.71 2.24 1.064 5.51l3.34 2.59C5.192 5.736 7.396 3.977 10 3.977z" fill="#EA4335"></path></g></svg> diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png Binary files differnew file mode 100644 index 00000000..ea421dc0 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-success-cad524ede4e793cc0ece.png b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-success-cad524ede4e793cc0ece.png Binary files differnew file mode 100644 index 00000000..a2562d9b --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-success-cad524ede4e793cc0ece.png diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/search-f9756bd9c926d905fe70.png b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/search-f9756bd9c926d905fe70.png Binary files differnew file mode 100644 index 00000000..0f77309b --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/search-f9756bd9c926d905fe70.png diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/videopress-9591093a9a238cc48a35.png b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/videopress-9591093a9a238cc48a35.png Binary files differnew file mode 100644 index 00000000..9a8f1dfb --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/videopress-9591093a9a238cc48a35.png diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/wordpress-e099b30cc40508916516.png b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/wordpress-e099b30cc40508916516.png Binary files differnew file mode 100644 index 00000000..8dea0761 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/wordpress-e099b30cc40508916516.png diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.asset.php index aefe6276..cf0bd12e 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.asset.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.asset.php @@ -1 +1 @@ -<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '29d086a288ded38b2a57d1829d39cc12');
\ No newline at end of file +<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '979a27e30e0c8a625807'); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.css index 319c91ee..2c7a5ce7 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.css +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.css @@ -1 +1 @@ -.O5NYbFTsxmrm4P2SIdOC{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.rkV4U_hzC04NwXFQcTHl{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.rkV4U_hzC04NwXFQcTHl{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.rkV4U_hzC04NwXFQcTHl{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.G81E6mesnld_OhhOvz_F{grid-column-end:span 1}.SfCZpjwiu2F0KDjGIXEA{grid-column-end:span 2}.qPxwbSu_GTDTz_8jFHJD{grid-column-end:span 3}.xYAWQ0wk6FPfZOZQgFiw{grid-column-end:span 4}@media(min-width:600px){.zwZjA7ofpMucaB_UzG48{grid-column-end:span 1}.YfwKGGBEqiINFYy6ZpKM{grid-column-end:span 2}.pcHQbVFRxA_OvNRQ2OwP{grid-column-end:span 3}.U_LJMBlRZ8ItXZuvCXGg{grid-column-end:span 4}.st_7w_Ja1Gp2AgGaTysO{grid-column-end:span 5}.gQsaHmJo6Gp7Yq9IB9Sg{grid-column-end:span 6}.P0a4FWsiJJmR6bySI8QC{grid-column-end:span 7}.UxSHj7jyDp6sGKHILNRc{grid-column-end:span 8}}@media(min-width:960px){.TExt5ebNqUrEn2NzeDDh{grid-column-end:span 1}.cdwvRRac4c2djSpHfOpF{grid-column-end:span 2}.hvRpxlyFY9BQIDdEGTjg{grid-column-end:span 3}.Ev9JGJi3yKkBq6cW3Xge{grid-column-end:span 4}.mhL__tIHFH_tViX5718D{grid-column-end:span 5}.X1lGIxHHxsFl_39u4Px6{grid-column-end:span 6}.pc5UnY_DzsSDkyih78Ti{grid-column-end:span 7}.QCjBtfnG3u20FwoDd59Z{grid-column-end:span 8}.MX1aL3BeJpoSE0aXghp0{grid-column-end:span 9}.h_JAcO8a8ClV2LmTWsMz{grid-column-end:span 10}.gKlDMi0N7LOd9q8uJHi5{grid-column-end:span 11}.KZWhYB7r6TG75uJu2LsQ{grid-column-end:span 12}}@media(max-width:960px){.G6NxfG2gGwvEYb0aGdPJ{display:none}}@media(max-width:600px){.aceZPGfrg7IoR0Vu7ZJg{display:none}}.MZSHJVi991kNJhn_Xnip{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);display:block;margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.MZSHJVi991kNJhn_Xnip span{display:block}.MZSHJVi991kNJhn_Xnip span:last-of-type{font-weight:600}.MZSHJVi991kNJhn_Xnip:focus span:last-of-type,.MZSHJVi991kNJhn_Xnip:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.MZSHJVi991kNJhn_Xnip:focus:after,.MZSHJVi991kNJhn_Xnip:hover:after{transform:translateY(-50%) translateX(8px)}.MZSHJVi991kNJhn_Xnip:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.EZ590eIMC5y_t1_gWRua{margin-left:-20px}.BYzOly4G7Gry9wdRH0AY{background-color:#fff;padding:40px 0}.iwMEh2CwJ_r23Y9sVcJ1,.O8YnwnZegI89S2Q3k5Qn{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.EC1Yirv2kOgRU77F2XRd{grid-column-end:span 1}.FHZqFvZXEDJ9mpOm7CeY{grid-column-end:span 2}.VOmONLKUkcSrIRYmX6YZ{grid-column-end:span 3}.eECO55N5YGkBB3tKa0If{grid-column-end:span 4}@media(min-width:600px){.u3ZB3zRkuglILO6FSIrx{grid-column-end:span 1}.iZnPl6piWO_GqHn16XKi{grid-column-end:span 2}.WWctfqi1wHZDWrue8GIt{grid-column-end:span 3}.p678NN_M0K78Kpprfndu{grid-column-end:span 4}._6D2TXtGKmepmwrxSf5DW{grid-column-end:span 5}.cWORs5VDjuStXsiVPtiO{grid-column-end:span 6}.yJsc8qt82L9miwDoe2Y2{grid-column-end:span 7}.hD6bXWfNn5elhKCaBFTD{grid-column-end:span 8}}@media(min-width:960px){.k9j6XIJdXbQ5YNyU8sNH{grid-column-end:span 1}.TnVGX0JHm_muRRcmYYwV{grid-column-end:span 2}.VILIswQXi8XzNJ3BqePc{grid-column-end:span 3}.h7mXuoRFWMGCiWYH4Ij1{grid-column-end:span 4}.uHYkk5STnhikqYMIxtE1{grid-column-end:span 5}.E8zp8nDOvAQ7VHsXKJJw{grid-column-end:span 6}.jwOhfvvsXGTCtHfB2854{grid-column-end:span 7}.DmSEZVFn_2XNNKJGgkXw{grid-column-end:span 8}.RdgOIY1qMZ8eqAeNSGNw{grid-column-end:span 9}.XBQd6xiLipeHg0O6cf7N{grid-column-end:span 10}.JyQ6Tbn3FCHfrCEyWrAr{grid-column-end:span 11}.fzJ_qaXYWs3EWQEupbLD{grid-column-end:span 12}}@media(max-width:960px){.LE2ZLIt_Y0slsr6TSmqe{display:none}}@media(max-width:600px){.vYxwZbK_covZoLjDe3BM{display:none}}.fmzqGXmbTSiUblRujgqB{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);display:block;margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.fmzqGXmbTSiUblRujgqB span{display:block}.fmzqGXmbTSiUblRujgqB span:last-of-type{font-weight:600}.fmzqGXmbTSiUblRujgqB:focus span:last-of-type,.fmzqGXmbTSiUblRujgqB:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.fmzqGXmbTSiUblRujgqB:focus:after,.fmzqGXmbTSiUblRujgqB:hover:after{transform:translateY(-50%) translateX(8px)}.fmzqGXmbTSiUblRujgqB:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.HwO79godDUI97Xub9ey4{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.HwO79godDUI97Xub9ey4{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.HwO79godDUI97Xub9ey4{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.WcIPVMUrQMdwzisuVSh7{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.Nxx7T20LwPUQPXCSDMfA{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.Nxx7T20LwPUQPXCSDMfA{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.Nxx7T20LwPUQPXCSDMfA{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.MnTtKIHRyzXYoesgRCgm{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);display:block;margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.MnTtKIHRyzXYoesgRCgm span{display:block}.MnTtKIHRyzXYoesgRCgm span:last-of-type{font-weight:600}.MnTtKIHRyzXYoesgRCgm:focus span:last-of-type,.MnTtKIHRyzXYoesgRCgm:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.MnTtKIHRyzXYoesgRCgm:focus:after,.MnTtKIHRyzXYoesgRCgm:hover:after{transform:translateY(-50%) translateX(8px)}.MnTtKIHRyzXYoesgRCgm:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.mmVmo1nZYrRywmnSKQFx{grid-column-end:span 1}.UrIp26XpdUSMJft8YxdC{grid-column-end:span 2}.pMXlFWglEDyK6MbwJ8sX{grid-column-end:span 3}.P5H1ohz9m5_rEqZFAkFm{grid-column-end:span 4}@media(min-width:600px){.ofLUn8LwR3LLeWl8tPdU{grid-column-end:span 1}.fq1Z8JYbcrrXavvSfzKk{grid-column-end:span 2}.jq9gui11HqTDfI7tXH1d{grid-column-end:span 3}.mVYkSRC7j44WiWLZHOnM{grid-column-end:span 4}.S3wOGmx7YLTrqz_bcLth{grid-column-end:span 5}.Y3GW3wokLgm9jnX78Uwk{grid-column-end:span 6}.ShMEdZjpjdYj7mCQzrSO{grid-column-end:span 7}.nfBAID75QGC1VZ8t0RfR{grid-column-end:span 8}}@media(min-width:960px){.Vr2EQcrmKOPJtFU72Vv2{grid-column-end:span 1}.CTS6MNweODFo4ZxcT0iV{grid-column-end:span 2}.XTISRluUo3o5xxnPNu09{grid-column-end:span 3}.c_EtRaSOJafAl5r9WkBm{grid-column-end:span 4}.HcpW_q5aO8Bf_ngIjyjv{grid-column-end:span 5}.XF3r0hMrFrrmxH5TJee0{grid-column-end:span 6}.Jl9ognyJ9XOZ6g0BTzLf{grid-column-end:span 7}._8w8oD2R9CVt9AU4PvUy{grid-column-end:span 8}.ltOXxurwUtxy7XIR_loo{grid-column-end:span 9}.bKUzzGEJ3wCoAOZZvVCK{grid-column-end:span 10}.GltQVCPa1x4tZ7sWFg1v{grid-column-end:span 11}.UzWicuFiKrGgMEjmRAFA{grid-column-end:span 12}}@media(max-width:960px){.CDwHAcVQxDeV2mFXS1Dz{display:none}}@media(max-width:600px){.sr1184KrdJ0UtgNsMQnR{display:none}}.jp-dashboard-footer{align-items:center;color:#000;display:flex;flex-flow:row wrap;justify-content:space-between;max-width:1128px;width:100%}.jp-dashboard-footer__jetpack-symbol,.jp-dashboard-footer__module-name{display:inline-block;vertical-align:middle}.jp-dashboard-footer__module-name{font-size:12px;font-weight:600;margin-left:5px}.K6gniZequRm1zBi4xa2G{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.vickZxEIl6kGZp7KkFYF{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.vickZxEIl6kGZp7KkFYF{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.vickZxEIl6kGZp7KkFYF{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.U2ZD1antXfCcQlBdFwyw{grid-column-end:span 1}.caLSPVQ3JP3b2Ia68Seq{grid-column-end:span 2}.h6FKJdwoY_zIXh6pEj1U{grid-column-end:span 3}.GkjDOzh_5n5VxKrqEW_I{grid-column-end:span 4}@media(min-width:600px){.V2HSxZHesNOXMBWOmdFG{grid-column-end:span 1}.i3fz9zvErDyXYherb6Ew{grid-column-end:span 2}._3bKcKfanUgurPMcHEiV{grid-column-end:span 3}.U44hqBGsmVA1lI9R2ZnH{grid-column-end:span 4}.AzaRYYQQYJjKUF9D87mw{grid-column-end:span 5}.sag3QKXTxIQXPPjmbrAl{grid-column-end:span 6}.ifY5fUWFNROS_F7Jys9v{grid-column-end:span 7}.nZFgLvw9LsUJnEViXnJZ{grid-column-end:span 8}}@media(min-width:960px){.Tqir6CbiyHOgYmsAgY57{grid-column-end:span 1}.VeVLz3DEagxiXMMPEOCe{grid-column-end:span 2}.G3R07cw2eP3D3juW3A3l{grid-column-end:span 3}.eQ3UseyneBNu_ZLuqSzg{grid-column-end:span 4}.VlgV8xjgkGoOLJShoyNM{grid-column-end:span 5}.DJCwqamaIDFQoj0jEgBc{grid-column-end:span 6}.CxtXPQUYJfNUQVn3y2y_{grid-column-end:span 7}.BroOgbyuFxoSv48H70B5{grid-column-end:span 8}.KnUcRFDSsxeb_z46ajNY{grid-column-end:span 9}.bXiAAxiM2mhcI43ET0pp{grid-column-end:span 10}.ipYVW2jwG2cFjIHpnQk2{grid-column-end:span 11}.KcREgfiJ4ix9nAvNAXqQ{grid-column-end:span 12}}@media(max-width:960px){.qSfEJeFAh4WmcPtmo8qe{display:none}}@media(max-width:600px){._RxxiRFsUS3nYTZhkprA{display:none}}.RSw9xhnEr8xpkX3hPPaM{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);display:block;margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.RSw9xhnEr8xpkX3hPPaM span{display:block}.RSw9xhnEr8xpkX3hPPaM span:last-of-type{font-weight:600}.RSw9xhnEr8xpkX3hPPaM:focus span:last-of-type,.RSw9xhnEr8xpkX3hPPaM:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.RSw9xhnEr8xpkX3hPPaM:focus:after,.RSw9xhnEr8xpkX3hPPaM:hover:after{transform:translateY(-50%) translateX(8px)}.RSw9xhnEr8xpkX3hPPaM:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.kEBaF5NOHtQsQn5jfOEA{background:var(--jp-white-off);padding:48px 0 64px}.kEBaF5NOHtQsQn5jfOEA h1,.kEBaF5NOHtQsQn5jfOEA h2,.kEBaF5NOHtQsQn5jfOEA h3,.kEBaF5NOHtQsQn5jfOEA h4,.kEBaF5NOHtQsQn5jfOEA h5,.kEBaF5NOHtQsQn5jfOEA h6{line-height:1.2;margin-top:0}._UqttTwRJeajPRpRGZPJ{background-color:#fff;padding:64px 0}._UqttTwRJeajPRpRGZPJ h1,._UqttTwRJeajPRpRGZPJ h2,._UqttTwRJeajPRpRGZPJ h3,._UqttTwRJeajPRpRGZPJ h4,._UqttTwRJeajPRpRGZPJ h5,._UqttTwRJeajPRpRGZPJ h6{line-height:1.2;margin-top:0}.jp-connection-status-card h3{color:var(--jp-black);font-size:36px;font-weight:400;line-height:40px;margin:0}.jp-connection-status-card a,.jp-connection-status-card a:active,.jp-connection-status-card a:hover{color:var(--jp-black)}.jp-connection-status-card p{color:var(--jp-black);margin:16px 0}.jp-connection-status-card a,.jp-connection-status-card li,.jp-connection-status-card p{font-size:16px;line-height:24px}.jp-connection-status-card--status{align-items:center;display:flex;margin:24px 0 24px -6px}.jp-connection-status-card--cloud{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDIiIGhlaWdodD0iNDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PG1hc2sgaWQ9ImEiIG1hc2stdHlwZT0iYWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjciIHk9IjkiIHdpZHRoPSIyOCIgaGVpZ2h0PSIyMSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMC4zMzMgMTcuNjk3di0uMDhjMC00LjI1My0zLjc2LTcuNy04LjQtNy43LTMuOTE2IDAtNy4yMDYgMi40NTctOC4xMzYgNS43OGE2LjM4NiA2LjM4NiAwIDAgMC0uMjY0LS4wMDVDOS45MjUgMTUuNjkyIDcgMTguNzA4IDcgMjIuNDI5czIuOTI1IDYuNzM4IDYuNTMzIDYuNzM4SDI5LjRjMy4wOTMgMCA1LjYtMi41ODYgNS42LTUuNzc1IDAtMi44NjEtMi4wMTgtNS4yMzctNC42NjYtNS42OTVaIiBmaWxsPSIjZmZmIi8+PC9tYXNrPjxnIG1hc2s9InVybCgjYSkiPjxwYXRoIGQ9Im0zMC4zMzMgMTcuNjk3LTIuNjI1LS4wMy0uMDI1IDIuMjM1IDIuMjAyLjM4MS40NDgtMi41ODZabS0xNi41MzctMi0uMTA3IDIuNjIzIDIuMDc1LjA4NS41Ni0yLTIuNTI4LS43MDhabS0uMjYzIDEzLjQ3djIuNjI1aC4wMDhsLS4wMDgtMi42MjVabS4wNCAwdi0yLjYyNWgtLjAwOWwuMDA4IDIuNjI1Wm0xNS43OTUgMCAuMDE1LTIuNjI1aC0uMDE1djIuNjI1Wm0zLjU5LTExLjQ0MXYtLjExaC01LjI1di4wNTJsNS4yNS4wNThabTAtLjExYzAtNS45MTItNS4xNTUtMTAuMzI0LTExLjAyNS0xMC4zMjR2NS4yNWMzLjQxIDAgNS43NzUgMi40ODIgNS43NzUgNS4wNzVoNS4yNVpNMjEuOTMzIDcuMjkzYy00Ljk4NCAwLTkuMzg4IDMuMTM5LTEwLjY2NCA3LjY5OGw1LjA1NSAxLjQxNWMuNTg1LTIuMDg5IDIuNzYyLTMuODYzIDUuNjEtMy44NjN2LTUuMjVabS04LjAzIDUuNzgyYTkuMTExIDkuMTExIDAgMCAwLS4zNy0uMDA3djUuMjVjLjA1MyAwIC4xMDUuMDAxLjE1Ni4wMDNsLjIxNS01LjI0NlptLS4zNy0uMDA3Yy01LjEzMyAwLTkuMTU4IDQuMjY4LTkuMTU4IDkuMzYyaDUuMjVjMC0yLjM0OCAxLjgyNS00LjExMiAzLjkwOC00LjExMnYtNS4yNVptLTkuMTU4IDkuMzYyYzAgNS4wOTUgNC4wMjUgOS4zNjMgOS4xNTggOS4zNjN2LTUuMjVjLTIuMDgzIDAtMy45MDgtMS43NjUtMy45MDgtNC4xMTNoLTUuMjVabTkuMTY2IDkuMzYzaC4wNGwtLjAxNy01LjI1aC0uMDM5bC4wMTYgNS4yNVptLjAzMSAwaDE1Ljc5NnYtNS4yNUgxMy41NzJ2NS4yNVptMTUuODI3LTUuMjVoLS4wMTZsLS4wMyA1LjI1aC4wNDZ2LTUuMjVabTIuOTc1LTMuMTVjMCAxLjgxNi0xLjQwNyAzLjE1LTIuOTc1IDMuMTV2NS4yNWM0LjYxOCAwIDguMjI1LTMuODM4IDguMjI1LTguNGgtNS4yNVptLTIuNDg5LTMuMTA5YzEuMzU1LjIzNSAyLjQ5IDEuNDg4IDIuNDkgMy4xMDloNS4yNWMwLTQuMTAyLTIuOTAyLTcuNi02Ljg0NC04LjI4MmwtLjg5NiA1LjE3M1oiIGZpbGw9IiMxRTFFMUUiLz48L2c+PC9zdmc+);height:42px;margin-right:4px;width:42px}.jp-connection-status-card--jetpack-logo{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE2IDMyYzguODM3IDAgMTYtNy4xNjMgMTYtMTZTMjQuODM3IDAgMTYgMCAwIDcuMTYzIDAgMTZzNy4xNjMgMTYgMTYgMTZaIiBmaWxsPSIjMDAwIi8+PHBhdGggZD0iTTE2Ljc5NCAxMy4zMTN2MTUuNTExbDgtMTUuNTEyaC04Wk0xNS4xNzUgMTguNjU3VjMuMTc2bC03Ljk2OSAxNS40OGg3Ljk3WiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==);height:32px;margin-left:11px;width:32px}.jp-connection-status-card--btn-connect-user{background:var(--jp-black)!important;border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection-status-card--avatar{background-color:var(--jp-white);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='16' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.498 27.123C6.038 24.165 10.916 21.5 16 21.5c5.084 0 9.963 2.665 11.502 5.623a15.952 15.952 0 0 1-11.257 4.875L16 32l-.245-.002a15.952 15.952 0 0 1-11.257-4.875zM16 8a6 6 0 1 1 0 12 6 6 0 0 1 0-12z' fill='%23A2AAB2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;border:0;border-radius:20px;height:32px;margin-left:-10px;width:32px}.jp-connection-status-card--line{border-top:2px solid var(--jp-black);height:0;width:67px}.jp-connection-status-card--line.jp-connection-status-card--site-only{border-top-style:dashed}.jp-connection-status-card--list{list-style-type:none;margin:16px 0}.jp-connection-status-card--list li{color:var(--jp-black);margin:0 0 8px -3px;padding-left:25px}.jp-connection-status-card--list-item-success{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTE4LjkzNSA2LTguOSAxMS45Ny01LjE2Mi0zLjgzNyIgc3Ryb2tlPSIjMUUxRTFFIiBzdHJva2Utd2lkdGg9IjEuNSIvPjwvc3ZnPg==) no-repeat 0 0}.jp-connection-status-card--list-item-error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 0 0;color:var(--jp-red)!important}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-small);font-weight:600;line-height:1.2;margin-top:0}.jp-connection__disconnect-dialog h2{font-size:var(--font-title-small);font-weight:400;line-height:1.2;margin:0}.jp-connection__disconnect-dialog p{font-size:var(--font-body);margin-top:0}.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text{font-size:1.25rem}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link,.jp-connection__disconnect-dialog__link{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:hover,.jp-connection__disconnect-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:focus,.jp-connection__disconnect-dialog__link:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link--bold,.jp-connection__disconnect-dialog__link--bold{font-weight:700}.jp-connection__disconnect-dialog .components-button{border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection__disconnect-dialog .components-modal__content{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0}.jp-connection__disconnect-dialog .components-modal__content:before,.jp-connection__disconnect-dialog .components-modal__header{display:none}.jp-connection__disconnect-dialog .jp-row{align-items:center;width:calc(100% - 48px)}.jp-connection__disconnect-dialog__content{align-items:center;background:var(--jp-white-off);border-radius:4px;display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0;padding:2rem 1rem;text-align:center}.jp-connection__disconnect-dialog__actions{background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;padding:2rem 0;position:sticky}.jp-connection__disconnect-dialog__actions p{margin-bottom:0}.jp-connection__disconnect-dialog__actions:before{background:linear-gradient(to bottom,transparent,var(--jp-white-off));bottom:calc(100% + 1px);content:"";display:block;height:80px;left:0;position:absolute;width:100%}.jp-connection__disconnect-dialog__btn-dismiss,.jp-connection__disconnect-dialog__btn-dismiss.components-button{background:var(--jp-black)!important;margin-right:10px}.jp-connection__disconnect-dialog__btn-disconnect{background:var(--jp-red)!important}.jp-connection__disconnect-dialog__btn-back-to-wp{background:var(--jp-black)!important}.jp-connection__disconnect-dialog__button-wrap{text-align:left}@media(min-width:960px){.jp-connection__disconnect-dialog__button-wrap{text-align:center}}.jp-connection__disconnect-dialog__error{color:var(--jp-red)}.jp-connection__disconnect-dialog__survey{margin-bottom:1.5rem;max-width:100%}.jp-connection__disconnect-dialog__step-copy{margin:0 auto;max-width:800px}.jp-connection__disconnect-dialog__step-copy--narrow{max-width:600px}@media(max-height:900px){.jp-connection__disconnect-dialog__content .jp-components__decorative-card{display:none}}@media(min-width:600px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{max-width:calc(100% - 32px);width:100%}.jp-connection__disconnect-dialog__actions,.jp-connection__disconnect-dialog__content{padding:2rem}}@media(min-width:960px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{display:flex;flex-direction:column;height:900px;width:1200px}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-large)}.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text{font-size:1.5rem}.jp-connection__disconnect-dialog__content{padding:80px}.jp-connection__disconnect-dialog__actions{padding:2rem 3rem}.jp-row{margin-left:0}}.jp-connection__disconnect-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:0 auto 1rem;max-width:100%;padding:1rem 2rem;text-align:left;width:800px}.jp-connection__disconnect-card__group{margin-bottom:1rem;max-width:100%}.jp-connection__disconnect-card__card-content{display:block;font-size:.875rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-content{align-items:center;display:flex;justify-content:space-between}}.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{flex-shrink:0;font-size:1.25rem;font-weight:600;margin-bottom:0;margin-top:0}@media only screen and (min-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{font-size:1.5rem;margin-right:1.5rem}}@media only screen and (max-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block,.jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block{margin-top:.5rem}}.jp-connection__disconnect-card__card-stat-block{align-items:baseline;display:flex;flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat-block{flex-direction:row-reverse}}.jp-connection__disconnect-card__card-description{flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-description{text-align:right}}.jp-connection__disconnect-card__card-stat{font-size:1rem;font-weight:600;margin-right:.5rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat{font-size:1.5rem;margin-left:1rem;margin-right:0}}.jp-components__decorative-card{border-radius:8px;box-shadow:0 0 15px var(--jp-gray);display:flex;height:280px;margin:0 auto 3rem;max-width:100%;overflow:hidden;position:relative;width:360px}.jp-components__decorative-card__content,.jp-components__decorative-card__image{width:50%}.jp-components__decorative-card__image{background:var(--jp-gray);background-size:cover;position:relative}.jp-components__decorative-card__image:before{background-image:url('data:image/svg+xml;uf8,<svg width="38" height="8" viewBox="0 0 38 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 7C1 7 2.37087 1 6.89831 1C11.4257 1 14.3709 7 18.8983 7C23.4257 7 26.7777 1 31.3051 1C35.912 1 37 7 37 7" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>');content:"";display:block;height:8px;left:24px;position:absolute;top:24px;width:38px}.jp-components__decorative-card__content{background:#fff;padding:2rem}.jp-components__decorative-card__icon-container{background:var(--jp-red);border-radius:50px;height:80px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:80px}.jp-components__decorative-card__icon{background-position:50%,50%;background-repeat:no-repeat;height:40px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:40px}.jp-components__decorative-card__icon--unlink{background-image:url('data:image/svg+xml;uf8,<svg width="34" height="37" viewBox="0 0 34 37" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.3335 10.001H25.0002C29.4184 10.001 33.0002 13.5827 33.0002 18.001V19.7788C33.0002 24.197 29.4184 27.7788 25.0002 27.7788H22.3335" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M11.6675 27.7783L9.00082 27.7783C4.58254 27.7783 1.00081 24.1966 1.00081 19.7783L1.00081 18.0005C1.00081 13.5823 4.58253 10.0005 9.00081 10.0005L11.6675 10.0005" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M10.9998 19.167L16.9998 19.167" stroke="white" stroke-width="1.5"/> <path d="M8.99951 35.998L24.9995 0.998048" stroke="white"/> </svg>')}.jp-components__decorative-card__lines,.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{background:#e9eff5;border-radius:6px;display:block;height:12px;position:relative;width:100%}.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{content:"";top:calc(100% + 16px)}.jp-components__decorative-card__lines:after{top:calc(100% + 32px);width:75%}.jp-components__decorative-card--vertical{flex-direction:column}.jp-components__decorative-card--vertical .jp-components__decorative-card__content,.jp-components__decorative-card--vertical .jp-components__decorative-card__image{height:50%;width:100%}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines{margin-left:auto;margin-right:auto;max-width:135px}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:after,.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:before{margin-left:auto;margin-right:auto}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-20:#a7aaad;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-80:#8a2424;--jp-gray-off:#e2e2df;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-connect__disconnect-survey-card{border:2px solid transparent;border-radius:4px;box-shadow:0 0 15px var(--jp-gray-off);margin-left:auto;margin-right:auto;max-width:100%;padding:1rem;position:relative;text-align:left;width:800px}.jp-connect__disconnect-survey-card--selected{background:var(--jp-gray-off);border-color:var(--jp-black)}.jp-connect__disconnect-survey-card:after{border-right:2px solid var(--jp-black);border-top:2px solid var(--jp-black);content:"";display:block;height:5px;position:absolute;right:1.5rem;top:50%;transform:translateY(-50%) rotate(45deg);width:5px}.jp-connect__disconnect-survey-card:hover{cursor:pointer}.jp-connect__disconnect-survey-card:focus:not(.jp-disconnect-survey-card--selected),.jp-connect__disconnect-survey-card:hover:not(.jp-disconnect-survey-card--selected){border-color:var(--jp-black-80)}.jp-connect__disconnect-survey-card__answer{align-items:center;display:flex;font-weight:700;margin:0}input.jp-connect__disconnect-survey-card__input{-webkit-appearance:none;background-color:transparent;border:none;color:var(--jp-black-80);flex-grow:1;max-width:calc(100% - 40px);padding-right:40px}
\ No newline at end of file +#my-jetpack-container{--wp-admin-theme-color:var(--jp-black);--wp-admin-theme-color-darker-10:var(--jp-black-80);--wp-admin-theme-color-darker-20:var(--jp-black-80);height:100%}#my-jetpack-container .jetpack-logo{height:40px}#my-jetpack-container .jp-dashboard-footer__jetpack-symbol{height:16px}#wpbody-content>.notice{display:none}.pIsYsXFAJ9KX2VrS5rmY{--actions-size:28px;--status-size:8px;background:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 0 40px rgba(0,0,0,.08);box-shadow:0 0 0 1px var(--jp-gray-10) inset;display:flex;flex-direction:column;height:100%;padding:calc(var(--spacing-base)*3)}.pIsYsXFAJ9KX2VrS5rmY.YXHdD0VsFjiTsVRLrrx9{background:none;background-color:var(--jp-white-off);color:var(--jp-black-80);text-decoration:none}.pIsYsXFAJ9KX2VrS5rmY.YXHdD0VsFjiTsVRLrrx9:hover{background-color:var(--jp-white)}.pIsYsXFAJ9KX2VrS5rmY.YXHdD0VsFjiTsVRLrrx9:hover .ehgY0qp6bl53RaxP5rFF{text-decoration-thickness:var(--jp-underline-thickness)}.pIsYsXFAJ9KX2VrS5rmY.YXHdD0VsFjiTsVRLrrx9:focus{background-color:var(--jp-white);box-shadow:0 0 0 1.5px var(--jp-black);outline:3px solid transparent}.pIsYsXFAJ9KX2VrS5rmY.Pp9cMIaESLYelLOX3tkI{box-shadow:0 0 0 1.5px var(--jp-red-60)}.w56ueQLYexqzTybA7015{align-items:center;display:flex;justify-content:space-between;margin-bottom:var(--spacing-base);width:100%}.gmPKCDKZcfQt9WieTyKS{flex-grow:1}.ZKHHfl5DhA9kUnaL0qQZ{border-radius:var(--jp-border-radius);font-size:var(--font-body-extra-small);height:var(--actions-size);line-height:var(--actions-size)}.fDBaV7I4yUO6w5AWVEtr{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:calc(var(--spacing-base)*2);min-height:var(--actions-size);width:100%}.ehgY0qp6bl53RaxP5rFF{text-decoration:underline}.f5VJYwuJmjxH8PVxEbbv{align-items:center;display:flex;height:var(--actions-size);margin-left:var(--spacing-base);white-space:nowrap}.f5VJYwuJmjxH8PVxEbbv:before{border-radius:50%;content:"";display:inline-block;height:var(--status-size);margin-right:var(--spacing-base);width:var(--status-size)}.f5VJYwuJmjxH8PVxEbbv.ry3pxoGtmQ0ZeSwp7F_3{color:var(--jp-green-50)}.f5VJYwuJmjxH8PVxEbbv.ry3pxoGtmQ0ZeSwp7F_3:before{background:var(--jp-green-50)}.f5VJYwuJmjxH8PVxEbbv.LZzE3EG7m3CDR46wwwEr{color:var(--jp-gray-50)}.f5VJYwuJmjxH8PVxEbbv.LZzE3EG7m3CDR46wwwEr:before{background:var(--jp-gray-50)}.f5VJYwuJmjxH8PVxEbbv.Vx_jpT02r8W6NfsRSB02{color:var(--jp-red-60)}.f5VJYwuJmjxH8PVxEbbv.Vx_jpT02r8W6NfsRSB02:before{background:var(--jp-red-60)}.f5VJYwuJmjxH8PVxEbbv.PdsJCfyyjSgrNDheF2qi:before{animation:dWP7ypkVXudMbAa38W5Z .5s linear infinite}@keyframes dWP7ypkVXudMbAa38W5Z{0%{opacity:0}50%{opacity:.5}to{opacity:0}}.WQVtrU6q0L1Igcj7wCrQ{margin:0;padding:0}.UujoBFTnQNY2cWU2SIsH{font-size:var(--font-headline-medium);font-weight:700;line-height:52px}.TeGO5V_thHw5lDAm1_2M{font-weight:700}.TeGO5V_thHw5lDAm1_2M,.WolQzb2MsSgiNmLtc7_j{font-size:var(--font-headline-small);line-height:40px}.WolQzb2MsSgiNmLtc7_j{font-weight:400}.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);font-weight:500;line-height:32px}.zY2No8Ga4b8shbOQGhnv{font-size:var(--font-title-small);font-weight:500;line-height:30px}.tIj0D1t8Cc892ikmgFPZ{font-size:var(--font-body);font-weight:400;line-height:24px}.KdcN0BnOaVeVhyLRKqhS{font-size:var(--font-body-small);font-weight:400;line-height:24px}.dso3Rh3tl3Xv1GumBktz{font-size:var(--font-body-extra-small);font-weight:400;line-height:20px}.PItlW5vRExLnTj4a8eLE{font-size:var(--font-body-extra-small);font-weight:600;line-height:16px}.TwRpPlktzxhmFVeua7P5{margin:calc(var( --spacing-base )*0)}.zVfqx7gyb3o9mxfGynn1{margin-left:calc(var( --spacing-base )*0);margin-right:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy{margin-bottom:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy,.xqDIp6cNVr_E6RXaiPyD{margin-top:calc(var( --spacing-base )*0)}.S8EwaXk1kyPizt6x4WH2{margin-right:calc(var( --spacing-base )*0)}.ODX5Vr1TARoLFkDDFooD{margin-bottom:calc(var( --spacing-base )*0)}.cphJ8dCpfimnky7P2FHg{margin-left:calc(var( --spacing-base )*0)}.PFgIhNxIyiSuNvQjAIYj{margin:calc(var( --spacing-base )*1)}.M2jKmUzDxvJjjVEPU3zn{margin-left:calc(var( --spacing-base )*1);margin-right:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk{margin-bottom:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk,.rcTN5uw9xIEeMEGL3Xi_{margin-top:calc(var( --spacing-base )*1)}.CQSkybjq2TcRM1Xo9COV{margin-right:calc(var( --spacing-base )*1)}.hfqOWgq6_MEGdFE82eOY{margin-bottom:calc(var( --spacing-base )*1)}.I8MxZQYTbuu595yfesWA{margin-left:calc(var( --spacing-base )*1)}.kQkc6rmdpvLKPkyoJtVQ{margin:calc(var( --spacing-base )*2)}.j6vFPxWuu4Jan2ldoxpp{margin-left:calc(var( --spacing-base )*2);margin-right:calc(var( --spacing-base )*2)}.hqr39dC4H_AbactPAkCG{margin-bottom:calc(var( --spacing-base )*2)}.c3dQnMi16C6J6Ecy4283,.hqr39dC4H_AbactPAkCG{margin-top:calc(var( --spacing-base )*2)}.YNZmHOuRo6hU7zzKfPdP{margin-right:calc(var( --spacing-base )*2)}.Db8lbak1_wunpPk8NwKU{margin-bottom:calc(var( --spacing-base )*2)}.ftsYE5J9hLzquQ0tA5dY{margin-left:calc(var( --spacing-base )*2)}.Det4MHzLUW7EeDnafPzq{margin:calc(var( --spacing-base )*3)}.h_8EEAztC29Vve1datb5{margin-left:calc(var( --spacing-base )*3);margin-right:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM{margin-bottom:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM,.soADBBkcIKCBXzCTuV9_{margin-top:calc(var( --spacing-base )*3)}.zSX59ziEaEWGjnpZa4uV{margin-right:calc(var( --spacing-base )*3)}.yrVTnq_WBMbejg89c2ZQ{margin-bottom:calc(var( --spacing-base )*3)}.UKtHPJnI2cXBWtPDm5hM{margin-left:calc(var( --spacing-base )*3)}.guexok_Tqd5Tf52hRlbT{margin:calc(var( --spacing-base )*4)}.oS1E2KfTBZkJ3F0tN7T6{margin-left:calc(var( --spacing-base )*4);margin-right:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd{margin-bottom:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd,.ot2kkMcYHv53hLZ4LSn0{margin-top:calc(var( --spacing-base )*4)}.A1krOZZhlQ6Sp8Cy4bly{margin-right:calc(var( --spacing-base )*4)}.pkDbXXXL32237M0hokEh{margin-bottom:calc(var( --spacing-base )*4)}.XXv4kDTGvEnQeuGKOPU3{margin-left:calc(var( --spacing-base )*4)}.yGqHk1a57gaISwkXwXe6{margin:calc(var( --spacing-base )*5)}.X8cghM358X3DkXLc9aNK{margin-left:calc(var( --spacing-base )*5);margin-right:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f{margin-bottom:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f,.yqeuzwyGQ7zG0avrGqi_{margin-top:calc(var( --spacing-base )*5)}.g9emeCkuHvYhveiJbfXO{margin-right:calc(var( --spacing-base )*5)}.Lvk3dqcyHbZ07QCRlrUQ{margin-bottom:calc(var( --spacing-base )*5)}.r3yQECDQ9qX0XZzXlVAg{margin-left:calc(var( --spacing-base )*5)}.aQhlPwht2Cz1X_63Miw0{margin:calc(var( --spacing-base )*6)}.JyHb0vK3wJgpblL9s5j8{margin-left:calc(var( --spacing-base )*6);margin-right:calc(var( --spacing-base )*6)}.cY2gULL1lAv6WPNIRuf3{margin-bottom:calc(var( --spacing-base )*6)}.NBWQ9Lwhh_fnry3lg_p7,.cY2gULL1lAv6WPNIRuf3{margin-top:calc(var( --spacing-base )*6)}.yIOniNe5E40C8fWvBm5V{margin-right:calc(var( --spacing-base )*6)}.t30usboNSyqfQWIwHvT3{margin-bottom:calc(var( --spacing-base )*6)}.Nm_TyFkYCMhOoghoToKJ{margin-left:calc(var( --spacing-base )*6)}.C4qJKoBXpgKtpmrqtEKB{margin:calc(var( --spacing-base )*7)}.S93Srbu6NQ_PBr7DmTiD{margin-left:calc(var( --spacing-base )*7);margin-right:calc(var( --spacing-base )*7)}.fJj8k6gGJDks3crUZxOS{margin-bottom:calc(var( --spacing-base )*7)}.cW6D6djs7Ppm7fD7TeoV,.fJj8k6gGJDks3crUZxOS{margin-top:calc(var( --spacing-base )*7)}.DuCnqNfcxcP3Z__Yo5Ro{margin-right:calc(var( --spacing-base )*7)}.im8407m2fw5vOg7O2zsw{margin-bottom:calc(var( --spacing-base )*7)}.G0fbeBgvz2sh3uTP9gNl{margin-left:calc(var( --spacing-base )*7)}.kvW3sBCxRxUqz1jrVMJl{margin:calc(var( --spacing-base )*8)}.tOjEqjLONQdkiYx_XRnw{margin-left:calc(var( --spacing-base )*8);margin-right:calc(var( --spacing-base )*8)}.op5hFSx318zgxsoZZNLN{margin-bottom:calc(var( --spacing-base )*8)}.c9WfNHP6TFKWIfLxv52J,.op5hFSx318zgxsoZZNLN{margin-top:calc(var( --spacing-base )*8)}.sBA75QqcqRwwYSHJh2wc{margin-right:calc(var( --spacing-base )*8)}.GpL6idrXmSOM6jB8Ohsf{margin-bottom:calc(var( --spacing-base )*8)}.HbtWJoQwpgGycz8dGzeT{margin-left:calc(var( --spacing-base )*8)}.uxX3khU88VQ_Ah49Ejsa{padding:calc(var( --spacing-base )*0)}.KX0FhpBKwKzs9fOUdbNz{padding-left:calc(var( --spacing-base )*0);padding-right:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz{padding-bottom:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz,.emxLHRjQuJsImnPbQIzE{padding-top:calc(var( --spacing-base )*0)}.kJ8WzlpTVgdViXt8ukP9{padding-right:calc(var( --spacing-base )*0)}.tg_UIUI11VBzrTAn2AzJ{padding-bottom:calc(var( --spacing-base )*0)}.uczvl8kaz84oPQJ2DB2R{padding-left:calc(var( --spacing-base )*0)}.o7UHPcdVK3lt7q3lqV4o{padding:calc(var( --spacing-base )*1)}.IDqEOxvDoYrFYxELPmtX{padding-left:calc(var( --spacing-base )*1);padding-right:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2{padding-bottom:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2,.npy3hw4A5QSkDicb2CJJ{padding-top:calc(var( --spacing-base )*1)}.LgbptTApNY5NwLQvEFAt{padding-right:calc(var( --spacing-base )*1)}.WZQy2SZuZso59bUsXXyl{padding-bottom:calc(var( --spacing-base )*1)}.o331apInxNunbYB3SfPE{padding-left:calc(var( --spacing-base )*1)}.fMPIyD9Vqki1Lrc_yJnG{padding:calc(var( --spacing-base )*2)}.i2pMcTcdrr10IQoiSm_L{padding-left:calc(var( --spacing-base )*2);padding-right:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH{padding-bottom:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH,.o9bGieUKcYc8o0Ij9oZX{padding-top:calc(var( --spacing-base )*2)}.SwZcFez1RDqWsOFjB5iG{padding-right:calc(var( --spacing-base )*2)}.eHpLc_idmuEqeqCTvqkN{padding-bottom:calc(var( --spacing-base )*2)}.vU39i2B4P1fUTMB2l6Vo{padding-left:calc(var( --spacing-base )*2)}.JHWNzBnE29awhdu5BEh1{padding:calc(var( --spacing-base )*3)}.X72lGbb56L3KFzC2xQ9N{padding-left:calc(var( --spacing-base )*3);padding-right:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e{padding-bottom:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e,.srV0KSDC83a2fiimSMMQ{padding-top:calc(var( --spacing-base )*3)}.lUWfkmbQjCskhcNwkyCm{padding-right:calc(var( --spacing-base )*3)}.Ts0dIlc3aTSL7V4cIHis{padding-bottom:calc(var( --spacing-base )*3)}.CzlqQXXhX6MvorArFZ8B{padding-left:calc(var( --spacing-base )*3)}.TqMPkQtR_DdZuKb5vBoV{padding:calc(var( --spacing-base )*4)}.a7UrjhI69Vetlcj9ZVzz{padding-left:calc(var( --spacing-base )*4);padding-right:calc(var( --spacing-base )*4)}.StEhBzGs2Gi5dDEkjhAv{padding-bottom:calc(var( --spacing-base )*4)}.FGneZfZyvYrt1dG0zcnm,.StEhBzGs2Gi5dDEkjhAv{padding-top:calc(var( --spacing-base )*4)}.APEH216rpdlJWgD2fHc8{padding-right:calc(var( --spacing-base )*4)}.oGwXC3ohCic9XnAj6x69{padding-bottom:calc(var( --spacing-base )*4)}.U6gnT9y42ViPNOcNzBwb{padding-left:calc(var( --spacing-base )*4)}.IpdRLBwnHqbqFrixgbYC{padding:calc(var( --spacing-base )*5)}.HgNeXvkBa9o3bQ5fvFZm{padding-left:calc(var( --spacing-base )*5);padding-right:calc(var( --spacing-base )*5)}.tJtFZM3XfPG9v9TSDfN1{padding-bottom:calc(var( --spacing-base )*5)}.PdifHW45QeXYfK568uD8,.tJtFZM3XfPG9v9TSDfN1{padding-top:calc(var( --spacing-base )*5)}.mbLkWTTZ0Za_BBbFZ5b2{padding-right:calc(var( --spacing-base )*5)}.vVWpZpLlWrkTt0hMk8XU{padding-bottom:calc(var( --spacing-base )*5)}.RxfaJj5a1Nt6IavEo5Zl{padding-left:calc(var( --spacing-base )*5)}.SppJULDGdnOGcjZNCYBy{padding:calc(var( --spacing-base )*6)}.palY2nLwdoyooPUm9Hhk{padding-left:calc(var( --spacing-base )*6);padding-right:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_{padding-bottom:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_,.YEEJ9b90ueQaPfiU8aeN{padding-top:calc(var( --spacing-base )*6)}.QE0ssnsKvWJMqlhPbY5u{padding-right:calc(var( --spacing-base )*6)}.n8yA3jHlMRyLd5UIfoND{padding-bottom:calc(var( --spacing-base )*6)}.tXHmxYnHzbwtfxEaG51n{padding-left:calc(var( --spacing-base )*6)}.kBTsPKkO_3g_tLkj77Um{padding:calc(var( --spacing-base )*7)}.RyhrFx6Y1FGDrGAAyaxm{padding-left:calc(var( --spacing-base )*7);padding-right:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO{padding-bottom:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO,.vQVSq6SvWKbOMu6r4H6b{padding-top:calc(var( --spacing-base )*7)}.oBy5__aEADMsH46mrgFX{padding-right:calc(var( --spacing-base )*7)}.KVEXoJqf1s92j0JMdNmN{padding-bottom:calc(var( --spacing-base )*7)}.ZMXGNrNaKW3k_3TLz0Fq{padding-left:calc(var( --spacing-base )*7)}.tuiR9PhkHXhGyEgzRZRI{padding:calc(var( --spacing-base )*8)}.U7454qyWkQNa2iaSJziu{padding-left:calc(var( --spacing-base )*8);padding-right:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8{padding-bottom:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8,.X1rm9DQ1zLGLfogja5Gn{padding-top:calc(var( --spacing-base )*8)}.JS7G6kAuqJo5GIuF8S5t{padding-right:calc(var( --spacing-base )*8)}.Y8F9ga1TDCMbM1lj4gUz{padding-bottom:calc(var( --spacing-base )*8)}.AJuyNGrI63BOWql719H8{padding-left:calc(var( --spacing-base )*8)}.jErCC9oKHSM15BxzFyQK{margin-bottom:0}.oVoYbwbFB6U2o90Njusk{font-size:16px;margin:0}.oVoYbwbFB6U2o90Njusk.is-error{background-color:var(--jp-red-0)}.oVoYbwbFB6U2o90Njusk .components-notice__content{align-items:center;display:flex;margin:0;padding:12px 4px}.oVoYbwbFB6U2o90Njusk .components-notice__content>svg{fill:var(--jp-red-60)}.oVoYbwbFB6U2o90Njusk .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.oVoYbwbFB6U2o90Njusk .components-notice__dismiss{align-self:center}.wBVXH4OTNwLHPRpN4nsq{margin-left:8px}.sexr0jUxC1jVixdKiDnC{margin-left:-20px}@media(max-width:782px){.sexr0jUxC1jVixdKiDnC{margin-left:-10px}}.sexr0jUxC1jVixdKiDnC.vKQ11sLeAM45M04P1ccj{background-color:var(--jp-white)}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1128px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;max-width:var(--max-container-width);width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));padding:0 24px}}.SqdhUZkXCRuIpErj1B3z.OZC_9a1LhpWF9dv15Gdh{max-width:none;padding:unset}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.jp-dashboard-footer{align-items:center;color:#000;display:flex;flex-flow:row wrap;justify-content:space-between;max-width:1128px;width:100%}.jp-dashboard-footer a,.jp-dashboard-footer a:hover,.jp-dashboard-footer a:visited{color:#000;text-decoration:none}.jp-dashboard-footer__jetpack-symbol,.jp-dashboard-footer__module-name{display:inline-block;vertical-align:middle}.jp-dashboard-footer__module-name{font-size:12px;font-weight:600;margin-left:5px}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off)}.sDAzdUdcbaYmUMZBe2XW{fill:#2c3338}.cuoSlhSNrqf1dozY22Xb{fill:#000}.JLquNpQVlysAamuh5lJO,.lAIiifeLMmZAPlQ9n9ZR{fill:var(--jp-green-primary)}.cbOwD8Y4tFjwimmtchQI{fill:#757575}.cbOwD8Y4tFjwimmtchQI.aHOlEBGD5EA8NKRw3xTw{fill:var(--color-facebook);border-radius:50%!important}.cbOwD8Y4tFjwimmtchQI.af4Y_zItXvLAOEoSDPSv{fill:var(--color-twitter)}.cbOwD8Y4tFjwimmtchQI.f68aqF3XSD1OBvXR1get{fill:var(--color-linkedin)}.cbOwD8Y4tFjwimmtchQI.xFI0dt3UiXRlRQdqPWkx{fill:var(--color-tumblr)}.cbOwD8Y4tFjwimmtchQI.q7JEoyymveP6kF747M43{fill:var(--color-gplus)}.cAbGtJDGgLubucBnz7vM{background-color:var(--jp-white)}.wiobThfXJCuhGNrbFIT6 a,.wiobThfXJCuhGNrbFIT6 a:active,.wiobThfXJCuhGNrbFIT6 a:hover{color:var(--jp-black)}.VgAxgahF9bC2M__FiIgV{margin-bottom:calc(var(--spacing-base)*3)}.Doju0RxvvN9JS12mf489{line-height:calc(var(--spacing-base)*3);margin:0 0 var(--spacing-base) 0}.zI5tJ_qhWE6Oe6Lk75GY{--wp-admin-theme-color:var(--jp-black);--wp-admin-theme-color-darker-10:var(--jp-black-80);--wp-admin-theme-color-darker-20:var(--jp-black-80);--wp-admin-border-width-focus:1.5px;border-radius:var(--jp-border-radius);font-weight:600;justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF{font-size:var(--font-body);height:auto;line-height:24px;padding:var(--spacing-base) calc(var(--spacing-base)*3)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF.paGLQwtPEaJmtArCcmyK{padding:var(--spacing-base) calc(var(--spacing-base)*2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14{font-size:var(--font-body-extra-small);height:auto;line-height:20px;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14.paGLQwtPEaJmtArCcmyK>svg:first-child{margin-right:calc(var(--spacing-base)/2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14>.components-spinner{height:20px}.zI5tJ_qhWE6Oe6Lk75GY.lZAo6_oGfclXOO9CC6Rd{font-weight:400}.zI5tJ_qhWE6Oe6Lk75GY.is-primary:disabled,.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:disabled{background:var(--jp-gray);color:var(--jp-gray-20)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:active:not(:disabled),.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:hover:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-link.Na39I683LAaSA99REg14,.zI5tJ_qhWE6Oe6Lk75GY.is-link.ipS7tKy9GntCS4R3vekF{padding:0}.zI5tJ_qhWE6Oe6Lk75GY.is-link:hover:not(:disabled){text-decoration-thickness:3px}.zI5tJ_qhWE6Oe6Lk75GY.is-link:focus:not(:disabled){text-decoration-line:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:not(:disabled){background:var(--jp-red-50);box-shadow:inset 0 0 0 1px var(--jp-red-50);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:hover:not(:disabled){background:var(--jp-red-60);box-shadow:inset 0 0 0 1px var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:focus:not(:disabled){background:var(--jp-red-70);box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:active:not(:disabled){background:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:not(:disabled){background:var(--jp-white);box-shadow:inset 0 0 0 1px var(--jp-red-50);color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:hover:not(:disabled){background:var(--jp-red-0);box-shadow:inset 0 0 0 1px var(--jp-red-60);color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:active:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:not(:disabled){color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:hover:not(:disabled){box-shadow:none;color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6{position:relative}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6.has-icon{justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>:not(.components-spinner){visibility:hidden}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>.components-spinner{margin:0;position:absolute}.CDuBjJp_8jxzx5j6Nept{margin-left:calc(var(--spacing-base)/2)}.jp-connection-status-card h3{color:var(--jp-black);font-size:var(--font-title-large);font-weight:700;line-height:1.1;margin:0}.jp-connection-status-card a,.jp-connection-status-card a:active,.jp-connection-status-card a:hover{color:var(--jp-black)}.jp-connection-status-card p{color:var(--jp-black);margin:16px 0}.jp-connection-status-card a,.jp-connection-status-card li,.jp-connection-status-card p{font-size:var(--font-body);line-height:24px}.jp-connection-status-card--status{align-items:center;display:flex;margin:24px 0 24px -6px}.jp-connection-status-card--cloud{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDIiIGhlaWdodD0iNDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PG1hc2sgaWQ9ImEiIG1hc2stdHlwZT0iYWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjciIHk9IjkiIHdpZHRoPSIyOCIgaGVpZ2h0PSIyMSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMC4zMzMgMTcuNjk3di0uMDhjMC00LjI1My0zLjc2LTcuNy04LjQtNy43LTMuOTE2IDAtNy4yMDYgMi40NTctOC4xMzYgNS43OGE2LjM4NiA2LjM4NiAwIDAgMC0uMjY0LS4wMDVDOS45MjUgMTUuNjkyIDcgMTguNzA4IDcgMjIuNDI5czIuOTI1IDYuNzM4IDYuNTMzIDYuNzM4SDI5LjRjMy4wOTMgMCA1LjYtMi41ODYgNS42LTUuNzc1IDAtMi44NjEtMi4wMTgtNS4yMzctNC42NjYtNS42OTVaIiBmaWxsPSIjZmZmIi8+PC9tYXNrPjxnIG1hc2s9InVybCgjYSkiPjxwYXRoIGQ9Im0zMC4zMzMgMTcuNjk3LTIuNjI1LS4wMy0uMDI1IDIuMjM1IDIuMjAyLjM4MS40NDgtMi41ODZabS0xNi41MzctMi0uMTA3IDIuNjIzIDIuMDc1LjA4NS41Ni0yLTIuNTI4LS43MDhabS0uMjYzIDEzLjQ3djIuNjI1aC4wMDhsLS4wMDgtMi42MjVabS4wNCAwdi0yLjYyNWgtLjAwOWwuMDA4IDIuNjI1Wm0xNS43OTUgMCAuMDE1LTIuNjI1aC0uMDE1djIuNjI1Wm0zLjU5LTExLjQ0MXYtLjExaC01LjI1di4wNTJsNS4yNS4wNThabTAtLjExYzAtNS45MTItNS4xNTUtMTAuMzI0LTExLjAyNS0xMC4zMjR2NS4yNWMzLjQxIDAgNS43NzUgMi40ODIgNS43NzUgNS4wNzVoNS4yNVpNMjEuOTMzIDcuMjkzYy00Ljk4NCAwLTkuMzg4IDMuMTM5LTEwLjY2NCA3LjY5OGw1LjA1NSAxLjQxNWMuNTg1LTIuMDg5IDIuNzYyLTMuODYzIDUuNjEtMy44NjN2LTUuMjVabS04LjAzIDUuNzgyYTkuMTExIDkuMTExIDAgMCAwLS4zNy0uMDA3djUuMjVjLjA1MyAwIC4xMDUuMDAxLjE1Ni4wMDNsLjIxNS01LjI0NlptLS4zNy0uMDA3Yy01LjEzMyAwLTkuMTU4IDQuMjY4LTkuMTU4IDkuMzYyaDUuMjVjMC0yLjM0OCAxLjgyNS00LjExMiAzLjkwOC00LjExMnYtNS4yNVptLTkuMTU4IDkuMzYyYzAgNS4wOTUgNC4wMjUgOS4zNjMgOS4xNTggOS4zNjN2LTUuMjVjLTIuMDgzIDAtMy45MDgtMS43NjUtMy45MDgtNC4xMTNoLTUuMjVabTkuMTY2IDkuMzYzaC4wNGwtLjAxNy01LjI1aC0uMDM5bC4wMTYgNS4yNVptLjAzMSAwaDE1Ljc5NnYtNS4yNUgxMy41NzJ2NS4yNVptMTUuODI3LTUuMjVoLS4wMTZsLS4wMyA1LjI1aC4wNDZ2LTUuMjVabTIuOTc1LTMuMTVjMCAxLjgxNi0xLjQwNyAzLjE1LTIuOTc1IDMuMTV2NS4yNWM0LjYxOCAwIDguMjI1LTMuODM4IDguMjI1LTguNGgtNS4yNVptLTIuNDg5LTMuMTA5YzEuMzU1LjIzNSAyLjQ5IDEuNDg4IDIuNDkgMy4xMDloNS4yNWMwLTQuMTAyLTIuOTAyLTcuNi02Ljg0NC04LjI4MmwtLjg5NiA1LjE3M1oiIGZpbGw9IiMxRTFFMUUiLz48L2c+PC9zdmc+);height:42px;margin-right:4px;width:42px}.jp-connection-status-card--jetpack-logo{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE2IDMyYzguODM3IDAgMTYtNy4xNjMgMTYtMTZTMjQuODM3IDAgMTYgMCAwIDcuMTYzIDAgMTZzNy4xNjMgMTYgMTYgMTZaIiBmaWxsPSIjMDAwIi8+PHBhdGggZD0iTTE2Ljc5NCAxMy4zMTN2MTUuNTExbDgtMTUuNTEyaC04Wk0xNS4xNzUgMTguNjU3VjMuMTc2bC03Ljk2OSAxNS40OGg3Ljk3WiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==);height:32px;margin-left:11px;width:32px}.jp-connection-status-card--btn-connect-user{font-size:var(--font-body);font-weight:400;line-height:24px}.jp-connection-status-card--avatar{background-color:var(--jp-white);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='16' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.498 27.123C6.038 24.165 10.916 21.5 16 21.5c5.084 0 9.963 2.665 11.502 5.623a15.952 15.952 0 0 1-11.257 4.875L16 32l-.245-.002a15.952 15.952 0 0 1-11.257-4.875zM16 8a6 6 0 1 1 0 12 6 6 0 0 1 0-12z' fill='%23A2AAB2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;border:0;border-radius:20px;height:32px;margin-left:-10px;width:32px}.jp-connection-status-card--line{border-top:2px solid var(--jp-black);height:0;width:67px}.jp-connection-status-card--line.jp-connection-status-card--site-only{border-top-style:dashed}.jp-connection-status-card--list{list-style-type:none;margin:16px 0}.jp-connection-status-card--list li{color:var(--jp-black);margin:0 0 8px -3px;padding-left:25px}.jp-connection-status-card--list-item-success{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTE4LjkzNSA2LTguOSAxMS45Ny01LjE2Mi0zLjgzNyIgc3Ryb2tlPSIjMUUxRTFFIiBzdHJva2Utd2lkdGg9IjEuNSIvPjwvc3ZnPg==) no-repeat 0 0}.jp-connection-status-card--list-item-error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 0 0;color:var(--jp-red-60)!important}.jp-connection-status-card--list-item-info{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjMDAwIi8+PC9zdmc+) no-repeat 0 0}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-small);font-weight:600;line-height:1.2;margin-top:0}.jp-connection__disconnect-dialog h2{font-size:var(--font-title-small);font-weight:400;line-height:1.2;margin:0}.jp-connection__disconnect-dialog p{font-size:var(--font-body);margin-top:0}.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog__large-text{font-size:1.25rem}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link,.jp-connection__disconnect-dialog__link{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:hover,.jp-connection__disconnect-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:focus,.jp-connection__disconnect-dialog__link:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link--bold,.jp-connection__disconnect-dialog__link--bold{font-weight:700}.jp-connection__disconnect-dialog .components-button{border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection__disconnect-dialog .components-modal__content{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0}.jp-connection__disconnect-dialog .components-modal__content:before,.jp-connection__disconnect-dialog .components-modal__header{display:none}.jp-connection__disconnect-dialog .jp-row{align-items:center;width:calc(100% - 48px)}.jp-connection__disconnect-dialog__content{align-items:center;background:var(--jp-white-off);border-radius:4px;display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0;padding:2rem 1rem;text-align:center}.jp-connection__disconnect-dialog__actions{background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;padding:2rem 0;position:sticky}.jp-connection__disconnect-dialog__actions p{margin-bottom:0}.jp-connection__disconnect-dialog__actions:before{background:linear-gradient(to bottom,transparent,var(--jp-white-off));bottom:calc(100% + 1px);content:"";display:block;height:80px;left:0;position:absolute;width:100%}.jp-connection__disconnect-dialog__btn-dismiss,.jp-connection__disconnect-dialog__btn-dismiss.components-button{background:var(--jp-black)!important;margin-right:10px}.jp-connection__disconnect-dialog__btn-disconnect{background:var(--jp-red)!important}.jp-connection__disconnect-dialog__btn-back-to-wp{background:var(--jp-black)!important}.jp-connection__disconnect-dialog__button-wrap{text-align:left}@media(min-width:960px){.jp-connection__disconnect-dialog__button-wrap{text-align:center}}.jp-connection__disconnect-dialog__error{color:var(--jp-red)}.jp-connection__disconnect-dialog__survey{margin-bottom:1.5rem;max-width:100%}.jp-connection__disconnect-dialog__step-copy{margin:0 auto;max-width:800px}.jp-connection__disconnect-dialog__step-copy--narrow{max-width:600px}@media(max-height:900px){.jp-connection__disconnect-dialog__content .jp-components__decorative-card{display:none}}@media(min-width:600px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{max-width:calc(100% - 32px);width:100%}.jp-connection__disconnect-dialog__actions,.jp-connection__disconnect-dialog__content{padding:2rem}}@media(min-width:960px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{display:flex;flex-direction:column;height:900px;width:1200px}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-large)}.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog__large-text{font-size:1.5rem}.jp-connection__disconnect-dialog__content{padding:80px}.jp-connection__disconnect-dialog__actions{padding:2rem 3rem}.jp-row{margin-left:0}}.jp-connection__disconnect-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:0 auto 1rem;max-width:100%;padding:1rem 2rem;text-align:left;width:800px}.jp-connection__disconnect-card__group{margin-bottom:1rem;max-width:100%}.jp-connection__disconnect-card__card-content{display:block;font-size:.875rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-content{align-items:center;display:flex;justify-content:space-between}}.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{flex-shrink:0;font-size:1.25rem;font-weight:600;margin-bottom:0;margin-top:0}@media only screen and (min-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{font-size:1.5rem;margin-right:1.5rem}}@media only screen and (max-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block,.jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block{margin-top:.5rem}}.jp-connection__disconnect-card__card-stat-block{align-items:baseline;display:flex;flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat-block{flex-direction:row-reverse}}.jp-connection__disconnect-card__card-description{flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-description{text-align:right}}.jp-connection__disconnect-card__card-stat{font-size:1rem;font-weight:600;margin-right:.5rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat{font-size:1.5rem;margin-left:1rem;margin-right:0}}.jp-components__decorative-card{border-radius:8px;box-shadow:0 0 15px var(--jp-gray);display:flex;height:280px;margin:0 auto 3rem;max-width:100%;overflow:hidden;position:relative;width:360px}.jp-components__decorative-card__content,.jp-components__decorative-card__image{width:50%}.jp-components__decorative-card__image{background:var(--jp-gray);background-size:cover;position:relative}.jp-components__decorative-card__image:before{background-image:url('data:image/svg+xml;uf8,<svg width="38" height="8" viewBox="0 0 38 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 7C1 7 2.37087 1 6.89831 1C11.4257 1 14.3709 7 18.8983 7C23.4257 7 26.7777 1 31.3051 1C35.912 1 37 7 37 7" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>');content:"";display:block;height:8px;left:24px;position:absolute;top:24px;width:38px}.jp-components__decorative-card__content{background:#fff;padding:2rem}.jp-components__decorative-card__icon-container{background:var(--jp-red);border-radius:50px;height:80px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:80px}.jp-components__decorative-card__icon{background-position:50%,50%;background-repeat:no-repeat;height:40px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:40px}.jp-components__decorative-card__icon--unlink{background-image:url('data:image/svg+xml;uf8,<svg width="34" height="37" viewBox="0 0 34 37" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.3335 10.001H25.0002C29.4184 10.001 33.0002 13.5827 33.0002 18.001V19.7788C33.0002 24.197 29.4184 27.7788 25.0002 27.7788H22.3335" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M11.6675 27.7783L9.00082 27.7783C4.58254 27.7783 1.00081 24.1966 1.00081 19.7783L1.00081 18.0005C1.00081 13.5823 4.58253 10.0005 9.00081 10.0005L11.6675 10.0005" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M10.9998 19.167L16.9998 19.167" stroke="white" stroke-width="1.5"/> <path d="M8.99951 35.998L24.9995 0.998048" stroke="white"/> </svg>')}.jp-components__decorative-card__lines,.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{background:#e9eff5;border-radius:6px;display:block;height:12px;position:relative;width:100%}.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{content:"";top:calc(100% + 16px)}.jp-components__decorative-card__lines:after{top:calc(100% + 32px);width:75%}.jp-components__decorative-card--vertical{flex-direction:column}.jp-components__decorative-card--vertical .jp-components__decorative-card__content,.jp-components__decorative-card--vertical .jp-components__decorative-card__image{height:50%;width:100%}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines{margin-left:auto;margin-right:auto;max-width:135px}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:after,.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:before{margin-left:auto;margin-right:auto}.jp-connect__disconnect-survey-card{border:2px solid transparent;border-radius:4px;box-shadow:0 0 15px var(--jp-gray-off);margin-left:auto;margin-right:auto;max-width:100%;padding:1rem;position:relative;text-align:left;width:800px}.jp-connect__disconnect-survey-card--selected{background:var(--jp-gray-off);border-color:var(--jp-black)}.jp-connect__disconnect-survey-card:after{border-right:2px solid var(--jp-black);border-top:2px solid var(--jp-black);content:"";display:block;height:5px;position:absolute;right:1.5rem;top:50%;transform:translateY(-50%) rotate(45deg);width:5px}.jp-connect__disconnect-survey-card:hover{cursor:pointer}.jp-connect__disconnect-survey-card:focus:not(.jp-disconnect-survey-card--selected),.jp-connect__disconnect-survey-card:hover:not(.jp-disconnect-survey-card--selected){border-color:var(--jp-black-80)}.jp-connect__disconnect-survey-card__answer{align-items:center;display:flex;font-weight:700;margin:0}input.jp-connect__disconnect-survey-card__input{-webkit-appearance:none;background-color:transparent;border:none;color:var(--jp-black-80);flex-grow:1;max-width:calc(100% - 40px);padding-right:40px}.zvd4dCB_bBDiXJKKDqXm{position:relative}.ly4o9lSswAGHFXqGUEIO{position:absolute;right:32px;top:32px;z-index:1}.u64Go3kwEZ7MD9eji0H1{color:var(--jp-gray-50);font-size:13px;margin-bottom:16px;width:60%}._RT41NE3LU4R0ubcij2y{align-items:center;display:flex}.cFGWJeRiGHjAr8D7CWJW{margin-right:8px;width:100px}.Iz3l7a05TP6HK9S92TIL{width:16px}.lmQ0wFmnk4kKkGVjokPA{height:18px;margin-left:8px}.AoIs8wD92wKR8RpQj6Uc{align-items:center;display:inline-flex}.rV_5QyvhDnsVjCX4pb0h{--gray-90:#1e1e1e;fill:var(--gray-90);width:24px}.MO1jDNY8VPqeNS9xL8jE{align-items:center;display:flex;text-decoration:none}.jp-connection__connect-screen__loading{display:none}.jp-connection__connect-screen__tos{margin-top:28px;max-width:360px}.jp-connection__connect-screen .jp-action-button{margin-top:40px}.jp-connection__connect-screen .jp-action-button button{max-width:100%}.jp-connection__connect-screen .jp-action-button button:disabled{color:hsla(0,0%,100%,.4)}@media(max-width:782px){.jp-connection__connect-screen .jp-action-button button{max-width:none;width:100%}}.jp-connection__connect-screen__footer{margin-top:32px}.jp-connection__connect-screen-layout{background:var(--jp-white);border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.08)}.jp-connection__connect-screen-layout__loading{display:none}.jp-connection__connect-screen-layout__left,.jp-connection__connect-screen-layout__right{box-sizing:border-box}.jp-connection__connect-screen-layout__left{padding:25px}@media(min-width:600px){.jp-connection__connect-screen-layout__left{padding:64px 96px}}.jp-connection__connect-screen-layout__left .jetpack-logo{margin-bottom:24px}.jp-connection__connect-screen-layout__left h2{color:var(--jp-black);font-size:36px;font-style:normal;font-weight:700;line-height:40px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left h3{color:var(--jp-black);font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left li,.jp-connection__connect-screen-layout__left p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.jp-connection__connect-screen-layout__left p{color:#101517;margin:16px 0}.jp-connection__connect-screen-layout__left a{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__connect-screen-layout__left a:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-layout__left a:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__connect-screen-layout__left ul{list-style-type:none;padding:0}.jp-connection__connect-screen-layout__left ul li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-left:30px}.jp-connection__connect-screen-layout__right{padding:64px 0}.jp-connection__connect-screen-layout__right img{max-width:100%}.jp-connection__connect-screen-layout__two-columns{display:flex;flex-wrap:wrap}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:100%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:52%}}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{background:#f9f9f6;display:none;flex-basis:47%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{display:block}}.jp-action-button--button{background:#000}.jp-action-button--button,.jp-action-button--button.components-button{border-radius:4px;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-style:normal;font-weight:600;height:40px;line-height:18px;min-width:264px;text-align:center}.jp-action-button__error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 0 0;color:var(--jp-red)!important;line-height:25px!important;padding-left:25px}.SWwV4Pw6OZ5vU3PqPXmr{--product-card-shadow:rgb(0 0 0/3%);background-color:var(--jp-white);border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);box-shadow:0 2px 6px var(--product-card-shadow),0 1px 2px var(--product-card-shadow)}.r7tUofa9Z3A5ziKVR1H7{align-items:center;display:flex}.r7tUofa9Z3A5ziKVR1H7 img{object-fit:cover;width:100%}.hdasSNj9k3Sc5PwXK4uE{margin-right:4px;width:16px}.eWN8Hj0SBRDq1F48n_Fg{--gray-70:#3c434a;align-items:center;color:var(--gray-70);display:flex;font-size:14px;text-decoration:none}.q0T8YyQxRawhpDtvJjxI{background-color:var(--jp-white);height:100%;padding:calc(var(--spacing-base)*8);position:relative}.B7JDqI_vtKxSy5GjvqA1{display:flex;flex-direction:column;height:100%}.zj7xadmhIWeuf7ZwvVTS{align-items:center;background:var(--jp-black);border-radius:var(--jp-border-radius) var(--jp-border-radius) 0 0;color:var(--jp-white);display:flex;height:calc(var(--spacing-base)*4);left:0;padding:0 var(--spacing-base);position:absolute;top:0;width:100%}.GsioW6IsC8EMYE3U6788{fill:var(--jp-white);margin-right:var(--spacing-base)}.cfEO8udWbRGPFJzW8Jg5,.dbz07JqxOlivjKO4vBEF{align-items:center;display:flex;height:calc(var(--spacing-base)*4);margin-bottom:calc(var(--spacing-base)*4)}.zlh3zbjUe4Z8cBs7uVVe{fill:#8c8f94;height:24px;line-height:24px}.qoZuzG5EcDa231hC6t0P{align-items:center;display:flex;justify-content:center}.qoZuzG5EcDa231hC6t0P svg{margin-right:var(--spacing-base)}.Q6uUUQCPWS6_6nLxIn68{display:inline-block;min-height:42px;padding:8px 60px;text-align:center;width:100%}.Q6uUUQCPWS6_6nLxIn68 .YU4iBCRze09ZP3iCsdcb{margin:0}.Q6uUUQCPWS6_6nLxIn68.is-secondary:hover:not(:disabled){background-color:var(--jp-black);color:var(--jp-white)}.Q1jaYDpa2AVfJpA29wT0{flex-grow:1;margin:0;margin-bottom:calc(var(--spacing-base)*2);padding:0}.Q1jaYDpa2AVfJpA29wT0 li{align-items:start;display:flex;list-style:none;margin-bottom:var(--spacing-base)}.Q1jaYDpa2AVfJpA29wT0 svg{fill:var(--jp-green-primary);flex-shrink:0;margin-right:var(--spacing-base)}.xgv3jRkeF39aEQELCwru{align-items:flex-end;color:var(--jp-text-color);display:flex;flex-wrap:wrap}.twlleZ5Ehq4bB7CvKVSW{position:relative}.twlleZ5Ehq4bB7CvKVSW:first-child{margin-right:calc(var(--spacing-base)*2)}.twlleZ5Ehq4bB7CvKVSW.Qg4rPEvXsqmod1s_31d8{color:var(--jp-gray-20)}.twlleZ5Ehq4bB7CvKVSW.Qg4rPEvXsqmod1s_31d8:after{background:var(--jp-red);border-radius:var(--jp-border-radius);content:" ";display:block;height:3px;margin-top:-2px;pointer-events:none;position:absolute;top:50%;width:100%}.ApsgxIornVy_3KnciVeJ{color:var(--jp-gray-40);margin-bottom:calc(var(--spacing-base)*3)}.NMxcZL17aEP7v81uG3zD{margin-top:calc(var(--spacing-base)*5)}.jp-license-activation-screen-controls{background:var(--jp-white);display:flex;flex-direction:column;justify-content:space-between;padding:32px}.jp-license-activation-screen-controls h1{font-size:44px;font-weight:700;line-height:1.4;margin:.67em 0}.jp-license-activation-screen-controls p{font-size:var(--font-body);margin:1em 0}.jp-license-activation-screen-controls label{font-size:var(--font-body);font-weight:600}@media screen and (min-width:780px){.jp-license-activation-screen-controls{padding:64px}}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field label,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error label{font-size:var(--font-body);font-weight:600}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field input.components-text-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error input.components-text-control__input{border-radius:var(--jp-border-radius);font-size:18px;line-height:24px;margin:0;min-height:48px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field input.components-text-control__input{border:1px solid var(--jp-gray-40)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error input.components-text-control__input{border:1px solid var(--jp-red)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error{align-items:start;color:var(--jp-red);display:flex;flex-direction:row}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error svg{fill:var(--jp-red);margin-right:4px;min-width:24px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error span{font-size:var(--font-body)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active{background-color:var(--jp-black);border-radius:4px;color:var(--jp-white);display:flex;font-size:16px;font-size:var(--font-body);font-style:normal;font-weight:600;justify-content:center;line-height:24px;margin-top:24px;min-height:48px;min-width:158px;padding:13.5px 45px;width:100%}@media screen and (min-width:480px){.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active{width:auto}}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active:hover,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:hover{background-color:var(--jp-black-80);color:var(--jp-white)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active:focus,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:focus{background-color:var(--jp-black-80);border:1px solid var(--jp-white);color:var(--jp-white)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active:disabled,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active[disabled],.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:disabled,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button[disabled]{background-color:var(--jp-gray);color:var(--jp-gray-20)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button .jp-components-spinner,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active .jp-components-spinner{width:100%}@keyframes rotate-spinner{to{transform:rotate(1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-right-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}.jp-license-activation-screen-illustration{align-items:center;background:var(--jp-white-off);display:flex;flex-direction:column;justify-content:space-between;padding:32px}.jp-license-activation-screen-illustration--wrapper{display:flex;flex:1}.jp-license-activation-screen-illustration--wrapper img{align-self:center;height:auto;max-width:100%}.jp-license-activation-screen-illustration--support-link{flex:0}.jp-license-activation-screen-success-info--product-details h1{line-height:52px}.jp-license-activation-screen-success-info--product-details a{color:var(--jp-black);text-decoration:underline!important}.jp-license-activation-screen-success-info--external-link{color:var(--jp-black);font-size:16px;font-style:normal;font-weight:600;text-decoration:underline!important;white-space:nowrap}.components-button.jp-license-activation-screen-success-info--button,.components-button.jp-license-activation-screen-success-info--button:active,.components-button.jp-license-activation-screen-success-info--button:visited{background-color:var(--jp-black);border-radius:4px;color:var(--jp-white);font-size:16px;font-size:var(--font-body);font-style:normal;font-weight:600;justify-content:center;line-height:24px;margin:0 40px 20px 0;min-height:48px;min-width:158px;padding:13.5px 45px;width:100%}@media screen and (min-width:480px){.components-button.jp-license-activation-screen-success-info--button,.components-button.jp-license-activation-screen-success-info--button:active,.components-button.jp-license-activation-screen-success-info--button:visited{width:auto}}.components-button.jp-license-activation-screen-success-info--button:active:hover,.components-button.jp-license-activation-screen-success-info--button:hover,.components-button.jp-license-activation-screen-success-info--button:visited:hover{background-color:var(--jp-black-80);color:var(--jp-white)}.components-button.jp-license-activation-screen-success-info--button:active:focus,.components-button.jp-license-activation-screen-success-info--button:focus,.components-button.jp-license-activation-screen-success-info--button:visited:focus{background-color:var(--jp-black-80);border:1px solid var(--jp-white);color:var(--jp-white)}.components-button.jp-license-activation-screen-success-info--button:active:disabled,.components-button.jp-license-activation-screen-success-info--button:active[disabled],.components-button.jp-license-activation-screen-success-info--button:disabled,.components-button.jp-license-activation-screen-success-info--button:visited:disabled,.components-button.jp-license-activation-screen-success-info--button:visited[disabled],.components-button.jp-license-activation-screen-success-info--button[disabled]{background-color:var(--jp-gray);color:var(--jp-gray-20)}.components-button.jp-license-activation-screen-success-info--button .jp-components-spinner,.components-button.jp-license-activation-screen-success-info--button:active .jp-components-spinner,.components-button.jp-license-activation-screen-success-info--button:visited .jp-components-spinner{width:100%}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-10:#f2cf75;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-license-activation-screen-success-info{background:var(--jp-white);display:flex;flex-direction:column;justify-content:space-between;padding:32px}.jp-license-activation-screen-success-info h1{font-size:44px;font-weight:700;line-height:1.4;margin:.67em 0}.jp-license-activation-screen-success-info p{font-size:var(--font-body);margin:1em 0}.jp-license-activation-screen-success-info label{font-size:var(--font-body);font-weight:600}@media screen and (min-width:780px){.jp-license-activation-screen-success-info{padding:64px}}@media screen and (max-width:480px){.jp-license-activation-screen-success-info .jp-license-activation-screen-success-info--buttons{text-align:center}}.jp-license-activation-screen{border-radius:4px;box-shadow:0 4px 24px 0 #00000026;display:flex;flex-direction:column;min-height:540px;overflow:hidden}@media screen and (min-width:780px){.jp-license-activation-screen{flex-direction:row}}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js index b5192a4a..24acb3a2 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js @@ -1,2 +1,11 @@ /*! For license information please see index.js.LICENSE.txt */ -(()=>{var e={7538:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},9183:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},9105:(e,t)=>{var n;!function(){"use strict";var c={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var r in n)c.call(n,r)&&n[r]&&e.push(r);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},5771:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let c=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(c++,"%c"===e&&(o=c))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(1244)(t);const{formatters:c}=e.exports;c.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},1244:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,s,a=null;function r(...e){if(!r.enabled)return;const c=r,o=Number(new Date),s=o-(n||o);c.diff=s,c.prev=n,c.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const s=t.formatters[o];if("function"==typeof s){const t=e[a];n=s.call(c,t),e.splice(a,1),a--}return n})),t.formatArgs.call(c,e);(c.log||t.log).apply(c,e)}return r.namespace=e,r.useColors=t.useColors(),r.color=t.selectColor(e),r.extend=c,r.destroy=t.destroy,Object.defineProperty(r,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{a=e}}),"function"==typeof t.init&&t.init(r),r}function c(e,n){const c=t(this.namespace+(void 0===n?":":n)+e);return c.log=this.log,c}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const c=("string"==typeof e?e:"").split(/[\s,]+/),o=c.length;for(n=0;n<o;n++)c[n]&&("-"===(e=c[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,c;for(n=0,c=t.skips.length;n<c;n++)if(t.skips[n].test(e))return!1;for(n=0,c=t.names.length;n<c;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(2002),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},6619:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={"jp-wrap":"O5NYbFTsxmrm4P2SIdOC","jp-row":"rkV4U_hzC04NwXFQcTHl","sm-col-span-1":"G81E6mesnld_OhhOvz_F","sm-col-span-2":"SfCZpjwiu2F0KDjGIXEA","sm-col-span-3":"qPxwbSu_GTDTz_8jFHJD","sm-col-span-4":"xYAWQ0wk6FPfZOZQgFiw","md-col-span-1":"zwZjA7ofpMucaB_UzG48","md-col-span-2":"YfwKGGBEqiINFYy6ZpKM","md-col-span-3":"pcHQbVFRxA_OvNRQ2OwP","md-col-span-4":"U_LJMBlRZ8ItXZuvCXGg","md-col-span-5":"st_7w_Ja1Gp2AgGaTysO","md-col-span-6":"gQsaHmJo6Gp7Yq9IB9Sg","md-col-span-7":"P0a4FWsiJJmR6bySI8QC","md-col-span-8":"UxSHj7jyDp6sGKHILNRc","lg-col-span-1":"TExt5ebNqUrEn2NzeDDh","lg-col-span-2":"cdwvRRac4c2djSpHfOpF","lg-col-span-3":"hvRpxlyFY9BQIDdEGTjg","lg-col-span-4":"Ev9JGJi3yKkBq6cW3Xge","lg-col-span-5":"mhL__tIHFH_tViX5718D","lg-col-span-6":"X1lGIxHHxsFl_39u4Px6","lg-col-span-7":"pc5UnY_DzsSDkyih78Ti","lg-col-span-8":"QCjBtfnG3u20FwoDd59Z","lg-col-span-9":"MX1aL3BeJpoSE0aXghp0","lg-col-span-10":"h_JAcO8a8ClV2LmTWsMz","lg-col-span-11":"gKlDMi0N7LOd9q8uJHi5","lg-col-span-12":"KZWhYB7r6TG75uJu2LsQ","md-col-span-0":"G6NxfG2gGwvEYb0aGdPJ","sm-col-span-0":"aceZPGfrg7IoR0Vu7ZJg","jp-cut":"MZSHJVi991kNJhn_Xnip","jp-admin-page":"EZ590eIMC5y_t1_gWRua","jp-admin-page-section":"BYzOly4G7Gry9wdRH0AY"}},9855:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={"jp-admin-section":"_UqttTwRJeajPRpRGZPJ"}},8459:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={"jp-wrap":"K6gniZequRm1zBi4xa2G","jp-row":"vickZxEIl6kGZp7KkFYF","sm-col-span-1":"U2ZD1antXfCcQlBdFwyw","sm-col-span-2":"caLSPVQ3JP3b2Ia68Seq","sm-col-span-3":"h6FKJdwoY_zIXh6pEj1U","sm-col-span-4":"GkjDOzh_5n5VxKrqEW_I","md-col-span-1":"V2HSxZHesNOXMBWOmdFG","md-col-span-2":"i3fz9zvErDyXYherb6Ew","md-col-span-3":"_3bKcKfanUgurPMcHEiV","md-col-span-4":"U44hqBGsmVA1lI9R2ZnH","md-col-span-5":"AzaRYYQQYJjKUF9D87mw","md-col-span-6":"sag3QKXTxIQXPPjmbrAl","md-col-span-7":"ifY5fUWFNROS_F7Jys9v","md-col-span-8":"nZFgLvw9LsUJnEViXnJZ","lg-col-span-1":"Tqir6CbiyHOgYmsAgY57","lg-col-span-2":"VeVLz3DEagxiXMMPEOCe","lg-col-span-3":"G3R07cw2eP3D3juW3A3l","lg-col-span-4":"eQ3UseyneBNu_ZLuqSzg","lg-col-span-5":"VlgV8xjgkGoOLJShoyNM","lg-col-span-6":"DJCwqamaIDFQoj0jEgBc","lg-col-span-7":"CxtXPQUYJfNUQVn3y2y_","lg-col-span-8":"BroOgbyuFxoSv48H70B5","lg-col-span-9":"KnUcRFDSsxeb_z46ajNY","lg-col-span-10":"bXiAAxiM2mhcI43ET0pp","lg-col-span-11":"ipYVW2jwG2cFjIHpnQk2","lg-col-span-12":"KcREgfiJ4ix9nAvNAXqQ","md-col-span-0":"qSfEJeFAh4WmcPtmo8qe","sm-col-span-0":"_RxxiRFsUS3nYTZhkprA","jp-cut":"RSw9xhnEr8xpkX3hPPaM","jp-admin-section-hero":"kEBaF5NOHtQsQn5jfOEA"}},8776:()=>{},3220:()=>{},4555:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={"jp-wrap":"WcIPVMUrQMdwzisuVSh7","jp-row":"Nxx7T20LwPUQPXCSDMfA","sm-col-span-1":"mmVmo1nZYrRywmnSKQFx","sm-col-span-2":"UrIp26XpdUSMJft8YxdC","sm-col-span-3":"pMXlFWglEDyK6MbwJ8sX","sm-col-span-4":"P5H1ohz9m5_rEqZFAkFm","md-col-span-1":"ofLUn8LwR3LLeWl8tPdU","md-col-span-2":"fq1Z8JYbcrrXavvSfzKk","md-col-span-3":"jq9gui11HqTDfI7tXH1d","md-col-span-4":"mVYkSRC7j44WiWLZHOnM","md-col-span-5":"S3wOGmx7YLTrqz_bcLth","md-col-span-6":"Y3GW3wokLgm9jnX78Uwk","md-col-span-7":"ShMEdZjpjdYj7mCQzrSO","md-col-span-8":"nfBAID75QGC1VZ8t0RfR","lg-col-span-1":"Vr2EQcrmKOPJtFU72Vv2","lg-col-span-2":"CTS6MNweODFo4ZxcT0iV","lg-col-span-3":"XTISRluUo3o5xxnPNu09","lg-col-span-4":"c_EtRaSOJafAl5r9WkBm","lg-col-span-5":"HcpW_q5aO8Bf_ngIjyjv","lg-col-span-6":"XF3r0hMrFrrmxH5TJee0","lg-col-span-7":"Jl9ognyJ9XOZ6g0BTzLf","lg-col-span-8":"_8w8oD2R9CVt9AU4PvUy","lg-col-span-9":"ltOXxurwUtxy7XIR_loo","lg-col-span-10":"bKUzzGEJ3wCoAOZZvVCK","lg-col-span-11":"GltQVCPa1x4tZ7sWFg1v","lg-col-span-12":"UzWicuFiKrGgMEjmRAFA","md-col-span-0":"CDwHAcVQxDeV2mFXS1Dz","sm-col-span-0":"sr1184KrdJ0UtgNsMQnR","jp-cut":"MnTtKIHRyzXYoesgRCgm"}},8422:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={"jp-container":"O8YnwnZegI89S2Q3k5Qn"}},7941:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={"jp-wrap":"iwMEh2CwJ_r23Y9sVcJ1","jp-row":"HwO79godDUI97Xub9ey4","sm-col-span-1":"EC1Yirv2kOgRU77F2XRd","sm-col-span-2":"FHZqFvZXEDJ9mpOm7CeY","sm-col-span-3":"VOmONLKUkcSrIRYmX6YZ","sm-col-span-4":"eECO55N5YGkBB3tKa0If","md-col-span-1":"u3ZB3zRkuglILO6FSIrx","md-col-span-2":"iZnPl6piWO_GqHn16XKi","md-col-span-3":"WWctfqi1wHZDWrue8GIt","md-col-span-4":"p678NN_M0K78Kpprfndu","md-col-span-5":"_6D2TXtGKmepmwrxSf5DW","md-col-span-6":"cWORs5VDjuStXsiVPtiO","md-col-span-7":"yJsc8qt82L9miwDoe2Y2","md-col-span-8":"hD6bXWfNn5elhKCaBFTD","lg-col-span-1":"k9j6XIJdXbQ5YNyU8sNH","lg-col-span-2":"TnVGX0JHm_muRRcmYYwV","lg-col-span-3":"VILIswQXi8XzNJ3BqePc","lg-col-span-4":"h7mXuoRFWMGCiWYH4Ij1","lg-col-span-5":"uHYkk5STnhikqYMIxtE1","lg-col-span-6":"E8zp8nDOvAQ7VHsXKJJw","lg-col-span-7":"jwOhfvvsXGTCtHfB2854","lg-col-span-8":"DmSEZVFn_2XNNKJGgkXw","lg-col-span-9":"RdgOIY1qMZ8eqAeNSGNw","lg-col-span-10":"XBQd6xiLipeHg0O6cf7N","lg-col-span-11":"JyQ6Tbn3FCHfrCEyWrAr","lg-col-span-12":"fzJ_qaXYWs3EWQEupbLD","md-col-span-0":"LE2ZLIt_Y0slsr6TSmqe","sm-col-span-0":"vYxwZbK_covZoLjDe3BM","jp-cut":"fmzqGXmbTSiUblRujgqB"}},404:()=>{},1294:()=>{},1545:()=>{},843:()=>{},3498:()=>{},2002:e=>{var t=1e3,n=60*t,c=60*n,o=24*c,s=7*o,a=365.25*o;function r(e,t,n,c){var o=t>=1.5*n;return Math.round(e/n)+" "+c+(o?"s":"")}e.exports=function(e,i){i=i||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!r)return;var i=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return i*a;case"weeks":case"week":case"w":return i*s;case"days":case"day":case"d":return i*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*c;case"minutes":case"minute":case"mins":case"min":case"m":return i*n;case"seconds":case"second":case"secs":case"sec":case"s":return i*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}(e);if("number"===l&&isFinite(e))return i.long?function(e){var s=Math.abs(e);if(s>=o)return r(e,s,o,"day");if(s>=c)return r(e,s,c,"hour");if(s>=n)return r(e,s,n,"minute");if(s>=t)return r(e,s,t,"second");return e+" ms"}(e):function(e){var s=Math.abs(e);if(s>=o)return Math.round(e/o)+"d";if(s>=c)return Math.round(e/c)+"h";if(s>=n)return Math.round(e/n)+"m";if(s>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9587:(e,t,n)=>{"use strict";var c=n(5843);function o(){}function s(){}s.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,s,a){if(a!==c){var r=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw r.name="Invariant Violation",r}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:o};return n.PropTypes=n,n}},1268:(e,t,n)=>{e.exports=n(9587)()},5843:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},816:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var c=n(5771),o=n.n(c),s=n(2819);const a=o()("dops:analytics");let r,i;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const l={initialize:function(e,t,n){l.setUser(e,t),l.setSuperProps(n),l.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){i={ID:e,username:t}},setSuperProps:function(e){r=e},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);a("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);this.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);a("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('Built stat "%s" in group "%s"',t,e);return n}(e,t);this.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){l.tracks.recordPageView(e),l.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,c,o,s,a){l.ga.recordPurchase(e,t,n,c,o,s,a)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(r&&(a("- Super Props: %o",r),t=(0,s.assign)(t,r)),a('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):a('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};l.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){l.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){a("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};l.ga.initialized||(i&&(e={userId:"u-"+i.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),l.ga.initialized=!0)},recordPageView:function(e,t){l.ga.initialize(),a("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,c){l.ga.initialize();let o="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(o+=" [Option Label: "+n+"]"),void 0!==c&&(o+=" [Option Value: "+c+"]"),a(o),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,c)},recordPurchase:function(e,t,n,c,o,s,a){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:c,currency:a}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:o,quantity:s}),window.ga("ecommerce:send")}},identifyUser:function(){i&&window._tkq.push(["identifyUser",i.ID,i.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},p=l},9570:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>u});var c=n(2819),o=n(6483),s=n(6251);function a(e){class t extends Error{constructor(){super(...arguments),this.name=e}}return t}const r=a("JsonParseError"),i=a("JsonParseAfterRedirectError"),l=a("Api404Error"),p=a("Api404AfterRedirectError"),d=a("FetchNetworkError");const u=new function(e,t){let n=e,a={"X-WP-Nonce":t},r={credentials:"same-origin",headers:a},i={method:"post",credentials:"same-origin",headers:(0,c.assign)({},a,{"Content-type":"application/json"})},l=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",c=n.length?n.split("&"):[];return c.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+c.join("&")};const p={setApiRoot(e){n=e},setApiNonce(e){a={"X-WP-Nonce":e},r={credentials:"same-origin",headers:a},i={method:"post",credentials:"same-origin",headers:(0,c.assign)({},a,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{l=e},registerSite:(e,t)=>{const c={registration_nonce:e,no_iframe:!0};return(0,s.jetpackConfigHas)("consumer_slug")&&(c.plugin_slug=(0,s.jetpackConfigGet)("consumer_slug")),null!==t&&(c.redirect_uri=t),u(`${n}jetpack/v4/connection/register`,i,{body:JSON.stringify(c)}).then(m).then(g)},fetchAuthorizationUrl:e=>d((0,o.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),r).then(m).then(g),fetchSiteConnectionData:()=>d(`${n}jetpack/v4/connection/data`,r).then(g),fetchSiteConnectionStatus:()=>d(`${n}jetpack/v4/connection`,r).then(g),fetchSiteConnectionTest:()=>d(`${n}jetpack/v4/connection/test`,r).then(m).then(g),fetchUserConnectionData:()=>d(`${n}jetpack/v4/connection/data`,r).then(g),fetchUserTrackingSettings:()=>d(`${n}jetpack/v4/tracking/settings`,r).then(m).then(g),updateUserTrackingSettings:e=>u(`${n}jetpack/v4/tracking/settings`,i,{body:JSON.stringify(e)}).then(m).then(g),disconnectSite:()=>u(`${n}jetpack/v4/connection`,i,{body:JSON.stringify({isActive:!1})}).then(m).then(g),fetchConnectUrl:()=>d(`${n}jetpack/v4/connection/url`,r).then(m).then(g),unlinkUser:()=>u(`${n}jetpack/v4/connection/user`,i,{body:JSON.stringify({linked:!1})}).then(m).then(g),reconnect:()=>u(`${n}jetpack/v4/connection/reconnect`,i).then(m).then(g),fetchConnectedPlugins:()=>d(`${n}jetpack/v4/connection/plugins`,r).then(m).then(g),setHasSeenWCConnectionModal:()=>u(`${n}jetpack/v4/seen-wc-connection-modal`,i).then(m).then(g),fetchModules:()=>d(`${n}jetpack/v4/module/all`,r).then(m).then(g),fetchModule:e=>d(`${n}jetpack/v4/module/${e}`,r).then(m).then(g),activateModule:e=>u(`${n}jetpack/v4/module/${e}/active`,i,{body:JSON.stringify({active:!0})}).then(m).then(g),deactivateModule:e=>u(`${n}jetpack/v4/module/${e}/active`,i,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>u(`${n}jetpack/v4/module/${e}`,i,{body:JSON.stringify(t)}).then(m).then(g),updateSettings:e=>u(`${n}jetpack/v4/settings`,i,{body:JSON.stringify(e)}).then(m).then(g),getProtectCount:()=>d(`${n}jetpack/v4/module/protect/data`,r).then(m).then(g),resetOptions:e=>u(`${n}jetpack/v4/options/${e}`,i,{body:JSON.stringify({reset:!0})}).then(m).then(g),activateVaultPress:()=>u(`${n}jetpack/v4/plugins`,i,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(m).then(g),getVaultPressData:()=>d(`${n}jetpack/v4/module/vaultpress/data`,r).then(m).then(g),installPlugin:(e,t)=>{const c={slug:e,status:"active"};return t&&(c.source=t),u(`${n}jetpack/v4/plugins`,i,{body:JSON.stringify(c)}).then(m).then(g)},activateAkismet:()=>u(`${n}jetpack/v4/plugins`,i,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(m).then(g),getAkismetData:()=>d(`${n}jetpack/v4/module/akismet/data`,r).then(m).then(g),checkAkismetKey:()=>d(`${n}jetpack/v4/module/akismet/key/check`,r).then(m).then(g),checkAkismetKeyTyped:e=>u(`${n}jetpack/v4/module/akismet/key/check`,i,{body:JSON.stringify({api_key:e})}).then(m).then(g),fetchStatsData:e=>d(function(e){let t=`${n}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),r).then(m).then(g).then(h),getPluginUpdates:()=>d(`${n}jetpack/v4/updates/plugins`,r).then(m).then(g),getPlans:()=>d(`${n}jetpack/v4/plans`,r).then(m).then(g),fetchSettings:()=>d(`${n}jetpack/v4/settings`,r).then(m).then(g),updateSetting:e=>u(`${n}jetpack/v4/settings`,i,{body:JSON.stringify(e)}).then(m).then(g),fetchSiteData:()=>d(`${n}jetpack/v4/site`,r).then(m).then(g).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>d(`${n}jetpack/v4/site/features`,r).then(m).then(g).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>d(`${n}jetpack/v4/site/products`,r).then(m).then(g),fetchSitePurchases:()=>d(`${n}jetpack/v4/site/purchases`,r).then(m).then(g).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>d(`${n}jetpack/v4/site/benefits`,r).then(m).then(g).then((e=>JSON.parse(e.data))),fetchSetupQuestionnaire:()=>d(`${n}jetpack/v4/setup/questionnaire`,r).then(m).then(g),fetchRecommendationsData:()=>d(`${n}jetpack/v4/recommendations/data`,r).then(m).then(g),fetchRecommendationsProductSuggestions:()=>d(`${n}jetpack/v4/recommendations/product-suggestions`,r).then(m).then(g),fetchRecommendationsUpsell:()=>d(`${n}jetpack/v4/recommendations/upsell`,r).then(m).then(g),saveRecommendationsData:e=>u(`${n}jetpack/v4/recommendations/data`,i,{body:JSON.stringify({data:e})}).then(m),fetchProducts:()=>d(`${n}jetpack/v4/products`,r).then(m).then(g),fetchRewindStatus:()=>d(`${n}jetpack/v4/rewind`,r).then(m).then(g).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>d(`${n}jetpack/v4/scan`,r).then(m).then(g).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>u(`${n}jetpack/v4/notice/${e}`,i,{body:JSON.stringify({dismissed:!0})}).then(m).then(g),fetchPluginsData:()=>d(`${n}jetpack/v4/plugins`,r).then(m).then(g),fetchVerifySiteGoogleStatus:e=>d(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,r).then(m).then(g),verifySiteGoogle:e=>u(`${n}jetpack/v4/verify-site/google`,i,{body:JSON.stringify({keyring_id:e})}).then(m).then(g),sendMobileLoginEmail:()=>u(`${n}jetpack/v4/mobile/send-login-email`,i).then(m).then(g),submitSurvey:e=>u(`${n}jetpack/v4/marketing/survey`,i,{body:JSON.stringify(e)}).then(m).then(g),saveSetupQuestionnaire:e=>u(`${n}jetpack/v4/setup/questionnaire`,i,{body:JSON.stringify(e)}).then(m).then(g),updateLicensingError:e=>u(`${n}jetpack/v4/licensing/error`,i,{body:JSON.stringify(e)}).then(m).then(g),updateLicenseKey:e=>u(`${n}jetpack/v4/licensing/set-license`,i,{body:JSON.stringify({license:e})}).then(m).then(g),getUserLicensesCounts:()=>d(`${n}jetpack/v4/licensing/user/counts`,r).then(m).then(g),updateLicensingActivationNoticeDismiss:e=>u(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,i,{body:JSON.stringify({last_detached_count:e})}).then(m).then(g),updateRecommendationsStep:e=>u(`${n}jetpack/v4/recommendations/step`,i,{body:JSON.stringify({step:e})}).then(m),confirmIDCSafeMode:()=>u(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,i).then(m),startIDCFresh:e=>u(`${n}jetpack/v4/identity-crisis/start-fresh`,i,{body:JSON.stringify({redirect_uri:e})}).then(m).then(g),migrateIDC:()=>u(`${n}jetpack/v4/identity-crisis/migrate`,i).then(m),attachLicenses:e=>u(`${n}jetpack/v4/licensing/attach-licenses`,i,{body:JSON.stringify({licenses:e})}).then(m).then(g),fetchSearchPlanInfo:()=>d(`${n}jetpack/v4/search/plan`,r).then(m).then(g),fetchSearchSettings:()=>d(`${n}jetpack/v4/search/settings`,r).then(m).then(g),updateSearchSettings:e=>u(`${n}jetpack/v4/search/settings`,i,{body:JSON.stringify(e)}).then(m).then(g)};function d(e,t){return fetch(l(e),t)}function u(e,t,n){return fetch(e,(0,c.assign)({},t,n)).catch(f)}function h(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}(0,c.assign)(this,p)};function m(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new p(e.redirected):new l})):e.json().catch((e=>h(e))).then((t=>{const n=new Error(`${t.message} (Status ${e.status})`);throw n.response=t,n.name="ApiError",n}))}function g(e){return e.json().catch((t=>h(t,e.redirected,e.url)))}function h(e,t,n){throw t?new i(n):new r}function f(){throw new d}},2234:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var c=n(9196),o=n.n(c),s=n(5736),a=n(1268),r=n.n(a),i=n(6619),l=n(7967),p=n(69),d=n(4191),u=n(134);const __=s.__,m=e=>{const{moduleName:t,a8cLogoHref:n}=e;return o().createElement("div",{className:i.Z["jp-admin-page-section"]},o().createElement(d.Z,null,o().createElement(p.Z,null,o().createElement(u.Z,{lg:12,md:8,sm:4},o().createElement(l.Z,{moduleName:t,a8cLogoHref:n})))))};m.defaultProps={a8cLogoHref:"https://jetpack.com",moduleName:__("Jetpack","jetpack-my-jetpack")},m.propTypes={a8cLogoHref:r().string,moduleName:r().string};const g=m},4123:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var c=n(9196),o=n.n(c),s=n(6619),a=n(1546),r=n(69),i=n(4191),l=n(134);const p=()=>o().createElement("div",{className:s.Z["jp-admin-page-section"]},o().createElement(i.Z,null,o().createElement(r.Z,null,o().createElement(l.Z,{lg:12,md:8,sm:4},o().createElement(a.Z,null)))))},8670:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var c=n(9196),o=n.n(c),s=n(5736),a=n(1268),r=n.n(a),i=n(6619),l=n(4123),p=n(2234);const __=s.__,d=e=>{const{children:t,moduleName:n,a8cLogoHref:c,showHeader:s,showFooter:a}=e;return o().createElement("div",{className:i.Z["jp-admin-page"]},s&&o().createElement(l.Z,null),t,a&&o().createElement(p.Z,{moduleName:n,a8cLogoHref:c}))};d.defaultProps={a8cLogoHref:"https://jetpack.com",moduleName:__("Jetpack","jetpack-my-jetpack"),showHeader:!0,showFooter:!0},d.propTypes={a8cLogoHref:r().string,moduleName:r().string,showHeader:r().bool,showFooter:r().bool};const u=d},6160:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var c=n(9196),o=n.n(c),s=n(9855),a=n(4191);const r=e=>{const{children:t}=e;return o().createElement("div",{className:s.Z["jp-admin-section"]},o().createElement(a.Z,null,t))}},4502:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var c=n(9196),o=n.n(c),s=n(8459),a=n(4191);const r=e=>{const{children:t}=e;return o().createElement("div",{className:s.Z["jp-admin-section-hero"]},o().createElement(a.Z,null,t))}},1824:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var c=n(9183),o=n.n(c),s=n(9196),a=n.n(s),r=n(9105),i=n.n(r),l=n(5736),p=n(1268),d=n.n(p);const __=l.__,u=e=>{const{title:t,height:n,className:c,...s}=e;return a().createElement("svg",o()({role:"img",x:"0",y:"0",viewBox:"0 0 935 38.2",enableBackground:"new 0 0 935 38.2","aria-labelledby":"jp-automattic-byline-logo-title",height:n,className:i()("jp-automattic-byline-logo",c)},s),a().createElement("title",{id:"jp-automattic-byline-logo-title"},t),a().createElement("path",{d:"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"}),a().createElement("path",{d:"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z"}),a().createElement("path",{d:"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7zM886.2 37l-23.4-24.1 -2.3-2.5V37h-6.8V1h6.5l22.7 24.1 2.3 2.6V1h6.8v36H886.2zM902.3 37V1H935v5.6h-26v9.2h20v5.5h-20v10.1h26V37H902.3z"}))};u.defaultProps={title:__("An Automattic Airline","jetpack-my-jetpack"),height:7,className:""},u.propTypes={title:d().string,height:d().number,className:d().string};const m=u},9697:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9196),o=n.n(c),s=n(1268),a=n.n(s);n(8776);const r=e=>{const{format:t,icon:n,imageUrl:c}=e;return o().createElement("div",{className:"jp-components__decorative-card "+(t?"jp-components__decorative-card--"+t:"")},o().createElement("div",{className:"jp-components__decorative-card__image",style:{backgroundImage:c?`url( ${c} )`:""}}),o().createElement("div",{className:"jp-components__decorative-card__content"},o().createElement("div",{className:"jp-components__decorative-card__lines"})),(()=>{if(n)return o().createElement("div",{className:"jp-components__decorative-card__icon-container"},o().createElement("span",{className:"jp-components__decorative-card__icon jp-components__decorative-card__icon--"+n}))})())};r.propTypes={format:a().oneOf(["horizontal","vertical"]),icon:a().oneOf(["unlink"]),imageUrl:a().string},r.defaultProps={format:"horizontal"};const i=r},7967:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var c=n(9183),o=n.n(c),s=n(9196),a=n.n(s),r=n(5736),i=n(9105),l=n.n(i),p=n(1268),d=n.n(p),u=n(1824),m=(n(3220),n(1546));const __=r.__,g=e=>{const{a8cLogoHref:t,moduleName:n,className:c,...s}=e;return a().createElement("div",o()({className:l()("jp-dashboard-footer",c)},s),a().createElement("div",{className:"jp-dashboard-footer__footer-left"},a().createElement(m.Z,{logoColor:"#000",showText:!1,height:16,className:"jp-dashboard-footer__jetpack-symbol","aria-label":__("Jetpack logo","jetpack-my-jetpack")}),a().createElement("span",{className:"jp-dashboard-footer__module-name"},n)),a().createElement("div",{className:"jp-dashboard-footer__footer-right"},a().createElement("a",{href:t,"aria-label":__("An Automattic Airline","jetpack-my-jetpack")},a().createElement(u.Z,null))))};g.defaultProps={a8cLogoHref:"https://jetpack.com",moduleName:__("Jetpack","jetpack-my-jetpack"),className:""},g.propTypes={a8cLogoHref:d().string,moduleName:d().string,className:d().string};const h=g},1546:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var c=n(9183),o=n.n(c),s=n(7538),a=n.n(s),r=n(1268),i=n.n(r),l=n(9196),p=n.n(l),d=n(9105),u=n.n(d),m=n(5736);const __=m.__;class g extends p().Component{render(){const{logoColor:e,showText:t,className:n,...c}=this.props,s=t?"0 0 118 32":"0 0 32 32";return p().createElement("svg",o()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:s,className:u()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title"},c),p().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-my-jetpack")),p().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&p().createElement(l.Fragment,null,p().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),p().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),p().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),p().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),p().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),p().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),p().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}a()(g,"propTypes",{className:i().string,width:i().number,height:i().number,showText:i().bool,logoColor:i().string}),a()(g,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"});const h=g},134:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var c=n(9196),o=n.n(c),s=n(9105),a=n.n(s),r=n(1268),i=n.n(r),l=n(4555);const p=e=>{const{children:t,sm:n,md:c,lg:s}=e,r=Number.isInteger(n)?n:0,i=Number.isInteger(c)?c:0,p=Number.isInteger(s)?s:0,d=[r,i,p].reduce(((e,t)=>t>0&&t<e?t:e)),u=a()(r>0?l.Z["sm-col-span-"+r]:l.Z["sm-col-span-"+d],i>0?l.Z["md-col-span-"+i]:l.Z["md-col-span-"+d],p>0?l.Z["lg-col-span-"+p]:l.Z["lg-col-span-"+d]);return o().createElement("div",{className:u},t)};p.proptypes={sm:i().number,md:i().number,lg:i().number};const d=p},4191:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var c=n(9196),o=n.n(c),s=n(8422);const a=e=>{const{children:t}=e;return o().createElement("div",{className:s.Z["jp-container"]},t)}},69:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var c=n(9196),o=n.n(c),s=n(7941);const a=e=>{const{children:t}=e;return o().createElement("div",{className:s.Z["jp-row"]},t)}},1415:(e,t,n)=>{"use strict";function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let c;if("undefined"!=typeof window&&(c=window.Initial_State?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);Object.keys(t).map((e=>{n[e]=encodeURIComponent(t[e])})),!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),c&&(n.calypso_env=c);const o=Object.keys(n).map((e=>e+"="+n[e])).join("&");return"https://jetpack.com/redirect/?"+o}n.d(t,{Z:()=>c})},6251:(e,t,n)=>{let c={};try{c=n(4462)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),c={missingConfig:!0}}const o=e=>c.hasOwnProperty(e);e.exports={jetpackConfigHas:o,jetpackConfigGet:e=>{if(!o(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return c[e]}}},9565:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9196),o=n(1268),s=n.n(o),a=n(9570);const r=e=>{const{redirectFunc:t,connectUrl:n,redirectUri:o,from:s}=e,[r,i]=(0,c.useState)(null);return n&&n!==r&&i(n),(0,c.useEffect)((()=>{r||a.ZP.fetchAuthorizationUrl(o).then((e=>i(e.authorizeUrl))).catch((e=>{throw e}))}),[]),r?(t(r+(s?(r.includes("?")?"&":"?")+"from="+encodeURIComponent(s):"")),null):null};r.propTypes={connectUrl:s().string,redirectUri:s().string.isRequired,from:s().string,redirectFunc:s().func},r.defaultProps={redirectFunc:e=>window.location.assign(e),redirectUri:null};const i=r},3593:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var c=n(9196),o=n.n(c),s=n(1268),a=n.n(s),r=n(5736),i=n(2332);const __=r.__,l=e=>{const{connectedPlugins:t,disconnectingPlugin:n}=e,s=(0,c.useMemo)((()=>{if(t){return Object.keys(t).map((e=>Object.assign({slug:e},t[e]))).filter((e=>n!==e.slug))}return[]}),[t,n]);return t&&s.length>0?o().createElement(o().Fragment,null,o().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},o().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is powering other plugins on your site. If you disconnect, these plugins will no longer work.","jetpack-my-jetpack"))),o().createElement("div",{className:"jp-connection__disconnect-card__group"},s.map((e=>o().createElement(i.Z,{title:e.name}))))):null};l.PropTypes={connectedPlugins:a().object,disconnectingPlugin:a().string};const p=l},7132:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var c=n(9196),o=n.n(c),s=n(5736),a=n(5609),r=n(1268),i=n.n(r),l=n(9570),p=n(9818),d=n(9565),u=n(5628),m=n(2199),g=n(1631);n(404);const __=s.__,h=e=>{const{apiRoot:t,apiNonce:n,redirectUri:s,title:r,connectionInfoText:i,onDisconnected:h,connectedPlugins:f,connectedSiteId:k,context:_}=e,{isRegistered:y,isUserConnected:v}=(0,g.Z)({apiRoot:t,apiNonce:n}),[j,C]=(0,c.useState)(!1),[E,w]=(0,c.useState)({}),[b,S]=(0,c.useState)(!1),N=(0,p.useSelect)((e=>e(m.t).getUserIsConnecting()),[]),{setConnectionStatus:F,setUserIsConnecting:I}=(0,p.useDispatch)(m.t),Z=(0,c.useRef)();(0,c.useEffect)((()=>{l.ZP.setApiRoot(t),l.ZP.setApiNonce(n)}),[t,n]),(0,c.useEffect)((()=>{C(!0),l.ZP.fetchSiteConnectionData().then((e=>{C(!1),w(e.currentUser?.wpcomUser);const t=e.currentUser?.wpcomUser?.avatar;t&&(Z.current.style.backgroundImage=`url('${t}')`)})).catch((e=>{throw C(!1),e}))}),[C,w]);const O=(0,c.useCallback)((e=>{e&&e.preventDefault(),S(!0)}),[S]),R=(0,c.useCallback)((e=>{e&&e.preventDefault(),S(!1)}),[S]),P=(0,c.useCallback)((e=>{e&&e.preventDefault(),F({isActive:!1,isRegistered:!1,isUserConnected:!1}),h&&"[object Function]"==={}.toString.call(h)&&h()}),[h,F]);return y?o().createElement("div",{className:"jp-connection-status-card"},o().createElement("h3",null,r),o().createElement("p",null,i),o().createElement("div",{className:"jp-connection-status-card--status"},o().createElement("div",{className:"jp-connection-status-card--cloud"}),o().createElement("div",{className:"jp-connection-status-card--line"+(v?"":" jp-connection-status-card--site-only")}),o().createElement("div",{className:"jp-connection-status-card--jetpack-logo"}),o().createElement("div",{className:"jp-connection-status-card--avatar",ref:Z})),o().createElement("ul",{className:"jp-connection-status-card--list"},o().createElement("li",{className:"jp-connection-status-card--list-item-success"},__("Site connected.","jetpack-my-jetpack")," ",o().createElement(a.Button,{variant:"link",onClick:O,className:"jp-connection__disconnect-dialog__link"},__("Disconnect","jetpack-my-jetpack")),o().createElement(u.Z,{apiRoot:t,apiNonce:n,onDisconnected:P,connectedPlugins:f,connectedSiteId:k,connectedUser:E,isOpen:b,onClose:R,context:_})),v&&!j&&o().createElement("li",{className:"jp-connection-status-card--list-item-success"},__("Logged in as","jetpack-my-jetpack")," ",E?.display_name),!v&&!j&&o().createElement("li",{className:"jp-connection-status-card--list-item-error"},__("Your WordPress.com account is not connected.","jetpack-my-jetpack"))),!v&&!j&&o().createElement(a.Button,{isPrimary:!0,disabled:N,onClick:I,className:"jp-connection-status-card--btn-connect-user"},__("Connect your WordPress.com account","jetpack-my-jetpack")),N&&o().createElement(d.Z,{redirectUri:s})):null};h.propTypes={apiRoot:i().string.isRequired,apiNonce:i().string.isRequired,redirectUri:i().string.isRequired,connectedPlugins:i().object,connectedSiteId:i().number,title:i().string,connectionInfoText:i().string,onDisconnected:i().func,context:i().string},h.defaultProps={title:__("Connection","jetpack-my-jetpack"),connectionInfoText:__("Leverages the Jetpack Cloud for more features on your side.","jetpack-my-jetpack")};const f=h},2332:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9196),o=n.n(c),s=n(1268),a=n.n(s);n(1294);const r=e=>{const{title:t,value:n,description:c}=e;return o().createElement("div",{className:"jp-connection__disconnect-card card"},o().createElement("div",{className:"jp-connection__disconnect-card__card-content"},o().createElement("p",{className:"jp-connection__disconnect-card__card-headline"},t),(n||c)&&o().createElement("div",{className:"jp-connection__disconnect-card__card-stat-block"},o().createElement("span",{className:"jp-connection__disconnect-card__card-stat"},n),o().createElement("div",{className:"jp-connection__disconnect-card__card-description"},c))))};r.propTypes={title:a().string,value:a().string|a().number,description:a().number};const i=r},5628:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var c=n(9196),o=n.n(c),s=n(1268),a=n.n(s),r=n(5736),i=n(5609),l=n(9570),p=n(816),d=n(6251),u=(n(1545),n(163)),m=n(1496),g=n(4130),h=n(5700);const __=r.__,f=e=>{const[t,n]=(0,c.useState)(!1),[s,a]=(0,c.useState)(!1),[r,f]=(0,c.useState)(!1),[k,_]=(0,c.useState)(!1),[y,v]=(0,c.useState)(!1),[j,C]=(0,c.useState)(!1),{apiRoot:E,apiNonce:w,connectedPlugins:b,title:S,pluginScreenDisconnectCallback:N,onDisconnected:F,onError:I,disconnectStepComponent:Z,context:O,connectedUser:R,connectedSiteId:P,isOpen:x,onClose:U}=e;let T="";(0,d.jetpackConfigHas)("consumer_slug")&&(T=(0,d.jetpackConfigGet)("consumer_slug"));const A=(0,c.useMemo)((()=>({context:O,plugin:T})),[O,T]);(0,c.useEffect)((()=>{l.ZP.setApiRoot(E),l.ZP.setApiNonce(w)}),[E,w]),(0,c.useEffect)((()=>{R&&R.ID&&R.login&&p.Z.initialize(R.ID,R.login)}),[R,R.ID,R.login]),(0,c.useEffect)((()=>{x&&p.Z.tracks.recordEvent("jetpack_disconnect_dialog_open",A)}),[x,A]),(0,c.useEffect)((()=>{x&&(s?!s||k||y?k&&!y?p.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"survey"},A)):y&&p.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"thank_you"},A)):p.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect_confirm"},A)):p.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect"},A)))}),[x,s,k,y,A]);const J=(0,c.useCallback)((()=>{l.ZP.disconnectSite().then((()=>{n(!1),a(!0)})).catch((e=>{n(!1),f(e),I&&I(e)}))}),[n,a,f,I]),z=(0,c.useCallback)(((e,t)=>{C(!0),fetch("https://public-api.wordpress.com/wpcom/v2/marketing/feedback-survey",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)}).then((e=>e.json())).then((e=>{if(!0!==e.success)throw new Error("Survey endpoint returned error code "+e.code);p.Z.tracks.recordEvent("jetpack_disconnect_survey_submit",t),v(!0),C(!1)})).catch((e=>{p.Z.tracks.recordEvent("jetpack_disconnect_survey_error",Object.assign({},{error:e.message},t)),v(!0),C(!1)}))}),[C,v]),D=(0,c.useCallback)((e=>{e&&e.preventDefault(),f(!1),n(!0),"plugins"!==O?J():N&&N(e)}),[f,n,N,O,J]),M=(0,c.useCallback)((()=>R.ID&&P),[R,P]),H=(0,c.useCallback)(((e,t,n)=>{if(n&&n.preventDefault(),!M())return void v(!0);const c={site_id:P,user_id:R.ID,survey_id:"jetpack-plugin-disconnect",survey_responses:{"why-cancel":{response:e,text:t||null}}},o=Object.assign({},A,{disconnect_reason:e});z(c,o)}),[z,v,M,P,R,A]),L=(0,c.useCallback)((e=>{e&&e.preventDefault(),F&&F(),U()}),[F,U]),V=(0,c.useCallback)((e=>{e&&e.preventDefault(),_(!0)}),[_]);return o().createElement(o().Fragment,null,x&&o().createElement(i.Modal,{title:"",contentLabel:S,aria:{labelledby:"jp-connection__disconnect-dialog__heading"},onRequestClose:U,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"jp-connection__disconnect-dialog"+(s?" jp-connection__disconnect-dialog__success":"")},s?!s||k||y?k&&!y?o().createElement(g.Z,{isSubmittingFeedback:j,onFeedBackProvided:H,onExit:L}):y?o().createElement(h.Z,{onExit:L}):void 0:o().createElement(m.Z,{canProvideFeedback:M(),onProvideFeedback:V,onExit:L}):o().createElement(u.Z,{title:S,connectedPlugins:b,disconnectStepComponent:Z,isDisconnecting:t,closeModal:U,onDisconnect:D,disconnectError:r,context:O,disconnectingPlugin:T})))};f.propTypes={apiRoot:a().string.isRequired,apiNonce:a().string.isRequired,title:a().string,onDisconnected:a().func,onError:a().func,context:a().string,connectedPlugins:a().object,pluginScreenDisconnectCallback:a().func,disconnectStepComponent:a().element,connectedUser:a().object,connectedSiteId:a().number,isOpen:a().bool,onClose:a().func},f.defaultProps={title:__("Are you sure you want to disconnect?","jetpack-my-jetpack"),context:"jetpack-dashboard",connectedUser:{}};const k=f},1496:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var c=n(9196),o=n.n(c),s=n(1268),a=n.n(s),r=n(9307),i=n(5736),l=n(5609),p=n(9697),d=n(2042);const __=i.__,u=e=>{const{onExit:t,canProvideFeedback:n,onProvideFeedback:c}=e;return o().createElement("div",{className:"jp-connection__disconnect-dialog__content"},o().createElement(p.Z,{icon:"unlink",imageUrl:d}),o().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy jp-connection__disconnect-dialog__step-copy--narrow"},o().createElement("h1",null,(0,r.createInterpolateElement)(__("Jetpack has been <br/>successfully disconnected.","jetpack-my-jetpack"),{br:o().createElement("br",null)})),n&&o().createElement(o().Fragment,null,o().createElement("p",null,__("We’re sorry to see you go. Here at Jetpack, we’re always striving to provide the best experience for our customers. Please take our short survey (2 minutes, promise).","jetpack-my-jetpack")),o().createElement("p",null,o().createElement(l.Button,{isPrimary:!0,onClick:c,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Help us improve","jetpack-my-jetpack"))),o().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:t},__("No thank you","jetpack-my-jetpack"))),!n&&o().createElement(o().Fragment,null,o().createElement("p",null,o().createElement(l.Button,{isPrimary:!0,onClick:t,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack-my-jetpack"))))))};u.PropTypes={onExit:a().func,onProvideFeedback:a().func,canProvideFeedback:a().bool};const m=u},163:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var c=n(9196),o=n.n(c),s=n(9307),a=n(5736),r=n(1415),i=n(5609),l=n(1268),p=n.n(l),d=n(3593);const __=a.__,u=e=>{const{title:t,isDisconnecting:n,onDisconnect:c,disconnectError:a,disconnectStepComponent:l,connectedPlugins:p,disconnectingPlugin:u,closeModal:m,context:g}=e;return o().createElement(o().Fragment,null,o().createElement("div",{className:"jp-connection__disconnect-dialog__content"},o().createElement("h1",{id:"jp-connection__disconnect-dialog__heading"},t),o().createElement(d.Z,{connectedPlugins:p,disconnectingPlugin:u}),l,(()=>{if(!p&&!l)return o().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},o().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is currently powering multiple products on your site.","jetpack-my-jetpack"),o().createElement("br",null),__("Once you disconnect Jetpack, these will no longer work.","jetpack-my-jetpack")))})()),o().createElement("div",{className:"jp-connection__disconnect-dialog__actions"},o().createElement("div",{className:"jp-row"},o().createElement("div",{className:"lg-col-span-7 md-col-span-8 sm-col-span-4"},o().createElement("p",null,(0,s.createInterpolateElement)(__("<strong>Need help?</strong> Learn more about the <jpConnectionInfoLink>Jetpack connection</jpConnectionInfoLink> or <jpSupportLink>contact Jetpack support</jpSupportLink>.","jetpack-my-jetpack"),{strong:o().createElement("strong",null),jpConnectionInfoLink:o().createElement("a",{href:(0,r.Z)("why-the-wordpress-com-connection-is-important-for-jetpack"),rel:"noopener noreferrer",target:"_blank",className:"jp-connection__disconnect-dialog__link"}),jpSupportLink:o().createElement("a",{href:(0,r.Z)("jetpack-support"),rel:"noopener noreferrer",target:"_blank",className:"jp-connection__disconnect-dialog__link"})}))),o().createElement("div",{className:"jp-connection__disconnect-dialog__button-wrap lg-col-span-5 md-col-span-8 sm-col-span-4"},o().createElement(i.Button,{isPrimary:!0,disabled:n,onClick:m,className:"jp-connection__disconnect-dialog__btn-dismiss"},__("Stay connected","jetpack-my-jetpack")),(()=>{let e=__("Disconnect","jetpack-my-jetpack");return n?e=__("Disconnecting…","jetpack-my-jetpack"):"plugins"===g&&(e=__("Disconnect and Deactivate","jetpack-my-jetpack")),o().createElement(i.Button,{isPrimary:!0,disabled:n,onClick:c,className:"jp-connection__disconnect-dialog__btn-disconnect"},e)})())),a&&o().createElement("p",{className:"jp-connection__disconnect-dialog__error"},a)))};u.propTypes={title:p().string,isDisconnecting:p().bool,onDisconnect:p().func,disconnectError:p().bool,disconnectStepComponent:p().elementType,connectedPlugins:p().array,disconnectingPlugin:p().string,closeModal:p().func,context:p().string};const m=u},4130:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var c=n(9196),o=n.n(c),s=n(1268),a=n.n(s),r=n(5736),i=(n(843),n(1194));const __=r.__,l=e=>{const{onExit:t,onFeedBackProvided:n,isSubmittingFeedback:c}=e;return o().createElement("div",{className:"jp-connection__disconnect-dialog__content"},o().createElement("h1",null,__("Before you go, help us improve Jetpack","jetpack-my-jetpack")),o().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Let us know what didn‘t work for you","jetpack-my-jetpack")),o().createElement(i.Z,{onSubmit:n,isSubmittingFeedback:c}),o().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:t},__("Skip for now","jetpack-my-jetpack")))};l.PropTypes={onExit:a().func,onFeedBackProvided:a().func,isSubmittingFeedback:a().bool};const p=l},5700:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var c=n(9196),o=n.n(c),s=n(1268),a=n.n(s),r=n(9697),i=n(5736),l=n(5609),p=n(9307),d=n(724);const __=i.__,u=e=>{const{onExit:t}=e;return o().createElement("div",{className:"jp-connection__disconnect-dialog__content"},o().createElement(r.Z,{format:"vertical",imageUrl:d}),o().createElement("div",{className:"jp-connection__disconnect-dialog__copy"},o().createElement("h1",null,__("Thank you!","jetpack-my-jetpack")),o().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},(0,p.createInterpolateElement)(__("Your answer has been submitted. <br/>Thanks for your input on how we can improve Jetpack.","jetpack-my-jetpack"),{br:o().createElement("br",null)})),o().createElement(l.Button,{isPrimary:!0,onClick:t,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack-my-jetpack"))))};u.PropTypes={onExit:a().func,assetBaseUrl:a().string};const m=u},1194:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var c=n(9196),o=n.n(c),s=n(1268),a=n.n(s),r=n(5609),i=n(5736),l=n(7215);const __=i.__,p=e=>{const{onSubmit:t,isSubmittingFeedback:n}=e,[s,a]=(0,c.useState)(),[i,p]=(0,c.useState)(),d=[{id:"troubleshooting",answerText:__("Troubleshooting - I'll be reconnecting afterwards.","jetpack-my-jetpack")},{id:"not-working",answerText:__("I can't get it to work.","jetpack-my-jetpack")},{id:"slowed-down-site",answerText:__("It slowed down my site.","jetpack-my-jetpack")},{id:"buggy",answerText:__("It's buggy.","jetpack-my-jetpack")},{id:"what-does-it-do",answerText:__("I don't know what it does.","jetpack-my-jetpack")}],u="another-reason",m=(0,c.useCallback)((()=>{t(s,s===u?i:"")}),[t,u,i,s]),g=(0,c.useCallback)((e=>{const t=e.target.value;e.stopPropagation(),p(t)}),[p]),h=e=>e===s?"jp-connect__disconnect-survey-card--selected":"",f=(0,c.useCallback)(((e,t)=>{switch(t.key){case"Enter":case"Space":case"Spacebar":case" ":a(e)}}),[a]);return o().createElement(o().Fragment,null,o().createElement("div",{className:"jp-connection__disconnect-dialog__survey"},d.map((e=>o().createElement(l.Z,{id:e.id,onClick:a,onKeyDown:f,className:"card jp-connect__disconnect-survey-card "+h(e.id)},o().createElement("p",{className:"jp-connect__disconnect-survey-card__answer"},e.answerText)))),o().createElement(l.Z,{id:u,onClick:a,onKeyDown:f,className:"card jp-connect__disconnect-survey-card "+h(u)},o().createElement("p",{className:"jp-connect__disconnect-survey-card__answer"},__("Other:","jetpack-my-jetpack")," ",o().createElement("input",{placeholder:__("share your experience","jetpack-my-jetpack"),className:"jp-connect__disconnect-survey-card__input",type:"text",value:i,onChange:g,maxLength:1e3})))),o().createElement("p",null,o().createElement(r.Button,{disabled:!s||n,isPrimary:!0,onClick:m,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},n?__("Submitting…","jetpack-my-jetpack"):__("Submit Feedback","jetpack-my-jetpack",0))))};p.PropTypes={onSubmit:a().func,isSubmittingFeedback:a().bool};const d=p},7215:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var c=n(9196),o=n.n(c);n(843);const s=e=>{const{id:t,onClick:n,onKeyDown:s,children:a,className:r}=e,i=(0,c.useCallback)((()=>{n(t)}),[t,n]),l=(0,c.useCallback)((e=>{s(t,e)}),[t,s]);return o().createElement("div",{tabIndex:"0",role:"button",onClick:i,onKeyDown:l,className:"card jp-connect__disconnect-survey-card "+r},a)}},1631:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var c=n(9196),o=n(9818),s=n(9570),a=n(2199);const r=e=>{let{registrationNonce:t,redirectUri:n,apiRoot:r,apiNonce:i,autoTrigger:l,from:p}=e;const{registerSite:d,connectUser:u}=(0,o.useDispatch)(a.t),m=(0,o.useSelect)((e=>e(a.t).getRegistrationError())),{siteIsRegistering:g,userIsConnecting:h,isRegistered:f,isUserConnected:k}=(0,o.useSelect)((e=>({siteIsRegistering:e(a.t).getSiteIsRegistering(),userIsConnecting:e(a.t).getUserIsConnecting(),...e(a.t).getConnectionStatus()}))),_=()=>u({from:p}),y=e=>{e&&e.preventDefault(),f?_():d({registrationNonce:t,redirectUri:n}).then((()=>{_()}))};return(0,c.useEffect)((()=>{s.ZP.setApiRoot(r),s.ZP.setApiNonce(i)}),[r,i]),(0,c.useEffect)((()=>{!l||g||h||y()}),[]),{handleRegisterSite:y,handleConnectUser:_,isRegistered:f,isUserConnected:k,siteIsRegistering:g,userIsConnecting:h,registrationError:m}}},6973:(e,t,n)=>{"use strict";n.d(t,{i6:()=>c,LI:()=>o,r7:()=>s,N4:()=>a,qV:()=>r,T1:()=>i,TS:()=>l,ZP:()=>k});const c="SET_CONNECTION_STATUS",o="SET_CONNECTION_STATUS_IS_FETCHING",s="SET_SITE_IS_REGISTERING",a="SET_USER_IS_CONNECTING",r="SET_REGISTRATION_ERROR",i="CLEAR_REGISTRATION_ERROR",l="SET_AUTHORIZATION_URL",p="CONNECT_USER",d=e=>({type:c,connectionStatus:e}),u=e=>({type:s,isRegistering:e}),m=e=>({type:a,isConnecting:e}),g=e=>({type:r,registrationError:e}),h=()=>({type:i}),f=e=>({type:l,authorizationUrl:e});const k={setConnectionStatus:d,setConnectionStatusIsFetching:e=>({type:o,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:u,setUserIsConnecting:m,setRegistrationError:g,clearRegistrationError:h,setAuthorizationUrl:f,registerSite:function*(e){let{registrationNonce:t,redirectUri:n}=e;yield h(),yield u(!0);try{const e=yield{type:"REGISTER_SITE",registrationNonce:t,redirectUri:n};return yield d({isRegistered:!0}),yield f(e.authorizeUrl),yield u(!1),Promise.resolve(e)}catch(e){return yield g(e),yield u(!1),Promise.reject(e)}},connectUser:function*(){let{from:e,redirectFunc:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yield m(!0),yield{type:p,from:e,redirectFunc:t}}}},4213:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var c=n(9570),o=n(9818),s=n(2199);const a={FETCH_CONNECTION_STATUS:()=>new Promise(((e,t)=>{c.ZP.fetchSiteConnectionStatus().then((t=>e(t))).catch((e=>t(e)))})),FETCH_AUTHORIZATION_URL:e=>{let{redirectUri:t}=e;return c.ZP.fetchAuthorizationUrl(t)},REGISTER_SITE:e=>{let{registrationNonce:t,redirectUri:n}=e;return c.ZP.registerSite(t,n)},CONNECT_USER:(0,o.createRegistryControl)((e=>{let{resolveSelect:t}=e;return function(){let{from:e,redirectFunc:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((c,o)=>{t(s.t).getAuthorizationUrl().then((t=>{const o=n||(e=>window.location.assign(e)),s=new URL(t);e&&s.searchParams.set("from",encodeURIComponent(e));const a=s.toString();o(a),c(a)})).catch((e=>{o(e)}))}))}}))}},1147:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var c=n(9818),o=n(6973);const s=(0,c.combineReducers)({connectionStatus:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===o.i6?{...e,...t.connectionStatus}:e},connectionStatusIsFetching:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.LI?t.isFetching:e},siteIsRegistering:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.r7?t.isRegistering:e},userIsConnecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.N4?t.isConnecting:e},registrationError:(e,t)=>{switch(t.type){case o.T1:return!1;case o.qV:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===o.TS?t.authorizationUrl:e})},8310:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var c=n(9818),o=n(6973),s=n(2199);const a={...{*getConnectionStatus(){yield o.ZP.setConnectionStatusIsFetching(!0);const e=yield o.ZP.fetchConnectionStatus();return yield o.ZP.setConnectionStatusIsFetching(!1),o.ZP.setConnectionStatus(e)},getAuthorizationUrl:{isFulfilled:function(e){const t=Boolean(e.authorizationUrl);for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];const r=(0,c.select)(s.t).hasFinishedResolution("getAuthorizationUrl",o);return t&&!r&&(0,c.dispatch)(s.t).finishResolution("getAuthorizationUrl",o),t},*fulfill(e){const t=yield o.ZP.fetchAuthorizationUrl(e);yield o.ZP.setAuthorizationUrl(t.authorizeUrl)}}}}},387:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:e=>e.connectionStatusIsFetching||!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1}},5333:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var c=n(7538),o=n.n(c),s=n(9818);class a{static mayBeInit(e,t){null===a.store&&(a.store=(0,s.createReduxStore)(e,t),(0,s.register)(a.store),a.resolveResolvers(e,t.initialState))}static resolveResolvers(e,t){t.connectionStatus&&t.connectionStatus.hasOwnProperty("isRegistered")&&(0,s.dispatch)(e).finishResolution("getConnectionStatus",[])}}o()(a,"store",null);const r=a},2199:(e,t,n)=>{"use strict";n.d(t,{t:()=>l});var c=n(1147),o=n(6973),s=n(387),a=n(5333),r=n(8310),i=n(4213);const l="jetpack-connection";a.Z.mayBeInit(l,{reducer:c.Z,actions:o.ZP,selectors:s.Z,resolvers:r.Z,controls:i.Z,initialState:window.JP_CONNECTION_INITIAL_STATE||{}})},1046:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var c=n(9196),o=n.n(c),s=n(5736),a=n(8670),r=n(4502),i=n(69),l=n(134),p=n(6160),d=n(7132);n(3498);const __=s.__;function u(){const e=(0,c.useCallback)((()=>{window.location=myJetpackInitialState.topJetpackMenuItemUrl}),[]);return o().createElement("div",{className:"jp-my-jetpack-screen"},o().createElement(a.Z,null,o().createElement(r.Z,null,o().createElement(i.Z,null,o().createElement(l.Z,{lg:12,md:8,sm:4},o().createElement("h1",null,__("Manage your Jetpack plan and products all in one place","jetpack-my-jetpack"))))),o().createElement(p.Z,null,o().createElement(i.Z,null,o().createElement(l.Z,{lg:6,sm:4},o().createElement("h1",null,__("My Plan","jetpack-my-jetpack"))),o().createElement(l.Z,{lg:6,sm:4},o().createElement(d.Z,{apiRoot:myJetpackInitialState.apiRoot,apiNonce:myJetpackInitialState.apiNonce,redirectUri:myJetpackInitialState.redirectUri,onDisconnected:e}))))))}},2042:(e,t,n)=>{"use strict";e.exports=n.p+"images/disconnect-confirm-dc9fe8f5c68cfd1320e0.jpg"},724:(e,t,n)=>{"use strict";e.exports=n.p+"images/disconnect-thanks-5873bfac56a9bd7322cd.jpg"},4462:e=>{"use strict";if(void 0==={consumer_slug:"my_jetpack"}){var t=new Error('Cannot find module \'{"consumer_slug":"my_jetpack"}\'');throw t.code="MODULE_NOT_FOUND",t}e.exports={consumer_slug:"my_jetpack"}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},2819:e=>{"use strict";e.exports=window.lodash},5609:e=>{"use strict";e.exports=window.wp.components},9818:e=>{"use strict";e.exports=window.wp.data},9307:e=>{"use strict";e.exports=window.wp.element},5736:e=>{"use strict";e.exports=window.wp.i18n},6483:e=>{"use strict";e.exports=window.wp.url}},t={};function n(c){var o=t[c];if(void 0!==o)return o.exports;var s=t[c]={exports:{}};return e[c](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var c in t)n.o(t,c)&&!n.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:t[c]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var c=t.getElementsByTagName("script");c.length&&(e=c[c.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{"use strict";var e=n(1850),t=n.n(e),c=n(9196),o=n.n(c),s=n(1046);!function(){const e=document.getElementById("my-jetpack-container");null!==e&&t().render(o().createElement(s.Z,null),e)}()})()})();
\ No newline at end of file +(()=>{var e={9487:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});const c={AED:{symbol:"د.إ.",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function r(e){return c[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},8899:(e,t,n)=>{"use strict";n.d(t,{LR:()=>i});var c=n(9487),r=n(2003);function i(e,t,n={}){const i=(0,c.X)(t);if(!i||isNaN(e))return null;const{decimal:a,grouping:o,precision:s,symbol:l}={...i,...n},u=e<0?"-":"",p=Math.abs(e),d=Math.floor(p);return{sign:u,symbol:l,integer:(0,r.Z)(p,s,a,o).split(a)[0],fraction:s>0?(0,r.Z)(p-d,s,a,o).slice(1):""}}},2003:(e,t,n)=>{"use strict";function c(e,t=0,n=".",c=","){const r=(e+"").replace(/[^0-9+\-Ee.]/g,""),i=isFinite(+r)?+r:0,a=isFinite(+t)?Math.abs(t):0,o=(a?function(e,t){const n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(i,a):""+Math.round(i)).split(".");return o[0].length>3&&(o[0]=o[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,c)),(o[1]||"").length<a&&(o[1]=o[1]||"",o[1]+=new Array(a-o[1].length+1).join("0")),o.join(n)}n.d(t,{Z:()=>c})},8294:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},2402:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},1074:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var c=n(9307);const r=function(e){let{icon:t,size:n=24,...r}=e;return(0,c.cloneElement)(t,{width:n,height:n,...r})}},3259:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9307),r=n(444);const i=(0,c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(r.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}))},9201:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9307),r=n(444);const i=(0,c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(r.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}))},9517:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9307),r=n(444);const i=(0,c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(r.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}))},5381:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9307),r=n(444);const i=(0,c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(r.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}))},496:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9307),r=n(444);const i=(0,c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(r.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}))},1908:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9307),r=n(444);const i=(0,c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(r.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}))},797:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9307),r=n(444);const i=(0,c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,c.createElement)(r.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}))},5235:(e,t)=>{var n;!function(){"use strict";var c={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var o in n)c.call(n,o)&&n[o]&&e.push(o);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},951:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let c=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(c++,"%c"===e&&(r=c))})),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(1741)(t);const{formatters:c}=e.exports;c.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},1741:(e,t,n)=>{e.exports=function(e){function t(e){let n,r,i,a=null;function o(...e){if(!o.enabled)return;const c=o,r=Number(new Date),i=r-(n||r);c.diff=i,c.prev=n,c.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";a++;const i=t.formatters[r];if("function"==typeof i){const t=e[a];n=i.call(c,t),e.splice(a,1),a--}return n})),t.formatArgs.call(c,e);(c.log||t.log).apply(c,e)}return o.namespace=e,o.useColors=t.useColors(),o.color=t.selectColor(e),o.extend=c,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(r!==t.namespaces&&(r=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(o),o}function c(e,n){const c=t(this.namespace+(void 0===n?":":n)+e);return c.log=this.log,c}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const c=("string"==typeof e?e:"").split(/[\s,]+/),r=c.length;for(n=0;n<r;n++)c[n]&&("-"===(e=c[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,c;for(n=0,c=t.skips.length;n<c;n++)if(t.skips[n].test(e))return!1;for(n=0,c=t.names.length;n<c;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(3171),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},5250:(e,t,n)=>{"use strict";n.d(t,{Ep:()=>d,aU:()=>c,cP:()=>m,q_:()=>s});var c,r=n(255);!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(c||(c={}));var i=function(e){return e};var a="beforeunload",o="popstate";function s(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,s=n.history;function g(){var e=m(n.location.hash.substr(1)),t=e.pathname,c=void 0===t?"/":t,r=e.search,a=void 0===r?"":r,o=e.hash,l=void 0===o?"":o,u=s.state||{};return[u.idx,i({pathname:c,search:a,hash:l,state:u.usr||null,key:u.key||"default"})]}var h=null;function y(){if(h)j.call(h),h=null;else{var e=c.Pop,t=g(),n=t[0],r=t[1];if(j.length){if(null!=n){var i=k-n;i&&(h={action:e,location:r,retry:function(){S(-1*i)}},S(i))}}else N(e)}}n.addEventListener(o,y),n.addEventListener("hashchange",(function(){d(g()[1])!==d(E)&&y()}));var v=c.Pop,f=g(),k=f[0],E=f[1],b=u(),j=u();function _(e){return function(){var e=document.querySelector("base"),t="";if(e&&e.getAttribute("href")){var c=n.location.href,r=c.indexOf("#");t=-1===r?c:c.slice(0,r)}return t}()+"#"+("string"==typeof e?e:d(e))}function C(e,t){return void 0===t&&(t=null),i((0,r.Z)({pathname:E.pathname,hash:"",search:""},"string"==typeof e?m(e):e,{state:t,key:p()}))}function w(e,t){return[{usr:e.state,key:e.key,idx:t},_(e)]}function Z(e,t,n){return!j.length||(j.call({action:e,location:t,retry:n}),!1)}function N(e){v=e;var t=g();k=t[0],E=t[1],b.call({action:v,location:E})}function S(e){s.go(e)}null==k&&(k=0,s.replaceState((0,r.Z)({},s.state,{idx:k}),""));var P={get action(){return v},get location(){return E},createHref:_,push:function e(t,r){var i=c.Push,a=C(t,r);if(Z(i,a,(function(){e(t,r)}))){var o=w(a,k+1),l=o[0],u=o[1];try{s.pushState(l,"",u)}catch(e){n.location.assign(u)}N(i)}},replace:function e(t,n){var r=c.Replace,i=C(t,n);if(Z(r,i,(function(){e(t,n)}))){var a=w(i,k),o=a[0],l=a[1];s.replaceState(o,"",l),N(r)}},go:S,back:function(){S(-1)},forward:function(){S(1)},listen:function(e){return b.push(e)},block:function(e){var t=j.push(e);return 1===j.length&&n.addEventListener(a,l),function(){t(),j.length||n.removeEventListener(a,l)}}};return P}function l(e){e.preventDefault(),e.returnValue=""}function u(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function p(){return Math.random().toString(36).substr(2,8)}function d(e){var t=e.pathname,n=void 0===t?"/":t,c=e.search,r=void 0===c?"":c,i=e.hash,a=void 0===i?"":i;return r&&"?"!==r&&(n+="?"===r.charAt(0)?r:"?"+r),a&&"#"!==a&&(n+="#"===a.charAt(0)?a:"#"+a),n}function m(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var c=e.indexOf("?");c>=0&&(t.search=e.substr(c),e=e.substr(0,c)),e&&(t.pathname=e)}return t}},9710:()=>{},1494:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={"admin-page":"sexr0jUxC1jVixdKiDnC",background:"vKQ11sLeAM45M04P1ccj"}},511:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={section:"cAbGtJDGgLubucBnz7vM"}},281:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={"section-hero":"vMa4i_Dza2t5Zi_Bw9Nf"}},3466:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={button:"zI5tJ_qhWE6Oe6Lk75GY",normal:"ipS7tKy9GntCS4R3vekF",icon:"paGLQwtPEaJmtArCcmyK",small:"Na39I683LAaSA99REg14",regular:"lZAo6_oGfclXOO9CC6Rd",loading:"q_tVWqMjl39RcY6WtQA6","external-icon":"CDuBjJp_8jxzx5j6Nept"}},2404:()=>{},5612:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={iconWrapper:"sDAzdUdcbaYmUMZBe2XW","star-icon":"cuoSlhSNrqf1dozY22Xb",jetpack:"lAIiifeLMmZAPlQ9n9ZR","checkmark-icon":"JLquNpQVlysAamuh5lJO",socialIcon:"cbOwD8Y4tFjwimmtchQI",facebook:"aHOlEBGD5EA8NKRw3xTw",twitter:"af4Y_zItXvLAOEoSDPSv",linkedin:"f68aqF3XSD1OBvXR1get",tumblr:"xFI0dt3UiXRlRQdqPWkx",google:"q7JEoyymveP6kF747M43"}},9054:()=>{},3080:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",smCols:"4",mdCols:"8",lgCols:"12","col-sm-1":"RuVLl3q4lxTQa3wbhBJB","col-sm-1-start":"f9LZTRG4MMK42rS89afW","col-sm-1-end":"bHe_zKxjjpUwHw_MdYE1","col-sm-2":"QZbNrOqE2aNSn50xVhpU","col-sm-2-start":"ev7W3z7zVYPeHAlYqZjf","col-sm-2-end":"NJWd1m_e7lOiPYru2ZMP","col-sm-3":"Xc6nt1Qc1DI0Z2A3gt1r","col-sm-3-start":"UIcN_GXiPRoIsin8Kohg","col-sm-3-end":"GRKCyqb5LufCSCgykKFc","col-sm-4":"i_qTq8gqhhC3vIUepVRB","col-sm-4-start":"G3qaZ3Jpbvam_1XvGxgc","col-sm-4-end":"VRCNYKZtO9zukEwmgP1y","col-md-1":"tRm008K_WJL79WoNZTNL","col-md-1-start":"l5T2P_bgKts4tdaRkS1d","col-md-1-end":"zOCxfLZpF6BlgC7a_Yq1","col-md-2":"F80DdgVn0m5OpvtSQWka","col-md-2-start":"oI1c7JYfiJtMQHbhngtU","col-md-2-end":"pMQtA_4jh1_1lVknqEP5","col-md-3":"VenqMpdgyKQVUNNQcfqd","col-md-3-start":"seNYL99uoczf9V4MxBxT","col-md-3-end":"YKfF1HFhI9KygA5l3b2J","col-md-4":"yAi0Cv1xDWkoqsaUhvhR","col-md-4-start":"ubhnyZOnkgxNhh6XtVWv","col-md-4-end":"RGOPGQbWMJ9Ei5oFxS7X","col-md-5":"Sz1E2aWbX483ijdi6yge","col-md-5-start":"tku6_bRYrX9tMbgYGmIl","col-md-5-end":"b5JHttOhSEcI1WBlqAjk","col-md-6":"FboSx5MoKTAWbxXyYlCw","col-md-6-start":"Jhs8yEEmodG30edbJvag","col-md-6-end":"IpzbbKVqEqPcfIGkXkwt","col-md-7":"mhCPwfAZ4Kmm_empzJAq","col-md-7-start":"x034ilrJF7rO9UJB2rI1","col-md-7-end":"Wt8t2e16viRrOJ1lLA5v","col-md-8":"S6pIrEy9AMLKx9bgh_Ae","col-md-8-start":"kEfI4tGyuWfHTlRnvIab","col-md-8-end":"PUzX4RRsKq1dnsz3gebS","col-lg-1":"X_pdcLJikd8LS_YAdJlB","col-lg-1-start":"tl936d14Huby4khYp05X","col-lg-1-end":"hnge0LnR69d3NXEtEE1t","col-lg-2":"fj0NUMuyZQcPNgKcjp5Z","col-lg-2-start":"R2ncBX7a2NigdYCcV1OX","col-lg-2-end":"t8vMSDVYno9k9itRwnXb","col-lg-3":"wsDuEN2GqHx6qzo8dUdk","col-lg-3-start":"cIEVPUweWtLBy3xaXnMx","col-lg-3-end":"fajUWBwu1m2B479j3jmz","col-lg-4":"YR0c7fQTgMkDdWzwSyLp","col-lg-4-start":"xlwp8BmplxkKNMI7gamo","col-lg-4-end":"_C4O1w9DUqx1m3gPf8aA","col-lg-5":"Z54F1hAErckAIrKlxnXW","col-lg-5-start":"ezSDWkRHmKSxDJXxuiOH","col-lg-5-end":"T0ChoeAjGJjkkNrYhD4g","col-lg-6":"qtMoMPF6yHvGJnWHSsde","col-lg-6-start":"gdoywN5VPiWERfIBqkph","col-lg-6-end":"wUev_VH5uf_pwFFlbnAU","col-lg-7":"egIPDFJsOpownTClq9XP","col-lg-7-start":"yGhp9yoAW7k0kQik9AB7","col-lg-7-end":"SJ43U9mR5wUg5V2qBeQA","col-lg-8":"cTuyHfMwSUJxN_HdIEgd","col-lg-8-start":"smCr8DaIagcumdvdldiK","col-lg-8-end":"T03NHzQJvzwL6wAfIiTL","col-lg-9":"pMvxM3RJGjqyNdf9qg1Y","col-lg-9-start":"iIVpNRwEnQ_JI5gpp9EN","col-lg-9-end":"ZbQ4u4vGSX5rJOje4uGL","col-lg-10":"gKb5wuIDAlKGbrjK2vxy","col-lg-10-start":"Z7pINdImE2WJiYnZBTqm","col-lg-10-end":"ZTxp6qpvwurMdOnLLSz1","col-lg-11":"NnQTlbfnxPDR6cQ7rygg","col-lg-11-start":"O137wZd6Yl0olSA9PsXR","col-lg-11-end":"zf2OJtQ2MPz6SDoh6CB0","col-lg-12":"U3H6UHW6HqRt9hdzVg3O","col-lg-12-start":"zynnNeS_ZBTxABcVpUQH","col-lg-12-end":"vI8tltFZtFUNAy9Iag9s"}},8730:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",container:"SqdhUZkXCRuIpErj1B3z",fluid:"OZC_9a1LhpWF9dv15Gdh"}},1683:()=>{},3280:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={reset:"WQVtrU6q0L1Igcj7wCrQ","headline-medium":"UujoBFTnQNY2cWU2SIsH","headline-small":"TeGO5V_thHw5lDAm1_2M","headline-small-regular":"WolQzb2MsSgiNmLtc7_j","title-medium":"hUB0JT8p1T2Hw28N6qC8","title-small":"zY2No8Ga4b8shbOQGhnv",body:"tIj0D1t8Cc892ikmgFPZ","body-small":"KdcN0BnOaVeVhyLRKqhS","body-extra-small":"dso3Rh3tl3Xv1GumBktz",label:"PItlW5vRExLnTj4a8eLE","m-0":"TwRpPlktzxhmFVeua7P5","mx-0":"zVfqx7gyb3o9mxfGynn1","my-0":"iSHVzNiB9iVleGljaQxy","mt-0":"xqDIp6cNVr_E6RXaiPyD","mr-0":"S8EwaXk1kyPizt6x4WH2","mb-0":"ODX5Vr1TARoLFkDDFooD","ml-0":"cphJ8dCpfimnky7P2FHg","m-1":"PFgIhNxIyiSuNvQjAIYj","mx-1":"M2jKmUzDxvJjjVEPU3zn","my-1":"io15gAh8tMTNbSEfwJKk","mt-1":"rcTN5uw9xIEeMEGL3Xi_","mr-1":"CQSkybjq2TcRM1Xo9COV","mb-1":"hfqOWgq6_MEGdFE82eOY","ml-1":"I8MxZQYTbuu595yfesWA","m-2":"kQkc6rmdpvLKPkyoJtVQ","mx-2":"j6vFPxWuu4Jan2ldoxpp","my-2":"hqr39dC4H_AbactPAkCG","mt-2":"c3dQnMi16C6J6Ecy4283","mr-2":"YNZmHOuRo6hU7zzKfPdP","mb-2":"Db8lbak1_wunpPk8NwKU","ml-2":"ftsYE5J9hLzquQ0tA5dY","m-3":"Det4MHzLUW7EeDnafPzq","mx-3":"h_8EEAztC29Vve1datb5","my-3":"YXIXJ0h1k47u6hzK8KcM","mt-3":"soADBBkcIKCBXzCTuV9_","mr-3":"zSX59ziEaEWGjnpZa4uV","mb-3":"yrVTnq_WBMbejg89c2ZQ","ml-3":"UKtHPJnI2cXBWtPDm5hM","m-4":"guexok_Tqd5Tf52hRlbT","mx-4":"oS1E2KfTBZkJ3F0tN7T6","my-4":"DN1OhhXi6AoBgEdDSbGd","mt-4":"ot2kkMcYHv53hLZ4LSn0","mr-4":"A1krOZZhlQ6Sp8Cy4bly","mb-4":"pkDbXXXL32237M0hokEh","ml-4":"XXv4kDTGvEnQeuGKOPU3","m-5":"yGqHk1a57gaISwkXwXe6","mx-5":"X8cghM358X3DkXLc9aNK","my-5":"GdfSmGwHlFnN2S6xBn1f","mt-5":"yqeuzwyGQ7zG0avrGqi_","mr-5":"g9emeCkuHvYhveiJbfXO","mb-5":"Lvk3dqcyHbZ07QCRlrUQ","ml-5":"r3yQECDQ9qX0XZzXlVAg","m-6":"aQhlPwht2Cz1X_63Miw0","mx-6":"JyHb0vK3wJgpblL9s5j8","my-6":"cY2gULL1lAv6WPNIRuf3","mt-6":"NBWQ9Lwhh_fnry3lg_p7","mr-6":"yIOniNe5E40C8fWvBm5V","mb-6":"t30usboNSyqfQWIwHvT3","ml-6":"Nm_TyFkYCMhOoghoToKJ","m-7":"C4qJKoBXpgKtpmrqtEKB","mx-7":"S93Srbu6NQ_PBr7DmTiD","my-7":"fJj8k6gGJDks3crUZxOS","mt-7":"cW6D6djs7Ppm7fD7TeoV","mr-7":"DuCnqNfcxcP3Z__Yo5Ro","mb-7":"im8407m2fw5vOg7O2zsw","ml-7":"G0fbeBgvz2sh3uTP9gNl","m-8":"kvW3sBCxRxUqz1jrVMJl","mx-8":"tOjEqjLONQdkiYx_XRnw","my-8":"op5hFSx318zgxsoZZNLN","mt-8":"c9WfNHP6TFKWIfLxv52J","mr-8":"sBA75QqcqRwwYSHJh2wc","mb-8":"GpL6idrXmSOM6jB8Ohsf","ml-8":"HbtWJoQwpgGycz8dGzeT","p-0":"uxX3khU88VQ_Ah49Ejsa","px-0":"KX0FhpBKwKzs9fOUdbNz","py-0":"PfK8vKDyN32dnimlzYjz","pt-0":"emxLHRjQuJsImnPbQIzE","pr-0":"kJ8WzlpTVgdViXt8ukP9","pb-0":"tg_UIUI11VBzrTAn2AzJ","pl-0":"uczvl8kaz84oPQJ2DB2R","p-1":"o7UHPcdVK3lt7q3lqV4o","px-1":"IDqEOxvDoYrFYxELPmtX","py-1":"DdywPW2qSYlu2pt8tpO2","pt-1":"npy3hw4A5QSkDicb2CJJ","pr-1":"LgbptTApNY5NwLQvEFAt","pb-1":"WZQy2SZuZso59bUsXXyl","pl-1":"o331apInxNunbYB3SfPE","p-2":"fMPIyD9Vqki1Lrc_yJnG","px-2":"i2pMcTcdrr10IQoiSm_L","py-2":"eA702gn32kwptiI1obXH","pt-2":"o9bGieUKcYc8o0Ij9oZX","pr-2":"SwZcFez1RDqWsOFjB5iG","pb-2":"eHpLc_idmuEqeqCTvqkN","pl-2":"vU39i2B4P1fUTMB2l6Vo","p-3":"JHWNzBnE29awhdu5BEh1","px-3":"X72lGbb56L3KFzC2xQ9N","py-3":"BzfNhRG8wXdCEB5ocQ6e","pt-3":"srV0KSDC83a2fiimSMMQ","pr-3":"lUWfkmbQjCskhcNwkyCm","pb-3":"Ts0dIlc3aTSL7V4cIHis","pl-3":"CzlqQXXhX6MvorArFZ8B","p-4":"TqMPkQtR_DdZuKb5vBoV","px-4":"a7UrjhI69Vetlcj9ZVzz","py-4":"StEhBzGs2Gi5dDEkjhAv","pt-4":"FGneZfZyvYrt1dG0zcnm","pr-4":"APEH216rpdlJWgD2fHc8","pb-4":"oGwXC3ohCic9XnAj6x69","pl-4":"U6gnT9y42ViPNOcNzBwb","p-5":"IpdRLBwnHqbqFrixgbYC","px-5":"HgNeXvkBa9o3bQ5fvFZm","py-5":"tJtFZM3XfPG9v9TSDfN1","pt-5":"PdifHW45QeXYfK568uD8","pr-5":"mbLkWTTZ0Za_BBbFZ5b2","pb-5":"vVWpZpLlWrkTt0hMk8XU","pl-5":"RxfaJj5a1Nt6IavEo5Zl","p-6":"SppJULDGdnOGcjZNCYBy","px-6":"palY2nLwdoyooPUm9Hhk","py-6":"WYw1JvZC0ppLdvSAPhr_","pt-6":"YEEJ9b90ueQaPfiU8aeN","pr-6":"QE0ssnsKvWJMqlhPbY5u","pb-6":"n8yA3jHlMRyLd5UIfoND","pl-6":"tXHmxYnHzbwtfxEaG51n","p-7":"kBTsPKkO_3g_tLkj77Um","px-7":"RyhrFx6Y1FGDrGAAyaxm","py-7":"CBwRpB0bDN3iEdQPPMJO","pt-7":"vQVSq6SvWKbOMu6r4H6b","pr-7":"oBy5__aEADMsH46mrgFX","pb-7":"KVEXoJqf1s92j0JMdNmN","pl-7":"ZMXGNrNaKW3k_3TLz0Fq","p-8":"tuiR9PhkHXhGyEgzRZRI","px-8":"U7454qyWkQNa2iaSJziu","py-8":"VLYIv2GVocjuN93e8HC8","pt-8":"X1rm9DQ1zLGLfogja5Gn","pr-8":"JS7G6kAuqJo5GIuF8S5t","pb-8":"Y8F9ga1TDCMbM1lj4gUz","pl-8":"AJuyNGrI63BOWql719H8"}},1510:()=>{},9610:()=>{},2427:()=>{},4220:()=>{},287:()=>{},9823:()=>{},6234:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={icon:"rV_5QyvhDnsVjCX4pb0h",link:"MO1jDNY8VPqeNS9xL8jE"}},8578:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={"relative-col":"zvd4dCB_bBDiXJKKDqXm","close-link":"ly4o9lSswAGHFXqGUEIO","account-description":"u64Go3kwEZ7MD9eji0H1","account-images":"_RT41NE3LU4R0ubcij2y",wordpress:"cFGWJeRiGHjAr8D7CWJW",google:"Iz3l7a05TP6HK9S92TIL",apple:"lmQ0wFmnk4kKkGVjokPA","all-features":"AoIs8wD92wKR8RpQj6Uc"}},197:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={icon:"hdasSNj9k3Sc5PwXK4uE",link:"eWN8Hj0SBRDq1F48n_Fg"}},1017:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={heading:"jErCC9oKHSM15BxzFyQK",notice:"oVoYbwbFB6U2o90Njusk",message:"wBVXH4OTNwLHPRpN4nsq"}},6891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={container:"wiobThfXJCuhGNrbFIT6","expire-date":"VgAxgahF9bC2M__FiIgV","actions-list-item":"Doju0RxvvN9JS12mf489"}},9720:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={container:"pIsYsXFAJ9KX2VrS5rmY","is-link":"YXHdD0VsFjiTsVRLrrx9","action-link-button":"ehgY0qp6bl53RaxP5rFF","has-error":"Pp9cMIaESLYelLOX3tkI",name:"w56ueQLYexqzTybA7015",description:"gmPKCDKZcfQt9WieTyKS",button:"ZKHHfl5DhA9kUnaL0qQZ",actions:"fDBaV7I4yUO6w5AWVEtr",status:"f5VJYwuJmjxH8PVxEbbv",active:"ry3pxoGtmQ0ZeSwp7F_3",inactive:"LZzE3EG7m3CDR46wwwEr",error:"Vx_jpT02r8W6NfsRSB02","is-fetching":"PdsJCfyyjSgrNDheF2qi","blink-animation":"dWP7ypkVXudMbAa38W5Z"}},8429:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={card:"q0T8YyQxRawhpDtvJjxI",container:"B7JDqI_vtKxSy5GjvqA1","card-header":"zj7xadmhIWeuf7ZwvVTS","product-bundle-icon":"GsioW6IsC8EMYE3U6788","product-bundle-icons":"dbz07JqxOlivjKO4vBEF","product-icon":"cfEO8udWbRGPFJzW8Jg5","plus-icon":"zlh3zbjUe4Z8cBs7uVVe","product-has-required-plan":"qoZuzG5EcDa231hC6t0P","checkout-button":"Q6uUUQCPWS6_6nLxIn68","components-spinner":"YU4iBCRze09ZP3iCsdcb",features:"Q1jaYDpa2AVfJpA29wT0","price-container":"xgv3jRkeF39aEQELCwru",price:"twlleZ5Ehq4bB7CvKVSW","is-old":"Qg4rPEvXsqmod1s_31d8","price-description":"ApsgxIornVy_3KnciVeJ","supporting-info":"NMxcZL17aEP7v81uG3zD"}},1287:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={container:"SWwV4Pw6OZ5vU3PqPXmr",imageContainer:"r7tUofa9Z3A5ziKVR1H7"}},5878:()=>{},3171:e=>{var t=1e3,n=60*t,c=60*n,r=24*c,i=7*r,a=365.25*r;function o(e,t,n,c){var r=t>=1.5*n;return Math.round(e/n)+" "+c+(r?"s":"")}e.exports=function(e,s){s=s||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!o)return;var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*r;case"hours":case"hour":case"hrs":case"hr":case"h":return s*c;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===l&&isFinite(e))return s.long?function(e){var i=Math.abs(e);if(i>=r)return o(e,i,r,"day");if(i>=c)return o(e,i,c,"hour");if(i>=n)return o(e,i,n,"minute");if(i>=t)return o(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=r)return Math.round(e/r)+"d";if(i>=c)return Math.round(e/c)+"h";if(i>=n)return Math.round(e/n)+"m";if(i>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7556:(e,t,n)=>{"use strict";var c=n(3713);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==c){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5844:(e,t,n)=>{e.exports=n(7556)()},3713:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},469:(e,t,n)=>{"use strict";var c=n(758);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==c){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5162:(e,t,n)=>{e.exports=n(469)()},758:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},554:(e,t,n)=>{"use strict";n.d(t,{UT:()=>l,rU:()=>u});var c=n(9196),r=n(5250),i=n(5439);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e},a.apply(this,arguments)}function o(e,t){if(null==e)return{};var n,c,r={},i=Object.keys(e);for(c=0;c<i.length;c++)n=i[c],t.indexOf(n)>=0||(r[n]=e[n]);return r}const s=["onClick","reloadDocument","replace","state","target","to"];function l(e){let{basename:t,children:n,window:a}=e,o=(0,c.useRef)();null==o.current&&(o.current=(0,r.q_)({window:a}));let s=o.current,[l,u]=(0,c.useState)({action:s.action,location:s.location});return(0,c.useLayoutEffect)((()=>s.listen(u)),[s]),(0,c.createElement)(i.F0,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s})}const u=(0,c.forwardRef)((function(e,t){let{onClick:n,reloadDocument:l,replace:u=!1,state:p,target:d,to:m}=e,g=o(e,s),h=(0,i.oQ)(m),y=function(e,t){let{target:n,replace:a,state:o}=void 0===t?{}:t,s=(0,i.s0)(),l=(0,i.TH)(),u=(0,i.WU)(e);return(0,c.useCallback)((t=>{if(!(0!==t.button||n&&"_self"!==n||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t))){t.preventDefault();let n=!!a||(0,r.Ep)(l)===(0,r.Ep)(u);s(e,{replace:n,state:o})}}),[l,s,u,a,o,n,e])}(m,{replace:u,state:p,target:d});return(0,c.createElement)("a",a({},g,{href:h,onClick:function(e){n&&n(e),e.defaultPrevented||l||y(e)},ref:t,target:d}))}))},5439:(e,t,n)=>{"use strict";n.d(t,{AW:()=>l,F0:()=>u,TH:()=>g,WU:()=>y,Z5:()=>p,oQ:()=>d,s0:()=>h});var c=n(9196),r=n(5250);function i(e,t){if(!e)throw new Error(t)}const a=(0,c.createContext)(null);const o=(0,c.createContext)(null);const s=(0,c.createContext)({outlet:null,matches:[]});function l(e){i(!1)}function u(e){let{basename:t="/",children:n=null,location:s,navigationType:l=r.aU.Pop,navigator:u,static:p=!1}=e;m()&&i(!1);let d=S(t),g=(0,c.useMemo)((()=>({basename:d,navigator:u,static:p})),[d,u,p]);"string"==typeof s&&(s=(0,r.cP)(s));let{pathname:h="/",search:y="",hash:v="",state:f=null,key:k="default"}=s,E=(0,c.useMemo)((()=>{let e=Z(h,d);return null==e?null:{pathname:e,search:y,hash:v,state:f,key:k}}),[d,h,y,v,f,k]);return null==E?null:(0,c.createElement)(a.Provider,{value:g},(0,c.createElement)(o.Provider,{children:n,value:{location:E,navigationType:l}}))}function p(e){let{children:t,location:n}=e;return function(e,t){m()||i(!1);let{matches:n}=(0,c.useContext)(s),a=n[n.length-1],o=a?a.params:{},l=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;0;let u,p=g();if(t){var d;let e="string"==typeof t?(0,r.cP)(t):t;"/"===l||(null==(d=e.pathname)?void 0:d.startsWith(l))||i(!1),u=e}else u=p;let h=u.pathname||"/",y="/"===l?h:h.slice(l.length)||"/",v=function(e,t,n){void 0===n&&(n="/");let c=Z(("string"==typeof t?(0,r.cP)(t):t).pathname||"/",n);if(null==c)return null;let i=f(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e<i.length;++e)a=j(i[e],c);return a}(e,{pathname:y});0;return _(v&&v.map((e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:N([l,e.pathname]),pathnameBase:"/"===e.pathnameBase?l:N([l,e.pathnameBase])}))),n)}(v(t),n)}function d(e){m()||i(!1);let{basename:t,navigator:n}=(0,c.useContext)(a),{hash:o,pathname:s,search:l}=y(e),u=s;if("/"!==t){let n=function(e){return""===e||""===e.pathname?"/":"string"==typeof e?(0,r.cP)(e).pathname:e.pathname}(e),c=null!=n&&n.endsWith("/");u="/"===s?t+(c?"/":""):N([t,s])}return n.createHref({pathname:u,search:l,hash:o})}function m(){return null!=(0,c.useContext)(o)}function g(){return m()||i(!1),(0,c.useContext)(o).location}function h(){m()||i(!1);let{basename:e,navigator:t}=(0,c.useContext)(a),{matches:n}=(0,c.useContext)(s),{pathname:r}=g(),o=JSON.stringify(n.map((e=>e.pathnameBase))),l=(0,c.useRef)(!1);return(0,c.useEffect)((()=>{l.current=!0})),(0,c.useCallback)((function(n,c){if(void 0===c&&(c={}),!l.current)return;if("number"==typeof n)return void t.go(n);let i=w(n,JSON.parse(o),r);"/"!==e&&(i.pathname=N([e,i.pathname])),(c.replace?t.replace:t.push)(i,c.state)}),[e,t,o,r])}function y(e){let{matches:t}=(0,c.useContext)(s),{pathname:n}=g(),r=JSON.stringify(t.map((e=>e.pathnameBase)));return(0,c.useMemo)((()=>w(e,JSON.parse(r),n)),[e,r,n])}function v(e){let t=[];return c.Children.forEach(e,(e=>{if(!(0,c.isValidElement)(e))return;if(e.type===c.Fragment)return void t.push.apply(t,v(e.props.children));e.type!==l&&i(!1);let n={caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path};e.props.children&&(n.children=v(e.props.children)),t.push(n)})),t}function f(e,t,n,c){return void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===c&&(c=""),e.forEach(((e,r)=>{let a={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:r,route:e};a.relativePath.startsWith("/")&&(a.relativePath.startsWith(c)||i(!1),a.relativePath=a.relativePath.slice(c.length));let o=N([c,a.relativePath]),s=n.concat(a);e.children&&e.children.length>0&&(!0===e.index&&i(!1),f(e.children,t,s,o)),(null!=e.path||e.index)&&t.push({path:o,score:b(o,e.index),routesMeta:s})})),t}const k=/^:\w+$/,E=e=>"*"===e;function b(e,t){let n=e.split("/"),c=n.length;return n.some(E)&&(c+=-2),t&&(c+=2),n.filter((e=>!E(e))).reduce(((e,t)=>e+(k.test(t)?3:""===t?1:10)),c)}function j(e,t){let{routesMeta:n}=e,c={},r="/",i=[];for(let e=0;e<n.length;++e){let a=n[e],o=e===n.length-1,s="/"===r?t:t.slice(r.length)||"/",l=C({path:a.relativePath,caseSensitive:a.caseSensitive,end:o},s);if(!l)return null;Object.assign(c,l.params);let u=a.route;i.push({params:c,pathname:N([r,l.pathname]),pathnameBase:S(N([r,l.pathnameBase])),route:u}),"/"!==l.pathnameBase&&(r=N([r,l.pathnameBase]))}return i}function _(e,t){return void 0===t&&(t=[]),null==e?null:e.reduceRight(((n,r,i)=>(0,c.createElement)(s.Provider,{children:void 0!==r.route.element?r.route.element:n,value:{outlet:n,matches:t.concat(e.slice(0,i+1))}})),null)}function C(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,c]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);let c=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,((e,t)=>(c.push(t),"([^\\/]+)")));e.endsWith("*")?(c.push("*"),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r+=n?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)";return[new RegExp(r,t?void 0:"i"),c]}(e.path,e.caseSensitive,e.end),r=t.match(n);if(!r)return null;let i=r[0],a=i.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:c.reduce(((e,t,n)=>{if("*"===t){let e=o[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(t){return e}}(o[n]||""),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function w(e,t,n){let c,i="string"==typeof e?(0,r.cP)(e):e,a=""===e||""===i.pathname?"/":i.pathname;if(null==a)c=n;else{let e=t.length-1;if(a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}c=e>=0?t[e]:"/"}let o=function(e,t){void 0===t&&(t="/");let{pathname:n,search:c="",hash:i=""}="string"==typeof e?(0,r.cP)(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:P(c),hash:R(i)}}(i,c);return a&&"/"!==a&&a.endsWith("/")&&!o.pathname.endsWith("/")&&(o.pathname+="/"),o}function Z(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}const N=e=>e.join("/").replace(/\/\/+/g,"/"),S=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),P=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",R=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},6975:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var c=n(951),r=n.n(c),i=n(2819);const a=r()("dops:analytics");let o,s;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const l={initialize:function(e,t,n){l.setUser(e,t),l.setSuperProps(n),l.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){s={ID:e,username:t}},setSuperProps:function(e){o=e},assignSuperProps:function(e){o=(0,i.assign)(o,e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);a("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);l.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);a("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('Built stat "%s" in group "%s"',t,e);return n}(e,t);l.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){l.tracks.recordPageView(e),l.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,c,r,i,a){l.ga.recordPurchase(e,t,n,c,r,i,a)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(o&&(a("- Super Props: %o",o),t=(0,i.assign)(t,o)),a('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):a('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};l.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){l.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){a("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};l.ga.initialized||(s&&(e={userId:"u-"+s.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),l.ga.initialized=!0)},recordPageView:function(e,t){l.ga.initialize(),a("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,c){l.ga.initialize();let r="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(r+=" [Option Label: "+n+"]"),void 0!==c&&(r+=" [Option Value: "+c+"]"),a(r),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,c)},recordPurchase:function(e,t,n,c,r,i,a){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:c,currency:a}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:r,quantity:i}),window.ga("ecommerce:send")}},identifyUser:function(){s&&window._tkq.push(["identifyUser",s.ID,s.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},u=l},4743:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>d});var c=n(2819),r=n(6483),i=n(1132);function a(e){class t extends Error{constructor(){super(...arguments),this.name=e}}return t}const o=a("JsonParseError"),s=a("JsonParseAfterRedirectError"),l=a("Api404Error"),u=a("Api404AfterRedirectError"),p=a("FetchNetworkError");const d=new function(e,t){let n=e,a={"X-WP-Nonce":t},o={credentials:"same-origin",headers:a},s={method:"post",credentials:"same-origin",headers:(0,c.assign)({},a,{"Content-type":"application/json"})},l=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",c=n.length?n.split("&"):[];return c.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+c.join("&")};const u={setApiRoot(e){n=e},setApiNonce(e){a={"X-WP-Nonce":e},o={credentials:"same-origin",headers:a},s={method:"post",credentials:"same-origin",headers:(0,c.assign)({},a,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{l=e},registerSite:(e,t)=>{const c={registration_nonce:e,no_iframe:!0};return(0,i.jetpackConfigHas)("consumer_slug")&&(c.plugin_slug=(0,i.jetpackConfigGet)("consumer_slug")),null!==t&&(c.redirect_uri=t),d(`${n}jetpack/v4/connection/register`,s,{body:JSON.stringify(c)}).then(m).then(g)},fetchAuthorizationUrl:e=>p((0,r.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),o).then(m).then(g),fetchSiteConnectionData:()=>p(`${n}jetpack/v4/connection/data`,o).then(g),fetchSiteConnectionStatus:()=>p(`${n}jetpack/v4/connection`,o).then(g),fetchSiteConnectionTest:()=>p(`${n}jetpack/v4/connection/test`,o).then(m).then(g),fetchUserConnectionData:()=>p(`${n}jetpack/v4/connection/data`,o).then(g),fetchUserTrackingSettings:()=>p(`${n}jetpack/v4/tracking/settings`,o).then(m).then(g),updateUserTrackingSettings:e=>d(`${n}jetpack/v4/tracking/settings`,s,{body:JSON.stringify(e)}).then(m).then(g),disconnectSite:()=>d(`${n}jetpack/v4/connection`,s,{body:JSON.stringify({isActive:!1})}).then(m).then(g),fetchConnectUrl:()=>p(`${n}jetpack/v4/connection/url`,o).then(m).then(g),unlinkUser:()=>d(`${n}jetpack/v4/connection/user`,s,{body:JSON.stringify({linked:!1})}).then(m).then(g),reconnect:()=>d(`${n}jetpack/v4/connection/reconnect`,s).then(m).then(g),fetchConnectedPlugins:()=>p(`${n}jetpack/v4/connection/plugins`,o).then(m).then(g),setHasSeenWCConnectionModal:()=>d(`${n}jetpack/v4/seen-wc-connection-modal`,s).then(m).then(g),fetchModules:()=>p(`${n}jetpack/v4/module/all`,o).then(m).then(g),fetchModule:e=>p(`${n}jetpack/v4/module/${e}`,o).then(m).then(g),activateModule:e=>d(`${n}jetpack/v4/module/${e}/active`,s,{body:JSON.stringify({active:!0})}).then(m).then(g),deactivateModule:e=>d(`${n}jetpack/v4/module/${e}/active`,s,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>d(`${n}jetpack/v4/module/${e}`,s,{body:JSON.stringify(t)}).then(m).then(g),updateSettings:e=>d(`${n}jetpack/v4/settings`,s,{body:JSON.stringify(e)}).then(m).then(g),getProtectCount:()=>p(`${n}jetpack/v4/module/protect/data`,o).then(m).then(g),resetOptions:e=>d(`${n}jetpack/v4/options/${e}`,s,{body:JSON.stringify({reset:!0})}).then(m).then(g),activateVaultPress:()=>d(`${n}jetpack/v4/plugins`,s,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(m).then(g),getVaultPressData:()=>p(`${n}jetpack/v4/module/vaultpress/data`,o).then(m).then(g),installPlugin:(e,t)=>{const c={slug:e,status:"active"};return t&&(c.source=t),d(`${n}jetpack/v4/plugins`,s,{body:JSON.stringify(c)}).then(m).then(g)},activateAkismet:()=>d(`${n}jetpack/v4/plugins`,s,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(m).then(g),getAkismetData:()=>p(`${n}jetpack/v4/module/akismet/data`,o).then(m).then(g),checkAkismetKey:()=>p(`${n}jetpack/v4/module/akismet/key/check`,o).then(m).then(g),checkAkismetKeyTyped:e=>d(`${n}jetpack/v4/module/akismet/key/check`,s,{body:JSON.stringify({api_key:e})}).then(m).then(g),fetchStatsData:e=>p(function(e){let t=`${n}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),o).then(m).then(g).then(h),getPluginUpdates:()=>p(`${n}jetpack/v4/updates/plugins`,o).then(m).then(g),getPlans:()=>p(`${n}jetpack/v4/plans`,o).then(m).then(g),fetchSettings:()=>p(`${n}jetpack/v4/settings`,o).then(m).then(g),updateSetting:e=>d(`${n}jetpack/v4/settings`,s,{body:JSON.stringify(e)}).then(m).then(g),fetchSiteData:()=>p(`${n}jetpack/v4/site`,o).then(m).then(g).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>p(`${n}jetpack/v4/site/features`,o).then(m).then(g).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>p(`${n}jetpack/v4/site/products`,o).then(m).then(g),fetchSitePurchases:()=>p(`${n}jetpack/v4/site/purchases`,o).then(m).then(g).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>p(`${n}jetpack/v4/site/benefits`,o).then(m).then(g).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>p(`${n}jetpack/v4/site/discount`,o).then(m).then(g).then((e=>e.data)),fetchSetupQuestionnaire:()=>p(`${n}jetpack/v4/setup/questionnaire`,o).then(m).then(g),fetchRecommendationsData:()=>p(`${n}jetpack/v4/recommendations/data`,o).then(m).then(g),fetchRecommendationsProductSuggestions:()=>p(`${n}jetpack/v4/recommendations/product-suggestions`,o).then(m).then(g),fetchRecommendationsUpsell:()=>p(`${n}jetpack/v4/recommendations/upsell`,o).then(m).then(g),fetchRecommendationsConditional:()=>p(`${n}jetpack/v4/recommendations/conditional`,o).then(m).then(g),saveRecommendationsData:e=>d(`${n}jetpack/v4/recommendations/data`,s,{body:JSON.stringify({data:e})}).then(m),fetchProducts:()=>p(`${n}jetpack/v4/products`,o).then(m).then(g),fetchRewindStatus:()=>p(`${n}jetpack/v4/rewind`,o).then(m).then(g).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>p(`${n}jetpack/v4/scan`,o).then(m).then(g).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>d(`${n}jetpack/v4/notice/${e}`,s,{body:JSON.stringify({dismissed:!0})}).then(m).then(g),fetchPluginsData:()=>p(`${n}jetpack/v4/plugins`,o).then(m).then(g),fetchIntroOffers:()=>p(`${n}jetpack/v4/intro-offers`,o).then(m).then(g),fetchVerifySiteGoogleStatus:e=>p(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,o).then(m).then(g),verifySiteGoogle:e=>d(`${n}jetpack/v4/verify-site/google`,s,{body:JSON.stringify({keyring_id:e})}).then(m).then(g),sendMobileLoginEmail:()=>d(`${n}jetpack/v4/mobile/send-login-email`,s).then(m).then(g),submitSurvey:e=>d(`${n}jetpack/v4/marketing/survey`,s,{body:JSON.stringify(e)}).then(m).then(g),saveSetupQuestionnaire:e=>d(`${n}jetpack/v4/setup/questionnaire`,s,{body:JSON.stringify(e)}).then(m).then(g),updateLicensingError:e=>d(`${n}jetpack/v4/licensing/error`,s,{body:JSON.stringify(e)}).then(m).then(g),updateLicenseKey:e=>d(`${n}jetpack/v4/licensing/set-license`,s,{body:JSON.stringify({license:e})}).then(m).then(g),getUserLicensesCounts:()=>p(`${n}jetpack/v4/licensing/user/counts`,o).then(m).then(g),getUserLicenses:()=>p(`${n}jetpack/v4/licensing/user/licenses`,o).then(m).then(g),updateLicensingActivationNoticeDismiss:e=>d(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,s,{body:JSON.stringify({last_detached_count:e})}).then(m).then(g),updateRecommendationsStep:e=>d(`${n}jetpack/v4/recommendations/step`,s,{body:JSON.stringify({step:e})}).then(m),confirmIDCSafeMode:()=>d(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,s).then(m),startIDCFresh:e=>d(`${n}jetpack/v4/identity-crisis/start-fresh`,s,{body:JSON.stringify({redirect_uri:e})}).then(m).then(g),migrateIDC:()=>d(`${n}jetpack/v4/identity-crisis/migrate`,s).then(m),attachLicenses:e=>d(`${n}jetpack/v4/licensing/attach-licenses`,s,{body:JSON.stringify({licenses:e})}).then(m).then(g),fetchSearchPlanInfo:()=>p(`${n}jetpack/v4/search/plan`,o).then(m).then(g),fetchSearchSettings:()=>p(`${n}jetpack/v4/search/settings`,o).then(m).then(g),updateSearchSettings:e=>d(`${n}jetpack/v4/search/settings`,s,{body:JSON.stringify(e)}).then(m).then(g),fetchSearchStats:()=>p(`${n}jetpack/v4/search/stats`,o).then(m).then(g),fetchWafSettings:()=>p(`${n}jetpack/v4/waf`,o).then(m).then(g),fetchWordAdsSettings:()=>p(`${n}jetpack/v4/wordads/settings`,o).then(m).then(g),updateWordAdsSettings:e=>d(`${n}jetpack/v4/wordads/settings`,s,{body:JSON.stringify(e)}),fetchSearchPricing:()=>p(`${n}jetpack/v4/search/pricing`,o).then(m).then(g)};function p(e,t){return fetch(l(e),t)}function d(e,t,n){return fetch(e,(0,c.assign)({},t,n)).catch(y)}function h(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}(0,c.assign)(this,u)};function m(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new u(e.redirected):new l})):e.json().catch((e=>h(e))).then((t=>{const n=new Error(`${t.message} (Status ${e.status})`);throw n.response=t,n.name="ApiError",n}))}function g(e){return e.json().catch((t=>h(t,e.redirected,e.url)))}function h(e,t,n){throw t?new s(n):new o}function y(){throw new p}},7121:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var c=n(9196),r=n.n(c),i=n(5736),a=n(5609),o=n(5162),s=n.n(o);n(9710);const __=i.__,l=e=>{const{label:t,onClick:n,isLoading:c,displayError:i,errorMessage:o}=e;return r().createElement("div",{className:"jp-action-button"},r().createElement(a.Button,{className:"jp-action-button--button",label:t,onClick:n,variant:"primary",disabled:c},c?r().createElement(a.Spinner,null):t),i&&r().createElement("p",{className:"jp-action-button__error"},o))};l.propTypes={label:s().string.isRequired,onClick:s().func,isLoading:s().bool,displayError:s().bool,errorMessage:s().string},l.defaultProps={isLoading:!1,displayError:!1,errorMessage:__("An error occurred. Please try again.","jetpack-my-jetpack")};const u=l},1163:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var c=n(9196),r=n.n(c),i=n(5736),a=n(5162),o=n.n(a),s=n(5235),l=n.n(s),u=n(1494),p=n(2392),d=n(1202),m=n(8218),g=n(2939);const __=i.__,h=e=>{const{children:t,moduleName:n,moduleNameHref:c,a8cLogoHref:i,showHeader:a,showFooter:o,showBackground:s,header:h}=e,y=l()(u.Z["admin-page"],{[u.Z.background]:s});return r().createElement("div",{className:y},a&&r().createElement(m.Z,{horizontalSpacing:5},r().createElement(g.Z,null,h||r().createElement(d.Z,null))),r().createElement(m.Z,{fluid:!0,horizontalSpacing:0},r().createElement(g.Z,null,t)),o&&r().createElement(m.Z,{horizontalSpacing:5},r().createElement(g.Z,null,r().createElement(p.Z,{moduleName:n,a8cLogoHref:i,moduleNameHref:c}))))};h.defaultProps={moduleName:__("Jetpack","jetpack-my-jetpack"),showHeader:!0,header:null,showFooter:!0,showBackground:!0},h.propTypes={a8cLogoHref:o().string,moduleName:o().string,showHeader:o().bool,header:o().node,showFooter:o().bool,moduleNameHref:o().string,showBackground:o().bool};const y=h},8038:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var c=n(9196),r=n.n(c),i=n(511);const a=e=>{const{children:t}=e;return r().createElement("div",{className:i.Z.section},t)}},3244:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var c=n(9196),r=n.n(c),i=n(281);const a=e=>{const{children:t}=e;return r().createElement("div",{className:i.Z["section-hero"]},t)}},207:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var c=n(2402),r=n.n(c),i=n(9196),a=n.n(i),o=n(5235),s=n.n(o),l=n(5736),u=n(5162),p=n.n(u);const __=l.__,d=e=>{const{title:t,height:n,className:c,...i}=e;return a().createElement("svg",r()({role:"img",x:"0",y:"0",viewBox:"0 0 935 38.2",enableBackground:"new 0 0 935 38.2","aria-labelledby":"jp-automattic-byline-logo-title",height:n,className:s()("jp-automattic-byline-logo",c)},i),a().createElement("title",{id:"jp-automattic-byline-logo-title"},t),a().createElement("path",{d:"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"}),a().createElement("path",{d:"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z"}),a().createElement("path",{d:"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7zM886.2 37l-23.4-24.1 -2.3-2.5V37h-6.8V1h6.5l22.7 24.1 2.3 2.6V1h6.8v36H886.2zM902.3 37V1H935v5.6h-26v9.2h20v5.5h-20v10.1h26V37H902.3z"}))};d.defaultProps={title:__("An Automattic Airline","jetpack-my-jetpack"),height:7,className:""},d.propTypes={title:p().string,height:p().number,className:p().string};const m=d},526:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var c=n(2402),r=n.n(c),i=n(5609),a=n(1074),o=n(5381),s=n(5235),l=n.n(s),u=n(3466);const p=e=>{let{children:t,variant:n="primary",size:c="normal",weight:s="bold",icon:p,iconSize:d,disabled:m,isDestructive:g,isLoading:h,isExternalLink:y,className:v,text:f,...k}=e;const E=l()(u.Z.button,v,{[u.Z.normal]:"normal"===c,[u.Z.small]:"small"===c,[u.Z.icon]:Boolean(p),[u.Z.loading]:h,[u.Z.regular]:"regular"===s}),b="normal"===c?20:16,j=y&&React.createElement(a.Z,{size:b,icon:o.Z,className:u.Z["external-icon"]}),_=y?"_blank":void 0;return React.createElement(i.Button,r()({target:_,variant:n,className:E,icon:y?void 0:p,iconSize:d,disabled:m,isDestructive:g,text:f},k),h&&React.createElement(i.Spinner,null),React.createElement("span",null,t),j)}},1133:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i);n(2404);const o=e=>{const{format:t,icon:n,imageUrl:c}=e;return r().createElement("div",{className:"jp-components__decorative-card "+(t?"jp-components__decorative-card--"+t:"")},r().createElement("div",{className:"jp-components__decorative-card__image",style:{backgroundImage:c?`url( ${c} )`:""}}),r().createElement("div",{className:"jp-components__decorative-card__content"},r().createElement("div",{className:"jp-components__decorative-card__lines"})),(()=>{if(n)return r().createElement("div",{className:"jp-components__decorative-card__icon-container"},r().createElement("span",{className:"jp-components__decorative-card__icon jp-components__decorative-card__icon--"+n}))})())};o.propTypes={format:a().oneOf(["horizontal","vertical"]),icon:a().oneOf(["unlink"]),imageUrl:a().string},o.defaultProps={format:"horizontal"};const s=o},1020:(e,t,n)=>{"use strict";n.d(t,{KM:()=>m,VS:()=>y,r7:()=>d});var c=n(2402),r=n.n(c),i=n(5235),a=n.n(i),o=n(9196),s=n.n(o),l=n(5609),u=n(5612);function p(e){let{className:t,size:n=24,viewBox:c="0 0 24 24",opacity:i=1,color:o,children:p}=e;const d={className:a()(u.Z.iconWrapper,t),width:n,height:n,viewBox:c,opacity:i};return o&&(d.fill=o),s().createElement(l.SVG,r()({},d,{fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg"}),s().createElement(l.G,{opacity:i},p))}const d=e=>{let{size:t,className:n=u.Z["star-icon"]}=e;return s().createElement(p,{className:n,size:t},s().createElement(l.Path,{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}))},m=e=>{let{size:t,className:n=u.Z["checkmark-icon"]}=e;return s().createElement(p,{className:n,size:t},s().createElement(l.Path,{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"}))};function g(e){let{className:t,fill:n="none",size:c,children:r}=e;return s().createElement(p,{className:a()(u.Z.socialIcon,t),size:c,fill:n},r)}const h={"anti-spam":e=>{let{opacity:t=1,size:n}=e;return s().createElement(p,{size:n,opacity:t},s().createElement(l.Path,{d:"m8.455 21.207 8-17.5-.91-.416-1.261 2.76A4.979 4.979 0 0 0 12 5.5c-1.062 0-2.046.33-2.855.895L7.19 4.44 6.13 5.5l1.926 1.927A4.975 4.975 0 0 0 7.025 10H5v1.5h2V13H5v1.5h2.1a5.001 5.001 0 0 0 1.937 3.028L7.545 20.79l.91.416ZM9.68 16.12A3.492 3.492 0 0 1 8.5 13.5v-3a3.5 3.5 0 0 1 5.159-3.083L9.68 16.121Zm5.675-6.62.81-1.77c.44.663.728 1.436.81 2.269H19v1.5h-2V13h2v1.5h-2.1a5.002 5.002 0 0 1-5.634 3.947l.662-1.448L12 17a3.5 3.5 0 0 0 3.5-3.5v-3a3.5 3.5 0 0 0-.145-.998Z"}))},backup:e=>{let{opacity:t=1,size:n}=e;return s().createElement(p,{size:n,opacity:t},s().createElement(l.Path,{d:"m15.82 11.373.013-1.277v-.03c0-1.48-1.352-2.9-3.3-2.9-1.627 0-2.87 1.015-3.205 2.208l-.32 1.143-1.186-.048a2.192 2.192 0 0 0-.089-.002c-1.19 0-2.233 1.008-2.233 2.35 0 1.34 1.04 2.348 2.23 2.35H16.8c.895 0 1.7-.762 1.7-1.8 0-.927-.649-1.643-1.423-1.777l-1.258-.217ZM7.883 8.97l-.15-.003C5.67 8.967 4 10.69 4 12.817c0 2.126 1.671 3.85 3.733 3.85H16.8c1.767 0 3.2-1.478 3.2-3.3 0-1.635-1.154-2.993-2.667-3.255v-.045c0-2.43-2.149-4.4-4.8-4.4-2.237 0-4.118 1.403-4.65 3.303Z",fill:"#000"}))},boost:e=>{let{opacity:t=1,size:n}=e;return s().createElement(p,{size:n,opacity:t},s().createElement(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.19505 16.2545C4.47368 16.561 4.94802 16.5836 5.25451 16.3049L10.2595 11.7549L14.2842 15.2765L19 10.5607V13.75H20.5V9.5V8.75239V8.7476V8H19.7529H19.7471H19H14.75V9.5H17.9393L14.2158 13.2235L10.2405 9.74507L4.2455 15.195C3.93901 15.4737 3.91642 15.948 4.19505 16.2545Z"}))},crm:e=>{let{opacity:t=1,size:n}=e;return s().createElement(p,{size:n,opacity:t},s().createElement(l.Path,{d:"M15.5 9.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm-2.25 6v-2a2.75 2.75 0 0 0-2.75-2.75h-4A2.75 2.75 0 0 0 3.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5Zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0 1 20.25 15ZM9.5 8.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm1.5 0a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z"}))},extras:e=>{let{opacity:t=1,size:n}=e;return s().createElement(p,{size:n,opacity:t},s().createElement(l.Path,{d:"M18.5 5.5V8H20V5.5h2.5V4H20V1.5h-1.5V4H16v1.5h2.5ZM12 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6h-1.5v6a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h6V4Z"}))},protect:e=>{let{opacity:t=1,size:n,className:c}=e;return s().createElement(p,{className:c,size:n,opacity:t},s().createElement(l.Path,{d:"M12 3.17627L18.75 6.24445V10.8183C18.75 14.7173 16.2458 18.4089 12.7147 19.5735C12.2507 19.7265 11.7493 19.7265 11.2853 19.5735C7.75416 18.4089 5.25 14.7173 5.25 10.8183V6.24445L12 3.17627ZM6.75 7.21032V10.8183C6.75 14.1312 8.89514 17.2057 11.7551 18.149C11.914 18.2014 12.086 18.2014 12.2449 18.149C15.1049 17.2057 17.25 14.1312 17.25 10.8183V7.21032L12 4.82396L6.75 7.21032Z"}),s().createElement(l.Path,{d:"M15.5291 10.0315L11.1818 14.358L8.47095 11.66L9.52907 10.5968L11.1818 12.2417L14.4709 8.96826L15.5291 10.0315Z"}))},scan:e=>{let{opacity:t=1,size:n}=e;return s().createElement(p,{size:n,opacity:t},s().createElement(l.Path,{d:"m12 3.176 6.75 3.068v4.574c0 3.9-2.504 7.59-6.035 8.755a2.283 2.283 0 0 1-1.43 0c-3.53-1.164-6.035-4.856-6.035-8.755V6.244L12 3.176ZM6.75 7.21v3.608c0 3.313 2.145 6.388 5.005 7.33.159.053.331.053.49 0 2.86-.942 5.005-4.017 5.005-7.33V7.21L12 4.824 6.75 7.21Z"}))},search:e=>{let{opacity:t=1,size:n}=e;return s().createElement(p,{size:n,opacity:t},s().createElement(l.Path,{d:"M17.5 11.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm1.5 0a5.5 5.5 0 0 1-9.142 4.121l-3.364 2.943-.988-1.128 3.373-2.952A5.5 5.5 0 1 1 19 11.5Z"}))},social:e=>{let{opacity:t=1,size:n}=e;return s().createElement(p,{size:n,opacity:t},s().createElement(l.Path,{d:"M15.5 3.97809V18.0219L7.5 15.5977V20H6V15.1431L3.27498 14.3173C2.22086 13.9979 1.5 13.0262 1.5 11.9248V10.0752C1.5 8.97375 2.22087 8.00207 3.27498 7.68264L15.5 3.97809ZM14 16L7.5 14.0303L7.5 7.96969L14 5.99999V16ZM6 8.42423L6 13.5757L3.70999 12.8818C3.28835 12.754 3 12.3654 3 11.9248V10.0752C3 9.63462 3.28835 9.24595 3.70999 9.11818L6 8.42423ZM17.5 11.75H21.5V10.25H17.5V11.75ZM21.5 16L17.5 15V13.5L21.5 14.5V16ZM17.5 8.5L21.5 7.5V6L17.5 7V8.5Z"}))},star:d,videopress:e=>{let{opacity:t=1,size:n}=e;return s().createElement(p,{size:n,opacity:t},s().createElement(l.Path,{d:"M5.286 4.5h13.428c.434 0 .786.352.786.786v13.428a.786.786 0 0 1-.786.786H5.286a.786.786 0 0 1-.786-.786V5.286c0-.434.352-.786.786-.786ZM3 5.286A2.286 2.286 0 0 1 5.286 3h13.428A2.286 2.286 0 0 1 21 5.286v13.428A2.286 2.286 0 0 1 18.714 21H5.286A2.286 2.286 0 0 1 3 18.714V5.286ZM15 12l-5-3v6l5-3Z"}))},jetpack:e=>{let{size:t,className:n=u.Z.jetpack}=e;return s().createElement(p,{className:n,size:t,viewBox:"0 0 32 32"},s().createElement(l.Path,{className:"jetpack-logo__icon-circle",d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),s().createElement(l.Polygon,{fill:"#fff",points:"15,19 7,19 15,3"}),s().createElement(l.Polygon,{fill:"#fff",points:"17,29 17,13 25,13"}))},facebook:e=>{let{fill:t,size:n,className:c}=e;return s().createElement(g,{fill:t,size:n,className:a()(u.Z.facebook,c)},s().createElement(l.Path,{d:"M12,2C6.5,2,2,6.5,2,12c0,5,3.7,9.1,8.4,9.9v-7H7.9V12h2.5V9.8c0-2.5,1.5-3.9,3.8-3.9c1.1,0,2.2,0.2,2.2,0.2v2.5h-1.3 c-1.2,0-1.6,0.8-1.6,1.6V12h2.8l-0.4,2.9h-2.3v7C18.3,21.1,22,17,22,12C22,6.5,17.5,2,12,2z"}))},twitter:e=>{let{fill:t,size:n,className:c}=e;return s().createElement(g,{fill:t,size:n,className:a()(u.Z.twitter,c)},s().createElement(l.Path,{d:"M19,3H5C3.895,3,3,3.895,3,5v14c0,1.105,0.895,2,2,2h14c1.105,0,2-0.895,2-2V5C21,3.895,20.105,3,19,3z M16.466,9.71 c0.004,0.099,0.007,0.198,0.007,0.298c0,3.045-2.318,6.556-6.556,6.556c-1.301,0-2.512-0.381-3.532-1.035 c0.18,0.021,0.364,0.032,0.55,0.032c1.079,0,2.073-0.368,2.862-0.986c-1.008-0.019-1.859-0.685-2.152-1.6 c0.141,0.027,0.285,0.041,0.433,0.041c0.21,0,0.414-0.028,0.607-0.081c-1.054-0.212-1.848-1.143-1.848-2.259 c0-0.01,0-0.019,0-0.029c0.311,0.173,0.666,0.276,1.044,0.288c-0.618-0.413-1.025-1.118-1.025-1.918 c0-0.422,0.114-0.818,0.312-1.158c1.136,1.394,2.834,2.311,4.749,2.407c-0.039-0.169-0.06-0.344-0.06-0.525 c0-1.272,1.032-2.304,2.304-2.304c0.663,0,1.261,0.28,1.682,0.728c0.525-0.103,1.018-0.295,1.463-0.559 c-0.172,0.538-0.537,0.99-1.013,1.275c0.466-0.056,0.91-0.18,1.323-0.363C17.306,8.979,16.916,9.385,16.466,9.71z"}))},linkedin:e=>{let{fill:t,size:n,className:c}=e;return s().createElement(g,{fill:t,size:n,className:a()(u.Z.linkedin,c)},s().createElement(l.Path,{d:"M19.7 3H4.3C3.582 3 3 3.582 3 4.3v15.4c0 .718.582 1.3 1.3 1.3h15.4c.718 0 1.3-.582 1.3-1.3V4.3c0-.718-.582-1.3-1.3-1.3zM8.34 18.338H5.666v-8.59H8.34v8.59zM7.003 8.574c-.857 0-1.55-.694-1.55-1.548 0-.855.692-1.548 1.55-1.548.854 0 1.547.694 1.547 1.548 0 .855-.692 1.548-1.546 1.548zm11.335 9.764h-2.67V14.16c0-.995-.017-2.277-1.387-2.277-1.39 0-1.6 1.086-1.6 2.206v4.248h-2.668v-8.59h2.56v1.174h.036c.357-.675 1.228-1.387 2.527-1.387 2.703 0 3.203 1.78 3.203 4.092v4.71z"}))},tumblr:e=>{let{fill:t,size:n,className:c}=e;return s().createElement(g,{fill:t,size:n,className:a()(u.Z.tumblr,c)},s().createElement(l.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-5.57 14.265c-2.445.042-3.37-1.742-3.37-2.998V10.6H8.922V9.15c1.703-.615 2.113-2.15 2.21-3.026.006-.06.053-.084.08-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.13 1.08 1.107.3-.008.698-.094.907-.194l.54 1.6c-.205.297-1.12.642-1.946.657z"}))},google:e=>{let{fill:t,size:n,className:c}=e;return s().createElement(g,{fill:t,size:n,className:a()(u.Z.google,c)},s().createElement(l.Path,{d:"M12.02 10.18v3.73h5.51c-.26 1.57-1.67 4.22-5.5 4.22-3.31 0-6.01-2.75-6.01-6.12s2.7-6.12 6.01-6.12c1.87 0 3.13.8 3.85 1.48l2.84-2.76C16.99 2.99 14.73 2 12.03 2c-5.52 0-10 4.48-10 10s4.48 10 10 10c5.77 0 9.6-4.06 9.6-9.77 0-.83-.11-1.42-.25-2.05h-9.36z"}))}};function y(e){return h[e]?h[e]:null}},2392:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var c=n(2402),r=n.n(c),i=n(9196),a=n.n(i),o=n(5736),s=n(5235),l=n.n(s),u=n(5162),p=n.n(u),d=n(207),m=(n(9054),n(1202));const __=o.__,g=e=>{const{a8cLogoHref:t,moduleName:n,className:c,moduleNameHref:i,...o}=e;return a().createElement("div",r()({className:l()("jp-dashboard-footer",c)},o),a().createElement("div",{className:"jp-dashboard-footer__footer-left"},a().createElement(m.Z,{logoColor:"#000",showText:!1,height:16,className:"jp-dashboard-footer__jetpack-symbol","aria-label":__("Jetpack logo","jetpack-my-jetpack")}),a().createElement("span",{className:"jp-dashboard-footer__module-name"},i?a().createElement("a",{href:i,"aria-label":n},n):n)),a().createElement("div",{className:"jp-dashboard-footer__footer-right"},a().createElement("a",{href:t,"aria-label":__("An Automattic Airline","jetpack-my-jetpack")},a().createElement(d.Z,null))))};g.defaultProps={a8cLogoHref:"https://automattic.com",moduleName:__("Jetpack","jetpack-my-jetpack"),className:"",moduleNameHref:"https://jetpack.com"},g.propTypes={a8cLogoHref:p().string,moduleName:p().string,className:p().string,moduleNameHref:p().string};const h=g},1202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var c=n(2402),r=n.n(c),i=n(8294),a=n.n(i),o=n(5162),s=n.n(o),l=n(9196),u=n.n(l),p=n(5235),d=n.n(p),m=n(5736);const __=m.__;class g extends u().Component{render(){const{logoColor:e,showText:t,className:n,...c}=this.props,i=t?"0 0 118 32":"0 0 32 32";return u().createElement("svg",r()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:i,className:d()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title"},c),u().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-my-jetpack")),u().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&u().createElement(l.Fragment,null,u().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),u().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),u().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),u().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),u().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),u().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),u().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}a()(g,"propTypes",{className:s().string,width:s().number,height:s().number,showText:s().bool,logoColor:s().string}),a()(g,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"});const h=g},2939:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var c=n(9196),r=n.n(c),i=n(5235),a=n.n(i),o=n(5162),s=n.n(o),l=n(3080);const u=Number(l.Z.smCols),p=Number(l.Z.mdCols),d=Number(l.Z.lgCols),m=e=>{var t,n,c,i,o,s;const{children:m,className:g}=e,h=Math.min(u,(null==e?void 0:e.sm)??u),y=Math.min(u,(null==e||null===(t=e.sm)||void 0===t?void 0:t.start)??0),v=Math.min(u,(null==e||null===(n=e.sm)||void 0===n?void 0:n.end)??0),f=Math.min(p,(null==e?void 0:e.md)??p),k=Math.min(p,(null==e||null===(c=e.md)||void 0===c?void 0:c.start)??0),E=Math.min(p,(null==e||null===(i=e.md)||void 0===i?void 0:i.end)??0),b=Math.min(d,(null==e?void 0:e.lg)??d),j=Math.min(d,(null==e||null===(o=e.lg)||void 0===o?void 0:o.start)??0),_=Math.min(d,(null==e||null===(s=e.lg)||void 0===s?void 0:s.end)??0),C=a()(g,{[l.Z[`col-sm-${h}`]]:!(y&&v),[l.Z[`col-sm-${y}-start`]]:y>0,[l.Z[`col-sm-${v}-end`]]:v>0,[l.Z[`col-md-${f}`]]:!(k&&E),[l.Z[`col-md-${k}-start`]]:k>0,[l.Z[`col-md-${E}-end`]]:E>0,[l.Z[`col-lg-${b}`]]:!(j&&_),[l.Z[`col-lg-${j}-start`]]:j>0,[l.Z[`col-lg-${_}-end`]]:_>0});return r().createElement("div",{className:C},m)};m.proptypes={className:s().string,sm:s().oneOfType([s().number,s().shape({start:s().number,end:s().number})]),md:s().oneOfType([s().number,s().shape({start:s().number,end:s().number})]),lg:s().oneOfType([s().number,s().shape({start:s().number,end:s().number})]),children:s().node};const g=m},8218:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var c=n(9196),r=n.n(c),i=n(5235),a=n.n(i),o=n(5162),s=n.n(o),l=n(8730);const u=e=>{const{children:t,fluid:n,className:c}=e,i=`calc( var(--horizontal-spacing) * ${e.horizontalSpacing} )`,o={paddingTop:i,paddingBottom:i,rowGap:`calc( var(--horizontal-spacing) * ${e.horizontalGap} )`},s=a()(c,l.Z.container,{[l.Z.fluid]:n});return r().createElement("div",{className:s,style:o},t)};u.propTypes={fluid:s().bool,className:s().string,horizontalSpacing:s().number,horizontalGap:s().number,children:s().node},u.defaultProps={fluid:!1,horizontalGap:1,horizontalSpacing:1};const p=u},5033:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i);n(1683);const o=e=>{const t=e.className+" jp-components-spinner",n={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},c={borderTopColor:e.color,borderRightColor:e.color};return r().createElement("div",{className:t},r().createElement("div",{className:"jp-components-spinner__outer",style:n},r().createElement("div",{className:"jp-components-spinner__inner",style:c})))};o.propTypes={color:a().string,className:a().string,size:a().number},o.defaultProps={color:"#FFFFFF",className:"",size:20};const s=o},6017:(e,t,n)=>{"use strict";n.d(t,{h:()=>c,s:()=>r});const c={"headline-medium":"h1","headline-small":"h2","headline-small-regular":"h2","title-medium":"h3","title-small":"h4",body:"p","body-small":"p","body-extra-small":"p",label:"p"},r=["mt","mr","mb","ml","mx","my","m","pt","pr","pb","pl","px","py","p"]},5106:(e,t,n)=>{"use strict";n.d(t,{Dx:()=>g,H3:()=>m,ZP:()=>d});var c=n(2402),r=n.n(c),i=n(9196),a=n.n(i),o=n(5235),s=n.n(o),l=n(3280),u=n(6017);const p=e=>{let{variant:t="body",children:n,component:c,className:o,...p}=e;const d=c||u.h[t]||"span",m=(0,i.useMemo)((()=>u.s.reduce(((e,t)=>(void 0!==p[t]&&(e+=l.Z[`${t}-${p[t]}`]+" ",delete p[t]),e)),"")),[p]);return a().createElement(d,r()({className:s()(l.Z.reset,l.Z[t],o,m)},p),n)},d=p,m=e=>{let{children:t,weight:n="bold",...c}=e;const i="headline-small"+("bold"===n?"":`-${n}`);return a().createElement(p,r()({variant:i,mb:3},c),t)},g=e=>{let{children:t,size:n="medium",...c}=e;return a().createElement(p,r()({variant:`title-${n}`,mb:1},c),t)}},6016:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>p});var c=n(9196),r=n.n(c);const i={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},a={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-80":"#2C3338","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-20":"#F0C930","--jp-yellow-40":"#C08C00","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},o={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},s={"--spacing-base":"8px"},l={},u=(e,t)=>{const n={...i,...a,...o,...s};for(const t in n)e.style.setProperty(t,n[t]);t&&(l[t]={provided:!0,root:e})},p=e=>{var t;let{children:n=null,targetDom:i,id:a}=e;const o=(0,c.useRef)(),s=null==l||null===(t=l[a])||void 0===t?void 0:t.provided;return(0,c.useLayoutEffect)((()=>{if(!s)return i?u(i,a):void(null!=o&&o.current&&u(o.current,a))}),[i,o,s,a]),i?n:r().createElement("div",{ref:o},n)}},6324:(e,t,n)=>{"use strict";function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let c;var r;"undefined"!=typeof window&&(c=null===(r=window.Initial_State)||void 0===r?void 0:r.calypsoEnv);if(0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);Object.keys(t).map((e=>{n[e]=encodeURIComponent(t[e])})),!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),c&&(n.calypso_env=c);const i=Object.keys(n).map((e=>e+"="+n[e])).join("&");return"https://jetpack.com/redirect/?"+i}n.d(t,{Z:()=>c})},1132:(e,t,n)=>{let c={};try{c=n(4462)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),c={missingConfig:!0}}const r=e=>c.hasOwnProperty(e);e.exports={jetpackConfigHas:r,jetpackConfigGet:e=>{if(!r(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return c[e]}}},9312:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5736),s=n(1624),l=n(1294);const __=o.__,u=e=>{const{title:t,buttonLabel:n,apiRoot:c,apiNonce:i,registrationNonce:a,from:o,redirectUri:u,images:p,children:d,assetBaseUrl:m,autoTrigger:g,footer:h,skipUserConnection:y}=e,{handleRegisterSite:v,isRegistered:f,isUserConnected:k,siteIsRegistering:E,userIsConnecting:b,registrationError:j}=(0,l.Z)({registrationNonce:a,redirectUri:u,apiRoot:c,apiNonce:i,autoTrigger:g,from:o,skipUserConnection:y}),_=!f||!k,C=Boolean(j),w=E||b;return r().createElement(s.Z,{title:t,images:p,assetBaseUrl:m,showConnectButton:_,buttonLabel:n,handleButtonClick:v,displayButtonError:C,buttonIsLoading:w,footer:h},d)};u.propTypes={title:a().string,buttonLabel:a().string,apiRoot:a().string.isRequired,apiNonce:a().string.isRequired,registrationNonce:a().string.isRequired,from:a().string,redirectUri:a().string.isRequired,autoTrigger:a().bool,images:a().arrayOf(a().string),assetBaseUrl:a().string,skipUserConnection:a().bool},u.defaultProps={title:__("Over 5 million WordPress sites are faster and more secure","jetpack-my-jetpack"),buttonLabel:__("Set up Jetpack","jetpack-my-jetpack"),images:[],redirectUri:null,autoTrigger:!1,skipUserConnection:!1};const p=u},1624:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5736),s=n(6324),l=n(7121),u=n(9307),p=n(8524);n(1510);const __=o.__,d=(0,u.createInterpolateElement)(__("By clicking the button above, you agree to our <tosLink>Terms of Service</tosLink> and to <shareDetailsLink>share details</shareDetailsLink> with WordPress.com.","jetpack-my-jetpack"),{tosLink:r().createElement("a",{href:(0,s.Z)("wpcom-tos"),rel:"noopener noreferrer",target:"_blank"}),shareDetailsLink:r().createElement("a",{href:(0,s.Z)("jetpack-support-what-data-does-jetpack-sync"),rel:"noopener noreferrer",target:"_blank"})}),m=e=>{const{title:t,images:n,children:c,assetBaseUrl:i,isLoading:a,showConnectButton:o,buttonLabel:s,handleButtonClick:u,displayButtonError:m,buttonIsLoading:g,footer:h}=e;return r().createElement(p.Z,{title:t,assetBaseUrl:i,images:n,className:"jp-connection__connect-screen"+(a?" jp-connection__connect-screen__loading":"")},r().createElement("div",{className:"jp-connection__connect-screen__content"},c,o&&r().createElement(r().Fragment,null,r().createElement(l.Z,{label:s,onClick:u,displayError:m,isLoading:g}),r().createElement("div",{className:"jp-connection__connect-screen__tos"},d)),h&&r().createElement("div",{className:"jp-connection__connect-screen__footer"},h)))};m.propTypes={title:a().string,images:a().arrayOf(a().string),assetBaseUrl:a().string,isLoading:a().bool,showConnectButton:a().bool,buttonLabel:a().string.isRequired,handleButtonClick:a().func,displayButtonError:a().bool,buttonIsLoading:a().bool,footer:a().node},m.defaultProps={showConnectButton:!0,isLoading:!1,buttonIsLoading:!1,displayButtonError:!1,handleButtonClick:()=>{},footer:null};const g=m},2458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i);const o=e=>{const{images:t,assetBaseUrl:n}=e;if(!t.length)return null;const c=t.map(((e,t)=>r().createElement(r().Fragment,{key:t},r().createElement("img",{src:n+e,alt:""}))));return r().createElement("div",{className:"jp-connection__connect-screen__image-slider"},c)};o.propTypes={images:a().arrayOf(a().string).isRequired,assetBaseUrl:a().string},o.defaultProps={assetBaseUrl:""};const s=o},8524:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(1202),s=n(2458);n(9610);const l=e=>{const{title:t,children:n,className:c,assetBaseUrl:i,images:a}=e,l=null==a?void 0:a.length;return r().createElement("div",{className:"jp-connection__connect-screen-layout"+(l?" jp-connection__connect-screen-layout__two-columns":"")+(c?" "+c:"")},r().createElement("div",{className:"jp-connection__connect-screen-layout__left"},r().createElement(o.Z,null),r().createElement("h2",null,t),n),l?r().createElement("div",{className:"jp-connection__connect-screen-layout__right"},r().createElement(s.Z,{images:a,assetBaseUrl:i})):null)};l.propTypes={title:a().string,className:a().string,images:a().arrayOf(a().string),assetBaseUrl:a().string};const u=l},9625:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var c=n(9196),r=n(5162),i=n.n(r),a=n(4743);const o=e=>{const{redirectFunc:t,connectUrl:n,redirectUri:r,from:i}=e,[o,s]=(0,c.useState)(null);return n&&n!==o&&s(n),(0,c.useEffect)((()=>{o||a.ZP.fetchAuthorizationUrl(r).then((e=>s(e.authorizeUrl))).catch((e=>{throw e}))}),[]),o?(t(o+(i?(o.includes("?")?"&":"?")+"from="+encodeURIComponent(i):"")),null):null};o.propTypes={connectUrl:i().string,redirectUri:i().string.isRequired,from:i().string,redirectFunc:i().func},o.defaultProps={redirectFunc:e=>window.location.assign(e),redirectUri:null};const s=o},7879:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5736),s=n(4322);const __=o.__,l=e=>{const{connectedPlugins:t,disconnectingPlugin:n}=e,i=(0,c.useMemo)((()=>{if(t){return Object.keys(t).map((e=>Object.assign({slug:e},t[e]))).filter((e=>n!==e.slug))}return[]}),[t,n]);return t&&i.length>0?r().createElement(r().Fragment,null,r().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},r().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is powering other plugins on your site. If you disconnect, these plugins will no longer work.","jetpack-my-jetpack"))),r().createElement("div",{className:"jp-connection__disconnect-card__group"},i.map((e=>r().createElement(s.Z,{title:e.name,key:e.slug}))))):null};l.propTypes={connectedPlugins:a().array,disconnectingPlugin:a().string};const u=l},9159:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var c=n(9196),r=n.n(c),i=n(5736),a=n(5162),o=n.n(a),s=n(4743),l=n(5106),u=n(526),p=n(9818),d=n(9625),m=n(6168),g=n(428),h=n(1294);n(2427);const __=i.__,y=e=>{var t,n,i,a;const{apiRoot:o,apiNonce:y,redirectUri:v,title:f,connectionInfoText:k,onDisconnected:E,connectedPlugins:b,connectedSiteId:j,context:_,onConnectUser:C,requiresUserConnection:w}=e,{isRegistered:Z,isUserConnected:N,userConnectionData:S,hasConnectedOwner:P}=(0,h.Z)({apiRoot:o,apiNonce:y}),R=w&&!P,x=(0,c.useRef)(),I=null===(t=S.currentUser)||void 0===t||null===(n=t.wpcomUser)||void 0===n?void 0:n.avatar;(0,c.useEffect)((()=>{I&&(x.current.style.backgroundImage=`url('${I}')`)}),[I]);const[U,T]=(0,c.useState)(!1),A=(0,p.useSelect)((e=>e(g.t).getUserIsConnecting()),[]),{setConnectionStatus:F,setUserIsConnecting:L}=(0,p.useDispatch)(g.t),z=C||L;(0,c.useEffect)((()=>{s.ZP.setApiRoot(o),s.ZP.setApiNonce(y)}),[o,y]);const O=(0,c.useCallback)((e=>{e&&e.preventDefault(),T(!0)}),[T]),M=(0,c.useCallback)((e=>{e&&e.preventDefault(),T(!1)}),[T]),D=(0,c.useCallback)((e=>{e&&e.preventDefault(),F({isActive:!1,isRegistered:!1,isUserConnected:!1}),E&&"[object Function]"==={}.toString.call(E)&&E()}),[E,F]);return Z?r().createElement("div",{className:"jp-connection-status-card"},r().createElement(l.H3,null,f),r().createElement(l.ZP,{variant:"body"},k),r().createElement("div",{className:"jp-connection-status-card--status"},r().createElement("div",{className:"jp-connection-status-card--cloud"}),r().createElement("div",{className:"jp-connection-status-card--line"+(N?"":" jp-connection-status-card--site-only")}),r().createElement("div",{className:"jp-connection-status-card--jetpack-logo"}),r().createElement("div",{className:"jp-connection-status-card--avatar",ref:x})),r().createElement("ul",{className:"jp-connection-status-card--list"},r().createElement("li",{className:"jp-connection-status-card--list-item-success"},__("Site connected.","jetpack-my-jetpack")," ",r().createElement(u.Z,{variant:"link",weight:"regular",onClick:O,className:"jp-connection__disconnect-dialog__link"},__("Disconnect","jetpack-my-jetpack")),r().createElement(m.Z,{apiRoot:o,apiNonce:y,onDisconnected:D,connectedPlugins:b,connectedSiteId:j,connectedUser:S,isOpen:U,onClose:M,context:_})),N&&r().createElement("li",{className:"jp-connection-status-card--list-item-success"},__("Logged in as","jetpack-my-jetpack")," ",null===(i=S.currentUser)||void 0===i||null===(a=i.wpcomUser)||void 0===a?void 0:a.display_name),(!N||!P)&&r().createElement("li",{className:"jp-connection-status-card--list-item-"+(R?"error":"info")},R&&__("Requires user connection.","jetpack-my-jetpack")," ",r().createElement(u.Z,{variant:"link",disabled:A,onClick:z,className:"jp-connection-status-card--btn-connect-user"},__("Connect your user account","jetpack-my-jetpack")))),A&&r().createElement(d.Z,{redirectUri:v})):null};y.propTypes={apiRoot:o().string.isRequired,apiNonce:o().string.isRequired,redirectUri:o().string,connectedPlugins:o().array,connectedSiteId:o().number,title:o().string,connectionInfoText:o().string,onDisconnected:o().func,context:o().string,onConnectUser:o().func,requiresUserConnection:o().bool},y.defaultProps={title:__("Connection","jetpack-my-jetpack"),connectionInfoText:__("Leverages the cloud for more powerful Jetpack features.","jetpack-my-jetpack"),redirectUri:null,onConnectUser:null,requiresUserConnection:!0};const v=y},4322:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i);n(4220);const o=e=>{const{title:t,value:n,description:c}=e;return r().createElement("div",{className:"jp-connection__disconnect-card card"},r().createElement("div",{className:"jp-connection__disconnect-card__card-content"},r().createElement("p",{className:"jp-connection__disconnect-card__card-headline"},t),(n||c)&&r().createElement("div",{className:"jp-connection__disconnect-card__card-stat-block"},r().createElement("span",{className:"jp-connection__disconnect-card__card-stat"},n),r().createElement("div",{className:"jp-connection__disconnect-card__card-description"},c))))};o.propTypes={title:a().string,value:a().oneOfType([a().string,a().number]),description:a().number};const s=o},6168:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5736),s=n(5609),l=n(4743),u=n(6975),p=n(1132),d=(n(287),n(9015)),m=n(5995),g=n(1702),h=n(1166);const __=o.__,y=e=>{const[t,n]=(0,c.useState)(!1),[i,a]=(0,c.useState)(!1),[o,y]=(0,c.useState)(!1),[v,f]=(0,c.useState)(!1),[k,E]=(0,c.useState)(!1),[b,j]=(0,c.useState)(!1),{apiRoot:_,apiNonce:C,connectedPlugins:w,title:Z,pluginScreenDisconnectCallback:N,onDisconnected:S,onError:P,disconnectStepComponent:R,context:x,connectedUser:I,connectedSiteId:U,isOpen:T,onClose:A}=e;let F="";(0,p.jetpackConfigHas)("consumer_slug")&&(F=(0,p.jetpackConfigGet)("consumer_slug"));const L=(0,c.useMemo)((()=>({context:x,plugin:F})),[x,F]);(0,c.useEffect)((()=>{l.ZP.setApiRoot(_),l.ZP.setApiNonce(C)}),[_,C]),(0,c.useEffect)((()=>{I&&I.ID&&I.login&&u.Z.initialize(I.ID,I.login)}),[I,I.ID,I.login]),(0,c.useEffect)((()=>{T&&u.Z.tracks.recordEvent("jetpack_disconnect_dialog_open",L)}),[T,L]),(0,c.useEffect)((()=>{T&&(i?!i||v||k?v&&!k?u.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"survey"},L)):k&&u.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"thank_you"},L)):u.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect_confirm"},L)):u.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect"},L)))}),[T,i,v,k,L]);const z=(0,c.useCallback)((()=>{l.ZP.disconnectSite().then((()=>{n(!1),a(!0)})).catch((e=>{n(!1),y(e),P&&P(e)}))}),[n,a,y,P]),O=(0,c.useCallback)(((e,t)=>{j(!0),fetch("https://public-api.wordpress.com/wpcom/v2/marketing/feedback-survey",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)}).then((e=>e.json())).then((e=>{if(!0!==e.success)throw new Error("Survey endpoint returned error code "+e.code);u.Z.tracks.recordEvent("jetpack_disconnect_survey_submit",t),E(!0),j(!1)})).catch((e=>{u.Z.tracks.recordEvent("jetpack_disconnect_survey_error",Object.assign({},{error:e.message},t)),E(!0),j(!1)}))}),[j,E]),M=(0,c.useCallback)((e=>{e&&e.preventDefault(),y(!1),n(!0),"plugins"!==x?z():N&&N(e)}),[y,n,N,x,z]),D=(0,c.useCallback)((e=>u.Z.tracks.recordEvent(e,L)),[L]),V=(0,c.useCallback)((()=>I.ID&&U),[I,U]),B=(0,c.useCallback)(((e,t,n)=>{if(n&&n.preventDefault(),!V())return void E(!0);const c={site_id:U,user_id:I.ID,survey_id:"jetpack-plugin-disconnect",survey_responses:{"why-cancel":{response:e,text:t||null}}},r=Object.assign({},L,{disconnect_reason:e});O(c,r)}),[O,E,V,U,I,L]),H=(0,c.useCallback)((e=>{e&&e.preventDefault(),S&&S(),A()}),[S,A]),J=(0,c.useCallback)((e=>{e&&e.preventDefault(),f(!0)}),[f]);return r().createElement(r().Fragment,null,T&&r().createElement(s.Modal,{title:"",contentLabel:Z,aria:{labelledby:"jp-connection__disconnect-dialog__heading"},onRequestClose:A,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"jp-connection__disconnect-dialog"+(i?" jp-connection__disconnect-dialog__success":"")},i?!i||v||k?v&&!k?r().createElement(g.Z,{isSubmittingFeedback:b,onFeedBackProvided:B,onExit:H}):k?r().createElement(h.Z,{onExit:H}):void 0:r().createElement(m.Z,{canProvideFeedback:V(),onProvideFeedback:J,onExit:H}):r().createElement(d.Z,{title:Z,connectedPlugins:w,disconnectStepComponent:R,isDisconnecting:t,closeModal:A,onDisconnect:M,disconnectError:o,context:x,disconnectingPlugin:F,trackModalClick:D})))};y.propTypes={apiRoot:a().string.isRequired,apiNonce:a().string.isRequired,title:a().string,onDisconnected:a().func,onError:a().func,context:a().string,connectedPlugins:a().oneOfType([a().array,a().object]),pluginScreenDisconnectCallback:a().func,disconnectStepComponent:a().element,connectedUser:a().object,connectedSiteId:a().number,isOpen:a().bool,onClose:a().func},y.defaultProps={title:__("Are you sure you want to disconnect?","jetpack-my-jetpack"),context:"jetpack-dashboard",connectedUser:{}};const v=y},5995:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(9307),s=n(5736),l=n(5609),u=n(1133),p=n(2042);const __=s.__,d=e=>{const{onExit:t,canProvideFeedback:n,onProvideFeedback:c}=e;return r().createElement("div",{className:"jp-connection__disconnect-dialog__content"},r().createElement(u.Z,{icon:"unlink",imageUrl:p}),r().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy jp-connection__disconnect-dialog__step-copy--narrow"},r().createElement("h1",null,(0,o.createInterpolateElement)(__("Jetpack has been <br/>successfully disconnected.","jetpack-my-jetpack"),{br:r().createElement("br",null)})),n&&r().createElement(r().Fragment,null,r().createElement("p",null,__("We’re sorry to see you go. Here at Jetpack, we’re always striving to provide the best experience for our customers. Please take our short survey (2 minutes, promise).","jetpack-my-jetpack")),r().createElement("p",null,r().createElement(l.Button,{variant:"primary",onClick:c,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Help us improve","jetpack-my-jetpack"))),r().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:t},__("No thank you","jetpack-my-jetpack"))),!n&&r().createElement(r().Fragment,null,r().createElement("p",null,r().createElement(l.Button,{variant:"primary",onClick:t,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack-my-jetpack"))))))};d.propTypes={onExit:a().func,onProvideFeedback:a().func,canProvideFeedback:a().bool};const m=d},9015:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var c=n(9196),r=n.n(c),i=n(9307),a=n(5736),o=n(6324),s=n(5609),l=n(5162),u=n.n(l),p=n(7879);const __=a.__,d=e=>{const{title:t,isDisconnecting:n,onDisconnect:a,disconnectError:l,disconnectStepComponent:u,connectedPlugins:d,disconnectingPlugin:m,closeModal:g,context:h,trackModalClick:y}=e,v=(0,c.useCallback)((()=>y("jetpack_disconnect_dialog_click_learn_about")),[y]),f=(0,c.useCallback)((()=>y("jetpack_disconnect_dialog_click_support")),[y]),k=(0,c.useCallback)((()=>{y("jetpack_disconnect_dialog_click_stay_connected"),g()}),[y,g]),E=(0,c.useCallback)((e=>{y("jetpack_disconnect_dialog_click_disconnect"),a(e)}),[y,a]);return r().createElement(r().Fragment,null,r().createElement("div",{className:"jp-connection__disconnect-dialog__content"},r().createElement("h1",{id:"jp-connection__disconnect-dialog__heading"},t),r().createElement(p.Z,{connectedPlugins:d,disconnectingPlugin:m}),u,(()=>{if(!(d&&Object.keys(d).filter((e=>e!==m)).length)&&!u)return r().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},r().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is currently powering multiple products on your site.","jetpack-my-jetpack"),r().createElement("br",null),__("Once you disconnect Jetpack, these will no longer work.","jetpack-my-jetpack")))})()),r().createElement("div",{className:"jp-connection__disconnect-dialog__actions"},r().createElement("div",{className:"jp-row"},r().createElement("div",{className:"lg-col-span-7 md-col-span-8 sm-col-span-4"},r().createElement("p",null,(0,i.createInterpolateElement)(__("<strong>Need help?</strong> Learn more about the <jpConnectionInfoLink>Jetpack connection</jpConnectionInfoLink> or <jpSupportLink>contact Jetpack support</jpSupportLink>.","jetpack-my-jetpack"),{strong:r().createElement("strong",null),jpConnectionInfoLink:r().createElement("a",{href:(0,o.Z)("why-the-wordpress-com-connection-is-important-for-jetpack"),rel:"noopener noreferrer",target:"_blank",className:"jp-connection__disconnect-dialog__link",onClick:v}),jpSupportLink:r().createElement("a",{href:(0,o.Z)("jetpack-support"),rel:"noopener noreferrer",target:"_blank",className:"jp-connection__disconnect-dialog__link",onClick:f})}))),r().createElement("div",{className:"jp-connection__disconnect-dialog__button-wrap lg-col-span-5 md-col-span-8 sm-col-span-4"},r().createElement(s.Button,{variant:"primary",disabled:n,onClick:k,className:"jp-connection__disconnect-dialog__btn-dismiss"},"plugins"===h?__("Cancel","jetpack-my-jetpack"):__("Stay connected","jetpack-my-jetpack",0)),(()=>{let e=__("Disconnect","jetpack-my-jetpack");return n?e=__("Disconnecting…","jetpack-my-jetpack"):"plugins"===h&&(e=__("Deactivate","jetpack-my-jetpack")),r().createElement(s.Button,{variant:"primary",disabled:n,onClick:E,className:"jp-connection__disconnect-dialog__btn-disconnect"},e)})())),l&&r().createElement("p",{className:"jp-connection__disconnect-dialog__error"},l)))};d.propTypes={title:u().string,isDisconnecting:u().bool,onDisconnect:u().func,disconnectError:u().bool,disconnectStepComponent:u().elementType,connectedPlugins:u().array,disconnectingPlugin:u().string,closeModal:u().func,context:u().string,trackModalClick:u().func};const m=d},1702:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5736),s=(n(9823),n(6336));const __=o.__,l=e=>{const{onExit:t,onFeedBackProvided:n,isSubmittingFeedback:c}=e;return r().createElement("div",{className:"jp-connection__disconnect-dialog__content"},r().createElement("h1",null,__("Before you go, help us improve Jetpack","jetpack-my-jetpack")),r().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Let us know what didn‘t work for you","jetpack-my-jetpack")),r().createElement(s.Z,{onSubmit:n,isSubmittingFeedback:c}),r().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:t},__("Skip for now","jetpack-my-jetpack")))};l.PropTypes={onExit:a().func,onFeedBackProvided:a().func,isSubmittingFeedback:a().bool};const u=l},1166:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(1133),s=n(5736),l=n(5609),u=n(9307),p=n(724);const __=s.__,d=e=>{const{onExit:t}=e;return r().createElement("div",{className:"jp-connection__disconnect-dialog__content"},r().createElement(o.Z,{format:"vertical",imageUrl:p}),r().createElement("div",{className:"jp-connection__disconnect-dialog__copy"},r().createElement("h1",null,__("Thank you!","jetpack-my-jetpack")),r().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},(0,u.createInterpolateElement)(__("Your answer has been submitted. <br/>Thanks for your input on how we can improve Jetpack.","jetpack-my-jetpack"),{br:r().createElement("br",null)})),r().createElement(l.Button,{variant:"primary",onClick:t,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack-my-jetpack"))))};d.PropTypes={onExit:a().func,assetBaseUrl:a().string};const m=d},6336:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5609),s=n(5736),l=n(4372);const __=s.__,u=e=>{const{onSubmit:t,isSubmittingFeedback:n}=e,[i,a]=(0,c.useState)(),[s,u]=(0,c.useState)(),p=[{id:"troubleshooting",answerText:__("Troubleshooting - I'll be reconnecting afterwards.","jetpack-my-jetpack")},{id:"not-working",answerText:__("I can't get it to work.","jetpack-my-jetpack")},{id:"slowed-down-site",answerText:__("It slowed down my site.","jetpack-my-jetpack")},{id:"buggy",answerText:__("It's buggy.","jetpack-my-jetpack")},{id:"what-does-it-do",answerText:__("I don't know what it does.","jetpack-my-jetpack")}],d="another-reason",m=(0,c.useCallback)((()=>{t(i,i===d?s:"")}),[t,d,s,i]),g=(0,c.useCallback)((e=>{const t=e.target.value;e.stopPropagation(),u(t)}),[u]),h=e=>e===i?"jp-connect__disconnect-survey-card--selected":"",y=(0,c.useCallback)(((e,t)=>{switch(t.key){case"Enter":case"Space":case"Spacebar":case" ":a(e)}}),[a]);return r().createElement(r().Fragment,null,r().createElement("div",{className:"jp-connection__disconnect-dialog__survey"},p.map((e=>r().createElement(l.Z,{id:e.id,onClick:a,onKeyDown:y,className:"card jp-connect__disconnect-survey-card "+h(e.id)},r().createElement("p",{className:"jp-connect__disconnect-survey-card__answer"},e.answerText)))),r().createElement(l.Z,{id:d,onClick:a,onKeyDown:y,className:"card jp-connect__disconnect-survey-card "+h(d)},r().createElement("p",{className:"jp-connect__disconnect-survey-card__answer"},__("Other:","jetpack-my-jetpack")," ",r().createElement("input",{placeholder:__("share your experience","jetpack-my-jetpack"),className:"jp-connect__disconnect-survey-card__input",type:"text",value:s,onChange:g,maxLength:1e3})))),r().createElement("p",null,r().createElement(o.Button,{disabled:!i||n,variant:"primary",onClick:m,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},n?__("Submitting…","jetpack-my-jetpack"):__("Submit Feedback","jetpack-my-jetpack",0))))};u.PropTypes={onSubmit:a().func,isSubmittingFeedback:a().bool};const p=u},4372:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9196),r=n.n(c);n(9823);const i=e=>{const{id:t,onClick:n,onKeyDown:i,children:a,className:o}=e,s=(0,c.useCallback)((()=>{n(t)}),[t,n]),l=(0,c.useCallback)((e=>{i(t,e)}),[t,i]);return r().createElement("div",{tabIndex:"0",role:"button",onClick:s,onKeyDown:l,className:"card jp-connect__disconnect-survey-card "+o},a)}},1294:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var c,r=n(9196),i=n(9818),a=n(4743),o=n(428);const s=null!==(c=window)&&void 0!==c&&c.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{},l=function(){let{registrationNonce:e=s.registrationNonce,apiRoot:t=s.apiRoot,apiNonce:n=s.apiNonce,redirectUri:c,autoTrigger:l,from:u,skipUserConnection:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{registerSite:d,connectUser:m,refreshConnectedPlugins:g}=(0,i.useDispatch)(o.t),h=(0,i.useSelect)((e=>e(o.t).getRegistrationError())),{siteIsRegistering:y,userIsConnecting:v,userConnectionData:f,connectedPlugins:k,isRegistered:E,isUserConnected:b,hasConnectedOwner:j}=(0,i.useSelect)((e=>({siteIsRegistering:e(o.t).getSiteIsRegistering(),userIsConnecting:e(o.t).getUserIsConnecting(),userConnectionData:e(o.t).getUserConnectionData(),connectedPlugins:e(o.t).getConnectedPlugins(),...e(o.t).getConnectionStatus()}))),_=()=>{p?c&&(window.location=c):m({from:u,redirectUri:c})},C=t=>{t&&t.preventDefault(),E?_():d({registrationNonce:e,redirectUri:c}).then((()=>{_()}))};return(0,r.useEffect)((()=>{a.ZP.setApiRoot(t),a.ZP.setApiNonce(n)}),[t,n]),(0,r.useEffect)((()=>{!l||y||v||C()}),[]),{handleRegisterSite:C,handleConnectUser:_,refreshConnectedPlugins:g,isRegistered:E,isUserConnected:b,siteIsRegistering:y,userIsConnecting:v,registrationError:h,userConnectionData:f,hasConnectedOwner:j,connectedPlugins:k}}},7523:(e,t,n)=>{"use strict";n.d(t,{LI:()=>i,N4:()=>o,T1:()=>l,TS:()=>u,ZP:()=>E,i6:()=>r,qV:()=>s,r7:()=>a,wQ:()=>d});var c=n(4743);const r="SET_CONNECTION_STATUS",i="SET_CONNECTION_STATUS_IS_FETCHING",a="SET_SITE_IS_REGISTERING",o="SET_USER_IS_CONNECTING",s="SET_REGISTRATION_ERROR",l="CLEAR_REGISTRATION_ERROR",u="SET_AUTHORIZATION_URL",p="CONNECT_USER",d="SET_CONNECTED_PLUGINS",m=e=>({type:r,connectionStatus:e}),g=e=>({type:a,isRegistering:e}),h=e=>({type:o,isConnecting:e}),y=e=>({type:s,registrationError:e}),v=()=>({type:l}),f=e=>({type:u,authorizationUrl:e}),k=e=>({type:d,connectedPlugins:e});const E={setConnectionStatus:m,setConnectionStatusIsFetching:e=>({type:i,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:g,setUserIsConnecting:h,setRegistrationError:y,clearRegistrationError:v,setAuthorizationUrl:f,registerSite:function*(e){let{registrationNonce:t,redirectUri:n}=e;yield v(),yield g(!0);try{const e=yield{type:"REGISTER_SITE",registrationNonce:t,redirectUri:n};return yield m({isRegistered:!0}),yield f(e.authorizeUrl),yield g(!1),Promise.resolve(e)}catch(e){return yield y(e),yield g(!1),Promise.reject(e)}},connectUser:function*(){let{from:e,redirectFunc:t,redirectUri:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yield h(!0),yield{type:p,from:e,redirectFunc:t,redirectUri:n}},setConnectedPlugins:k,refreshConnectedPlugins:()=>async e=>{let{dispatch:t}=e;return await new Promise((e=>c.ZP.fetchConnectedPlugins().then((n=>{t(k(n)),e(n)}))))}}},1432:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var c=n(4743),r=n(9818),i=n(428);const a={FETCH_AUTHORIZATION_URL:e=>{let{redirectUri:t}=e;return c.ZP.fetchAuthorizationUrl(t)},REGISTER_SITE:e=>{let{registrationNonce:t,redirectUri:n}=e;return c.ZP.registerSite(t,n)},CONNECT_USER:(0,r.createRegistryControl)((e=>{let{resolveSelect:t}=e;return function(){let{from:e,redirectFunc:n,redirectUri:c}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((r,a)=>{t(i.t).getAuthorizationUrl(c).then((t=>{const c=n||(e=>window.location.assign(e)),i=new URL(t);e&&i.searchParams.set("from",encodeURIComponent(e));const a=i.toString();c(a),r(a)})).catch((e=>{a(e)}))}))}}))}},1479:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9818),r=n(7523);const i=(0,c.combineReducers)({connectionStatus:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===r.i6?{...e,...t.connectionStatus}:e},connectionStatusIsFetching:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===r.LI?t.isFetching:e},siteIsRegistering:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===r.r7?t.isRegistering:e},userIsConnecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===r.N4?t.isConnecting:e},registrationError:(e,t)=>{switch(t.type){case r.T1:return!1;case r.qV:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===r.TS?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===r.wQ?t.connectedPlugins:e}})},7728:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var c=n(9818),r=n(7523),i=n(428);const a={...{getAuthorizationUrl:{isFulfilled:function(e){const t=Boolean(e.authorizationUrl);for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];const o=(0,c.select)(i.t).hasFinishedResolution("getAuthorizationUrl",r);return t&&!o&&(0,c.dispatch)(i.t).finishResolution("getAuthorizationUrl",r),t},*fulfill(e){const t=yield r.ZP.fetchAuthorizationUrl(e);yield r.ZP.setAuthorizationUrl(t.authorizeUrl)}}}}},2725:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const c={getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1,getUserConnectionData:e=>e.userConnectionData||!1,getConnectedPlugins:e=>e.connectedPlugins||[]}},3535:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var c=n(8294),r=n.n(c),i=n(9818);class a{static mayBeInit(e,t){null===a.store&&(a.store=(0,i.createReduxStore)(e,t),(0,i.register)(a.store))}}r()(a,"store",null);const o=a},428:(e,t,n)=>{"use strict";n.d(t,{t:()=>l});var c=n(1479),r=n(7523),i=n(2725),a=n(7728),o=n(1432),s=n(3535);const l="jetpack-connection",u=window.JP_CONNECTION_INITIAL_STATE;u||console.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),s.Z.mayBeInit(l,{__experimentalUseThunks:!0,reducer:c.Z,actions:r.ZP,selectors:i.Z,resolvers:a.Z,controls:o.Z,initialState:u||{}})},8728:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var c=n(5609),r=n(9307),i=n(1202),a=n(5033),o=n(5736),s=n(5844),l=n.n(s),u=n(9196),p=n.n(u),d=n(1074),m=n(797);const __=o.__,g=e=>{const{activateLicense:t,isActivating:n,license:o,licenseError:s,onLicenseChange:l}=e,u=null!=s;return p().createElement("div",{className:"jp-license-activation-screen-controls"},p().createElement("div",{className:"jp-license-activation-screen-controls--content"},p().createElement(i.Z,{showText:!1,height:48}),p().createElement("h1",null,__("Add a license key","jetpack-my-jetpack")),p().createElement("p",null,(0,r.createInterpolateElement)(__("<strong>Check your email</strong> for your license key. You should have received it after making your purchase.","jetpack-my-jetpack"),{strong:p().createElement("strong",null)})),p().createElement(c.TextControl,{className:u?"jp-license-activation-screen-controls--license-field-with-error":"jp-license-activation-screen-controls--license-field",label:__("License key","jetpack-my-jetpack"),value:o,onChange:l,disabled:n}),u&&p().createElement("div",{className:"jp-license-activation-screen-controls--license-field-error"},p().createElement(d.Z,{icon:m.Z}),p().createElement("span",null,s))),p().createElement("div",null,p().createElement(c.Button,{className:"jp-license-activation-screen-controls--button",onClick:t},n?p().createElement(a.Z,null):__("Activate","jetpack-my-jetpack"))))};g.propTypes={activateLicense:l().func.isRequired,isActivating:l().bool.isRequired,license:l().string.isRequired,licenseError:l().string,onLicenseChange:l().func.isRequired,siteUrl:l().string.isRequired};const h=g},8781:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var c=n(5736),r=n(9307),i=n(6324),a=n(5844),o=n.n(a),s=n(9196),l=n.n(s);const __=c.__,u=e=>{const{imageUrl:t,showSupportLink:n=!1}=e;return l().createElement("div",{className:"jp-license-activation-screen-illustration"},l().createElement("div",{className:"jp-license-activation-screen-illustration--wrapper"},l().createElement("img",{className:"jp-license-activation-screen-illustration--img",src:t,alt:""})),n&&l().createElement("p",{className:"jp-license-activation-screen-illustration--support-link"},(0,r.createInterpolateElement)(__("Do you need help? <a>Contact us.</a>","jetpack-my-jetpack"),{a:l().createElement("a",{href:(0,i.Z)("jetpack-support-license-activation")})})))};u.propTypes={imageUrl:o().string.isRequired,showSupportLink:o().bool};const p=u},7554:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var c=n(1202),r=n(5844),i=n.n(r),a=n(9196),o=n.n(a),s=n(1775),l=n(4172),u=n(3157);const p=e=>{const{productId:t,siteRawUrl:n,siteAdminUrl:r,currentRecommendationsStep:i}=e;return o().createElement("div",{className:"jp-license-activation-screen-success-info"},o().createElement("div",{className:"jp-license-activation-screen-success-info--content"},o().createElement(c.Z,{showText:!1,height:48})),o().createElement(s.Z,{siteRawUrl:n,productId:t}),o().createElement("div",{className:"jp-license-activation-screen-success-info--buttons"},o().createElement(u.c,{currentRecommendationsStep:i,siteAdminUrl:r,siteRawUrl:n}),o().createElement(l.o,{siteRawUrl:n,productId:t})))};p.propTypes={siteRawUrl:i().string,productId:i().number,siteAdminUrl:i().string,currentRecommendationsStep:i().string};const d=p},3157:(e,t,n)=>{"use strict";n.d(t,{c:()=>u});var c=n(5736),r=n(5609),i=n(6324),a=n(5844),o=n.n(a),s=n(9196),l=n.n(s);const __=c.__,u=e=>{const{currentRecommendationsStep:t,siteAdminUrl:n,siteRawUrl:c}=e;return"not-started"===t?l().createElement(r.Button,{className:"jp-license-activation-screen-success-info--button",href:n+"admin.php?page=jetpack#/recommendations"},__("Configure my site","jetpack-my-jetpack")):l().createElement(r.Button,{className:"jp-license-activation-screen-success-info--button",href:(0,i.Z)("license-activation-view-my-plans",{site:c})},__("View my plans","jetpack-my-jetpack"))};u.propTypes={siteAdminUrl:o().string.isRequired,currentRecommendationsStep:o().string,siteRawUrl:o().string.isRequired}},1775:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var c=n(5736),r=n(9307),i=n(5844),a=n.n(i),o=n(9196),s=n.n(o),l=n(8275);const __=c.__,u=e=>{const{productId:t,siteRawUrl:n}=e,c=`https://cloud.jetpack.com/landing/${n}`,i=(0,l.F)(t),a={jetpack_anti_spam:{title:__("Jetpack Anti-spam is active!","jetpack-my-jetpack"),text:__("We'll take care of everything from here. Now you can enjoy a spam-free site!","jetpack-my-jetpack")},jetpack_backup:{title:__("Jetpack Backup is active!","jetpack-my-jetpack"),text:(0,r.createInterpolateElement)(__("You can see your backups and restore your site on <a>cloud.jetpack.com</a>. If you ever lose access to your site, you can restore it there.","jetpack-my-jetpack"),{a:s().createElement("a",{href:c})})},jetpack_complete:{title:__("Jetpack Complete is active!","jetpack-my-jetpack"),text:(0,r.createInterpolateElement)(__("You can see your backups, security scans, and restore your site on <a>cloud.jetpack.com</a>. If you ever lose access to your site, you can restore it there.","jetpack-my-jetpack"),{a:s().createElement("a",{href:c})})},jetpack_scan:{title:__("Jetpack Scan is active!","jetpack-my-jetpack"),text:(0,r.createInterpolateElement)(__("You can see your security scans on <a>cloud.jetpack.com</a>.","jetpack-my-jetpack"),{a:s().createElement("a",{href:c})})},jetpack_search:{title:__("Jetpack Search is active!","jetpack-my-jetpack"),text:__("Next, we'll help you customize the Search experience for your visitors.","jetpack-my-jetpack")},jetpack_security:{title:__("Jetpack Security is active!","jetpack-my-jetpack"),text:(0,r.createInterpolateElement)(__("You can see your backups, security scans, and restore your site on <a>cloud.jetpack.com</a>. If you ever lose access to your site, you can restore it there.","jetpack-my-jetpack"),{a:s().createElement("a",{href:c})})},jetpack_videopress:{title:__("Jetpack VideoPress is active!","jetpack-my-jetpack"),text:__("Experience high-quality, ad-free video built specifically for WordPress.","jetpack-my-jetpack")},default:{title:__("Your product is active!","jetpack-my-jetpack"),text:__("You're all set!","jetpack-my-jetpack")}};return s().createElement("div",{className:"jp-license-activation-screen-success-info--product-details"},s().createElement("h1",null,a[i].title," ",String.fromCodePoint(127881)),s().createElement("p",null,a[i].text))};u.propTypes={dashboardUrl:a().string,productId:a().number};const p=u},4172:(e,t,n)=>{"use strict";n.d(t,{o:()=>p});var c=n(5736),r=n(5609),i=n(6324),a=n(5844),o=n.n(a),s=n(9196),l=n.n(s),u=n(8275);const __=c.__,p=e=>{const{productId:t,siteRawUrl:n}=e,c={jetpack_backup:{text:__("View latest backup","jetpack-my-jetpack"),redirectSource:"jetpack-license-activation-success-backup"},jetpack_complete:{text:__("View latest backup","jetpack-my-jetpack"),redirectSource:"jetpack-license-activation-success-backup"},jetpack_scan:{text:__("View scan results","jetpack-my-jetpack"),redirectSource:"jetpack-license-activation-success-scan"},jetpack_search:{text:__("Configure search","jetpack-my-jetpack"),redirectSource:"jetpack-license-activation-success-search"},jetpack_security:{text:__("View latest backup","jetpack-my-jetpack"),redirectSource:"jetpack-license-activation-success-backup"},default:null}[(0,u.F)(t)];return l().createElement(l().Fragment,null,c&&l().createElement(r.ExternalLink,{className:"jp-license-activation-screen-success-info--external-link",href:(0,i.Z)(c.redirectSource,{site:n})},c.text))};p.propTypes={siteRawUrl:o().string,productId:o().number}},468:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var c=n(9196),r=n.n(c),i=n(5844),a=n.n(i),o=n(4743),s=n(5736),l=n(8728),u=n(8781),p=n(7554),d=n(8702),m=n(1160);const __=s.__,g=e=>{const{onActivationSuccess:t=(()=>null),siteRawUrl:n,startingLicense:i,siteAdminUrl:a,currentRecommendationsStep:s}=e,[g,h]=(0,c.useState)(i??""),[y,v]=(0,c.useState)(null),[f,k]=(0,c.useState)(!1),[E,b]=(0,c.useState)(null),j=(0,c.useCallback)((()=>f?Promise.resolve():g.length<1?(v(__("This is not a valid license key. Please try again.","jetpack-my-jetpack")),Promise.resolve()):(v(null),k(!0),o.ZP.attachLicenses([g]).then((e=>{const n=(e=>{var t,n;let c=e;for(;Array.isArray(c)&&c.length>0;)c=c[0];if(null!==(t=c)&&void 0!==t&&t.activatedProductId)return c.activatedProductId;if(null!==(n=c)&&void 0!==n&&n.errors)for(const e in c.errors)if(c.errors[e].length>0)throw new Error(c.errors[e][0]);throw new Error(__("An unknown error occurred during license activation. Please try again.","jetpack-my-jetpack"))})(e);b(n),t(n)})).catch((e=>{v(e.message)})).finally((()=>{k(!1)})))),[f,g,t]);return null!==E?r().createElement("div",{className:"jp-license-activation-screen"},r().createElement(p.Z,{siteRawUrl:n,productId:E,siteAdminUrl:a,currentRecommendationsStep:s}),r().createElement(u.Z,{imageUrl:m,showSupportLink:!1})):r().createElement("div",{className:"jp-license-activation-screen"},r().createElement(l.Z,{license:g,onLicenseChange:h,activateLicense:j,siteUrl:n,licenseError:y,isActivating:f}),r().createElement(u.Z,{imageUrl:d,showSupportLink:!0}))};g.propTypes={onActivationSuccess:a().func,siteRawUrl:a().string.isRequired,startingLicense:a().string,siteAdminUrl:a().string.isRequired,currentRecommendationsStep:a().string};const h=g},8275:(e,t,n)=>{"use strict";n.d(t,{F:()=>r});const c={jetpack_anti_spam:[2110,2111],jetpack_backup:[2100,2101,2102,2103,2112,2113,2114,2115],jetpack_complete:[2014,2015],jetpack_scan:[2106,2107,2108,2109],jetpack_search:[2104,2105],jetpack_security:[2010,2011,2012,2013,2016,2017,2019,2020],jetpack_videopress:[2116,2117]};function r(e){return Object.keys(c).find((t=>c[t].includes(e)))||"default"}},3281:(e,t,n)=>{"use strict";n.d(t,{I:()=>c.Z});var c=n(468)},1899:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var c=n(9196),r=n.n(c),i=n(1163),a=n(8218),o=n(2939),s=n(3281),l=n(5626),u=n(4743),p=n(2199);function d(){var e,t,n,d;(0,c.useEffect)((()=>{var e;const{apiRoot:t,apiNonce:n}=(null===(e=window)||void 0===e?void 0:e.myJetpackRest)||{};u.ZP.setApiRoot(t),u.ZP.setApiNonce(n)}),[]);const{recordEvent:m}=(0,p.Z)(),g=(0,c.useCallback)((e=>{m("jetpack_myjetpack_license_activation_back_link_click"),document.referrer.includes(window.location.host)&&(e.preventDefault(),history.back())}),[m]);return r().createElement(i.Z,{showHeader:!1,showBackground:!1},r().createElement(a.Z,{horizontalSpacing:3,horizontalGap:3},r().createElement(o.Z,null,r().createElement(l.Z,{onClick:g})),r().createElement(o.Z,null,r().createElement(s.I,{siteRawUrl:null===(e=window)||void 0===e||null===(t=e.myJetpackInitialState)||void 0===t?void 0:t.siteSuffix,onActivationSuccess:void 0,siteAdminUrl:null===(n=window)||void 0===n||null===(d=n.myJetpackInitialState)||void 0===d?void 0:d.adminUrl,currentRecommendationsStep:null}))))}},3890:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var c=n(9196),r=n.n(c),i=n(554),a=n(1074),o=n(9517),s=n(5235),l=n.n(s),u=n(6234);const p=e=>{let{className:t}=e;return r().createElement(i.rU,{to:"/",className:l()(u.Z.link,t)},r().createElement(a.Z,{icon:o.Z,className:u.Z.icon}))}},5745:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(1020),s=n(2728),l=n(3703),u=n(3345);const p=e=>{let{admin:t,slug:n}=e;const{detail:i,status:a,activate:p,deactivate:d,isFetching:m}=(0,l.i)(n),{name:g,description:h,manageUrl:y}=i,v=(0,u.Z)("/connection"),f=(0,u.Z)(`add-${n}`),k=(0,c.useCallback)((()=>{window.location=y}),[y]),E=(0,o.VS)(n);return r().createElement(s.Z,{name:g,description:h,status:a,icon:r().createElement(E,{opacity:.4}),admin:t,isFetching:m,onDeactivate:d,slug:n,onActivate:p,onAdd:f,onFixConnection:v,onManage:k})};p.propTypes={admin:a().bool.isRequired,slug:a().string.isRequired};const d=p},17:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var c=n(9196),r=n.n(c),i=n(5736),a=n(9312),o=n(1163),s=n(8218),l=n(2939),u=n(6324),p=n(1074),d=n(5381),m=n(3890),g=n(1689),h=n(4997),y=n(184),v=n(5242),f=n(6790),k=n(8578);const __=i.__,E=()=>r().createElement(r().Fragment,null,r().createElement("div",{className:k.Z["account-description"]},__("You can use your existing account on any of these services:","jetpack-my-jetpack")),r().createElement("span",{className:k.Z["account-images"]},r().createElement("img",{src:h,className:k.Z.wordpress,alt:__("Wordpress Logo","jetpack-my-jetpack")}),r().createElement("img",{src:y,className:k.Z.google,alt:__("Google Logo","jetpack-my-jetpack")}),r().createElement("img",{src:v,className:k.Z.apple,alt:__("Apple Logo","jetpack-my-jetpack")}))),b=()=>{const{apiRoot:e,apiNonce:t}=(0,g.Z)();return r().createElement(o.Z,{showHeader:!1,showBackground:!1},r().createElement(s.Z,{horizontalSpacing:8,horizontalGap:0},r().createElement(l.Z,{className:k.Z["relative-col"]},r().createElement(m.Z,{className:k.Z["close-link"]})),r().createElement(l.Z,null,r().createElement(a.Z,{title:__("Unlock all the amazing features of Jetpack by connecting now","jetpack-my-jetpack"),buttonLabel:__("Connect your user account","jetpack-my-jetpack"),apiRoot:e,apiNonce:t,images:[f],footer:r().createElement(E,null),from:"my-jetpack",redirectUri:"admin.php?page=my-jetpack"},r().createElement("ul",null,r().createElement("li",null,__("Receive instant downtime alerts","jetpack-my-jetpack")),r().createElement("li",null,__("Automatically share your content on social media","jetpack-my-jetpack")),r().createElement("li",null,__("Let your subscribers know when you post","jetpack-my-jetpack")),r().createElement("li",null,__("Receive notifications about new likes and comments","jetpack-my-jetpack")),r().createElement("li",null,__("Let visitors share your content on social media","jetpack-my-jetpack")),r().createElement("li",null,__("And more!","jetpack-my-jetpack")," ",r().createElement("a",{href:(0,u.Z)("jetpack-features"),target:"_blank",className:k.Z["all-features"],rel:"noreferrer"},__("See all Jetpack features","jetpack-my-jetpack"),r().createElement(p.Z,{icon:d.Z}))))))))}},5784:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var c=n(9196),r=n.n(c),i=n(9159),a=n(9818),o=n(1689),s=n(3345),l=n(7493);function u(){const{apiRoot:e,apiNonce:t,redirectUrl:n,connectedPlugins:c}=(0,o.Z)(),u=(0,s.Z)("/connection"),p=(0,a.useSelect)((e=>e(l.t).getProductsThatRequiresUserConnection()));return r().createElement(i.Z,{apiRoot:e,apiNonce:t,redirectUri:n,onConnectUser:u,connectedPlugins:c,requiresUserConnection:p.length>0})}},5626:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var c=n(9196),r=n.n(c),i=n(554),a=n(1074),o=n(3259),s=n(5736),l=n(197);const __=s.__;function u(e){let{onClick:t}=e;return r().createElement(i.rU,{to:"/",className:l.Z.link,onClick:t},r().createElement(a.Z,{icon:o.Z,className:l.Z.icon}),__("Go back","jetpack-my-jetpack"))}u.defaultProps={onClick:()=>{}};const p=u},8966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>N});var c=n(2402),r=n.n(c),i=n(9196),a=n.n(i),o=n(5736),s=n(5609),l=n(797),u=n(496),p=n(1074),d=n(1163),m=n(3244),g=n(8218),h=n(2939),y=n(5106),v=n(8038),f=n(5784),k=n(6800),E=n(5943),b=n(2199),j=n(5031),_=n(1689),C=n(5371),w=n(1017);const __=o.__,Z=e=>{let{message:t,options:n,clean:c}=e;const i={error:l.Z,info:u.Z};return a().createElement(s.Notice,r()({isDismissible:!1},n,{onRemove:c,className:w.Z.notice}),(null==i?void 0:i[n.status])&&a().createElement(p.Z,{icon:i[n.status]}),a().createElement("div",{className:w.Z.message},t))};function N(){(0,C.Z)();const{message:e,options:t,clean:n}=(0,j.Z)(),{recordEvent:c}=(0,b.Z)();(0,i.useEffect)((()=>{c("jetpack_myjetpack_page_view")}),[c]);const{isSiteConnected:r}=(0,_.Z)();return r?a().createElement(d.Z,null,a().createElement(m.Z,null,a().createElement(g.Z,{horizontalSpacing:5,horizontalGap:e?3:6},a().createElement(h.Z,{sm:4,md:7,lg:6},a().createElement(y.ZP,{variant:"headline-small"},__("Manage your Jetpack products","jetpack-my-jetpack"))),e&&a().createElement(h.Z,null,a().createElement(Z,{message:e,options:t,clean:n})),a().createElement(h.Z,null,a().createElement(E.Z,null)))),a().createElement(v.Z,null,a().createElement(g.Z,{horizontalSpacing:8},a().createElement(h.Z,{sm:2,md:4,lg:6},a().createElement(k.Z,null)),a().createElement(h.Z,{sm:2,md:4,lg:6},a().createElement(f.Z,null))))):null}},6800:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var c=n(9196),r=n.n(c),i=n(5736),a=n(5106),o=n(526),s=n(2199),l=n(1750),u=n(8295),p=n(7258),d=n(6891),m=n(1689),g=n(3345);const __=i.__,_n=i._n;function h(e){let{purchase:t={}}=e;const{product_name:n,expiry_message:c}=t;return r().createElement(r().Fragment,null,r().createElement(a.Dx,null,n),r().createElement(a.ZP,{variant:"body",className:d.Z["expire-date"]},c))}function y(e){let{purchases:t}=e;return r().createElement(r().Fragment,null,r().createElement(a.H3,null,t.length<=1?__("Your plan","jetpack-my-jetpack"):__("Your plans","jetpack-my-jetpack")),0===t.length&&r().createElement(a.ZP,{variant:"body"},__("Want to power up your Jetpack?","jetpack-my-jetpack")))}function v(e){var t,n,i,a;let{purchases:l}=e;const{recordEvent:h}=(0,s.Z)(),{isUserConnected:y}=(0,m.Z)();let v=__("Purchase a plan","jetpack-my-jetpack");l.length>=1&&(v=_n("Manage your plan","Manage your plans",l.length,"jetpack-my-jetpack"));const f=(0,c.useCallback)((()=>{const e=l.length?"jetpack_myjetpack_plans_manage_click":"jetpack_myjetpack_plans_purchase_click";h(e)}),[l,h]),k=(0,g.Z)("/connection"),E=(0,c.useCallback)((()=>{h("jetpack_myjetpack_activate_license_click"),y||k()}),[k,y,h]);let b=__("Activate a license","jetpack-my-jetpack");return y||(b=__("Activate a license (requires a user connection)","jetpack-my-jetpack")),r().createElement("ul",null,r().createElement("li",{className:d.Z["actions-list-item"]},r().createElement(o.Z,{onClick:f,href:l.length?(0,u.Z)():(0,p.Z)(),weight:"regular",variant:"link",isExternalLink:!0},v)),(null===(t=window)||void 0===t||null===(n=t.myJetpackInitialState)||void 0===n?void 0:n.loadAddLicenseScreen)&&r().createElement("li",{className:d.Z["actions-list-item"]},r().createElement(o.Z,{onClick:E,href:y?`${null===(i=window)||void 0===i||null===(a=i.myJetpackInitialState)||void 0===a?void 0:a.adminUrl}admin.php?page=my-jetpack#/add-license`:void 0,variant:"link",weight:"regular"},b)))}function f(){const e=(0,l.Z)();return r().createElement("div",{className:d.Z.container},r().createElement(y,{purchases:e}),r().createElement("div",{className:d.Z.purchasesSection},e.map((e=>r().createElement(h,{key:`purchase-${e.product_name}`,purchase:e})))),r().createElement(v,{purchases:e}))}},2728:(e,t,n)=>{"use strict";n.d(t,{N:()=>y,Z:()=>E});var c=n(2402),r=n.n(c),i=n(9196),a=n.n(i),o=n(5162),s=n.n(o),l=n(5235),u=n.n(l),p=n(5736),d=n(5609),m=n(5106),g=n(9720),h=n(2199);const __=p.__,y={ACTIVE:"active",INACTIVE:"inactive",ERROR:"error",ABSENT:"plugin_absent",NEEDS_PURCHASE:"needs_purchase"},v={[y.ACTIVE]:__("Active","jetpack-my-jetpack"),[y.INACTIVE]:__("Inactive","jetpack-my-jetpack"),[y.NEEDS_PURCHASE]:__("Inactive","jetpack-my-jetpack"),[y.ERROR]:__("Error","jetpack-my-jetpack")},f=e=>{let{status:t,admin:n,name:c,onActivate:i,onManage:o,onFixConnection:s,isFetching:l,className:u,onAdd:m}=e;if(!n)return a().createElement("span",{className:g.Z["action-link-button"]}, +/* translators: placeholder is product name. */ +(0,p.sprintf)(__("Learn about %s","jetpack-my-jetpack"),c));const h={variant:l?void 0:"primary",disabled:l,className:u};switch(t){case y.ABSENT:return a().createElement("span",{className:g.Z["action-link-button"]}, +/* translators: placeholder is product name. */ +(0,p.sprintf)(__("Add %s","jetpack-my-jetpack"),c));case y.NEEDS_PURCHASE:return a().createElement(d.Button,r()({},h,{onClick:m}),__("Purchase","jetpack-my-jetpack"));case y.ACTIVE:return a().createElement(d.Button,r()({},h,{variant:"secondary",onClick:o}),__("Manage","jetpack-my-jetpack"));case y.ERROR:return a().createElement(d.Button,r()({},h,{onClick:s}),__("Fix connection","jetpack-my-jetpack"));case y.INACTIVE:return a().createElement(d.Button,r()({},h,{variant:"secondary",onClick:i}),__("Activate","jetpack-my-jetpack"));default:return null}},k=e=>{const{name:t,description:n,icon:c,status:o,onActivate:s,onAdd:l,onFixConnection:p,onManage:d,isFetching:k,slug:E}=e,b=o===y.ACTIVE,j=o===y.ERROR,_=o===y.INACTIVE,C=o===y.ABSENT,w=o===y.NEEDS_PURCHASE,Z=v[o],N=u()(g.Z.container,{[g.Z.plugin_absent]:C,[g.Z["is-purchase-required"]]:w,[g.Z["is-link"]]:C,[g.Z["has-error"]]:j}),S=u()(g.Z.status,{[g.Z.active]:b,[g.Z.inactive]:_||w,[g.Z.error]:j,[g.Z["is-fetching"]]:k}),{recordEvent:P}=(0,h.Z)(),R=(0,i.useCallback)((()=>{P("jetpack_myjetpack_product_card_activate_click",{product:E}),s()}),[E,s,P]),x=(0,i.useCallback)((e=>{null!=e&&e.preventDefault&&e.preventDefault(),P("jetpack_myjetpack_product_card_add_click",{product:E}),l()}),[E,l,P]),I=(0,i.useCallback)((()=>{P("jetpack_myjetpack_product_card_manage_click",{product:E}),d()}),[E,d,P]),U=(0,i.useCallback)((()=>{P("jetpack_myjetpack_product_card_fixconnection_click",{product:E}),p()}),[E,p,P]),T=C?e=>{let{children:t,...n}=e;return a().createElement("a",r()({},n,{href:"#",onClick:x}),t)}:e=>{let{children:t,...n}=e;return a().createElement("div",n,t)};return a().createElement(T,{className:N},a().createElement("div",{className:g.Z.name},a().createElement(m.ZP,{variant:"title-medium"},t),c),a().createElement(m.ZP,{variant:"body-small",className:g.Z.description},n),a().createElement("div",{className:g.Z.actions},a().createElement(f,r()({},e,{onActivate:R,onFixConnection:U,onManage:I,className:g.Z.button})),!C&&a().createElement(m.ZP,{variant:"label",className:S},Z)))};k.propTypes={name:s().string.isRequired,description:s().string.isRequired,icon:s().element,admin:s().bool.isRequired,isFetching:s().bool,onManage:s().func,onFixConnection:s().func,onActivate:s().func,onAdd:s().func,slug:s().string.isRequired,status:s().oneOf([y.ACTIVE,y.INACTIVE,y.ERROR,y.ABSENT,y.NEEDS_PURCHASE]).isRequired},k.defaultProps={icon:null,isFetching:!1,onManage:()=>{},onFixConnection:()=>{},onActivate:()=>{},onAdd:()=>{}};const E=k},1640:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5745),s=n(3345);const l=e=>{let{admin:t}=e;return r().createElement(o.Z,{admin:t,slug:"anti-spam",onAdd:(0,s.Z)("/add-anti-spam")})};l.propTypes={admin:a().bool.isRequired};const u=l},401:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5745);const s=e=>{let{admin:t}=e;return r().createElement(o.Z,{admin:t,slug:"backup"})};s.propTypes={admin:a().bool.isRequired};const l=s},4074:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5745);const s=e=>{let{admin:t}=e;return r().createElement(o.Z,{admin:t,slug:"boost"})};s.propTypes={admin:a().bool.isRequired};const l=s},5996:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5745);const s=e=>{let{admin:t}=e;return r().createElement(o.Z,{admin:t,slug:"crm"})};s.propTypes={admin:a().bool.isRequired};const l=s},717:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5745);const s=e=>{let{admin:t}=e;return r().createElement(o.Z,{admin:t,slug:"extras"})};s.propTypes={admin:a().bool.isRequired};const l=s},5943:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var c=n(9196),r=n.n(c),i=n(8218),a=n(2939),o=n(401),s=n(6407),l=n(1640),u=n(4074),p=n(687),d=n(9894),m=n(5996),g=n(717),h=n(419);const y=()=>r().createElement(i.Z,{fluid:!0,horizontalSpacing:0,horizontalGap:3},r().createElement(a.Z,{sm:4,md:4,lg:3},r().createElement(o.Z,{admin:!0})),r().createElement(a.Z,{sm:4,md:4,lg:3},r().createElement(s.Z,{admin:!0})),r().createElement(a.Z,{sm:4,md:4,lg:3},r().createElement(l.Z,{admin:!0})),r().createElement(a.Z,{sm:4,md:4,lg:3},r().createElement(u.Z,{admin:!0})),r().createElement(a.Z,{sm:4,md:4,lg:3},r().createElement(p.Z,{admin:!0})),r().createElement(a.Z,{sm:4,md:4,lg:3},r().createElement(d.Z,{admin:!0})),r().createElement(a.Z,{sm:4,md:4,lg:3},r().createElement(m.Z,{admin:!0})),r().createElement(a.Z,{sm:4,md:4,lg:3},r().createElement(h.Z,{admin:!0})),r().createElement(a.Z,{sm:4,md:4,lg:3},r().createElement(g.Z,{admin:!0})))},6407:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5745);const s=e=>{let{admin:t}=e;return r().createElement(o.Z,{admin:t,slug:"scan"})};s.propTypes={admin:a().bool.isRequired};const l=s},687:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5745);const s=e=>{let{admin:t}=e;return r().createElement(o.Z,{admin:t,slug:"search"})};s.propTypes={admin:a().bool.isRequired};const l=s},419:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5745);const s=e=>{let{admin:t}=e;return r().createElement(o.Z,{admin:t,slug:"social"})};s.propTypes={admin:a().bool.isRequired};const l=s},9894:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5745);const s=e=>{let{admin:t}=e;return r().createElement(o.Z,{admin:t,slug:"videopress"})};s.propTypes={admin:a().bool.isRequired};const l=s},2667:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var c=n(9196),r=n.n(c),i=n(5162),a=n.n(i),o=n(5609);const s=e=>{let{children:t,className:n,href:c,isLoading:i,onClick:a,isPrimary:s}=e;return r().createElement(o.Button,{onClick:a,className:n,href:c,variant:s?"primary":"secondary",disabled:i},i?r().createElement(o.Spinner,null):t)};s.propTypes={className:a().string,isLoading:a().bool,isPrimary:a().bool},s.defaultProps={isLoading:!1,isPrimary:!0};const l=s},968:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var c=n(9196),r=n.n(c),i=n(5235),a=n.n(i),o=n(1074),s=n(1908),l=n(9201),u=n(8899),p=n(5736),d=n(5106),m=n(1020),g=n(8429),h=n(8278),y=n(1689),v=n(2667),f=n(3703);const __=p.__;function k(e){let{value:t,currency:n,isOld:c}=e;if(!t||!n)return null;const i=(0,u.LR)(t,n),o=a()(g.Z.price,{[g.Z["is-old"]]:c});return r().createElement(d.ZP,{className:o,variant:"headline-medium",component:"p"},r().createElement(d.ZP,{component:"sup",variant:"title-medium"},i.symbol),i.integer,r().createElement(d.ZP,{component:"sup",variant:"title-medium"},i.fraction))}const E=e=>{let{slug:t,onClick:n,trackButtonClick:i,className:u,supportingInfo:E}=e;const{detail:b,isFetching:j}=(0,f.i)(t),{title:_,longDescription:C,features:w,pricingForUi:Z,isBundle:N,supportedProducts:S,hasRequiredPlan:P}=b,{isFree:R,fullPricePerMonth:x,currencyCode:I,discountPricePerMonth:U,wpcomProductSlug:T}=Z,{isUserConnected:A}=(0,y.Z)(),F=!R&&!P,L=F&&T?(0,h.Z)(T,A):null,z=N?S.join("_plus_").split("_").map(((e,t)=>{if("plus"===e)return r().createElement(o.Z,{className:g.Z["plus-icon"],key:`icon-plugs${t}`,icon:s.Z,size:14});const n=(0,m.VS)(e);return r().createElement(n,{key:e,size:24})})):null,O=(0,c.useCallback)((()=>{i(),n&&n()}),[n,i]);function M(e){let{slug:t}=e;const n=(0,m.VS)(t);return n?r().createElement("div",{className:g.Z["product-icon"]},r().createElement(n,null)):()=>null}return r().createElement("div",{className:a()(g.Z.card,u,{[g.Z["is-bundle-card"]]:N})},N&&r().createElement("div",{className:g.Z["card-header"]},r().createElement(m.r7,{className:g.Z["product-bundle-icon"],size:16}),r().createElement(d.ZP,{variant:"label"},__("Popular upgrade","jetpack-my-jetpack"))),r().createElement("div",{className:g.Z.container},N&&r().createElement("div",{className:g.Z["product-bundle-icons"]},z),r().createElement(M,{slug:t}),r().createElement(d.H3,null,_),r().createElement(d.ZP,{mb:3},C),r().createElement("ul",{className:g.Z.features},w.map(((e,t)=>r().createElement(d.ZP,{component:"li",key:`feature-${t}`,variant:"body"},r().createElement(o.Z,{icon:l.Z,size:24}),e)))),F&&r().createElement(r().Fragment,null,r().createElement("div",{className:g.Z["price-container"]},r().createElement(k,{value:x,currency:I,isOld:!0}),r().createElement(k,{value:U,currency:I,isOld:!1})),r().createElement(d.ZP,{className:g.Z["price-description"]},__("/month, paid yearly","jetpack-my-jetpack"))),R&&r().createElement(d.H3,null,__("Free","jetpack-my-jetpack")),(!N||N&&!P)&&r().createElement(d.ZP,{component:v.Z,onClick:O,isLoading:j,isPrimary:!N,href:n?void 0:L,className:g.Z["checkout-button"],variant:"body"}, +/* translators: placeholder is product name. */ +(0,p.sprintf)(__("Add %s","jetpack-my-jetpack"),_)),N&&P&&r().createElement("div",{className:g.Z["product-has-required-plan"]},r().createElement(m.KM,{size:36}),r().createElement(d.ZP,null,__("Active on your site","jetpack-my-jetpack"))),E&&r().createElement(d.ZP,{className:g.Z["supporting-info"],variant:"body-extra-small"},E)))};E.defaultProps={trackButtonClick:()=>{}};const b=E},8093:(e,t,n)=>{"use strict";n.d(t,{B$:()=>S,Jw:()=>U,Q5:()=>R,WJ:()=>N,Yi:()=>P,q:()=>w,qA:()=>Z,uw:()=>I,y$:()=>x});var c=n(9196),r=n.n(c),i=n(1163),a=n(8218),o=n(2939),s=n(9818),l=n(5736),u=n(968),p=n(1287),d=n(2199),m=n(5610),g=n(720),h=n(1439),y=n(2605),v=n(4763),f=n(3703),k=n(3345),E=n(8278),b=n(1689),j=n(7493),_=n(5626);const __=l.__;function C(e){let{bundle:t,installsPlugin:n=!1,slug:l,supportingInfo:m,children:g=null}=e;const{activate:h,detail:y}=(0,f.i)(l),{isUpgradableByBundle:v}=y,{recordEvent:C}=(0,d.Z)();(0,c.useEffect)((()=>{C("jetpack_myjetpack_product_interstitial_view",{product:l})}),[C,l]);const w=(0,c.useCallback)((()=>{C("jetpack_myjetpack_product_interstitial_add_link_click",{product:l})}),[C,l]),Z=(0,c.useCallback)((()=>{C("jetpack_myjetpack_product_interstitial_add_link_click",{product:t})}),[C,t]),{isUserConnected:N}=(0,b.Z)(),S=(0,k.Z)("/"),P=(0,c.useCallback)((()=>{h().finally((()=>{var e,t;const n=(0,s.select)(j.t).getProduct(l),c=null==n?void 0:n.postActivationUrl,r=null==n?void 0:n.hasRequiredPlan,i=null==n||null===(e=n.pricingForUi)||void 0===e?void 0:e.isFree,a=null==n||null===(t=n.pricingForUi)||void 0===t?void 0:t.wpcomProductSlug;if(!c)return!i&&!r&&a?void(window.location.href=(0,E.Z)(a,N)):S();window.location.href=c}))}),[S,h,N,l]),R=(0,c.useCallback)((()=>{l&&C("jetpack_myjetpack_product_interstitial_back_link_click",{product:l})}),[C,l]);return r().createElement(i.Z,{showHeader:!1,showBackground:!1},r().createElement(a.Z,{horizontalSpacing:3,horizontalGap:3},r().createElement(o.Z,null,r().createElement(_.Z,{onClick:R})),r().createElement(o.Z,null,r().createElement(a.Z,{className:v?null:p.Z.container,horizontalSpacing:0,horizontalGap:0,fluid:!0},r().createElement(o.Z,{sm:4,md:4,lg:7},r().createElement(u.Z,{slug:l,trackButtonClick:w,onClick:n?P:void 0,className:v?p.Z.container:null,supportingInfo:m})),r().createElement(o.Z,{sm:4,md:4,lg:5,className:p.Z.imageContainer},t?r().createElement(u.Z,{slug:"security",trackButtonClick:Z,className:v?p.Z.container:null}):g)))))}function w(){return r().createElement(C,{slug:"anti-spam",installsPlugin:!0,bundle:"security"})}function Z(){return r().createElement(C,{slug:"backup",installsPlugin:!0,bundle:"security"})}function N(){return r().createElement(C,{slug:"boost",installsPlugin:!0},r().createElement("img",{src:m,alt:"Boost"}))}function S(){return r().createElement(C,{slug:"crm",installsPlugin:!0},r().createElement("img",{src:v,alt:"CRM"}))}function P(){return r().createElement(C,{slug:"extras",installsPlugin:!0},r().createElement("img",{src:y,alt:"Extras"}))}function R(){return r().createElement(C,{slug:"scan",installsPlugin:!0,bundle:"security"})}function x(){return r().createElement(C,{slug:"social",installsPlugin:!0})}function I(){return r().createElement(C,{slug:"search",installsPlugin:!0,supportingInfo:__("Pricing will automatically adjust based on the number of records in your search index. If you grow into a new pricing tier, we'll let you know before your next billing cycle.","jetpack-my-jetpack")},r().createElement("img",{src:g,alt:"Search"}))}function U(){return r().createElement(C,{slug:"videopress",installsPlugin:!0},r().createElement("img",{src:h,alt:"VideoPress"}))}},8565:(e,t,n)=>{"use strict";n.d(t,{f6:()=>r,w6:()=>c});const c="my-jetpack-my-plans-manage",r="my-jetpack-my-plans-purchase"},2199:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var c=n(9196),r=n(6975),i=n(1689);const a=()=>{var e;const{isUserConnected:t,connectedPlugins:n,userConnectionData:a={}}=(0,i.Z)(),{login:o,ID:s}=(null===(e=a.currentUser)||void 0===e?void 0:e.wpcomUser)||{};(0,c.useEffect)((()=>{t&&s&&o&&r.Z.initialize(s,o)}),[s,t,o]);const l=Object.keys(n||{}).sort().join(",").replaceAll("jetpack-",""),{clearedIdentity:u,ga:p,mc:d,pageView:m,purchase:g,setGoogleAnalyticsEnabled:h,setMcAnalyticsEnabled:y,setProperties:v,tracks:f}=r.Z;return{clearedIdentity:u,ga:p,mc:d,pageView:m,purchase:g,recordEvent:(0,c.useCallback)(((e,t)=>{var n,c;f.recordEvent(e,{...t,version:null===(n=window)||void 0===n||null===(c=n.myJetpackInitialState)||void 0===c?void 0:c.myJetpackVersion,referring_plugins:l})}),[]),setGoogleAnalyticsEnabled:h,setMcAnalyticsEnabled:y,setProperties:v,tracks:f}}},5371:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var c=n(5736),r=n(9196),i=n(9818),a=n(7493),o=n(1689),s=n(3345);const __=c.__;function l(){const e=(0,s.Z)("/connection"),{setGlobalNotice:t}=(0,i.useDispatch)(a.t),n=(0,i.useSelect)((e=>e(a.t).getProductsThatRequiresUserConnection())),{isSiteConnected:l,redirectUrl:u,hasConnectedOwner:p}=(0,o.Z)(),d=!p&&n.length>0,m=(0,c.sprintf)( +/* translators: placeholder is product name. */ +__("Jetpack %s needs a user connection to WordPress.com to be able to work.","jetpack-my-jetpack"),n[0]),g=n.length>1?__("Some products need a user connection to WordPress.com to be able to work.","jetpack-my-jetpack"):m;(0,r.useEffect)((()=>{!l&&u&&(window.location=u)}),[l,u]),(0,r.useEffect)((()=>{d&&t(g,{status:"error",actions:[{label:__("Connect your user account to fix this","jetpack-my-jetpack"),onClick:e,variant:"link",noDefaultClasses:!0}]})}),[g,d,e,t])}},1689:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var c=n(1294);function r(){const{apiRoot:e,apiNonce:t}=myJetpackRest,{topJetpackMenuItemUrl:n}=myJetpackInitialState,r=(0,c.Z)({apiRoot:e,apiNonce:t}),i=r.isRegistered;return{apiNonce:t,apiRoot:e,...r,isSiteConnected:i,redirectUrl:n}}},3345:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9196),r=n(5439);function i(e){const t=(0,r.s0)();return(0,c.useCallback)((()=>t(e)),[t,e])}},5031:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9818),r=n(7493);function i(){const e=(0,c.useDispatch)(),{message:t,options:n}=(0,c.useSelect)((e=>e(r.t).getGlobalNotice()));return{message:t,options:n||{},clean:()=>e(r.t).cleanGlobalNotice()}}},3703:(e,t,n)=>{"use strict";n.d(t,{i:()=>i});var c=n(9818),r=n(7493);function i(e){const{activateProduct:t,deactivateProduct:n}=(0,c.useDispatch)(r.t),i=(0,c.useSelect)((t=>t(r.t).getProduct(e)));return{activate:()=>t(e),deactivate:()=>n(e),productsList:(0,c.useSelect)((e=>e(r.t).getProducts())),detail:i,isActive:"active"===i.status,isFetching:(0,c.useSelect)((t=>t(r.t).isFetching(e))),status:i.status}}},1750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9818),r=n(7493);function i(){return(0,c.useSelect)((e=>e(r.t).getPurchases()))}},9274:(e,t,n)=>{"use strict";n.d(t,{RT:()=>s,ZP:()=>j,d1:()=>h,dE:()=>m,dI:()=>d,dq:()=>g,fE:()=>y,ny:()=>l,vv:()=>p,z8:()=>u});var c=n(6989),r=n.n(c),i=n(5736),a=n(428),o=n(2086);const __=i.__,s="SET_PURCHASES_IS_FETCHING",l="FETCH_PURCHASES",u="SET_PURCHASES",p="SET_IS_FETCHING_PRODUCT",d="SET_PRODUCT",m="SET_PRODUCT_REQUEST_ERROR",g="SET_PRODUCT_STATUS",h="SET_GLOBAL_NOTICE",y="CLEAN_GLOBAL_NOTICE",v=e=>({type:d,product:e}),f=(e,t)=>({type:m,productId:e,error:t}),k=(e,t)=>({type:"SET_GLOBAL_NOTICE",message:e,options:t});function E(e,t){return{type:p,productId:e,isFetching:t}}const b={setProduct:v,activateProduct:e=>async t=>await function(e,t,n){let{select:c,dispatch:s,registry:l}=n;return new Promise(((n,u)=>{if(!c.isValidProduct(e)){const t=__("Invalid product name","jetpack-my-jetpack"),n=new Error(t);return s(f(e,n)),s(k(t,{status:"error",isDismissible:!0})),void u(n)}const p=t.activate?"POST":"DELETE";return s(E(e,!0)),r()({path:`${o.Jk}/${e}`,method:p}).then((t=>{s(E(e,!1)),s(v(t)),l.dispatch(a.t).refreshConnectedPlugins(),n(null==t?void 0:t.status)})).catch((t=>{const{name:n}=c.getProduct(e),r=(0,i.sprintf)(// translators: %$1s: Jetpack Product name +__("Failed to activate %1$s. Please try again","jetpack-my-jetpack"),n);s(E(e,!1)),s(f(e,t)),s(k(r,{status:"error",isDismissible:!0})),u(t)}))}))}(e,{activate:!0},t),setIsFetchingProduct:E,setRequestProductError:f,setProductStatus:(e,t)=>({type:g,productId:e,status:t})},j={setPurchasesIsFetching:e=>({type:s,isFetching:e}),fetchPurchases:()=>({type:l}),setPurchases:e=>({type:u,purchases:e}),...{setGlobalNotice:k,cleanGlobalNotice:()=>({type:"CLEAN_GLOBAL_NOTICE"})},...b}},2086:(e,t,n)=>{"use strict";n.d(t,{Jk:()=>r,LQ:()=>c,iB:()=>i});const c="my-jetpack/v1/site/purchases",r="my-jetpack/v1/site/products",i=["scan"]},9462:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var c=n(6989),r=n.n(c),i=n(9274),a=n(2086);const o={[i.ny]:function(){return new Promise(((e,t)=>{r()({path:a.LQ}).then(e).catch(t)}))}}},925:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(9818),r=n(9274);const i=(0,c.combineReducers)({products:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case r.vv:{const{productId:n,isFetching:c}=t;return{...e,isFetching:{...e.isFetching,[n]:c},errors:{...e.errors,[n]:c?void 0:e.errors[n]}}}case r.dq:{const{productId:n,status:c}=t;return{...e,items:{...e.items,[n]:{...e.items[n],status:c}}}}case r.dI:{const{product:n}=t,{slug:c}=n;return{...e,items:{...e.items,[c]:n}}}case r.dE:{const{productId:n,error:c}=t;return{...e,errors:{...e.errors,[n]:c}}}default:return e}},purchases:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case r.RT:return{...e,isFetching:t.isFetching};case r.z8:return{...e,items:(null==t?void 0:t.purchases)||[]};default:return e}},notices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{global:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case r.d1:{const{message:n,options:c}=t;return{...e,global:{message:n,options:c}}}case r.fE:return{...e,global:{}};default:return e}}})},9844:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var c=n(6989),r=n.n(c),i=n(5736),a=n(2086);const __=i.__,o={...{getProduct:{isFulfilled:(e,t)=>{var n;return((null==e||null===(n=e.products)||void 0===n?void 0:n.items)||{}).hasOwnProperty(t)&&!a.iB.includes(t)},fulfill:e=>async t=>{let{dispatch:n}=t;try{n.setIsFetchingProduct(e,!0);const t=await r()({path:`${a.Jk}/${e}`});return n.setProduct(t),n.setIsFetchingProduct(e,!1),Promise.resolve()}catch(t){if(n.setIsFetchingProduct(e,!1),null!=t&&t.code&&null!=t&&t.message)return n.setRequestProductError(e,t),Promise.reject(t);throw new Error(t)}}},getPurchases:()=>async e=>{let{dispatch:t}=e;t.setPurchasesIsFetching(!0);try{t.setPurchases(await r()({path:a.LQ})),t.setPurchasesIsFetching(!1)}catch(e){t.setPurchasesIsFetching(!1),t.setGlobalNotice(__("There was an error fetching your purchases information. Check your site connectivity and try again.","jetpack-my-jetpack"),{status:"error"})}}}}},6896:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>o});var c=n(6782),r=n(2728);const i=e=>{var t;return(null===(t=e.products)||void 0===t?void 0:t.items)||{}},a=e=>Object.keys(i(e)),o={...{getProducts:i,getProductNames:a,getProduct:(e,t)=>{var n;const r=(null===(n=i(e))||void 0===n?void 0:n[t])||{},a=(0,c.N)(r,!0);return a.pricingForUi=(0,c.N)(a.pricingForUi||{},!0),a.features=a.features||[],a.supportedProducts=a.supportedProducts||[],a.pricingForUi.fullPricePerMonth=Math.ceil(a.pricingForUi.fullPrice/12*100)/100,a.pricingForUi.discountPricePerMonth=Math.ceil(a.pricingForUi.discountPrice/12*100)/100,a},isValidProduct:(e,t)=>a(e).includes(t),isFetching:(e,t)=>{var n,c;return(null===(n=e.products)||void 0===n||null===(c=n.isFetching)||void 0===c?void 0:c[t])||!1},getProductsThatRequiresUserConnection:e=>{const t=i(e);return Object.keys(t).reduce(((e,n)=>{const c=t[n];return(null==c?void 0:c.requires_user_connection)&&((null==c?void 0:c.status)===r.N.ACTIVE||(null==c?void 0:c.status)===r.N.ERROR)&&e.push(null==c?void 0:c.name),e}),[])}},getPurchases:e=>{var t;return(null===(t=e.purchases)||void 0===t?void 0:t.items)||[]},isRequestingPurchases:e=>e.isRequestingPurchases||!1,getGlobalNotice:e=>{var t;return null===(t=e.notices)||void 0===t?void 0:t.global}}},1214:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var c=n(8294),r=n.n(c),i=n(9818);class a{static mayBeInit(e,t){null===a.store&&(a.store=(0,i.createReduxStore)(e,t),(0,i.register)(a.store))}}r()(a,"store",null);const o=a},7493:(e,t,n)=>{"use strict";n.d(t,{N:()=>u,t:()=>l});var c=n(9274),r=n(925),i=n(6896),a=n(1214),o=n(9844),s=n(9462);const l="my-jetpack";function u(){a.Z.mayBeInit(l,{__experimentalUseThunks:!0,reducer:r.Z,actions:c.ZP,selectors:i.ZP,resolvers:o.Z,controls:s.Z,initialState:window.myJetpackInitialState||{}})}},8295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(6324),r=n(8565);function i(){var e,t;const n=null===(e=window)||void 0===e||null===(t=e.myJetpackInitialState)||void 0===t?void 0:t.siteSuffix;return(0,c.Z)(r.w6,{site:n})}},8278:(e,t,n)=>{"use strict";function c(e,t){var n;const{siteSuffix:c,redirectUrl:r}=(null===(n=window)||void 0===n?void 0:n.myJetpackInitialState)||{},i=new URL("https://wordpress.com/checkout/"),a=new URL(`${i}${c}/${e}`);return a.searchParams.set("redirect_to",r),t||a.searchParams.set("unlinked",1),a.searchParams.set("site",c),a.toString()}n.d(t,{Z:()=>c})},7258:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var c=n(6324),r=n(8565);function i(){var e,t;const n=null===(e=window)||void 0===e||null===(t=e.myJetpackInitialState)||void 0===t?void 0:t.siteSuffix;return(0,c.Z)(r.f6,{site:n})}},6782:(e,t,n)=>{"use strict";function c(e){return e.replace(/([-_][a-z])/gi,(e=>e.toUpperCase().replace("_","")))}function r(e){return-1!==e.indexOf("_")}function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=Object.assign({},e);for(const e in n)n.hasOwnProperty(e)&&r(e)&&(n[c(e)]=n[e],t&&delete n[e]);return n}n.d(t,{N:()=>i})},2042:(e,t,n)=>{"use strict";e.exports=n.p+"images/disconnect-confirm-dc9fe8f5c68cfd1320e0.jpg"},724:(e,t,n)=>{"use strict";e.exports=n.p+"images/disconnect-thanks-5873bfac56a9bd7322cd.jpg"},8702:(e,t,n)=>{"use strict";e.exports=n.p+"images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png"},1160:(e,t,n)=>{"use strict";e.exports=n.p+"images/jetpack-license-activation-with-success-cad524ede4e793cc0ece.png"},5242:(e,t,n)=>{"use strict";e.exports=n.p+"images/apple-92dacafad84e79708a74.svg"},6790:(e,t,n)=>{"use strict";e.exports=n.p+"images/connect-f27775ac15cf885713c2.png"},184:(e,t,n)=>{"use strict";e.exports=n.p+"images/google-dec2a429bf1d8e83f9ad.svg"},4997:(e,t,n)=>{"use strict";e.exports=n.p+"images/wordpress-e099b30cc40508916516.png"},5610:(e,t,n)=>{"use strict";e.exports=n.p+"images/boost-a54137485af36fdffe9c.png"},4763:(e,t,n)=>{"use strict";e.exports=n.p+"images/crm-7e7684ae2c40327d8fed.png"},2605:(e,t,n)=>{"use strict";e.exports=n.p+"images/extras-26daf36507504c96d066.png"},720:(e,t,n)=>{"use strict";e.exports=n.p+"images/search-f9756bd9c926d905fe70.png"},1439:(e,t,n)=>{"use strict";e.exports=n.p+"images/videopress-9591093a9a238cc48a35.png"},4462:e=>{"use strict";if(void 0==={consumer_slug:"my_jetpack"}){var t=new Error('Cannot find module \'{"consumer_slug":"my_jetpack"}\'');throw t.code="MODULE_NOT_FOUND",t}e.exports={consumer_slug:"my_jetpack"}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},2819:e=>{"use strict";e.exports=window.lodash},6989:e=>{"use strict";e.exports=window.wp.apiFetch},5609:e=>{"use strict";e.exports=window.wp.components},9818:e=>{"use strict";e.exports=window.wp.data},9307:e=>{"use strict";e.exports=window.wp.element},5736:e=>{"use strict";e.exports=window.wp.i18n},444:e=>{"use strict";e.exports=window.wp.primitives},6483:e=>{"use strict";e.exports=window.wp.url},255:(e,t,n)=>{"use strict";function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e},c.apply(this,arguments)}n.d(t,{Z:()=>c})}},t={};function n(c){var r=t[c];if(void 0!==r)return r.exports;var i=t[c]={exports:{}};return e[c](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var c in t)n.o(t,c)&&!n.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:t[c]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var c=t.getElementsByTagName("script");c.length&&(e=c[c.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{"use strict";var e=n(1850),t=n.n(e),c=n(9196),r=n.n(c),i=n(554),a=n(5439),o=n(6016),s=n(8966),l=n(17),u=n(7493),p=n(8093),d=n(1899);n(5878);(0,u.N)();const m=()=>{var e,t;return r().createElement(o.ZP,null,r().createElement(i.UT,null,r().createElement(a.Z5,null,r().createElement(a.AW,{path:"/",element:r().createElement(s.Z,null)}),r().createElement(a.AW,{path:"/connection",element:r().createElement(l.Z,null)}),r().createElement(a.AW,{path:"/add-anti-spam",element:r().createElement(p.q,null)}),r().createElement(a.AW,{path:"/add-backup",element:r().createElement(p.qA,null)}),r().createElement(a.AW,{path:"/add-boost",element:r().createElement(p.WJ,null)}),r().createElement(a.AW,{path:"/add-crm",element:r().createElement(p.B$,null)}),r().createElement(a.AW,{path:"/add-extras",element:r().createElement(p.Yi,null)}),r().createElement(a.AW,{path:"/add-scan",element:r().createElement(p.Q5,null)}),r().createElement(a.AW,{path:"/add-social",element:r().createElement(p.y$,null)}),r().createElement(a.AW,{path:"/add-search",element:r().createElement(p.uw,null)}),r().createElement(a.AW,{path:"/add-videopress",element:r().createElement(p.Jw,null)}),(null===(e=window)||void 0===e||null===(t=e.myJetpackInitialState)||void 0===t?void 0:t.loadAddLicenseScreen)&&r().createElement(a.AW,{path:"/add-license",element:r().createElement(d.Z,null)}))))};!function(){const e=document.getElementById("my-jetpack-container");null!==e&&t().render(r().createElement(m,null),e)}()})()})();
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js.LICENSE.txt b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js.LICENSE.txt index 0c20a875..77b8fe88 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js.LICENSE.txt +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js.LICENSE.txt @@ -1,5 +1,35 @@ +/* + * Exposes number format capability + * + * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors). + * @license See CREDITS.md + * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js + */ + /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ + +/** + * React Router DOM v6.2.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ + +/** + * React Router v6.2.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.rtl.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.rtl.css index bd36f5b7..2e483163 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.rtl.css +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.rtl.css @@ -1 +1 @@ -.O5NYbFTsxmrm4P2SIdOC{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.rkV4U_hzC04NwXFQcTHl{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.rkV4U_hzC04NwXFQcTHl{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.rkV4U_hzC04NwXFQcTHl{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.G81E6mesnld_OhhOvz_F{grid-column-end:span 1}.SfCZpjwiu2F0KDjGIXEA{grid-column-end:span 2}.qPxwbSu_GTDTz_8jFHJD{grid-column-end:span 3}.xYAWQ0wk6FPfZOZQgFiw{grid-column-end:span 4}@media(min-width:600px){.zwZjA7ofpMucaB_UzG48{grid-column-end:span 1}.YfwKGGBEqiINFYy6ZpKM{grid-column-end:span 2}.pcHQbVFRxA_OvNRQ2OwP{grid-column-end:span 3}.U_LJMBlRZ8ItXZuvCXGg{grid-column-end:span 4}.st_7w_Ja1Gp2AgGaTysO{grid-column-end:span 5}.gQsaHmJo6Gp7Yq9IB9Sg{grid-column-end:span 6}.P0a4FWsiJJmR6bySI8QC{grid-column-end:span 7}.UxSHj7jyDp6sGKHILNRc{grid-column-end:span 8}}@media(min-width:960px){.TExt5ebNqUrEn2NzeDDh{grid-column-end:span 1}.cdwvRRac4c2djSpHfOpF{grid-column-end:span 2}.hvRpxlyFY9BQIDdEGTjg{grid-column-end:span 3}.Ev9JGJi3yKkBq6cW3Xge{grid-column-end:span 4}.mhL__tIHFH_tViX5718D{grid-column-end:span 5}.X1lGIxHHxsFl_39u4Px6{grid-column-end:span 6}.pc5UnY_DzsSDkyih78Ti{grid-column-end:span 7}.QCjBtfnG3u20FwoDd59Z{grid-column-end:span 8}.MX1aL3BeJpoSE0aXghp0{grid-column-end:span 9}.h_JAcO8a8ClV2LmTWsMz{grid-column-end:span 10}.gKlDMi0N7LOd9q8uJHi5{grid-column-end:span 11}.KZWhYB7r6TG75uJu2LsQ{grid-column-end:span 12}}@media(max-width:960px){.G6NxfG2gGwvEYb0aGdPJ{display:none}}@media(max-width:600px){.aceZPGfrg7IoR0Vu7ZJg{display:none}}.MZSHJVi991kNJhn_Xnip{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);display:block;margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.MZSHJVi991kNJhn_Xnip span{display:block}.MZSHJVi991kNJhn_Xnip span:last-of-type{font-weight:600}.MZSHJVi991kNJhn_Xnip:focus span:last-of-type,.MZSHJVi991kNJhn_Xnip:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.MZSHJVi991kNJhn_Xnip:focus:after,.MZSHJVi991kNJhn_Xnip:hover:after{transform:translateY(-50%) translateX(-8px)}.MZSHJVi991kNJhn_Xnip:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.EZ590eIMC5y_t1_gWRua{margin-right:-20px}.BYzOly4G7Gry9wdRH0AY{background-color:#fff;padding:40px 0}.iwMEh2CwJ_r23Y9sVcJ1,.O8YnwnZegI89S2Q3k5Qn{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.EC1Yirv2kOgRU77F2XRd{grid-column-end:span 1}.FHZqFvZXEDJ9mpOm7CeY{grid-column-end:span 2}.VOmONLKUkcSrIRYmX6YZ{grid-column-end:span 3}.eECO55N5YGkBB3tKa0If{grid-column-end:span 4}@media(min-width:600px){.u3ZB3zRkuglILO6FSIrx{grid-column-end:span 1}.iZnPl6piWO_GqHn16XKi{grid-column-end:span 2}.WWctfqi1wHZDWrue8GIt{grid-column-end:span 3}.p678NN_M0K78Kpprfndu{grid-column-end:span 4}._6D2TXtGKmepmwrxSf5DW{grid-column-end:span 5}.cWORs5VDjuStXsiVPtiO{grid-column-end:span 6}.yJsc8qt82L9miwDoe2Y2{grid-column-end:span 7}.hD6bXWfNn5elhKCaBFTD{grid-column-end:span 8}}@media(min-width:960px){.k9j6XIJdXbQ5YNyU8sNH{grid-column-end:span 1}.TnVGX0JHm_muRRcmYYwV{grid-column-end:span 2}.VILIswQXi8XzNJ3BqePc{grid-column-end:span 3}.h7mXuoRFWMGCiWYH4Ij1{grid-column-end:span 4}.uHYkk5STnhikqYMIxtE1{grid-column-end:span 5}.E8zp8nDOvAQ7VHsXKJJw{grid-column-end:span 6}.jwOhfvvsXGTCtHfB2854{grid-column-end:span 7}.DmSEZVFn_2XNNKJGgkXw{grid-column-end:span 8}.RdgOIY1qMZ8eqAeNSGNw{grid-column-end:span 9}.XBQd6xiLipeHg0O6cf7N{grid-column-end:span 10}.JyQ6Tbn3FCHfrCEyWrAr{grid-column-end:span 11}.fzJ_qaXYWs3EWQEupbLD{grid-column-end:span 12}}@media(max-width:960px){.LE2ZLIt_Y0slsr6TSmqe{display:none}}@media(max-width:600px){.vYxwZbK_covZoLjDe3BM{display:none}}.fmzqGXmbTSiUblRujgqB{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);display:block;margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.fmzqGXmbTSiUblRujgqB span{display:block}.fmzqGXmbTSiUblRujgqB span:last-of-type{font-weight:600}.fmzqGXmbTSiUblRujgqB:focus span:last-of-type,.fmzqGXmbTSiUblRujgqB:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.fmzqGXmbTSiUblRujgqB:focus:after,.fmzqGXmbTSiUblRujgqB:hover:after{transform:translateY(-50%) translateX(-8px)}.fmzqGXmbTSiUblRujgqB:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.HwO79godDUI97Xub9ey4{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.HwO79godDUI97Xub9ey4{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.HwO79godDUI97Xub9ey4{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.WcIPVMUrQMdwzisuVSh7{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.Nxx7T20LwPUQPXCSDMfA{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.Nxx7T20LwPUQPXCSDMfA{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.Nxx7T20LwPUQPXCSDMfA{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.MnTtKIHRyzXYoesgRCgm{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);display:block;margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.MnTtKIHRyzXYoesgRCgm span{display:block}.MnTtKIHRyzXYoesgRCgm span:last-of-type{font-weight:600}.MnTtKIHRyzXYoesgRCgm:focus span:last-of-type,.MnTtKIHRyzXYoesgRCgm:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.MnTtKIHRyzXYoesgRCgm:focus:after,.MnTtKIHRyzXYoesgRCgm:hover:after{transform:translateY(-50%) translateX(-8px)}.MnTtKIHRyzXYoesgRCgm:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.mmVmo1nZYrRywmnSKQFx{grid-column-end:span 1}.UrIp26XpdUSMJft8YxdC{grid-column-end:span 2}.pMXlFWglEDyK6MbwJ8sX{grid-column-end:span 3}.P5H1ohz9m5_rEqZFAkFm{grid-column-end:span 4}@media(min-width:600px){.ofLUn8LwR3LLeWl8tPdU{grid-column-end:span 1}.fq1Z8JYbcrrXavvSfzKk{grid-column-end:span 2}.jq9gui11HqTDfI7tXH1d{grid-column-end:span 3}.mVYkSRC7j44WiWLZHOnM{grid-column-end:span 4}.S3wOGmx7YLTrqz_bcLth{grid-column-end:span 5}.Y3GW3wokLgm9jnX78Uwk{grid-column-end:span 6}.ShMEdZjpjdYj7mCQzrSO{grid-column-end:span 7}.nfBAID75QGC1VZ8t0RfR{grid-column-end:span 8}}@media(min-width:960px){.Vr2EQcrmKOPJtFU72Vv2{grid-column-end:span 1}.CTS6MNweODFo4ZxcT0iV{grid-column-end:span 2}.XTISRluUo3o5xxnPNu09{grid-column-end:span 3}.c_EtRaSOJafAl5r9WkBm{grid-column-end:span 4}.HcpW_q5aO8Bf_ngIjyjv{grid-column-end:span 5}.XF3r0hMrFrrmxH5TJee0{grid-column-end:span 6}.Jl9ognyJ9XOZ6g0BTzLf{grid-column-end:span 7}._8w8oD2R9CVt9AU4PvUy{grid-column-end:span 8}.ltOXxurwUtxy7XIR_loo{grid-column-end:span 9}.bKUzzGEJ3wCoAOZZvVCK{grid-column-end:span 10}.GltQVCPa1x4tZ7sWFg1v{grid-column-end:span 11}.UzWicuFiKrGgMEjmRAFA{grid-column-end:span 12}}@media(max-width:960px){.CDwHAcVQxDeV2mFXS1Dz{display:none}}@media(max-width:600px){.sr1184KrdJ0UtgNsMQnR{display:none}}.jp-dashboard-footer{align-items:center;color:#000;display:flex;flex-flow:row wrap;justify-content:space-between;max-width:1128px;width:100%}.jp-dashboard-footer__jetpack-symbol,.jp-dashboard-footer__module-name{display:inline-block;vertical-align:middle}.jp-dashboard-footer__module-name{font-size:12px;font-weight:600;margin-right:5px}.K6gniZequRm1zBi4xa2G{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.vickZxEIl6kGZp7KkFYF{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.vickZxEIl6kGZp7KkFYF{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.vickZxEIl6kGZp7KkFYF{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.U2ZD1antXfCcQlBdFwyw{grid-column-end:span 1}.caLSPVQ3JP3b2Ia68Seq{grid-column-end:span 2}.h6FKJdwoY_zIXh6pEj1U{grid-column-end:span 3}.GkjDOzh_5n5VxKrqEW_I{grid-column-end:span 4}@media(min-width:600px){.V2HSxZHesNOXMBWOmdFG{grid-column-end:span 1}.i3fz9zvErDyXYherb6Ew{grid-column-end:span 2}._3bKcKfanUgurPMcHEiV{grid-column-end:span 3}.U44hqBGsmVA1lI9R2ZnH{grid-column-end:span 4}.AzaRYYQQYJjKUF9D87mw{grid-column-end:span 5}.sag3QKXTxIQXPPjmbrAl{grid-column-end:span 6}.ifY5fUWFNROS_F7Jys9v{grid-column-end:span 7}.nZFgLvw9LsUJnEViXnJZ{grid-column-end:span 8}}@media(min-width:960px){.Tqir6CbiyHOgYmsAgY57{grid-column-end:span 1}.VeVLz3DEagxiXMMPEOCe{grid-column-end:span 2}.G3R07cw2eP3D3juW3A3l{grid-column-end:span 3}.eQ3UseyneBNu_ZLuqSzg{grid-column-end:span 4}.VlgV8xjgkGoOLJShoyNM{grid-column-end:span 5}.DJCwqamaIDFQoj0jEgBc{grid-column-end:span 6}.CxtXPQUYJfNUQVn3y2y_{grid-column-end:span 7}.BroOgbyuFxoSv48H70B5{grid-column-end:span 8}.KnUcRFDSsxeb_z46ajNY{grid-column-end:span 9}.bXiAAxiM2mhcI43ET0pp{grid-column-end:span 10}.ipYVW2jwG2cFjIHpnQk2{grid-column-end:span 11}.KcREgfiJ4ix9nAvNAXqQ{grid-column-end:span 12}}@media(max-width:960px){.qSfEJeFAh4WmcPtmo8qe{display:none}}@media(max-width:600px){._RxxiRFsUS3nYTZhkprA{display:none}}.RSw9xhnEr8xpkX3hPPaM{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);display:block;margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.RSw9xhnEr8xpkX3hPPaM span{display:block}.RSw9xhnEr8xpkX3hPPaM span:last-of-type{font-weight:600}.RSw9xhnEr8xpkX3hPPaM:focus span:last-of-type,.RSw9xhnEr8xpkX3hPPaM:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.RSw9xhnEr8xpkX3hPPaM:focus:after,.RSw9xhnEr8xpkX3hPPaM:hover:after{transform:translateY(-50%) translateX(-8px)}.RSw9xhnEr8xpkX3hPPaM:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.kEBaF5NOHtQsQn5jfOEA{background:var(--jp-white-off);padding:48px 0 64px}.kEBaF5NOHtQsQn5jfOEA h1,.kEBaF5NOHtQsQn5jfOEA h2,.kEBaF5NOHtQsQn5jfOEA h3,.kEBaF5NOHtQsQn5jfOEA h4,.kEBaF5NOHtQsQn5jfOEA h5,.kEBaF5NOHtQsQn5jfOEA h6{line-height:1.2;margin-top:0}._UqttTwRJeajPRpRGZPJ{background-color:#fff;padding:64px 0}._UqttTwRJeajPRpRGZPJ h1,._UqttTwRJeajPRpRGZPJ h2,._UqttTwRJeajPRpRGZPJ h3,._UqttTwRJeajPRpRGZPJ h4,._UqttTwRJeajPRpRGZPJ h5,._UqttTwRJeajPRpRGZPJ h6{line-height:1.2;margin-top:0}.jp-connection-status-card h3{color:var(--jp-black);font-size:36px;font-weight:400;line-height:40px;margin:0}.jp-connection-status-card a,.jp-connection-status-card a:active,.jp-connection-status-card a:hover{color:var(--jp-black)}.jp-connection-status-card p{color:var(--jp-black);margin:16px 0}.jp-connection-status-card a,.jp-connection-status-card li,.jp-connection-status-card p{font-size:16px;line-height:24px}.jp-connection-status-card--status{align-items:center;display:flex;margin:24px -6px 24px 0}.jp-connection-status-card--cloud{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDIiIGhlaWdodD0iNDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PG1hc2sgaWQ9ImEiIG1hc2stdHlwZT0iYWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjciIHk9IjkiIHdpZHRoPSIyOCIgaGVpZ2h0PSIyMSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMC4zMzMgMTcuNjk3di0uMDhjMC00LjI1My0zLjc2LTcuNy04LjQtNy43LTMuOTE2IDAtNy4yMDYgMi40NTctOC4xMzYgNS43OGE2LjM4NiA2LjM4NiAwIDAgMC0uMjY0LS4wMDVDOS45MjUgMTUuNjkyIDcgMTguNzA4IDcgMjIuNDI5czIuOTI1IDYuNzM4IDYuNTMzIDYuNzM4SDI5LjRjMy4wOTMgMCA1LjYtMi41ODYgNS42LTUuNzc1IDAtMi44NjEtMi4wMTgtNS4yMzctNC42NjYtNS42OTVaIiBmaWxsPSIjZmZmIi8+PC9tYXNrPjxnIG1hc2s9InVybCgjYSkiPjxwYXRoIGQ9Im0zMC4zMzMgMTcuNjk3LTIuNjI1LS4wMy0uMDI1IDIuMjM1IDIuMjAyLjM4MS40NDgtMi41ODZabS0xNi41MzctMi0uMTA3IDIuNjIzIDIuMDc1LjA4NS41Ni0yLTIuNTI4LS43MDhabS0uMjYzIDEzLjQ3djIuNjI1aC4wMDhsLS4wMDgtMi42MjVabS4wNCAwdi0yLjYyNWgtLjAwOWwuMDA4IDIuNjI1Wm0xNS43OTUgMCAuMDE1LTIuNjI1aC0uMDE1djIuNjI1Wm0zLjU5LTExLjQ0MXYtLjExaC01LjI1di4wNTJsNS4yNS4wNThabTAtLjExYzAtNS45MTItNS4xNTUtMTAuMzI0LTExLjAyNS0xMC4zMjR2NS4yNWMzLjQxIDAgNS43NzUgMi40ODIgNS43NzUgNS4wNzVoNS4yNVpNMjEuOTMzIDcuMjkzYy00Ljk4NCAwLTkuMzg4IDMuMTM5LTEwLjY2NCA3LjY5OGw1LjA1NSAxLjQxNWMuNTg1LTIuMDg5IDIuNzYyLTMuODYzIDUuNjEtMy44NjN2LTUuMjVabS04LjAzIDUuNzgyYTkuMTExIDkuMTExIDAgMCAwLS4zNy0uMDA3djUuMjVjLjA1MyAwIC4xMDUuMDAxLjE1Ni4wMDNsLjIxNS01LjI0NlptLS4zNy0uMDA3Yy01LjEzMyAwLTkuMTU4IDQuMjY4LTkuMTU4IDkuMzYyaDUuMjVjMC0yLjM0OCAxLjgyNS00LjExMiAzLjkwOC00LjExMnYtNS4yNVptLTkuMTU4IDkuMzYyYzAgNS4wOTUgNC4wMjUgOS4zNjMgOS4xNTggOS4zNjN2LTUuMjVjLTIuMDgzIDAtMy45MDgtMS43NjUtMy45MDgtNC4xMTNoLTUuMjVabTkuMTY2IDkuMzYzaC4wNGwtLjAxNy01LjI1aC0uMDM5bC4wMTYgNS4yNVptLjAzMSAwaDE1Ljc5NnYtNS4yNUgxMy41NzJ2NS4yNVptMTUuODI3LTUuMjVoLS4wMTZsLS4wMyA1LjI1aC4wNDZ2LTUuMjVabTIuOTc1LTMuMTVjMCAxLjgxNi0xLjQwNyAzLjE1LTIuOTc1IDMuMTV2NS4yNWM0LjYxOCAwIDguMjI1LTMuODM4IDguMjI1LTguNGgtNS4yNVptLTIuNDg5LTMuMTA5YzEuMzU1LjIzNSAyLjQ5IDEuNDg4IDIuNDkgMy4xMDloNS4yNWMwLTQuMTAyLTIuOTAyLTcuNi02Ljg0NC04LjI4MmwtLjg5NiA1LjE3M1oiIGZpbGw9IiMxRTFFMUUiLz48L2c+PC9zdmc+);height:42px;margin-left:4px;width:42px}.jp-connection-status-card--jetpack-logo{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE2IDMyYzguODM3IDAgMTYtNy4xNjMgMTYtMTZTMjQuODM3IDAgMTYgMCAwIDcuMTYzIDAgMTZzNy4xNjMgMTYgMTYgMTZaIiBmaWxsPSIjMDAwIi8+PHBhdGggZD0iTTE2Ljc5NCAxMy4zMTN2MTUuNTExbDgtMTUuNTEyaC04Wk0xNS4xNzUgMTguNjU3VjMuMTc2bC03Ljk2OSAxNS40OGg3Ljk3WiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==);height:32px;margin-right:11px;width:32px}.jp-connection-status-card--btn-connect-user{background:var(--jp-black)!important;border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection-status-card--avatar{background-color:var(--jp-white);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='16' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.498 27.123C6.038 24.165 10.916 21.5 16 21.5c5.084 0 9.963 2.665 11.502 5.623a15.952 15.952 0 0 1-11.257 4.875L16 32l-.245-.002a15.952 15.952 0 0 1-11.257-4.875zM16 8a6 6 0 1 1 0 12 6 6 0 0 1 0-12z' fill='%23A2AAB2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;border:0;border-radius:20px;height:32px;margin-right:-10px;width:32px}.jp-connection-status-card--line{border-top:2px solid var(--jp-black);height:0;width:67px}.jp-connection-status-card--line.jp-connection-status-card--site-only{border-top-style:dashed}.jp-connection-status-card--list{list-style-type:none;margin:16px 0}.jp-connection-status-card--list li{color:var(--jp-black);margin:0 -3px 8px 0;padding-right:25px}.jp-connection-status-card--list-item-success{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTE4LjkzNSA2LTguOSAxMS45Ny01LjE2Mi0zLjgzNyIgc3Ryb2tlPSIjMUUxRTFFIiBzdHJva2Utd2lkdGg9IjEuNSIvPjwvc3ZnPg==) no-repeat 100% 0}.jp-connection-status-card--list-item-error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 100% 0;color:var(--jp-red)!important}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-small);font-weight:600;line-height:1.2;margin-top:0}.jp-connection__disconnect-dialog h2{font-size:var(--font-title-small);font-weight:400;line-height:1.2;margin:0}.jp-connection__disconnect-dialog p{font-size:var(--font-body);margin-top:0}.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text{font-size:1.25rem}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link,.jp-connection__disconnect-dialog__link{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:hover,.jp-connection__disconnect-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:focus,.jp-connection__disconnect-dialog__link:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link--bold,.jp-connection__disconnect-dialog__link--bold{font-weight:700}.jp-connection__disconnect-dialog .components-button{border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection__disconnect-dialog .components-modal__content{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0}.jp-connection__disconnect-dialog .components-modal__content:before,.jp-connection__disconnect-dialog .components-modal__header{display:none}.jp-connection__disconnect-dialog .jp-row{align-items:center;width:calc(100% - 48px)}.jp-connection__disconnect-dialog__content{align-items:center;background:var(--jp-white-off);border-radius:4px;display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0;padding:2rem 1rem;text-align:center}.jp-connection__disconnect-dialog__actions{background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;padding:2rem 0;position:sticky}.jp-connection__disconnect-dialog__actions p{margin-bottom:0}.jp-connection__disconnect-dialog__actions:before{background:linear-gradient(to bottom,transparent,var(--jp-white-off));bottom:calc(100% + 1px);content:"";display:block;height:80px;position:absolute;right:0;width:100%}.jp-connection__disconnect-dialog__btn-dismiss,.jp-connection__disconnect-dialog__btn-dismiss.components-button{background:var(--jp-black)!important;margin-left:10px}.jp-connection__disconnect-dialog__btn-disconnect{background:var(--jp-red)!important}.jp-connection__disconnect-dialog__btn-back-to-wp{background:var(--jp-black)!important}.jp-connection__disconnect-dialog__button-wrap{text-align:right}@media(min-width:960px){.jp-connection__disconnect-dialog__button-wrap{text-align:center}}.jp-connection__disconnect-dialog__error{color:var(--jp-red)}.jp-connection__disconnect-dialog__survey{margin-bottom:1.5rem;max-width:100%}.jp-connection__disconnect-dialog__step-copy{margin:0 auto;max-width:800px}.jp-connection__disconnect-dialog__step-copy--narrow{max-width:600px}@media(max-height:900px){.jp-connection__disconnect-dialog__content .jp-components__decorative-card{display:none}}@media(min-width:600px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{max-width:calc(100% - 32px);width:100%}.jp-connection__disconnect-dialog__actions,.jp-connection__disconnect-dialog__content{padding:2rem}}@media(min-width:960px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{display:flex;flex-direction:column;height:900px;width:1200px}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-large)}.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text{font-size:1.5rem}.jp-connection__disconnect-dialog__content{padding:80px}.jp-connection__disconnect-dialog__actions{padding:2rem 3rem}.jp-row{margin-right:0}}.jp-connection__disconnect-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:0 auto 1rem;max-width:100%;padding:1rem 2rem;text-align:right;width:800px}.jp-connection__disconnect-card__group{margin-bottom:1rem;max-width:100%}.jp-connection__disconnect-card__card-content{display:block;font-size:.875rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-content{align-items:center;display:flex;justify-content:space-between}}.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{flex-shrink:0;font-size:1.25rem;font-weight:600;margin-bottom:0;margin-top:0}@media only screen and (min-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{font-size:1.5rem;margin-left:1.5rem}}@media only screen and (max-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block,.jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block{margin-top:.5rem}}.jp-connection__disconnect-card__card-stat-block{align-items:baseline;display:flex;flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat-block{flex-direction:row-reverse}}.jp-connection__disconnect-card__card-description{flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-description{text-align:left}}.jp-connection__disconnect-card__card-stat{font-size:1rem;font-weight:600;margin-left:.5rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat{font-size:1.5rem;margin-left:0;margin-right:1rem}}.jp-components__decorative-card{border-radius:8px;box-shadow:0 0 15px var(--jp-gray);display:flex;height:280px;margin:0 auto 3rem;max-width:100%;overflow:hidden;position:relative;width:360px}.jp-components__decorative-card__content,.jp-components__decorative-card__image{width:50%}.jp-components__decorative-card__image{background:var(--jp-gray);background-size:cover;position:relative}.jp-components__decorative-card__image:before{background-image:url('data:image/svg+xml;uf8,<svg width="38" height="8" viewBox="0 0 38 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 7C1 7 2.37087 1 6.89831 1C11.4257 1 14.3709 7 18.8983 7C23.4257 7 26.7777 1 31.3051 1C35.912 1 37 7 37 7" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>');content:"";display:block;height:8px;position:absolute;right:24px;top:24px;width:38px}.jp-components__decorative-card__content{background:#fff;padding:2rem}.jp-components__decorative-card__icon-container{background:var(--jp-red);border-radius:50px;height:80px;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:80px}.jp-components__decorative-card__icon{background-position:50%,50%;background-repeat:no-repeat;height:40px;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:40px}.jp-components__decorative-card__icon--unlink{background-image:url('data:image/svg+xml;uf8,<svg width="34" height="37" viewBox="0 0 34 37" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.3335 10.001H25.0002C29.4184 10.001 33.0002 13.5827 33.0002 18.001V19.7788C33.0002 24.197 29.4184 27.7788 25.0002 27.7788H22.3335" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M11.6675 27.7783L9.00082 27.7783C4.58254 27.7783 1.00081 24.1966 1.00081 19.7783L1.00081 18.0005C1.00081 13.5823 4.58253 10.0005 9.00081 10.0005L11.6675 10.0005" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M10.9998 19.167L16.9998 19.167" stroke="white" stroke-width="1.5"/> <path d="M8.99951 35.998L24.9995 0.998048" stroke="white"/> </svg>')}.jp-components__decorative-card__lines,.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{background:#e9eff5;border-radius:6px;display:block;height:12px;position:relative;width:100%}.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{content:"";top:calc(100% + 16px)}.jp-components__decorative-card__lines:after{top:calc(100% + 32px);width:75%}.jp-components__decorative-card--vertical{flex-direction:column}.jp-components__decorative-card--vertical .jp-components__decorative-card__content,.jp-components__decorative-card--vertical .jp-components__decorative-card__image{height:50%;width:100%}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines{margin-left:auto;margin-right:auto;max-width:135px}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:after,.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:before{margin-left:auto;margin-right:auto}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-20:#a7aaad;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-80:#8a2424;--jp-gray-off:#e2e2df;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-connect__disconnect-survey-card{border:2px solid transparent;border-radius:4px;box-shadow:0 0 15px var(--jp-gray-off);margin-left:auto;margin-right:auto;max-width:100%;padding:1rem;position:relative;text-align:right;width:800px}.jp-connect__disconnect-survey-card--selected{background:var(--jp-gray-off);border-color:var(--jp-black)}.jp-connect__disconnect-survey-card:after{border-left:2px solid var(--jp-black);border-top:2px solid var(--jp-black);content:"";display:block;height:5px;left:1.5rem;position:absolute;top:50%;transform:translateY(-50%) rotate(-45deg);width:5px}.jp-connect__disconnect-survey-card:hover{cursor:pointer}.jp-connect__disconnect-survey-card:focus:not(.jp-disconnect-survey-card--selected),.jp-connect__disconnect-survey-card:hover:not(.jp-disconnect-survey-card--selected){border-color:var(--jp-black-80)}.jp-connect__disconnect-survey-card__answer{align-items:center;display:flex;font-weight:700;margin:0}input.jp-connect__disconnect-survey-card__input{-webkit-appearance:none;background-color:transparent;border:none;color:var(--jp-black-80);flex-grow:1;max-width:calc(100% - 40px);padding-left:40px}
\ No newline at end of file +#my-jetpack-container{--wp-admin-theme-color:var(--jp-black);--wp-admin-theme-color-darker-10:var(--jp-black-80);--wp-admin-theme-color-darker-20:var(--jp-black-80);height:100%}#my-jetpack-container .jetpack-logo{height:40px}#my-jetpack-container .jp-dashboard-footer__jetpack-symbol{height:16px}#wpbody-content>.notice{display:none}.pIsYsXFAJ9KX2VrS5rmY{--actions-size:28px;--status-size:8px;background:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 0 40px rgba(0,0,0,.08);box-shadow:0 0 0 1px var(--jp-gray-10) inset;display:flex;flex-direction:column;height:100%;padding:calc(var(--spacing-base)*3)}.pIsYsXFAJ9KX2VrS5rmY.YXHdD0VsFjiTsVRLrrx9{background:none;background-color:var(--jp-white-off);color:var(--jp-black-80);text-decoration:none}.pIsYsXFAJ9KX2VrS5rmY.YXHdD0VsFjiTsVRLrrx9:hover{background-color:var(--jp-white)}.pIsYsXFAJ9KX2VrS5rmY.YXHdD0VsFjiTsVRLrrx9:hover .ehgY0qp6bl53RaxP5rFF{text-decoration-thickness:var(--jp-underline-thickness)}.pIsYsXFAJ9KX2VrS5rmY.YXHdD0VsFjiTsVRLrrx9:focus{background-color:var(--jp-white);box-shadow:0 0 0 1.5px var(--jp-black);outline:3px solid transparent}.pIsYsXFAJ9KX2VrS5rmY.Pp9cMIaESLYelLOX3tkI{box-shadow:0 0 0 1.5px var(--jp-red-60)}.w56ueQLYexqzTybA7015{align-items:center;display:flex;justify-content:space-between;margin-bottom:var(--spacing-base);width:100%}.gmPKCDKZcfQt9WieTyKS{flex-grow:1}.ZKHHfl5DhA9kUnaL0qQZ{border-radius:var(--jp-border-radius);font-size:var(--font-body-extra-small);height:var(--actions-size);line-height:var(--actions-size)}.fDBaV7I4yUO6w5AWVEtr{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:calc(var(--spacing-base)*2);min-height:var(--actions-size);width:100%}.ehgY0qp6bl53RaxP5rFF{text-decoration:underline}.f5VJYwuJmjxH8PVxEbbv{align-items:center;display:flex;height:var(--actions-size);margin-right:var(--spacing-base);white-space:nowrap}.f5VJYwuJmjxH8PVxEbbv:before{border-radius:50%;content:"";display:inline-block;height:var(--status-size);margin-left:var(--spacing-base);width:var(--status-size)}.f5VJYwuJmjxH8PVxEbbv.ry3pxoGtmQ0ZeSwp7F_3{color:var(--jp-green-50)}.f5VJYwuJmjxH8PVxEbbv.ry3pxoGtmQ0ZeSwp7F_3:before{background:var(--jp-green-50)}.f5VJYwuJmjxH8PVxEbbv.LZzE3EG7m3CDR46wwwEr{color:var(--jp-gray-50)}.f5VJYwuJmjxH8PVxEbbv.LZzE3EG7m3CDR46wwwEr:before{background:var(--jp-gray-50)}.f5VJYwuJmjxH8PVxEbbv.Vx_jpT02r8W6NfsRSB02{color:var(--jp-red-60)}.f5VJYwuJmjxH8PVxEbbv.Vx_jpT02r8W6NfsRSB02:before{background:var(--jp-red-60)}.f5VJYwuJmjxH8PVxEbbv.PdsJCfyyjSgrNDheF2qi:before{animation:dWP7ypkVXudMbAa38W5Z .5s linear infinite}@keyframes dWP7ypkVXudMbAa38W5Z{0%{opacity:0}50%{opacity:.5}to{opacity:0}}.WQVtrU6q0L1Igcj7wCrQ{margin:0;padding:0}.UujoBFTnQNY2cWU2SIsH{font-size:var(--font-headline-medium);font-weight:700;line-height:52px}.TeGO5V_thHw5lDAm1_2M{font-weight:700}.TeGO5V_thHw5lDAm1_2M,.WolQzb2MsSgiNmLtc7_j{font-size:var(--font-headline-small);line-height:40px}.WolQzb2MsSgiNmLtc7_j{font-weight:400}.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);font-weight:500;line-height:32px}.zY2No8Ga4b8shbOQGhnv{font-size:var(--font-title-small);font-weight:500;line-height:30px}.tIj0D1t8Cc892ikmgFPZ{font-size:var(--font-body);font-weight:400;line-height:24px}.KdcN0BnOaVeVhyLRKqhS{font-size:var(--font-body-small);font-weight:400;line-height:24px}.dso3Rh3tl3Xv1GumBktz{font-size:var(--font-body-extra-small);font-weight:400;line-height:20px}.PItlW5vRExLnTj4a8eLE{font-size:var(--font-body-extra-small);font-weight:600;line-height:16px}.TwRpPlktzxhmFVeua7P5{margin:calc(var( --spacing-base )*0)}.zVfqx7gyb3o9mxfGynn1{margin-left:calc(var( --spacing-base )*0);margin-right:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy{margin-bottom:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy,.xqDIp6cNVr_E6RXaiPyD{margin-top:calc(var( --spacing-base )*0)}.S8EwaXk1kyPizt6x4WH2{margin-left:calc(var( --spacing-base )*0)}.ODX5Vr1TARoLFkDDFooD{margin-bottom:calc(var( --spacing-base )*0)}.cphJ8dCpfimnky7P2FHg{margin-right:calc(var( --spacing-base )*0)}.PFgIhNxIyiSuNvQjAIYj{margin:calc(var( --spacing-base )*1)}.M2jKmUzDxvJjjVEPU3zn{margin-left:calc(var( --spacing-base )*1);margin-right:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk{margin-bottom:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk,.rcTN5uw9xIEeMEGL3Xi_{margin-top:calc(var( --spacing-base )*1)}.CQSkybjq2TcRM1Xo9COV{margin-left:calc(var( --spacing-base )*1)}.hfqOWgq6_MEGdFE82eOY{margin-bottom:calc(var( --spacing-base )*1)}.I8MxZQYTbuu595yfesWA{margin-right:calc(var( --spacing-base )*1)}.kQkc6rmdpvLKPkyoJtVQ{margin:calc(var( --spacing-base )*2)}.j6vFPxWuu4Jan2ldoxpp{margin-left:calc(var( --spacing-base )*2);margin-right:calc(var( --spacing-base )*2)}.hqr39dC4H_AbactPAkCG{margin-bottom:calc(var( --spacing-base )*2)}.c3dQnMi16C6J6Ecy4283,.hqr39dC4H_AbactPAkCG{margin-top:calc(var( --spacing-base )*2)}.YNZmHOuRo6hU7zzKfPdP{margin-left:calc(var( --spacing-base )*2)}.Db8lbak1_wunpPk8NwKU{margin-bottom:calc(var( --spacing-base )*2)}.ftsYE5J9hLzquQ0tA5dY{margin-right:calc(var( --spacing-base )*2)}.Det4MHzLUW7EeDnafPzq{margin:calc(var( --spacing-base )*3)}.h_8EEAztC29Vve1datb5{margin-left:calc(var( --spacing-base )*3);margin-right:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM{margin-bottom:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM,.soADBBkcIKCBXzCTuV9_{margin-top:calc(var( --spacing-base )*3)}.zSX59ziEaEWGjnpZa4uV{margin-left:calc(var( --spacing-base )*3)}.yrVTnq_WBMbejg89c2ZQ{margin-bottom:calc(var( --spacing-base )*3)}.UKtHPJnI2cXBWtPDm5hM{margin-right:calc(var( --spacing-base )*3)}.guexok_Tqd5Tf52hRlbT{margin:calc(var( --spacing-base )*4)}.oS1E2KfTBZkJ3F0tN7T6{margin-left:calc(var( --spacing-base )*4);margin-right:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd{margin-bottom:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd,.ot2kkMcYHv53hLZ4LSn0{margin-top:calc(var( --spacing-base )*4)}.A1krOZZhlQ6Sp8Cy4bly{margin-left:calc(var( --spacing-base )*4)}.pkDbXXXL32237M0hokEh{margin-bottom:calc(var( --spacing-base )*4)}.XXv4kDTGvEnQeuGKOPU3{margin-right:calc(var( --spacing-base )*4)}.yGqHk1a57gaISwkXwXe6{margin:calc(var( --spacing-base )*5)}.X8cghM358X3DkXLc9aNK{margin-left:calc(var( --spacing-base )*5);margin-right:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f{margin-bottom:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f,.yqeuzwyGQ7zG0avrGqi_{margin-top:calc(var( --spacing-base )*5)}.g9emeCkuHvYhveiJbfXO{margin-left:calc(var( --spacing-base )*5)}.Lvk3dqcyHbZ07QCRlrUQ{margin-bottom:calc(var( --spacing-base )*5)}.r3yQECDQ9qX0XZzXlVAg{margin-right:calc(var( --spacing-base )*5)}.aQhlPwht2Cz1X_63Miw0{margin:calc(var( --spacing-base )*6)}.JyHb0vK3wJgpblL9s5j8{margin-left:calc(var( --spacing-base )*6);margin-right:calc(var( --spacing-base )*6)}.cY2gULL1lAv6WPNIRuf3{margin-bottom:calc(var( --spacing-base )*6)}.NBWQ9Lwhh_fnry3lg_p7,.cY2gULL1lAv6WPNIRuf3{margin-top:calc(var( --spacing-base )*6)}.yIOniNe5E40C8fWvBm5V{margin-left:calc(var( --spacing-base )*6)}.t30usboNSyqfQWIwHvT3{margin-bottom:calc(var( --spacing-base )*6)}.Nm_TyFkYCMhOoghoToKJ{margin-right:calc(var( --spacing-base )*6)}.C4qJKoBXpgKtpmrqtEKB{margin:calc(var( --spacing-base )*7)}.S93Srbu6NQ_PBr7DmTiD{margin-left:calc(var( --spacing-base )*7);margin-right:calc(var( --spacing-base )*7)}.fJj8k6gGJDks3crUZxOS{margin-bottom:calc(var( --spacing-base )*7)}.cW6D6djs7Ppm7fD7TeoV,.fJj8k6gGJDks3crUZxOS{margin-top:calc(var( --spacing-base )*7)}.DuCnqNfcxcP3Z__Yo5Ro{margin-left:calc(var( --spacing-base )*7)}.im8407m2fw5vOg7O2zsw{margin-bottom:calc(var( --spacing-base )*7)}.G0fbeBgvz2sh3uTP9gNl{margin-right:calc(var( --spacing-base )*7)}.kvW3sBCxRxUqz1jrVMJl{margin:calc(var( --spacing-base )*8)}.tOjEqjLONQdkiYx_XRnw{margin-left:calc(var( --spacing-base )*8);margin-right:calc(var( --spacing-base )*8)}.op5hFSx318zgxsoZZNLN{margin-bottom:calc(var( --spacing-base )*8)}.c9WfNHP6TFKWIfLxv52J,.op5hFSx318zgxsoZZNLN{margin-top:calc(var( --spacing-base )*8)}.sBA75QqcqRwwYSHJh2wc{margin-left:calc(var( --spacing-base )*8)}.GpL6idrXmSOM6jB8Ohsf{margin-bottom:calc(var( --spacing-base )*8)}.HbtWJoQwpgGycz8dGzeT{margin-right:calc(var( --spacing-base )*8)}.uxX3khU88VQ_Ah49Ejsa{padding:calc(var( --spacing-base )*0)}.KX0FhpBKwKzs9fOUdbNz{padding-left:calc(var( --spacing-base )*0);padding-right:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz{padding-bottom:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz,.emxLHRjQuJsImnPbQIzE{padding-top:calc(var( --spacing-base )*0)}.kJ8WzlpTVgdViXt8ukP9{padding-left:calc(var( --spacing-base )*0)}.tg_UIUI11VBzrTAn2AzJ{padding-bottom:calc(var( --spacing-base )*0)}.uczvl8kaz84oPQJ2DB2R{padding-right:calc(var( --spacing-base )*0)}.o7UHPcdVK3lt7q3lqV4o{padding:calc(var( --spacing-base )*1)}.IDqEOxvDoYrFYxELPmtX{padding-left:calc(var( --spacing-base )*1);padding-right:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2{padding-bottom:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2,.npy3hw4A5QSkDicb2CJJ{padding-top:calc(var( --spacing-base )*1)}.LgbptTApNY5NwLQvEFAt{padding-left:calc(var( --spacing-base )*1)}.WZQy2SZuZso59bUsXXyl{padding-bottom:calc(var( --spacing-base )*1)}.o331apInxNunbYB3SfPE{padding-right:calc(var( --spacing-base )*1)}.fMPIyD9Vqki1Lrc_yJnG{padding:calc(var( --spacing-base )*2)}.i2pMcTcdrr10IQoiSm_L{padding-left:calc(var( --spacing-base )*2);padding-right:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH{padding-bottom:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH,.o9bGieUKcYc8o0Ij9oZX{padding-top:calc(var( --spacing-base )*2)}.SwZcFez1RDqWsOFjB5iG{padding-left:calc(var( --spacing-base )*2)}.eHpLc_idmuEqeqCTvqkN{padding-bottom:calc(var( --spacing-base )*2)}.vU39i2B4P1fUTMB2l6Vo{padding-right:calc(var( --spacing-base )*2)}.JHWNzBnE29awhdu5BEh1{padding:calc(var( --spacing-base )*3)}.X72lGbb56L3KFzC2xQ9N{padding-left:calc(var( --spacing-base )*3);padding-right:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e{padding-bottom:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e,.srV0KSDC83a2fiimSMMQ{padding-top:calc(var( --spacing-base )*3)}.lUWfkmbQjCskhcNwkyCm{padding-left:calc(var( --spacing-base )*3)}.Ts0dIlc3aTSL7V4cIHis{padding-bottom:calc(var( --spacing-base )*3)}.CzlqQXXhX6MvorArFZ8B{padding-right:calc(var( --spacing-base )*3)}.TqMPkQtR_DdZuKb5vBoV{padding:calc(var( --spacing-base )*4)}.a7UrjhI69Vetlcj9ZVzz{padding-left:calc(var( --spacing-base )*4);padding-right:calc(var( --spacing-base )*4)}.StEhBzGs2Gi5dDEkjhAv{padding-bottom:calc(var( --spacing-base )*4)}.FGneZfZyvYrt1dG0zcnm,.StEhBzGs2Gi5dDEkjhAv{padding-top:calc(var( --spacing-base )*4)}.APEH216rpdlJWgD2fHc8{padding-left:calc(var( --spacing-base )*4)}.oGwXC3ohCic9XnAj6x69{padding-bottom:calc(var( --spacing-base )*4)}.U6gnT9y42ViPNOcNzBwb{padding-right:calc(var( --spacing-base )*4)}.IpdRLBwnHqbqFrixgbYC{padding:calc(var( --spacing-base )*5)}.HgNeXvkBa9o3bQ5fvFZm{padding-left:calc(var( --spacing-base )*5);padding-right:calc(var( --spacing-base )*5)}.tJtFZM3XfPG9v9TSDfN1{padding-bottom:calc(var( --spacing-base )*5)}.PdifHW45QeXYfK568uD8,.tJtFZM3XfPG9v9TSDfN1{padding-top:calc(var( --spacing-base )*5)}.mbLkWTTZ0Za_BBbFZ5b2{padding-left:calc(var( --spacing-base )*5)}.vVWpZpLlWrkTt0hMk8XU{padding-bottom:calc(var( --spacing-base )*5)}.RxfaJj5a1Nt6IavEo5Zl{padding-right:calc(var( --spacing-base )*5)}.SppJULDGdnOGcjZNCYBy{padding:calc(var( --spacing-base )*6)}.palY2nLwdoyooPUm9Hhk{padding-left:calc(var( --spacing-base )*6);padding-right:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_{padding-bottom:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_,.YEEJ9b90ueQaPfiU8aeN{padding-top:calc(var( --spacing-base )*6)}.QE0ssnsKvWJMqlhPbY5u{padding-left:calc(var( --spacing-base )*6)}.n8yA3jHlMRyLd5UIfoND{padding-bottom:calc(var( --spacing-base )*6)}.tXHmxYnHzbwtfxEaG51n{padding-right:calc(var( --spacing-base )*6)}.kBTsPKkO_3g_tLkj77Um{padding:calc(var( --spacing-base )*7)}.RyhrFx6Y1FGDrGAAyaxm{padding-left:calc(var( --spacing-base )*7);padding-right:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO{padding-bottom:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO,.vQVSq6SvWKbOMu6r4H6b{padding-top:calc(var( --spacing-base )*7)}.oBy5__aEADMsH46mrgFX{padding-left:calc(var( --spacing-base )*7)}.KVEXoJqf1s92j0JMdNmN{padding-bottom:calc(var( --spacing-base )*7)}.ZMXGNrNaKW3k_3TLz0Fq{padding-right:calc(var( --spacing-base )*7)}.tuiR9PhkHXhGyEgzRZRI{padding:calc(var( --spacing-base )*8)}.U7454qyWkQNa2iaSJziu{padding-left:calc(var( --spacing-base )*8);padding-right:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8{padding-bottom:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8,.X1rm9DQ1zLGLfogja5Gn{padding-top:calc(var( --spacing-base )*8)}.JS7G6kAuqJo5GIuF8S5t{padding-left:calc(var( --spacing-base )*8)}.Y8F9ga1TDCMbM1lj4gUz{padding-bottom:calc(var( --spacing-base )*8)}.AJuyNGrI63BOWql719H8{padding-right:calc(var( --spacing-base )*8)}.jErCC9oKHSM15BxzFyQK{margin-bottom:0}.oVoYbwbFB6U2o90Njusk{font-size:16px;margin:0}.oVoYbwbFB6U2o90Njusk.is-error{background-color:var(--jp-red-0)}.oVoYbwbFB6U2o90Njusk .components-notice__content{align-items:center;display:flex;margin:0;padding:12px 4px}.oVoYbwbFB6U2o90Njusk .components-notice__content>svg{fill:var(--jp-red-60)}.oVoYbwbFB6U2o90Njusk .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.oVoYbwbFB6U2o90Njusk .components-notice__dismiss{align-self:center}.wBVXH4OTNwLHPRpN4nsq{margin-right:8px}.sexr0jUxC1jVixdKiDnC{margin-right:-20px}@media(max-width:782px){.sexr0jUxC1jVixdKiDnC{margin-right:-10px}}.sexr0jUxC1jVixdKiDnC.vKQ11sLeAM45M04P1ccj{background-color:var(--jp-white)}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1128px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;max-width:var(--max-container-width);width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));padding:0 24px}}.SqdhUZkXCRuIpErj1B3z.OZC_9a1LhpWF9dv15Gdh{max-width:none;padding:unset}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.jp-dashboard-footer{align-items:center;color:#000;display:flex;flex-flow:row wrap;justify-content:space-between;max-width:1128px;width:100%}.jp-dashboard-footer a,.jp-dashboard-footer a:hover,.jp-dashboard-footer a:visited{color:#000;text-decoration:none}.jp-dashboard-footer__jetpack-symbol,.jp-dashboard-footer__module-name{display:inline-block;vertical-align:middle}.jp-dashboard-footer__module-name{font-size:12px;font-weight:600;margin-right:5px}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off)}.sDAzdUdcbaYmUMZBe2XW{fill:#2c3338}.cuoSlhSNrqf1dozY22Xb{fill:#000}.JLquNpQVlysAamuh5lJO,.lAIiifeLMmZAPlQ9n9ZR{fill:var(--jp-green-primary)}.cbOwD8Y4tFjwimmtchQI{fill:#757575}.cbOwD8Y4tFjwimmtchQI.aHOlEBGD5EA8NKRw3xTw{fill:var(--color-facebook);border-radius:50%!important}.cbOwD8Y4tFjwimmtchQI.af4Y_zItXvLAOEoSDPSv{fill:var(--color-twitter)}.cbOwD8Y4tFjwimmtchQI.f68aqF3XSD1OBvXR1get{fill:var(--color-linkedin)}.cbOwD8Y4tFjwimmtchQI.xFI0dt3UiXRlRQdqPWkx{fill:var(--color-tumblr)}.cbOwD8Y4tFjwimmtchQI.q7JEoyymveP6kF747M43{fill:var(--color-gplus)}.cAbGtJDGgLubucBnz7vM{background-color:var(--jp-white)}.wiobThfXJCuhGNrbFIT6 a,.wiobThfXJCuhGNrbFIT6 a:active,.wiobThfXJCuhGNrbFIT6 a:hover{color:var(--jp-black)}.VgAxgahF9bC2M__FiIgV{margin-bottom:calc(var(--spacing-base)*3)}.Doju0RxvvN9JS12mf489{line-height:calc(var(--spacing-base)*3);margin:0 0 var(--spacing-base) 0}.zI5tJ_qhWE6Oe6Lk75GY{--wp-admin-theme-color:var(--jp-black);--wp-admin-theme-color-darker-10:var(--jp-black-80);--wp-admin-theme-color-darker-20:var(--jp-black-80);--wp-admin-border-width-focus:1.5px;border-radius:var(--jp-border-radius);font-weight:600;justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF{font-size:var(--font-body);height:auto;line-height:24px;padding:var(--spacing-base) calc(var(--spacing-base)*3)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF.paGLQwtPEaJmtArCcmyK{padding:var(--spacing-base) calc(var(--spacing-base)*2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14{font-size:var(--font-body-extra-small);height:auto;line-height:20px;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14.paGLQwtPEaJmtArCcmyK>svg:first-child{margin-left:calc(var(--spacing-base)/2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14>.components-spinner{height:20px}.zI5tJ_qhWE6Oe6Lk75GY.lZAo6_oGfclXOO9CC6Rd{font-weight:400}.zI5tJ_qhWE6Oe6Lk75GY.is-primary:disabled,.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:disabled{background:var(--jp-gray);color:var(--jp-gray-20)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:active:not(:disabled),.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:hover:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-link.Na39I683LAaSA99REg14,.zI5tJ_qhWE6Oe6Lk75GY.is-link.ipS7tKy9GntCS4R3vekF{padding:0}.zI5tJ_qhWE6Oe6Lk75GY.is-link:hover:not(:disabled){text-decoration-thickness:3px}.zI5tJ_qhWE6Oe6Lk75GY.is-link:focus:not(:disabled){text-decoration-line:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:not(:disabled){background:var(--jp-red-50);box-shadow:inset 0 0 0 1px var(--jp-red-50);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:hover:not(:disabled){background:var(--jp-red-60);box-shadow:inset 0 0 0 1px var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:focus:not(:disabled){background:var(--jp-red-70);box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:active:not(:disabled){background:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:not(:disabled){background:var(--jp-white);box-shadow:inset 0 0 0 1px var(--jp-red-50);color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:hover:not(:disabled){background:var(--jp-red-0);box-shadow:inset 0 0 0 1px var(--jp-red-60);color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:active:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:not(:disabled){color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:hover:not(:disabled){box-shadow:none;color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6{position:relative}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6.has-icon{justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>:not(.components-spinner){visibility:hidden}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>.components-spinner{margin:0;position:absolute}.CDuBjJp_8jxzx5j6Nept{margin-right:calc(var(--spacing-base)/2)}.jp-connection-status-card h3{color:var(--jp-black);font-size:var(--font-title-large);font-weight:700;line-height:1.1;margin:0}.jp-connection-status-card a,.jp-connection-status-card a:active,.jp-connection-status-card a:hover{color:var(--jp-black)}.jp-connection-status-card p{color:var(--jp-black);margin:16px 0}.jp-connection-status-card a,.jp-connection-status-card li,.jp-connection-status-card p{font-size:var(--font-body);line-height:24px}.jp-connection-status-card--status{align-items:center;display:flex;margin:24px -6px 24px 0}.jp-connection-status-card--cloud{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDIiIGhlaWdodD0iNDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PG1hc2sgaWQ9ImEiIG1hc2stdHlwZT0iYWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjciIHk9IjkiIHdpZHRoPSIyOCIgaGVpZ2h0PSIyMSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMC4zMzMgMTcuNjk3di0uMDhjMC00LjI1My0zLjc2LTcuNy04LjQtNy43LTMuOTE2IDAtNy4yMDYgMi40NTctOC4xMzYgNS43OGE2LjM4NiA2LjM4NiAwIDAgMC0uMjY0LS4wMDVDOS45MjUgMTUuNjkyIDcgMTguNzA4IDcgMjIuNDI5czIuOTI1IDYuNzM4IDYuNTMzIDYuNzM4SDI5LjRjMy4wOTMgMCA1LjYtMi41ODYgNS42LTUuNzc1IDAtMi44NjEtMi4wMTgtNS4yMzctNC42NjYtNS42OTVaIiBmaWxsPSIjZmZmIi8+PC9tYXNrPjxnIG1hc2s9InVybCgjYSkiPjxwYXRoIGQ9Im0zMC4zMzMgMTcuNjk3LTIuNjI1LS4wMy0uMDI1IDIuMjM1IDIuMjAyLjM4MS40NDgtMi41ODZabS0xNi41MzctMi0uMTA3IDIuNjIzIDIuMDc1LjA4NS41Ni0yLTIuNTI4LS43MDhabS0uMjYzIDEzLjQ3djIuNjI1aC4wMDhsLS4wMDgtMi42MjVabS4wNCAwdi0yLjYyNWgtLjAwOWwuMDA4IDIuNjI1Wm0xNS43OTUgMCAuMDE1LTIuNjI1aC0uMDE1djIuNjI1Wm0zLjU5LTExLjQ0MXYtLjExaC01LjI1di4wNTJsNS4yNS4wNThabTAtLjExYzAtNS45MTItNS4xNTUtMTAuMzI0LTExLjAyNS0xMC4zMjR2NS4yNWMzLjQxIDAgNS43NzUgMi40ODIgNS43NzUgNS4wNzVoNS4yNVpNMjEuOTMzIDcuMjkzYy00Ljk4NCAwLTkuMzg4IDMuMTM5LTEwLjY2NCA3LjY5OGw1LjA1NSAxLjQxNWMuNTg1LTIuMDg5IDIuNzYyLTMuODYzIDUuNjEtMy44NjN2LTUuMjVabS04LjAzIDUuNzgyYTkuMTExIDkuMTExIDAgMCAwLS4zNy0uMDA3djUuMjVjLjA1MyAwIC4xMDUuMDAxLjE1Ni4wMDNsLjIxNS01LjI0NlptLS4zNy0uMDA3Yy01LjEzMyAwLTkuMTU4IDQuMjY4LTkuMTU4IDkuMzYyaDUuMjVjMC0yLjM0OCAxLjgyNS00LjExMiAzLjkwOC00LjExMnYtNS4yNVptLTkuMTU4IDkuMzYyYzAgNS4wOTUgNC4wMjUgOS4zNjMgOS4xNTggOS4zNjN2LTUuMjVjLTIuMDgzIDAtMy45MDgtMS43NjUtMy45MDgtNC4xMTNoLTUuMjVabTkuMTY2IDkuMzYzaC4wNGwtLjAxNy01LjI1aC0uMDM5bC4wMTYgNS4yNVptLjAzMSAwaDE1Ljc5NnYtNS4yNUgxMy41NzJ2NS4yNVptMTUuODI3LTUuMjVoLS4wMTZsLS4wMyA1LjI1aC4wNDZ2LTUuMjVabTIuOTc1LTMuMTVjMCAxLjgxNi0xLjQwNyAzLjE1LTIuOTc1IDMuMTV2NS4yNWM0LjYxOCAwIDguMjI1LTMuODM4IDguMjI1LTguNGgtNS4yNVptLTIuNDg5LTMuMTA5YzEuMzU1LjIzNSAyLjQ5IDEuNDg4IDIuNDkgMy4xMDloNS4yNWMwLTQuMTAyLTIuOTAyLTcuNi02Ljg0NC04LjI4MmwtLjg5NiA1LjE3M1oiIGZpbGw9IiMxRTFFMUUiLz48L2c+PC9zdmc+);height:42px;margin-left:4px;width:42px}.jp-connection-status-card--jetpack-logo{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE2IDMyYzguODM3IDAgMTYtNy4xNjMgMTYtMTZTMjQuODM3IDAgMTYgMCAwIDcuMTYzIDAgMTZzNy4xNjMgMTYgMTYgMTZaIiBmaWxsPSIjMDAwIi8+PHBhdGggZD0iTTE2Ljc5NCAxMy4zMTN2MTUuNTExbDgtMTUuNTEyaC04Wk0xNS4xNzUgMTguNjU3VjMuMTc2bC03Ljk2OSAxNS40OGg3Ljk3WiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==);height:32px;margin-right:11px;width:32px}.jp-connection-status-card--btn-connect-user{font-size:var(--font-body);font-weight:400;line-height:24px}.jp-connection-status-card--avatar{background-color:var(--jp-white);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='16' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.498 27.123C6.038 24.165 10.916 21.5 16 21.5c5.084 0 9.963 2.665 11.502 5.623a15.952 15.952 0 0 1-11.257 4.875L16 32l-.245-.002a15.952 15.952 0 0 1-11.257-4.875zM16 8a6 6 0 1 1 0 12 6 6 0 0 1 0-12z' fill='%23A2AAB2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;border:0;border-radius:20px;height:32px;margin-right:-10px;width:32px}.jp-connection-status-card--line{border-top:2px solid var(--jp-black);height:0;width:67px}.jp-connection-status-card--line.jp-connection-status-card--site-only{border-top-style:dashed}.jp-connection-status-card--list{list-style-type:none;margin:16px 0}.jp-connection-status-card--list li{color:var(--jp-black);margin:0 -3px 8px 0;padding-right:25px}.jp-connection-status-card--list-item-success{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTE4LjkzNSA2LTguOSAxMS45Ny01LjE2Mi0zLjgzNyIgc3Ryb2tlPSIjMUUxRTFFIiBzdHJva2Utd2lkdGg9IjEuNSIvPjwvc3ZnPg==) no-repeat 100% 0}.jp-connection-status-card--list-item-error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 100% 0;color:var(--jp-red-60)!important}.jp-connection-status-card--list-item-info{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjMDAwIi8+PC9zdmc+) no-repeat 100% 0}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-small);font-weight:600;line-height:1.2;margin-top:0}.jp-connection__disconnect-dialog h2{font-size:var(--font-title-small);font-weight:400;line-height:1.2;margin:0}.jp-connection__disconnect-dialog p{font-size:var(--font-body);margin-top:0}.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog__large-text{font-size:1.25rem}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link,.jp-connection__disconnect-dialog__link{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:hover,.jp-connection__disconnect-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:focus,.jp-connection__disconnect-dialog__link:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link--bold,.jp-connection__disconnect-dialog__link--bold{font-weight:700}.jp-connection__disconnect-dialog .components-button{border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection__disconnect-dialog .components-modal__content{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0}.jp-connection__disconnect-dialog .components-modal__content:before,.jp-connection__disconnect-dialog .components-modal__header{display:none}.jp-connection__disconnect-dialog .jp-row{align-items:center;width:calc(100% - 48px)}.jp-connection__disconnect-dialog__content{align-items:center;background:var(--jp-white-off);border-radius:4px;display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0;padding:2rem 1rem;text-align:center}.jp-connection__disconnect-dialog__actions{background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;padding:2rem 0;position:sticky}.jp-connection__disconnect-dialog__actions p{margin-bottom:0}.jp-connection__disconnect-dialog__actions:before{background:linear-gradient(to bottom,transparent,var(--jp-white-off));bottom:calc(100% + 1px);content:"";display:block;height:80px;position:absolute;right:0;width:100%}.jp-connection__disconnect-dialog__btn-dismiss,.jp-connection__disconnect-dialog__btn-dismiss.components-button{background:var(--jp-black)!important;margin-left:10px}.jp-connection__disconnect-dialog__btn-disconnect{background:var(--jp-red)!important}.jp-connection__disconnect-dialog__btn-back-to-wp{background:var(--jp-black)!important}.jp-connection__disconnect-dialog__button-wrap{text-align:right}@media(min-width:960px){.jp-connection__disconnect-dialog__button-wrap{text-align:center}}.jp-connection__disconnect-dialog__error{color:var(--jp-red)}.jp-connection__disconnect-dialog__survey{margin-bottom:1.5rem;max-width:100%}.jp-connection__disconnect-dialog__step-copy{margin:0 auto;max-width:800px}.jp-connection__disconnect-dialog__step-copy--narrow{max-width:600px}@media(max-height:900px){.jp-connection__disconnect-dialog__content .jp-components__decorative-card{display:none}}@media(min-width:600px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{max-width:calc(100% - 32px);width:100%}.jp-connection__disconnect-dialog__actions,.jp-connection__disconnect-dialog__content{padding:2rem}}@media(min-width:960px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{display:flex;flex-direction:column;height:900px;width:1200px}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-large)}.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog__large-text{font-size:1.5rem}.jp-connection__disconnect-dialog__content{padding:80px}.jp-connection__disconnect-dialog__actions{padding:2rem 3rem}.jp-row{margin-right:0}}.jp-connection__disconnect-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:0 auto 1rem;max-width:100%;padding:1rem 2rem;text-align:right;width:800px}.jp-connection__disconnect-card__group{margin-bottom:1rem;max-width:100%}.jp-connection__disconnect-card__card-content{display:block;font-size:.875rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-content{align-items:center;display:flex;justify-content:space-between}}.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{flex-shrink:0;font-size:1.25rem;font-weight:600;margin-bottom:0;margin-top:0}@media only screen and (min-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{font-size:1.5rem;margin-left:1.5rem}}@media only screen and (max-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block,.jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block{margin-top:.5rem}}.jp-connection__disconnect-card__card-stat-block{align-items:baseline;display:flex;flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat-block{flex-direction:row-reverse}}.jp-connection__disconnect-card__card-description{flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-description{text-align:left}}.jp-connection__disconnect-card__card-stat{font-size:1rem;font-weight:600;margin-left:.5rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat{font-size:1.5rem;margin-left:0;margin-right:1rem}}.jp-components__decorative-card{border-radius:8px;box-shadow:0 0 15px var(--jp-gray);display:flex;height:280px;margin:0 auto 3rem;max-width:100%;overflow:hidden;position:relative;width:360px}.jp-components__decorative-card__content,.jp-components__decorative-card__image{width:50%}.jp-components__decorative-card__image{background:var(--jp-gray);background-size:cover;position:relative}.jp-components__decorative-card__image:before{background-image:url('data:image/svg+xml;uf8,<svg width="38" height="8" viewBox="0 0 38 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 7C1 7 2.37087 1 6.89831 1C11.4257 1 14.3709 7 18.8983 7C23.4257 7 26.7777 1 31.3051 1C35.912 1 37 7 37 7" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>');content:"";display:block;height:8px;position:absolute;right:24px;top:24px;width:38px}.jp-components__decorative-card__content{background:#fff;padding:2rem}.jp-components__decorative-card__icon-container{background:var(--jp-red);border-radius:50px;height:80px;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:80px}.jp-components__decorative-card__icon{background-position:50%,50%;background-repeat:no-repeat;height:40px;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:40px}.jp-components__decorative-card__icon--unlink{background-image:url('data:image/svg+xml;uf8,<svg width="34" height="37" viewBox="0 0 34 37" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.3335 10.001H25.0002C29.4184 10.001 33.0002 13.5827 33.0002 18.001V19.7788C33.0002 24.197 29.4184 27.7788 25.0002 27.7788H22.3335" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M11.6675 27.7783L9.00082 27.7783C4.58254 27.7783 1.00081 24.1966 1.00081 19.7783L1.00081 18.0005C1.00081 13.5823 4.58253 10.0005 9.00081 10.0005L11.6675 10.0005" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M10.9998 19.167L16.9998 19.167" stroke="white" stroke-width="1.5"/> <path d="M8.99951 35.998L24.9995 0.998048" stroke="white"/> </svg>')}.jp-components__decorative-card__lines,.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{background:#e9eff5;border-radius:6px;display:block;height:12px;position:relative;width:100%}.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{content:"";top:calc(100% + 16px)}.jp-components__decorative-card__lines:after{top:calc(100% + 32px);width:75%}.jp-components__decorative-card--vertical{flex-direction:column}.jp-components__decorative-card--vertical .jp-components__decorative-card__content,.jp-components__decorative-card--vertical .jp-components__decorative-card__image{height:50%;width:100%}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines{margin-left:auto;margin-right:auto;max-width:135px}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:after,.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:before{margin-left:auto;margin-right:auto}.jp-connect__disconnect-survey-card{border:2px solid transparent;border-radius:4px;box-shadow:0 0 15px var(--jp-gray-off);margin-left:auto;margin-right:auto;max-width:100%;padding:1rem;position:relative;text-align:right;width:800px}.jp-connect__disconnect-survey-card--selected{background:var(--jp-gray-off);border-color:var(--jp-black)}.jp-connect__disconnect-survey-card:after{border-left:2px solid var(--jp-black);border-top:2px solid var(--jp-black);content:"";display:block;height:5px;left:1.5rem;position:absolute;top:50%;transform:translateY(-50%) rotate(-45deg);width:5px}.jp-connect__disconnect-survey-card:hover{cursor:pointer}.jp-connect__disconnect-survey-card:focus:not(.jp-disconnect-survey-card--selected),.jp-connect__disconnect-survey-card:hover:not(.jp-disconnect-survey-card--selected){border-color:var(--jp-black-80)}.jp-connect__disconnect-survey-card__answer{align-items:center;display:flex;font-weight:700;margin:0}input.jp-connect__disconnect-survey-card__input{-webkit-appearance:none;background-color:transparent;border:none;color:var(--jp-black-80);flex-grow:1;max-width:calc(100% - 40px);padding-left:40px}.zvd4dCB_bBDiXJKKDqXm{position:relative}.ly4o9lSswAGHFXqGUEIO{left:32px;position:absolute;top:32px;z-index:1}.u64Go3kwEZ7MD9eji0H1{color:var(--jp-gray-50);font-size:13px;margin-bottom:16px;width:60%}._RT41NE3LU4R0ubcij2y{align-items:center;display:flex}.cFGWJeRiGHjAr8D7CWJW{margin-left:8px;width:100px}.Iz3l7a05TP6HK9S92TIL{width:16px}.lmQ0wFmnk4kKkGVjokPA{height:18px;margin-right:8px}.AoIs8wD92wKR8RpQj6Uc{align-items:center;display:inline-flex}.rV_5QyvhDnsVjCX4pb0h{--gray-90:#1e1e1e;fill:var(--gray-90);width:24px}.MO1jDNY8VPqeNS9xL8jE{align-items:center;display:flex;text-decoration:none}.jp-connection__connect-screen__loading{display:none}.jp-connection__connect-screen__tos{margin-top:28px;max-width:360px}.jp-connection__connect-screen .jp-action-button{margin-top:40px}.jp-connection__connect-screen .jp-action-button button{max-width:100%}.jp-connection__connect-screen .jp-action-button button:disabled{color:hsla(0,0%,100%,.4)}@media(max-width:782px){.jp-connection__connect-screen .jp-action-button button{max-width:none;width:100%}}.jp-connection__connect-screen__footer{margin-top:32px}.jp-connection__connect-screen-layout{background:var(--jp-white);border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.08)}.jp-connection__connect-screen-layout__loading{display:none}.jp-connection__connect-screen-layout__left,.jp-connection__connect-screen-layout__right{box-sizing:border-box}.jp-connection__connect-screen-layout__left{padding:25px}@media(min-width:600px){.jp-connection__connect-screen-layout__left{padding:64px 96px}}.jp-connection__connect-screen-layout__left .jetpack-logo{margin-bottom:24px}.jp-connection__connect-screen-layout__left h2{color:var(--jp-black);font-size:36px;font-style:normal;font-weight:700;line-height:40px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left h3{color:var(--jp-black);font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left li,.jp-connection__connect-screen-layout__left p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.jp-connection__connect-screen-layout__left p{color:#101517;margin:16px 0}.jp-connection__connect-screen-layout__left a{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__connect-screen-layout__left a:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-layout__left a:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__connect-screen-layout__left ul{list-style-type:none;padding:0}.jp-connection__connect-screen-layout__left ul li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-right:30px}.jp-connection__connect-screen-layout__right{padding:64px 0}.jp-connection__connect-screen-layout__right img{max-width:100%}.jp-connection__connect-screen-layout__two-columns{display:flex;flex-wrap:wrap}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:100%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:52%}}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{background:#f9f9f6;display:none;flex-basis:47%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{display:block}}.jp-action-button--button{background:#000}.jp-action-button--button,.jp-action-button--button.components-button{border-radius:4px;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-style:normal;font-weight:600;height:40px;line-height:18px;min-width:264px;text-align:center}.jp-action-button__error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 100% 0;color:var(--jp-red)!important;line-height:25px!important;padding-right:25px}.SWwV4Pw6OZ5vU3PqPXmr{--product-card-shadow:rgb(0 0 0/3%);background-color:var(--jp-white);border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);box-shadow:0 2px 6px var(--product-card-shadow),0 1px 2px var(--product-card-shadow)}.r7tUofa9Z3A5ziKVR1H7{align-items:center;display:flex}.r7tUofa9Z3A5ziKVR1H7 img{object-fit:cover;width:100%}.hdasSNj9k3Sc5PwXK4uE{margin-left:4px;width:16px}.eWN8Hj0SBRDq1F48n_Fg{--gray-70:#3c434a;align-items:center;color:var(--gray-70);display:flex;font-size:14px;text-decoration:none}.q0T8YyQxRawhpDtvJjxI{background-color:var(--jp-white);height:100%;padding:calc(var(--spacing-base)*8);position:relative}.B7JDqI_vtKxSy5GjvqA1{display:flex;flex-direction:column;height:100%}.zj7xadmhIWeuf7ZwvVTS{align-items:center;background:var(--jp-black);border-radius:var(--jp-border-radius) var(--jp-border-radius) 0 0;color:var(--jp-white);display:flex;height:calc(var(--spacing-base)*4);padding:0 var(--spacing-base);position:absolute;right:0;top:0;width:100%}.GsioW6IsC8EMYE3U6788{fill:var(--jp-white);margin-left:var(--spacing-base)}.cfEO8udWbRGPFJzW8Jg5,.dbz07JqxOlivjKO4vBEF{align-items:center;display:flex;height:calc(var(--spacing-base)*4);margin-bottom:calc(var(--spacing-base)*4)}.zlh3zbjUe4Z8cBs7uVVe{fill:#8c8f94;height:24px;line-height:24px}.qoZuzG5EcDa231hC6t0P{align-items:center;display:flex;justify-content:center}.qoZuzG5EcDa231hC6t0P svg{margin-left:var(--spacing-base)}.Q6uUUQCPWS6_6nLxIn68{display:inline-block;min-height:42px;padding:8px 60px;text-align:center;width:100%}.Q6uUUQCPWS6_6nLxIn68 .YU4iBCRze09ZP3iCsdcb{margin:0}.Q6uUUQCPWS6_6nLxIn68.is-secondary:hover:not(:disabled){background-color:var(--jp-black);color:var(--jp-white)}.Q1jaYDpa2AVfJpA29wT0{flex-grow:1;margin:0;margin-bottom:calc(var(--spacing-base)*2);padding:0}.Q1jaYDpa2AVfJpA29wT0 li{align-items:start;display:flex;list-style:none;margin-bottom:var(--spacing-base)}.Q1jaYDpa2AVfJpA29wT0 svg{fill:var(--jp-green-primary);flex-shrink:0;margin-left:var(--spacing-base)}.xgv3jRkeF39aEQELCwru{align-items:flex-end;color:var(--jp-text-color);display:flex;flex-wrap:wrap}.twlleZ5Ehq4bB7CvKVSW{position:relative}.twlleZ5Ehq4bB7CvKVSW:first-child{margin-left:calc(var(--spacing-base)*2)}.twlleZ5Ehq4bB7CvKVSW.Qg4rPEvXsqmod1s_31d8{color:var(--jp-gray-20)}.twlleZ5Ehq4bB7CvKVSW.Qg4rPEvXsqmod1s_31d8:after{background:var(--jp-red);border-radius:var(--jp-border-radius);content:" ";display:block;height:3px;margin-top:-2px;pointer-events:none;position:absolute;top:50%;width:100%}.ApsgxIornVy_3KnciVeJ{color:var(--jp-gray-40);margin-bottom:calc(var(--spacing-base)*3)}.NMxcZL17aEP7v81uG3zD{margin-top:calc(var(--spacing-base)*5)}.jp-license-activation-screen-controls{background:var(--jp-white);display:flex;flex-direction:column;justify-content:space-between;padding:32px}.jp-license-activation-screen-controls h1{font-size:44px;font-weight:700;line-height:1.4;margin:.67em 0}.jp-license-activation-screen-controls p{font-size:var(--font-body);margin:1em 0}.jp-license-activation-screen-controls label{font-size:var(--font-body);font-weight:600}@media screen and (min-width:780px){.jp-license-activation-screen-controls{padding:64px}}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field label,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error label{font-size:var(--font-body);font-weight:600}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field input.components-text-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error input.components-text-control__input{border-radius:var(--jp-border-radius);font-size:18px;line-height:24px;margin:0;min-height:48px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field input.components-text-control__input{border:1px solid var(--jp-gray-40)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error input.components-text-control__input{border:1px solid var(--jp-red)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error{align-items:start;color:var(--jp-red);display:flex;flex-direction:row}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error svg{fill:var(--jp-red);margin-left:4px;min-width:24px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error span{font-size:var(--font-body)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active{background-color:var(--jp-black);border-radius:4px;color:var(--jp-white);display:flex;font-size:16px;font-size:var(--font-body);font-style:normal;font-weight:600;justify-content:center;line-height:24px;margin-top:24px;min-height:48px;min-width:158px;padding:13.5px 45px;width:100%}@media screen and (min-width:480px){.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active{width:auto}}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active:hover,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:hover{background-color:var(--jp-black-80);color:var(--jp-white)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active:focus,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:focus{background-color:var(--jp-black-80);border:1px solid var(--jp-white);color:var(--jp-white)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active:disabled,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active[disabled],.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:disabled,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button[disabled]{background-color:var(--jp-gray);color:var(--jp-gray-20)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button .jp-components-spinner,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active .jp-components-spinner{width:100%}@keyframes rotate-spinner{to{transform:rotate(-1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-left-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}.jp-license-activation-screen-illustration{align-items:center;background:var(--jp-white-off);display:flex;flex-direction:column;justify-content:space-between;padding:32px}.jp-license-activation-screen-illustration--wrapper{display:flex;flex:1}.jp-license-activation-screen-illustration--wrapper img{align-self:center;height:auto;max-width:100%}.jp-license-activation-screen-illustration--support-link{flex:0}.jp-license-activation-screen-success-info--product-details h1{line-height:52px}.jp-license-activation-screen-success-info--product-details a{color:var(--jp-black);text-decoration:underline!important}.jp-license-activation-screen-success-info--external-link{color:var(--jp-black);font-size:16px;font-style:normal;font-weight:600;text-decoration:underline!important;white-space:nowrap}.components-button.jp-license-activation-screen-success-info--button,.components-button.jp-license-activation-screen-success-info--button:active,.components-button.jp-license-activation-screen-success-info--button:visited{background-color:var(--jp-black);border-radius:4px;color:var(--jp-white);font-size:16px;font-size:var(--font-body);font-style:normal;font-weight:600;justify-content:center;line-height:24px;margin:0 0 20px 40px;min-height:48px;min-width:158px;padding:13.5px 45px;width:100%}@media screen and (min-width:480px){.components-button.jp-license-activation-screen-success-info--button,.components-button.jp-license-activation-screen-success-info--button:active,.components-button.jp-license-activation-screen-success-info--button:visited{width:auto}}.components-button.jp-license-activation-screen-success-info--button:active:hover,.components-button.jp-license-activation-screen-success-info--button:hover,.components-button.jp-license-activation-screen-success-info--button:visited:hover{background-color:var(--jp-black-80);color:var(--jp-white)}.components-button.jp-license-activation-screen-success-info--button:active:focus,.components-button.jp-license-activation-screen-success-info--button:focus,.components-button.jp-license-activation-screen-success-info--button:visited:focus{background-color:var(--jp-black-80);border:1px solid var(--jp-white);color:var(--jp-white)}.components-button.jp-license-activation-screen-success-info--button:active:disabled,.components-button.jp-license-activation-screen-success-info--button:active[disabled],.components-button.jp-license-activation-screen-success-info--button:disabled,.components-button.jp-license-activation-screen-success-info--button:visited:disabled,.components-button.jp-license-activation-screen-success-info--button:visited[disabled],.components-button.jp-license-activation-screen-success-info--button[disabled]{background-color:var(--jp-gray);color:var(--jp-gray-20)}.components-button.jp-license-activation-screen-success-info--button .jp-components-spinner,.components-button.jp-license-activation-screen-success-info--button:active .jp-components-spinner,.components-button.jp-license-activation-screen-success-info--button:visited .jp-components-spinner{width:100%}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-10:#f2cf75;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-license-activation-screen-success-info{background:var(--jp-white);display:flex;flex-direction:column;justify-content:space-between;padding:32px}.jp-license-activation-screen-success-info h1{font-size:44px;font-weight:700;line-height:1.4;margin:.67em 0}.jp-license-activation-screen-success-info p{font-size:var(--font-body);margin:1em 0}.jp-license-activation-screen-success-info label{font-size:var(--font-body);font-weight:600}@media screen and (min-width:780px){.jp-license-activation-screen-success-info{padding:64px}}@media screen and (max-width:480px){.jp-license-activation-screen-success-info .jp-license-activation-screen-success-info--buttons{text-align:center}}.jp-license-activation-screen{border-radius:4px;box-shadow:0 4px 24px 0 #00000026;display:flex;flex-direction:column;min-height:540px;overflow:hidden}@media screen and (min-width:780px){.jp-license-activation-screen{flex-direction:row}}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php index 94f18ca4..03dac442 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php @@ -9,7 +9,14 @@ namespace Automattic\Jetpack\My_Jetpack; use Automattic\Jetpack\Admin_UI\Admin_Menu; use Automattic\Jetpack\Assets; +use Automattic\Jetpack\Connection\Client as Client; use Automattic\Jetpack\Connection\Initial_State as Connection_Initial_State; +use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Connection\Rest_Authentication as Connection_Rest_Authentication; +use Automattic\Jetpack\Licensing; +use Automattic\Jetpack\Status as Status; +use Automattic\Jetpack\Terms_Of_Service; +use Automattic\Jetpack\Tracking; /** * The main Initializer class that registers the admin menu and eneuque the assets. @@ -17,20 +24,35 @@ use Automattic\Jetpack\Connection\Initial_State as Connection_Initial_State; class Initializer { /** + * My Jetpack package version + * + * @var string + */ + const PACKAGE_VERSION = '1.6.0'; + + /** * Initialize My Jetapack * * @return void */ public static function init() { - if ( did_action( 'my_jetpack_init' ) ) { + if ( ! self::should_initialize() || did_action( 'my_jetpack_init' ) ) { return; } - // Feature flag while we are developing it. - if ( ! defined( 'JETPACK_ENABLE_MY_JETPACK' ) || ! JETPACK_ENABLE_MY_JETPACK ) { - return; + // Extend jetpack plugins action links. + Products::extend_plugins_action_links(); + + // Set up the REST authentication hooks. + Connection_Rest_Authentication::init(); + + if ( self::is_licensing_ui_enabled() ) { + Licensing::instance()->initialize(); } + // Add custom WP REST API endoints. + add_action( 'rest_api_init', array( __CLASS__, 'register_rest_endpoints' ) ); + $page_suffix = Admin_Menu::add_menu( __( 'My Jetpack', 'jetpack-my-jetpack' ), __( 'My Jetpack', 'jetpack-my-jetpack' ), @@ -45,26 +67,63 @@ class Initializer { /** * Fires after the My Jetpack package is initialized * - * @since $$next_version$$ + * @since 0.1.0 */ do_action( 'my_jetpack_init' ); } /** + * Acts as a feature flag, returning a boolean for whether we should show the licensing UI. + * + * @since 1.2.0 + * + * @return boolean + */ + public static function is_licensing_ui_enabled() { + /** + * Acts as a feature flag, returning a boolean for whether we should show the licensing UI. + * + * @param bool $is_enabled Defaults to true. + * + * @since 1.2.0 + * @since 1.5.0 Update default value to true. + */ + return apply_filters( + 'jetpack_my_jetpack_should_enable_add_license_screen', + true + ); + } + + /** * Callback for the load my jetpack page hook. * * @return void */ public static function admin_init() { - add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scritps' ) ); + add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) ); + // Product statuses are constantly changing, so we never want to cache the page. + header( 'Cache-Control: no-cache, no-store, must-revalidate' ); + header( 'Pragma: no-cache' ); + header( 'Expires: 0' ); } /** + * Returns whether we are in condition to track to use + * Analytics functionality like Tracks, MC, or GA. + */ + public static function can_use_analytics() { + $status = new Status(); + $connection = new Connection_Manager(); + $tracking = new Tracking( 'jetpack', $connection ); + + return $tracking->should_enable_tracking( new Terms_Of_Service(), $status ); + } + /** * Enqueue admin page assets. * * @return void */ - public static function enqueue_scritps() { + public static function enqueue_scripts() { Assets::register_script( 'my_jetpack_main_app', '../build/index.js', @@ -79,23 +138,165 @@ class Initializer { 'my_jetpack_main_app', 'myJetpackInitialState', array( - 'apiRoot' => esc_url_raw( rest_url() ), - 'apiNonce' => wp_create_nonce( 'wp_rest' ), - 'redirectUrl' => admin_url( '?page=my-jetpack' ), + 'products' => array( + 'items' => Products::get_products(), + ), + 'purchases' => array( + 'items' => array(), + ), + 'redirectUrl' => admin_url( 'admin.php?page=my-jetpack' ), 'topJetpackMenuItemUrl' => Admin_Menu::get_top_level_menu_item_url(), + 'siteSuffix' => ( new Status() )->get_site_suffix(), + 'myJetpackVersion' => self::PACKAGE_VERSION, + 'fileSystemWriteAccess' => self::has_file_system_write_access(), + 'loadAddLicenseScreen' => self::is_licensing_ui_enabled(), + 'adminUrl' => esc_url( admin_url() ), + ) + ); + + wp_localize_script( + 'my_jetpack_main_app', + 'myJetpackRest', + array( + 'apiRoot' => esc_url_raw( rest_url() ), + 'apiNonce' => wp_create_nonce( 'wp_rest' ), ) ); // Connection Initial State. wp_add_inline_script( 'my_jetpack_main_app', Connection_Initial_State::render(), 'before' ); + + // Required for Analytics. + if ( self::can_use_analytics() ) { + Tracking::register_tracks_functions_scripts( true ); + } } /** - * Echos the admin page content. + * Echoes the admin page content. * * @return void */ public static function admin_page() { echo '<div id="my-jetpack-container"></div>'; } + + /** + * Register the REST API routes. + * + * @return void + */ + public static function register_rest_endpoints() { + new REST_Products(); + new REST_Purchases(); + + register_rest_route( + 'my-jetpack/v1', + 'site', + array( + 'methods' => \WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_site', + 'permission_callback' => __CLASS__ . '::permissions_callback', + ) + ); + } + + /** + * Check user capability to access the endpoint. + * + * @access public + * @static + * + * @return true|WP_Error + */ + public static function permissions_callback() { + return current_user_can( 'manage_options' ); + } + + /** + * Return true if we should initialize the My Jetpack admin page. + */ + public static function should_initialize() { + $should = true; + + if ( is_multisite() ) { + $should = false; + } + + // Do not initialize My Jetpack if site is not connected. + if ( ! ( new Connection_Manager() )->is_connected() ) { + $should = false; + } + + /** + * Allows filtering whether My Jetpack should be initialized. + * + * @since 0.5.0-alpha + * + * @param bool $shoud_initialize Should we initialize My Jetpack? + */ + return apply_filters( 'jetpack_my_jetpack_should_initialize', $should ); + } + + /** + * Site full-data endpoint. + * + * @return object Site data. + */ + public static function get_site() { + $site_id = \Jetpack_Options::get_option( 'id' ); + $wpcom_endpoint = sprintf( '/sites/%d?force=wpcom', $site_id ); + $wpcom_api_version = '1.1'; + $response = Client::wpcom_json_api_request_as_blog( $wpcom_endpoint, $wpcom_api_version ); + $response_code = wp_remote_retrieve_response_code( $response ); + $body = json_decode( wp_remote_retrieve_body( $response ) ); + + if ( is_wp_error( $response ) || empty( $response['body'] ) ) { + return new \WP_Error( 'site_data_fetch_failed', 'Site data fetch failed', array( 'status' => $response_code ) ); + } + + return rest_ensure_response( $body, 200 ); + } + + /** + * Returns true if the site has file write access to the plugins folder, false otherwise. + * + * @return bool + **/ + public static function has_file_system_write_access() { + + $cache = get_transient( 'my_jetpack_write_access' ); + + if ( false !== $cache ) { + return $cache; + } + + if ( ! function_exists( 'get_filesystem_method' ) ) { + require_once ABSPATH . 'wp-admin/includes/file.php'; + } + + require_once ABSPATH . 'wp-admin/includes/template.php'; + + $write_access = 'no'; + + $filesystem_method = get_filesystem_method( array(), WP_PLUGIN_DIR ); + if ( 'direct' === $filesystem_method ) { + $write_access = 'yes'; + } + + if ( ! $write_access ) { + ob_start(); + $filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() ); + ob_end_clean(); + + if ( $filesystem_credentials_are_stored ) { + $write_access = 'yes'; + } + } + + set_transient( 'my_jetpack_write_access', $write_access, 30 * MINUTE_IN_SECONDS ); + + return $write_access; + } + } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php new file mode 100644 index 00000000..d02e1581 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php @@ -0,0 +1,144 @@ +<?php +/** + * Class for manipulating products + * + * @package automattic/my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack; + +/** + * A class for everything related to product handling in My Jetpack + */ +class Products { + + /** + * Get the list of Products classes + * + * Here's where all the existing Products are registered + * + * @return array List of class names + */ + public static function get_products_classes() { + return array( + Products\Anti_Spam::class, + Products\Backup::class, + Products\Boost::class, + Products\Crm::class, + Products\Extras::class, + Products\Scan::class, + Products\Search::class, + Products\Social::class, + Products\Security::class, + Products\Protect::class, + Products\Videopress::class, + ); + } + + /** + * Product data + * + * @return array Jetpack products on the site and their availability. + */ + public static function get_products() { + $products = array(); + foreach ( self::get_products_classes() as $class ) { + $product_slug = $class::$slug; + $products[ $product_slug ] = $class::get_info(); + } + return $products; + } + + /** + * Get one product data by its slug + * + * @param string $product_slug The product slug. + * + * @return ?array + */ + public static function get_product( $product_slug ) { + foreach ( self::get_products_classes() as $class ) { + $p_slug = $class::$slug; + if ( $p_slug === $product_slug ) { + return $class::get_info(); + } + } + return null; + } + + /** + * Return product slugs list. + * + * @return array Product slugs array. + */ + public static function get_products_slugs() { + $slugs = array(); + foreach ( self::get_products_classes() as $class ) { + $slugs[] = $class::$slug; + } + return $slugs; + } + + /** + * Gets the json schema for the product data + * + * @return array + */ + public static function get_product_data_schema() { + return array( + 'title' => 'The requested product data', + 'type' => 'object', + 'properties' => array( + 'product' => array( + 'description' => __( 'Product slug', 'jetpack-my-jetpack' ), + 'type' => 'string', + 'enum' => __CLASS__ . '::get_product_slugs', + 'required' => false, + 'validate_callback' => __CLASS__ . '::check_product_argument', + ), + 'action' => array( + 'description' => __( 'Production action to execute', 'jetpack-my-jetpack' ), + 'type' => 'string', + 'enum' => array( 'activate', 'deactivate' ), + 'required' => false, + 'validate_callback' => __CLASS__ . '::check_product_argument', + ), + 'slug' => array( + 'title' => 'The product slug', + 'type' => 'string', + ), + 'name' => array( + 'title' => 'The product name', + 'type' => 'string', + ), + 'description' => array( + 'title' => 'The product description', + 'type' => 'string', + ), + 'status' => array( + 'title' => 'The product status', + 'type' => 'string', + 'enum' => array( 'active', 'inactive', 'plugin_absent', 'needs_purchase', 'error' ), + ), + 'class' => array( + 'title' => 'The product class handler', + 'type' => 'string', + ), + ), + ); + } + + /** + * Extend actions links for plugins + * tied to the Products. + */ + public static function extend_plugins_action_links() { + Products\Backup::extend_plugin_action_links(); + Products\Boost::extend_plugin_action_links(); + Products\Crm::extend_plugin_action_links(); + + // Extend Jetpack plugin using Videopress instance. + Products\Videopress::extend_plugin_action_links(); + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php new file mode 100644 index 00000000..a0300a84 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php @@ -0,0 +1,208 @@ +<?php +/** + * Sets up the Products REST API endpoints. + * + * @package automattic/my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack; + +use WP_Error; + +/** + * Registers the REST routes for Products. + */ +class REST_Products { + /** + * Constructor. + */ + public function __construct() { + register_rest_route( + 'my-jetpack/v1', + 'site/products', + array( + array( + 'methods' => \WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_products', + 'permission_callback' => __CLASS__ . '::permissions_callback', + ), + 'schema' => array( $this, 'get_products_schema' ), + ) + ); + + $product_arg = array( + 'description' => __( 'Product slug', 'jetpack-my-jetpack' ), + 'type' => 'string', + 'enum' => Products::get_products_slugs(), + 'required' => true, + 'validate_callback' => __CLASS__ . '::check_product_argument', + ); + + register_rest_route( + 'my-jetpack/v1', + 'site/products/(?P<product>[a-z\-]+)', + array( + array( + 'methods' => \WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_product', + 'permission_callback' => __CLASS__ . '::permissions_callback', + 'args' => array( + 'product' => $product_arg, + ), + ), + array( + 'methods' => \WP_REST_Server::EDITABLE, + 'callback' => __CLASS__ . '::activate_product', + 'permission_callback' => __CLASS__ . '::edit_permissions_callback', + 'args' => array( + 'product' => $product_arg, + ), + ), + array( + 'methods' => \WP_REST_Server::DELETABLE, + 'callback' => __CLASS__ . '::deactivate_product', + 'permission_callback' => __CLASS__ . '::edit_permissions_callback', + 'args' => array( + 'product' => $product_arg, + ), + ), + ) + ); + } + + /** + * Get the schema for the products endpoint + * + * @return array + */ + public function get_products_schema() { + return array( + '$schema' => 'http://json-schema.org/draft-04/schema#', + 'title' => 'products', + 'type' => 'object', + 'properties' => Products::get_product_data_schema(), + ); + } + + /** + * Check user capability to access the endpoint. + * + * @access public + * @static + * + * @return true|WP_Error + */ + public static function permissions_callback() { + return current_user_can( 'manage_options' ); + } + + /** + * Check Product arguments. + * + * @access public + * @static + * + * @param mixed $value - Value of the 'product' argument. + * @return true|WP_Error True if the value is valid, WP_Error otherwise. + */ + public static function check_product_argument( $value ) { + if ( ! is_string( $value ) ) { + return new WP_Error( + 'rest_invalid_param', + esc_html__( 'The product argument must be a string.', 'jetpack-my-jetpack' ), + array( 'status' => 400 ) + ); + } + + return true; + } + + /** + * Site products endpoint. + * + * @return array of site products list. + */ + public static function get_products() { + $response = Products::get_products(); + return rest_ensure_response( $response, 200 ); + } + + /** + * Site single product endpoint. + * + * @param \WP_REST_Request $request The request object. + * @return array of site products list. + */ + public static function get_product( $request ) { + $product_slug = $request->get_param( 'product' ); + return rest_ensure_response( Products::get_product( $product_slug ), 200 ); + } + + /** + * Check permission to edit product + * + * @return bool + */ + public static function edit_permissions_callback() { + if ( ! current_user_can( 'activate_plugins' ) ) { + return false; + } + if ( is_multisite() && ! current_user_can( 'manage_network' ) ) { + return false; + } + return true; + } + + /** + * Callback for activating a product + * + * @param \WP_REST_Request $request The request object. + * @return \WP_REST_Response + */ + public static function activate_product( $request ) { + $product_slug = $request->get_param( 'product' ); + $product = Products::get_product( $product_slug ); + if ( ! isset( $product['class'] ) ) { + return new \WP_Error( + 'not_implemented', + esc_html__( 'The product class handler is not implemented', 'jetpack-my-jetpack' ), + array( 'status' => 501 ) + ); + } + + $activate_product_result = call_user_func( array( $product['class'], 'activate' ) ); + if ( is_wp_error( $activate_product_result ) ) { + $activate_product_result->add_data( array( 'status' => 400 ) ); + return $activate_product_result; + } + + return rest_ensure_response( Products::get_product( $product_slug ), 200 ); + } + + /** + * Callback for deactivating a product + * + * @param \WP_REST_Request $request The request object. + * @return \WP_REST_Response + */ + public static function deactivate_product( $request ) { + $product_slug = $request->get_param( 'product' ); + $product = Products::get_product( $product_slug ); + if ( ! isset( $product['class'] ) ) { + return new \WP_Error( + 'not_implemented', + esc_html__( 'The product class handler is not implemented', 'jetpack-my-jetpack' ), + array( 'status' => 501 ) + ); + } + + $deactivate_product_result = call_user_func( array( $product['class'], 'deactivate' ) ); + if ( is_wp_error( $deactivate_product_result ) ) { + $deactivate_product_result->add_data( array( 'status' => 400 ) ); + return $deactivate_product_result; + } + + return rest_ensure_response( Products::get_product( $product_slug ), 200 ); + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php new file mode 100644 index 00000000..c90e1b43 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php @@ -0,0 +1,76 @@ +<?php +/** + * Sets up the Purchases REST API endpoints. + * + * @package automattic/my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack; + +use Automattic\Jetpack\Connection\Client as Client; +use Automattic\Jetpack\Connection\Manager as Connection_Manager; + +/** + * Registers the REST routes for Purchases. + */ +class REST_Purchases { + /** + * Constructor. + */ + public function __construct() { + register_rest_route( + 'my-jetpack/v1', + '/site/purchases', + array( + 'methods' => \WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_site_current_purchases', + 'permission_callback' => __CLASS__ . '::permissions_callback', + ) + ); + } + + /** + * Check user capability to access the endpoint. + * + * @access public + * @static + * + * @return true|WP_Error + */ + public static function permissions_callback() { + $connection = new Connection_Manager(); + $is_site_connected = $connection->is_connected(); + + if ( ! $is_site_connected ) { + return new \WP_Error( + 'not_connected', + __( 'Your site is not connected to Jetpack.', 'jetpack-my-jetpack' ), + array( + 'status' => 400, + ) + ); + } + + return current_user_can( 'manage_options' ); + } + + /** + * Site purchases endpoint. + * + * @return array of site purchases. + */ + public static function get_site_current_purchases() { + $site_id = \Jetpack_Options::get_option( 'id' ); + $wpcom_endpoint = sprintf( '/sites/%1$d/purchases?locale=%2$s', $site_id, get_user_locale() ); + $wpcom_api_version = '1.1'; + $response = Client::wpcom_json_api_request_as_blog( $wpcom_endpoint, $wpcom_api_version ); + $response_code = wp_remote_retrieve_response_code( $response ); + $body = json_decode( wp_remote_retrieve_body( $response ) ); + + if ( is_wp_error( $response ) || empty( $response['body'] ) ) { + return new \WP_Error( 'site_data_fetch_failed', 'Site data fetch failed', array( 'status' => $response_code ? $response_code : 400 ) ); + } + + return rest_ensure_response( $body, 200 ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php new file mode 100644 index 00000000..cac879fe --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php @@ -0,0 +1,209 @@ +<?php +/** + * Fetches and store the list of Jetpack products available in WPCOM + * + * @package automattic/my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack; + +use Automattic\Jetpack\Connection\Client as Client; +use Automattic\Jetpack\Status\Visitor; +use WP_Error; +/** + * Stores the list of products available for purchase in WPCOM + */ +class Wpcom_Products { + + /** + * The meta name used to store the cache date + * + * @var string + */ + const CACHE_DATE_META_NAME = 'my-jetpack-cache-date'; + + /** + * The meta name used to store the cache + * + * @var string + */ + const CACHE_META_NAME = 'my-jetpack-cache'; + + /** + * Fetches the list of products from WPCOM + * + * @return Object|WP_Error + */ + private static function get_products_from_wpcom() { + + $blog_id = \Jetpack_Options::get_option( 'id' ); + $endpoint = sprintf( '/sites/%d/products/?_locale=%s&type=jetpack', $blog_id, get_user_locale() ); + + $wpcom_request = Client::wpcom_json_api_request_as_blog( + $endpoint, + '1.1', + array( + 'method' => 'GET', + 'headers' => array( + 'X-Forwarded-For' => ( new Visitor() )->get_ip( true ), + ), + ) + ); + + $response_code = wp_remote_retrieve_response_code( $wpcom_request ); + + if ( 200 === $response_code ) { + return json_decode( wp_remote_retrieve_body( $wpcom_request ) ); + } else { + return new WP_Error( + 'failed_to_fetch_wpcom_products', + esc_html__( 'Unable to fetch the products list from WordPress.com', 'jetpack-my-jetpack' ), + array( 'status' => $response_code ) + ); + } + } + + /** + * Update the cache with new information retrieved from WPCOM + * + * We store one cache for each user, as the information is internationalized based on user preferences + * Also, the currency is based on the user IP address + * + * @param Object $products_list The products list as received from WPCOM. + * @return bool + */ + private static function update_cache( $products_list ) { + update_user_meta( get_current_user_id(), self::CACHE_DATE_META_NAME, time() ); + return update_user_meta( get_current_user_id(), self::CACHE_META_NAME, $products_list ); + } + + /** + * Checks if the cache is old, meaning we need to fetch new data from WPCOM + */ + private static function is_cache_old() { + if ( empty( self::get_products_from_cache() ) ) { + return true; + } + $cache_date = get_user_meta( get_current_user_id(), self::CACHE_DATE_META_NAME, true ); + return time() - (int) $cache_date > ( 7 * DAY_IN_SECONDS ); + } + + /** + * Gets the product list from the user cache + */ + private static function get_products_from_cache() { + return get_user_meta( get_current_user_id(), self::CACHE_META_NAME, true ); + } + + /** + * Gets the product list + * + * Attempts to retrieve the products list from the user cache if cache is not too old. + * If cache is old, it will attempt to fetch information from WPCOM. If it fails, we return what we have in cache, if anything, otherwise we return an error. + * + * @param bool $skip_cache If true it will ignore the cache and attempt to fetch fresh information from WPCOM. + * + * @return Object|WP_Error + */ + public static function get_products( $skip_cache = false ) { + // This is only available for logged in users. + if ( ! get_current_user_id() ) { + return null; + } + if ( ! self::is_cache_old() && ! $skip_cache ) { + return self::get_products_from_cache(); + } + + $products = self::get_products_from_wpcom(); + if ( is_wp_error( $products ) ) { + // Let's see if we have it cached. + $cached = self::get_products_from_cache(); + if ( ! empty( $cached ) ) { + return $cached; + } else { + return $products; + } + } + + self::update_cache( $products ); + return $products; + + } + + /** + * Get one product + * + * @param string $product_slug The product slug. + * + * @return ?Object The product details if found + */ + public static function get_product( $product_slug ) { + $products = self::get_products(); + if ( ! empty( $products->$product_slug ) ) { + return $products->$product_slug; + } + } + + /** + * Get only the product currency code and price in an array + * + * @param string $product_slug The product slug. + * + * @return array An array with currency_code and full_price. Empty array if product not found. + */ + public static function get_product_pricing( $product_slug ) { + $product = self::get_product( $product_slug ); + if ( empty( $product ) ) { + return array(); + } + + $cost = $product->cost; + $discount_price = $cost; + + // Get/compute the discounted price. + if ( isset( $product->introductory_offer->cost_per_interval ) ) { + $discount_price = $product->introductory_offer->cost_per_interval; + } + + $pricing = array( + 'currency_code' => $product->currency_code, + 'full_price' => $cost, + 'discount_price' => $discount_price, + ); + + return self::populate_with_discount( $product, $pricing, $discount_price ); + } + + /** + * Populate the pricing array with the discount information. + * + * @param {object} $product - The product object. + * @param {object} $pricing - The pricing array. + * @param {float} $price - The price to be discounted. + * @return {object} The pricing array with the discount information. + */ + public static function populate_with_discount( $product, $pricing, $price ) { + // Check whether the product has a coupon. + if ( ! isset( $product->sale_coupon ) ) { + return $pricing; + } + + // Check whether it is still valid. + $coupon = $product->sale_coupon; + $coupon_start_date = strtotime( $coupon->start_date ); + $coupon_expires = strtotime( $coupon->expires ); + if ( $coupon_start_date > time() || $coupon_expires < time() ) { + return $pricing; + } + + $coupon_discount = intval( $coupon->discount ); + + // Populate response with coupon discount. + $pricing['coupon_discount'] = $coupon_discount; + + // Apply coupon discount to the price. + $pricing['discount_price'] = $price * ( 100 - $coupon_discount ) / 100; + + return $pricing; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php new file mode 100644 index 00000000..7c8820d0 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php @@ -0,0 +1,138 @@ +<?php +/** + * Anti_Spam product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack\Products; + +use Automattic\Jetpack\My_Jetpack\Product; +use Automattic\Jetpack\My_Jetpack\Wpcom_Products; + +/** + * Class responsible for handling the Anti_Spam product + */ +class Anti_Spam extends Product { + + /** + * The product slug + * + * @var string + */ + public static $slug = 'anti-spam'; + + /** + * The filename (id) of the plugin associated with this product. If not defined, it will default to the Jetpack plugin + * + * @var string + */ + public static $plugin_filename = 'akismet/akismet.php'; + + /** + * The slug of the plugin associated with this product. If not defined, it will default to the Jetpack plugin + * + * @var string + */ + public static $plugin_slug = 'akismet'; + + /** + * Whether this product requires a user connection + * + * @var string + */ + public static $requires_user_connection = false; + + /** + * Get the internationalized product name + * + * @return string + */ + public static function get_name() { + return __( 'Anti-Spam', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product title + * + * @return string + */ + public static function get_title() { + return __( 'Jetpack Anti-Spam', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product description + * + * @return string + */ + public static function get_description() { + return __( 'Stop comment and form spam', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product long description + * + * @return string + */ + public static function get_long_description() { + return __( 'Save time and get better responses by automatically blocking spam from your comments and forms.', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized features list + * + * @return array Boost features list + */ + public static function get_features() { + return array( + _x( 'Comment and form spam protection', 'Anti-Spam Product Feature', 'jetpack-my-jetpack' ), + _x( 'Powered by Akismet', 'Anti-Spam Product Feature', 'jetpack-my-jetpack' ), + _x( 'Block spam without CAPTCHAs', 'Anti-Spam Product Feature', 'jetpack-my-jetpack' ), + _x( 'Advanced stats', 'Anti-Spam Product Feature', 'jetpack-my-jetpack' ), + ); + } + + /** + * Get the product princing details + * + * @return array Pricing details + */ + public static function get_pricing_for_ui() { + return array_merge( + array( + 'available' => true, + 'wpcom_product_slug' => static::get_wpcom_product_slug(), + ), + Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) + ); + } + + /** + * Get the WPCOM product slug used to make the purchase + * + * @return ?string + */ + public static function get_wpcom_product_slug() { + return 'jetpack_anti_spam'; + } + + /** + * Return product bundles list + * that supports the product. + * + * @return boolean|array Products bundle list. + */ + public static function is_upgradable_by_bundle() { + return array( 'security' ); + } + + /** + * Get the URL where the user manages the product + * + * @return ?string + */ + public static function get_manage_url() { + return admin_url( 'admin.php?page=akismet-key-config' ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php new file mode 100644 index 00000000..37b45caf --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php @@ -0,0 +1,201 @@ +<?php +/** + * Boost product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack\Products; + +use Automattic\Jetpack\Connection\Client; +use Automattic\Jetpack\My_Jetpack\Hybrid_Product; +use Automattic\Jetpack\My_Jetpack\Wpcom_Products; +use Automattic\Jetpack\Redirect; +use Jetpack_Options; +use WP_Error; + +/** + * Class responsible for handling the Backup product + */ +class Backup extends Hybrid_Product { + + /** + * The product slug + * + * @var string + */ + public static $slug = 'backup'; + + /** + * The filename (id) of the plugin associated with this product. + * + * @var string + */ + public static $plugin_filename = array( + 'jetpack-backup/jetpack-backup.php', + 'backup/jetpack-backup.php', + 'jetpack-backup-dev/jetpack-backup.php', + ); + + /** + * The slug of the plugin associated with this product. + * + * @var string + */ + public static $plugin_slug = 'jetpack-backup'; + + /** + * Get the internationalized product name + * + * @return string + */ + public static function get_name() { + return __( 'Backup', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product title + * + * @return string + */ + public static function get_title() { + return __( 'Jetpack Backup', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product description + * + * @return string + */ + public static function get_description() { + return __( 'Save every change', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product long description + * + * @return string + */ + public static function get_long_description() { + return __( 'Never lose a word, image, page, or time worrying about your site with automated backups & one-click restores.', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized features list + * + * @return array Backup features list + */ + public static function get_features() { + return array( + _x( 'Real-time cloud backups', 'Backup Product Feature', 'jetpack-my-jetpack' ), + _x( '10GB of backup storage', 'Backup Product Feature', 'jetpack-my-jetpack' ), + _x( '30-day archive & activity log', 'Backup Product Feature', 'jetpack-my-jetpack' ), + _x( 'One-click restores', 'Backup Product Feature', 'jetpack-my-jetpack' ), + ); + } + + /** + * Get the WPCOM product slug used to make the purchase + * + * @return ?string + */ + public static function get_wpcom_product_slug() { + return 'jetpack_backup_t1_yearly'; + } + + /** + * Get the product princing details + * + * @return array Pricing details + */ + public static function get_pricing_for_ui() { + return array_merge( + array( + 'available' => true, + 'wpcom_product_slug' => static::get_wpcom_product_slug(), + ), + Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) + ); + } + + /** + * Hits the wpcom api to check rewind status. + * + * @todo Maybe add caching. + * + * @return Object|WP_Error + */ + private static function get_state_from_wpcom() { + static $status = null; + + if ( $status !== null ) { + return $status; + } + + $site_id = Jetpack_Options::get_option( 'id' ); + + $response = Client::wpcom_json_api_request_as_blog( sprintf( '/sites/%d/rewind', $site_id ) . '?force=wpcom', '2', array( 'timeout' => 2 ), null, 'wpcom' ); + + if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { + return new WP_Error( 'rewind_state_fetch_failed' ); + } + + $body = wp_remote_retrieve_body( $response ); + $status = json_decode( $body ); + return $status; + } + + /** + * Checks whether the current plan (or purchases) of the site already supports the product + * + * @return boolean + */ + public static function has_required_plan() { + $rewind_data = static::get_state_from_wpcom(); + if ( is_wp_error( $rewind_data ) ) { + return false; + } + return is_object( $rewind_data ) && isset( $rewind_data->state ) && 'unavailable' !== $rewind_data->state; + } + + /** + * Return product bundles list + * that supports the product. + * + * @return boolean|array Products bundle list. + */ + public static function is_upgradable_by_bundle() { + return array( 'security' ); + } + + /** + * Get the URL the user is taken after activating the product + * + * @return ?string + */ + public static function get_post_activation_url() { + return ''; // stay in My Jetpack page or continue the purchase flow if needed. + } + + /** + * Get the URL where the user manages the product + * + * @return ?string + */ + public static function get_manage_url() { + if ( static::is_jetpack_plugin_active() ) { + return Redirect::get_url( 'my-jetpack-manage-backup' ); + } elseif ( static::is_plugin_active() ) { + return admin_url( 'admin.php?page=jetpack-backup' ); + } + } + + /** + * Checks whether the Product is active + * + * @return boolean + */ + public static function is_active() { + return parent::is_active() && static::has_required_plan(); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php new file mode 100644 index 00000000..7c159eb4 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php @@ -0,0 +1,117 @@ +<?php +/** + * Boost product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack\Products; + +use Automattic\Jetpack\My_Jetpack\Product; + +/** + * Class responsible for handling the Boost product + */ +class Boost extends Product { + + /** + * The product slug + * + * @var string + */ + public static $slug = 'boost'; + + /** + * The filename (id) of the plugin associated with this product. + * + * @var string + */ + public static $plugin_filename = array( + 'jetpack-boost/jetpack-boost.php', + 'boost/jetpack-boost.php', + 'jetpack-boost-dev/jetpack-boost.php', + ); + /** + * The slug of the plugin associated with this product. + * + * @var string + */ + public static $plugin_slug = 'jetpack-boost'; + + /** + * Whether this product requires a user connection + * + * @var string + */ + public static $requires_user_connection = false; + + /** + * Get the internationalized product name + * + * @return string + */ + public static function get_name() { + return __( 'Boost', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product title + * + * @return string + */ + public static function get_title() { + return __( 'Jetpack Boost', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product description + * + * @return string + */ + public static function get_description() { + return __( 'Instant speed and SEO', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product long description + * + * @return string + */ + public static function get_long_description() { + return __( 'Jetpack Boost gives your site the same performance advantages as the world’s leading websites, no developer required.', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized features list + * + * @return array Boost features list + */ + public static function get_features() { + return array( + __( 'Check your site performance', 'jetpack-my-jetpack' ), + __( 'Enable improvements in one click', 'jetpack-my-jetpack' ), + __( 'Standalone free plugin for those focused on speed', 'jetpack-my-jetpack' ), + ); + } + + /** + * Get the product princing details + * + * @return array Pricing details + */ + public static function get_pricing_for_ui() { + return array( + 'available' => true, + 'is_free' => true, + ); + } + + /** + * Get the URL where the user manages the product + * + * @return ?string + */ + public static function get_manage_url() { + return admin_url( 'admin.php?page=jetpack-boost' ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php new file mode 100644 index 00000000..9fce5f92 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php @@ -0,0 +1,124 @@ +<?php +/** + * Boost product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack\Products; + +use Automattic\Jetpack\My_Jetpack\Product; + +/** + * Class responsible for handling the CRM product + */ +class Crm extends Product { + + /** + * The product slug + * + * @var string + */ + public static $slug = 'crm'; + + /** + * The filename (id) of the plugin associated with this product. If not defined, it will default to the Jetpack plugin + * + * @var string + */ + public static $plugin_filename = 'zero-bs-crm/ZeroBSCRM.php'; + + /** + * The slug of the plugin associated with this product. If not defined, it will default to the Jetpack plugin + * + * @var string + */ + public static $plugin_slug = 'zero-bs-crm'; + + /** + * Whether this product requires a user connection + * + * @var string + */ + public static $requires_user_connection = false; + + /** + * Get the internationalized product name + * + * @return string + */ + public static function get_name() { + return __( 'CRM', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product title + * + * @return string + */ + public static function get_title() { + return __( 'Jetpack CRM', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product description + * + * @return string + */ + public static function get_description() { + return __( 'Connect with your people', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product long description + * + * @return string + */ + public static function get_long_description() { + return __( 'All of your contacts in one place. Build better relationships with your customers and clients.', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized features list + * + * @return array CRM features list + */ + public static function get_features() { + return array( + __( 'Manage unlimited contacts', 'jetpack-my-jetpack' ), + __( 'Manage billing and create invoices', 'jetpack-my-jetpack' ), + __( 'Fully integrated with WordPress & WooCommerce', 'jetpack-my-jetpack' ), + __( 'Infinitely customizable with integrations and extensions', 'jetpack-my-jetpack' ), + ); + } + + /** + * Get the product princing details + * + * @return array Pricing details + */ + public static function get_pricing_for_ui() { + return array( + 'available' => true, + 'is_free' => true, + ); + } + + /** + * Get the URL the user is taken after activating the product + * + * @return ?string + */ + public static function get_post_activation_url() { + return admin_url( 'admin.php?page=zerobscrm-plugin' ); // Welcome page. + } + + /** + * Get the URL where the user manages the product + * + * @return ?string + */ + public static function get_manage_url() { + return admin_url( 'admin.php?page=zerobscrm-dash' ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php new file mode 100644 index 00000000..d0ffaf8c --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php @@ -0,0 +1,143 @@ +<?php +/** + * Extras product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack\Products; + +use Automattic\Jetpack\My_Jetpack\Product; + +/** + * Class responsible for handling the Extras product. + * Extras, so far, could be considered as Jetpack plugin bridge. + */ +class Extras extends Product { + + /** + * The product slug + * + * @var string + */ + public static $slug = 'extras'; + + /** + * The slug of the plugin associated with this product. + * Extras, is in short, Jetpack plugin bridge so far. + * + * @var string + */ + public static $plugin_slug = 'jetpack'; + + /** + * Whether this product requires a user connection + * + * @var string + */ + public static $requires_user_connection = false; + + /** + * Get the internationalized product name + * + * @return string + */ + public static function get_name() { + return __( 'Extras', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product title + * + * @return string + */ + public static function get_title() { + return __( 'Jetpack Extras', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product description + * + * @return string + */ + public static function get_description() { + return __( 'Basic tools for a successful site', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product long description + * + * @return string + */ + public static function get_long_description() { + return __( "Secure and speed up your site for free with Jetpack's powerful WordPress tools.", 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized features list + * + * @return array Boost features list + */ + public static function get_features() { + return array( + __( 'Measure your impact with beautiful stats', 'jetpack-my-jetpack' ), + __( 'Speed up your site with optimized images', 'jetpack-my-jetpack' ), + __( 'Protect your site against bot attacks', 'jetpack-my-jetpack' ), + __( 'Get notifications if your site goes offline', 'jetpack-my-jetpack' ), + __( 'Enhance your site with dozens of other features', 'jetpack-my-jetpack' ), + ); + } + + /** + * Get the product princing details + * + * @return array Pricing details + */ + public static function get_pricing_for_ui() { + return array( + 'available' => true, + 'is_free' => true, + ); + } + + /** + * Checks whether the Product is active. + * If Jetpack plugin is active, then Extras will be inactive. + * + * @return boolean + */ + public static function is_active() { + return static::is_jetpack_plugin_active(); + } + + /** + * Checks whether the plugin is installed + * If Jetpack plugin is installed, then Extras will be inactive. + * + * @return boolean + */ + public static function is_plugin_installed() { + return static::is_jetpack_plugin_installed(); + } + + /** + * Get the URL where the user manages the product + * + * @return ?string + */ + public static function get_manage_url() { + return admin_url( 'admin.php?page=jetpack' ); + } + + /** + * Activates the Jetpack plugin + * + * @return null|WP_Error Null on success, WP_Error on invalid file. + */ + public static function activate_plugin() { + /* + * Silent mode True to avoid redirect + */ + return activate_plugin( static::get_installed_plugin_filename( 'jetpack' ), '', false, true ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php new file mode 100644 index 00000000..1bb995ff --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php @@ -0,0 +1,129 @@ +<?php +/** + * Base product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack; + +use Automattic\Jetpack\Modules; +use Automattic\Jetpack\Plugins_Installer; +use WP_Error; + +/** + * Class responsible for handling the hybrid products + * + * Hybrid products are those that may work both as a stand-alone plugin or with the Jetpack plugin. + * + * In case Jetpack plugin is active, it will not attempt to install its stand-alone plugin. + * + * But if Jetpack plugin is not active, then it will prompt to install and activate its stand-alone plugin. + */ +abstract class Hybrid_Product extends Product { + + /** + * Checks whether the Product is active + * + * @return boolean + */ + public static function is_plugin_active() { + return parent::is_plugin_active() || parent::is_jetpack_plugin_active(); + } + + /** + * Checks whether the plugin is installed + * + * @return boolean + */ + public static function is_plugin_installed() { + return parent::is_plugin_installed() || static::is_jetpack_plugin_installed(); + } + + /** + * Checks whether the Jetpack module is active only if a module_name is defined + * + * @return bool + */ + public static function is_module_active() { + if ( ! empty( static::$module_name ) ) { + return ( new Modules() )->is_active( static::$module_name ); + } + return true; + } + + /** + * Checks whether the Product is active + * + * @return boolean + */ + public static function is_active() { + return parent::is_active() && static::is_module_active(); + } + + /** + * Activates the plugin + * + * @return null|WP_Error Null on success, WP_Error on invalid file. + */ + public static function activate_plugin() { + /* + * Activate self-installed plugin if it's installed. + * Silent mode True to avoid redirects in Backup. + * @TODO When new Hybrid products are added, we might not want to go silent with all of them. + */ + if ( parent::is_plugin_installed() ) { + return activate_plugin( static::get_installed_plugin_filename(), '', false, true ); + } + + /* + * Otherwise, activate Jetpack plugin. + * Silent mode True to avoid redirects. + */ + if ( static::is_jetpack_plugin_installed() ) { + return activate_plugin( static::get_installed_plugin_filename( 'jetpack' ) ); + } + + return new WP_Error( 'plugin_not_found', __( 'Activation failed. Plugin is not installed', 'jetpack-my-jetpack' ) ); + } + + /** + * Activates the product. If the Hybrid product has declared a jetpack module name, let's try to activate it if Jetpack plugin is active + * + * @param bool|WP_Error $product_activation Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. + * @return bool|WP_Error + */ + public static function do_product_specific_activation( $product_activation ) { + + if ( is_wp_error( $product_activation ) ) { + // If we failed to install the stand-alone plugin because the package was not found, let's try and install Jetpack plugin instead. + // This might happens, for example, while the stand-alone plugin was not released to the WP.org repository yet. + if ( 'no_package' === $product_activation->get_error_code() ) { + $product_activation = Plugins_Installer::install_plugin( self::JETPACK_PLUGIN_SLUG ); + if ( ! is_wp_error( $product_activation ) ) { + $product_activation = static::activate_plugin(); + } + } + if ( is_wp_error( $product_activation ) ) { + return $product_activation; + } + } + + if ( ! empty( static::$module_name ) ) { + if ( ! static::has_required_plan() ) { + // translators: %s is the product name. e.g. Jetpack Search. + return new WP_Error( 'not_supported', sprintf( __( 'Your plan does not support %s.', 'jetpack-my-jetpack' ), static::get_title() ) ); + } + $module_activation = ( new Modules() )->activate( static::$module_name, false, false ); + if ( ! $module_activation ) { + return new WP_Error( 'module_activation_failed', __( 'Error activating Jetpack module', 'jetpack-my-jetpack' ) ); + } + + return $module_activation; + } + + return true; + + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php new file mode 100644 index 00000000..e2cf58ef --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php @@ -0,0 +1,135 @@ +<?php +/** + * Base Module product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack; + +use Jetpack; +use WP_Error; + +/** + * Class responsible for handling the Module products + * + * Module products are those that are a Jetpack module behind the scenes. + * + * They require Jetpack plugin and will then activate/deactivate a module. + */ +abstract class Module_Product extends Product { + + /** + * The Jetpack module name associated with this product + * + * @var string|null + */ + public static $module_name = null; + + /** + * Get the plugin slug - ovewrite it ans return Jetpack's + * + * @return ?string + */ + public static function get_plugin_slug() { + return self::JETPACK_PLUGIN_SLUG; + } + + /** + * Get the plugin filename - ovewrite it ans return Jetpack's + * + * @return ?string + */ + public static function get_plugin_filename() { + return self::JETPACK_PLUGIN_FILENAME; + } + + /** + * Ensure that child classes define $module_name attribute + * + * @throws \Exception If required attribute is not declared in the child class. + * @return void + */ + private static function check_for_module_name() { + if ( empty( static::$module_name ) ) { + throw new \Exception( 'Module Product classes must declare the $module_name attribute.' ); + } + } + + /** + * Checks whether the Product is active + * + * @return boolean + */ + public static function is_active() { + return static::is_jetpack_plugin_active() && static::is_module_active(); + } + + /** + * Checks whether the Jetpack module is active + * + * @return bool + */ + public static function is_module_active() { + self::check_for_module_name(); + if ( ! class_exists( 'Jetpack' ) ) { + return false; + } + + return Jetpack::is_module_active( static::$module_name ); + } + + /** + * Gets the current status of the product + * + * @return string + */ + public static function get_status() { + $status = parent::get_status(); + if ( 'active' === $status && ! static::is_module_active() ) { + $status = 'module_disabled'; + } + return $status; + } + + /** + * Activates the product by installing and activating its plugin + * + * @param bool|WP_Error $plugin_activation Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. + * @return boolean|\WP_Error + */ + public static function do_product_specific_activation( $plugin_activation ) { + self::check_for_module_name(); + + if ( is_wp_error( $plugin_activation ) ) { + return $plugin_activation; + } + + if ( ! class_exists( 'Jetpack' ) ) { + return new WP_Error( 'plugin_activation_failed', __( 'Error activating Jetpack plugin', 'jetpack-my-jetpack' ) ); + } + + $module_activation = Jetpack::activate_module( static::$module_name, false, false ); + + if ( ! $module_activation ) { + return new WP_Error( 'module_activation_failed', __( 'Error activating Jetpack module', 'jetpack-my-jetpack' ) ); + } + + return $module_activation; + + } + + /** + * Deactivate the module + * + * @return boolean + */ + public static function deactivate() { + self::check_for_module_name(); + if ( ! class_exists( 'Jetpack' ) ) { + return true; + } + return Jetpack::deactivate_module( static::$module_name ); + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-product.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-product.php new file mode 100644 index 00000000..ef09aecd --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-product.php @@ -0,0 +1,437 @@ +<?php +/** + * Base product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack; + +use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Plugins_Installer; +use WP_Error; + +/** + * Class responsible for handling the products + */ +abstract class Product { + + /** + * The product slug + * + * @var string + */ + public static $slug = null; + + /** + * The filename (id) of the plugin associated with this product. Can be a string with a single value or a list of possible values + * + * @var string|string[] + */ + protected static $plugin_filename = null; + + /** + * The slug of the plugin associated with this product. If not defined, it will default to the Jetpack plugin + * + * @var string + */ + public static $plugin_slug = null; + + /** + * The Jetpack plugin slug + * + * @var string + */ + const JETPACK_PLUGIN_SLUG = 'jetpack'; + + /** + * The Jetpack plugin filename + * + * @var string + */ + const JETPACK_PLUGIN_FILENAME = array( + 'jetpack/jetpack.php', + 'jetpack-dev/jetpack.php', + ); + + /** + * Whether this product requires a user connection + * + * @var string + */ + public static $requires_user_connection = true; + + /** + * Get the plugin slug + * + * @return ?string + */ + public static function get_plugin_slug() { + return static::$plugin_slug; + } + + /** + * Get the plugin filename + * + * @return ?string + */ + public static function get_plugin_filename() { + return static::$plugin_filename; + } + + /** + * Get the installed plugin filename, considering all possible filenames a plugin might have + * + * @param string $plugin Which plugin to check. jetpack for the jetpack plugin or product for the product specific plugin. + * + * @return ?string + */ + public static function get_installed_plugin_filename( $plugin = 'product' ) { + $all_plugins = Plugins_Installer::get_plugins(); + $filename = 'jetpack' === $plugin ? self::JETPACK_PLUGIN_FILENAME : static::get_plugin_filename(); + if ( ! is_array( $filename ) ) { + $filename = array( $filename ); + } + foreach ( $filename as $name ) { + $installed = array_key_exists( $name, $all_plugins ); + if ( $installed ) { + return $name; + } + } + } + + /** + * Get the Product info for the API + * + * @throws \Exception If required attribute is not declared in the child class. + * @return array + */ + public static function get_info() { + if ( static::$slug === null ) { + throw new \Exception( 'Product classes must declare the $slug attribute.' ); + } + return array( + 'slug' => static::$slug, + 'name' => static::get_name(), + 'title' => static::get_title(), + 'description' => static::get_description(), + 'long_description' => static::get_long_description(), + 'features' => static::get_features(), + 'status' => static::get_status(), + 'pricing_for_ui' => static::get_pricing_for_ui(), + 'is_bundle' => static::is_bundle_product(), + 'is_upgradable_by_bundle' => static::is_upgradable_by_bundle(), + 'supported_products' => static::get_supported_products(), + 'wpcom_product_slug' => static::get_wpcom_product_slug(), + 'requires_user_connection' => static::$requires_user_connection, + 'has_required_plan' => static::has_required_plan(), + 'manage_url' => static::get_manage_url(), + 'post_activation_url' => static::get_post_activation_url(), + 'class' => get_called_class(), + ); + } + + /** + * Get the internationalized product name + * + * @return string + */ + abstract public static function get_name(); + + /** + * Get the internationalized product title + * + * @return string + */ + abstract public static function get_title(); + + /** + * Get the internationalized product description + * + * @return string + */ + abstract public static function get_description(); + + /** + * Get the internationalized product long description + * + * @return string + */ + abstract public static function get_long_description(); + + /** + * Get the internationalized features list + * + * @return array + */ + abstract public static function get_features(); + + /** + * Get the product pricing + * + * @return array + */ + abstract public static function get_pricing_for_ui(); + + /** + * Get the URL where the user manages the product + * + * @return ?string + */ + abstract public static function get_manage_url(); + + /** + * Get the URL the user is taken after activating the product + * + * @return ?string + */ + public static function get_post_activation_url() { + return static::get_manage_url(); + } + + /** + * Get the WPCOM product slug used to make the purchase + * + * @return ?string + */ + public static function get_wpcom_product_slug() { + return null; + } + + /** + * Checks whether the current plan (or purchases) of the site already supports the product + * + * Returns true if it supports. Return false if a purchase is still required. + * + * Free products will always return true. + * + * @return boolean + */ + public static function has_required_plan() { + return true; + } + + /** + * Checks whether product is a bundle. + * + * @return boolean True if product is a bundle. Otherwise, False. + */ + public static function is_bundle_product() { + return false; + } + + /** + * Check whether the product is upgradable + * by a product bundle. + * + * @return boolean|array Bundles list or False if not upgradable by a bundle. + */ + public static function is_upgradable_by_bundle() { + return false; + } + + /** + * In case it's a bundle product, + * return all the products it contains. + * Empty array by default. + * + * @return Array Product slugs + */ + public static function get_supported_products() { + return array(); + } + + /** + * Undocumented function + * + * @return string + */ + public static function get_status() { + + if ( ! static::is_plugin_installed() ) { + $status = 'plugin_absent'; + } elseif ( static::is_active() ) { + $status = 'active'; + // We only consider missing user connection an error when the Product is active. + if ( static::$requires_user_connection && ! ( new Connection_Manager() )->has_connected_owner() ) { + $status = 'error'; + } elseif ( ! static::has_required_plan() ) { + $status = 'needs_purchase'; // We need needs_purchase here as well because some products we consider active without the required plan. + } + } elseif ( ! static::has_required_plan() ) { + $status = 'needs_purchase'; + } else { + $status = 'inactive'; + } + return $status; + } + + /** + * Checks whether the Product is active + * + * @return boolean + */ + public static function is_active() { + return static::is_plugin_active() && static::has_required_plan(); + } + + /** + * Checks whether the plugin is installed + * + * @return boolean + */ + public static function is_plugin_installed() { + return (bool) static::get_installed_plugin_filename(); + } + + /** + * Checks whether the plugin is active + * + * @return boolean + */ + public static function is_plugin_active() { + return Plugins_Installer::is_plugin_active( static::get_installed_plugin_filename() ); + } + + /** + * Checks whether the Jetpack plugin is installed + * + * @return boolean + */ + public static function is_jetpack_plugin_installed() { + return (bool) static::get_installed_plugin_filename( 'jetpack' ); + } + + /** + * Checks whether the Jetpack plugin is active + * + * @return boolean + */ + public static function is_jetpack_plugin_active() { + return Plugins_Installer::is_plugin_active( static::get_installed_plugin_filename( 'jetpack' ) ); + } + + /** + * Activates the plugin + * + * @return null|WP_Error Null on success, WP_Error on invalid file. + */ + public static function activate_plugin() { + return activate_plugin( static::get_installed_plugin_filename() ); + } + + /** + * Perform the top level activation routines, which is installing and activating the required plugin + * + * @return bool|WP_Error + */ + private static function do_activation() { + if ( static::is_active() ) { + return true; + } + + if ( ! static::is_plugin_installed() ) { + $installed = Plugins_Installer::install_plugin( static::get_plugin_slug() ); + if ( is_wp_error( $installed ) ) { + return $installed; + } + } + + if ( ! current_user_can( 'activate_plugins' ) ) { + return new WP_Error( 'not_allowed', __( 'You are not allowed to activate plugins on this site.', 'jetpack-my-jetpack' ) ); + } + + $result = static::activate_plugin(); + if ( is_wp_error( $result ) ) { + return $result; + } + + return true; + } + + /** + * Activates the product by installing and activating its plugin + * + * @return boolean|WP_Error + */ + final public static function activate() { + + $result = self::do_activation(); + + $result = static::do_product_specific_activation( $result ); + + $product_slug = static::$slug; + + /** + * Fires after My Jetpack activates a product and filters the result + * Use this filter to run additional routines for a product activation on stand-alone plugins + * + * @param bool|WP_Error $result The result of the previous steps of activation. + */ + $result = apply_filters( "my_jetpack_{$product_slug}_activation", $result ); + + return $result; + + } + + /** + * Override this method to perform product specific activation routines. + * + * @param bool|WP_Error $current_result Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. + * @return bool|WP_Error + */ + public static function do_product_specific_activation( $current_result ) { + return $current_result; + } + + /** + * Deactivate the product + * + * @return boolean + */ + public static function deactivate() { + deactivate_plugins( static::get_installed_plugin_filename() ); + return true; + } + + /** + * Returns filtered Jetpack plugin actions links. + * + * @param array $actions - Jetpack plugin action links. + * @return array Filtered Jetpack plugin actions links. + */ + public static function get_plugin_actions_links( $actions ) { + // My Jetpack action link. + $my_jetpack_home_link = array( + 'jetpack-home' => sprintf( + '<a href="%1$s" title="%3$s">%2$s</a>', + admin_url( 'admin.php?page=my-jetpack' ), + __( 'My Jetpack', 'jetpack-my-jetpack' ), + __( 'My Jetpack dashboard', 'jetpack-my-jetpack' ) + ), + ); + + // Otherwise, add it to the beginning of the array. + return array_merge( $my_jetpack_home_link, $actions ); + } + + /** + * Extend the plugin action links. + */ + public static function extend_plugin_action_links() { + + $filenames = static::get_plugin_filename(); + if ( ! is_array( $filenames ) ) { + $filenames = array( $filenames ); + } + + foreach ( $filenames as $filename ) { + $hook = 'plugin_action_links_' . $filename; + $callback = array( static::class, 'get_plugin_actions_links' ); + if ( ! has_filter( $hook, $callback ) ) { + add_filter( $hook, $callback, 20, 2 ); + } + } + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php new file mode 100644 index 00000000..a4cca50a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php @@ -0,0 +1,119 @@ +<?php +/** + * Protect product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack\Products; + +use Automattic\Jetpack\My_Jetpack\Product; + +/** + * Class responsible for handling the Protect product + */ +class Protect extends Product { + + /** + * The product slug + * + * @var string + */ + public static $slug = 'protect'; + + /** + * The filename (id) of the plugin associated with this product. + * + * @var string + */ + public static $plugin_filename = array( + 'jetpack-protect/jetpack-protect.php', + 'protect/jetpack-protect.php', + 'jetpack-protect-dev/jetpack-protect.php', + ); + + /** + * The slug of the plugin associated with this product. + * + * @var string + */ + public static $plugin_slug = 'jetpack-protect'; + + /** + * Whether this product requires a user connection + * + * @var string + */ + public static $requires_user_connection = false; + + /** + * Get the internationalized product name + * + * @return string + */ + public static function get_name() { + return __( 'Protect', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product title + * + * @return string + */ + public static function get_title() { + return __( 'Jetpack Protect', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product description + * + * @return string + */ + public static function get_description() { + return __( 'Protect your site and scan for security vulnerabilities.', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product long description + * + * @return string + */ + public static function get_long_description() { + return __( 'Protect your site and scan for security vulnerabilities listed in our database.', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized features list + * + * @return array Protect features list + */ + public static function get_features() { + return array( + __( 'Over 20,000 listed vulnerabilities', 'jetpack-my-jetpack' ), + __( 'Daily automatic scans', 'jetpack-my-jetpack' ), + __( 'Check plugin and theme version status', 'jetpack-my-jetpack' ), + __( 'Easy to navigate and use', 'jetpack-my-jetpack' ), + ); + } + + /** + * Get the product princing details + * + * @return array Pricing details + */ + public static function get_pricing_for_ui() { + return array( + 'available' => true, + 'is_free' => true, + ); + } + + /** + * Get the URL where the user manages the product + * + * @return ?string + */ + public static function get_manage_url() { + return admin_url( 'admin.php?page=jetpack-protect' ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php new file mode 100644 index 00000000..452b1644 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php @@ -0,0 +1,218 @@ +<?php +/** + * Scan product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack\Products; + +use Automattic\Jetpack\Connection\Client; +use Automattic\Jetpack\My_Jetpack\Module_Product; +use Automattic\Jetpack\My_Jetpack\Wpcom_Products; +use Automattic\Jetpack\Redirect; +use Jetpack_Options; +use WP_Error; + +/** + * Class responsible for handling the Scan product + */ +class Scan extends Module_Product { + + /** + * The product slug + * + * @var string + */ + public static $slug = 'scan'; + + /** + * The Jetpack module name + * + * @var string + */ + public static $module_name = 'scan'; + + /** + * Get the internationalized product name + * + * @return string + */ + public static function get_name() { + return __( 'Scan', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product title + * + * @return string + */ + public static function get_title() { + return __( 'Jetpack Scan', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product description + * + * @return string + */ + public static function get_description() { + return __( 'Stay one step ahead of threats', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product long description + * + * @return string + */ + public static function get_long_description() { + return __( 'Automatic scanning and one-click fixes keep your site one step ahead of security threats and malware.', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized features list + * + * @return array Scan features list + */ + public static function get_features() { + return array( + _x( 'Automated daily scanning', 'Scan Product Feature', 'jetpack-my-jetpack' ), + _x( 'One-click fixes for most issues', 'Scan Product Feature', 'jetpack-my-jetpack' ), + _x( 'Instant email notifications', 'Scan Product Feature', 'jetpack-my-jetpack' ), + _x( 'Access to latest Firewall rules', 'Scan Product Feature', 'jetpack-my-jetpack' ), + ); + } + + /** + * Get the product princing details + * + * @return array Pricing details + */ + public static function get_pricing_for_ui() { + return array_merge( + array( + 'available' => true, + 'wpcom_product_slug' => static::get_wpcom_product_slug(), + ), + Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) + ); + } + + /** + * Get the WPCOM product slug used to make the purchase + * + * @return ?string + */ + public static function get_wpcom_product_slug() { + return 'jetpack_scan'; + } + + /** + * Hits the wpcom api to check scan status. + * + * @todo Maybe add caching. + * + * @return Object|WP_Error + */ + private static function get_state_from_wpcom() { + static $status = null; + + if ( $status !== null ) { + return $status; + } + + $site_id = Jetpack_Options::get_option( 'id' ); + + $response = Client::wpcom_json_api_request_as_blog( sprintf( '/sites/%d/scan', $site_id ) . '?force=wpcom', '2', array( 'timeout' => 2 ), null, 'wpcom' ); + + if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { + return new WP_Error( 'scan_state_fetch_failed' ); + } + + $body = wp_remote_retrieve_body( $response ); + $status = json_decode( $body ); + return $status; + } + + /** + * Checks whether the current plan (or purchases) of the site already supports the product + * + * @return boolean + */ + public static function has_required_plan() { + $scan_data = static::get_state_from_wpcom(); + if ( is_wp_error( $scan_data ) ) { + return false; + } + return is_object( $scan_data ) && isset( $scan_data->state ) && 'unavailable' !== $scan_data->state; + } + + /** + * Checks whether the Product is active + * + * Scan is not actually a module. Activation takes place on WPCOM. So lets consider it active if jetpack is active and has the plan. + * + * @return boolean + */ + public static function is_active() { + return static::is_jetpack_plugin_active() && static::has_required_plan(); + } + + /** + * Activates the product by installing and activating its plugin + * + * @param bool|WP_Error $current_result Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. + * @return boolean|\WP_Error + */ + public static function do_product_specific_activation( $current_result ) { + + $product_activation = parent::do_product_specific_activation( $current_result ); + + if ( is_wp_error( $product_activation ) && 'module_activation_failed' === $product_activation->get_error_code() ) { + // Scan is not a module. There's nothing in the plugin to be activated, so it's ok to fail to activate the module. + $product_activation = true; + } + + return $product_activation; + + } + + /** + * Checks whether the Jetpack module is active + * + * Scan is not a module. Nothing needs to be active. Let's always consider it active. + * + * @return bool + */ + public static function is_module_active() { + return true; + } + + /** + * Return product bundles list + * that supports the product. + * + * @return boolean|array Products bundle list. + */ + public static function is_upgradable_by_bundle() { + return array( 'security' ); + } + + /** + * Get the URL the user is taken after activating the product + * + * @return ?string + */ + public static function get_post_activation_url() { + return ''; // stay in My Jetpack page. + } + + /** + * Get the URL where the user manages the product + * + * @return ?string + */ + public static function get_manage_url() { + return Redirect::get_url( 'my-jetpack-manage-scan' ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php new file mode 100644 index 00000000..66e81139 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php @@ -0,0 +1,89 @@ +<?php +/** + * Get search stats for use in the wp-admin dashboard. + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack\Products; + +use Automattic\Jetpack\Connection\Client; +use Jetpack_Options; + +/** + * Search stats (e.g. post count, post type breakdown) + */ +class Search_Stats { + const CACHE_EXPIRY = 5 * MINUTE_IN_SECONDS; + const CACHE_GROUP = 'jetpack_search'; + const COUNT_ESTIMATE_CACHE_KEY = 'count_estimate'; + + /** + * Get stats from the WordPress.com API for the current blog ID. + */ + public function get_stats_from_wpcom() { + $blog_id = Jetpack_Options::get_option( 'id' ); + + if ( ! is_numeric( $blog_id ) ) { + return null; + } + + $response = Client::wpcom_json_api_request_as_blog( + '/sites/' . (int) $blog_id . '/jetpack-search/stats', + '2', + array(), + null, + 'wpcom' + ); + + return $response; + } + + /** + * Estimate record counts via a local database query. + */ + public static function estimate_count() { + $cached_value = wp_cache_get( self::COUNT_ESTIMATE_CACHE_KEY, self::CACHE_GROUP ); + if ( false !== $cached_value ) { + return $cached_value; + } + + global $wpdb; + $indexable_statuses = get_post_stati( array( 'public' => true ) ); + $unindexable_post_types = array_merge( + // Explicitly exclude various post types registered by plugins. + array( + 'elementor_library', // Used by Elementor. + 'jp_sitemap', // Used by Jetpack. + 'product_variation', // Used by Woocommerce. + 'redirect_rule', // Used by the Safe Redirect plugin. + 'reply', // Used by bbpress. + 'scheduled-action', // Used by Woocommerce. + ), + get_post_types( + array( + 'exclude_from_search' => true, + 'public' => false, + ), + 'names', + 'or' + ) + ); + + $prep_for_query = function ( $string ) use ( $wpdb ) { + // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedSimplePlaceholder -- This is used to sanitize post type names. + return $wpdb->prepare( "'%s'", $string ); + }; + + $statuses_list = implode( ',', array_map( $prep_for_query, $indexable_statuses ) ); + $post_types_list = implode( ',', array_map( $prep_for_query, $unindexable_post_types ) ); + + $count = (int) $wpdb->get_var( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- This is properly prepared, but the query is constructed using variables. + "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_status IN ($statuses_list) AND post_type NOT IN ($post_types_list)" + ); + + wp_cache_set( self::COUNT_ESTIMATE_CACHE_KEY, $count, self::CACHE_GROUP, self::CACHE_EXPIRY ); + return $count; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php new file mode 100644 index 00000000..fcd2654e --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php @@ -0,0 +1,251 @@ +<?php +/** + * Search product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack\Products; + +use Automattic\Jetpack\Connection\Client; +use Automattic\Jetpack\My_Jetpack\Hybrid_Product; +use Automattic\Jetpack\My_Jetpack\Wpcom_Products; +use Automattic\Jetpack\Search\Module_Control as Search_Module_Control; +use Jetpack_Options; +use WP_Error; + +/** + * Class responsible for handling the Search product + */ +class Search extends Hybrid_Product { + /** + * The product slug + * + * @var string + */ + public static $slug = 'search'; + + /** + * The Jetpack module name + * + * @var string + */ + public static $module_name = 'search'; + + /** + * The slug of the plugin associated with this product. + * + * @var string + */ + public static $plugin_slug = 'jetpack-search'; + + /** + * The filename (id) of the plugin associated with this product. + * + * @var string + */ + public static $plugin_filename = array( + 'jetpack-search/jetpack-search.php', + 'search/jetpack-search.php', + 'jetpack-search-dev/jetpack-search.php', + ); + + /** + * Get the internationalized product name + * + * @return string + */ + public static function get_name() { + return __( 'Search', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product title + * + * @return string + */ + public static function get_title() { + return __( 'Jetpack Search', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product description + * + * @return string + */ + public static function get_description() { + return __( 'Help them find what they need', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product long description + * + * @return string + */ + public static function get_long_description() { + return __( 'Help your site visitors find answers instantly so they keep reading and buying. Great for sites with a lot of content.', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized features list + * + * @return array Boost features list + */ + public static function get_features() { + return array( + __( 'Instant search and indexing', 'jetpack-my-jetpack' ), + __( 'Powerful filtering', 'jetpack-my-jetpack' ), + __( 'Supports 29 languages', 'jetpack-my-jetpack' ), + __( 'Spelling correction', 'jetpack-my-jetpack' ), + ); + } + + /** + * Get the product princing details + * + * @return array Pricing details + */ + public static function get_pricing_for_ui() { + // Basic pricing info. + $pricing = array_merge( + array( + 'available' => true, + 'wpcom_product_slug' => static::get_wpcom_product_slug(), + ), + Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) + ); + + $record_count = intval( Search_Stats::estimate_count() ); + + // Check whether the price is available. + // Bail early return the pricing info if not. + $product = Wpcom_Products::get_product( static::get_wpcom_product_slug() ); + if ( ! isset( $product->price_tier_list ) ) { + return $pricing; + } + + // Sort the tiers. + $price_tier_list = $product->price_tier_list; + array_multisort( array_column( $price_tier_list, 'maximum_units' ), SORT_ASC, $price_tier_list ); + + // Pick the first tier that is less than or equal to the record count. + foreach ( $product->price_tier_list as $price_tier ) { + if ( $record_count <= $price_tier->maximum_units ) { + break; + } + } + + // Compute the minimum price. + $minimum_price = $price_tier->minimum_price / 100; + + // Re define the display price based on the tier. + $pricing = Wpcom_Products::populate_with_discount( $product, $pricing, $minimum_price ); + + // 1. Flat fee in the same tier, so for search, `minimum_price == maximum_price`. + // 2. `maximum_units` is empty on the highest tier, so the logic displays the highest or the highest matching tier. + return array_merge( + $pricing, + array( + 'minimum_units' => $price_tier->minimum_units, + 'maximum_units' => $price_tier->maximum_units, + 'estimated_count' => $record_count, + 'full_price' => $minimum_price, // reset the full price to the minimum price. + ) + ); + } + + /** + * Get the WPCOM product slug used to make the purchase + * + * @return ?string + */ + public static function get_wpcom_product_slug() { + return 'jetpack_search'; + } + + /** + * Hits the wpcom api to check Search status. + * + * @todo Maybe add caching. + * + * @return Object|WP_Error + */ + private static function get_state_from_wpcom() { + static $status = null; + + if ( $status !== null ) { + return $status; + } + + $blog_id = Jetpack_Options::get_option( 'id' ); + + $response = Client::wpcom_json_api_request_as_blog( + '/sites/' . $blog_id . '/jetpack-search/plan', + '2', + array( 'timeout' => 2 ), + null, + 'wpcom' + ); + + if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { + return new WP_Error( 'search_state_fetch_failed' ); + } + + $body = wp_remote_retrieve_body( $response ); + $status = json_decode( $body ); + return $status; + } + + /** + * Checks whether the current plan of the site already supports the product + * + * Returns true if it supports. Return false if a purchase is still required. + * + * Free products will always return true. + * + * @return boolean + */ + public static function has_required_plan() { + $search_state = static::get_state_from_wpcom(); + return ! empty( $search_state->supports_search ) || ! empty( $search_state->supports_instant_search ); + } + + /** + * Activates the product. Try to enable instant search after the Search module was enabled. + * + * @param bool|WP_Error $product_activation Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. + * @return bool|WP_Error + */ + public static function do_product_specific_activation( $product_activation ) { + $product_activation = parent::do_product_specific_activation( $product_activation ); + if ( is_wp_error( $product_activation ) ) { + return $product_activation; + } + + if ( class_exists( 'Automattic\Jetpack\Search\Module_Control' ) ) { + ( new Search_Module_Control() )->enable_instant_search(); + } + + // we don't want to change the success of the activation if we fail to activate instant search. That's not mandatory. + return $product_activation; + } + + /** + * Get the URL the user is taken after activating the product + * + * @return ?string + */ + public static function get_post_activation_url() { + return ''; // stay in My Jetpack page or continue the purchase flow if needed. + } + + /** + * Get the URL where the user manages the product + * + * @return ?string + */ + public static function get_manage_url() { + return admin_url( 'admin.php?page=jetpack-search' ); + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php new file mode 100644 index 00000000..f23cfdcf --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php @@ -0,0 +1,247 @@ +<?php +/** + * Security product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack\Products; + +use Automattic\Jetpack\Connection\Client; +use Automattic\Jetpack\My_Jetpack\Module_Product; +use Automattic\Jetpack\My_Jetpack\Wpcom_Products; +use Jetpack_Options; +use WP_Error; + +/** + * Class responsible for handling the Security product + */ +class Security extends Module_Product { + + /** + * The product slug + * + * @var string + */ + public static $slug = 'security'; + + /** + * The Jetpack module name + * + * @var string + */ + public static $module_name = 'security'; + + /** + * Get the internationalized product name + * + * @return string + */ + public static function get_name() { + return __( 'Security', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product title + * + * @return string + */ + public static function get_title() { + return __( 'Security', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product description + * + * @return string + */ + public static function get_description() { + return __( 'Comprehensive site security, including Backup, Scan, and Anti-spam.', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product long description + * + * @return string + */ + public static function get_long_description() { + return __( 'Comprehensive site security, including Backup, Scan, and Anti-spam.', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized features list + * + * @return array Boost features list + */ + public static function get_features() { + return array( + _x( 'Real-time cloud backups with 10GB storage', 'Security Product Feature', 'jetpack-my-jetpack' ), + _x( 'Automated real-time malware scan', 'Security Product Feature', 'jetpack-my-jetpack' ), + _x( 'One-click fixes for most threats', 'Security Product Feature', 'jetpack-my-jetpack' ), + _x( 'Comment & form spam protection', 'Security Product Feature', 'jetpack-my-jetpack' ), + ); + } + + /** + * Get the product princing details + * + * @return array Pricing details + */ + public static function get_pricing_for_ui() { + return array_merge( + array( + 'available' => true, + 'wpcom_product_slug' => static::get_wpcom_product_slug(), + ), + Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) + ); + } + + /** + * Get the WPCOM product slug used to make the purchase + * + * @return ?string + */ + public static function get_wpcom_product_slug() { + return 'jetpack_security_t1_yearly'; + } + + /** + * Checks whether the Jetpack module is active + * + * This is a bundle and not a product. We should not use this information for anything + * + * @return bool + */ + public static function is_module_active() { + return false; + } + + /** + * Activates the product by installing and activating its plugin + * + * @param bool|WP_Error $current_result Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. + * @return boolean|\WP_Error + */ + public static function do_product_specific_activation( $current_result ) { + + $product_activation = parent::do_product_specific_activation( $current_result ); + + if ( is_wp_error( $product_activation ) && 'module_activation_failed' === $product_activation->get_error_code() ) { + // A bundle is not a module. There's nothing in the plugin to be activated, so it's ok to fail to activate the module. + $product_activation = true; + } + + // At this point, Jetpack plugin is installed. Let's activate each individual product. + $activation = Anti_Spam::activate(); + if ( is_wp_error( $activation ) ) { + return $activation; + } + + $activation = Backup::activate(); + if ( is_wp_error( $activation ) ) { + return $activation; + } + + $activation = Scan::activate(); + if ( is_wp_error( $activation ) ) { + return $activation; + } + + return $activation; + + } + + /** + * Checks whether the Product is active + * + * Security is a bundle and not a module. Activation takes place on WPCOM. So lets consider it active if jetpack is active and has the plan. + * + * @return boolean + */ + public static function is_active() { + return static::is_jetpack_plugin_active() && static::has_required_plan(); + } + + /** + * Hits the wpcom api to check scan status. + * + * @todo Maybe add caching. + * + * @return Object|WP_Error + */ + private static function get_state_from_wpcom() { + static $status = null; + + if ( $status !== null ) { + return $status; + } + + $site_id = Jetpack_Options::get_option( 'id' ); + + $response = Client::wpcom_json_api_request_as_blog( + sprintf( '/sites/%d/purchases', $site_id ), + '1.1', + array( + 'method' => 'GET', + ) + ); + if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { + return new WP_Error( 'purchases_state_fetch_failed' ); + } + + $body = wp_remote_retrieve_body( $response ); + $status = json_decode( $body ); + return $status; + } + + /** + * Checks whether the current plan (or purchases) of the site already supports the product + * + * @return boolean + */ + public static function has_required_plan() { + $purchases_data = static::get_state_from_wpcom(); + if ( is_wp_error( $purchases_data ) ) { + return false; + } + if ( is_array( $purchases_data ) && ! empty( $purchases_data ) ) { + foreach ( $purchases_data as $purchase ) { + if ( + 0 === strpos( $purchase->product_slug, 'jetpack_security' ) || + 0 === strpos( $purchase->product_slug, 'jetpack_complete' ) + ) { + return true; + } + } + } + return false; + } + + /** + * Checks whether product is a bundle. + * + * @return boolean True + */ + public static function is_bundle_product() { + return true; + } + + /** + * Return all the products it contains. + * + * @return Array Product slugs + */ + public static function get_supported_products() { + return array( 'backup', 'scan', 'anti-spam' ); + } + + /** + * Get the URL where the user manages the product + * + * @return ?string + */ + public static function get_manage_url() { + return ''; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php new file mode 100644 index 00000000..432c3501 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php @@ -0,0 +1,135 @@ +<?php +/** + * Search product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack\Products; + +use Automattic\Jetpack\My_Jetpack\Hybrid_Product; +use Automattic\Jetpack\My_Jetpack\Wpcom_Products; + +/** + * Class responsible for handling the Social product + */ +class Social extends Hybrid_Product { + + /** + * The product slug + * + * @var string + */ + public static $slug = 'social'; + + /** + * The Jetpack module name + * + * @var string + */ + public static $module_name = 'publicize'; + + /** + * The slug of the plugin associated with this product. + * + * @var string + */ + public static $plugin_slug = 'jetpack-social'; + + /** + * The filename (id) of the plugin associated with this product. + * + * @var string + */ + public static $plugin_filename = array( + 'jetpack-social/jetpack-social.php', + 'social/jetpack-social.php', + 'jetpack-social-dev/jetpack-social.php', + ); + + /** + * Get the internationalized product name + * + * @return string + */ + public static function get_name() { + return __( 'Social', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product title + * + * @return string + */ + public static function get_title() { + return __( 'Jetpack Social', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product description + * + * @return string + */ + public static function get_description() { + return __( 'Reach your audience on social media', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product long description + * + * @return string + */ + public static function get_long_description() { + return __( 'Promote your content on social media by automatically publishing when you publish on your site.', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized features list + * + * @return array Social features list + */ + public static function get_features() { + return array( + __( 'Post to social networks', 'jetpack-my-jetpack' ), + __( 'Schedule publishing', 'jetpack-my-jetpack' ), + __( 'Supports the major social networks', 'jetpack-my-jetpack' ), + ); + } + + /** + * Get the product pricing details + * + * @return array Pricing details + */ + public static function get_pricing_for_ui() { + return array_merge( + array( + 'available' => true, + 'wpcom_product_slug' => static::get_wpcom_product_slug(), + ), + Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) + ); + } + + /** + * Get the WPCOM product slug used to make the purchase + * + * @return string + */ + public static function get_wpcom_product_slug() { + return 'jetpack_social'; + } + + /** + * Get the URL where the user manages the product + * + * @return string + */ + public static function get_manage_url() { + if ( static::is_jetpack_plugin_active() ) { + return admin_url( 'admin.php?page=jetpack#/settings?term=publicize' ); + } elseif ( static::is_plugin_active() ) { + return admin_url( 'admin.php?page=jetpack-social' ); + } + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php new file mode 100644 index 00000000..d16152da --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php @@ -0,0 +1,125 @@ +<?php +/** + * VideoPress product + * + * @package my-jetpack + */ + +namespace Automattic\Jetpack\My_Jetpack\Products; + +use Automattic\Jetpack\My_Jetpack\Module_Product; +use Automattic\Jetpack\My_Jetpack\Wpcom_Products; + +/** + * Class responsible for handling the VideoPress product + */ +class Videopress extends Module_Product { + + /** + * The product slug + * + * @var string + */ + public static $slug = 'videopress'; + + /** + * The Jetpack module name + * + * @var string + */ + public static $module_name = 'videopress'; + + /** + * Get the internationalized product name + * + * @return string + */ + public static function get_name() { + return __( 'VideoPress', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product title + * + * @return string + */ + public static function get_title() { + return __( 'Jetpack VideoPress', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product description + * + * @return string + */ + public static function get_description() { + return __( 'High quality, ad-free video', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized product long description + * + * @return string + */ + public static function get_long_description() { + return __( 'High-quality, ad-free video built specifically for WordPress.', 'jetpack-my-jetpack' ); + } + + /** + * Get the internationalized features list + * + * @return array Boost features list + */ + public static function get_features() { + return array( + _x( '1TB of storage', 'VideoPress Product Feature', 'jetpack-my-jetpack' ), + _x( 'Built into WordPress editor', 'VideoPress Product Feature', 'jetpack-my-jetpack' ), + _x( 'Ad-free and brandable player', 'VideoPress Product Feature', 'jetpack-my-jetpack' ), + _x( 'Unlimited users', 'VideoPress Product Feature', 'jetpack-my-jetpack' ), + ); + } + + /** + * Get the product princing details + * + * @return array Pricing details + */ + public static function get_pricing_for_ui() { + return array_merge( + array( + 'available' => true, + 'wpcom_product_slug' => static::get_wpcom_product_slug(), + ), + Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) + ); + } + + /** + * Get the WPCOM product slug used to make the purchase + * + * @return ?string + */ + public static function get_wpcom_product_slug() { + return 'jetpack_videopress'; + } + + /** + * Get the URL the user is taken after activating the product + * + * @return ?string + */ + public static function get_post_activation_url() { + return ''; // stay in My Jetpack page. + } + + /** + * Get the URL where the user manages the product + * + * @return ?string + */ + public static function get_manage_url() { + if ( static::is_active() ) { + return admin_url( 'admin.php?page=jetpack#/settings?term=videopress' ); + } + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-options/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-options/CHANGELOG.md deleted file mode 100644 index 9f7ade0b..00000000 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-options/CHANGELOG.md +++ /dev/null @@ -1,178 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [1.14.2] - 2022-01-04 -### Changed -- Updated package dependencies - -## [1.14.1] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.14.0] - 2021-11-30 -### Added -- Added has_seen_wc_connection_modal option to the list of available options -- Add new Jetpack plugin partner coupon options - -## [1.13.5] - 2021-11-16 -### Added -- Added Jetpack Option 'licensing_activation_notice_dismiss'. - -## [1.13.4] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [1.13.3] - 2021-10-12 -### Changed -- Updated package dependencies - -## [1.13.2] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.13.1] - 2021-08-30 -### Changed -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). -- update annotations versions - -## [1.13.0] - 2021-06-15 -### Changed -- Added 'purchaseToken' option for logged out user purchases on WordPress.com. - -## [1.12.1] - 2021-05-25 -### Changed -- Updated package dependencies. - -## [1.12.0] - 2021-04-27 -### Added -- Added unique_registrations option - -## [1.11.4] - 2021-04-08 -### Changed -- Packaging and build changes, no change to the package itself. - -## [1.11.3] - 2021-03-30 -### Added -- added active_modules_initialized option -- Composer alias for dev-master, to improve dependencies - -### Changed -- Update package dependencies. - -## [1.11.2] - 2021-02-23 - -- Setup Wizard: Remove setup wizard -- Jetpack Recommendations: Add dashboard banner - -## [1.11.1] - 2021-01-28 - -- Jetpack Recommendations: Show Recommendations tab for all users (#18576)\n\nCommitted via a GitHub action: https://github.com/automattic/jetpack/runs/518520328 - -## [1.11.0] - 2021-01-26 - -- Add mirror-repo information to all current composer packages -- Monorepo: Reorganize all projects - -## [1.10.0] - 2021-01-05 - -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.9.1] - 2020-11-24 - -- Version packages for release - -## [1.9.0] - 2020-09-29 - -- Licensing: Add support for Jetpack licenses - -## [1.8.0] - 2020-08-25 - -- Jetpack Anti-Spam: update Anti-Spam label in sidebar menu item - -## [1.7.0] - 2020-07-28 - -- Add a filter to jetpack options - -## [1.6.0] - 2020-06-30 - -- Various: Update use of whitelist/blacklist - -## [1.5.0] - 2020-05-26 - -- Jetpack Setup Wizard: Add Setup Wizard status and routing memory -- Implement Jetpack Wizard banner -- Implemented /setup/questionnaire API endpoint for the new setup wizard - -## [1.4.0] - 2020-04-28 - -- Update dependencies to latest stable - -## [1.3.0] - 2020-03-31 - -- Update dependencies to latest stable - -## [1.2.0] - 2020-02-25 - -- Mobile Theme: remove feature - -## [1.1.3] - 2020-02-14 - -- Initial Sync Health Status Class and Data Loss Handler - -## [1.1.2] - 2019-11-08 - -- Packages: Use classmap instead of PSR-4 - -## [1.1.1] - 2019-10-29 - -- PHPCS: Rest of the packages - -## [1.1.0] - 2019-09-14 - -- Add Stats to XML-RPC Errors -- Stats: Use Transient API to Improve Cache Performance - -## [1.0.1] - 2019-07-10 - -- Adding a readme to the Jetpack Options package. - -## 1.0.0 - 2019-07-09 - -- Initial release - -[1.14.2]: https://github.com/Automattic/jetpack-options/compare/v1.14.1...v1.14.2 -[1.14.1]: https://github.com/Automattic/jetpack-options/compare/v1.14.0...v1.14.1 -[1.14.0]: https://github.com/Automattic/jetpack-options/compare/v1.13.5...v1.14.0 -[1.13.5]: https://github.com/Automattic/jetpack-options/compare/v1.13.4...v1.13.5 -[1.13.4]: https://github.com/Automattic/jetpack-options/compare/v1.13.3...v1.13.4 -[1.13.3]: https://github.com/Automattic/jetpack-options/compare/v1.13.2...v1.13.3 -[1.13.2]: https://github.com/Automattic/jetpack-options/compare/v1.13.1...v1.13.2 -[1.13.1]: https://github.com/Automattic/jetpack-options/compare/v1.13.0...v1.13.1 -[1.13.0]: https://github.com/Automattic/jetpack-options/compare/v1.12.1...v1.13.0 -[1.12.1]: https://github.com/Automattic/jetpack-options/compare/v1.12.0...v1.12.1 -[1.12.0]: https://github.com/Automattic/jetpack-options/compare/v1.11.4...v1.12.0 -[1.11.4]: https://github.com/Automattic/jetpack-options/compare/v1.11.3...v1.11.4 -[1.11.3]: https://github.com/Automattic/jetpack-options/compare/v1.11.2...v1.11.3 -[1.11.2]: https://github.com/Automattic/jetpack-options/compare/v1.11.1...v1.11.2 -[1.11.1]: https://github.com/Automattic/jetpack-options/compare/v1.11.0...v1.11.1 -[1.11.0]: https://github.com/Automattic/jetpack-options/compare/v1.10.0...v1.11.0 -[1.10.0]: https://github.com/Automattic/jetpack-options/compare/v1.9.1...v1.10.0 -[1.9.1]: https://github.com/Automattic/jetpack-options/compare/v1.9.0...v1.9.1 -[1.9.0]: https://github.com/Automattic/jetpack-options/compare/v1.8.0...v1.9.0 -[1.8.0]: https://github.com/Automattic/jetpack-options/compare/v1.7.0...v1.8.0 -[1.7.0]: https://github.com/Automattic/jetpack-options/compare/v1.6.0...v1.7.0 -[1.6.0]: https://github.com/Automattic/jetpack-options/compare/v1.5.0...v1.6.0 -[1.5.0]: https://github.com/Automattic/jetpack-options/compare/v1.4.0...v1.5.0 -[1.4.0]: https://github.com/Automattic/jetpack-options/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/Automattic/jetpack-options/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/Automattic/jetpack-options/compare/v1.1.3...v1.2.0 -[1.1.3]: https://github.com/Automattic/jetpack-options/compare/v1.1.2...v1.1.3 -[1.1.2]: https://github.com/Automattic/jetpack-options/compare/v1.1.1...v1.1.2 -[1.1.1]: https://github.com/Automattic/jetpack-options/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/Automattic/jetpack-options/compare/v1.0.1...v1.1.0 -[1.0.1]: https://github.com/Automattic/jetpack-options/compare/v1.0.0...v1.0.1 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-partner/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-partner/CHANGELOG.md index e9aef962..c444d70e 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-partner/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-partner/CHANGELOG.md @@ -5,6 +5,58 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.7.9] - 2022-05-18 +### Fixed +- Fix new PHPCS sniffs. [#24366] + +## [1.7.8] - 2022-05-04 +### Changed +- Updated package dependencies. [#24095] + +### Deprecated +- Moved the options class into Connection. [#24095] + +## [1.7.7] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.7.6] - 2022-04-19 +### Changed +- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` + +## [1.7.5] - 2022-04-12 +### Changed +- Updated package dependencies. + +## [1.7.4] - 2022-04-06 +### Changed +- Updated package dependencies. + +## [1.7.3] - 2022-03-29 +### Changed +- Microperformance: Use === null instead of is_null + +## [1.7.2] - 2022-03-02 +### Changed +- Updated package dependencies. + +## [1.7.1] - 2022-02-22 +### Changed +- Updated package dependencies. + +## [1.7.0] - 2022-02-16 +### Added +- Added the ability to specify a partner logo for each supported partner +- Remotely check if partner coupon looks valid + +## [1.6.4] - 2022-01-25 +### Changed +- Updated package dependencies. + +## [1.6.3] - 2022-01-18 +### Changed +- Updated package dependencies. + ## [1.6.2] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -108,6 +160,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add partner subsidiary id to upgrade URLs. +[1.7.9]: https://github.com/Automattic/jetpack-partner/compare/v1.7.8...v1.7.9 +[1.7.8]: https://github.com/Automattic/jetpack-partner/compare/v1.7.7...v1.7.8 +[1.7.7]: https://github.com/Automattic/jetpack-partner/compare/v1.7.6...v1.7.7 +[1.7.6]: https://github.com/Automattic/jetpack-partner/compare/v1.7.5...v1.7.6 +[1.7.5]: https://github.com/Automattic/jetpack-partner/compare/v1.7.4...v1.7.5 +[1.7.4]: https://github.com/Automattic/jetpack-partner/compare/v1.7.3...v1.7.4 +[1.7.3]: https://github.com/Automattic/jetpack-partner/compare/v1.7.2...v1.7.3 +[1.7.2]: https://github.com/Automattic/jetpack-partner/compare/v1.7.1...v1.7.2 +[1.7.1]: https://github.com/Automattic/jetpack-partner/compare/v1.7.0...v1.7.1 +[1.7.0]: https://github.com/Automattic/jetpack-partner/compare/v1.6.4...v1.7.0 +[1.6.4]: https://github.com/Automattic/jetpack-partner/compare/v1.6.3...v1.6.4 +[1.6.3]: https://github.com/Automattic/jetpack-partner/compare/v1.6.2...v1.6.3 [1.6.2]: https://github.com/Automattic/jetpack-partner/compare/v1.6.1...v1.6.2 [1.6.1]: https://github.com/Automattic/jetpack-partner/compare/v1.6.0...v1.6.1 [1.6.0]: https://github.com/Automattic/jetpack-partner/compare/v1.5.7...v1.6.0 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-partner/src/class-partner-coupon.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-partner/src/class-partner-coupon.php index a1619a2b..c664e9e8 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-partner/src/class-partner-coupon.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-partner/src/class-partner-coupon.php @@ -7,6 +7,7 @@ namespace Automattic\Jetpack; +use Automattic\Jetpack\Connection\Client as Connection_Client; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Jetpack_Options; @@ -20,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) { /** * Class Jetpack_Partner_Coupon * - * @since $$next_version$$ + * @since 1.6.0 */ class Partner_Coupon { @@ -39,6 +40,20 @@ class Partner_Coupon { public static $added_option = 'partner_coupon_added'; /** + * Name of "last availability check" transient. + * + * @var string + */ + public static $last_check_transient = 'jetpack_partner_coupon_last_check'; + + /** + * Callable that executes a blog-authenticated request. + * + * @var callable + */ + protected $request_as_blog; + + /** * Jetpack_Partner_Coupon * * @var Partner_Coupon|null @@ -51,7 +66,14 @@ class Partner_Coupon { * @var array */ private static $supported_partners = array( - 'IONOS' => 'IONOS', + 'IONOS' => array( + 'name' => 'IONOS', + 'logo' => array( + 'src' => '/images/ionos-logo.jpg', + 'width' => 119, + 'height' => 32, + ), + ), ); /** @@ -65,16 +87,27 @@ class Partner_Coupon { /** * Get singleton instance of class. + * + * @return Partner_Coupon */ public static function get_instance() { - if ( is_null( self::$instance ) ) { - self::$instance = new Partner_Coupon(); + if ( self::$instance === null ) { + self::$instance = new Partner_Coupon( array( Connection_Client::class, 'wpcom_json_api_request_as_blog' ) ); } return self::$instance; } /** + * Constructor. + * + * @param callable $request_as_blog Callable that executes a blog-authenticated request. + */ + public function __construct( $request_as_blog ) { + $this->request_as_blog = $request_as_blog; + } + + /** * Register hooks to catch and purge coupon. * * @param string $plugin_slug The plugin slug to differentiate between Jetpack connections. @@ -83,8 +116,6 @@ class Partner_Coupon { public static function register_coupon_admin_hooks( $plugin_slug, $redirect_location ) { $instance = self::get_instance(); - add_action( 'admin_init', array( $instance, 'purge_coupon' ) ); - // We have to use an anonymous function, so we can pass along relevant information // and not have to hardcode values for a single plugin. // This open up the opportunity for e.g. the "all-in-one" and backup plugins @@ -93,6 +124,7 @@ class Partner_Coupon { 'admin_init', function () use ( $plugin_slug, $redirect_location, $instance ) { $instance->catch_coupon( $plugin_slug, $redirect_location ); + $instance->maybe_purge_coupon( $plugin_slug ); } ); } @@ -105,7 +137,7 @@ class Partner_Coupon { */ public function catch_coupon( $plugin_slug, $redirect_location ) { // Accept and store a partner coupon if present, and redirect to Jetpack connection screen. - $partner_coupon = isset( $_GET['jetpack-partner-coupon'] ) ? sanitize_text_field( $_GET['jetpack-partner-coupon'] ) : false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended + $partner_coupon = isset( $_GET['jetpack-partner-coupon'] ) ? sanitize_text_field( wp_unslash( $_GET['jetpack-partner-coupon'] ) ) : false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( $partner_coupon ) { Jetpack_Options::update_options( array( @@ -127,27 +159,134 @@ class Partner_Coupon { /** * Purge partner coupon. * - * We automatically purge partner coupons after a certain amount of time to prevent - * us from unnecessarily promoting a product for months or years in the future. + * We try to remotely check if a coupon looks valid. We also automatically purge + * partner coupons after a certain amount of time to prevent unnecessary look-ups + * and/or promoting a product for months or years in the future due to unknown + * errors. + * + * @param string $plugin_slug The plugin slug to differentiate between Jetpack connections. + */ + public function maybe_purge_coupon( $plugin_slug ) { + // Only run coupon checks on Jetpack admin pages. + // The "admin-ui" package is responsible for registering the Jetpack admin + // page for all Jetpack plugins and has hardcoded the settings page to be + // "jetpack", so we shouldn't need to allow for dynamic/custom values. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( ! isset( $_GET['page'] ) || 'jetpack' !== $_GET['page'] ) { + return; + } + + if ( ( new Status() )->is_offline_mode() ) { + return; + } + + $connection = new Connection_Manager( $plugin_slug ); + if ( ! $connection->is_connected() ) { + return; + } + + if ( $this->maybe_purge_coupon_by_added_date() ) { + return; + } + + // Limit checks to happen once a minute at most. + if ( get_transient( self::$last_check_transient ) ) { + return; + } + + set_transient( self::$last_check_transient, true, MINUTE_IN_SECONDS ); + + $this->maybe_purge_coupon_by_availability_check(); + } + + /** + * Purge coupon based on local added date. + * + * We automatically remove the coupon after a month to "self-heal" if + * something in the claim process has broken with the site. + * + * @return bool Return whether we should skip further purge checks. */ - public function purge_coupon() { + protected function maybe_purge_coupon_by_added_date() { $date = Jetpack_Options::get_option( self::$added_option, '' ); if ( empty( $date ) ) { - return; + return true; } $expire_date = strtotime( '+30 days', $date ); $today = time(); if ( $today >= $expire_date ) { - Jetpack_Options::delete_option( - array( - self::$coupon_option, - self::$added_option, - ) - ); + $this->delete_coupon_data(); + + return true; + } + + return false; + } + + /** + * Purge coupon based on availability check. + * + * @return bool Return whether we deleted coupon data. + */ + protected function maybe_purge_coupon_by_availability_check() { + $blog_id = Jetpack_Options::get_option( 'id', false ); + + if ( ! $blog_id ) { + return false; + } + + $coupon = self::get_coupon(); + + if ( ! $coupon ) { + return false; + } + + $response = call_user_func_array( + $this->request_as_blog, + array( + add_query_arg( + array( 'coupon_code' => $coupon['coupon_code'] ), + sprintf( + '/sites/%d/jetpack-partner/coupon/v1/site/coupon', + $blog_id + ) + ), + 2, + array( 'method' => 'GET' ), + null, + 'wpcom', + ) + ); + + $body = json_decode( wp_remote_retrieve_body( $response ), true ); + + if ( + 200 === wp_remote_retrieve_response_code( $response ) && + is_array( $body ) && + isset( $body['available'] ) && + false === $body['available'] + ) { + $this->delete_coupon_data(); + + return true; } + + return false; + } + + /** + * Delete all coupon data. + */ + protected function delete_coupon_data() { + Jetpack_Options::delete_option( + array( + self::$coupon_option, + self::$added_option, + ) + ); } /** @@ -208,8 +347,9 @@ class Partner_Coupon { } return array( - 'name' => $supported_partners[ $prefix ], + 'name' => $supported_partners[ $prefix ]['name'], 'prefix' => $prefix, + 'logo' => isset( $supported_partners[ $prefix ]['logo'] ) ? $supported_partners[ $prefix ]['logo'] : null, ); } @@ -227,7 +367,7 @@ class Partner_Coupon { /** * Allow for plugins to register supported products. * - * @since $$next_version$$ + * @since 1.6.0 * * @param array A list of product details. * @return array @@ -296,7 +436,7 @@ class Partner_Coupon { /** * Allow external code to add additional supported partners. * - * @since $$next_version$$ + * @since 1.6.0 * * @param array $supported_partners A list of supported partners. * @return array @@ -313,7 +453,7 @@ class Partner_Coupon { /** * Allow external code to add additional supported presets. * - * @since $$next_version$$ + * @since 1.6.0 * * @param array $supported_presets A list of supported presets. * @return array diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-partner/src/class-partner.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-partner/src/class-partner.php index bec501bc..2d70c521 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-partner/src/class-partner.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-partner/src/class-partner.php @@ -46,7 +46,7 @@ class Partner { * @since 1.0.0 */ public static function init() { - if ( is_null( self::$instance ) ) { + if ( self::$instance === null ) { self::$instance = new Partner(); add_filter( 'jetpack_build_authorize_url', array( self::$instance, 'add_subsidiary_id_as_query_arg' ) ); add_filter( 'jetpack_build_authorize_url', array( self::$instance, 'add_affiliate_code_as_query_arg' ) ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-password-checker/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-password-checker/CHANGELOG.md index faa074b4..da0411ef 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-password-checker/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-password-checker/CHANGELOG.md @@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.4] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [0.2.3] - 2022-03-29 +### Changed +- Microperformance: Use === null instead of is_null + +## [0.2.2] - 2022-01-25 +### Changed +- Updated package dependencies. + +## [0.2.1] - 2022-01-18 +### Changed +- Updated package dependencies. + ## [0.2.0] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -52,6 +68,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. +[0.2.4]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.3...v0.2.4 +[0.2.3]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.2...v0.2.3 +[0.2.2]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.1...v0.2.2 +[0.2.1]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.8...v0.2.0 [0.1.8]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.7...v0.1.8 [0.1.7]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.6...v0.1.7 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php index 7c9cec39..374dc893 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php @@ -82,7 +82,7 @@ class Password_Checker { * @param mixed $user can be an integer ID, or a WP_User object. */ public function __construct( $user = null ) { - if ( is_null( $user ) ) { + if ( $user === null ) { $this->user_id = get_current_user_id(); } elseif ( is_object( $user ) && isset( $user->ID ) ) { // Existing user, using their ID. diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/.phpcs.dir.xml b/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/.phpcs.dir.xml new file mode 100644 index 00000000..fd41c865 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/.phpcs.dir.xml @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<ruleset> + + <rule ref="WordPress.WP.I18n"> + <properties> + <property name="text_domain" type="array"> + <element value="jetpack-plugins-installer" /> + </property> + </properties> + </rule> + <rule ref="Jetpack.Functions.I18n"> + <properties> + <property name="text_domain" value="jetpack-plugins-installer" /> + </properties> + </rule> + + <rule ref="WordPress.Utils.I18nTextDomainFixer"> + <properties> + <property name="old_text_domain" type="array" /> + <property name="new_text_domain" value="jetpack-plugins-installer" /> + </properties> + </rule> + +</ruleset> diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/CHANGELOG.md new file mode 100644 index 00000000..3994845e --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/CHANGELOG.md @@ -0,0 +1,28 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.1.2] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [0.1.1] - 2022-03-29 +### Added +- Set composer package type to "jetpack-library" so i18n will work. + +## 0.1.0 - 2022-02-02 +### Added +- First version +- New functions to safely check plugin statuses + +### Changed +- Build: add missing mirror repo details, so package can be deployed. + +### Fixed +- Fix method logic + +[0.1.2]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.1...v0.1.2 +[0.1.1]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.0...v0.1.1 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-options/LICENSE.txt b/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/LICENSE.txt index e82774c1..e82774c1 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-options/LICENSE.txt +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/LICENSE.txt diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-options/SECURITY.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/SECURITY.md index b4b46c0e..b4b46c0e 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-options/SECURITY.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/SECURITY.md diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php new file mode 100644 index 00000000..ae129c59 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php @@ -0,0 +1,155 @@ +<?php +/** + * Automatic_Upgrader_Skin extension for Jetpack + * + * @package jetpack-plugins-installer + */ + +namespace Automattic\Jetpack; + +use Automatic_Upgrader_Skin; + +/** + * Include required files from wp-admin. + */ +require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; +require_once ABSPATH . 'wp-admin/includes/file.php'; + +/** + * Allows us to capture that the site doesn't have proper file system access. + * In order to update the plugin. + */ +class Automatic_Install_Skin extends Automatic_Upgrader_Skin { + /** + * Stores the last error key; + * + * @var string + **/ + protected $main_error_code = 'install_error'; + + /** + * Stores the last error message. + * + * @var string + **/ + protected $main_error_message = 'An unknown error occurred during installation'; + + /** + * Overwrites the set_upgrader to be able to tell if we e ven have the ability to write to the files. + * + * @param WP_Upgrader $upgrader The upgrader object. + */ + public function set_upgrader( &$upgrader ) { + parent::set_upgrader( $upgrader ); + + // Check if we even have permission to. + $result = $upgrader->fs_connect( array( WP_CONTENT_DIR, WP_PLUGIN_DIR ) ); + if ( ! $result ) { + // set the string here since they are not available just yet. + $upgrader->generic_strings(); + $this->feedback( 'fs_unavailable' ); + } + } + + /** + * Overwrites the error function + * + * @param \WP_Error|mixed $error The error object. + */ + public function error( $error ) { + if ( is_wp_error( $error ) ) { + $this->feedback( $error ); + } + } + + /** + * Set the main error code. + * + * Don't set the process_failed as code since it is not that helpful unless we don't have one already set + * + * @param string $code The error code. + * @return void + */ + private function set_main_error_code( $code ) { + $this->main_error_code = ( 'process_failed' === $code && $this->main_error_code ? $this->main_error_code : $code ); + } + + /** + * Set the main error message. + * + * Don't set the process_failed as message since it is not that helpful unless we don't have one already set + * + * @param string $message The error message. + * @param string $code The error code. + * @return void + */ + private function set_main_error_message( $message, $code ) { + $this->main_error_message = ( 'process_failed' === $code && $this->main_error_message ? $this->main_error_message : $message ); + } + + /** + * Get the main error code + * + * @return string + */ + public function get_main_error_code() { + return $this->main_error_code; + } + + /** + * Get the main error message + * + * @return string + */ + public function get_main_error_message() { + return $this->main_error_message; + } + + /** + * Overwrites the feedback function + * + * @param string|array|WP_Error $data Data. + * @param mixed ...$args Optional text replacements. + */ + public function feedback( $data, ...$args ) { + + $current_error = null; + if ( is_wp_error( $data ) ) { + $this->set_main_error_code( $data->get_error_code() ); + $string = $data->get_error_message(); + } elseif ( is_array( $data ) ) { + return; + } else { + $string = $data; + } + + if ( ! empty( $this->upgrader->strings[ $string ] ) ) { + $this->set_main_error_code( $string ); + + $current_error = $string; + $string = $this->upgrader->strings[ $string ]; + } + + if ( strpos( $string, '%' ) !== false ) { + if ( ! empty( $args ) ) { + $string = vsprintf( $string, $args ); + } + } + + $string = trim( $string ); + $string = wp_kses( + $string, + array( + 'a' => array( + 'href' => true, + ), + 'br' => true, + 'em' => true, + 'strong' => true, + ) + ); + + $this->set_main_error_message( $string, $current_error ); + $this->messages[] = $string; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php new file mode 100644 index 00000000..bae23baa --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php @@ -0,0 +1,238 @@ +<?php +/** + * Plugins Library + * + * Helper functions for installing and activating plugins. + * + * Used by the REST API + * + * @package jetpack-plugins-installer + */ + +namespace Automattic\Jetpack; + +use Plugin_Upgrader; +use WP_Error; + +/** + * Plugins management tools. + */ +class Plugins_Installer { + + /** + * Ensures that plugins functions are loaded, as they are only loaded in admin context by default. + */ + private static function ensure_plugin_functions_are_loaded() { + if ( ! function_exists( 'get_plugins' ) ) { + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + } + } + /** + * Install and activate a plugin. + * + * @since-jetpack 5.8.0 + * + * @param string $slug Plugin slug. + * + * @return bool|WP_Error True if installation succeeded, error object otherwise. + */ + public static function install_and_activate_plugin( $slug ) { + $plugin_id = self::get_plugin_id_by_slug( $slug ); + + if ( ! $plugin_id ) { + $installed = self::install_plugin( $slug ); + if ( is_wp_error( $installed ) ) { + return $installed; + } + $plugin_id = self::get_plugin_id_by_slug( $slug ); + } elseif ( self::is_plugin_active( $plugin_id ) ) { + return true; // Already installed and active. + } + + if ( ! current_user_can( 'activate_plugins' ) ) { + return new WP_Error( 'not_allowed', __( 'You are not allowed to activate plugins on this site.', 'jetpack-plugins-installer' ) ); + } + $activated = activate_plugin( $plugin_id ); + if ( is_wp_error( $activated ) ) { + return $activated; + } + + return true; + } + + /** + * Install a plugin. + * + * @since-jetpack 5.8.0 + * + * @param string $slug Plugin slug. + * + * @return bool|WP_Error True if installation succeeded, error object otherwise. + */ + public static function install_plugin( $slug ) { + if ( is_multisite() && ! current_user_can( 'manage_network' ) ) { + return new WP_Error( 'not_allowed', __( 'You are not allowed to install plugins on this site.', 'jetpack-plugins-installer' ) ); + } + + $skin = new Automatic_Install_Skin(); + $upgrader = new Plugin_Upgrader( $skin ); + $zip_url = self::generate_wordpress_org_plugin_download_link( $slug ); + $mc_stats = new A8c_Mc_Stats(); + + $result = $upgrader->install( $zip_url ); + + if ( is_wp_error( $result ) ) { + $mc_stats->add( 'install-plugin', "fail-$slug" ); + return $result; + } + + $plugin = self::get_plugin_id_by_slug( $slug ); + $error_code = 'install_error'; + if ( ! $plugin ) { + $error = __( 'There was an error installing your plugin', 'jetpack-plugins-installer' ); + } + + if ( ! $result ) { + $error_code = $upgrader->skin->get_main_error_code(); + $message = $upgrader->skin->get_main_error_message(); + $error = $message ? $message : __( 'An unknown error occurred during installation', 'jetpack-plugins-installer' ); + } + + if ( ! empty( $error ) ) { + if ( 'download_failed' === $error_code ) { + // For backwards compatibility: versions prior to 3.9 would return no_package instead of download_failed. + $error_code = 'no_package'; + } + + $mc_stats->add( 'install-plugin', "fail-$slug" ); + return new WP_Error( $error_code, $error, 400 ); + } + + $mc_stats->add( 'install-plugin', "success-$slug" ); + return (array) $upgrader->skin->get_upgrade_messages(); + } + + /** + * Get WordPress.org zip download link from a plugin slug + * + * @param string $plugin_slug Plugin slug. + */ + protected static function generate_wordpress_org_plugin_download_link( $plugin_slug ) { + return "https://downloads.wordpress.org/plugin/$plugin_slug.latest-stable.zip"; + } + + /** + * Get the plugin ID (composed of the plugin slug and the name of the main plugin file) from a plugin slug. + * + * @param string $slug Plugin slug. + */ + public static function get_plugin_id_by_slug( $slug ) { + // Check if get_plugins() function exists. This is required on the front end of the + // site, since it is in a file that is normally only loaded in the admin. + if ( ! function_exists( 'get_plugins' ) ) { + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + } + + /** This filter is documented in wp-admin/includes/class-wp-plugins-list-table.php */ + $plugins = apply_filters( 'all_plugins', get_plugins() ); + if ( ! is_array( $plugins ) ) { + return false; + } + + foreach ( $plugins as $plugin_file => $plugin_data ) { + if ( self::get_slug_from_file_path( $plugin_file ) === $slug ) { + return $plugin_file; + } + } + + return false; + } + + /** + * Get the plugin slug from the plugin ID (composed of the plugin slug and the name of the main plugin file) + * + * @param string $plugin_file Plugin file (ID -- e.g. hello-dolly/hello.php). + */ + protected static function get_slug_from_file_path( $plugin_file ) { + // Similar to get_plugin_slug() method. + $slug = dirname( $plugin_file ); + if ( '.' === $slug ) { + $slug = preg_replace( '/(.+)\.php$/', '$1', $plugin_file ); + } + + return $slug; + } + + /** + * Get the activation status for a plugin. + * + * @since-jetpack 8.9.0 + * + * @param string $plugin_file The plugin file to check. + * @return string Either 'network-active', 'active' or 'inactive'. + */ + public static function get_plugin_status( $plugin_file ) { + if ( self::is_plugin_active_for_network( $plugin_file ) ) { + return 'network-active'; + } + + if ( self::is_plugin_active( $plugin_file ) ) { + return 'active'; + } + + return 'inactive'; + } + + /** + * Safely checks if the plugin is active + * + * @since $next-version$ + * + * @param string $plugin_file The plugin file to check. + * @return bool + */ + public static function is_plugin_active( $plugin_file ) { + self::ensure_plugin_functions_are_loaded(); + return is_plugin_active( $plugin_file ); + } + + /** + * Safely checks if the plugin is active for network + * + * @since $next-version$ + * + * @param string $plugin_file The plugin file to check. + * @return bool + */ + public static function is_plugin_active_for_network( $plugin_file ) { + self::ensure_plugin_functions_are_loaded(); + return is_plugin_active_for_network( $plugin_file ); + } + + /** + * Returns a list of all plugins in the site. + * + * @since-jetpack 8.9.0 + * @uses get_plugins() + * + * @return array + */ + public static function get_plugins() { + self::ensure_plugin_functions_are_loaded(); + /** This filter is documented in wp-admin/includes/class-wp-plugins-list-table.php */ + $plugins = apply_filters( 'all_plugins', get_plugins() ); + + if ( is_array( $plugins ) && ! empty( $plugins ) ) { + foreach ( $plugins as $plugin_slug => $plugin_data ) { + $plugins[ $plugin_slug ]['active'] = in_array( + self::get_plugin_status( $plugin_slug ), + array( 'active', 'network-active' ), + true + ); + } + return $plugins; + } + + return array(); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/CHANGELOG.md new file mode 100644 index 00000000..fa6c6bf4 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/CHANGELOG.md @@ -0,0 +1,71 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.5.0] - 2022-05-31 +### Added +- Changed logic to initialize publicize classes only if the publicize module is active. [#24451] + +### Changed +- Classic Editor: Replaced the initial settings form with the Jetpack redirect link [#24526] + +## [0.4.0] - 2022-05-24 +### Added +- Added the post field to the Publicize package [#24324] + +## [0.3.0] - 2022-05-18 +### Added +- Added new jetpack v4 end-point to list publicize connections. [#24293] + +### Changed +- Updated package dependencies. [#24153] [#24360] + +### Fixed +- Added check for wp_ajax_elementor_ajax to allow publicizing via elementor. [#24387] +- gitignore wordpress directory within the publicize package [#24339] + +## [0.2.1] - 2022-05-10 +### Fixed +- Publicize: Correct bad namespaces + +## [0.2.0] - 2022-05-04 +### Added +- Added redirect links for Jetpack cloud. [#24205] + +### Changed +- Updated package dependencies. [#24095] + +### Deprecated +- Moved the options class into Connection. [#24095] + +## [0.1.1] - 2022-05-19 +### Fixed +- Added check for wp_ajax_elementor_ajax to allow publicizing via elementor. +- Publicize: Correct bad namespaces + +## 0.1.0 - 2022-04-26 +### Added +- Added an empty shell package +- Added Publicize module files to Composer package +- Set composer package type to "jetpack-library" so i18n will work. +- Use the publicize package in the Jetpack plugin. + +### Changed +- Applied legacy Publicize filters to flag setting for Publicize +- Fix Composer dependencies +- Microperformance: Use === null instead of is_null +- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` +- Publicize: Do not display legacy UI for block editor pages +- Sync'd changes with the equivalent files in the Publicize module +- Updated package dependencies. +- Update package.json metadata. + +[0.5.0]: https://github.com/Automattic/jetpack-publicize/compare/v0.4.0...v0.5.0 +[0.4.0]: https://github.com/Automattic/jetpack-publicize/compare/v0.3.0...v0.4.0 +[0.3.0]: https://github.com/Automattic/jetpack-publicize/compare/v0.2.1...v0.3.0 +[0.2.1]: https://github.com/Automattic/jetpack-publicize/compare/v0.2.0...v0.2.1 +[0.2.0]: https://github.com/Automattic/jetpack-publicize/compare/v0.1.0...v0.2.0 +[0.1.1]: https://github.com/Automattic/jetpack-publicize/compare/v0.1.0...v0.1.1 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-terms-of-service/LICENSE.txt b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/LICENSE.txt index e82774c1..e82774c1 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-terms-of-service/LICENSE.txt +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/LICENSE.txt diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-terms-of-service/SECURITY.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/SECURITY.md index b4b46c0e..b4b46c0e 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-terms-of-service/SECURITY.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/SECURITY.md diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-connections-post-field.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-connections-post-field.php new file mode 100644 index 00000000..0f44436e --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-connections-post-field.php @@ -0,0 +1,464 @@ +<?php +/** + * Registers the API field for Publicize connections. + * + * @package automattic/jetpack-publicize + */ + +namespace Automattic\Jetpack\Publicize; + +/** + * The class to register the field and augment requests + * to Publicize supported post types. + */ +class Connections_Post_Field { + + const FIELD_NAME = 'jetpack_publicize_connections'; + + /** + * Array of post IDs that have been updated. + * + * @var array + */ + private $meta_saved = array(); + + /** + * Used to memoize the updates for a given post. + * + * @var array + */ + public $memoized_updates = array(); + + /** + * Registers the jetpack_publicize_connections field. Called + * automatically on `rest_api_init()`. + */ + public function register_fields() { + $post_types = get_post_types_by_support( 'publicize' ); + foreach ( $post_types as $post_type ) { + // Adds meta support for those post types that don't already have it. + // Only runs during REST API requests, so it doesn't impact UI. + if ( ! post_type_supports( $post_type, 'custom-fields' ) ) { + add_post_type_support( $post_type, 'custom-fields' ); + } + + // We use these hooks and not the update_callback because we must updateth meta + // before we set the post as published, otherwise the wrong connections could be used. + add_filter( 'rest_pre_insert_' . $post_type, array( $this, 'rest_pre_insert' ), 10, 2 ); + add_action( 'rest_insert_' . $post_type, array( $this, 'rest_insert' ), 10, 3 ); + + register_rest_field( + $post_type, + self::FIELD_NAME, + array( + 'get_callback' => array( $this, 'get' ), + 'schema' => $this->get_schema(), + ) + ); + } + } + + /** + * Defines data structure and what elements are visible in which contexts + */ + public function get_schema() { + return array( + '$schema' => 'http://json-schema.org/draft-04/schema#', + 'title' => 'jetpack-publicize-post-connections', + 'type' => 'array', + 'context' => array( 'view', 'edit' ), + 'items' => $this->post_connection_schema(), + 'default' => array(), + ); + } + + /** + * Schema for the endpoint. + */ + private function post_connection_schema() { + return array( + '$schema' => 'http://json-schema.org/draft-04/schema#', + 'title' => 'jetpack-publicize-post-connection', + 'type' => 'object', + 'properties' => array( + 'id' => array( + 'description' => __( 'Unique identifier for the Publicize Connection', 'jetpack-publicize-pkg' ), + 'type' => 'string', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'service_name' => array( + 'description' => __( 'Alphanumeric identifier for the Publicize Service', 'jetpack-publicize-pkg' ), + 'type' => 'string', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'display_name' => array( + 'description' => __( 'Username of the connected account', 'jetpack-publicize-pkg' ), + 'type' => 'string', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), + 'profile_picture' => array( + 'description' => __( 'Profile picture of the connected account', 'jetpack-publicize-pkg' ), + 'type' => 'string', + 'context' => array( 'edit' ), + 'readonly' => true, + ), + 'enabled' => array( + 'description' => __( 'Whether to share to this connection', 'jetpack-publicize-pkg' ), + 'type' => 'boolean', + 'context' => array( 'edit' ), + ), + 'done' => array( + 'description' => __( 'Whether Publicize has already finished sharing for this post', 'jetpack-publicize-pkg' ), + 'type' => 'boolean', + 'context' => array( 'edit' ), + 'readonly' => true, + ), + 'toggleable' => array( + 'description' => __( 'Whether `enable` can be changed for this post/connection', 'jetpack-publicize-pkg' ), + 'type' => 'boolean', + 'context' => array( 'edit' ), + 'readonly' => true, + ), + ), + ); + } + + /** + * Permission check, based on module availability and user capabilities. + * + * @param int $post_id Post ID. + * + * @return true|WP_Error + */ + public function permission_check( $post_id ) { + global $publicize; + + if ( ! $publicize ) { + return new \WP_Error( + 'publicize_not_available', + __( 'Sorry, Publicize is not available on your site right now.', 'jetpack-publicize-pkg' ), + array( 'status' => rest_authorization_required_code() ) + ); + } + + if ( $publicize->current_user_can_access_publicize_data( $post_id ) ) { + return true; + } + + return new \WP_Error( + 'invalid_user_permission_publicize', + __( 'Sorry, you are not allowed to access Publicize data for this post.', 'jetpack-publicize-pkg' ), + array( 'status' => rest_authorization_required_code() ) + ); + } + + /** + * The field's wrapped getter. Does permission checks and output preparation. + * + * This cannot be extended: implement `->get()` instead. + * + * @param mixed $post_array Probably an array. Whatever the endpoint returns. + * @param string $field_name Should always match `->field_name`. + * @param WP_REST_Request $request WP API request. + * @param string $object_type Should always match `->object_type`. + * + * @return mixed + */ + public function get( $post_array, $field_name, $request, $object_type ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + global $publicize; + + $full_schema = $this->get_schema(); + $permission_check = $this->permission_check( empty( $post_array['id'] ) ? 0 : $post_array['id'] ); + if ( is_wp_error( $permission_check ) ) { + return $full_schema['default']; + } + + $schema = $full_schema['items']; + $properties = array_keys( $schema['properties'] ); + $connections = $publicize->get_filtered_connection_data( $post_array['id'] ); + + $output_connections = array(); + foreach ( $connections as $connection ) { + $output_connection = array(); + foreach ( $properties as $property ) { + if ( isset( $connection[ $property ] ) ) { + $output_connection[ $property ] = $connection[ $property ]; + } + } + + $output_connection['id'] = (string) $connection['unique_id']; + + $output_connections[] = $output_connection; + } + + // TODO: Work out if this is necessary. We shouldn't be creating an invalid value here. + $is_valid = rest_validate_value_from_schema( $output_connections, $full_schema, self::FIELD_NAME ); + if ( is_wp_error( $is_valid ) ) { + return $is_valid; + } + + $context = ! empty( $request['context'] ) ? $request['context'] : 'view'; + return $this->filter_response_by_context( $output_connections, $full_schema, $context ); + } + + /** + * Prior to updating the post, first calculate which Services to + * Publicize to and which to skip. + * + * @param object $post Post data to insert/update. + * @param WP_REST_Request $request API request. + * + * @return Filtered $post + */ + public function rest_pre_insert( $post, $request ) { + if ( ! isset( $request['jetpack_publicize_connections'] ) ) { + return $post; + } + + $permission_check = $this->permission_check( empty( $post->ID ) ? 0 : $post->ID ); + if ( is_wp_error( $permission_check ) ) { + return $permission_check; + } + // memoize. + $this->get_meta_to_update( $request['jetpack_publicize_connections'], isset( $post->ID ) ? $post->ID : 0 ); + + if ( isset( $post->ID ) ) { + // Set the meta before we mark the post as published so that publicize works as expected. + // If this is not the case post end up on social media when they are marked as skipped. + $this->update( $request['jetpack_publicize_connections'], $post ); + } + + return $post; + } + + /** + * After creating a new post, update our cached data to reflect + * the new post ID. + * + * @param WP_Post $post Post data to update. + * @param WP_REST_Request $request API request. + * @param bool $is_new Is this a new post. + */ + public function rest_insert( $post, $request, $is_new ) { + if ( ! $is_new ) { + // An existing post was edited - no need to update + // our cache - we started out knowing the correct + // post ID. + return; + } + + if ( ! isset( $request['jetpack_publicize_connections'] ) ) { + return; + } + + if ( ! isset( $this->memoized_updates[0] ) ) { + return; + } + + $this->memoized_updates[ $post->ID ] = $this->memoized_updates[0]; + unset( $this->memoized_updates[0] ); + } + + /** + * Get list of meta data to update per post ID. + * + * @param array $requested_connections Publicize connections to update. + * Items are either `{ id: (string) }` or `{ service_name: (string) }`. + * @param int $post_id Post ID. + */ + protected function get_meta_to_update( $requested_connections, $post_id = 0 ) { + global $publicize; + + if ( ! $publicize ) { + return array(); + } + + if ( isset( $this->memoized_updates[ $post_id ] ) ) { + return $this->memoized_updates[ $post_id ]; + } + + $available_connections = $publicize->get_filtered_connection_data( $post_id ); + + $changed_connections = array(); + + // Build lookup mappings. + $available_connections_by_unique_id = array(); + $available_connections_by_service_name = array(); + foreach ( $available_connections as $available_connection ) { + $available_connections_by_unique_id[ $available_connection['unique_id'] ] = $available_connection; + + if ( ! isset( $available_connections_by_service_name[ $available_connection['service_name'] ] ) ) { + $available_connections_by_service_name[ $available_connection['service_name'] ] = array(); + } + $available_connections_by_service_name[ $available_connection['service_name'] ][] = $available_connection; + } + + // Handle { service_name: $service_name, enabled: (bool) }. + // If the service is not available, it will be skipped. + foreach ( $requested_connections as $requested_connection ) { + if ( ! isset( $requested_connection['service_name'] ) ) { + continue; + } + + if ( ! isset( $available_connections_by_service_name[ $requested_connection['service_name'] ] ) ) { + continue; + } + + foreach ( $available_connections_by_service_name[ $requested_connection['service_name'] ] as $available_connection ) { + $changed_connections[ $available_connection['unique_id'] ] = $requested_connection['enabled']; + } + } + + // Handle { id: $id, enabled: (bool) } + // These override the service_name settings. + foreach ( $requested_connections as $requested_connection ) { + if ( ! isset( $requested_connection['id'] ) ) { + continue; + } + + if ( ! isset( $available_connections_by_unique_id[ $requested_connection['id'] ] ) ) { + continue; + } + + $changed_connections[ $requested_connection['id'] ] = $requested_connection['enabled']; + } + + // Set all changed connections to their new value. + foreach ( $changed_connections as $unique_id => $enabled ) { + $connection = $available_connections_by_unique_id[ $unique_id ]; + + if ( $connection['done'] || ! $connection['toggleable'] ) { + continue; + } + + $available_connections_by_unique_id[ $unique_id ]['enabled'] = $enabled; + } + + $meta_to_update = array(); + // For all connections, ensure correct post_meta. + foreach ( $available_connections_by_unique_id as $unique_id => $available_connection ) { + if ( $available_connection['enabled'] ) { + $meta_to_update[ $publicize->POST_SKIP . $unique_id ] = null; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + } else { + $meta_to_update[ $publicize->POST_SKIP . $unique_id ] = 1; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + } + } + + $this->memoized_updates[ $post_id ] = $meta_to_update; + + return $meta_to_update; + } + + /** + * Update the connections slated to be shared to. + * + * @param array $requested_connections Publicize connections to update. + * Items are either `{ id: (string) }` or `{ service_name: (string) }`. + * @param WP_Post $post Post data. + */ + public function update( $requested_connections, $post ) { + if ( isset( $this->meta_saved[ $post->ID ] ) ) { // Make sure we only save it once - per request. + return; + } + foreach ( $this->get_meta_to_update( $requested_connections, $post->ID ) as $meta_key => $meta_value ) { + if ( $meta_value === null ) { + delete_post_meta( $post->ID, $meta_key ); + } else { + update_post_meta( $post->ID, $meta_key, $meta_value ); + } + } + $this->meta_saved[ $post->ID ] = true; + } + + /** + * Removes properties that should not appear in the current + * request's context + * + * $context is a Core REST API Framework request attribute that is + * always one of: + * * view (what you see on the blog) + * * edit (what you see in an editor) + * * embed (what you see in, e.g., an oembed) + * + * Fields (and sub-fields, and sub-sub-...) can be flagged for a + * set of specific contexts via the field's schema. + * + * The Core API will filter out top-level fields with the wrong + * context, but will not recurse deeply enough into arrays/objects + * to remove all levels of sub-fields with the wrong context. + * + * This function handles that recursion. + * + * @param mixed $value Value passed to API request. + * @param array $schema Schema to validate against. + * @param string $context REST API Request context. + * + * @return mixed Filtered $value + */ + public function filter_response_by_context( $value, $schema, $context ) { + if ( ! $this->is_valid_for_context( $schema, $context ) ) { + // We use this intentionally odd looking WP_Error object + // internally only in this recursive function (see below + // in the `object` case). It will never be output by the REST API. + // If we return this for the top level object, Core + // correctly remove the top level object from the response + // for us. + return new \WP_Error( '__wrong-context__' ); + } + + switch ( $schema['type'] ) { + case 'array': + if ( ! isset( $schema['items'] ) ) { + return $value; + } + + // Shortcircuit if we know none of the items are valid for this context. + // This would only happen in a strangely written schema. + if ( ! $this->is_valid_for_context( $schema['items'], $context ) ) { + return array(); + } + + // Recurse to prune sub-properties of each item. + foreach ( $value as $key => $item ) { + $value[ $key ] = $this->filter_response_by_context( $item, $schema['items'], $context ); + } + + return $value; + case 'object': + if ( ! isset( $schema['properties'] ) ) { + return $value; + } + + foreach ( $value as $field_name => $field_value ) { + if ( isset( $schema['properties'][ $field_name ] ) ) { + $field_value = $this->filter_response_by_context( $field_value, $schema['properties'][ $field_name ], $context ); + if ( is_wp_error( $field_value ) && '__wrong-context__' === $field_value->get_error_code() ) { + unset( $value[ $field_name ] ); + } else { + // Respect recursion that pruned sub-properties of each property. + $value[ $field_name ] = $field_value; + } + } + } + + return (object) $value; + } + + return $value; + } + + /** + * Ensure that our request matches its expected context. + * + * @param array $schema Schema to validate against. + * @param string $context REST API Request context. + * @return bool + */ + private function is_valid_for_context( $schema, $context ) { + return empty( $schema['context'] ) || in_array( $context, $schema['context'], true ); + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-keyring-helper.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-keyring-helper.php new file mode 100644 index 00000000..a92b6f51 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-keyring-helper.php @@ -0,0 +1,297 @@ +<?php +/** + * Keyring helper. + * + * @package automattic/jetpack-publicize + */ + +namespace Automattic\Jetpack\Publicize; + +use Automattic\Jetpack\Connection\Secrets; +use Automattic\Jetpack\Paths; +use Jetpack_IXR_Client; +use Jetpack_Options; + +/** + * A series of utilities to interact with a Keyring instance. + */ +class Keyring_Helper { + /** + * Class instance + * + * @var \Automattic\Jetpack\Publicize\Keyring_Helper + */ + private static $instance = null; + + /** + * Whether the `sharing` page is registered. + * + * @var bool + */ + private static $is_sharing_page_registered = false; + + /** + * Initialize instance. + */ + public static function init() { + if ( self::$instance === null ) { + self::$instance = new Keyring_Helper(); + } + + return self::$instance; + } + + const SERVICES = array( + 'facebook' => array( + 'for' => 'publicize', + ), + 'twitter' => array( + 'for' => 'publicize', + ), + 'linkedin' => array( + 'for' => 'publicize', + ), + 'tumblr' => array( + 'for' => 'publicize', + ), + 'path' => array( + 'for' => 'publicize', + ), + 'google_plus' => array( + 'for' => 'publicize', + ), + 'google_site_verification' => array( + 'for' => 'other', + ), + ); + + /** + * Constructor + */ + private function __construct() { + add_action( 'admin_menu', array( __CLASS__, 'register_sharing_page' ) ); + + add_action( 'load-settings_page_sharing', array( __CLASS__, 'admin_page_load' ), 9 ); + } + + /** + * We need a `sharing` page to be able to connect and disconnect services. + */ + public static function register_sharing_page() { + if ( self::$is_sharing_page_registered ) { + return; + } + + self::$is_sharing_page_registered = true; + + if ( ! current_user_can( 'manage_options' ) ) { + return; + } + + global $_registered_pages; + + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + + $hookname = get_plugin_page_hookname( 'sharing', 'options-general.php' ); + add_action( $hookname, array( __CLASS__, 'admin_page_load' ) ); + $_registered_pages[ $hookname ] = true; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited + } + + /** + * Gets a URL to the public-api actions. Works like WP's admin_url. + * On WordPress.com this is/calls Keyring::admin_url. + * + * @param string $service Shortname of a specific service. + * @param array $params Parameters to append to an API connection URL. + * + * @return URL to specific public-api process + */ + private static function api_url( $service = false, $params = array() ) { + /** + * Filters the API URL used to interact with WordPress.com. + * + * @since 2.0.0 + * + * @param string https://public-api.wordpress.com/connect/?jetpack=publicize Default Publicize API URL. + */ + $url = apply_filters( 'publicize_api_url', 'https://public-api.wordpress.com/connect/?jetpack=publicize' ); + + if ( $service ) { + $url = add_query_arg( array( 'service' => $service ), $url ); + } + + if ( count( $params ) ) { + $url = add_query_arg( $params, $url ); + } + + return $url; + } + + /** + * Build a connection URL (sharing settings page with unique query args to create a connection). + * + * @param string $service_name Service name. + * @param string $for Feature name. + */ + public static function connect_url( $service_name, $for ) { + return add_query_arg( + array( + 'action' => 'request', + 'service' => $service_name, + 'kr_nonce' => wp_create_nonce( 'keyring-request' ), + 'nonce' => wp_create_nonce( "keyring-request-$service_name" ), + 'for' => $for, + ), + admin_url( 'options-general.php?page=sharing' ) + ); + } + + /** + * Build a URL to refresh a connection (sharing settings page with unique query args to refresh a connection). + * Similar to connect_url, but with a refresh parameter. + * + * @param string $service_name Service name. + * @param string $for Feature name. + */ + public static function refresh_url( $service_name, $for ) { + return add_query_arg( + array( + 'action' => 'request', + 'service' => $service_name, + 'kr_nonce' => wp_create_nonce( 'keyring-request' ), + 'refresh' => 1, + 'for' => $for, + 'nonce' => wp_create_nonce( "keyring-request-$service_name" ), + ), + admin_url( 'options-general.php?page=sharing' ) + ); + } + + /** + * Build a URL to delete a connection (sharing settings page with unique query args to delete a connection). + * + * @param string $service_name Service name. + * @param string $id Connection ID. + */ + public static function disconnect_url( $service_name, $id ) { + return add_query_arg( + array( + 'action' => 'delete', + 'service' => $service_name, + 'id' => $id, + 'kr_nonce' => wp_create_nonce( 'keyring-request' ), + 'nonce' => wp_create_nonce( "keyring-request-$service_name" ), + ), + admin_url( 'options-general.php?page=sharing' ) + ); + } + + /** + * Build contents handling Keyring connection management into Sharing settings screen. + */ + public static function admin_page_load() { + if ( isset( $_GET['action'] ) ) { + if ( isset( $_GET['service'] ) ) { + $service_name = filter_var( wp_unslash( $_GET['service'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- We verify below. + } + + switch ( $_GET['action'] ) { + + case 'request': + check_admin_referer( 'keyring-request', 'kr_nonce' ); + check_admin_referer( "keyring-request-$service_name", 'nonce' ); + + $verification = ( new Secrets() )->generate( 'publicize' ); + if ( ! $verification ) { + $url = ( new Paths() )->admin_url( 'page=jetpack#/settings' ); + wp_die( + sprintf( + wp_kses( + /* Translators: placeholder is a URL to a Settings page. */ + __( "Jetpack is not connected. Please connect Jetpack by visiting <a href='%s'>Settings</a>.", 'jetpack-publicize-pkg' ), + array( + 'a' => array( + 'href' => array(), + ), + ) + ), + esc_url( $url ) + ) + ); + + } + $stats_options = get_option( 'stats_options' ); + $wpcom_blog_id = Jetpack_Options::get_option( 'id' ); + $wpcom_blog_id = ! empty( $wpcom_blog_id ) ? $wpcom_blog_id : $stats_options['blog_id']; + + $user = wp_get_current_user(); + $redirect = self::api_url( + $service_name, + urlencode_deep( + array( + 'action' => 'request', + 'redirect_uri' => add_query_arg( array( 'action' => 'done' ), menu_page_url( 'sharing', false ) ), + 'for' => 'publicize', + // required flag that says this connection is intended for publicize. + 'siteurl' => site_url(), + 'state' => $user->ID, + 'blog_id' => $wpcom_blog_id, + 'secret_1' => $verification['secret_1'], + 'secret_2' => $verification['secret_2'], + 'eol' => $verification['exp'], + ) + ) + ); + wp_redirect( $redirect ); // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect -- The API URL is an external URL and is filterable. + exit; + + case 'completed': + /* + * We do not use a nonce here, + * since we're populating a local cache of + * the Publicize connections that were created and stored on WordPress.com. + */ + $xml = new Jetpack_IXR_Client(); + $xml->query( 'jetpack.fetchPublicizeConnections' ); + + if ( ! $xml->isError() ) { + $response = $xml->getResponse(); + Jetpack_Options::update_option( 'publicize_connections', $response ); + } + + break; + + case 'delete': + $id = isset( $_GET['id'] ) ? filter_var( wp_unslash( $_GET['id'] ) ) : null; + + check_admin_referer( 'keyring-request', 'kr_nonce' ); + check_admin_referer( "keyring-request-$service_name", 'nonce' ); + + self::disconnect( $service_name, $id ); + + do_action( 'connection_disconnected', $service_name ); + break; + } + } + } + + /** + * Remove a Publicize connection + * + * @param string $service_name Service name. + * @param string $connection_id Connection ID. + * @param int|bool $_blog_id Blog ID. + * @param int|bool $_user_id User ID. + * @param bool $force_delete Force delete the connection. + */ + public static function disconnect( $service_name, $connection_id, $_blog_id = false, $_user_id = false, $force_delete = false ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + $xml = new Jetpack_IXR_Client(); + $xml->query( 'jetpack.deletePublicizeConnection', $connection_id ); + + if ( ! $xml->isError() ) { + Jetpack_Options::update_option( 'publicize_connections', $xml->getResponse() ); + } else { + return false; + } + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-base.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-base.php new file mode 100644 index 00000000..83ed9c42 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-base.php @@ -0,0 +1,1452 @@ +<?php +/** + * Publicize_Base class. + * + * @package automattic/jetpack-publicize + */ + +// phpcs:disable WordPress.NamingConventions.ValidVariableName + +namespace Automattic\Jetpack\Publicize; + +use Automattic\Jetpack\Redirect; +use Automattic\Jetpack\Status; + +/** + * Base class for Publicize. + */ +abstract class Publicize_Base { + + /** + * Services that are currently connected to the given user + * through Publicize. + * + * @var array + */ + public $connected_services = array(); + + /** + * Services that are supported by publicize. They don't + * necessarily need to be connected to the current user. + * + * @var array + */ + public $services; + + /** + * Post meta key for admin page. + * + * @var string + */ + public $ADMIN_PAGE = 'wpas'; + + /** + * Post meta key for post message. + * + * @var string + */ + public $POST_MESS = '_wpas_mess'; + + /** + * Post meta key for flagging when the post is a tweetstorm. + * + * @var string + */ + public $POST_TWEETSTORM = '_wpas_is_tweetstorm'; + + /** + * Post meta key for the flagging when the post share feature is disabled. + * + * @var string + */ + const POST_PUBLICIZE_FEATURE_ENABLED = '_wpas_feature_enabled'; + + /** + * Connection ID appended to indicate that a connection should NOT be publicized to. + * + * @var string + */ + public $POST_SKIP = '_wpas_skip_'; + + /** + * Connection ID appended to indicate a connection has already been publicized to. + * + * @var string + */ + public $POST_DONE = '_wpas_done_'; + + /** + * Prefix for user authorization (used in publicize-wpcom.php) + * + * @var string + */ + public $USER_AUTH = 'wpas_authorize'; + + /** + * Prefix for user opt. + * + * @var string + */ + public $USER_OPT = 'wpas_'; + + /** + * Ready for Publicize to do its thing. + * + * @var string + */ + public $PENDING = '_publicize_pending'; + + /** + * Array of external IDs where we've Publicized. + * + * @var string + */ + public $POST_SERVICE_DONE = '_publicize_done_external'; + + /** + * Default pieces of the message used in constructing the + * content pushed out to other social networks. + */ + + /** + * Default prefix. + * + * @var string + */ + public $default_prefix = ''; + + /** + * Default message. + * + * @var string + */ + public $default_message = '%title%'; + + /** + * Default suffix. + * + * @var string + */ + public $default_suffix = ' '; + + /** + * What WP capability is require to create/delete global connections? + * All users with this cap can un-globalize all other global connections, and globalize any of their own + * Globalized connections cannot be unselected by users without this capability when publishing + * + * @var string + */ + public $GLOBAL_CAP = 'publish_posts'; + + /** + * Sets up the basics of Publicize. + */ + public function __construct() { + $this->default_message = self::build_sprintf( + array( + /** + * Filter the default Publicize message. + * + * @module publicize + * + * @since 2.0.0 + * + * @param string $this->default_message Publicize's default message. Default is the post title. + */ + apply_filters( 'wpas_default_message', $this->default_message ), + 'title', + 'url', + ) + ); + + $this->default_prefix = self::build_sprintf( + array( + /** + * Filter the message prepended to the Publicize custom message. + * + * @module publicize + * + * @since 2.0.0 + * + * @param string $this->default_prefix String prepended to the Publicize custom message. + */ + apply_filters( 'wpas_default_prefix', $this->default_prefix ), + 'url', + ) + ); + + $this->default_suffix = self::build_sprintf( + array( + /** + * Filter the message appended to the Publicize custom message. + * + * @module publicize + * + * @since 2.0.0 + * + * @param string $this->default_suffix String appended to the Publicize custom message. + */ + apply_filters( 'wpas_default_suffix', $this->default_suffix ), + 'url', + ) + ); + + /** + * Filter the capability to change global Publicize connection options. + * + * All users with this cap can un-globalize all other global connections, and globalize any of their own + * Globalized connections cannot be unselected by users without this capability when publishing. + * + * @module publicize + * + * @since 2.2.1 + * + * @param string $this->GLOBAL_CAP default capability in control of global Publicize connection options. Default to edit_others_posts. + */ + $this->GLOBAL_CAP = apply_filters( 'jetpack_publicize_global_connections_cap', $this->GLOBAL_CAP ); + + // stage 1 and 2 of 3-stage Publicize. Flag for Publicize on creation, save meta, + // then check meta and publicize based on that. stage 3 implemented on wpcom. + add_action( 'transition_post_status', array( $this, 'flag_post_for_publicize' ), 10, 3 ); + add_action( 'save_post', array( $this, 'save_meta' ), 20, 2 ); + + // Default checkbox state for each Connection. + add_filter( 'publicize_checkbox_default', array( $this, 'publicize_checkbox_default' ), 10, 2 ); + + // Alter the "Post Publish" admin notice to mention the Connections we Publicized to. + add_filter( 'post_updated_messages', array( $this, 'update_published_message' ), 20, 1 ); + + // Connection test callback. + add_action( 'wp_ajax_test_publicize_conns', array( $this, 'test_publicize_conns' ) ); + + add_action( 'init', array( $this, 'add_post_type_support' ) ); + add_action( 'init', array( $this, 'register_post_meta' ), 20 ); + } + + /** + * Services: Facebook, Twitter, etc. + */ + + /** + * Get services for the given blog and user. + * + * Can return all available services or just the ones with an active connection. + * + * @param string $filter Type of filter. + * 'all' (default) - Get all services available for connecting. + * 'connected' - Get all services currently connected. + * @param false|int $_blog_id The blog ID. Use false (default) for the current blog. + * @param false|int $_user_id The user ID. Use false (default) for the current user. + * @return array + */ + abstract public function get_services( $filter = 'all', $_blog_id = false, $_user_id = false ); + + /** + * Does the given user have a connection to the service on the given blog? + * + * @param string $service_name 'facebook', 'twitter', etc. + * @param false|int $_blog_id The blog ID. Use false (default) for the current blog. + * @param false|int $_user_id The user ID. Use false (default) for the current user. + * @return bool + */ + public function is_enabled( $service_name, $_blog_id = false, $_user_id = false ) { + if ( ! $_blog_id ) { + $_blog_id = $this->blog_id(); + } + + if ( ! $_user_id ) { + $_user_id = $this->user_id(); + } + + $connections = $this->get_connections( $service_name, $_blog_id, $_user_id ); + return ( is_array( $connections ) && count( $connections ) > 0 ? true : false ); + } + + /** + * Generates a connection URL. + * + * This is the URL, which, when visited by the user, starts the authentication + * process required to forge a connection. + * + * @param string $service_name 'facebook', 'twitter', etc. + * @return string + */ + abstract public function connect_url( $service_name ); + + /** + * Generates a Connection refresh URL. + * + * This is the URL, which, when visited by the user, re-authenticates their + * connection to the service. + * + * @param string $service_name 'facebook', 'twitter', etc. + * @return string + */ + abstract public function refresh_url( $service_name ); + + /** + * Generates a disconnection URL. + * + * This is the URL, which, when visited by the user, breaks their connection + * with the service. + * + * @param string $service_name 'facebook', 'twitter', etc. + * @param string $connection_id Connection ID. + * @return string + */ + abstract public function disconnect_url( $service_name, $connection_id ); + + /** + * Returns a display name for the Service + * + * @param string $service_name 'facebook', 'twitter', etc. + * @return string + */ + public static function get_service_label( $service_name ) { + switch ( $service_name ) { + case 'linkedin': + return 'LinkedIn'; + case 'google_drive': // google-drive used to be called google_drive. + case 'google-drive': + return 'Google Drive'; + case 'twitter': + case 'facebook': + case 'tumblr': + default: + return ucfirst( $service_name ); + } + } + + /** + * Connections: For each Service, there can be multiple connections + * for a given user. For example, one user could be connected to Twitter + * as both @jetpack and as @wordpressdotcom + * + * For historical reasons, Connections are represented as an object + * on WordPress.com and as an array in Jetpack. + */ + + /** + * Get the active Connections of a Service + * + * @param string $service_name 'facebook', 'twitter', etc. + * @param false|int $_blog_id The blog ID. Use false (default) for the current blog. + * @param false|int $_user_id The user ID. Use false (default) for the current user. + * @return false|object[]|array[] false if no connections exist + */ + abstract public function get_connections( $service_name, $_blog_id = false, $_user_id = false ); + + /** + * Get a single Connection of a Service + * + * @param string $service_name 'facebook', 'twitter', etc. + * @param string $connection_id Connection ID. + * @param false|int $_blog_id The blog ID. Use false (default) for the current blog. + * @param false|int $_user_id The user ID. Use false (default) for the current user. + * @return false|object[]|array[] false if no connections exist + */ + abstract public function get_connection( $service_name, $connection_id, $_blog_id = false, $_user_id = false ); + + /** + * Get the Connection ID. + * + * Note that this is different than the Connection's uniqueid. + * + * Via a quirk of history, ID is globally unique and unique_id + * is only unique per site. + * + * @param object|array $connection The Connection object (WordPress.com) or array (Jetpack). + * @return string + */ + abstract public function get_connection_id( $connection ); + + /** + * Get the Connection unique_id + * + * Note that this is different than the Connections ID. + * + * Via a quirk of history, ID is globally unique and unique_id + * is only unique per site. + * + * @param object|array $connection The Connection object (WordPress.com) or array (Jetpack). + * @return string + */ + abstract public function get_connection_unique_id( $connection ); + + /** + * Get the Connection's Meta data + * + * @param object|array $connection Connection. + * @return array Connection Meta + */ + abstract public function get_connection_meta( $connection ); + + /** + * Disconnect a Connection + * + * @param string $service_name 'facebook', 'twitter', etc. + * @param string $connection_id Connection ID. + * @param false|int $_blog_id The blog ID. Use false (default) for the current blog. + * @param false|int $_user_id The user ID. Use false (default) for the current user. + * @param bool $force_delete Whether to skip permissions checks. + * @return false|void False on failure. Void on success. + */ + abstract public function disconnect( $service_name, $connection_id, $_blog_id = false, $_user_id = false, $force_delete = false ); + + /** + * Globalizes a Connection + * + * @param string $connection_id Connection ID. + * @return bool Falsey on failure. Truthy on success. + */ + abstract public function globalize_connection( $connection_id ); + + /** + * Unglobalizes a Connection + * + * @param string $connection_id Connection ID. + * @return bool Falsey on failure. Truthy on success. + */ + abstract public function unglobalize_connection( $connection_id ); + + /** + * Returns an external URL to the Connection's profile + * + * @param string $service_name 'facebook', 'twitter', etc. + * @param object|array $connection The Connection object (WordPress.com) or array (Jetpack). + * @return false|string False on failure. URL on success. + */ + public function get_profile_link( $service_name, $connection ) { + $cmeta = $this->get_connection_meta( $connection ); + + if ( isset( $cmeta['connection_data']['meta']['link'] ) ) { + if ( 'facebook' === $service_name && 0 === strpos( wp_parse_url( $cmeta['connection_data']['meta']['link'], PHP_URL_PATH ), '/app_scoped_user_id/' ) ) { + // App-scoped Facebook user IDs are not usable profile links. + return false; + } + + return $cmeta['connection_data']['meta']['link']; + } + + if ( 'facebook' === $service_name && isset( $cmeta['connection_data']['meta']['facebook_page'] ) ) { + return 'https://facebook.com/' . $cmeta['connection_data']['meta']['facebook_page']; + } + + if ( 'tumblr' === $service_name && isset( $cmeta['connection_data']['meta']['tumblr_base_hostname'] ) ) { + return 'https://' . $cmeta['connection_data']['meta']['tumblr_base_hostname']; + } + + if ( 'twitter' === $service_name ) { + return 'https://twitter.com/' . substr( $cmeta['external_display'], 1 ); // Has a leading '@'. + } + + if ( 'linkedin' === $service_name ) { + if ( ! isset( $cmeta['connection_data']['meta']['profile_url'] ) ) { + return false; + } + + $profile_url_query = wp_parse_url( $cmeta['connection_data']['meta']['profile_url'], PHP_URL_QUERY ); + wp_parse_str( $profile_url_query, $profile_url_query_args ); + + $id = null; + + if ( isset( $profile_url_query_args['key'] ) ) { + $id = $profile_url_query_args['key']; + } elseif ( isset( $profile_url_query_args['id'] ) ) { + $id = $profile_url_query_args['id']; + } else { + return false; + } + + return esc_url_raw( add_query_arg( 'id', rawurlencode( $id ), 'https://www.linkedin.com/profile/view' ) ); + } + + return false; // no fallback. we just won't link it. + } + + /** + * Returns a display name for the Connection + * + * @param string $service_name 'facebook', 'twitter', etc. + * @param object|array $connection The Connection object (WordPress.com) or array (Jetpack). + * @return string + */ + public function get_display_name( $service_name, $connection ) { + $cmeta = $this->get_connection_meta( $connection ); + + if ( isset( $cmeta['connection_data']['meta']['display_name'] ) ) { + return $cmeta['connection_data']['meta']['display_name']; + } + + if ( 'tumblr' === $service_name && isset( $cmeta['connection_data']['meta']['tumblr_base_hostname'] ) ) { + return $cmeta['connection_data']['meta']['tumblr_base_hostname']; + } + + if ( 'twitter' === $service_name ) { + return $cmeta['external_display']; + } + + $connection_display = $cmeta['external_display']; + + if ( empty( $connection_display ) ) { + $connection_display = $cmeta['external_name']; + } + + return $connection_display; + } + + /** + * Returns a profile picture for the Connection + * + * @param object|array $connection The Connection object (WordPress.com) or array (Jetpack). + * @return string + */ + private function get_profile_picture( $connection ) { + $cmeta = $this->get_connection_meta( $connection ); + + if ( isset( $cmeta['profile_picture'] ) ) { + return $cmeta['profile_picture']; + } + + return ''; + } + + /** + * Whether the user needs to select additional options after connecting + * + * @param string $service_name 'facebook', 'twitter', etc. + * @param object|array $connection The Connection object (WordPress.com) or array (Jetpack). + * @return bool + */ + public function show_options_popup( $service_name, $connection ) { + $cmeta = $this->get_connection_meta( $connection ); + + // Always show if no selection has been made for Facebook. + if ( 'facebook' === $service_name && empty( $cmeta['connection_data']['meta']['facebook_profile'] ) && empty( $cmeta['connection_data']['meta']['facebook_page'] ) ) { + return true; + } + + // Always show if no selection has been made for Tumblr. + if ( 'tumblr' === $service_name && empty( $cmeta['connection_data']['meta']['tumblr_base_hostname'] ) ) { + return true; + } + + // if we have the specific connection info.. + $id = ! empty( $_GET['id'] ) ? sanitize_text_field( wp_unslash( $_GET['id'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended + + if ( $id ) { + if ( $cmeta['connection_data']['id'] === $id ) { + return true; + } + } else { + // Otherwise, just show if this is the completed step / first load. + // phpcs:disable WordPress.Security.NonceVerification.Recommended + $is_completed = ! empty( $_GET['action'] ) && 'completed' === $_GET['action']; + $service = ! empty( $_GET['service'] ) ? sanitize_text_field( wp_unslash( $_GET['service'] ) ) : false; + // phpcs:enable WordPress.Security.NonceVerification.Recommended + + if ( $is_completed && $service_name === $service && ! in_array( $service, array( 'facebook', 'tumblr' ), true ) ) { + return true; + } + } + + return false; + } + + /** + * Check if a connection is global + * + * @param array $connection Connection data. + * @return bool Whether the connection is global. + */ + public function is_global_connection( $connection ) { + return empty( $connection['connection_data']['user_id'] ); + } + + /** + * Whether the Connection is "valid" wrt Facebook's requirements. + * + * Must be connected to a Page (not a Profile). + * (Also returns true if we're in the middle of the connection process) + * + * @param object|array $connection The Connection object (WordPress.com) or array (Jetpack). + * @return bool + */ + public function is_valid_facebook_connection( $connection ) { + if ( $this->is_connecting_connection( $connection ) ) { + return true; + } + $connection_meta = $this->get_connection_meta( $connection ); + $connection_data = $connection_meta['connection_data']; + return isset( $connection_data['meta']['facebook_page'] ); + } + + /** + * LinkedIn needs to be reauthenticated to use v2 of their API. + * If it's using LinkedIn old API, it's an 'invalid' connection + * + * @param object|array $connection The Connection object (WordPress.com) or array (Jetpack). + * @return bool + */ + public function is_invalid_linkedin_connection( $connection ) { + // LinkedIn API v1 included the profile link in the connection data. + $connection_meta = $this->get_connection_meta( $connection ); + return isset( $connection_meta['connection_data']['meta']['profile_url'] ); + } + + /** + * Whether the Connection currently being connected + * + * @param object|array $connection The Connection object (WordPress.com) or array (Jetpack). + * @return bool + */ + public function is_connecting_connection( $connection ) { + $connection_meta = $this->get_connection_meta( $connection ); + $connection_data = $connection_meta['connection_data']; + return isset( $connection_data['meta']['options_responses'] ); + } + + /** + * AJAX Handler to run connection tests on all Connections + * + * @return void + */ + public function test_publicize_conns() { + wp_send_json_success( $this->get_publicize_conns_test_results() ); + } + + /** + * Run connection tests on all Connections + * + * @return array { + * Array of connection test results. + * + * @type string 'connectionID' Connection identifier string that is unique for each connection + * @type string 'serviceName' Slug of the connection's service (facebook, twitter, ...) + * @type bool 'connectionTestPassed' Whether the connection test was successful + * @type string 'connectionTestMessage' Test success or error message + * @type bool 'userCanRefresh' Whether the user can re-authenticate their connection to the service + * @type string 'refreshText' Message instructing user to re-authenticate their connection to the service + * @type string 'refreshURL' URL, which, when visited by the user, re-authenticates their connection to the service. + * @type string 'unique_id' ID string representing connection + * } + */ + public function get_publicize_conns_test_results() { + $test_results = array(); + + foreach ( (array) $this->get_services( 'connected' ) as $service_name => $connections ) { + foreach ( $connections as $connection ) { + + $id = $this->get_connection_id( $connection ); + + $connection_test_passed = true; + $connection_test_message = __( 'This connection is working correctly.', 'jetpack-publicize-pkg' ); + $user_can_refresh = false; + $refresh_text = ''; + $refresh_url = ''; + + $connection_test_result = true; + if ( method_exists( $this, 'test_connection' ) ) { + $connection_test_result = $this->test_connection( $service_name, $connection ); + } + + if ( is_wp_error( $connection_test_result ) ) { + $connection_test_passed = false; + $connection_test_message = $connection_test_result->get_error_message(); + $error_data = $connection_test_result->get_error_data(); + + $user_can_refresh = $error_data['user_can_refresh']; + $refresh_text = $error_data['refresh_text']; + $refresh_url = $error_data['refresh_url']; + } + // Mark Facebook profiles as deprecated. + if ( 'facebook' === $service_name ) { + if ( ! $this->is_valid_facebook_connection( $connection ) ) { + $connection_test_passed = false; + $user_can_refresh = false; + $connection_test_message = __( 'Please select a Facebook Page to publish updates.', 'jetpack-publicize-pkg' ); + } + } + + // LinkedIn needs reauthentication to be compatible with v2 of their API. + if ( 'linkedin' === $service_name && $this->is_invalid_linkedin_connection( $connection ) ) { + $connection_test_passed = 'must_reauth'; + $user_can_refresh = false; + $connection_test_message = esc_html__( 'Your LinkedIn connection needs to be reauthenticated to continue working – head to Sharing to take care of it.', 'jetpack-publicize-pkg' ); + } + + $unique_id = null; + + if ( ! empty( $connection->unique_id ) ) { + $unique_id = $connection->unique_id; + } elseif ( ! empty( $connection['connection_data']['token_id'] ) ) { + $unique_id = $connection['connection_data']['token_id']; + } + + $test_results[] = array( + 'connectionID' => $id, + 'serviceName' => $service_name, + 'connectionTestPassed' => $connection_test_passed, + 'connectionTestMessage' => esc_attr( $connection_test_message ), + 'userCanRefresh' => $user_can_refresh, + 'refreshText' => esc_attr( $refresh_text ), + 'refreshURL' => $refresh_url, + 'unique_id' => $unique_id, + ); + } + } + + return $test_results; + } + + /** + * Run the connection test for the Connection + * + * @param string $service_name $service_name 'facebook', 'twitter', etc. + * @param object|array $connection The Connection object (WordPress.com) or array (Jetpack). + * @return WP_Error|true WP_Error on failure. True on success + */ + abstract public function test_connection( $service_name, $connection ); + + /** + * Retrieves current list of connections and applies filters. + * + * Retrieves current available connections and checks if the connections + * have already been used to share current post. Finally, the checkbox + * form UI fields are calculated. This function exposes connection form + * data directly as array so it can be retrieved for static HTML generation + * or JSON consumption. + * + * @since 6.7.0 + * + * @param integer $selected_post_id Optional. Post ID to query connection status for. + * + * @return array { + * Array of UI setup data for connection list form. + * + * @type string 'unique_id' ID string representing connection + * @type string 'service_name' Slug of the connection's service (facebook, twitter, ...) + * @type string 'service_label' Service Label (Facebook, Twitter, ...) + * @type string 'display_name' Connection's human-readable Username: "@jetpack" + * @type string 'profile_picture' Connection profile picture. + * @type bool 'enabled' Default value for the connection (e.g., for a checkbox). + * @type bool 'done' Has this connection already been publicized to? + * @type bool 'toggleable' Is the user allowed to change the value for the connection? + * @type bool 'global' Is this connection a global one? + * } + */ + public function get_filtered_connection_data( $selected_post_id = null ) { + $connection_list = array(); + + $post = get_post( $selected_post_id ); // Defaults to current post if $post_id is null. + // Handle case where there is no current post. + if ( ! empty( $post ) ) { + $post_id = $post->ID; + } else { + $post_id = null; + } + + $services = $this->get_services( 'connected' ); + $all_done = $this->post_is_done_sharing( $post_id ); + + // We don't allow Publicizing to the same external id twice, to prevent spam. + $service_id_done = (array) get_post_meta( $post_id, $this->POST_SERVICE_DONE, true ); + + foreach ( $services as $service_name => $connections ) { + foreach ( $connections as $connection ) { + $connection_meta = $this->get_connection_meta( $connection ); + $connection_data = $connection_meta['connection_data']; + + $unique_id = $this->get_connection_unique_id( $connection ); + + // Was this connection (OR, old-format service) already Publicized to? + $done = ! empty( $post ) && ( + // New flags. + 1 === (int) get_post_meta( $post->ID, $this->POST_DONE . $unique_id, true ) + || + // Old flags. + 1 === (int) get_post_meta( $post->ID, $this->POST_DONE . $service_name, true ) + ); + + /** + * Filter whether a post should be publicized to a given service. + * + * @module publicize + * + * @since 2.0.0 + * + * @param bool true Should the post be publicized to a given service? Default to true. + * @param int $post_id Post ID. + * @param string $service_name Service name. + * @param array $connection_data Array of information about all Publicize details for the site. + */ + /* phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores */ + if ( ! apply_filters( 'wpas_submit_post?', true, $post_id, $service_name, $connection_data ) ) { + continue; + } + + // Should we be skipping this one? + $skip = ( + ( + ! empty( $post ) + && + in_array( $post->post_status, array( 'publish', 'draft', 'future' ), true ) + && + ( + // New flags. + get_post_meta( $post->ID, $this->POST_SKIP . $unique_id, true ) + || + // Old flags. + get_post_meta( $post->ID, $this->POST_SKIP . $service_name ) + ) + ) + || + ( + is_array( $connection ) + && + isset( $connection_meta['external_id'] ) && ! empty( $service_id_done[ $service_name ][ $connection_meta['external_id'] ] ) + ) + ); + + // If this one has already been publicized to, don't let it happen again. + $toggleable = ! $done && ! $all_done; + + // Determine the state of the checkbox (on/off) and allow filtering. + $enabled = $done || ! $skip; + /** + * Filter the checkbox state of each Publicize connection appearing in the post editor. + * + * @module publicize + * + * @since 2.0.1 + * + * @param bool $enabled Should the Publicize checkbox be enabled for a given service. + * @param int $post_id Post ID. + * @param string $service_name Service name. + * @param array $connection Array of connection details. + */ + $enabled = apply_filters( 'publicize_checkbox_default', $enabled, $post_id, $service_name, $connection ); + + /** + * If this is a global connection and this user doesn't have enough permissions to modify + * those connections, don't let them change it. + */ + if ( ! $done && $this->is_global_connection( $connection_meta ) && ! current_user_can( $this->GLOBAL_CAP ) ) { + $toggleable = false; + + /** + * Filters the checkboxes for global connections with non-prilvedged users. + * + * @module publicize + * + * @since 3.7.0 + * + * @param bool $enabled Indicates if this connection should be enabled. Default true. + * @param int $post_id ID of the current post + * @param string $service_name Name of the connection (Facebook, Twitter, etc) + * @param array $connection Array of data about the connection. + */ + $enabled = apply_filters( 'publicize_checkbox_global_default', $enabled, $post_id, $service_name, $connection ); + } + + // Force the checkbox to be checked if the post was DONE, regardless of what the filter does. + if ( $done ) { + $enabled = true; + } + + $connection_list[] = array( + 'unique_id' => $unique_id, + 'service_name' => $service_name, + 'service_label' => $this->get_service_label( $service_name ), + 'display_name' => $this->get_display_name( $service_name, $connection ), + 'profile_picture' => $this->get_profile_picture( $connection ), + + 'enabled' => $enabled, + 'done' => $done, + 'toggleable' => $toggleable, + 'global' => 0 == $connection_data['user_id'], // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual,WordPress.PHP.StrictComparisons.LooseComparison -- Other types can be used at times. + ); + } + } + + return $connection_list; + } + + /** + * Checks if post has already been shared by Publicize in the past. + * + * @since 6.7.0 + * + * @param integer $post_id Optional. Post ID to query connection status for: will use current post if missing. + * + * @return bool True if post has already been shared by Publicize, false otherwise. + */ + abstract public function post_is_done_sharing( $post_id = null ); + + /** + * Retrieves full list of available Publicize connection services. + * + * Retrieves current available publicize service connections + * with associated labels and URLs. + * + * @since 6.7.0 + * + * @return array { + * Array of UI service connection data for all services + * + * @type string 'name' Name of service. + * @type string 'label' Display label for service. + * @type string 'url' URL for adding connection to service. + * } + */ + public function get_available_service_data() { + $available_services = $this->get_services( 'all' ); + $available_service_data = array(); + + foreach ( $available_services as $service_name => $service ) { + $available_service_data[] = array( + 'name' => $service_name, + 'label' => $this->get_service_label( $service_name ), + 'url' => $this->connect_url( $service_name ), + ); + } + + return $available_service_data; + } + + /** + * Site Data + */ + + /** + * Get user ID. + * + * @return int The current user's ID, or 0 if no user is logged in. + */ + public function user_id() { + return get_current_user_id(); + } + + /** + * Get site ID. + * + * @return int Site ID. + */ + public function blog_id() { + return get_current_blog_id(); + } + + /** + * Posts + */ + + /** + * Checks old and new status to see if the post should be flagged as + * ready to Publicize. + * + * Attached to the `transition_post_status` filter. + * + * @param string $new_status New status. + * @param string $old_status Old status. + * @param WP_Post $post Post object. + * @return void + */ + abstract public function flag_post_for_publicize( $new_status, $old_status, $post ); + + /** + * Ensures the Post internal post-type supports `publicize` + * + * This feature support flag is used by the REST API. + */ + public function add_post_type_support() { + add_post_type_support( 'post', 'publicize' ); + } + + /** + * Can the current user access Publicize Data. + * + * @param int $post_id 0 for general access. Post_ID for specific access. + * @return bool + */ + public function current_user_can_access_publicize_data( $post_id = 0 ) { + /** + * Filter what user capability is required to use the publicize form on the edit post page. Useful if publish post capability has been removed from role. + * + * @module publicize + * + * @since 4.1.0 + * + * @param string $capability User capability needed to use publicize + */ + $capability = apply_filters( 'jetpack_publicize_capability', 'publish_posts' ); + + if ( 'publish_posts' === $capability && $post_id ) { + return current_user_can( 'publish_post', $post_id ); + } + + return current_user_can( $capability ); + } + + /** + * Auth callback for the protected ->POST_MESS post_meta + * + * @param int $object_id Post ID. + * @return bool + */ + public function message_meta_auth_callback( $object_id ) { + return $this->current_user_can_access_publicize_data( $object_id ); + } + + /** + * Registers the post_meta for use in the REST API. + * + * Registers for each post type that with `publicize` feature support. + */ + public function register_post_meta() { + $message_args = array( + 'type' => 'string', + 'description' => __( 'The message to use instead of the title when sharing to Publicize Services', 'jetpack-publicize-pkg' ), + 'single' => true, + 'default' => '', + 'show_in_rest' => array( + 'name' => 'jetpack_publicize_message', + ), + 'auth_callback' => array( $this, 'message_meta_auth_callback' ), + ); + + $tweetstorm_args = array( + 'type' => 'boolean', + 'description' => __( 'Whether or not the post should be treated as a Twitter thread.', 'jetpack-publicize-pkg' ), + 'single' => true, + 'default' => false, + 'show_in_rest' => array( + 'name' => 'jetpack_is_tweetstorm', + ), + 'auth_callback' => array( $this, 'message_meta_auth_callback' ), + ); + + $publicize_feature_enable_args = array( + 'type' => 'boolean', + 'description' => __( 'Whether or not the Share Post feature is enabled.', 'jetpack-publicize-pkg' ), + 'single' => true, + 'default' => true, + 'show_in_rest' => array( + 'name' => 'jetpack_publicize_feature_enabled', + ), + 'auth_callback' => array( $this, 'message_meta_auth_callback' ), + ); + + foreach ( get_post_types() as $post_type ) { + if ( ! $this->post_type_is_publicizeable( $post_type ) ) { + continue; + } + + $message_args['object_subtype'] = $post_type; + $tweetstorm_args['object_subtype'] = $post_type; + $publicize_feature_enable_args['object_subtype'] = $post_type; + + register_meta( 'post', $this->POST_MESS, $message_args ); + register_meta( 'post', $this->POST_TWEETSTORM, $tweetstorm_args ); + register_meta( 'post', self::POST_PUBLICIZE_FEATURE_ENABLED, $publicize_feature_enable_args ); + } + } + + /** + * Helper function to allow us to not publicize posts in certain contexts. + * + * @param WP_Post $post Post object. + */ + public function should_submit_post_pre_checks( $post ) { + $submit_post = true; + + if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { + $submit_post = false; + } + + if ( + defined( 'DOING_AUTOSAVE' ) + && + DOING_AUTOSAVE + ) { + $submit_post = false; + } + + // To stop quick edits from getting publicized. + if ( did_action( 'wp_ajax_inline-save' ) ) { + $submit_post = false; + } + + // phpcs:disable WordPress.Security.NonceVerification.Recommended + if ( ! empty( $_GET['bulk_edit'] ) ) { + $submit_post = false; + } + // phpcs:enable WordPress.Security.NonceVerification.Recommended + + // - API/XML-RPC Test Posts + if ( + ( + defined( 'XMLRPC_REQUEST' ) + && + XMLRPC_REQUEST + || + defined( 'APP_REQUEST' ) + && + APP_REQUEST + ) + && + 0 === strpos( $post->post_title, 'Temporary Post Used For Theme Detection' ) + ) { + $submit_post = false; + } + + // Only work with certain statuses (avoids inherits, auto drafts etc). + if ( ! in_array( $post->post_status, array( 'publish', 'draft', 'future' ), true ) ) { + $submit_post = false; + } + + // Don't publish password protected posts. + if ( '' !== $post->post_password ) { + $submit_post = false; + } + + return $submit_post; + } + + /** + * Fires when a post is saved, checks conditions and saves state in postmeta so that it + * can be picked up later by @see ::publicize_post() on WordPress.com codebase. + * + * Attached to the `save_post` action. + * + * @param int $post_id Post ID. + * @param WP_Post $post Post object. + */ + public function save_meta( $post_id, $post ) { + $cron_user = null; + $submit_post = true; + + if ( ! $this->post_type_is_publicizeable( $post->post_type ) ) { + return; + } + + $submit_post = $this->should_submit_post_pre_checks( $post ); + + // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- We're only checking if a value is set + $admin_page = isset( $_POST[ $this->ADMIN_PAGE ] ) ? $_POST[ $this->ADMIN_PAGE ] : null; + + // Did this request happen via wp-admin? + $from_web = isset( $_SERVER['REQUEST_METHOD'] ) + && + 'post' === strtolower( sanitize_text_field( wp_unslash( $_SERVER['REQUEST_METHOD'] ) ) ) + && + ! empty( $admin_page ); + + // phpcs:ignore WordPress.Security.NonceVerification.Missing + $title = isset( $_POST['wpas_title'] ) ? sanitize_textarea_field( wp_unslash( $_POST['wpas_title'] ) ) : null; + + if ( ( $from_web || defined( 'POST_BY_EMAIL' ) ) && $title ) { + if ( empty( $title ) ) { + delete_post_meta( $post_id, $this->POST_MESS ); + } else { + update_post_meta( $post_id, $this->POST_MESS, trim( stripslashes( $title ) ) ); + } + } + + // Change current user to provide context for get_services() if we're running during cron. + if ( defined( 'DOING_CRON' ) && DOING_CRON ) { + $cron_user = (int) $GLOBALS['user_ID']; + wp_set_current_user( $post->post_author ); + } + + /** + * In this phase, we mark connections that we want to SKIP. When Publicize is actually triggered, + * it will Publicize to everything *except* those marked for skipping. + */ + foreach ( (array) $this->get_services( 'connected' ) as $service_name => $connections ) { + foreach ( $connections as $connection ) { + $connection_data = ''; + if ( is_object( $connection ) && method_exists( $connection, 'get_meta' ) ) { + $connection_data = $connection->get_meta( 'connection_data' ); + } elseif ( ! empty( $connection['connection_data'] ) ) { + $connection_data = $connection['connection_data']; + } + + /** This action is documented in modules/publicize/ui.php */ + /* phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores */ + if ( false === apply_filters( 'wpas_submit_post?', $submit_post, $post_id, $service_name, $connection_data ) ) { + delete_post_meta( $post_id, $this->PENDING ); + continue; + } + + if ( ! empty( $connection->unique_id ) ) { + $unique_id = $connection->unique_id; + } elseif ( ! empty( $connection['connection_data']['token_id'] ) ) { + $unique_id = $connection['connection_data']['token_id']; + } + + // This was a wp-admin request, so we need to check the state of checkboxes. + if ( $from_web ) { + // Delete stray service-based post meta. + delete_post_meta( $post_id, $this->POST_SKIP . $service_name ); + + // We *unchecked* this stream from the admin page, or it's set to readonly, or it's a new addition. + if ( empty( $admin_page['submit'][ $unique_id ] ) ) { + // Also make sure that the service-specific input isn't there. + // If the user connected to a new service 'in-page' then a hidden field with the service + // name is added, so we just assume they wanted to Publicize to that service. + if ( empty( $admin_page['submit'][ $service_name ] ) ) { + // Nothing seems to be checked, so we're going to mark this one to be skipped. + update_post_meta( $post_id, $this->POST_SKIP . $unique_id, 1 ); + continue; + } else { + // Clean up any stray post meta. + delete_post_meta( $post_id, $this->POST_SKIP . $unique_id ); + } + } else { + // The checkbox for this connection is explicitly checked -- make sure we DON'T skip it. + delete_post_meta( $post_id, $this->POST_SKIP . $unique_id ); + } + } + + /** + * Fires right before the post is processed for Publicize. + * Users may hook in here and do anything else they need to after meta is written, + * and before the post is processed for Publicize. + * + * @since 2.1.2 + * + * @param bool $submit_post Should the post be publicized. + * @param int $post->ID Post ID. + * @param string $service_name Service name. + * @param array $connection Array of connection details. + */ + do_action( 'publicize_save_meta', $submit_post, $post_id, $service_name, $connection ); + } + } + + if ( defined( 'DOING_CRON' ) && DOING_CRON ) { + wp_set_current_user( $cron_user ); + } + + // Next up will be ::publicize_post(). + } + + /** + * Alters the "Post Published" message to include information about where the post + * was Publicized to. + * + * Attached to the `post_updated_messages` filter + * + * @param string[] $messages Array of messages. + * @return string[] + */ + public function update_published_message( $messages ) { + global $post_type, $post_type_object, $post; + if ( ! $this->post_type_is_publicizeable( $post_type ) ) { + return $messages; + } + + // Bail early if the post is private. + if ( 'publish' !== $post->post_status ) { + return $messages; + } + + $view_post_link_html = ''; + $viewable = is_post_type_viewable( $post_type_object ); + if ( $viewable ) { + /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain, WordPress.Utils.I18nTextDomainFixer.MissingArgDomain */ + $view_text = esc_html__( 'View post' ); // Intentionally omitted domain. + + if ( 'jetpack-portfolio' === $post_type ) { + $view_text = esc_html__( 'View project', 'jetpack-publicize-pkg' ); + } + + $view_post_link_html = sprintf( + ' <a href="%1$s">%2$s</a>', + esc_url( get_permalink( $post ) ), + $view_text + ); + } + + $services = $this->get_publicizing_services( $post->ID ); + if ( empty( $services ) ) { + return $messages; + } + + $labels = array(); + foreach ( $services as $service_name => $display_names ) { + $labels[] = sprintf( + /* translators: Service name is %1$s, and account name is %2$s. */ + esc_html__( '%1$s (%2$s)', 'jetpack-publicize-pkg' ), + esc_html( $service_name ), + esc_html( is_array( $display_names ) ? implode( ', ', $display_names ) : $display_names ) + ); + } + + $messages['post'][6] = sprintf( + /* translators: %1$s is a comma-separated list of services and accounts. Ex. Facebook (@jetpack), Twitter (@jetpack) */ + esc_html__( 'Post published and sharing on %1$s.', 'jetpack-publicize-pkg' ), + implode( ', ', $labels ) + ) . $view_post_link_html; + + if ( 'post' === $post_type && class_exists( 'Jetpack_Subscriptions' ) ) { + $subscription = \Jetpack_Subscriptions::init(); + if ( $subscription->should_email_post_to_subscribers( $post ) ) { + $messages['post'][6] = sprintf( + /* translators: %1$s is a comma-separated list of services and accounts. Ex. Facebook (@jetpack), Twitter (@jetpack) */ + esc_html__( 'Post published, sending emails to subscribers and sharing post on %1$s.', 'jetpack-publicize-pkg' ), + implode( ', ', $labels ) + ) . $view_post_link_html; + } + } + + $messages['jetpack-portfolio'][6] = sprintf( + /* translators: %1$s is a comma-separated list of services and accounts. Ex. Facebook (@jetpack), Twitter (@jetpack) */ + esc_html__( 'Project published and sharing project on %1$s.', 'jetpack-publicize-pkg' ), + implode( ', ', $labels ) + ) . $view_post_link_html; + + return $messages; + } + + /** + * Get the Connections the Post was just Publicized to. + * + * Only reliable just after the Post was published. + * + * @param int $post_id Post ID. + * @return string[] Array of Service display name => Connection display name + */ + public function get_publicizing_services( $post_id ) { + $services = array(); + + foreach ( (array) $this->get_services( 'connected' ) as $service_name => $connections ) { + // services have multiple connections. + foreach ( $connections as $connection ) { + $unique_id = ''; + if ( ! empty( $connection->unique_id ) ) { + $unique_id = $connection->unique_id; + } elseif ( ! empty( $connection['connection_data']['token_id'] ) ) { + $unique_id = $connection['connection_data']['token_id']; + } + + // Did we skip this connection? + if ( get_post_meta( $post_id, $this->POST_SKIP . $unique_id, true ) ) { + continue; + } + $services[ $this->get_service_label( $service_name ) ][] = $this->get_display_name( $service_name, $connection ); + } + } + + return $services; + } + + /** + * Is the post Publicize-able? + * + * Only valid prior to Publicizing a Post. + * + * @param WP_Post $post Post to check. + * @return bool + */ + public function post_is_publicizeable( $post ) { + if ( ! $this->post_type_is_publicizeable( $post->post_type ) ) { + return false; + } + + // This is more a precaution. To only publicize posts that are published. (Mostly relevant for Jetpack sites). + if ( 'publish' !== $post->post_status ) { + return false; + } + + // If it's not flagged as ready, then abort. @see ::flag_post_for_publicize(). + if ( ! get_post_meta( $post->ID, $this->PENDING, true ) ) { + return false; + } + + return true; + } + + /** + * Is a given post type Publicize-able? + * + * Not every CPT lends itself to Publicize-ation. Allow CPTs to register by adding their CPT via + * the publicize_post_types array filter. + * + * @param string $post_type The post type to check. + * @return bool True if the post type can be Publicized. + */ + public function post_type_is_publicizeable( $post_type ) { + if ( 'post' === $post_type ) { + return true; + } + + return post_type_supports( $post_type, 'publicize' ); + } + + /** + * Already-published posts should not be Publicized by default. This filter sets checked to + * false if a post has already been published. + * + * Attached to the `publicize_checkbox_default` filter + * + * @param bool $checked True if checkbox is checked, false otherwise. + * @param int $post_id Post ID to set checkbox for. + * @return bool + */ + public function publicize_checkbox_default( $checked, $post_id ) { + if ( 'publish' === get_post_status( $post_id ) ) { + return false; + } + + return $checked; + } + + /** + * Util + */ + + /** + * Converts a Publicize message template string into a sprintf format string + * + * @param string[] $args Array of arguments. + * 0 - The Publicize message template: 'Check out my post: %title% @ %url' + * ... - The template tags 'title', 'url', etc. + * @return string + */ + protected static function build_sprintf( $args ) { + $search = array(); + $replace = array(); + foreach ( $args as $k => $arg ) { + if ( 0 === $k ) { + $string = $arg; + continue; + } + $search[] = "%$arg%"; + $replace[] = "%$k\$s"; + } + return str_replace( $search, $replace, $string ); + } + + /** + * Get Calypso URL for Publicize connections. + * + * @param string $source The idenfitier of the place the function is called from. + * @return string + */ + public function publicize_connections_url( $source = 'calypso-marketing-connections' ) { + $allowed_sources = array( 'jetpack-social-connections-admin-page', 'jetpack-social-connections-classic-editor', 'calypso-marketing-connections' ); + $source = in_array( $source, $allowed_sources, true ) ? $source : 'calypso-marketing-connections'; + return Redirect::get_url( $source, array( 'site' => ( new Status() )->get_site_suffix() ) ); + } +} + +/** + * Get Calypso URL for Publicize connections. + * + * @return string + */ +function publicize_calypso_url() { + _deprecated_function( __METHOD__, '0.2.0', 'Publicize::publicize_connections_url' ); + return Redirect::get_url( 'calypso-marketing-connections', array( 'site' => ( new Status() )->get_site_suffix() ) ); +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-setup.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-setup.php new file mode 100644 index 00000000..f3c4d316 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-setup.php @@ -0,0 +1,39 @@ +<?php +/** + * Main Publicize class. + * + * @package automattic/jetpack + */ + +namespace Automattic\Jetpack\Publicize; + +/** + * The class to configure and initialize the publicize package. + */ +class Publicize_Setup { + /** + * To configure the publicize package, when called via the Config package. + */ + public static function configure() { + add_action( 'jetpack_feature_publicize_enabled', array( __CLASS__, 'on_jetpack_feature_publicize_enabled' ) ); + } + + /** + * To configure the publicize package, when called via the Config package. + */ + public static function on_jetpack_feature_publicize_enabled() { + + global $publicize_ui; + if ( ! isset( $publicize_ui ) ) { + $publicize_ui = new Publicize_UI(); + + } + // Adding on a higher priority to make sure we're the first field registered. + // The priority parameter can be removed once we deprecate WPCOM_REST_API_V2_Post_Publicize_Connections_Field + add_action( 'rest_api_init', array( new Connections_Post_Field(), 'register_fields' ), 5 ); + + add_action( 'rest_api_init', array( new REST_Controller(), 'register_rest_routes' ) ); + } +} + + diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-ui.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-ui.php new file mode 100644 index 00000000..d5b42f09 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize-ui.php @@ -0,0 +1,704 @@ +<?php +/** + * Publicize_UI class. + * + * @package automattic/jetpack-publicize + */ + +namespace Automattic\Jetpack\Publicize; + +/** + * Only user facing pieces of Publicize are found here. + */ +class Publicize_UI { + /** + * Contains an instance of class 'Publicize' which loads Keyring, sets up services, etc. + * + * @var Publicize Instance of Publicize + */ + public $publicize; + + /** + * URL to Sharing settings page in wordpress.com + * + * @var string + */ + protected $publicize_settings_url = ''; + + /** + * Hooks into WordPress to display the various pieces of UI and load our assets + */ + public function __construct() { + global $publicize; + + $publicize = new Publicize(); + $this->publicize = $publicize; + + add_action( 'init', array( $this, 'init' ) ); + } + + /** + * Initialize UI-related functionality. + */ + public function init() { + $this->publicize_settings_url = $this->publicize->publicize_connections_url(); + + // Show only to users with the capability required to manage their Publicize connections. + if ( ! $this->publicize->current_user_can_access_publicize_data() ) { + return; + } + + // Assets (css, js). + add_action( 'load-settings_page_sharing', array( $this, 'load_assets' ) ); + add_action( 'admin_head-post.php', array( $this, 'post_page_metabox_assets' ) ); + add_action( 'admin_head-post-new.php', array( $this, 'post_page_metabox_assets' ) ); + + // Management of publicize (sharing screen, ajax/lightbox popup, and metabox on post screen). + add_action( 'pre_admin_screen_sharing', array( $this, 'admin_page' ) ); + add_action( 'post_submitbox_misc_actions', array( $this, 'post_page_metabox' ) ); + } + + /** + * If the ShareDaddy plugin is not active we need to add the sharing settings page to the menu still + */ + public function sharing_menu() { + add_submenu_page( + 'options-general.php', + esc_html__( 'Sharing Settings', 'jetpack-publicize-pkg' ), + esc_html__( 'Sharing', 'jetpack-publicize-pkg' ), + 'publish_posts', + 'sharing', + array( $this, 'wrapper_admin_page' ) + ); + } + + /** + * Add admin page with wrapper. + */ + public function wrapper_admin_page() { + if ( class_exists( 'Jetpack_Admin_Page' ) ) { + \Jetpack_Admin_Page::wrap_ui( array( $this, 'management_page' ) ); + } + } + + /** + * Management page to load if Sharedaddy is not active so the 'pre_admin_screen_sharing' action exists. + */ + public function management_page() { + ?> + <div class="wrap"> + <div class="icon32" id="icon-options-general"><br /></div> + <h1><?php esc_html_e( 'Sharing Settings', 'jetpack-publicize-pkg' ); ?></h1> + + <?php + /** This action is documented in modules/sharedaddy/sharing.php */ + do_action( 'pre_admin_screen_sharing' ); + ?> + </div> + <?php + } + + /** + * Styling for the sharing screen and popups + * JS for the options and switching + */ + public function load_assets() { + if ( class_exists( 'Jetpack_Admin_Page' ) ) { + \Jetpack_Admin_Page::load_wrapper_styles(); + } + } + + /** + * Lists the current user's publicized accounts for the blog + * looks exactly like Publicize v1 for now, UI and functionality updates will come after the move to keyring + */ + public function admin_page() { + ?> + <h2 id="publicize"><?php esc_html_e( 'Publicize', 'jetpack-publicize-pkg' ); ?></h2> + <p><?php esc_html_e( 'Connect social media services to automatically share new posts.', 'jetpack-publicize-pkg' ); ?></p> + <h4> + <?php + printf( + wp_kses( + /* translators: %s is the link to the Publicize page in Calypso */ + __( "We've made some updates to Publicize. Please visit the <a href='%s' class='jptracks' data-jptracks-name='legacy_publicize_settings'>WordPress.com sharing page</a> to manage your publicize connections or use the button below.", 'jetpack-publicize-pkg' ), + array( + 'a' => array( + 'href' => array(), + 'class' => array(), + 'data-jptracks-name' => array(), + ), + ) + ), + esc_url( $this->publicize->publicize_connections_url() ) + ); + ?> + </h4> + + <a href="<?php echo esc_url( $this->publicize->publicize_connections_url() ); ?>" class="button button-primary jptracks" data-jptracks-name='legacy_publicize_settings'><?php esc_html_e( 'Publicize Settings', 'jetpack-publicize-pkg' ); ?></a> + <?php + } + + /** + * CSS for styling the publicize message box and counter that displays on the post page. + * There is also some JavaScript for length counting and some basic display effects. + */ + public function post_page_metabox_assets() { + // We don't need those assets for the block editor pages. + $current_screen = get_current_screen(); + if ( $current_screen && $current_screen->is_block_editor ) { + return; + } + + $default_prefix = $this->publicize->default_prefix; + $default_prefix = preg_replace( '/%([0-9])\$s/', "' + %\\1\$s + '", esc_js( $default_prefix ) ); + + $default_message = $this->publicize->default_message; + $default_message = preg_replace( '/%([0-9])\$s/', "' + %\\1\$s + '", esc_js( $default_message ) ); + + $default_suffix = $this->publicize->default_suffix; + $default_suffix = preg_replace( '/%([0-9])\$s/', "' + %\\1\$s + '", esc_js( $default_suffix ) ); + + $max_length = defined( 'JETPACK_PUBLICIZE_TWITTER_LENGTH' ) ? JETPACK_PUBLICIZE_TWITTER_LENGTH : 280; + $max_length = $max_length - 24; // t.co link, space. + + ?> + +<script type="text/javascript"> +jQuery( function($) { + var wpasTitleCounter = $( '#wpas-title-counter' ), + wpasTwitterCheckbox = $( '.wpas-submit-twitter' ).length, + postTitle = $( '#title' ), + wpasTitle = $( '#wpas-title' ).keyup( function() { + var postTitleVal, + length = wpasTitle.val().length; + + if ( ! length ) { + length = wpasTitle.attr( 'placeholder' ).length; + } + + wpasTitleCounter.text( length ).trigger( 'change' ); + } ), + authClick = false; + + wpasTitleCounter.on( 'change', function( e ) { + if ( wpasTwitterCheckbox && parseInt( $( e.currentTarget ).text(), 10 ) > <?php echo (int) $max_length; ?> ) { + wpasTitleCounter.addClass( 'wpas-twitter-length-limit' ); + } else { + wpasTitleCounter.removeClass( 'wpas-twitter-length-limit' ); + } + } ); + + // Keep the postTitle and the placeholder in sync + postTitle.on( 'keyup', function( e ) { + var url = $( '#sample-permalink' ).text(); + <?php // phpcs:ignore ?> + var defaultMessage = $.trim( '<?php printf( $default_prefix, 'url' ); printf( $default_message, 'e.currentTarget.value', 'url' ); printf( $default_suffix, 'url' ); ?>' ) + .replace( /<[^>]+>/g,''); + + wpasTitle.attr( 'placeholder', defaultMessage ); + wpasTitle.trigger( 'keyup' ); + } ); + + // set the initial placeholder + postTitle.trigger( 'keyup' ); + + // If a custom message has been provided, open the UI so the author remembers + if ( wpasTitle.val() && ! wpasTitle.prop( 'disabled' ) && wpasTitle.attr( 'placeholder' ) !== wpasTitle.val() ) { + $( '#publicize-form' ).show(); + $( '#publicize-defaults' ).hide(); + $( '#publicize-form-edit' ).hide(); + } + + $('#publicize-disconnected-form-show').click( function() { + $('#publicize-form').slideDown( 'fast' ); + $(this).hide(); + } ); + + $('#publicize-disconnected-form-hide').click( function() { + $('#publicize-form').slideUp( 'fast' ); + $('#publicize-disconnected-form-show').show(); + } ); + + $('#publicize-form-edit').click( function() { + $('#publicize-form').slideDown( 'fast', function() { + var selBeg = 0, selEnd = 0; + wpasTitle.focus(); + + if ( ! wpasTitle.text() ) { + wpasTitle.text( wpasTitle.attr( 'placeholder' ) ); + + selBeg = wpasTitle.text().indexOf( postTitle.val() ); + if ( selBeg < 0 ) { + selBeg = 0; + } else { + selEnd = selBeg + postTitle.val().length; + } + + var domObj = wpasTitle.get(0); + if ( domObj.setSelectionRange ) { + domObj.setSelectionRange( selBeg, selEnd ); + } else if ( domObj.createTextRange ) { + var r = domObj.createTextRange(); + r.moveStart( 'character', selBeg ); + r.moveEnd( 'character', selEnd ); + r.select(); + } + } + } ); + + $('#publicize-defaults').hide(); + $(this).hide(); + return false; + } ); + + $('#publicize-form-hide').click( function() { + var newList = $.map( $('#publicize-form').slideUp( 'fast' ).find( ':checked' ), function( el ) { + return $.trim( $(el).parent( 'label' ).text() ); + } ); + $('#publicize-defaults').html( '<strong>' + newList.join( '</strong>, <strong>' ) + '</strong>' ).show(); + $('#publicize-form-edit').show(); + return false; + } ); + + $('.authorize-link').click( function() { + if ( authClick ) { + return false; + } + authClick = true; + $(this).after( '<img src="images/loading.gif" class="alignleft" style="margin: 0 .5em" />' ); + $.ajaxSetup( { async: false } ); + + if ( window.wp && window.wp.autosave ) { + window.wp.autosave.server.triggerSave(); + } else { + autosave(); + } + + return true; + } ); + + $( '.pub-service' ).click( function() { + var service = $(this).data( 'service' ), + fakebox = '<input id="wpas-submit-' + service + '" type="hidden" value="1" name="wpas[submit][' + service + ']" />'; + $( '#add-publicize-check' ).append( fakebox ); + } ); + + publicizeConnTestStart = function() { + $( '#pub-connection-tests' ) + .removeClass( 'below-h2' ) + .removeClass( 'error' ) + .removeClass( 'publicize-token-refresh-message' ) + .addClass( 'test-in-progress' ) + .html( '' ); + $.post( ajaxurl, { action: 'test_publicize_conns' }, publicizeConnTestComplete ); + } + + publicizeConnRefreshClick = function( event ) { + event.preventDefault(); + var popupURL = event.currentTarget.href; + var popupTitle = event.currentTarget.title; + // open a popup window + // when it is closed, kick off the tests again + var popupWin = window.open( popupURL, popupTitle, '' ); + var popupWinTimer= window.setInterval( function() { + if ( popupWin.closed !== false ) { + window.clearInterval( popupWinTimer ); + publicizeConnTestStart(); + } + }, 500 ); + } + + publicizeConnTestComplete = function( response ) { + var testsSelector = $( '#pub-connection-tests' ); + testsSelector + .removeClass( 'test-in-progress' ) + .removeClass( 'below-h2' ) + .removeClass( 'error' ) + .removeClass( 'publicize-token-refresh-message' ) + .html( '' ); + + // If any of the tests failed, show some stuff + var somethingShownAlready = false; + var facebookNotice = false; + $.each( response.data, function( index, testResult ) { + // find the li for this connection + if ( ! testResult.connectionTestPassed && testResult.userCanRefresh ) { + if ( ! somethingShownAlready ) { + testsSelector + .addClass( 'below-h2' ) + .addClass( 'error' ) + .addClass( 'publicize-token-refresh-message' ) + .append( "<p><?php echo esc_html( __( 'Before you hit Publish, please refresh the following connection(s) to make sure we can Publicize your post:', 'jetpack-publicize-pkg' ) ); ?></p>" ); + somethingShownAlready = true; + } + + if ( testResult.userCanRefresh ) { + testsSelector.append( '<p/>' ); + $( '<a/>', { + 'class' : 'pub-refresh-button button', + 'title' : testResult.refreshText, + 'href' : testResult.refreshURL, + 'text' : testResult.refreshText, + 'target' : '_refresh_' + testResult.serviceName + } ) + .appendTo( testsSelector.children().last() ) + .click( publicizeConnRefreshClick ); + } + } + + if( ! testResult.connectionTestPassed && ! testResult.userCanRefresh ) { + $( '#wpas-submit-' + testResult.unique_id ).prop( "checked", false ).prop( "disabled", true ); + if ( ! facebookNotice ) { + var message = '<p>' + + testResult.connectionTestMessage + + '</p><p>' + + ' <a class="button" href="<?php echo esc_url( $this->publicize_settings_url ); ?>" rel="noopener noreferrer" target="_blank">' + + '<?php echo esc_html( __( 'Update Your Sharing Settings', 'jetpack-publicize-pkg' ) ); ?>' + + '</a>' + + '<p>'; + + testsSelector + .addClass( 'below-h2' ) + .addClass( 'error' ) + .addClass( 'publicize-token-refresh-message' ) + .append( message ); + facebookNotice = true; + } + } + } ); + } + + $( document ).ready( function() { + // If we have the #pub-connection-tests div present, kick off the connection test + if ( $( '#pub-connection-tests' ).length ) { + publicizeConnTestStart(); + } + } ); + +} ); +</script> + +<style type="text/css"> +#publicize { + line-height: 1.5; +} +#publicize ul { + margin: 4px 0 4px 6px; +} +#publicize li { + margin: 0; +} +#publicize textarea { + margin: 4px 0 0; + width: 100% +} +#publicize ul.not-connected { + list-style: square; + padding-left: 1em; +} +.publicize__notice-warning { + display: block; + padding: 7px 10px; + margin: 5px 0; + border-left-width: 4px; + border-left-style: solid; + font-size: 12px; + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); +} +.publicize-external-link { + display: block; + text-decoration: none; + margin-top: 8px; +} +.publicize-external-link__text { + text-decoration: underline; +} +#publicize-title:before { + content: "\f237"; + font: normal 20px/1 dashicons; + speak: none; + margin-left: -1px; + padding-right: 3px; + vertical-align: top; + -webkit-font-smoothing: antialiased; + color: #8c8f94; +} +.post-new-php .authorize-link, .post-php .authorize-link { + line-height: 1.5em; +} +.post-new-php .authorize-message, .post-php .authorize-message { + margin-bottom: 0; +} +#poststuff #publicize .updated p { + margin: .5em 0; +} +.wpas-twitter-length-limit { + color: red; +} +.publicize__notice-warning .dashicons { + font-size: 16px; + text-decoration: none; +} +</style> + <?php + } + + /** + * Get the connection label. + * + * @param string $service_label Service's human-readable Label ("Facebook", "Twitter", ...). + * @param string $display_name Connection's human-readable Username ("@jetpack", ...). + * @return string + */ + private function connection_label( $service_label, $display_name ) { + return sprintf( + /* translators: %1$s: Service Name (Facebook, Twitter, ...), %2$s: Username on Service (@jetpack, ...) */ + __( '%1$s: %2$s', 'jetpack-publicize-pkg' ), + $service_label, + $display_name + ); + } + + /** + * Extracts the connections that require reauthentication, for example, LinkedIn, when it switched v1 to v2 of its API. + * + * @return array Connections that must be reauthenticated + */ + public function get_must_reauth_connections() { + $must_reauth = array(); + $connections = $this->publicize->get_connections( 'linkedin' ); + if ( is_array( $connections ) ) { + foreach ( $connections as $index => $connection ) { + if ( $this->publicize->is_invalid_linkedin_connection( $connection ) ) { + $must_reauth[ $index ] = 'LinkedIn'; + } + } + } + return $must_reauth; + } + + /** + * Controls the metabox that is displayed on the post page + * Allows the user to customize the message that will be sent out to the social network, as well as pick which + * networks to publish to. Also displays the character counter and some other information. + */ + public function post_page_metabox() { + global $post; + + if ( ! $this->publicize->post_type_is_publicizeable( $post->post_type ) ) { + return; + } + + $connections_data = $this->publicize->get_filtered_connection_data(); + + $available_services = $this->publicize->get_services( 'all' ); + + if ( ! is_array( $available_services ) ) { + $available_services = array(); + } + + if ( ! is_array( $connections_data ) ) { + $connections_data = array(); + } + ?> + <div id="publicize" class="misc-pub-section misc-pub-section-last"> + <span id="publicize-title"> + <?php + esc_html_e( 'Publicize:', 'jetpack-publicize-pkg' ); + + if ( ! empty( $connections_data ) ) : + $publicize_form = $this->get_metabox_form_connected( $connections_data ); + + $must_reauth = $this->get_must_reauth_connections(); + if ( ! empty( $must_reauth ) ) { + foreach ( $must_reauth as $connection_name ) { + ?> + <span class="notice-warning publicize__notice-warning"> + <?php + printf( + /* translators: %s is the name of a Publicize service like "LinkedIn" */ + esc_html__( + 'Your %s connection needs to be reauthenticated to continue working – head to Sharing to take care of it.', + 'jetpack-publicize-pkg' + ), + $connection_name // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ); + ?> + <a + class="publicize-external-link" + href="<?php echo esc_url( $this->publicize->publicize_connections_url() ); ?>" + target="_blank" + > + <span class="publicize-external-link__text"><?php esc_html_e( 'Go to Sharing settings', 'jetpack-publicize-pkg' ); ?></span> + <span class="dashicons dashicons-external"></span> + </a> + </span> + <?php + } + } + + $labels = array(); + + foreach ( $connections_data as $connection_data ) { + if ( ! $connection_data['enabled'] ) { + continue; + } + + $labels[] = sprintf( + '<strong>%s</strong>', + esc_html( $this->connection_label( $connection_data['service_label'], $connection_data['display_name'] ) ) + ); + } + + ?> + <?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- labels are already escaped above ?> + <span id="publicize-defaults"><?php echo join( ', ', $labels ); ?></span> + <a href="#" id="publicize-form-edit"><?php esc_html_e( 'Edit', 'jetpack-publicize-pkg' ); ?></a> <a href="<?php echo esc_url( $this->publicize->publicize_connections_url( 'jetpack-social-connections-classic-editor' ) ); ?>" rel="noopener noreferrer" target="_blank"><?php esc_html_e( 'Settings', 'jetpack-publicize-pkg' ); ?></a><br /> + <?php + else : + $publicize_form = $this->get_metabox_form_disconnected( $available_services ); + ?> + <strong><?php esc_html_e( 'Not Connected', 'jetpack-publicize-pkg' ); ?></strong> + <a href="<?php echo esc_url( $this->publicize->publicize_connections_url( 'jetpack-social-connections-classic-editor' ) ); ?>" rel="noopener noreferrer" target="_blank"><?php esc_html_e( 'Settings', 'jetpack-publicize-pkg' ); ?></a><br /> + <?php + + endif; + ?> + </span> + <?php + /** + * Filter the Publicize details form. + * + * @module publicize + * + * @since 2.0.0 + * + * @param string $publicize_form Publicize Details form appearing above Publish button in the editor. + */ + echo apply_filters( 'publicize_form', $publicize_form ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Parts of the form are escaped individually in the code above. + ?> + </div> + <?php + } + + /** + * Generates HTML content for connections form. + * + * @since 6.7 + * + * @global WP_Post $post The current post instance being published. + * + * @param array $connections_data Array of connections. + * @return array { + * Array of content for generating connection form. + * + * @type string HTML content of form + * @type array { + * Array of connection labels for active connections only. + * + * @type string Connection label string. + * } + * } + */ + private function get_metabox_form_connected( $connections_data ) { + global $post; + + $all_done = $this->publicize->post_is_done_sharing(); + $all_connections_done = true; + + ob_start(); + + ?> + <div id="publicize-form" class="hide-if-js"> + <ul> + <?php + + foreach ( $connections_data as $connection_data ) { + $all_connections_done = $all_connections_done && $connection_data['done']; + ?> + + <li> + <label for="wpas-submit-<?php echo esc_attr( $connection_data['unique_id'] ); ?>"> + <input + type="checkbox" + name="wpas[submit][<?php echo esc_attr( $connection_data['unique_id'] ); ?>]" + id="wpas-submit-<?php echo esc_attr( $connection_data['unique_id'] ); ?>" + class="wpas-submit-<?php echo esc_attr( $connection_data['service_name'] ); ?>" + value="1" + <?php + checked( true, $connection_data['enabled'] ); + disabled( false, $connection_data['toggleable'] ); + ?> + /> + <?php if ( $connection_data['enabled'] && ! $connection_data['toggleable'] ) : // Need to submit a value to force a global connection to POST. ?> + <input + type="hidden" + name="wpas[submit][<?php echo esc_attr( $connection_data['unique_id'] ); ?>]" + value="1" + /> + <?php endif; ?> + + <?php echo esc_html( $this->connection_label( $connection_data['service_label'], $connection_data['display_name'] ) ); ?> + + </label> + </li> + <?php + } + + $title = get_post_meta( $post->ID, $this->publicize->POST_MESS, true ); + if ( ! $title ) { + $title = ''; + } + + $all_done = $all_done || $all_connections_done; + + ?> + + </ul> + + <label for="wpas-title"><?php esc_html_e( 'Custom Message:', 'jetpack-publicize-pkg' ); ?></label> + <span id="wpas-title-counter" class="alignright hide-if-no-js">0</span> + <textarea name="wpas_title" id="wpas-title"<?php disabled( $all_done ); ?>><?php echo esc_textarea( $title ); ?></textarea> + <a href="#" class="hide-if-no-js button" id="publicize-form-hide"><?php esc_html_e( 'OK', 'jetpack-publicize-pkg' ); ?></a> + <input type="hidden" name="wpas[0]" value="1" /> + </div> + + <?php if ( ! $all_done ) : ?> + <div id="pub-connection-tests"></div> + <?php endif; ?> + <?php + + return ob_get_clean(); + } + + /** + * Metabox that is shown when no services are connected. + * + * @param array $available_services Array of available services for connecting. + */ + private function get_metabox_form_disconnected( $available_services ) { + ob_start(); + ?> + <div id="publicize-form" class="hide-if-js"> + <div id="add-publicize-check" style="display: none;"></div> + + <?php esc_html_e( 'Connect to', 'jetpack-publicize-pkg' ); ?>: + + <ul class="not-connected"> + <?php foreach ( $available_services as $service_name => $service ) : ?> + <li> + <?php /* translators: %s is the name of a Publicize service such as "LinkedIn" */ ?> + <a class="pub-service" data-service="<?php echo esc_attr( $service_name ); ?>" title="<?php echo esc_attr( sprintf( __( 'Connect and share your posts on %s', 'jetpack-publicize-pkg' ), $this->publicize->get_service_label( $service_name ) ) ); ?>" rel="noopener noreferrer" target="_blank" href="<?php echo esc_url( $this->publicize->connect_url( $service_name ) ); ?>"> + <?php echo esc_html( $this->publicize->get_service_label( $service_name ) ); ?> + </a> + </li> + <?php endforeach; ?> + </ul> + <a href="#" class="hide-if-no-js button" id="publicize-disconnected-form-hide"><?php esc_html_e( 'OK', 'jetpack-publicize-pkg' ); ?></a> + </div> + <?php + + return ob_get_clean(); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize.php new file mode 100644 index 00000000..5a6e1c91 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-publicize.php @@ -0,0 +1,1085 @@ +<?php +/** + * Publicize class. + * + * @package automattic/jetpack-publicize + */ + +namespace Automattic\Jetpack\Publicize; + +use Automattic\Jetpack\Connection\Tokens; +use Automattic\Jetpack\Redirect; +use Jetpack_IXR_Client; +use Jetpack_Options; + +/** + * Extend the base class with Jetpack-specific functionality. + */ +class Publicize extends Publicize_Base { + + const CONNECTION_REFRESH_WAIT_TRANSIENT = 'jetpack_publicize_connection_refresh_wait'; + + /** + * Add hooks. + */ + public function __construct() { + parent::__construct(); + + add_filter( 'jetpack_xmlrpc_unauthenticated_methods', array( $this, 'register_update_publicize_connections_xmlrpc_method' ) ); + + add_action( 'load-settings_page_sharing', array( $this, 'admin_page_load' ), 9 ); + + add_action( 'wp_ajax_publicize_tumblr_options_page', array( $this, 'options_page_tumblr' ) ); + add_action( 'wp_ajax_publicize_facebook_options_page', array( $this, 'options_page_facebook' ) ); + add_action( 'wp_ajax_publicize_twitter_options_page', array( $this, 'options_page_twitter' ) ); + add_action( 'wp_ajax_publicize_linkedin_options_page', array( $this, 'options_page_linkedin' ) ); + + add_action( 'wp_ajax_publicize_tumblr_options_save', array( $this, 'options_save_tumblr' ) ); + add_action( 'wp_ajax_publicize_facebook_options_save', array( $this, 'options_save_facebook' ) ); + add_action( 'wp_ajax_publicize_twitter_options_save', array( $this, 'options_save_twitter' ) ); + add_action( 'wp_ajax_publicize_linkedin_options_save', array( $this, 'options_save_linkedin' ) ); + + add_action( 'load-settings_page_sharing', array( $this, 'force_user_connection' ) ); + + add_filter( 'jetpack_published_post_flags', array( $this, 'set_post_flags' ), 10, 2 ); + + add_action( 'wp_insert_post', array( $this, 'save_publicized' ), 11, 2 ); + + add_filter( 'jetpack_twitter_cards_site_tag', array( $this, 'enhaced_twitter_cards_site_tag' ) ); + + add_action( 'publicize_save_meta', array( $this, 'save_publicized_twitter_account' ), 10, 4 ); + add_action( 'publicize_save_meta', array( $this, 'save_publicized_facebook_account' ), 10, 4 ); + + add_action( 'connection_disconnected', array( $this, 'add_disconnect_notice' ) ); + + add_filter( 'jetpack_sharing_twitter_via', array( $this, 'get_publicized_twitter_account' ), 10, 2 ); + + add_action( 'updating_jetpack_version', array( $this, 'init_refresh_transient' ) ); + } + + /** + * Add a notice when a connection has been disconnected. + */ + public function add_disconnect_notice() { + add_action( 'admin_notices', array( $this, 'display_disconnected' ) ); + } + + /** + * Force user connection before showing the Publicize UI. + */ + public function force_user_connection() { + global $current_user; + + $user_token = ( new Tokens() )->get_access_token( $current_user->ID ); + $is_user_connected = $user_token && ! is_wp_error( $user_token ); + + // If the user is already connected via Jetpack, then we're good. + if ( $is_user_connected ) { + return; + } + + // If they're not connected, then remove the Publicize UI and tell them they need to connect first. + global $publicize_ui; + remove_action( 'pre_admin_screen_sharing', array( $publicize_ui, 'admin_page' ) ); + + // Do we really need `admin_styles`? With the new admin UI, it's breaking some bits. + // Jetpack::init()->admin_styles();. + add_action( 'pre_admin_screen_sharing', array( $this, 'admin_page_warning' ), 1 ); + } + + /** + * Show a warning when Publicize does not have a connection. + */ + public function admin_page_warning() { + $jetpack = \Jetpack::init(); + $blog_name = get_bloginfo( 'blogname' ); + if ( empty( $blog_name ) ) { + $blog_name = home_url( '/' ); + } + + ?> + <div id="message" class="updated jetpack-message jp-connect"> + <div class="jetpack-wrap-container"> + <div class="jetpack-text-container"> + <p> + <?php + printf( + /* translators: %s is the name of the blog */ + esc_html( wptexturize( __( "To use Publicize, you'll need to link your %s account to your WordPress.com account using the link below.", 'jetpack-publicize-pkg' ) ) ), + '<strong>' . esc_html( $blog_name ) . '</strong>' + ); + ?> + </p> + <p><?php echo esc_html( wptexturize( __( "If you don't have a WordPress.com account yet, you can sign up for free in just a few seconds.", 'jetpack-publicize-pkg' ) ) ); ?></p> + </div> + <div class="jetpack-install-container"> + <p class="submit"><a + href="<?php echo esc_url( $jetpack->build_connect_url( false, menu_page_url( 'sharing', false ) ) ); ?>" + class="button-connector" + id="wpcom-connect"><?php esc_html_e( 'Link account with WordPress.com', 'jetpack-publicize-pkg' ); ?></a> + </p> + <p class="jetpack-install-blurb"> + <?php jetpack_render_tos_blurb(); ?> + </p> + </div> + </div> + </div> + <?php + } + + /** + * Remove a Publicize Connection. + * + * @param string $service_name 'facebook', 'twitter', etc. + * @param string $connection_id Connection ID. + * @param false|int $_blog_id The blog ID. Use false (default) for the current blog. + * @param false|int $_user_id The user ID. Use false (default) for the current user. + * @param bool $force_delete Whether to skip permissions checks. + * @return false|void False on failure. Void on success. + */ + public function disconnect( $service_name, $connection_id, $_blog_id = false, $_user_id = false, $force_delete = false ) { + return Keyring_Helper::disconnect( $service_name, $connection_id, $_blog_id, $_user_id, $force_delete ); + } + + /** + * Set updated Publicize conntections. + * + * @param mixed $publicize_connections Updated connections. + * @return true + */ + public function receive_updated_publicize_connections( $publicize_connections ) { + Jetpack_Options::update_option( 'publicize_connections', $publicize_connections ); + + return true; + } + + /** + * Add method to update Publicize connections. + * + * @param array $methods Array of registered methods. + * @return array + */ + public function register_update_publicize_connections_xmlrpc_method( $methods ) { + return array_merge( + $methods, + array( + 'jetpack.updatePublicizeConnections' => array( $this, 'receive_updated_publicize_connections' ), + ) + ); + } + + /** + * Get a list of all connections. + * + * @return array + */ + public function get_all_connections() { + $this->refresh_connections(); + $connections = Jetpack_Options::get_option( 'publicize_connections' ); + if ( isset( $connections['google_plus'] ) ) { + unset( $connections['google_plus'] ); + } + return $connections; + } + + /** + * Get connections for a specific service. + * + * @param string $service_name 'facebook', 'twitter', etc. + * @param false|int $_blog_id The blog ID. Use false (default) for the current blog. + * @param false|int $_user_id The user ID. Use false (default) for the current user. + * @return false|object[]|array[] + */ + public function get_connections( $service_name, $_blog_id = false, $_user_id = false ) { + if ( false === $_user_id ) { + $_user_id = $this->user_id(); + } + + $connections = $this->get_all_connections(); + $connections_to_return = array(); + + if ( ! empty( $connections ) && is_array( $connections ) ) { + if ( ! empty( $connections[ $service_name ] ) ) { + foreach ( $connections[ $service_name ] as $id => $connection ) { + if ( $this->is_global_connection( $connection ) || $_user_id === (int) $connection['connection_data']['user_id'] ) { + $connections_to_return[ $id ] = $connection; + } + } + } + + return $connections_to_return; + } + + return false; + } + + /** + * Get all connections for a specific user. + * + * @return array|false + */ + public function get_all_connections_for_user() { + $connections = $this->get_all_connections(); + + $connections_to_return = array(); + if ( ! empty( $connections ) ) { + foreach ( (array) $connections as $service_name => $connections_for_service ) { + foreach ( $connections_for_service as $id => $connection ) { + $user_id = (int) $connection['connection_data']['user_id']; + // phpcs:ignore WordPress.PHP.YodaConditions.NotYoda + if ( $user_id === 0 || $this->user_id() === $user_id ) { + $connections_to_return[ $service_name ][ $id ] = $connection; + } + } + } + + return $connections_to_return; + } + + return false; + } + + /** + * Get the ID of a connection. + * + * @param array $connection The connection. + * @return string + */ + public function get_connection_id( $connection ) { + return $connection['connection_data']['id']; + } + + /** + * Get the unique ID of a connection. + * + * @param array $connection The connection. + * @return string + */ + public function get_connection_unique_id( $connection ) { + return $connection['connection_data']['token_id']; + } + + /** + * Get the meta of a connection. + * + * @param array $connection The connection. + * @return array + */ + public function get_connection_meta( $connection ) { + $connection['user_id'] = $connection['connection_data']['user_id']; // Allows for shared connections. + return $connection; + } + + /** + * Show error on settings page if applicable. + */ + public function admin_page_load() { + $action = isset( $_GET['action'] ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : null; // phpcs:ignore WordPress.Security.NonceVerification.Recommended + + if ( 'error' === $action ) { + add_action( 'pre_admin_screen_sharing', array( $this, 'display_connection_error' ), 9 ); + } + } + + /** + * Display an error message. + */ + public function display_connection_error() { + $code = false; + // phpcs:disable WordPress.Security.NonceVerification.Recommended + $service = isset( $_GET['service'] ) ? sanitize_text_field( wp_unslash( $_GET['service'] ) ) : null; + $publicize_error = isset( $_GET['publicize_error'] ) ? sanitize_text_field( wp_unslash( $_GET['publicize_error'] ) ) : null; + // phpcs:enable WordPress.Security.NonceVerification.Recommended + + if ( $service ) { + /* translators: %s is the name of the Publicize service (e.g. Facebook, Twitter) */ + $error = sprintf( __( 'There was a problem connecting to %s to create an authorized connection. Please try again in a moment.', 'jetpack-publicize-pkg' ), self::get_service_label( $service ) ); + } else { + if ( $publicize_error ) { + $code = strtolower( $publicize_error ); + switch ( $code ) { + case '400': + $error = __( 'An invalid request was made. This normally means that something intercepted or corrupted the request from your server to the Jetpack Server. Try again and see if it works this time.', 'jetpack-publicize-pkg' ); + break; + case 'secret_mismatch': + $error = __( 'We could not verify that your server is making an authorized request. Please try again, and make sure there is nothing interfering with requests from your server to the Jetpack Server.', 'jetpack-publicize-pkg' ); + break; + case 'empty_blog_id': + $error = __( 'No blog_id was included in your request. Please try disconnecting Jetpack from WordPress.com and then reconnecting it. Once you have done that, try connecting Publicize again.', 'jetpack-publicize-pkg' ); + break; + case 'empty_state': + /* translators: %s is the URL of the Jetpack admin page */ + $error = sprintf( __( 'No user information was included in your request. Please make sure that your user account has connected to Jetpack. Connect your user account by going to the <a href="%s">Jetpack page</a> within wp-admin.', 'jetpack-publicize-pkg' ), \Jetpack::admin_url() ); + break; + default: + $error = __( 'Something which should never happen, happened. Sorry about that. If you try again, maybe it will work.', 'jetpack-publicize-pkg' ); + break; + } + } else { + $error = __( 'There was a problem connecting with Publicize. Please try again in a moment.', 'jetpack-publicize-pkg' ); + } + } + // Using the same formatting/style as Jetpack::admin_notices() error. + ?> + <div id="message" class="jetpack-message jetpack-err"> + <div class="squeezer"> + <h2> + <?php + echo wp_kses( + $error, + array( + 'a' => array( + 'href' => true, + ), + 'code' => true, + 'strong' => true, + 'br' => true, + 'b' => true, + ) + ); + ?> + </h2> + <?php if ( $code ) : ?> + <p> + <?php + printf( + /* translators: %s is the name of the error */ + esc_html__( 'Error code: %s', 'jetpack-publicize-pkg' ), + esc_html( stripslashes( $code ) ) + ); + ?> + </p> + <?php endif; ?> + </div> + </div> + <?php + } + + /** + * Show a message that the connection has been removed. + */ + public function display_disconnected() { + echo "<div class='updated'>\n"; + echo '<p>' . esc_html( __( 'That connection has been removed.', 'jetpack-publicize-pkg' ) ) . "</p>\n"; + echo "</div>\n\n"; + } + + /** + * If applicable, globalize a connection. + * + * @param string $connection_id Connection ID. + */ + public function globalization( $connection_id ) { + if ( isset( $_REQUEST['global'] ) && 'on' === $_REQUEST['global'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- nonce check happens earlier in the process before we get here + if ( ! current_user_can( $this->GLOBAL_CAP ) ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + return; + } + + $this->globalize_connection( $connection_id ); + } + } + + /** + * Globalize a connection. + * + * @param string $connection_id Connection ID. + */ + public function globalize_connection( $connection_id ) { + $xml = new Jetpack_IXR_Client(); + $xml->query( 'jetpack.globalizePublicizeConnection', $connection_id, 'globalize' ); + + if ( ! $xml->isError() ) { + $response = $xml->getResponse(); + $this->receive_updated_publicize_connections( $response ); + } + } + + /** + * Unglobalize a connection. + * + * @param string $connection_id Connection ID. + */ + public function unglobalize_connection( $connection_id ) { + $xml = new Jetpack_IXR_Client(); + $xml->query( 'jetpack.globalizePublicizeConnection', $connection_id, 'unglobalize' ); + + if ( ! $xml->isError() ) { + $response = $xml->getResponse(); + $this->receive_updated_publicize_connections( $response ); + } + } + + /** + * As Jetpack updates set the refresh transient to a random amount + * in order to spread out updates to the connection data. + * + * @param string $version The Jetpack version being updated to. + */ + public function init_refresh_transient( $version ) { + if ( version_compare( $version, '10.2.1', '>=' ) && ! get_transient( self::CONNECTION_REFRESH_WAIT_TRANSIENT ) ) { + $this->set_refresh_wait_transient( wp_rand( 10, HOUR_IN_SECONDS * 24 ) ); + } + } + + /** + * Grabs a fresh copy of the publicize connections data. + * Only refreshes once every 12 hours or retries after an hour with an error. + */ + public function refresh_connections() { + if ( get_transient( self::CONNECTION_REFRESH_WAIT_TRANSIENT ) ) { + return; + } + $xml = new Jetpack_IXR_Client(); + $xml->query( 'jetpack.fetchPublicizeConnections' ); + $wait_time = HOUR_IN_SECONDS * 24; + + if ( ! $xml->isError() ) { + $response = $xml->getResponse(); + $this->receive_updated_publicize_connections( $response ); + } else { + // Retry a bit quicker, but still wait. + $wait_time = HOUR_IN_SECONDS; + } + + $this->set_refresh_wait_transient( $wait_time ); + } + + /** + * Sets the transient to expire at the specified time in seconds. + * This prevents us from attempting to refresh the data too often. + * + * @param int $wait_time The number of seconds before the transient should expire. + */ + public function set_refresh_wait_transient( $wait_time ) { + set_transient( self::CONNECTION_REFRESH_WAIT_TRANSIENT, microtime( true ), $wait_time ); + } + + /** + * Get the Publicize connect URL from Keyring. + * + * @param string $service_name Name of the service to get connect URL for. + * @param string $for What the URL is for. Default 'publicize'. + * @return string + */ + public function connect_url( $service_name, $for = 'publicize' ) { + return Keyring_Helper::connect_url( $service_name, $for ); + } + + /** + * Get the Publicize refresh URL from Keyring. + * + * @param string $service_name Name of the service to get refresh URL for. + * @param string $for What the URL is for. Default 'publicize'. + * @return string + */ + public function refresh_url( $service_name, $for = 'publicize' ) { + return Keyring_Helper::refresh_url( $service_name, $for ); + } + + /** + * Get the Publicize disconnect URL from Keyring. + * + * @param string $service_name Name of the service to get disconnect URL for. + * @param mixed $id ID of the conenction to disconnect. + * @return string + */ + public function disconnect_url( $service_name, $id ) { + return Keyring_Helper::disconnect_url( $service_name, $id ); + } + + /** + * Get social networks, either all available or only those that the site is connected to. + * + * @since 2.0.0 + * @since 6.6.0 Removed Path. Service closed October 2018. + * + * @param string $filter Select the list of services that will be returned. Defaults to 'all', accepts 'connected'. + * @param false|int $_blog_id Get services for a specific blog by ID, or set to false for current blog. Default false. + * @param false|int $_user_id Get services for a specific user by ID, or set to false for current user. Default false. + * @return array List of social networks. + */ + public function get_services( $filter = 'all', $_blog_id = false, $_user_id = false ) { + $services = array( + 'facebook' => array(), + 'twitter' => array(), + 'linkedin' => array(), + 'tumblr' => array(), + ); + + if ( 'all' === $filter ) { + return $services; + } + + $connected_services = array(); + foreach ( $services as $service_name => $empty ) { + $connections = $this->get_connections( $service_name, $_blog_id, $_user_id ); + if ( $connections ) { + $connected_services[ $service_name ] = $connections; + } + } + return $connected_services; + } + + /** + * Get a specific connection. Stub. + * + * @param string $service_name 'facebook', 'twitter', etc. + * @param string $connection_id Connection ID. + * @param false|int $_blog_id The blog ID. Use false (default) for the current blog. + * @param false|int $_user_id The user ID. Use false (default) for the current user. + * @return void + */ + public function get_connection( $service_name, $connection_id, $_blog_id = false, $_user_id = false ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + // Stub. + } + + /** + * Flag a post for Publicize after publishing. + * + * @param string $new_status New status of the post. + * @param string $old_status Old status of the post. + * @param WP_Post $post Post object. + */ + public function flag_post_for_publicize( $new_status, $old_status, $post ) { + if ( ! $this->post_type_is_publicizeable( $post->post_type ) ) { + return; + } + + $should_publicize = $this->should_submit_post_pre_checks( $post ); + + if ( 'publish' === $new_status && 'publish' !== $old_status ) { + /** + * Determines whether a post being published gets publicized. + * + * Side-note: Possibly our most alliterative filter name. + * + * @module publicize + * + * @since 0.1.0 No longer defaults to true. Adds checks to not publicize based on different contexts. + * @since 4.1.0 + * + * @param bool $should_publicize Should the post be publicized? Default to true. + * @param WP_POST $post Current Post object. + */ + $should_publicize = apply_filters( 'publicize_should_publicize_published_post', $should_publicize, $post ); + + if ( $should_publicize ) { + update_post_meta( $post->ID, $this->PENDING, true ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + } + } + } + + /** + * Test a connection. + * + * @param string $service_name Name of the service. + * @param array $connection Connection to be tested. + */ + public function test_connection( $service_name, $connection ) { + $id = $this->get_connection_id( $connection ); + + $xml = new Jetpack_IXR_Client(); + $xml->query( 'jetpack.testPublicizeConnection', $id ); + + // Bail if all is well. + if ( ! $xml->isError() ) { + return true; + } + + $xml_response = $xml->getResponse(); + $connection_test_message = $xml_response['faultString']; + + // Set up refresh if the user can. + $user_can_refresh = current_user_can( $this->GLOBAL_CAP ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + if ( $user_can_refresh ) { + /* translators: %s is the name of a social media service */ + $refresh_text = sprintf( _x( 'Refresh connection with %s', 'Refresh connection with {social media service}', 'jetpack-publicize-pkg' ), $this->get_service_label( $service_name ) ); + $refresh_url = $this->refresh_url( $service_name ); + } + + $error_data = array( + 'user_can_refresh' => $user_can_refresh, + 'refresh_text' => $refresh_text, + 'refresh_url' => $refresh_url, + ); + + return new \WP_Error( 'pub_conn_test_failed', $connection_test_message, $error_data ); + } + + /** + * Checks if post has already been shared by Publicize in the past. + * + * Jetpack uses two methods: + * 1. A POST_DONE . 'all' postmeta flag, or + * 2. if the post has already been published. + * + * @since 6.7.0 + * + * @param integer $post_id Optional. Post ID to query connection status for: will use current post if missing. + * + * @return bool True if post has already been shared by Publicize, false otherwise. + */ + public function post_is_done_sharing( $post_id = null ) { + // Defaults to current post if $post_id is null. + $post = get_post( $post_id ); + if ( $post === null ) { + return false; + } + + return 'publish' === $post->post_status || get_post_meta( $post->ID, $this->POST_DONE . 'all', true ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + } + + /** + * Save a flag locally to indicate that this post has already been Publicized via the selected + * connections. + * + * @param int $post_ID Post ID. + * @param \WP_Post $post Post object. + */ + public function save_publicized( $post_ID, $post = null ) { + if ( $post === null ) { + return; + } + // Only do this when a post transitions to being published. + // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + if ( get_post_meta( $post->ID, $this->PENDING ) && $this->post_type_is_publicizeable( $post->post_type ) ) { + delete_post_meta( $post->ID, $this->PENDING ); + update_post_meta( $post->ID, $this->POST_DONE . 'all', true ); + } + // phpcs:enable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase + } + + /** + * Set post flags for Publicize. + * + * @param array $flags List of flags. + * @param \WP_Post $post Post object. + * @return array + */ + public function set_post_flags( $flags, $post ) { + $flags['publicize_post'] = false; + if ( ! $this->post_type_is_publicizeable( $post->post_type ) ) { + return $flags; + } + + $should_publicize = $this->should_submit_post_pre_checks( $post ); + + /** This filter is already documented in modules/publicize/publicize-jetpack.php */ + if ( ! apply_filters( 'publicize_should_publicize_published_post', $should_publicize, $post ) ) { + return $flags; + } + + $connected_services = $this->get_all_connections(); + + if ( empty( $connected_services ) ) { + return $flags; + } + + $flags['publicize_post'] = true; + + return $flags; + } + + /** + * Render Facebook options. + */ + public function options_page_facebook() { + $connection_name = isset( $_REQUEST['connection'] ) ? filter_var( wp_unslash( $_REQUEST['connection'] ) ) : null; + + // Nonce check. + check_admin_referer( 'options_page_facebook_' . $connection_name ); + + $connected_services = $this->get_all_connections(); + $connection = $connected_services['facebook'][ $connection_name ]; + $options_to_show = ( ! empty( $connection['connection_data']['meta']['options_responses'] ) ? $connection['connection_data']['meta']['options_responses'] : false ); + + $pages = ( ! empty( $options_to_show[1]['data'] ) ? $options_to_show[1]['data'] : false ); + + $page_selected = false; + if ( ! empty( $connection['connection_data']['meta']['facebook_page'] ) ) { + $found = false; + if ( $pages && isset( $pages->data ) && is_array( $pages->data ) ) { + foreach ( $pages->data as $page ) { + if ( $page->id === (int) $connection['connection_data']['meta']['facebook_page'] ) { + $found = true; + break; + } + } + } + + if ( $found ) { + $page_selected = $connection['connection_data']['meta']['facebook_page']; + } + } + + ?> + + <div id="thickbox-content"> + <?php + ob_start(); + Publicize_UI::connected_notice( 'Facebook' ); + $update_notice = ob_get_clean(); + + if ( ! empty( $update_notice ) ) { + echo wp_kses_post( $update_notice ); + } + $page_info_message = sprintf( + wp_kses( + /* translators: %s is the link to the support page about using Facebook with Publicize */ + __( 'Facebook supports Publicize connections to Facebook Pages, but not to Facebook Profiles. <a href="%s">Learn More about Publicize for Facebook</a>', 'jetpack-publicize-pkg' ), + array( 'a' => array( 'href' ) ) + ), + esc_url( Redirect::get_url( 'jetpack-support-publicize-facebook' ) ) + ); + + if ( $pages ) : + ?> + <p> + <?php + echo wp_kses( + __( 'Publicize to my <strong>Facebook Page</strong>:', 'jetpack-publicize-pkg' ), + array( 'strong' ) + ); + ?> + </p> + <table id="option-fb-fanpage"> + <tbody> + + <?php foreach ( $pages as $i => $page ) : ?> + <?php if ( ! ( $i % 2 ) ) : ?> + <tr> + <?php endif; ?> + <td class="radio"> + <input + type="radio" + name="option" + data-type="page" + id="<?php echo esc_attr( $page['id'] ); ?>" + value="<?php echo esc_attr( $page['id'] ); ?>" + <?php checked( $page_selected && (int) $page_selected === (int) $page['id'], true ); ?> /> + </td> + <td class="thumbnail"><label for="<?php echo esc_attr( $page['id'] ); ?>"><img + src="<?php echo esc_url( str_replace( '_s', '_q', $page['picture']['data']['url'] ) ); ?>" + width="50" height="50"/></label></td> + <td class="details"> + <label for="<?php echo esc_attr( $page['id'] ); ?>"> + <span class="name"><?php echo esc_html( $page['name'] ); ?></span><br/> + <span class="category"><?php echo esc_html( $page['category'] ); ?></span> + </label> + </td> + <?php if ( ( $i % 2 ) || ( count( $pages ) - 1 === $i ) ) : ?> + </tr> + <?php endif; ?> + <?php endforeach; ?> + + </tbody> + </table> + + <?php Publicize_UI::global_checkbox( 'facebook', $connection_name ); ?> + <p style="text-align: center;"> + <input type="submit" value="<?php esc_attr_e( 'OK', 'jetpack-publicize-pkg' ); ?>" + class="button fb-options save-options" name="save" + data-connection="<?php echo esc_attr( $connection_name ); ?>" + rel="<?php echo esc_attr( wp_create_nonce( 'save_fb_token_' . $connection_name ) ); ?>"/> + </p><br/> + <?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> + <p><?php echo $page_info_message; ?></p> + <?php else : ?> + <div> + <?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> + <p><?php echo $page_info_message; ?></p> + <p> + <?php + echo wp_kses( + sprintf( + /* translators: %1$s is the link to Facebook documentation to create a page, %2$s is the target of the link */ + __( '<a class="button" href="%1$s" target="%2$s">Create a Facebook page</a> to get started.', 'jetpack-publicize-pkg' ), + 'https://www.facebook.com/pages/creation/', + '_blank noopener noreferrer' + ), + array( 'a' => array( 'class', 'href', 'target' ) ) + ); + ?> + </p> + </div> + <?php endif; ?> + </div> + <?php + } + + /** + * Save Facebook options. + */ + public function options_save_facebook() { + $connection_name = isset( $_REQUEST['connection'] ) ? filter_var( wp_unslash( $_REQUEST['connection'] ) ) : null; + + // Nonce check. + check_admin_referer( 'save_fb_token_' . $connection_name ); + + if ( ! isset( $_POST['type'] ) || 'page' !== $_POST['type'] || ! isset( $_POST['selected_id'] ) ) { + return; + } + + // Check for a numeric page ID. + $page_id = $_POST['selected_id']; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- Manually validated just below + if ( ! ctype_digit( $page_id ) ) { + die( 'Security check' ); + } + + // Publish to Page. + $options = array( + 'facebook_page' => $page_id, + 'facebook_profile' => null, + ); + + $this->set_remote_publicize_options( $connection_name, $options ); + } + + /** + * Render Tumblr options. + */ + public function options_page_tumblr() { + $connection_name = isset( $_REQUEST['connection'] ) ? filter_var( wp_unslash( $_REQUEST['connection'] ) ) : null; + + // Nonce check. + check_admin_referer( 'options_page_tumblr_' . $connection_name ); + + $connected_services = $this->get_all_connections(); + $connection = $connected_services['tumblr'][ $connection_name ]; + $options_to_show = $connection['connection_data']['meta']['options_responses']; + $request = $options_to_show[0]; + + $blogs = $request['response']['user']['blogs']; + + $blog_selected = false; + + if ( ! empty( $connection['connection_data']['meta']['tumblr_base_hostname'] ) ) { + foreach ( $blogs as $blog ) { + if ( $connection['connection_data']['meta']['tumblr_base_hostname'] === $this->get_basehostname( $blog['url'] ) ) { + $blog_selected = $connection['connection_data']['meta']['tumblr_base_hostname']; + break; + } + } + } + + // Use their Primary blog if they haven't selected one yet. + if ( ! $blog_selected ) { + foreach ( $blogs as $blog ) { + if ( $blog['primary'] ) { + $blog_selected = $this->get_basehostname( $blog['url'] ); + } + } + } + ?> + + <div id="thickbox-content"> + + <?php + ob_start(); + Publicize_UI::connected_notice( 'Tumblr' ); + $update_notice = ob_get_clean(); + + if ( ! empty( $update_notice ) ) { + echo wp_kses_post( $update_notice ); + } + ?> + + <p><?php echo wp_kses( __( 'Publicize to my <strong>Tumblr blog</strong>:', 'jetpack-publicize-pkg' ), array( 'strong' ) ); ?></p> + + <ul id="option-tumblr-blog"> + + <?php + foreach ( $blogs as $blog ) { + $url = $this->get_basehostname( $blog['url'] ); + ?> + <li> + <input type="radio" name="option" data-type="blog" id="<?php echo esc_attr( $url ); ?>" + value="<?php echo esc_attr( $url ); ?>" <?php checked( $blog_selected === $url, true ); ?> /> + <label for="<?php echo esc_attr( $url ); ?>"><span + class="name"><?php echo esc_html( $blog['title'] ); ?></span></label> + </li> + <?php } ?> + + </ul> + + <?php Publicize_UI::global_checkbox( 'tumblr', $connection_name ); ?> + + <p style="text-align: center;"> + <input type="submit" value="<?php esc_attr_e( 'OK', 'jetpack-publicize-pkg' ); ?>" + class="button tumblr-options save-options" name="save" + data-connection="<?php echo esc_attr( $connection_name ); ?>" + rel="<?php echo esc_attr( wp_create_nonce( 'save_tumblr_blog_' . $connection_name ) ); ?>"/> + </p> <br/> + </div> + + <?php + } + + /** + * Get the hostname from a URL. + * + * @param string $url The URL to extract the hostname from. + * @return string|false|null + */ + public function get_basehostname( $url ) { + return wp_parse_url( $url, PHP_URL_HOST ); + } + + /** + * Save Tumblr options. + */ + public function options_save_tumblr() { + $connection_name = isset( $_POST['connection'] ) ? filter_var( wp_unslash( $_POST['connection'] ) ) : null; + + // Nonce check. + check_admin_referer( 'save_tumblr_blog_' . $connection_name ); + $options = array( 'tumblr_base_hostname' => isset( $_POST['selected_id'] ) ? sanitize_text_field( wp_unslash( $_POST['selected_id'] ) ) : null ); + + $this->set_remote_publicize_options( $connection_name, $options ); + + } + + /** + * Set remote Publicize options. + * + * @param int $id Connection ID. + * @param array $options Options to set. + */ + public function set_remote_publicize_options( $id, $options ) { + $xml = new Jetpack_IXR_Client(); + $xml->query( 'jetpack.setPublicizeOptions', $id, $options ); + + if ( ! $xml->isError() ) { + $response = $xml->getResponse(); + Jetpack_Options::update_option( 'publicize_connections', $response ); + $this->globalization( $id ); + } + } + + /** + * Render the options page for Twitter. + */ + public function options_page_twitter() { + Publicize_UI::options_page_other( 'twitter' ); + } + + /** + * Render the options page for LinkedIn. + */ + public function options_page_linkedin() { + Publicize_UI::options_page_other( 'linkedin' ); + } + + /** + * Save the options page for Twitter. + */ + public function options_save_twitter() { + $this->options_save_other( 'twitter' ); + } + + /** + * Save the options page for LinkedIn. + */ + public function options_save_linkedin() { + $this->options_save_other( 'linkedin' ); + } + + /** + * Save the options page for a service. + * + * @param string $service_name Name of the service to save options for. + */ + public function options_save_other( $service_name ) { + $connection_name = isset( $_REQUEST['connection'] ) ? filter_var( wp_unslash( $_REQUEST['connection'] ) ) : ''; + + // Nonce check. + check_admin_referer( 'save_' . $service_name . '_token_' . $connection_name ); + + $this->globalization( $connection_name ); + } + + /** + * If there's only one shared connection to Twitter set it as twitter:site tag. + * + * @param string $tag Tag. + */ + public function enhaced_twitter_cards_site_tag( $tag ) { + $custom_site_tag = get_option( 'jetpack-twitter-cards-site-tag' ); + if ( ! empty( $custom_site_tag ) ) { + return $tag; + } + if ( ! $this->is_enabled( 'twitter' ) ) { + return $tag; + } + $connections = $this->get_connections( 'twitter' ); + foreach ( $connections as $connection ) { + $connection_meta = $this->get_connection_meta( $connection ); + if ( $this->is_global_connection( $connection_meta ) ) { + // If the connection is shared. + return $this->get_display_name( 'twitter', $connection ); + } + } + + return $tag; + } + + /** + * Save the Publicized Twitter account when publishing a post. + * + * @param bool $submit_post Should the post be publicized. + * @param int $post_id Post ID. + * @param string $service_name Service name. + * @param array $connection Array of connection details. + */ + public function save_publicized_twitter_account( $submit_post, $post_id, $service_name, $connection ) { + if ( 'twitter' === $service_name && $submit_post ) { + $connection_meta = $this->get_connection_meta( $connection ); + $publicize_twitter_user = get_post_meta( $post_id, '_publicize_twitter_user' ); + if ( empty( $publicize_twitter_user ) || ! $this->is_global_connection( $connection_meta ) ) { + update_post_meta( $post_id, '_publicize_twitter_user', $this->get_display_name( 'twitter', $connection ) ); + } + } + } + + /** + * Get the Twitter username. + * + * @param string $account Twitter username. + * @param int $post_id ID of the post. + * @return string + */ + public function get_publicized_twitter_account( $account, $post_id ) { + if ( ! empty( $account ) ) { + return $account; + } + $account = get_post_meta( $post_id, '_publicize_twitter_user', true ); + if ( ! empty( $account ) ) { + return $account; + } + + return ''; + } + + /** + * Save the Publicized Facebook account when publishing a post + * Use only Personal accounts, not Facebook Pages + * + * @param bool $submit_post Should the post be publicized. + * @param int $post_id Post ID. + * @param string $service_name Service name. + * @param array $connection Array of connection details. + */ + public function save_publicized_facebook_account( $submit_post, $post_id, $service_name, $connection ) { + $connection_meta = $this->get_connection_meta( $connection ); + if ( 'facebook' === $service_name && isset( $connection_meta['connection_data']['meta']['facebook_profile'] ) && $submit_post ) { + $publicize_facebook_user = get_post_meta( $post_id, '_publicize_facebook_user' ); + if ( empty( $publicize_facebook_user ) || ! $this->is_global_connection( $connection_meta ) ) { + $profile_link = $this->get_profile_link( 'facebook', $connection ); + + if ( false !== $profile_link ) { + update_post_meta( $post_id, '_publicize_facebook_user', $profile_link ); + } + } + } + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-rest-controller.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-rest-controller.php new file mode 100644 index 00000000..68f19540 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/src/class-rest-controller.php @@ -0,0 +1,115 @@ +<?php +/** + * The Publicize Rest Controller class. + * Registers the REST routes for Publicize. + * + * @package automattic/jetpack-publicize + */ + +namespace Automattic\Jetpack\Publicize; + +use Automattic\Jetpack\Connection\Client; +use Jetpack_Options; +use WP_Error; +use WP_REST_Server; + +/** + * Registers the REST routes for Search. + */ +class REST_Controller { + /** + * Whether it's run on WPCOM. + * + * @var bool + */ + protected $is_wpcom; + + /** + * Constructor + * + * @param bool $is_wpcom - Whether it's run on WPCOM. + */ + public function __construct( $is_wpcom = false ) { + $this->is_wpcom = $is_wpcom; + + } + + /** + * Registers the REST routes for Search. + * + * @access public + * @static + */ + public function register_rest_routes() { + register_rest_route( + 'jetpack/v4', + '/publicize/connections', + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_publicize_connections' ), + 'permission_callback' => array( $this, 'require_admin_privilege_callback' ), + ) + ); + } + + /** + * Only administrators can access the API. + * + * @return bool|WP_Error True if a blog token was used to sign the request, WP_Error otherwise. + */ + public function require_admin_privilege_callback() { + if ( current_user_can( 'manage_options' ) ) { + return true; + } + + $error_msg = esc_html__( + 'You are not allowed to perform this action.', + 'jetpack-publicize-pkg' + ); + + return new WP_Error( 'rest_forbidden', $error_msg, array( 'status' => rest_authorization_required_code() ) ); + } + + /** + * Gets the current Publicize connections for the site. + * + * GET `jetpack/v4/publicize/connections` + */ + public function get_publicize_connections() { + $blog_id = $this->get_blog_id(); + $path = sprintf( '/sites/%d/publicize/connections', absint( $blog_id ) ); + $response = Client::wpcom_json_api_request_as_user( $path, '2', array(), null, 'wpcom' ); + return rest_ensure_response( $this->make_proper_response( $response ) ); + } + + /** + * Forward remote response to client with error handling. + * + * @param array|WP_Error $response - Response from WPCOM. + */ + protected function make_proper_response( $response ) { + if ( is_wp_error( $response ) ) { + return $response; + } + + $body = json_decode( wp_remote_retrieve_body( $response ), true ); + $status_code = wp_remote_retrieve_response_code( $response ); + + if ( 200 === $status_code ) { + return $body; + } + + return new WP_Error( + isset( $body['error'] ) ? 'remote-error-' . $body['error'] : 'remote-error', + isset( $body['message'] ) ? $body['message'] : 'unknown remote error', + array( 'status' => $status_code ) + ); + } + + /** + * Get blog id + */ + protected function get_blog_id() { + return $this->is_wpcom ? get_current_blog_id() : Jetpack_Options::get_option( 'id' ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-redirect/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-redirect/CHANGELOG.md index 5af72f2d..f12ba0e5 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-redirect/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-redirect/CHANGELOG.md @@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.7.15] - 2022-05-10 + +## [1.7.14] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.7.13] - 2022-04-05 +### Changed +- Updated package dependencies. + +## [1.7.12] - 2022-03-02 +### Changed +- Updated package dependencies. + +## [1.7.11] - 2022-02-22 +### Changed +- Updated package dependencies. + +## [1.7.10] - 2022-01-25 +### Changed +- Updated package dependencies. + ## [1.7.9] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -118,6 +140,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Create Jetpack Redirect package +[1.7.15]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.14...v1.7.15 +[1.7.14]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.13...v1.7.14 +[1.7.13]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.12...v1.7.13 +[1.7.12]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.11...v1.7.12 +[1.7.11]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.10...v1.7.11 +[1.7.10]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.9...v1.7.10 [1.7.9]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.8...v1.7.9 [1.7.8]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.7...v1.7.8 [1.7.7]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.6...v1.7.7 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-roles/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-roles/CHANGELOG.md index 86d4e90e..cd81100e 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-roles/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-roles/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.4.15] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.4.14] - 2022-01-25 +### Changed +- Updated package dependencies. + ## [1.4.13] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -107,6 +115,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Jetpack DNA: Introduce a Roles package +[1.4.15]: https://github.com/Automattic/jetpack-roles/compare/v1.4.14...v1.4.15 +[1.4.14]: https://github.com/Automattic/jetpack-roles/compare/v1.4.13...v1.4.14 [1.4.13]: https://github.com/Automattic/jetpack-roles/compare/v1.4.12...v1.4.13 [1.4.12]: https://github.com/Automattic/jetpack-roles/compare/v1.4.11...v1.4.12 [1.4.11]: https://github.com/Automattic/jetpack-roles/compare/v1.4.10...v1.4.11 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/CHANGELOG.md index 90de0b6a..af8e45d5 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/CHANGELOG.md @@ -5,6 +5,266 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.14.2] - 2022-05-30 +### Changed +- Updated package dependencies +- Updated package dependencies. +- Use the Checkout workflow to establish the connection and make the purchase + +### Fixed +- Avoid filter from being added multiple times + +## [0.14.1] - 2022-05-24 +### Added +- Allow plugins to filter the list of available modules. Only activate and consider active modules that are available [#24454] + +### Changed +- Search: Use Modules methods for activating and deactivating the Search module. [#24385] +- Updated package dependencies. [#24449] + +## [0.14.0] - 2022-05-19 +### Removed +- Search: Disable auto-collapsing the wp-admin sidebar within Customberg [#24399] + +## [0.13.4] - 2022-05-18 +### Changed +- Adjust translatable string [#24357] +- Record Meter: switch noticebox persistence storage from localStorage to sessionStorage [#24348] +- Record Meter design updates [#24225] +- Search package: search dashboard refactoring [#24266] +- Updated package dependencies. [#23795] [#24153] [#24306] [#24372] + +## [0.13.3] - 2022-05-10 +### Added +- Add missing JS dep on `core-js`. [#24288] + +### Changed +- Search: refactored Settings to expose the settings array for sync [#24167] +- Updated package dependencies. [#24189] +- Updated package dependencies. [#24204] +- Updated package dependencies. [#24302] +- Updated package dependencies [#24276] +- Updated package dependencies [#24296] +- Updated package dependencies [#24301] + +### Fixed +- Search: Fix left padding for upsell page [#24285] +- Search: handle tiers without a record limit in Record Meter [#24264] + +## [0.13.2] - 2022-05-04 +### Added +- Add missing JavaScript dependencies. [#24096] + +### Changed +- Remove use of `pnpx` in preparation for pnpm 7.0. [#24210] +- Updated package dependencies. [#24095] [#24230] [#24198] [#24228] + +### Deprecated +- Moved the options class into Connection. [#24095] + +### Fixed +- Adapt Record Meter to change in API response format [#24107] +- Search: Bundle vendor assets within the main chunk [#24068] +- Search: Fix search for private WoA sites [#24099] +- Search: reset border-radius for search buttons [#24100] + +## [0.13.1] - 2022-04-26 +### Added +- Search: added upsell page + +### Changed +- Updated package dependencies. +- Update package.json metadata. + +## [0.13.0] - 2022-04-19 +### Added +- Search: add class to retrieve search product information +- Search: Add count estimation function +- Search: added API support for search product tier pricing + +### Changed +- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` +- Record meter: updates noticeboxes to be dismissable & styled +- Search Record Meter updates formatting +- Use new shared Gridicons component and shared Modules library + +## [0.12.3] - 2022-04-12 +### Added +- Added deprecated methods as a safety. + +### Changed +- Updated package dependencies. + +### Fixed +- Search: auto config no longer overrides option if it exists. + +## [0.12.2] - 2022-04-06 +### Added +- Adds API data to record meter chart. + +### Changed +- Janitorial: Refactor classes into shared package. +- Updated package dependencies. + +### Removed +- Removed tracking dependency. + +### Fixed +- Search: allow Search submenu to be added only once + +## [0.12.1] - 2022-03-31 +### Fixed +- Search: fixed search submenu is shown because compatibility file is loaded too late. + +## [0.12.0] - 2022-03-29 +### Added +- Add selector for retrieving last indexed date +- Adds notice box component to record meter +- Search: Migrated tests from Jetpack plugin + +### Changed +- Microperformance: Use === null instead of is_null +- Search: connection states +- Updated package dependencies + +### Fixed +- Fixed lints found after fixing ESLint config +- Search: address feeback for #23477 +- Search: move Jetpack plugin compatibility to the package + +## [0.11.3] - 2022-03-24 +### Added +- Search: adds a record count above the record meter chart. + +### Fixed +- Deactivation: Do not attempt to redirect on a behind-the-scene deactivation. + +## [0.11.2] - 2022-03-23 +### Added +- adds basic structure for record meter with dummy data + +### Changed +- Centralized all intializing logic +- Search dashboard: changed condition to always show dashboard submenu +- Updated package dependencies +- Use Migrated GlotPress locale classes from compat pkg. + +### Fixed +- Search: fixed cli and package version reporting broken in #23435 + +## [0.11.1] - 2022-03-15 +### Changed +- Fixed minor product defects +- Search: moved globals to a class for sake of autoloading correctly +- Search package: Updated Gridicon dependancy to use local version +- Updated package dependencies. + +## [0.11.0] - 2022-03-08 +### Changed +- Components: update attributes used within the Button component to match recent deprecations and changes. +- Move customizer integration into search package +- search: move record meter location on dashboard + +### Fixed +- Ensure that WP CLI is present before extending the class. +- Ensure the Customizer classes are loaded. + +## [0.10.0] - 2022-03-02 +### Added +- Search: add chart.js package to dependencies +- Search: fetch search stats endpoint in wp-admin dashboard + +### Changed +- Search: Renamed Customberg class file name +- Updated package dependencies. + +### Fixed +- Fix various notices shown for Customberg +- Search package: i18n support for auto added search block label and button + +## [0.9.1] - 2022-02-25 +### Fixed +- Search: Fixed a regression that prevented modal from being spawned by link clicks + +## [0.9.0] - 2022-02-22 +### Added +- Bump package versions. +- Search: add stats endpoint to REST controller + +### Changed +- Search package: refactor `auto_config_search` and run it from activation API + +### Fixed +- Search package: fix auto config doesn't add search input for block themes + +## [0.8.0] - 2022-02-16 +### Added +- Add babel/runtime to dev dependencies +- Add tier maximum records for Record Meter +- Clicking outside overlay now closes overlay + +### Changed +- Change `instance` function for improved compatibility +- Updated package dependencies. + +### Fixed +- Form: avoid React warning. +- Improve display of colorpicker in Customberg +- Fixed undefined index features +- Should not exclude widget js in package distribution + +## [0.7.0] - 2022-02-09 +### Added +- Search Dashboard: add scaffolding for new record meter +- Search package: added auto config CLI + +### Changed +- Search: move search widgets to package +- Updated package dependencies + +## [0.6.0] - 2022-02-02 +### Added +- Add `@use "sass:math"` in base styles scss for upcoming `@wordpress/block-editor` 8.1.0 requirement. +- Search package: added package version number and others + +### Changed +- Build: remove unneeded files from production build. +- Instant Search: add image alt text from API +- Updated package dependencies. + +## [0.5.4] - 2022-01-31 +### Fixed +- Search: Fetch plan info as blog, not as user, to allow nonconnected admins to use dashboard + +## [0.5.3] - 2022-01-27 +### Fixed +- Search package: fixed compatibility issue with plan activation + +## [0.5.2] - 2022-01-25 +### Added +- Added a watch command for building assets +- Search E2E: added class names for some form components for easier E2E tests + +### Changed +- Search: Improve accessibility via headings hierarchy and aria roles +- Updated package dependencies. + +### Fixed +- Search widget: changed fetching search result to just before rendering jp search widget + +## [0.5.1] - 2022-01-18 +### Changed +- General: update required node version to v16.13.2 + +## [0.5.0] - 2022-01-11 +### Added +- Search: Migrated Classic and Instant Search code from Jetpack plugin. +- Search API: activation and deactivation API. + +### Changed +- Search: moved search dashboard to the package. +- Updated package dependencies. + ## [0.4.0] - 2022-01-04 ### Changed - Do not escape widget title value @@ -45,6 +305,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated package dependencies. - Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. +[0.14.2]: https://github.com/Automattic/jetpack-search/compare/v0.14.1...v0.14.2 +[0.14.1]: https://github.com/Automattic/jetpack-search/compare/v0.14.0...v0.14.1 +[0.14.0]: https://github.com/Automattic/jetpack-search/compare/v0.13.4...v0.14.0 +[0.13.4]: https://github.com/Automattic/jetpack-search/compare/v0.13.3...v0.13.4 +[0.13.3]: https://github.com/Automattic/jetpack-search/compare/v0.13.2...v0.13.3 +[0.13.2]: https://github.com/Automattic/jetpack-search/compare/v0.13.1...v0.13.2 +[0.13.1]: https://github.com/Automattic/jetpack-search/compare/v0.13.0...v0.13.1 +[0.13.0]: https://github.com/Automattic/jetpack-search/compare/v0.12.3...v0.13.0 +[0.12.3]: https://github.com/Automattic/jetpack-search/compare/v0.12.2...v0.12.3 +[0.12.2]: https://github.com/Automattic/jetpack-search/compare/v0.12.1...v0.12.2 +[0.12.1]: https://github.com/Automattic/jetpack-search/compare/v0.12.0...v0.12.1 +[0.12.0]: https://github.com/Automattic/jetpack-search/compare/v0.11.3...v0.12.0 +[0.11.3]: https://github.com/Automattic/jetpack-search/compare/v0.11.2...v0.11.3 +[0.11.2]: https://github.com/Automattic/jetpack-search/compare/v0.11.1...v0.11.2 +[0.11.1]: https://github.com/Automattic/jetpack-search/compare/v0.11.0...v0.11.1 +[0.11.0]: https://github.com/Automattic/jetpack-search/compare/v0.10.0...v0.11.0 +[0.10.0]: https://github.com/Automattic/jetpack-search/compare/v0.9.1...v0.10.0 +[0.9.1]: https://github.com/Automattic/jetpack-search/compare/v0.9.0...v0.9.1 +[0.9.0]: https://github.com/Automattic/jetpack-search/compare/v0.8.0...v0.9.0 +[0.8.0]: https://github.com/Automattic/jetpack-search/compare/v0.7.0...v0.8.0 +[0.7.0]: https://github.com/Automattic/jetpack-search/compare/v0.6.0...v0.7.0 +[0.6.0]: https://github.com/Automattic/jetpack-search/compare/v0.5.4...v0.6.0 +[0.5.4]: https://github.com/Automattic/jetpack-search/compare/v0.5.3...v0.5.4 +[0.5.3]: https://github.com/Automattic/jetpack-search/compare/v0.5.2...v0.5.3 +[0.5.2]: https://github.com/Automattic/jetpack-search/compare/v0.5.1...v0.5.2 +[0.5.1]: https://github.com/Automattic/jetpack-search/compare/v0.5.0...v0.5.1 +[0.5.0]: https://github.com/Automattic/jetpack-search/compare/v0.4.0...v0.5.0 [0.4.0]: https://github.com/Automattic/jetpack-search/compare/v0.3.0...v0.4.0 [0.3.0]: https://github.com/Automattic/jetpack-search/compare/v0.2.1...v0.3.0 [0.2.1]: https://github.com/Automattic/jetpack-search/compare/v0.2.0...v0.2.1 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.asset.php new file mode 100644 index 00000000..cda564d7 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.asset.php @@ -0,0 +1 @@ +<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => '08e18f5ecdca33e1bc4d'); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.css new file mode 100644 index 00000000..d1889d05 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.css @@ -0,0 +1 @@ +.jetpack-instant-search__overlay{background:rgba(29,35,39,.7);bottom:0;box-sizing:border-box;color:#00101c;font-size:16px;left:0;opacity:1;overflow-x:hidden;overflow-y:auto;position:fixed;right:0;top:0;transition:opacity .1s ease-in;z-index:9999999999999}body.jps-theme-argent .jetpack-instant-search__overlay *{font-family:Helvetica,sans-serif}@media(max-width:767.98px){.jetpack-instant-search__overlay{padding:3em 1em}}@media(max-width:575.98px){.jetpack-instant-search__overlay{padding:0}}@media(min-width:768px){.jetpack-instant-search__overlay{padding:3em}}.jetpack-instant-search__overlay.is-hidden{background:transparent;opacity:0;visibility:hidden}.jetpack-instant-search__overlay *,.jetpack-instant-search__overlay :after,.jetpack-instant-search__overlay :before{box-sizing:inherit}@media print{.jetpack-instant-search__overlay.is-hidden{display:none}}.gridicon{fill:currentColor;display:inline-block}.gridicon.needs-offset g{transform:translate(1px,1px)}.gridicon.needs-offset-x g{transform:translate(1px)}.gridicon.needs-offset-y g{transform:translateY(1px)}.jetpack-instant-search__notice{font-size:14px;margin:1em 0;padding:.75em}.jetpack-instant-search__notice.jetpack-instant-search__notice--warning{background-color:#f5e6b3;color:#4f3500}.jetpack-instant-search__notice .gridicon{margin-right:.5em;margin-top:-5px;vertical-align:middle}.jetpack-instant-search__scroll-button{border:0;box-shadow:none;font-size:13px;outline:0}.jetpack-instant-search__search-sort{align-items:center;display:flex}.jetpack-instant-search__search-sort>label[for=jetpack-instant-search__search-sort-select]{flex-shrink:0;font-size:1em;font-weight:700;margin:0 .25em 0 0}.jetpack-instant-search__search-sort-with-links{font-size:13px}@media(max-width:575.98px){.jetpack-instant-search__search-sort-with-select{margin-right:1em;width:100%}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-sort-with-select{margin-right:0}}@media(min-width:992px){.jetpack-instant-search__search-sort-with-select{margin-top:-4px}}#jetpack-instant-search__search-sort-select{-webkit-appearance:auto;appearance:auto;background:#fff;border:1px solid #e6f1f5;border-radius:5px;color:#00101c;font-size:1em;height:inherit;padding:.25em}@media(max-width:575.98px){#jetpack-instant-search__search-sort-select{padding:.5em;width:100%}}.jetpack-instant-search__search-sort-option{color:#646970;cursor:pointer;padding:0 2px;text-decoration:none}.jetpack-instant-search__search-sort-option:after{color:#646970;content:"·";font-weight:400;padding-left:5px}.jetpack-instant-search__search-sort .jetpack-instant-search__search-sort-option:focus,.jetpack-instant-search__search-sort .jetpack-instant-search__search-sort-option:hover{text-decoration:none}.jetpack-instant-search__search-sort-option:last-child:after{content:""}.jetpack-instant-search__search-sort-option.is-selected{color:#044b7a;font-weight:600;text-decoration:none}.jetpack-instant-search__search-form-controls{align-items:center;display:flex;line-height:1.3;margin-left:56px;margin-right:56px;margin-top:16px;z-index:1}@media(max-width:991.98px){.jetpack-instant-search__search-form-controls{flex-direction:row-reverse;justify-content:space-between;left:0;margin-left:40px;margin-right:40px;position:relative;right:0}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-form-controls{flex-direction:row-reverse;justify-content:space-between;left:0;margin-left:40px;margin-right:40px;position:relative;right:0}}@media(max-width:767.98px){.jetpack-instant-search__search-form-controls{margin-left:20px;margin-right:20px}}@media(min-width:992px){.jetpack-instant-search__search-form-controls{position:absolute;right:320px}}@media(min-width:1200px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-form-controls{position:absolute;right:320px}}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-form-controls{right:0}.jetpack-instant-search__box{border-bottom:1px solid #e6f1f5;border-right:1px solid #e6f1f5}.jetpack-instant-search__box-label{align-items:center;display:flex;flex:0 0 100%;margin:0}input.jetpack-instant-search__box-input.search-field{-webkit-appearance:none;appearance:none;background:#fff;border:0;box-shadow:none;color:#3c434a;font-size:18px;height:60px;line-height:1;margin:0;max-width:none;padding:0 14px;text-indent:32px;vertical-align:middle}input.jetpack-instant-search__box-input.search-field:focus,input.jetpack-instant-search__box-input.search-field:hover{background:#fff;color:#00101c}input.jetpack-instant-search__box-input.search-field.search-field{letter-spacing:-.02em;padding-left:0;text-indent:0}.jetpack-instant-search__box-gridicon{align-items:center;display:flex;flex-shrink:0;height:60px;justify-content:center;left:0;position:relative;top:0;width:60px;z-index:1}.jetpack-instant-search__box-gridicon svg{fill:#646970}.jetpack-instant-search__box input[type=button]{word-wrap:normal;border:none;border-radius:0;color:#646970;cursor:pointer;font-size:1em;font-weight:400;height:60px;line-height:1;margin:0 .25em 0 0;padding:0;text-decoration:none;text-shadow:none;text-transform:none;transition:all .1s linear;width:60px}.jetpack-instant-search__box input[type=button],.jetpack-instant-search__box input[type=button]:focus,.jetpack-instant-search__box input[type=button]:hover{-webkit-appearance:none;appearance:none;background:none;box-shadow:none;outline:none}.jetpack-instant-search__box input[type=button]:focus,.jetpack-instant-search__box input[type=button]:hover{color:#3c434a}.jetpack-instant-search__box input[type=button]:focus{outline:1px dotted}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input{border:none;box-shadow:none;height:52px;outline-style:none;transition:color .15s ease-in-out,border-color .25s ease-in-out;width:100%}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input:focus,.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input:hover{border:none;box-shadow:none;outline-style:none}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-webkit-search-results-button,.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-webkit-search-results-decoration{appearance:none;-webkit-appearance:none;display:initial}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-webkit-search-cancel-button{display:none}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-ms-clear,.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-ms-reveal{display:none}.jetpack-instant-search__path-breadcrumb{font-size:.9em;margin:0;max-width:calc(100vw - 2em);overflow-x:hidden;text-overflow:ellipsis}.jetpack-instant-search__path-breadcrumb-link{max-width:100%;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.jetpack-instant-search__path-breadcrumb-link:focus,.jetpack-instant-search__path-breadcrumb-link:hover{text-decoration:underline}.jetpack-instant-search__path-breadcrumb,.jetpack-instant-search__path-breadcrumb-link{color:#3c434a}.jetpack-instant-search__search-result-comments{border-left:2px solid #f0f0f1;font-size:.9em;margin-left:8px;margin-top:16px;padding-left:16px;word-break:break-word}.jetpack-instant-search__search-result-comments .gridicon{margin-right:8px;vertical-align:middle}.jetpack-instant-search__search-result-title.jetpack-instant-search__search-result-minimal-title{margin-bottom:.4em}.jetpack-instant-search__search-result-title.jetpack-instant-search__search-result-minimal-title .gridicon{margin-right:8px}.jetpack-instant-search__search-result-minimal-cats-and-tags{display:flex;flex-flow:row wrap;font-size:.9375em}.jetpack-instant-search__search-result-minimal-cats,.jetpack-instant-search__search-result-minimal-tags{display:flex;flex-flow:row wrap;list-style-type:none;margin:0;padding:0}.jetpack-instant-search__search-result-minimal-cat,.jetpack-instant-search__search-result-minimal-tag{margin:0 .75em 0 0}.jetpack-instant-search__search-result-minimal-cat .gridicon,.jetpack-instant-search__search-result-minimal-tag .gridicon{margin-right:.25em}.jetpack-instant-search__search-result-minimal-cat .gridicon,.jetpack-instant-search__search-result-minimal-cat-text,.jetpack-instant-search__search-result-minimal-tag .gridicon,.jetpack-instant-search__search-result-minimal-tag-text{vertical-align:middle}.jetpack-instant-search__search-result-minimal-content{word-break:break-word}.jetpack-instant-search__search-result-expanded{display:flex;flex-flow:column}.jetpack-instant-search__search-result-expanded:last-child{margin-right:0}.jetpack-instant-search__search-result-expanded .jetpack-instant-search__search-result-expanded__title{width:100%}.jetpack-instant-search__search-result-expanded__path{color:#646970;font-size:.9375em;margin:0 0 .4em}.jetpack-instant-search__search-result-expanded__copy-container{max-width:100%}@media(min-width:576px){.jetpack-instant-search__search-result-expanded__copy-container{width:calc(100% - 128px - 1em)}}.jetpack-instant-search__search-result-expanded--no-image .jetpack-instant-search__search-result-expanded__copy-container{width:auto}.jetpack-instant-search__search-result-expanded__content{color:#00101c;font-size:.9375em}.jetpack-instant-search__search-result-expanded__image-link{margin-left:1em}@media(max-width:575.98px){.jetpack-instant-search__search-result-expanded__image-link{margin:0 auto .5em;order:-1}}.jetpack-instant-search__search-result-expanded__image-container{width:128px}@media(max-width:575.98px){.jetpack-instant-search__search-result-expanded__image-container{width:256px}}.jetpack-instant-search__search-result-expanded--no-image .jetpack-instant-search__search-result-expanded__image-container{display:none}.jetpack-instant-search__search-result-expanded__image-container{position:relative}.jetpack-instant-search__search-result-expanded__image-container:before{content:"";display:block;padding-top:100%;width:100%}.jetpack-instant-search__search-result-expanded__image{border-radius:5px;bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.jetpack-instant-search__search-result-expanded__content-container{display:flex;flex-flow:column}@media(min-width:576px){.jetpack-instant-search__search-result-expanded__content-container{flex-flow:row nowrap}}.jetpack-instant-search__search-result-expanded__footer{display:flex;list-style-type:none;margin-left:0;margin-top:10px;padding-left:0}.jetpack-instant-search__search-result-expanded__footer li{margin-right:10px}.jetpack-instant-search__search-result-expanded__footer-blog-image{border-radius:2px;margin-right:3px;vertical-align:middle}.jetpack-instant-search__search-result-expanded__footer-blog{font-size:13px;font-style:normal;font-weight:600;line-height:180%}.jetpack-instant-search__search-result-expanded__footer-author:after,.jetpack-instant-search__search-result-expanded__footer-blog:after{color:#636363;content:"·";margin-left:10px}.jetpack-instant-search__search-result-expanded__footer-author,.jetpack-instant-search__search-result-expanded__footer-date{color:#636363;font-size:13px;font-style:normal;font-weight:400}.jetpack-instant-search__product-rating-stars .gridicon{fill:#f0c930;vertical-align:middle}.jetpack-instant-search a.jetpack-instant-search__product-rating-count{color:#646970;font-size:.9em;text-decoration:underline;vertical-align:text-top}.jetpack-instant-search__product-price-regular{color:#646970;padding-right:.25em}.jetpack-instant-search__search-results-list.is-format-product{display:flex;flex-wrap:wrap;margin-right:40px;padding:0 0 3em}@media(max-width:991.98px){.jetpack-instant-search__search-results-list.is-format-product{margin-right:24px}}@media(max-width:767.98px){.jetpack-instant-search__search-results-list.is-format-product{margin-right:4px}}.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{display:flex;flex-direction:column;margin:0 16px 16px 0;position:relative;width:calc(50% - 16px)}@media(min-width:576px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(33.33333% - 16px)}}@media(min-width:768px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(25% - 16px)}}@media(min-width:992px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(33.33333% - 16px)}}@media(min-width:1200px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(25% - 16px)}}@media(min-width:1400px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(20% - 16px)}}.jetpack-instant-search__search-result>.jetpack-instant-search__search-result-product-img-link{display:block}.jetpack-instant-search__search-result-product-img-container{border-radius:5px;color:transparent;position:relative}.jetpack-instant-search__search-result-product-img-container.jetpack-instant-search__search-result-product-img-container--placeholder{background:#c3c4c7}.jetpack-instant-search__search-result-product-img-container .gridicon{fill:#fff}.jetpack-instant-search__search-result-product-img-container:before{content:"";display:block;padding-top:100%;width:100%}.jetpack-instant-search__search-result-product-img{border-radius:5px;bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.jetpack-instant-search__search-result-product-img>.gridicon{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.jetpack-instant-search__search-result-product-img>.gridicons-image{height:25%;width:25%}.jetpack-instant-search__search-result-product-img>.gridicons-block{height:50%;width:50%}.jetpack-instant-search__search-result-title.jetpack-instant-search__search-result-product-title{font-size:1.25em;margin:.25em 0 0}.jetpack-instant-search__search-result-product-match{font-size:.9em;margin-top:.25em}.jetpack-instant-search__search-result-product-match mark{align-items:center;display:flex;font-weight:400}.jetpack-instant-search__search-result-product-match .gridicon{height:1em;margin-right:.25em;width:1em}.jetpack-instant-search__search-result{margin:0 0 2em}.jetpack-instant-search__search-result-title{font-size:1.6em;font-weight:400;line-height:1.35;margin:0;overflow-wrap:break-word}.jetpack-instant-search__search-result-title .jetpack-instant-search__search-result-title-link{text-decoration:none}.jetpack-instant-search__search-result-title .jetpack-instant-search__search-result-title-link:focus,.jetpack-instant-search__search-result-title .jetpack-instant-search__search-result-title-link:hover{text-decoration:underline}.jetpack-instant-search__search-filters{position:relative}.jetpack-instant-search__search-filters>div{margin-top:1em}.jetpack-instant-search__search-filters-title{color:#00101c;display:block;font-size:inherit;font-weight:700;line-height:1.3;margin:0;padding:0}.jetpack-instant-search__clear-filters-link{line-height:1.3;margin:0;position:absolute;right:0;top:0}.jetpack-instant-search__search-filter-sub-heading{color:#646970;font-size:inherit;margin:0;padding:0}.jetpack-instant-search__search-filter-list{text-align:left}.jetpack-instant-search__search-filter-list>div{align-items:baseline;display:flex;margin-top:8px}.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-input,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-input{-webkit-appearance:checkbox;appearance:checkbox;background:none;border:none;cursor:pointer;height:auto;margin:0;top:1px;width:auto}.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-input:after,.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-input:before,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-input:after,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-input:before{display:none!important}.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-label,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-label{color:inherit;cursor:pointer;display:inline-block;font-weight:400;margin:0 0 0 8px;padding:0;width:auto}.jetpack-instant-search__search-static-filter-list{font-size:.875rem;line-height:1.8}.jetpack-instant-search__widget-area-container{margin-bottom:2em}.jetpack-instant-search__jetpack-colophon{margin-bottom:2em;margin-top:2em;text-align:center}.jetpack-instant-search__jetpack-colophon-link{align-items:center;color:inherit;display:flex;text-decoration:none}.jetpack-instant-search__jetpack-colophon-logo{display:inline;height:16px;width:16px}.jetpack-instant-search__jetpack-colophon-text{color:#3c434a;font-size:.7em;font-weight:400;padding-left:6px}.jetpack-instant-search__sidebar{padding-top:14px}.jetpack-instant-search__sidebar .jetpack-instant-search__widget-area>.widget{background:none;border:none;margin:0;padding:0}.jetpack-instant-search__sidebar .jetpack-instant-search__widget-area>.widget a{font-weight:400}.jetpack-instant-search__sidebar h2.widgettitle{border:none;font-size:1.3em;margin:1em 0 .5em}.jetpack-instant-search__sidebar h2.widgettitle:after,.jetpack-instant-search__sidebar h2.widgettitle:before{display:none!important}.jetpack-instant-search__search-results{background:#fff;border-radius:3px;margin:0 auto;max-width:1080px;min-height:100%;position:relative;z-index:10}@media(max-width:575.98px){.jetpack-instant-search__search-results{border-radius:0}}@media(min-width:992px){.jetpack-instant-search__search-results{max-width:95%}}.jetpack-instant-search__search-results mark{background:#ffc;color:#00101c}.jetpack-instant-search__search-results-controls{display:flex}.jetpack-instant-search__search-results-content{display:flex;position:relative}.jetpack-instant-search__search-results-filter-button{align-items:center;border:0;color:#646970;cursor:pointer;display:flex;flex-shrink:0;font-size:12px;margin:0;padding:8px;text-decoration:none;transition:background-color .25s ease-in-out}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-filter-button{visibility:hidden}@media(min-width:576px){.jetpack-instant-search__search-results-filter-button{font-size:13px;padding:10px 14px}}@media(min-width:992px){.jetpack-instant-search__search-results-filter-button{display:none}.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-filter-button{display:flex}}@media(min-width:1200px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-filter-button{display:none}}.jetpack-instant-search__search-results-filter-button:focus,.jetpack-instant-search__search-results-filter-button:hover{color:#00101c}.jetpack-instant-search__search-results-filter-button .gridicon{margin-left:4px}.jetpack-instant-search__search-results-primary{margin:0;max-width:calc(100% - 320px);width:100%}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-primary{max-width:100%}@media(max-width:991.98px){.jetpack-instant-search__search-results-primary{max-width:100%}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-primary{max-width:100%}}.jetpack-instant-search__search-results-secondary{background:none;border-left:1px solid #e6f1f5;border-radius:0;bottom:0;box-shadow:none;color:#00101c;display:block;flex:none;padding:0 32px;position:static;width:320px}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-secondary{display:none}@media(max-width:991.98px){.jetpack-instant-search__search-results-secondary{display:none}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary{display:none}}@media(max-width:991.98px){.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:6px;box-shadow:0 2px 3px rgba(0,0,0,.1);display:block;left:1em;max-height:70vh;min-width:360px;overflow-y:scroll;padding:16px 24px;position:absolute;right:1em;top:0;width:auto;z-index:10}}@media(max-width:991.98px)and (max-width:575.98px){.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{max-height:80vh}}@media(max-width:991.98px){.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon{margin-bottom:1em}.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon-text{font-size:.8em}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{display:none}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:6px;box-shadow:0 2px 3px rgba(0,0,0,.1);display:block;left:1em;max-height:70vh;min-width:360px;overflow-y:scroll;padding:16px 24px;position:absolute;right:1em;top:0;width:auto;z-index:10}}@media(max-width:1199.98px)and (max-width:575.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{max-height:80vh}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon{margin-bottom:1em}.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon-text{font-size:.8em}.jetpack-instant-search__overlay--no-sidebar .jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{display:none}}.jetpack-instant-search__search-results-title,.jetpack-instant-search__search-results-unused-query{color:#00101c;font-size:1em;font-weight:700;line-height:1.3;margin:1em 56px 1.5em;padding:0;word-break:break-word}@media(max-width:991.98px){.jetpack-instant-search__search-results-title,.jetpack-instant-search__search-results-unused-query{margin-bottom:1em;margin-left:40px;margin-right:40px}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-title,.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-unused-query{margin-bottom:1em;margin-left:40px;margin-right:40px}}@media(max-width:767.98px){.jetpack-instant-search__search-results-title,.jetpack-instant-search__search-results-unused-query{margin-left:20px;margin-right:20px}}@media(min-width:992px){.jetpack-instant-search__search-results-title{padding-right:210px}}@media(min-width:1200px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-title{padding-right:210px}}.jetpack-instant-search__search-results-list{color:#00101c;list-style:none;margin-left:56px;margin-right:56px;padding:0}@media(max-width:991.98px){.jetpack-instant-search__search-results-list{margin-left:40px;margin-right:40px}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-list{margin-left:40px;margin-right:40px}}@media(max-width:767.98px){.jetpack-instant-search__search-results-list{margin-left:20px;margin-right:20px}}.jetpack-instant-search__search-results-list li:before{content:"";height:1px;position:absolute;width:1px}.jetpack-instant-search__search-results-search-form{font-size:.8em;margin:0;top:0;width:100%}button.jetpack-instant-search__overlay-close{align-items:center;-webkit-appearance:none;appearance:none;background:none;background-color:transparent!important;border:none;border-bottom:1px solid #e6f1f5;border-radius:0;box-shadow:none;cursor:pointer;display:flex;height:61px;justify-content:center;line-height:1;margin:0;outline:none;padding:0;text-decoration:none;text-shadow:none;text-transform:none;width:60px}button.jetpack-instant-search__overlay-close:focus,button.jetpack-instant-search__overlay-close:hover{-webkit-appearance:none;appearance:none;background:none;box-shadow:none;outline:none}button.jetpack-instant-search__overlay-close:focus{outline:1px dotted}button.jetpack-instant-search__overlay-close svg.gridicon{fill:#646970}button.jetpack-instant-search__overlay-close:active,button.jetpack-instant-search__overlay-close:focus,button.jetpack-instant-search__overlay-close:hover{background-color:transparent!important;border-color:#e6f1f5}button.jetpack-instant-search__overlay-close:active svg.gridicon,button.jetpack-instant-search__overlay-close:focus svg.gridicon,button.jetpack-instant-search__overlay-close:hover svg.gridicon{fill:#3c434a}.jetpack-instant-search__search-results-pagination{display:block;flex:none;margin:50px}.jetpack-instant-search .widget a,.jetpack-instant-search .widget.widget_archive ul li a,.jetpack-instant-search a{border:none;color:#001621;text-decoration:none}.jetpack-instant-search .widget a:focus,.jetpack-instant-search .widget a:hover,.jetpack-instant-search .widget.widget_archive ul li a:focus,.jetpack-instant-search .widget.widget_archive ul li a:hover,.jetpack-instant-search a:focus,.jetpack-instant-search a:hover{color:#044b7a;text-decoration:underline}.jetpack-search-filters-widget__filter-list{list-style-type:none}body.enable-search-modal .cover-modal.show-modal.search-modal.active{display:none}.screen-reader-text{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark{background:rgba(29,35,39,.7);color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget a,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget.widget_archive ul li a,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark a{color:#f6f7f7}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget a:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget a:hover,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget.widget_archive ul li a:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget.widget_archive ul li a:hover,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark a:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark a:hover{color:#0675c4}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-filters-title,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-result-expanded__content,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-list,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-title,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-unused-query{color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__jetpack-colophon-text,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__path-breadcrumb,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__path-breadcrumb-link{color:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-filter-sub-heading,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-result-expanded__path{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close{border-color:#3c434a}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box-gridicon svg,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close svg.gridicon{fill:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close{border-color:#3c434a}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close:focus svg.gridicon,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close:hover svg.gridicon{fill:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box input[type=button]{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box input[type=button]:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box input[type=button]:hover{color:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark input.jetpack-instant-search__box-input.search-field{background:#000;color:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark input.jetpack-instant-search__box-input.search-field:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark input.jetpack-instant-search__box-input.search-field:hover{background:#000;color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results{background:#000}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results mark{color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-filter-button{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-filter-button:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-filter-button:hover,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-secondary{color:#e6f1f5}@media(min-width:992px){.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-secondary{border-color:#3c434a}}@media(max-width:991.98px){.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{background:#000;border-color:#3c434a;box-shadow:0 2px 3px #3c434a}}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-sort-option,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-sort-option:after{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-sort-option.is-selected{color:#0675c4}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-result-product-img--placeholder{color:#2c3338}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark #jetpack-instant-search__search-sort-select{background:#000;border-color:#3c434a;color:#e6f1f5}.jp-search-configure-app-wrapper{flex-grow:1}.jp-search-configure-app-wrapper .jp-search-configure-loading-spinner{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.jp-search-configure-app-wrapper .jetpack-instant-search{background:#f0f0f0;padding-top:2em;position:absolute;z-index:90}.jp-search-configure-app-wrapper .jetpack-instant-search .jetpack-instant-search__search-results{max-width:none}.jp-search-configure-app-wrapper .jetpack-instant-search a:not(.jetpack-instant-search__search-sort-option){pointer-events:none}.jp-search-configure-save-button{margin-right:4px}.jp-search-configure-save-button:first-of-type{margin-left:auto}@media(min-width:600px){.jp-search-configure-save-button{margin-right:8px}}@media(min-width:782px){.jp-search-configure-sidebar .jp-search-configure-save-button{display:none}}.jp-search-configure-header{align-items:center;display:flex;height:48px;justify-content:space-between;overflow:auto;padding:0 16px}@media(min-width:782px){.jp-search-configure-header{height:60px}}@media(min-width:600px){.jp-search-configure-header{overflow:visible}}.jp-search-configure-header__navigable-toolbar-wrapper{align-items:center;display:flex;justify-content:center}.jp-search-configure-header__title{font-size:20px;margin:0 20px 0 0;padding:0}.jp-search-configure-header__actions{display:flex}@media(min-width:600px){.jp-search-configure-header__actions .components-button.jp-search-configure-header__show-settings-button{margin-right:8px}}@media(min-width:782px){.jp-search-configure-header__actions .components-button.jp-search-configure-header__show-settings-button{display:none;margin-left:0}}.jp-search-configure-color-input .component-color-indicator{vertical-align:middle}.jp-search-configure-color-input .block-editor-color-gradient-control fieldset>legend{margin-bottom:12px}.jp-search-configure-color-input .block-editor-color-gradient-control fieldset>legend>.block-editor-color-gradient-control__color-indicator{margin-bottom:0}.jp-search-configure-color-input .components-circular-option-picker__option-wrapper :focus:after{left:-4px;top:-4px}.jp-search-configure-color-input .components-circular-option-picker__option-wrapper .components-button.is-pressed:focus:not(:disabled){box-shadow:inset 0 0 0 14px!important}.jp-search-configure-sidebar-options--is-disabled .jp-search-configure-color-input .components-button{cursor:not-allowed;filter:grayscale(.8);pointer-events:none}.jp-search-configure-sidebar-options--is-disabled .jp-search-configure-color-input .components-circular-option-picker__option-wrapper:hover{transform:scale(1)}.jp-search-configure-excluded-post-types-control{margin-top:8px}.jp-search-configure-excluded-post-types-control .jp-search-configure-excluded-post-types-control__label{margin-bottom:8px}.jp-search-configure-excluded-post-types-control .components-notice{margin:8px 0;padding-bottom:4px;padding-top:4px}.components-panel__header.jp-search-configure-sidebar__panel-tabs{border-top:0;justify-content:flex-start;margin-top:0;padding-left:0;padding-right:12px}.components-panel__header.jp-search-configure-sidebar__panel-tabs ul{display:flex;height:100%}.components-panel__header.jp-search-configure-sidebar__panel-tabs li{margin:0}.components-panel__header.jp-search-configure-sidebar__panel-tabs .components-button.jp-search-configure-sidebar__hide-settings-button{margin-right:4px}@media(min-width:600px){.components-panel__header.jp-search-configure-sidebar__panel-tabs .components-button.jp-search-configure-sidebar__hide-settings-button{margin-right:12px}}@media(min-width:782px){.components-panel__header.jp-search-configure-sidebar__panel-tabs .components-button.jp-search-configure-sidebar__hide-settings-button{display:none}}.components-button.jp-search-configure-sidebar__panel-tab{background:transparent;border:none;border-radius:0;box-shadow:none;color:#1e1e1e;cursor:pointer;display:inline-block;font-weight:400;height:49px;height:100%;margin-left:0;padding:3px 15px}.components-button.jp-search-configure-sidebar__panel-tab:after{speak:none;content:attr(data-label);display:block;font-weight:600;height:0;overflow:hidden;visibility:hidden}.components-button.jp-search-configure-sidebar__panel-tab.is-active{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) transparent,inset 0 -1.5px 0 0 var(--wp-admin-theme-color);font-weight:600;position:relative}.components-button.jp-search-configure-sidebar__panel-tab.is-active:before{border-bottom:1.5px solid transparent;bottom:1px;content:"";left:0;position:absolute;right:0;top:0}.components-button.jp-search-configure-sidebar__panel-tab:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-button.jp-search-configure-sidebar__panel-tab.is-active:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 -1.5px 0 0 var(--wp-admin-theme-color)}.jp-search-configure-sidebar-description{display:flex;padding:16px}.jp-search-configure-sidebar-description .block-editor-block-icon{margin-right:16px}.jp-search-configure-sidebar-description .components-button.is-tertiary{margin-left:-6px}.jp-search-configure-sidebar-options .components-base-control{margin-bottom:24px}.jp-search-configure-sidebar-options .components-base-control.components-checkbox-control,.jp-search-configure-sidebar-options .components-base-control.components-toggle-control,.jp-search-configure-sidebar-options .components-base-control:last-child{margin-bottom:0}.jp-search-configure-sidebar-options .components-checkbox-control__label{vertical-align:baseline}.jp-search-configure-result-format-radios{margin-bottom:1em}.jp-search-configure-sidebar-options .jp-search-configure-theme-buttons{display:flex;justify-content:space-around;margin-bottom:12px}.jp-search-configure-sidebar-options .jp-search-configure-theme-buttons button.components-button{display:flex;flex-direction:column;height:auto;padding-left:6px;padding-right:6px}.jp-search-configure-sidebar-options .jp-search-configure-theme-buttons button.components-button:first-child{margin-right:4px}.jp-search-configure-sidebar-options .jp-search-configure-theme-buttons button.components-button:last-child{margin-left:4px}.jp-search-configure-sidebar-options .jp-search-configure-theme-buttons button.components-button svg{border:2px solid #fff;border-radius:3px;margin-bottom:4px}.jp-search-configure-sidebar-options .jp-search-configure-theme-buttons button.components-button.jp-search-configure-theme-button--selected svg{border-color:#2f2f2f}.jp-search-configure-sidebar-options--is-disabled input{cursor:not-allowed;pointer-events:none}.jp-search-configure-sidebar-options--is-disabled input[type=checkbox],.jp-search-configure-sidebar-options--is-disabled input[type=radio]{background:#ddd;border-color:#ddd}.jp-search-configure-sidebar-options--is-disabled .components-radio-control__input[type=radio]:checked{background:#ccc;border-color:#ccc}.components-checkbox-control__input:disabled{background:#ddd;border-color:#ddd;cursor:not-allowed}#jp-search-configure .hide-if-no-js{height:100vh;margin:0;position:relative;text-align:center;width:100vw}#jp-search-configure .hide-if-no-js .jp-search-loader{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}#jp-search-configure .interface-interface-skeleton__header{background-color:#fff}.jp-search-configure-layout__body{display:flex;flex-grow:1;overflow:auto}.block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator{margin-bottom:12px}.block-editor-color-gradient-control__fieldset{min-width:0}.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__panel-title{display:flex;gap:8px}.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{align-self:center;height:12px;width:12px}.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator:first-child{margin-left:12px}.block-editor-panel-color-gradient-settings.is-opened .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{display:none}@media screen and (min-width:782px){.block-editor-panel-color-gradient-settings .components-circular-option-picker__swatches{display:grid;grid-template-columns:repeat(6,28px);justify-content:space-between}}.block-editor-block-inspector .block-editor-panel-color-gradient-settings .components-base-control{margin-bottom:inherit}.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__dropdown{display:block}.block-editor-panel-color-gradient-settings__dropdown{width:100%}.block-editor-panel-color-gradient-settings__dropdown-content .components-popover__content{width:280px}.block-editor-panel-color-gradient-settings__dropdown:last-child>div{border-bottom-width:0}.block-editor-panel-color-gradient-settings__item{padding-bottom:12px!important;padding-top:12px!important}.block-editor-panel-color-gradient-settings__item.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.block-editor-panel-color-gradient-settings__color-indicator{background:linear-gradient(-45deg,transparent 48%,#ddd 0,#ddd 52%,transparent 0)}.block-editor-tools-panel-color-gradient-settings__item{border-bottom:1px solid rgba(0,0,0,.1);border-left:1px solid rgba(0,0,0,.1);border-right:1px solid rgba(0,0,0,.1);padding:0}.block-editor-tools-panel-color-gradient-settings__item.first{border-top:1px solid rgba(0,0,0,.1);border-top-left-radius:2px;border-top-right-radius:2px}.block-editor-tools-panel-color-gradient-settings__item.last{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.block-editor-tools-panel-color-gradient-settings__item>div,.block-editor-tools-panel-color-gradient-settings__item>div>button{border-radius:inherit}.block-editor-tools-panel-color-gradient-settings__dropdown{display:block;padding:0}.block-editor-tools-panel-color-gradient-settings__dropdown>button{height:46px}.block-editor-tools-panel-color-gradient-settings__dropdown>button.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.components-panel__header.interface-complementary-area-header__small{background:#fff;padding-right:4px}.components-panel__header.interface-complementary-area-header__small .interface-complementary-area-header__small-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}@media(min-width:782px){.components-panel__header.interface-complementary-area-header__small{display:none}}.interface-complementary-area-header{background:#fff;padding-right:4px}.interface-complementary-area{background:#fff;color:#1e1e1e}@media(min-width:600px){.interface-complementary-area{-webkit-overflow-scrolling:touch}}@media(min-width:782px){.interface-complementary-area{width:280px}}.interface-complementary-area .components-panel{border:none;position:relative;z-index:0}.interface-complementary-area .components-panel__header{position:sticky;top:0;z-index:1}.interface-complementary-area .components-panel__header.edit-post-sidebar__panel-tabs{top:48px}@media(min-width:782px){.interface-complementary-area .components-panel__header.edit-post-sidebar__panel-tabs{top:0}}.interface-complementary-area p{margin-top:0}.interface-complementary-area h2,.interface-complementary-area h3{color:#1e1e1e;font-size:13px;margin-bottom:1.5em}.interface-complementary-area hr{border-bottom:1px solid #f0f0f0;border-top:none;margin:1.5em 0}.interface-complementary-area div.components-toolbar,.interface-complementary-area div.components-toolbar-group{box-shadow:none;margin-bottom:1.5em}.interface-complementary-area div.components-toolbar-group:last-child,.interface-complementary-area div.components-toolbar:last-child{margin-bottom:0}.interface-complementary-area .block-editor-skip-to-selected-block:focus{bottom:10px;left:auto;right:10px;top:auto}@media(min-width:782px){body.js.is-fullscreen-mode{height:calc(100% + 32px);margin-top:-32px}body.js.is-fullscreen-mode #adminmenumain,body.js.is-fullscreen-mode #wpadminbar{display:none}body.js.is-fullscreen-mode #wpcontent,body.js.is-fullscreen-mode #wpfooter{margin-left:0}}html.interface-interface-skeleton__html-container{position:fixed;width:100%}@media(min-width:782px){html.interface-interface-skeleton__html-container{position:static;width:auto}}.interface-interface-skeleton{bottom:0;display:flex;flex-direction:row;height:auto;max-height:100%;position:fixed;right:0;top:46px}@media(min-width:783px){.interface-interface-skeleton{top:32px}.is-fullscreen-mode .interface-interface-skeleton{top:0}}.interface-interface-skeleton__editor{display:flex;flex:0 1 100%;flex-direction:column;overflow:hidden}.interface-interface-skeleton{left:0}@media(min-width:783px){.interface-interface-skeleton{left:160px}.auto-fold .interface-interface-skeleton{left:36px}}@media(min-width:961px){.auto-fold .interface-interface-skeleton{left:160px}}.folded .interface-interface-skeleton{left:0}@media(min-width:783px){.folded .interface-interface-skeleton{left:36px}}body.is-fullscreen-mode .interface-interface-skeleton{left:0!important}.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{background:#fff;bottom:0;color:#1e1e1e;display:block;flex-shrink:0;left:0;position:absolute;right:0;top:0;z-index:100000}@media(min-width:782px){.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{position:relative!important;width:auto;z-index:90}}.interface-interface-skeleton__sidebar{overflow:auto}@media(min-width:782px){.interface-interface-skeleton__sidebar{border-left:1px solid #e0e0e0}.interface-interface-skeleton__secondary-sidebar{border-right:1px solid #e0e0e0}}.interface-interface-skeleton__header{border-bottom:1px solid #e0e0e0;color:#1e1e1e;flex-shrink:0;height:auto;z-index:30}.interface-interface-skeleton__footer{background-color:#fff;border-top:1px solid #e0e0e0;bottom:0;color:#1e1e1e;display:none;flex-shrink:0;height:auto;left:0;position:absolute;width:100%;z-index:90}@media(min-width:782px){.interface-interface-skeleton__footer{display:flex}}.interface-interface-skeleton__footer .block-editor-block-breadcrumb{align-items:center;background:#fff;display:flex;font-size:13px;height:24px;padding:0 18px;z-index:30}.interface-interface-skeleton__actions{bottom:auto;color:#1e1e1e;left:auto;position:fixed!important;right:0;top:-9999em;width:280px;z-index:100000}.interface-interface-skeleton__actions:focus{bottom:0;top:auto}.interface-more-menu-dropdown{margin-left:-4px}.interface-more-menu-dropdown .components-button{padding:0 2px;width:auto}@media(min-width:600px){.interface-more-menu-dropdown{margin-left:0}.interface-more-menu-dropdown .components-button{padding:0 4px}}.interface-more-menu-dropdown__content .components-popover__content{min-width:280px}@media(min-width:480px){.interface-more-menu-dropdown__content .components-popover__content{max-width:480px;width:auto}}.interface-more-menu-dropdown__content .components-popover__content .components-dropdown-menu__menu{padding:0}.components-popover.interface-more-menu-dropdown__content{z-index:99998}.interface-pinned-items{display:flex}.interface-pinned-items .components-button:not(:first-child){display:none}@media(min-width:600px){.interface-pinned-items .components-button:not(:first-child){display:flex}}.interface-pinned-items .components-button{margin-left:4px}.interface-pinned-items .components-button svg{max-height:24px;max-width:24px}html.wp-toolbar{background:#fff}#wpbody-content>.notice,#wpfooter,.jp-search-configure-sidebar .components-button.interface-complementary-area__pin-unpin-item{display:none}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color--rgb:0,133,186;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-10--rgb:0,115,161;--wp-admin-theme-color-darker-20:#006187;--wp-admin-theme-color-darker-20--rgb:0,97,135;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-light{--wp-admin-border-width-focus:1.5px}}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color--rgb:56,88,233;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-10--rgb:33,69,230;--wp-admin-theme-color-darker-20:#183ad6;--wp-admin-theme-color-darker-20--rgb:24,58,214;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-modern{--wp-admin-border-width-focus:1.5px}}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color--rgb:9,100,132;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-10--rgb:7,82,108;--wp-admin-theme-color-darker-20:#064054;--wp-admin-theme-color-darker-20--rgb:6,64,84;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-blue{--wp-admin-border-width-focus:1.5px}}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color--rgb:70,64,60;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-10--rgb:56,51,48;--wp-admin-theme-color-darker-20:#2b2724;--wp-admin-theme-color-darker-20--rgb:43,39,36;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-coffee{--wp-admin-border-width-focus:1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color--rgb:82,63,109;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-10--rgb:70,54,93;--wp-admin-theme-color-darker-20:#3a2c4d;--wp-admin-theme-color-darker-20--rgb:58,44,77;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus:1.5px}}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color--rgb:225,77,67;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-10--rgb:221,56,45;--wp-admin-theme-color-darker-20:#d02c21;--wp-admin-theme-color-darker-20--rgb:208,44,33;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-midnight{--wp-admin-border-width-focus:1.5px}}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color--rgb:98,124,131;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-10--rgb:87,110,116;--wp-admin-theme-color-darker-20:#4c6066;--wp-admin-theme-color-darker-20--rgb:76,96,102;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-ocean{--wp-admin-border-width-focus:1.5px}}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color--rgb:221,130,59;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-10--rgb:217,116,38;--wp-admin-theme-color-darker-20:#c36922;--wp-admin-theme-color-darker-20--rgb:195,105,34;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus:1.5px}}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.js new file mode 100644 index 00000000..d714398b --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.js @@ -0,0 +1,25 @@ +/*! For license information please see jp-search-configure.js.LICENSE.txt */ +!function(){var e={8294:function(e){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},2402:function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},1074:function(e,t,r){"use strict";var n=r(9307);t.Z=function(e){let{icon:t,size:r=24,...s}=e;return(0,n.cloneElement)(t,{width:r,height:r,...s})}},4718:function(e,t,r){"use strict";var n=r(9307),s=r(444);const o=(0,n.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(s.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));t.Z=o},5022:function(e,t,r){"use strict";var n=r(9307),s=r(444);const o=(0,n.createElement)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(s.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"}));t.Z=o},5235:function(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var i=s.apply(null,r);i&&e.push(i)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var a in r)n.call(r,a)&&r[a]&&e.push(a);else e.push(r.toString())}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(r=function(){return s}.apply(t,[]))||(e.exports=r)}()},6198:function(e,t,r){var n=r(1210),s=r(5006),o=r(7232),i=n.TypeError;e.exports=function(e){if(s(e))return e;throw i(o(e)+" is not a function")}},1938:function(e,t,r){var n=r(1210),s=r(5006),o=n.String,i=n.TypeError;e.exports=function(e){if("object"==typeof e||s(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},8987:function(e,t,r){var n=r(8875),s=r(42),o=r(2016),i=n("unscopables"),a=Array.prototype;null==a[i]&&o.f(a,i,{configurable:!0,value:s(null)}),e.exports=function(e){a[i][e]=!0}},3794:function(e,t,r){var n=r(1210),s=r(2702),o=n.String,i=n.TypeError;e.exports=function(e){if(s(e))return e;throw i(o(e)+" is not an object")}},8845:function(e,t,r){var n=r(4929),s=r(645),o=r(5570),i=function(e){return function(t,r,i){var a,c=n(t),l=o(c),u=s(i,l);if(e&&r!=r){for(;l>u;)if((a=c[u++])!=a)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===r)return e||u||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},237:function(e,t,r){var n=r(3715),s=n({}.toString),o=n("".slice);e.exports=function(e){return o(s(e),8,-1)}},5996:function(e,t,r){var n=r(1210),s=r(5165),o=r(5006),i=r(237),a=r(8875)("toStringTag"),c=n.Object,l="Arguments"==i(function(){return arguments}());e.exports=s?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=c(e),a))?r:l?i(t):"Object"==(n=i(t))&&o(t.callee)?"Arguments":n}},7398:function(e,t,r){var n=r(3715),s=Error,o=n("".replace),i=String(s("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,c=a.test(i);e.exports=function(e,t){if(c&&"string"==typeof e&&!s.prepareStackTrace)for(;t--;)e=o(e,a,"");return e}},1184:function(e,t,r){var n=r(4242),s=r(3496),o=r(4225),i=r(2016);e.exports=function(e,t,r){for(var a=s(t),c=i.f,l=o.f,u=0;u<a.length;u++){var p=a[u];n(e,p)||r&&n(r,p)||c(e,p,l(t,p))}}},5506:function(e,t,r){var n=r(7778),s=r(2016),o=r(9487);e.exports=n?function(e,t,r){return s.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},9487:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},1568:function(e,t,r){var n=r(1210),s=r(5006),o=r(5506),i=r(6717),a=r(3071);e.exports=function(e,t,r,c){var l=!!c&&!!c.unsafe,u=!!c&&!!c.enumerable,p=!!c&&!!c.noTargetGet,h=c&&void 0!==c.name?c.name:t;return s(r)&&i(r,h,c),e===n?(u?e[t]=r:a(t,r),e):(l?!p&&e[t]&&(u=!0):delete e[t],u?e[t]=r:o(e,t,r),e)}},7778:function(e,t,r){var n=r(4258);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4716:function(e,t,r){var n=r(1210),s=r(2702),o=n.document,i=s(o)&&s(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},1455:function(e,t,r){var n=r(2265);e.exports=n("navigator","userAgent")||""},6475:function(e,t,r){var n,s,o=r(1210),i=r(1455),a=o.process,c=o.Deno,l=a&&a.versions||c&&c.version,u=l&&l.v8;u&&(s=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!s&&i&&(!(n=i.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=i.match(/Chrome\/(\d+)/))&&(s=+n[1]),e.exports=s},9864:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1500:function(e,t,r){var n=r(4258),s=r(9487);e.exports=!n((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",s(1,7)),7!==e.stack)}))},8657:function(e,t,r){var n=r(1210),s=r(4225).f,o=r(5506),i=r(1568),a=r(3071),c=r(1184),l=r(9656);e.exports=function(e,t){var r,u,p,h,d,f=e.target,m=e.global,g=e.stat;if(r=m?n:g?n[f]||a(f,{}):(n[f]||{}).prototype)for(u in t){if(h=t[u],p=e.noTargetGet?(d=s(r,u))&&d.value:r[u],!l(m?u:f+(g?".":"#")+u,e.forced)&&void 0!==p){if(typeof h==typeof p)continue;c(h,p)}(e.sham||p&&p.sham)&&o(h,"sham",!0),i(r,u,h,e)}}},4258:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},9115:function(e,t,r){var n=r(5200),s=Function.prototype,o=s.apply,i=s.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?i.bind(o):function(){return i.apply(o,arguments)})},5200:function(e,t,r){var n=r(4258);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},4264:function(e,t,r){var n=r(5200),s=Function.prototype.call;e.exports=n?s.bind(s):function(){return s.apply(s,arguments)}},232:function(e,t,r){var n=r(7778),s=r(4242),o=Function.prototype,i=n&&Object.getOwnPropertyDescriptor,a=s(o,"name"),c=a&&"something"===function(){}.name,l=a&&(!n||n&&i(o,"name").configurable);e.exports={EXISTS:a,PROPER:c,CONFIGURABLE:l}},3715:function(e,t,r){var n=r(5200),s=Function.prototype,o=s.bind,i=s.call,a=n&&o.bind(i,i);e.exports=n?function(e){return e&&a(e)}:function(e){return e&&function(){return i.apply(e,arguments)}}},2265:function(e,t,r){var n=r(1210),s=r(5006),o=function(e){return s(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(n[e]):n[e]&&n[e][t]}},9722:function(e,t,r){var n=r(6198);e.exports=function(e,t){var r=e[t];return null==r?void 0:n(r)}},1210:function(e){var t=function(e){return e&&e.Math==Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof window&&window)||function(){return this}()||Function("return this")()},4242:function(e,t,r){var n=r(3715),s=r(2103),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(s(e),t)}},3953:function(e){e.exports={}},2872:function(e,t,r){var n=r(2265);e.exports=n("document","documentElement")},4165:function(e,t,r){var n=r(7778),s=r(4258),o=r(4716);e.exports=!n&&!s((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},600:function(e,t,r){var n=r(1210),s=r(3715),o=r(4258),i=r(237),a=n.Object,c=s("".split);e.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?c(e,""):a(e)}:a},8088:function(e,t,r){var n=r(5006),s=r(2702),o=r(2025);e.exports=function(e,t,r){var i,a;return o&&n(i=t.constructor)&&i!==r&&s(a=i.prototype)&&a!==r.prototype&&o(e,a),e}},3667:function(e,t,r){var n=r(3715),s=r(5006),o=r(4434),i=n(Function.toString);s(o.inspectSource)||(o.inspectSource=function(e){return i(e)}),e.exports=o.inspectSource},7793:function(e,t,r){var n=r(2702),s=r(5506);e.exports=function(e,t){n(t)&&"cause"in t&&s(e,"cause",t.cause)}},2406:function(e,t,r){var n,s,o,i=r(4564),a=r(1210),c=r(3715),l=r(2702),u=r(5506),p=r(4242),h=r(4434),d=r(9116),f=r(3953),m="Object already initialized",g=a.TypeError,v=a.WeakMap;if(i||h.state){var y=h.state||(h.state=new v),_=c(y.get),b=c(y.has),E=c(y.set);n=function(e,t){if(b(y,e))throw new g(m);return t.facade=e,E(y,e,t),t},s=function(e){return _(y,e)||{}},o=function(e){return b(y,e)}}else{var w=d("state");f[w]=!0,n=function(e,t){if(p(e,w))throw new g(m);return t.facade=e,u(e,w,t),t},s=function(e){return p(e,w)?e[w]:{}},o=function(e){return p(e,w)}}e.exports={set:n,get:s,has:o,enforce:function(e){return o(e)?s(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!l(t)||(r=s(t)).type!==e)throw g("Incompatible receiver, "+e+" required");return r}}}},5006:function(e){e.exports=function(e){return"function"==typeof e}},9656:function(e,t,r){var n=r(4258),s=r(5006),o=/#|\.prototype\./,i=function(e,t){var r=c[a(e)];return r==u||r!=l&&(s(t)?n(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=i.data={},l=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},2702:function(e,t,r){var n=r(5006);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},4832:function(e){e.exports=!1},664:function(e,t,r){var n=r(1210),s=r(2265),o=r(5006),i=r(3387),a=r(8264),c=n.Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=s("Symbol");return o(t)&&i(t.prototype,c(e))}},5570:function(e,t,r){var n=r(8464);e.exports=function(e){return n(e.length)}},6717:function(e,t,r){var n=r(4258),s=r(5006),o=r(4242),i=r(2016).f,a=r(232).CONFIGURABLE,c=r(3667),l=r(2406),u=l.enforce,p=l.get,h=!n((function(){return 8!==i((function(){}),"length",{value:8}).length})),d=String(String).split("String"),f=e.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!o(e,"name")||a&&e.name!==t)&&i(e,"name",{value:t,configurable:!0}),h&&r&&o(r,"arity")&&e.length!==r.arity&&i(e,"length",{value:r.arity});var n=u(e);return o(n,"source")||(n.source=d.join("string"==typeof t?t:"")),e};Function.prototype.toString=f((function(){return s(this)&&p(this).source||c(this)}),"toString")},9868:function(e,t,r){var n=r(6475),s=r(4258);e.exports=!!Object.getOwnPropertySymbols&&!s((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},4564:function(e,t,r){var n=r(1210),s=r(5006),o=r(3667),i=n.WeakMap;e.exports=s(i)&&/native code/.test(o(i))},1377:function(e,t,r){var n=r(2910);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},42:function(e,t,r){var n,s=r(3794),o=r(3238),i=r(9864),a=r(3953),c=r(2872),l=r(4716),u=r(9116),p=u("IE_PROTO"),h=function(){},d=function(e){return"<script>"+e+"</"+"script>"},f=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t;m="undefined"!=typeof document?document.domain&&n?f(n):((t=l("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):f(n);for(var r=i.length;r--;)delete m.prototype[i[r]];return m()};a[p]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(h.prototype=s(e),r=new h,h.prototype=null,r[p]=e):r=m(),void 0===t?r:o.f(r,t)}},3238:function(e,t,r){var n=r(7778),s=r(2879),o=r(2016),i=r(3794),a=r(4929),c=r(5321);t.f=n&&!s?Object.defineProperties:function(e,t){i(e);for(var r,n=a(t),s=c(t),l=s.length,u=0;l>u;)o.f(e,r=s[u++],n[r]);return e}},2016:function(e,t,r){var n=r(1210),s=r(7778),o=r(4165),i=r(2879),a=r(3794),c=r(8901),l=n.TypeError,u=Object.defineProperty,p=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",f="writable";t.f=s?i?function(e,t,r){if(a(e),t=c(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&f in r&&!r.writable){var n=p(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:d in r?r.configurable:n.configurable,enumerable:h in r?r.enumerable:n.enumerable,writable:!1})}return u(e,t,r)}:u:function(e,t,r){if(a(e),t=c(t),a(r),o)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw l("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},4225:function(e,t,r){var n=r(7778),s=r(4264),o=r(9532),i=r(9487),a=r(4929),c=r(8901),l=r(4242),u=r(4165),p=Object.getOwnPropertyDescriptor;t.f=n?p:function(e,t){if(e=a(e),t=c(t),u)try{return p(e,t)}catch(e){}if(l(e,t))return i(!s(o.f,e,t),e[t])}},6112:function(e,t,r){var n=r(6166),s=r(9864).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,s)}},5603:function(e,t){t.f=Object.getOwnPropertySymbols},3387:function(e,t,r){var n=r(3715);e.exports=n({}.isPrototypeOf)},6166:function(e,t,r){var n=r(3715),s=r(4242),o=r(4929),i=r(8845).indexOf,a=r(3953),c=n([].push);e.exports=function(e,t){var r,n=o(e),l=0,u=[];for(r in n)!s(a,r)&&s(n,r)&&c(u,r);for(;t.length>l;)s(n,r=t[l++])&&(~i(u,r)||c(u,r));return u}},5321:function(e,t,r){var n=r(6166),s=r(9864);e.exports=Object.keys||function(e){return n(e,s)}},9532:function(e,t){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,s=n&&!r.call({1:2},1);t.f=s?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},2025:function(e,t,r){var n=r(3715),s=r(3794),o=r(1938);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return s(r),o(n),t?e(r,n):r.__proto__=n,r}}():void 0)},896:function(e,t,r){var n=r(1210),s=r(4264),o=r(5006),i=r(2702),a=n.TypeError;e.exports=function(e,t){var r,n;if("string"===t&&o(r=e.toString)&&!i(n=s(r,e)))return n;if(o(r=e.valueOf)&&!i(n=s(r,e)))return n;if("string"!==t&&o(r=e.toString)&&!i(n=s(r,e)))return n;throw a("Can't convert object to primitive value")}},3496:function(e,t,r){var n=r(2265),s=r(3715),o=r(6112),i=r(5603),a=r(3794),c=s([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(a(e)),r=i.f;return r?c(t,r(e)):t}},9780:function(e,t,r){var n=r(2016).f;e.exports=function(e,t,r){r in e||n(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})}},5262:function(e,t,r){var n=r(1210).TypeError;e.exports=function(e){if(null==e)throw n("Can't call method on "+e);return e}},3071:function(e,t,r){var n=r(1210),s=Object.defineProperty;e.exports=function(e,t){try{s(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},9116:function(e,t,r){var n=r(1843),s=r(3705),o=n("keys");e.exports=function(e){return o[e]||(o[e]=s(e))}},4434:function(e,t,r){var n=r(1210),s=r(3071),o="__core-js_shared__",i=n[o]||s(o,{});e.exports=i},1843:function(e,t,r){var n=r(4832),s=r(4434);(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.4",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE",source:"https://github.com/zloirock/core-js"})},645:function(e,t,r){var n=r(8249),s=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?s(r+t,0):o(r,t)}},4929:function(e,t,r){var n=r(600),s=r(5262);e.exports=function(e){return n(s(e))}},8249:function(e){var t=Math.ceil,r=Math.floor;e.exports=function(e){var n=+e;return n!=n||0===n?0:(n>0?r:t)(n)}},8464:function(e,t,r){var n=r(8249),s=Math.min;e.exports=function(e){return e>0?s(n(e),9007199254740991):0}},2103:function(e,t,r){var n=r(1210),s=r(5262),o=n.Object;e.exports=function(e){return o(s(e))}},357:function(e,t,r){var n=r(1210),s=r(4264),o=r(2702),i=r(664),a=r(9722),c=r(896),l=r(8875),u=n.TypeError,p=l("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var r,n=a(e,p);if(n){if(void 0===t&&(t="default"),r=s(n,e,t),!o(r)||i(r))return r;throw u("Can't convert object to primitive value")}return void 0===t&&(t="number"),c(e,t)}},8901:function(e,t,r){var n=r(357),s=r(664);e.exports=function(e){var t=n(e,"string");return s(t)?t:t+""}},5165:function(e,t,r){var n={};n[r(8875)("toStringTag")]="z",e.exports="[object z]"===String(n)},2910:function(e,t,r){var n=r(1210),s=r(5996),o=n.String;e.exports=function(e){if("Symbol"===s(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},7232:function(e,t,r){var n=r(1210).String;e.exports=function(e){try{return n(e)}catch(e){return"Object"}}},3705:function(e,t,r){var n=r(3715),s=0,o=Math.random(),i=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++s+o,36)}},8264:function(e,t,r){var n=r(9868);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},2879:function(e,t,r){var n=r(7778),s=r(4258);e.exports=n&&s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8875:function(e,t,r){var n=r(1210),s=r(1843),o=r(4242),i=r(3705),a=r(9868),c=r(8264),l=s("wks"),u=n.Symbol,p=u&&u.for,h=c?u:u&&u.withoutSetter||i;e.exports=function(e){if(!o(l,e)||!a&&"string"!=typeof l[e]){var t="Symbol."+e;a&&o(u,e)?l[e]=u[e]:l[e]=c&&p?p(t):h(t)}return l[e]}},6266:function(e,t,r){"use strict";var n=r(2265),s=r(4242),o=r(5506),i=r(3387),a=r(2025),c=r(1184),l=r(9780),u=r(8088),p=r(1377),h=r(7793),d=r(7398),f=r(1500),m=r(7778),g=r(4832);e.exports=function(e,t,r,v){var y="stackTraceLimit",_=v?2:1,b=e.split("."),E=b[b.length-1],w=n.apply(null,b);if(w){var k=w.prototype;if(!g&&s(k,"cause")&&delete k.cause,!r)return w;var S=n("Error"),j=t((function(e,t){var r=p(v?t:e,void 0),n=v?new w(e):new w;return void 0!==r&&o(n,"message",r),f&&o(n,"stack",d(n.stack,2)),this&&i(k,this)&&u(n,this,j),arguments.length>_&&h(n,arguments[_]),n}));if(j.prototype=k,"Error"!==E?a?a(j,S):c(j,S,{name:!0}):m&&y in w&&(l(j,w,y),l(j,w,"prepareStackTrace")),c(j,w),!g)try{k.name!==E&&o(k,"name",E),k.constructor=j}catch(e){}return j}}},3679:function(e,t,r){"use strict";var n=r(8657),s=r(8845).includes,o=r(4258),i=r(8987);n({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return s(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},875:function(e,t,r){var n=r(8657),s=r(1210),o=r(9115),i=r(6266),a="WebAssembly",c=s.WebAssembly,l=7!==Error("e",{cause:7}).cause,u=function(e,t){var r={};r[e]=i(e,t,l),n({global:!0,arity:1,forced:l},r)},p=function(e,t){if(c&&c[e]){var r={};r[e]=i("WebAssembly."+e,t,l),n({target:a,stat:!0,arity:1,forced:l},r)}};u("Error",(function(e){return function(t){return o(e,this,arguments)}})),u("EvalError",(function(e){return function(t){return o(e,this,arguments)}})),u("RangeError",(function(e){return function(t){return o(e,this,arguments)}})),u("ReferenceError",(function(e){return function(t){return o(e,this,arguments)}})),u("SyntaxError",(function(e){return function(t){return o(e,this,arguments)}})),u("TypeError",(function(e){return function(t){return o(e,this,arguments)}})),u("URIError",(function(e){return function(t){return o(e,this,arguments)}})),p("CompileError",(function(e){return function(t){return o(e,this,arguments)}})),p("LinkError",(function(e){return function(t){return o(e,this,arguments)}})),p("RuntimeError",(function(e){return function(t){return o(e,this,arguments)}}))},4273:function(e){!function(){"use strict";var t=[],r=3988292384;function n(e){var t,n,s,o,i=-1;for(t=0,s=e.length;t<s;t+=1){for(o=255&(i^e[t]),n=0;n<8;n+=1)1==(1&o)?o=o>>>1^r:o>>>=1;i=i>>>8^o}return-1^i}function s(e,r){var n,o,i;if(void 0!==s.crc&&r&&e||(s.crc=-1,e)){for(n=s.crc,o=0,i=e.length;o<i;o+=1)n=n>>>8^t[255&(n^e[o])];return s.crc=n,-1^n}}!function(){var e,n,s;for(n=0;n<256;n+=1){for(e=n,s=0;s<8;s+=1)1&e?e=r^e>>>1:e>>>=1;t[n]=e>>>0}}(),e.exports=function(e,t){var r;e="string"==typeof e?(r=e,Array.prototype.map.call(r,(function(e){return e.charCodeAt(0)}))):e;return((t?n(e):s(e))>>>0).toString(16)},e.exports.direct=n,e.exports.table=s}()},7390:function(e){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,s=t.cmp&&(r=t.cmp,function(e){return function(t,n){var s={key:t,value:e[t]},o={key:n,value:e[n]};return r(s,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,i;if(Array.isArray(t)){for(i="[",r=0;r<t.length;r++)r&&(i+=","),i+=e(t[r])||"null";return i+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var a=o.push(t)-1,c=Object.keys(t).sort(s&&s(t));for(i="",r=0;r<c.length;r++){var l=c[r],u=e(t[l]);u&&(i&&(i+=","),i+=JSON.stringify(l)+":"+u)}return o.splice(a,1),"{"+i+"}"}}(e)}},7692:function(e,t,r){"use strict";var n=r(3801),s={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function c(e){return n.isMemo(e)?i:a[e.$$typeof]||s}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=i;var l=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(f){var s=d(r);s&&s!==f&&e(t,s,n)}var i=u(r);p&&(i=i.concat(p(r)));for(var a=c(t),m=c(r),g=0;g<i.length;++g){var v=i[g];if(!(o[v]||n&&n[v]||m&&m[v]||a&&a[v])){var y=h(r,v);try{l(t,v,y)}catch(e){}}}}return t}},4924:function(e,t,r){var n=r(9159).Symbol;e.exports=n},4729:function(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,s=Array(n);++r<n;)s[r]=t(e[r],r,e);return s}},530:function(e,t,r){var n=r(4924),s=r(8792),o=r(8004),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?s(e):o(e)}},3042:function(e,t,r){var n=r(4924),s=r(4729),o=r(6259),i=r(6260),a=n?n.prototype:void 0,c=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return s(t,e)+"";if(i(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}},9504:function(e,t,r){var n=r(310),s=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(s,""):e}},6150:function(e){var t="object"==typeof window&&window&&window.Object===Object&&window;e.exports=t},8792:function(e,t,r){var n=r(4924),s=Object.prototype,o=s.hasOwnProperty,i=s.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var s=i.call(e);return n&&(t?e[a]=r:delete e[a]),s}},8004:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9159:function(e,t,r){var n=r(6150),s="object"==typeof self&&self&&self.Object===Object&&self,o=n||s||Function("return this")();e.exports=o},310:function(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},3259:function(e,t,r){var n=r(731),s=r(6199),o=r(4934),i=Math.max,a=Math.min;e.exports=function(e,t,r){var c,l,u,p,h,d,f=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=c,n=l;return c=l=void 0,f=t,p=e.apply(n,r)}function _(e){return f=e,h=setTimeout(E,t),m?y(e):p}function b(e){var r=e-d;return void 0===d||r>=t||r<0||g&&e-f>=u}function E(){var e=s();if(b(e))return w(e);h=setTimeout(E,function(e){var r=t-(e-d);return g?a(r,u-(e-f)):r}(e))}function w(e){return h=void 0,v&&c?y(e):(c=l=void 0,p)}function k(){var e=s(),r=b(e);if(c=arguments,l=this,d=e,r){if(void 0===h)return _(d);if(g)return clearTimeout(h),h=setTimeout(E,t),y(d)}return void 0===h&&(h=setTimeout(E,t)),p}return t=o(t)||0,n(r)&&(m=!!r.leading,u=(g="maxWait"in r)?i(o(r.maxWait)||0,t):u,v="trailing"in r?!!r.trailing:v),k.cancel=function(){void 0!==h&&clearTimeout(h),f=0,c=d=l=h=void 0},k.flush=function(){return void 0===h?p:w(s())},k}},6259:function(e){var t=Array.isArray;e.exports=t},731:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},1642:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},6260:function(e,t,r){var n=r(530),s=r(1642);e.exports=function(e){return"symbol"==typeof e||s(e)&&"[object Symbol]"==n(e)}},6199:function(e,t,r){var n=r(9159);e.exports=function(){return n.Date.now()}},4934:function(e,t,r){var n=r(9504),s=r(731),o=r(6260),i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(s(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=s(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=a.test(e);return r||c.test(e)?l(e.slice(2),r?2:8):i.test(e)?NaN:+e}},6700:function(e,t,r){var n=r(3042);e.exports=function(e){return null==e?"":n(e)}},5348:function(e,t,r){var n=r(6700),s=0;e.exports=function(e){var t=++s;return n(e)+t}},3171:function(e){var t=1e3,r=60*t,n=60*r,s=24*n,o=7*s,i=365.25*s;function a(e,t,r,n){var s=t>=1.5*r;return Math.round(e/r)+" "+n+(s?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*s;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var o=Math.abs(e);if(o>=s)return a(e,o,s,"day");if(o>=n)return a(e,o,n,"hour");if(o>=r)return a(e,o,r,"minute");if(o>=t)return a(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=s)return Math.round(e/s)+"d";if(o>=n)return Math.round(e/n)+"h";if(o>=r)return Math.round(e/r)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9424:function(e,t,r){"use strict";r.d(t,{Z:function(){return h}});var n=r(4273),s=r.n(n),o=r(3191),i=r.n(o),a=r(1128),c=r.n(a)()("photon"),l={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},u="__domain__.invalid",p="http://".concat(u);function h(e,t){var r;try{r=new URL(e,p)}catch(e){return null}var n,o,a,h,d,f="https:"===r.protocol,m=new URL("https://i0.wp.com");if(d=r.host,/^i[0-2]\.wp\.com$/.test(d))m.pathname=r.pathname,m.hostname=r.hostname;else{if(r.search)return null;var g=r.href.replace("".concat(r.protocol,"/"),"");"blob:"===r.protocol&&(g=r.pathname.replace("://","//")),r.hostname===u&&(g=r.pathname),m.pathname=g,m.hostname=(n=g,o=s()(n),a=i()(o),h="i"+Math.floor(3*a()),c('determined server "%s" to use with "%s"',h,n),h+".wp.com"),f&&m.searchParams.set("ssl",1)}if(t)for(var v in t)"host"!==v&&"hostname"!==v?"secure"!==v||t[v]?m.searchParams.set(l[v]||v,t[v]):m.protocol="http:":m.hostname=t[v];return c("generated Photon URL: %s",m.href),m.href}},5731:function(e,t){"use strict";var r=Object.prototype,n=r.toString,s=r.hasOwnProperty,o="[object Object]",i="[object Array]";function a(e,t){return null!=e?e+"["+t+"]":t}t.x=function e(t,r,c){var l=n.call(t);if(void 0===c)if(l===o)c={};else{if(l!==i)return;c=[]}for(var u in t)if(s.call(t,u)){var p=t[u];if(null!=p)switch(n.call(p)){case i:case o:e(p,a(r,u),c);break;default:c[a(r,u)]=p}}return c}},8750:function(e,t,r){"use strict";function n(e,t){var r,n,s,o="";for(r in e)if(void 0!==(s=e[r]))if(Array.isArray(s))for(n=0;n<s.length;n++)o&&(o+="&"),o+=encodeURIComponent(r)+"="+encodeURIComponent(s[n]);else o&&(o+="&"),o+=encodeURIComponent(r)+"="+encodeURIComponent(s);return(t||"")+o}r.d(t,{c:function(){return n}})},8922:function(e,t){"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,s=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,f=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case p:case o:case a:case i:case d:return e;default:switch(e=e&&e.$$typeof){case l:case h:case g:case m:case c:return e;default:return t}}case s:return t}}}function w(e){return E(e)===p}t.AsyncMode=u,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=c,t.Element=n,t.ForwardRef=h,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=s,t.Profiler=a,t.StrictMode=i,t.Suspense=d,t.isAsyncMode=function(e){return w(e)||E(e)===u},t.isConcurrentMode=w,t.isContextConsumer=function(e){return E(e)===l},t.isContextProvider=function(e){return E(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return E(e)===h},t.isFragment=function(e){return E(e)===o},t.isLazy=function(e){return E(e)===g},t.isMemo=function(e){return E(e)===m},t.isPortal=function(e){return E(e)===s},t.isProfiler=function(e){return E(e)===a},t.isStrictMode=function(e){return E(e)===i},t.isSuspense=function(e){return E(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===p||e===a||e===i||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===h||e.$$typeof===y||e.$$typeof===_||e.$$typeof===b||e.$$typeof===v)},t.typeOf=E},3801:function(e,t,r){"use strict";e.exports=r(8922)},4223:function(e,t){"use strict";var r=60103,n=60106,s=60107,o=60108,i=60114,a=60109,c=60110,l=60112,u=60113,p=60120,h=60115,d=60116,f=60121,m=60122,g=60117,v=60129,y=60131;if("function"==typeof Symbol&&Symbol.for){var _=Symbol.for;r=_("react.element"),n=_("react.portal"),s=_("react.fragment"),o=_("react.strict_mode"),i=_("react.profiler"),a=_("react.provider"),c=_("react.context"),l=_("react.forward_ref"),u=_("react.suspense"),p=_("react.suspense_list"),h=_("react.memo"),d=_("react.lazy"),f=_("react.block"),m=_("react.server.block"),g=_("react.fundamental"),v=_("react.debug_trace_mode"),y=_("react.legacy_hidden")}function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case s:case i:case o:case u:case p:return e;default:switch(e=e&&e.$$typeof){case c:case l:case d:case h:case a:return e;default:return t}}case n:return t}}}t.isContextConsumer=function(e){return b(e)===c}},1637:function(e,t,r){"use strict";e.exports=r(4223)},373:function(e,t,r){"use strict";r.d(t,{E:function(){return s}});var n=r(9196),s=r.n(n)().createContext(null)},1290:function(e,t,r){"use strict";var n=r(9196),s=r.n(n),o=r(373),i=r(5053),a=r(999);t.Z=function(e){var t=e.store,r=e.context,c=e.children,l=(0,n.useMemo)((function(){var e=(0,i.X)(t);return{store:t,subscription:e}}),[t]),u=(0,n.useMemo)((function(){return t.getState()}),[t]);(0,a.L)((function(){var e=l.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),u!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[l,u]);var p=r||o.E;return s().createElement(p.Provider,{value:l},c)}},5642:function(e,t,r){"use strict";r.d(t,{Z:function(){return w}});var n=r(255),s=r(7921),o=r(7692),i=r.n(o),a=r(9196),c=r.n(a),l=r(1637),u=r(5053),p=r(999),h=r(373),d=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],f=["reactReduxForwardedRef"],m=[],g=[null,null];function v(e,t){var r=e[1];return[t.payload,r+1]}function y(e,t,r){(0,p.L)((function(){return e.apply(void 0,t)}),r)}function _(e,t,r,n,s,o,i){e.current=n,t.current=s,r.current=!1,o.current&&(o.current=null,i())}function b(e,t,r,n,s,o,i,a,c,l){if(e){var u=!1,p=null,h=function(){if(!u){var e,r,h=t.getState();try{e=n(h,s.current)}catch(e){r=e,p=e}r||(p=null),e===o.current?i.current||c():(o.current=e,a.current=e,i.current=!0,l({type:"STORE_UPDATED",payload:{error:r}}))}};r.onStateChange=h,r.trySubscribe(),h();return function(){if(u=!0,r.tryUnsubscribe(),r.onStateChange=null,p)throw p}}}var E=function(){return[null,0]};function w(e,t){void 0===t&&(t={});var r=t,o=r.getDisplayName,p=void 0===o?function(e){return"ConnectAdvanced("+e+")"}:o,w=r.methodName,k=void 0===w?"connectAdvanced":w,S=r.renderCountProp,j=void 0===S?void 0:S,C=r.shouldHandleStateChanges,x=void 0===C||C,O=r.storeKey,P=void 0===O?"store":O,R=(r.withRef,r.forwardRef),T=void 0!==R&&R,N=r.context,F=void 0===N?h.E:N,A=(0,s.Z)(r,d),L=F;return function(t){var r=t.displayName||t.name||"Component",o=p(r),h=(0,n.Z)({},A,{getDisplayName:p,methodName:k,renderCountProp:j,shouldHandleStateChanges:x,storeKey:P,displayName:o,wrappedComponentName:r,WrappedComponent:t}),d=A.pure;var w=d?a.useMemo:function(e){return e()};function S(r){var o=(0,a.useMemo)((function(){var e=r.reactReduxForwardedRef,t=(0,s.Z)(r,f);return[r.context,e,t]}),[r]),i=o[0],p=o[1],d=o[2],k=(0,a.useMemo)((function(){return i&&i.Consumer&&(0,l.isContextConsumer)(c().createElement(i.Consumer,null))?i:L}),[i,L]),S=(0,a.useContext)(k),j=Boolean(r.store)&&Boolean(r.store.getState)&&Boolean(r.store.dispatch);Boolean(S)&&Boolean(S.store);var C=j?r.store:S.store,O=(0,a.useMemo)((function(){return function(t){return e(t.dispatch,h)}(C)}),[C]),P=(0,a.useMemo)((function(){if(!x)return g;var e=(0,u.X)(C,j?null:S.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[C,j,S]),R=P[0],T=P[1],N=(0,a.useMemo)((function(){return j?S:(0,n.Z)({},S,{subscription:R})}),[j,S,R]),F=(0,a.useReducer)(v,m,E),A=F[0][0],Z=F[1];if(A&&A.error)throw A.error;var I=(0,a.useRef)(),M=(0,a.useRef)(d),z=(0,a.useRef)(),$=(0,a.useRef)(!1),H=w((function(){return z.current&&d===M.current?z.current:O(C.getState(),d)}),[C,A,d]);y(_,[M,I,$,d,H,z,T]),y(b,[x,C,R,O,M,I,$,z,T,Z],[C,R,O]);var D=(0,a.useMemo)((function(){return c().createElement(t,(0,n.Z)({},H,{ref:p}))}),[p,t,H]);return(0,a.useMemo)((function(){return x?c().createElement(k.Provider,{value:N},D):D}),[k,D,N])}var C=d?c().memo(S):S;if(C.WrappedComponent=t,C.displayName=S.displayName=o,T){var O=c().forwardRef((function(e,t){return c().createElement(C,(0,n.Z)({},e,{reactReduxForwardedRef:t}))}));return O.displayName=o,O.WrappedComponent=t,i()(O,t)}return i()(C,t)}}},1479:function(e,t,r){"use strict";var n=r(255),s=r(7921),o=r(5642),i=r(8588),a=r(2320),c=r(2004),l=r(4769),u=r(8164),p=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function h(e,t,r){for(var n=t.length-1;n>=0;n--){var s=t[n](e);if(s)return s}return function(t,n){throw new Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+n.wrappedComponentName+".")}}function d(e,t){return e===t}function f(e){var t=void 0===e?{}:e,r=t.connectHOC,f=void 0===r?o.Z:r,m=t.mapStateToPropsFactories,g=void 0===m?c.ZP:m,v=t.mapDispatchToPropsFactories,y=void 0===v?a.ZP:v,_=t.mergePropsFactories,b=void 0===_?l.ZP:_,E=t.selectorFactory,w=void 0===E?u.ZP:E;return function(e,t,r,o){void 0===o&&(o={});var a=o,c=a.pure,l=void 0===c||c,u=a.areStatesEqual,m=void 0===u?d:u,v=a.areOwnPropsEqual,_=void 0===v?i.Z:v,E=a.areStatePropsEqual,k=void 0===E?i.Z:E,S=a.areMergedPropsEqual,j=void 0===S?i.Z:S,C=(0,s.Z)(a,p),x=h(e,g,"mapStateToProps"),O=h(t,y,"mapDispatchToProps"),P=h(r,b,"mergeProps");return f(w,(0,n.Z)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:x,initMapDispatchToProps:O,initMergeProps:P,pure:l,areStatesEqual:m,areOwnPropsEqual:_,areStatePropsEqual:k,areMergedPropsEqual:j},C))}}t.Z=f()},2320:function(e,t,r){"use strict";var n=r(7059),s=r(278);t.ZP=[function(e){return"function"==typeof e?(0,s.xv)(e,"mapDispatchToProps"):void 0},function(e){return e?void 0:(0,s.dX)((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?(0,s.dX)((function(t){return(0,n.Z)(e,t)})):void 0}]},2004:function(e,t,r){"use strict";var n=r(278);t.ZP=[function(e){return"function"==typeof e?(0,n.xv)(e,"mapStateToProps"):void 0},function(e){return e?void 0:(0,n.dX)((function(){return{}}))}]},4769:function(e,t,r){"use strict";var n=r(255);function s(e,t,r){return(0,n.Z)({},r,e,t)}t.ZP=[function(e){return"function"==typeof e?function(e){return function(t,r){r.displayName;var n,s=r.pure,o=r.areMergedPropsEqual,i=!1;return function(t,r,a){var c=e(t,r,a);return i?s&&o(c,n)||(n=c):(i=!0,n=c),n}}}(e):void 0},function(e){return e?void 0:function(){return s}}]},8164:function(e,t,r){"use strict";r.d(t,{ZP:function(){return a}});var n=r(7921),s=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function o(e,t,r,n){return function(s,o){return r(e(s,o),t(n,o),o)}}function i(e,t,r,n,s){var o,i,a,c,l,u=s.areStatesEqual,p=s.areOwnPropsEqual,h=s.areStatePropsEqual,d=!1;function f(s,d){var f,m,g=!p(d,i),v=!u(s,o);return o=s,i=d,g&&v?(a=e(o,i),t.dependsOnOwnProps&&(c=t(n,i)),l=r(a,c,i)):g?(e.dependsOnOwnProps&&(a=e(o,i)),t.dependsOnOwnProps&&(c=t(n,i)),l=r(a,c,i)):v?(f=e(o,i),m=!h(f,a),a=f,m&&(l=r(a,c,i)),l):l}return function(s,u){return d?f(s,u):(a=e(o=s,i=u),c=t(n,i),l=r(a,c,i),d=!0,l)}}function a(e,t){var r=t.initMapStateToProps,a=t.initMapDispatchToProps,c=t.initMergeProps,l=(0,n.Z)(t,s),u=r(e,l),p=a(e,l),h=c(e,l);return(l.pure?i:o)(u,p,h,e,l)}},278:function(e,t,r){"use strict";function n(e){return function(t,r){var n=e(t,r);function s(){return n}return s.dependsOnOwnProps=!1,s}}function s(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function o(e,t){return function(t,r){r.displayName;var n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=s(e);var o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=s(o),o=n(t,r)),o},n}}r.d(t,{dX:function(){return n},xv:function(){return o}})},1654:function(e,t,r){"use strict";r.d(t,{$j:function(){return s.Z},zt:function(){return n.Z}});var n=r(1290),s=(r(5642),r(373),r(1479));r(7518),r(8882),r(6271)},7518:function(e,t,r){"use strict";r(373),r(6271)},2830:function(e,t,r){"use strict";r(9196),r(373)},8882:function(e,t,r){"use strict";r(9196),r(2830),r(5053),r(999),r(373)},6271:function(e,t,r){"use strict";r(9196),r(373),r(2830)},9309:function(e,t,r){"use strict";r.d(t,{$j:function(){return n.$j},zt:function(){return n.zt}});var n=r(1654),s=r(9523);(0,r(2935).F)(s.m)},5053:function(e,t,r){"use strict";r.d(t,{X:function(){return o}});var n=r(2935);var s={notify:function(){},get:function(){return[]}};function o(e,t){var r,o=s;function i(){c.onStateChange&&c.onStateChange()}function a(){var s,a,c;r||(r=t?t.addNestedSub(i):e.subscribe(i),s=(0,n.k)(),a=null,c=null,o={clear:function(){a=null,c=null},notify:function(){s((function(){for(var e=a;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],t=a;t;)e.push(t),t=t.next;return e},subscribe:function(e){var t=!0,r=c={callback:e,next:null,prev:c};return r.prev?r.prev.next=r:a=r,function(){t&&null!==a&&(t=!1,r.next?r.next.prev=r.prev:c=r.prev,r.prev?r.prev.next=r.next:a=r.next)}}})}var c={addNestedSub:function(e){return a(),o.subscribe(e)},notifyNestedSubs:function(){o.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(r)},trySubscribe:a,tryUnsubscribe:function(){r&&(r(),r=void 0,o.clear(),o=s)},getListeners:function(){return o}};return c}},2935:function(e,t,r){"use strict";r.d(t,{F:function(){return s},k:function(){return o}});var n=function(e){e()},s=function(e){return n=e},o=function(){return n}},7059:function(e,t,r){"use strict";function n(e,t){var r={},n=function(n){var s=e[n];"function"==typeof s&&(r[n]=function(){return t(s.apply(void 0,arguments))})};for(var s in e)n(s);return r}r.d(t,{Z:function(){return n}})},9523:function(e,t,r){"use strict";r.d(t,{m:function(){return n.unstable_batchedUpdates}});var n=r(1850)},8588:function(e,t,r){"use strict";function n(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function s(e,t){if(n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;for(var o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(t,r[o])||!n(e[r[o]],t[r[o]]))return!1;return!0}r.d(t,{Z:function(){return s}})},999:function(e,t,r){"use strict";r.d(t,{L:function(){return s}});var n=r(9196),s="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?n.useLayoutEffect:n.useEffect},835:function(e,t,r){"use strict";r.d(t,{MT:function(){return l},UY:function(){return u},md:function(){return h}});var n=r(8617);function s(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var o="function"==typeof Symbol&&Symbol.observable||"@@observable",i=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function c(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function l(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(s(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(s(1));return r(l)(e,t)}if("function"!=typeof e)throw new Error(s(2));var i=e,u=t,p=[],h=p,d=!1;function f(){h===p&&(h=p.slice())}function m(){if(d)throw new Error(s(3));return u}function g(e){if("function"!=typeof e)throw new Error(s(4));if(d)throw new Error(s(5));var t=!0;return f(),h.push(e),function(){if(t){if(d)throw new Error(s(6));t=!1,f();var r=h.indexOf(e);h.splice(r,1),p=null}}}function v(e){if(!c(e))throw new Error(s(7));if(void 0===e.type)throw new Error(s(8));if(d)throw new Error(s(9));try{d=!0,u=i(u,e)}finally{d=!1}for(var t=p=h,r=0;r<t.length;r++){(0,t[r])()}return e}function y(e){if("function"!=typeof e)throw new Error(s(10));i=e,v({type:a.REPLACE})}function _(){var e,t=g;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(s(11));function r(){e.next&&e.next(m())}return r(),{unsubscribe:t(r)}}})[o]=function(){return this},e}return v({type:a.INIT}),(n={dispatch:v,subscribe:g,getState:m,replaceReducer:y})[o]=_,n}function u(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var o=t[n];0,"function"==typeof e[o]&&(r[o]=e[o])}var i,c=Object.keys(r);try{!function(e){Object.keys(e).forEach((function(t){var r=e[t];if(void 0===r(void 0,{type:a.INIT}))throw new Error(s(12));if(void 0===r(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error(s(13))}))}(r)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var n=!1,o={},a=0;a<c.length;a++){var l=c[a],u=r[l],p=e[l],h=u(p,t);if(void 0===h){t&&t.type;throw new Error(s(14))}o[l]=h,n=n||h!==p}return(n=n||c.length!==Object.keys(e).length)?o:e}}function p(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function h(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),o=function(){throw new Error(s(15))},i={getState:r.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map((function(e){return e(i)}));return o=p.apply(void 0,a)(r.dispatch),(0,n.Z)((0,n.Z)({},r),{},{dispatch:o})}}}},4274:function(e){"use strict";function t(e,r){var n;if(Array.isArray(r))for(n=0;n<r.length;n++)t(e,r[n]);else for(n in r)e[n]=(e[n]||[]).concat(r[n])}e.exports=function(e){var r,n={};return t(n,e),(r=function(e){return function(t){return function(r){var s,o,i=n[r.type],a=t(r);if(i)for(s=0;s<i.length;s++)(o=i[s](r,e))&&e.dispatch(o);return a}}}).effects=n,r}},3191:function(e){"use strict";var t=256,r=[],n=window,s=Math.pow(t,6),o=Math.pow(2,52),i=2*o,a=255,c=Math.random;function l(e){var r,n=e.length,s=this,o=0,i=s.i=s.j=0,c=s.S=[];for(n||(e=[n++]);o<t;)c[o]=o++;for(o=0;o<t;o++)c[o]=c[i=a&i+e[o%n]+(r=c[o])],c[i]=r;(s.g=function(e){for(var r,n=0,o=s.i,i=s.j,c=s.S;e--;)r=c[o=a&o+1],n=n*t+c[a&(c[o]=c[i=a&i+r])+(c[i]=r)];return s.i=o,s.j=i,n})(t)}function u(e,t){var r,n=[],s=(typeof e)[0];if(t&&"o"==s)for(r in e)try{n.push(u(e[r],t-1))}catch(e){}return n.length?n:"s"==s?e:e+"\0"}function p(e,t){for(var r,n=e+"",s=0;s<n.length;)t[a&s]=a&(r^=19*t[a&s])+n.charCodeAt(s++);return d(t)}function h(e){try{return n.crypto.getRandomValues(e=new Uint8Array(t)),d(e)}catch(e){return[+new Date,n,n.navigator&&n.navigator.plugins,n.screen,d(r)]}}function d(e){return String.fromCharCode.apply(0,e)}e.exports=function(n,a){if(a&&!0===a.global)return a.global=!1,Math.random=e.exports(n,a),a.global=!0,Math.random;var c=a&&a.entropy||!1,f=[],m=(p(u(c?[n,d(r)]:0 in arguments?n:h(),3),f),new l(f));return p(d(m.S),r),function(){for(var e=m.g(6),r=s,n=0;e<o;)e=(e+n)*t,r*=t,n=m.g(1);for(;e>=i;)e/=2,r/=2,n>>>=1;return(e+n)/r}},e.exports.resetGlobal=function(){Math.random=c},p(Math.random(),r)},4553:function(e){var t=/<\/?([a-z][a-z0-9]*)\b[^>]*>?/gi;e.exports=function(e){return(e=e||"").replace(t,"").trim()}},4043:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n=r(2402),s=r.n(n),o=r(9309),i=r(2819),a=r(5736),c=r(5652),l=r(9379),u=r(5476),p=r(9755),h=r(2160),d=r(9351),f=r(3939);const __=a.__;r.p=window.JetpackInstantSearchOptions.webpackPublicPath;const m={aggregations:(0,u.a5)([...window[p.W1].widgets,...window[p.W1].widgetsOutsideOverlay]),defaultSort:window[p.W1].defaultSort,hasOverlayWidgets:!!window[p.W1].hasOverlayWidgets,options:window[p.W1],themeOptions:(0,h.C)(window[p.W1])};function g(){const{color:e,excludedPostTypes:t,infiniteScroll:r,resultFormat:n,showLogo:a,sort:u,sortEnabled:h,theme:g,trigger:v}=(0,f.Z)(),y={...window[p.W1].overlayOptions,...(0,i.pickBy)({colorTheme:g,defaultSort:u,enableInfScroll:r,enableSort:h,excludedPostTypes:t,highlightColor:e,overlayTrigger:v,resultFormat:n,showPoweredBy:a},(e=>void 0!==e))},{isLoading:_}=(0,d.Z)();return React.createElement("div",{ +/* translators: accessibility text for the widgets screen content landmark region. */ +"aria-label":__("Jetpack Search customization preview","jetpack-search-pkg"),className:"jp-search-configure-app-wrapper",role:"region",tabIndex:"-1"},_?React.createElement("img",{className:"jp-search-configure-loading-spinner",width:"32",height:"32",alt:__("Loading","jetpack-search-pkg"),src:"//en.wordpress.com/i/loading/loading-64.gif"}):React.createElement(o.zt,{store:l.Z},React.createElement(c.Z,s()({},m,{enableAnalytics:!1,initialIsVisible:!0,initialShowResults:!0,isInCustomizer:!1,overlayOptions:y,shouldCreatePortal:!1,shouldIntegrateWithDom:!1}))))}},5356:function(e,t,r){"use strict";var n=r(5609),s=r(5736),o=r(1074),i=r(4718),a=r(8807);const __=s.__;t.Z=function(e){let{enableSidebar:t}=e; +// translators: Product name 'Jetpack Search' should not be translated +const r=__("Customize Jetpack Search","jetpack-search-pkg");return React.createElement("div",{className:"jp-search-configure-header"},React.createElement("div",{className:"jp-search-configure-header__navigable-toolbar-wrapper"},React.createElement("h1",{className:"jp-search-configure-header__title"},r)),React.createElement("div",{className:"jp-search-configure-header__actions"},React.createElement(a.Z,null),React.createElement(n.Button,{"aria-label":__("Show settings","jetpack-search-pkg"),className:"jp-search-configure-header__show-settings-button",variant:"secondary",onClick:()=>t()},React.createElement(o.Z,{icon:i.Z}))))}},5564:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(9307),s=r(9818),o=r(162),i=r(9755),a=r(5275),c=r(2463),l=r(9549);function u(){const{isLargeViewport:e}=(0,s.useSelect)((e=>({isLargeViewport:e(o.store).isViewportMatch("large")}))),[t,r]=(0,n.useState)(c.E),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.E;return r(e)};return(0,n.useEffect)((()=>{(0,a.j2)(),(0,a.AM)(window[i.W1].siteId),(0,a.Ny)(`${a.q0}_page_view`)}),[]),(0,n.useEffect)((()=>{e&&null===t&&u()}),[t,e]),React.createElement("div",{className:"jp-search-configure-root"},React.createElement(l.Z,{disableSidebar:()=>r(null),enabledSidebarName:t,enableSidebar:u}))}},9549:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(5736),s=r(4043),o=r(5356),i=r(3515);const __=n.__;function a(e){const{enabledSidebarName:t,enableSidebar:r,disableSidebar:n}=e;return React.createElement("div",{className:"interface-interface-skeleton"},React.createElement("div",{className:"interface-interface-skeleton__editor"},React.createElement("div",{ +/* translators: accessibility text for the widgets screen top bar landmark region. */ +"aria-label":__("Jetpack Search customization top bar","jetpack-search-pkg"),className:"interface-interface-skeleton__header",role:"region",tabIndex:"-1"},React.createElement(o.Z,{enableSidebar:r})),React.createElement("div",{className:"jp-search-configure-layout__body"},React.createElement(s.Z,null),!!t&&React.createElement("div",{ +/* translators: accessibility text for the widgets screen settings landmark region. */ +"aria-label":__("Jetpack Search customization settings","jetpack-search-pkg"),className:"interface-interface-skeleton__sidebar",role:"region",tabIndex:"-1"},React.createElement(i.Z,{disableSidebar:n,enabledSidebarName:t,enableSidebar:r})))))}},8807:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(5609),s=r(5736),o=r(9755),i=r(5275),a=r(4121);const __=s.__;function c(){const{editedEntities:e,isSaving:t,hasUnsavedEdits:r,saveRecords:s}=(0,a.Z)();return React.createElement(n.Button,{"aria-disabled":t,className:"jp-search-configure-save-button",disabled:!r,isBusy:t,variant:"primary",onClick:function(){t||((0,i.Ny)(`${i.q0}_save_button_click`,{initialSettings:JSON.stringify(window[o.W1].overlayOptions),changedSettings:JSON.stringify(e),changedSettingNames:Object.keys(e).join(",")}),s(...arguments))}},t?__("Saving…","jetpack-search-pkg"):__("Save","jetpack-search-pkg",0))}},9551:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(2175),s=r(5736),o=r(9818);const __=s.__,i=[{name:"Dull blue",color:"#463ECE"},{name:"Jazzberry jam",color:"#C6446F"},{name:"June bud",color:"#C4D455"}];function a(e){let{disabled:t,value:r,onChange:s}=e;const a=(0,o.useSelect)((e=>{var t;const r=null!==(t=e("core/block-editor").getSettings())&&void 0!==t?t:{};return Array.isArray(null==r?void 0:r.colors)&&r.colors.length>0?r.colors:i}));return React.createElement("div",{className:"jp-search-configure-color-input components-base-control"},React.createElement(n.__experimentalColorGradientControl,{label:__("Highlight for search terms","jetpack-search-pkg"),disabled:t,colorValue:r,colors:a,disableCustomColors:!1,disableCustomGradients:!0,onColorChange:s}))}},1497:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(9307),s=r(5609),o=r(5736);const __=o.__,i=window.JetpackInstantSearchOptions.postTypes;function a(e){let{disabled:t,onChange:r,validPostTypes:o=i,value:a}=e;const c=(0,n.useMemo)((()=>Object.keys(o)),[o]),l=(0,n.useMemo)((()=>a&&Array.isArray(a)?new Set(a):new Set),[a]),u=l.size===c.length-1;return React.createElement("div",{className:"jp-search-configure-excluded-post-types-control components-base-control"},React.createElement("div",{className:"jp-search-configure-excluded-post-types-control__label"},__("Excluded post types","jetpack-search-pkg")),u&&React.createElement(s.Notice,{isDismissible:!1,status:"info"},__("You must leave at least one post type unchecked.","jetpack-search-pkg")),c.map((e=>{return React.createElement(s.CheckboxControl,{checked:l.has(e),disabled:t||!l.has(e)&&u,key:e,label:i[e].name,onChange:(n=e,e=>{const t=new Set(l);e?t.add(n):t.delete(n),r([...t])}),value:e});var n})))}},3515:function(e,t,r){"use strict";r.d(t,{Z:function(){return h}});var n=r(5609),s=r(5736),o=r(1074),i=r(5022),a=r(8807),c=r(2463),l=r(3187),u=r(7543),p=r(7146);const __=s.__;function h(e){const{enabledSidebarName:t,enableSidebar:r,disableSidebar:s}=e;return React.createElement("div",{className:"interface-complementary-area jp-search-configure-sidebar"},React.createElement("div",{className:"components-panel__header interface-complementary-area-header jp-search-configure-sidebar__panel-tabs",tabIndex:"-1"},React.createElement(p.Z,{enabledSidebarName:t,enableSidebar:r}),React.createElement(a.Z,null),React.createElement(n.Button,{"aria-label":__("Show preview","jetpack-search-pkg"),className:"jp-search-configure-sidebar__hide-settings-button",variant:"secondary",onClick:s},React.createElement(o.Z,{icon:i.Z}))),React.createElement("div",{className:"components-panel"},t===c.m&&React.createElement(l.Z,null),t===c.E&&React.createElement(u.Z,null)))}},3187:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(2175),s=r(5609),o=r(5736),i=r(6483),a=r(8852);const __=o.__;function c(){return React.createElement("div",{className:"jp-search-configure-sidebar-description"},React.createElement(n.BlockIcon,{icon:a.Y}),React.createElement("div",null,React.createElement("p",null,__("Jetpack Instant Search will allow your visitors to get search results as soon as they start typing. Customize this experience to offer better results that match your site.","jetpack-search-pkg")),React.createElement(s.Button,{href:"widgets.php",variant:"tertiary"},__("Edit widgets","jetpack-search-pkg")),React.createElement(s.Button,{href:(0,i.addQueryArgs)("customize.php",{"autofocus[section]":"jetpack_search",return:`${window.location.pathname}${window.location.search}`}),variant:"tertiary"},__("Configure in the Customizer","jetpack-search-pkg"))))}},7543:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(5235),s=r.n(n),o=r(5609),i=r(5736),a=r(9351),c=r(4121),l=r(3939),u=r(9551),p=r(1497),h=r(6511);const __=i.__;function d(){const{color:e,excludedPostTypes:t,infiniteScroll:r=!0,resultFormat:n,setColor:i,setExcludedPostTypes:d,setInfiniteScroll:f,setResultFormat:m,setShowLogo:g,setSort:v,setSortEnabled:y,setTheme:_,setTrigger:b,showLogo:E=!0,sort:w,sortEnabled:k=!0,theme:S,trigger:j}=(0,l.Z)(),{isSaving:C}=(0,c.Z)(),{isLoading:x}=(0,a.Z)(),O=C||x;return React.createElement(o.Panel,{className:s()("jp-search-configure-sidebar-options",{"jp-search-configure-sidebar-options--is-disabled":O})},React.createElement(o.PanelBody,{title:__("Styling","jetpack-search-pkg"),initialOpen:!0},React.createElement(h.Z,{disabled:O,onChange:_,value:S}),React.createElement(o.RadioControl,{className:"jp-search-configure-result-format-radios",label:__("Result format","jetpack-search-pkg"),selected:n,options:[{label:__("Minimal","jetpack-search-pkg"),value:"minimal"},{label:__("Expanded (shows images)","jetpack-search-pkg"),value:"expanded"},{label:__("Product (for WooCommerce stores)","jetpack-search-pkg"),value:"product"}],onChange:m}),React.createElement(u.Z,{disabled:O,onChange:i,value:e})),React.createElement(o.PanelBody,{title:__("Search options","jetpack-search-pkg"),initialOpen:!0},React.createElement(o.SelectControl,{className:"jp-search-configure-default-sort-select",disabled:O,label:__("Default sort","jetpack-search-pkg"),value:w,options:[{label:__("Relevance (recommended)","jetpack-search-pkg"),value:"relevance"},{label:__("Newest first","jetpack-search-pkg"),value:"newest"},{label:__("Oldest first","jetpack-search-pkg"),value:"oldest"}],onChange:v}),React.createElement(o.SelectControl,{className:"jp-search-configure-overlay-trigger-select",disabled:O,label:__("Overlay trigger","jetpack-search-pkg"),value:j,options:[{label:__("Open when the user starts typing","jetpack-search-pkg"),value:"immediate"},{label:__("Open when results are available","jetpack-search-pkg"),value:"results"},{label:__("Open when user submits the form","jetpack-search-pkg"),value:"submit"}],onChange:b}),React.createElement(p.Z,{disabled:O,onChange:d,value:t})),React.createElement(o.PanelBody,{title:__("Additional settings","jetpack-search-pkg"),initialOpen:!0},React.createElement(o.ToggleControl,{className:"jp-search-configure-show-sort-toggle",checked:k,disabled:O,label:__("Show sort selector","jetpack-search-pkg"),onChange:y}),React.createElement(o.ToggleControl,{className:"jp-search-configure-infinite-scroll-toggle",checked:r,disabled:O,label:__("Enable infinite scroll","jetpack-search-pkg"),onChange:f}),React.createElement(o.ToggleControl,{className:"jp-search-configure-show-logo-toggle",checked:E,disabled:O,label:__('Show "Powered by Jetpack"',"jetpack-search-pkg"),onChange:g})))}},7146:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(5235),s=r.n(n),o=r(5736),i=r(5609),a=r(2463);const __=o.__;function c(e){let{enabledSidebarName:t,enableSidebar:r}=e;return React.createElement("ul",null,React.createElement("li",null,React.createElement(l,{enableSidebar:r,identifier:a.m,isActive:t===a.m,label:__("Jetpack Search","jetpack-search-pkg")})),React.createElement("li",null,React.createElement(l,{enableSidebar:r,identifier:a.E,isActive:t===a.E,label:__("Options","jetpack-search-pkg")})))}function l(e){let{enableSidebar:t,identifier:r,label:n,isActive:a}=e;const c=a?(0,o.sprintf)(// translators: %s: sidebar label e.g: "Options". +__("%s (selected)","jetpack-search-pkg"),n):n;return React.createElement(i.Button,{onClick:()=>t(r),className:s()("jp-search-configure-sidebar__panel-tab",{"is-active":a}),"aria-label":c,"data-label":n},n)}},6511:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(5235),s=r.n(n),o=r(5609),i=r(5736),a=r(7583);const __=i.__;function c(e){let{disabled:t,value:r,onChange:n}=e;return React.createElement("div",{className:"jp-search-configure-theme-buttons components-base-control"},React.createElement(o.Button,{className:s()({"jp-search-configure-theme-button--selected":"light"===r}),disabled:t,onClick:()=>n("light"),variant:"link"},React.createElement(a.Z,{theme:"light"}),React.createElement("span",{"aria-label":__("Light Theme","jetpack-search-pkg")},__("Light","jetpack-search-pkg"))),React.createElement(o.Button,{className:s()({"jp-search-configure-theme-button--selected":"dark"===r}),disabled:t,onClick:()=>n("dark"),variant:"link"},React.createElement(a.Z,{theme:"dark"}),React.createElement("span",{"aria-label":__("Dark Theme","jetpack-search-pkg")},__("Dark","jetpack-search-pkg"))))}},7583:function(e,t,r){"use strict";function n(e){let{theme:t}=e;const r="dark"===t?"#000":"#fff",n="dark"===t?"#4F5861":"#DDE5EE";return React.createElement("svg",{width:"104",height:"80",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},React.createElement("rect",{x:"7.5",y:"7.5",width:"89",height:"65",rx:"3.5",fill:r,stroke:n}),React.createElement("path",{d:"M16 20a4 4 0 014-4h49a4 4 0 010 8H20a4 4 0 01-4-4zM42 55.5a1.5 1.5 0 011.5-1.5h32a1.5 1.5 0 010 3h-32a1.5 1.5 0 01-1.5-1.5zM42 60.5a1.5 1.5 0 011.5-1.5h11a1.5 1.5 0 010 3h-11a1.5 1.5 0 01-1.5-1.5zM16 47a4 4 0 014-4h12a4 4 0 014 4v12a4 4 0 01-4 4H20a4 4 0 01-4-4V47zM42 48a3 3 0 013-3h40a3 3 0 110 6H45a3 3 0 01-3-3zM8 32h89v1H8z",fill:n}))}r.d(t,{Z:function(){return n}})},4121:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(9196),s=r(9818);function o(){const{saveEntityRecord:e,undo:t,redo:r}=(0,s.useDispatch)("core"),o=(0,s.useSelect)((e=>e("core").getEntityRecordEdits("root","site"))),i=o&&Object.keys(o).length>0,a=(0,s.useSelect)((e=>e("core").isSavingEntityRecord("root","site"))),c=(0,s.useSelect)((e=>e("core").hasUndo())),l=(0,s.useSelect)((e=>e("core").hasRedo())),u=(0,n.useCallback)((()=>{i&&e("root","site",o)}),[o,i,e]);return{editedEntities:o,hasRedo:c,hasUndo:l,hasUnsavedEdits:i,isSaving:a,redo:r,saveRecords:u,undo:t}}},9351:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(9818);function s(){return{isLoading:!(0,n.useSelect)((e=>e("core").getSite()))}}},3939:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(9196),s=r(7798);function o(){const[e,t]=(0,s.useEntityProp)("root","site","jetpack_search_color_theme"),[r,o]=(0,s.useEntityProp)("root","site","jetpack_search_result_format"),[i,a]=(0,s.useEntityProp)("root","site","jetpack_search_default_sort"),[c,l]=(0,s.useEntityProp)("root","site","jetpack_search_overlay_trigger"),[u,p]=(0,s.useEntityProp)("root","site","jetpack_search_highlight_color"),[h,d]=(0,s.useEntityProp)("root","site","jetpack_search_enable_sort"),[f,m]=(0,s.useEntityProp)("root","site","jetpack_search_inf_scroll"),[g,v]=(0,s.useEntityProp)("root","site","jetpack_search_show_powered_by"),[y,_]=(0,s.useEntityProp)("root","site","jetpack_search_excluded_post_types");return{color:u,excludedPostTypes:(0,n.useMemo)((()=>null==y?void 0:y.split(",").filter((e=>(null==e?void 0:e.length)>0))),[y]),infiniteScroll:f,resultFormat:r,setColor:p,setExcludedPostTypes:e=>_(e.join(",")),setInfiniteScroll:m,setResultFormat:o,setShowLogo:v,setSort:a,setSortEnabled:d,setTheme:t,setTrigger:l,showLogo:g,sort:i,sortEnabled:h,theme:e,trigger:c}}},5275:function(e,t,r){"use strict";r.d(t,{AM:function(){return i},Ny:function(){return a},j2:function(){return o},q0:function(){return s}});var n=r(8050);const s="jetpack_search_customberg",o=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.tU)(...t,!0)},i=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.AM)(...t,!0)},a=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.Ny)(...t,!0)}},2463:function(e,t,r){"use strict";r.d(t,{E:function(){return s},m:function(){return n}});const n="jetpack-customize-search/info",s="jetpack-customize-search/options"},5332:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(8294),s=r.n(n),o=r(9196),i=r(4184);class a extends o.Component{constructor(){super(...arguments),s()(this,"handleOverlayOptionsUpdate",(e=>{this.props.updateOverlayOptions(e,(()=>this.props.showResults()))}))}componentDidMount(){(0,i.vJ)(this.handleOverlayOptionsUpdate),(0,i.Em)(this.props.toggleResults)}render(){return null}}},1773:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(8294),s=r.n(n),o=(r(3679),r(9196)),i=r(3259),a=r.n(i);class c extends o.Component{constructor(){super(...arguments),s()(this,"handleCompositionStart",(()=>this.setState({isComposing:!0}))),s()(this,"handleCompositionEnd",(()=>this.setState({isComposing:!1}))),s()(this,"handleFilterInputClick",(e=>{e.preventDefault(),e.currentTarget.dataset.filterType&&("taxonomy"===e.currentTarget.dataset.filterType?this.props.setFilter(e.currentTarget.dataset.taxonomy,e.currentTarget.dataset.val):this.props.setFilter(e.currentTarget.dataset.filterType,e.currentTarget.dataset.val)),this.props.setSearchQuery(""),this.props.showResults()})),s()(this,"handleHistoryNavigation",(()=>{this.props.initializeQueryValues({isHistoryNavigation:!0})})),s()(this,"handleInput",a()((e=>{var t,r;null!==(t=e.inputType)&&void 0!==t&&t.includes("format")||""===e.target.value||(this.state.isComposing||"submit"!==this.props.overlayOptions.overlayTrigger&&(this.props.setSearchQuery(e.target.value),"immediate"===this.props.overlayOptions.overlayTrigger&&this.props.showResults(),"results"===this.props.overlayOptions.overlayTrigger&&(null===(r=this.props.response)||void 0===r?void 0:r.results)&&this.props.showResults()))}),200)),s()(this,"handleKeyup",(e=>{"Enter"===e.key&&(this.props.setSearchQuery(e.target.value),this.props.showResults())})),s()(this,"handleOverlayTriggerClick",(e=>{e.stopImmediatePropagation(),this.props.setSearchQuery(""),this.props.showResults()})),s()(this,"handleSubmit",(e=>{if(e.preventDefault(),this.handleInput.flush(),!this.props.isVisible){var t;const r=null===(t=e.target.querySelector(this.props.themeOptions.searchInputSelector))||void 0===t?void 0:t.value;"string"==typeof r&&this.props.setSearchQuery(r),this.props.showResults()}})),s()(this,"fixBodyScroll",(()=>{var e;this.props.isVisible?(this.preventBodyScroll(),null===(e=window)||void 0===e||e.scrollTo(0,0)):this.props.isVisible||this.restoreBodyScroll()})),this.state={isComposing:!1,bodyScrollTop:0,previousStyle:null,previousBodyStyleAttribute:""},this.props.initializeQueryValues()}componentDidMount(){this.disableUnnecessaryFormAndInputAttributes(),this.addEventListeners()}componentWillUnmount(){this.removeEventListeners(),this.restoreBodyScroll()}componentDidUpdate(e){this.props.isVisible!==e.isVisible&&this.fixBodyScroll()}disableUnnecessaryFormAndInputAttributes(){document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.removeAttribute("required"),e.removeAttribute("autocomplete"),e.form.removeAttribute("autocomplete")}))}addEventListeners(){window.addEventListener("popstate",this.handleHistoryNavigation),document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.form.addEventListener("submit",this.handleSubmit),e.addEventListener("keyup",this.handleKeyup),e.addEventListener("input",this.handleInput),e.addEventListener("compositionstart",this.handleCompositionStart),e.addEventListener("compositionend",this.handleCompositionEnd)})),document.querySelectorAll(this.props.themeOptions.overlayTriggerSelector).forEach((e=>{e.addEventListener("click",this.handleOverlayTriggerClick,!0)})),document.querySelectorAll(this.props.themeOptions.filterInputSelector).forEach((e=>{e.addEventListener("click",this.handleFilterInputClick)}))}removeEventListeners(){window.removeEventListener("popstate",this.handleHistoryNavigation),document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.form.removeEventListener("submit",this.handleSubmit),e.removeEventListener("keyup",this.handleKeyup),e.removeEventListener("input",this.handleInput),e.removeEventListener("compositionstart",this.handleCompositionStart),e.removeEventListener("compositionend",this.handleCompositionEnd)})),document.querySelectorAll(this.props.themeOptions.overlayTriggerSelector).forEach((e=>{e.removeEventListener("click",this.handleOverlayTriggerClick,!0)})),document.querySelectorAll(this.props.themeOptions.filterInputSelector).forEach((e=>{e.removeEventListener("click",this.handleFilterInputClick)}))}preventBodyScroll(){this.setState({bodyScrollTop:parseInt(window.scrollY)||0,previousStyle:{top:document.body.style.top,left:document.body.style.left,right:document.body.style.right,scrollBehavior:document.documentElement.style.scrollBehavior},previousBodyStyleAttribute:document.body.getAttribute("style")},(()=>{var e,t;const r=(null===(e=document.documentElement)||void 0===e?void 0:e.scrollHeight)-(null===(t=document.body)||void 0===t?void 0:t.scrollHeight)||0;document.body.setAttribute("style","position: fixed !important"),document.body.style.top=`-${this.state.bodyScrollTop-r}px`,document.body.style.left=0,document.body.style.right=0}))}restoreBodyScroll(){var e,t,r,n,s,o,i,a;this.state.previousBodyStyleAttribute?document.body.setAttribute("style",this.state.previousBodyStyleAttribute):document.body.removeAttribute("style"),document.body.style.top=null!==(e=null===(t=this.state.previousStyle)||void 0===t?void 0:t.top)&&void 0!==e?e:"",document.body.style.left=null!==(r=null===(n=this.state.previousStyle)||void 0===n?void 0:n.left)&&void 0!==r?r:"",document.body.style.right=null!==(s=null===(o=this.state.previousStyle)||void 0===o?void 0:o.right)&&void 0!==s?s:"",document.documentElement.style.scrollBehavior="revert",this.state.bodyScrollTop>0&&window.scrollTo(0,this.state.bodyScrollTop),document.documentElement.style.scrollBehavior=null!==(i=null===(a=this.state.previousStyle)||void 0===a?void 0:a.scrollBehavior)&&void 0!==i?i:"",this.setState({bodyScrollTop:0,previousStyle:null,previousBodyStyleAttribute:""})}render(){return null}}},1180:function(e,t,r){"use strict";var n=r(8294),s=r.n(n),o=r(9196),i=r.n(o),a=r(5736);const __=a.__;class c extends o.Component{needsOffset(e,t){return["gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-info","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(e)>=0&&t%18==0}getSVGTitle(e){if("title"in this.props)return this.props.title?i().createElement("title",null,this.props.title):null;switch(e){default:return null;case"gridicons-audio":return i().createElement("title",null,__("Has audio.","jetpack-search-pkg"));case"gridicons-calendar":return i().createElement("title",null,__("Is an event.","jetpack-search-pkg"));case"gridicons-cart":return i().createElement("title",null,__("Is a product.","jetpack-search-pkg"));case"chevron-down":return i().createElement("title",null,__("Show filters","jetpack-search-pkg"));case"gridicons-comment":return i().createElement("title",null,__("Matching comment.","jetpack-search-pkg"));case"gridicons-cross":return i().createElement("title",null,__("Close search results","jetpack-search-pkg"));case"gridicons-filter":return i().createElement("title",null,__("Toggle search filters.","jetpack-search-pkg"));case"gridicons-folder":return i().createElement("title",null,__("Category","jetpack-search-pkg"));case"gridicons-image-multiple":return i().createElement("title",null,__("Has multiple images.","jetpack-search-pkg"));case"gridicons-image":return i().createElement("title",null,__("Has an image.","jetpack-search-pkg"));case"gridicons-page":return i().createElement("title",null,__("Page","jetpack-search-pkg"));case"gridicons-post":return i().createElement("title",null,__("Post","jetpack-search-pkg"));case"gridicons-jetpack-search":case"gridicons-search":return i().createElement("title",null,__("Magnifying Glass","jetpack-search-pkg"));case"gridicons-tag":return i().createElement("title",null,__("Tag","jetpack-search-pkg"));case"gridicons-video":return i().createElement("title",null,__("Has a video.","jetpack-search-pkg"))}}renderIcon(e){switch(e){default:return null;case"gridicons-audio":return i().createElement("g",null,i().createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"}));case"gridicons-block":return i().createElement("g",null,i().createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"}));case"gridicons-calendar":return i().createElement("g",null,i().createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"}));case"gridicons-cart":return i().createElement("g",null,i().createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"}));case"gridicons-checkmark":return i().createElement("g",null,i().createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"}));case"gridicons-chevron-down":return i().createElement("g",null,i().createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"}));case"gridicons-comment":return i().createElement("g",null,i().createElement("path",{d:"M3 6v9c0 1.105.895 2 2 2h9v5l5.325-3.804c1.05-.75 1.675-1.963 1.675-3.254V6c0-1.105-.895-2-2-2H5c-1.105 0-2 .895-2 2z"}));case"gridicons-cross":return i().createElement("g",null,i().createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"}));case"gridicons-filter":return i().createElement("g",null,i().createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"}));case"gridicons-folder":return i().createElement("g",null,i().createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"}));case"gridicons-image":return i().createElement("g",null,i().createElement("path",{d:"M13 9.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5zM22 6v12c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2zm-2 0H4v7.444L8 9l5.895 6.55 1.587-1.85c.798-.932 2.24-.932 3.037 0L20 15.426V6z"}));case"gridicons-image-multiple":return i().createElement("g",null,i().createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"}));case"gridicons-info":return i().createElement("g",null,i().createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}));case"gridicons-jetpack-search":return i().createElement("g",null,i().createElement("path",{d:"M0 9.257C0 4.15 4.151 0 9.257 0c5.105 0 9.256 4.151 9.256 9.257a9.218 9.218 0 01-2.251 6.045l.034.033h1.053L24 22.01l-1.986 1.989-6.664-6.662v-1.055l-.033-.033a9.218 9.218 0 01-6.06 2.264C4.15 18.513 0 14.362 0 9.257zm4.169 1.537h4.61V1.82l-4.61 8.973zm5.547-3.092v8.974l4.61-8.974h-4.61z"}));case"gridicons-pages":return i().createElement("g",null,i().createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"}));case"gridicons-posts":return i().createElement("g",null,i().createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"}));case"gridicons-search":return i().createElement("g",null,i().createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"}));case"gridicons-star-outline":return i().createElement("g",null,i().createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"}));case"gridicons-star":return i().createElement("g",null,i().createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}));case"gridicons-tag":return i().createElement("g",null,i().createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"}));case"gridicons-video":return i().createElement("g",null,i().createElement("path",{d:"M20 4v2h-2V4H6v2H4V4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2v-2h2v2h12v-2h2v2c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 16H4v-3h2v3zm0-5H4V8h2v3zm4 4V9l4.5 3-4.5 3zm10 1h-2v-3h2v3zm0-5h-2V8h2v3z"}))}}render(){const{size:e=24,className:t=""}=this.props,r=this.props.height||e,n=this.props.width||e,s=this.props.style||{height:r,width:n},o="gridicons-"+this.props.icon;let a=["gridicon",o,t];return this.needsOffset(o,e)&&a.push("needs-offset"),a=a.join(" "),i().createElement("svg",{className:a,focusable:this.props.focusable,height:r,onClick:this.props.onClick,style:s,viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg","aria-hidden":this.props["aria-hidden"]},this.getSVGTitle(o),this.renderIcon(o))}}s()(c,"defaultProps",{"aria-hidden":"false",focusable:"true"}),t.Z=c},8852:function(e,t,r){"use strict";r.d(t,{Y:function(){return a}});var n=r(9196),s=r.n(n),o=r(5736);const __=o.__,i="#fff",a=s().createElement("svg",{className:"jetpack-instant-search__jetpack-colophon-logo",height:12,width:12,viewBox:"0 0 32 32"},s().createElement("path",{className:"jetpack-logo__icon-circle",fill:"#069e08",d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),s().createElement("polygon",{className:"jetpack-logo__icon-triangle",fill:i,points:"15,19 7,19 15,3 "}),s().createElement("polygon",{className:"jetpack-logo__icon-triangle",fill:i,points:"17,29 17,13 25,13 "}));t.Z=e=>{const t="string"==typeof e.locale?e.locale.split("-",1)[0]:null,r=t&&"en"!==t?"https://"+t+".jetpack.com/search?utm_source=poweredby":"https://jetpack.com/search?utm_source=poweredby";return s().createElement("div",{className:"jetpack-instant-search__jetpack-colophon"},s().createElement("a",{href:r,rel:"external noopener noreferrer nofollow",target:"_blank",className:"jetpack-instant-search__jetpack-colophon-link"},a,s().createElement("span",{className:"jetpack-instant-search__jetpack-colophon-text"},__("Search powered by Jetpack","jetpack-search-pkg"))))}},4741:function(e,t,r){"use strict";var n=r(9196),s=r.n(n),o=r(1180);t.Z=e=>{let{type:t,children:r}=e;return"warning"!==t?null:s().createElement("div",{className:"jetpack-instant-search__notice jetpack-instant-search__notice--warning"},s().createElement(o.Z,{icon:"info",size:20}),r)}},6321:function(e,t,r){"use strict";var n=r(5736),s=r(9196),o=r.n(s),i=r(9755);const __=n.__;t.Z=e=>{const{children:t,closeOverlay:r,colorTheme:n,hasOverlayWidgets:a,isVisible:c}=e;return(0,s.useEffect)((()=>{const e=e=>{"Escape"===e.key&&(e.preventDefault(),r())},t=e=>{var t;const n=document.getElementsByClassName("jetpack-instant-search__search-results")[0];null!==(t=e.target)&&void 0!==t&&t.isConnected&&n&&!n.contains(e.target)&&r()};return window.addEventListener("keydown",e),c?window.addEventListener("click",t):window.removeEventListener("click",t),()=>{window.removeEventListener("keydown",e),window.removeEventListener("click",t)}}),[r,c]),o().createElement("div",{"aria-hidden":!c,"aria-labelledby":"jetpack-instant-search__overlay-title",className:["jetpack-instant-search",i.zg,`jetpack-instant-search__overlay--${n}`,a?"":"jetpack-instant-search__overlay--no-sidebar",c?"":"is-hidden"].join(" "),role:"dialog"},o().createElement("h1",{id:"jetpack-instant-search__overlay-title",className:"screen-reader-text"},__("Search results","jetpack-search-pkg")),t)}},4809:function(e,t,r){"use strict";var n=r(9196),s=r.n(n);t.Z=e=>{let{className:t,onClick:r,url:n}=e;const o=function(e){const t=e.split("/").filter((e=>e.length>0));return t.shift(),t}(n);return o.length<1?null:s().createElement("div",{className:`jetpack-instant-search__path-breadcrumb ${t||""}`},s().createElement("a",{className:"jetpack-instant-search__path-breadcrumb-link",href:`//${n}`,onClick:r},o.map(((e,t,r)=>s().createElement("span",{className:"jetpack-instant-search__path-breadcrumb-piece",key:e},decodeURIComponent(e),t!==r.length-1?" › ":"")))))}},1459:function(e,t,r){"use strict";var n=r(2402),s=r.n(n),o=r(9196),i=r.n(o),a=r(9087);t.Z=e=>{const{alt:t,isPhotonEnabled:r,maxHeight:n=600,maxWidth:c=600,src:l,lazyLoad:u=!0,...p}=e,h=(0,o.useRef)(),[d,f]=(0,o.useState)(null),m=(0,a.y)(l,c,n,r);return(0,o.useEffect)((()=>{if(!m)return;let e=null;return u&&"IntersectionObserver"in window?(e=new window.IntersectionObserver(((e,t)=>{for(const r of e)r.isIntersecting&&(f(m),t.unobserve(r.target))})),e.observe(h.current)):f(m),()=>{var t;null===(t=e)||void 0===t||t.disconnect()}}),[u,m]),i().createElement("img",s()({alt:t,ref:h,src:d},p))}},883:function(e,t,r){"use strict";r(3679);var n=r(9196),s=r.n(n),o=r(1180),i=r(2601);const a=["youtube","ooyala","anvplayer","wpvideo","bc_video","video","brightcove","tp_video","jwplayer","tempo-video","vimeo"],c=["gallery","ione_media_gallery"],l=["audio","soundcloud"],u={product:"cart",video:"video",gallery:"image-multiple",event:"calendar",events:"calendar"};t.Z=e=>{let{postType:t,shortcodeTypes:r,iconSize:n=18}=e;if(Object.keys(u).includes(t))return s().createElement(o.Z,{icon:u[t],size:n});const p=(0,i.Z)(r,a),h=(0,i.Z)(r,l),d=(0,i.Z)(r,c);return p?s().createElement(o.Z,{icon:"video",size:n}):h?s().createElement(o.Z,{icon:"audio",size:n}):"page"===t?s().createElement(o.Z,{icon:"pages",size:n}):d?s().createElement(o.Z,{icon:"image-multiple",size:n}):null}},4682:function(e,t,r){"use strict";var n=r(9196),s=r.n(n);class o extends n.Component{render(){const{formattedPrice:e,formattedSalePrice:t,formattedRegularPrice:r,price:o,salePrice:i}=this.props;return o?s().createElement("span",{className:"jetpack-instant-search__product-price"},i>0?s().createElement(n.Fragment,null,s().createElement("s",{className:"jetpack-instant-search__product-price-regular",dangerouslySetInnerHTML:{__html:r}}),s().createElement("span",{dangerouslySetInnerHTML:{__html:t}})):s().createElement("span",{dangerouslySetInnerHTML:{__html:e}})):null}}t.Z=o},6565:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(5736),s=r(9196),o=r.n(s),i=r(1180);const _n=n._n;function a(e){let{rating:t=0,count:r=0,permalink:s}=e;return o().createElement("div",{className:"jetpack-instant-search__product-rating"},o().createElement("span",{"aria-hidden":!0,className:"jetpack-instant-search__product-rating-stars"},Array(5).fill(o().createElement(i.Z,{size:16,icon:"star-outline"})).fill(o().createElement(i.Z,{size:16,icon:"star"}),0,t))," ",o().createElement("a",{"aria-hidden":!0,className:"jetpack-instant-search__product-rating-count",href:s+"#reviews"},(0,n.sprintf)( +/* Translators: the placeholder is the number of product reviews. */ +_n("%d review","%d reviews",r,"jetpack-search-pkg"),r)),o().createElement("span",{className:"screen-reader-text"},(0,n.sprintf)( +/* Translators: the first placeholder is the average product rating out of 5; the second is the number of product reviews. */ +_n("Average rating of %1$d out of 5 from %2$d review.","Average rating of %1$d out of 5 from %2$d reviews.",r,"jetpack-search-pkg"),Number(t).toFixed(2),r)))}},423:function(e,t,r){"use strict";var n=r(8294),s=r.n(n),o=r(9196),i=r.n(o),a=r(5736),c=r(3259),l=r.n(c),u=r(9755);const __=a.__;class p extends o.Component{constructor(){super(...arguments),s()(this,"overlayElement",document.getElementsByClassName(u.zg)[0]),s()(this,"checkScroll",l()((()=>{this.props.enableLoadOnScroll&&window.innerHeight+this.overlayElement.scrollTop>=this.overlayElement.scrollHeight&&this.props.onLoadNextPage()}),100))}componentDidMount(){this.overlayElement.addEventListener("scroll",this.checkScroll)}componentDidUnmount(){this.overlayElement.removeEventListener("scroll",this.checkScroll)}render(){return i().createElement("button",{className:"jetpack-instant-search__scroll-button",disabled:this.props.isLoading,onClick:this.props.onLoadNextPage},this.props.isLoading?i().createElement("span",null,__("Loading…","jetpack-search-pkg")):i().createElement("span",null,__("Load more","jetpack-search-pkg")))}}t.Z=p},5652:function(e,t,r){"use strict";var n=r(8294),s=r.n(n),o=r(9196),i=r.n(o),a=r(1850),c=r(3259),l=r.n(c),u=r(9309),p=r(7390),h=r.n(p),d=r(5332),f=r(1773),m=r(6321),g=r(2975),v=r(8050),y=r(9755),_=r(1547),b=r(6302),E=r(8389),w=r(1530);class k extends o.Component{constructor(){var e;super(...arguments),e=this,s()(this,"getResultFormat",(()=>{const e=(0,b.ug)();return this.props.staticFilters&&this.props.staticFilters.group_id&&this.props.staticFilters.group_id!==y.Bk?y.Pz:e||this.state.overlayOptions.resultFormat})),s()(this,"initializeStaticFilters",(()=>{const e=(0,_.bA)();e.length>0&&0===Object.keys(this.props.staticFilters).length&&e.forEach((e=>this.props.setStaticFilter(e.filter_id,e.selected,!0)))})),s()(this,"hideResults",(e=>{this.props.shouldIntegrateWithDom&&(0,b.Q0)(this.props.initialHref,(()=>{this.setState({isVisible:!1}),this.props.clearQueryValues()}),e)})),s()(this,"toggleResults",(e=>{this.props.shouldIntegrateWithDom&&this.state.isVisible!==e&&(e&&this.initializeStaticFilters(),this.setState({isVisible:e}))})),s()(this,"showResults",this.toggleResults.bind(this,!0)),s()(this,"onChangeQueryString",(e=>{this.getResults(),this.props.hasActiveQuery&&!this.state.isVisible&&this.showResults(),!this.props.hasActiveQuery&&e&&this.hideResults(e),null!==this.props.searchQuery&&document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.value=this.props.searchQuery}))})),s()(this,"loadNextPage",(()=>{this.props.hasNextPage&&this.getResults({pageHandle:this.props.response.page_handle})})),s()(this,"getResults",(function(){let{pageHandle:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.props.makeSearchRequest({aggregations:t?{}:e.props.aggregations,excludedPostTypes:e.state.overlayOptions.excludedPostTypes,filter:e.props.filters,staticFilters:e.props.staticFilters,pageHandle:t,query:e.props.searchQuery,resultFormat:e.getResultFormat(),siteId:e.props.options.siteId,sort:e.props.sort,postsPerPage:e.props.options.postsPerPage,adminQueryFilter:e.props.options.adminQueryFilter,isInCustomizer:e.props.isInCustomizer})})),s()(this,"updateOverlayOptions",((e,t)=>{this.setState((t=>({overlayOptionsCustomizerOverride:{...t.overlayOptionsCustomizerOverride,...e}})),t)})),this.state={isVisible:!!this.props.initialIsVisible,overlayOptionsCustomizerOverride:{}},this.getResults=l()(this.getResults,200),this.props.enableAnalytics?this.initializeAnalytics():(0,v.IJ)(),this.props.shouldIntegrateWithDom?this.props.initializeQueryValues():this.props.disableQueryStringIntegration()}static getDerivedStateFromProps(e,t){return{overlayOptions:{...e.overlayOptions,...t.overlayOptionsCustomizerOverride}}}componentDidMount(){this.getResults(),this.props.hasActiveQuery&&this.showResults()}componentDidUpdate(e,t){e.searchQuery===this.props.searchQuery&&e.sort===this.props.sort&&h()(e.filters)===h()(this.props.filters)&&h()(e.staticFilters)===h()(this.props.staticFilters)||this.onChangeQueryString(this.props.isHistoryNavigation),t.overlayOptions.defaultSort!==this.state.overlayOptions.defaultSort&&this.props.setSort(this.state.overlayOptions.defaultSort),h()(t.overlayOptions.excludedPostTypes)!==h()(this.state.overlayOptions.excludedPostTypes)&&this.getResults()}initializeAnalytics(){(0,v.tU)(),(0,v.vy)(),(0,v.AM)(this.props.options.siteId)}render(){const e=this.getResultFormat(),t=this.props.shouldCreatePortal?a.createPortal:e=>e;return i().createElement(o.Fragment,null,this.props.isInCustomizer&&i().createElement(d.Z,{showResults:this.showResults,toggleResults:this.toggleResults,updateOverlayOptions:this.updateOverlayOptions}),this.props.shouldIntegrateWithDom&&i().createElement(f.Z,{initializeQueryValues:this.props.initializeQueryValues,isVisible:this.state.isVisible,overlayOptions:this.state.overlayOptions,setFilter:this.props.setFilter,setSearchQuery:this.props.setSearchQuery,showResults:this.showResults,themeOptions:this.props.themeOptions}),t(i().createElement(m.Z,{closeColor:this.state.overlayOptions.closeColor,closeOverlay:this.hideResults,colorTheme:this.state.overlayOptions.colorTheme,hasOverlayWidgets:this.props.hasOverlayWidgets,isVisible:this.state.isVisible},i().createElement(g.Z,{closeOverlay:this.hideResults,enableLoadOnScroll:this.state.overlayOptions.enableInfScroll,enableSort:this.state.overlayOptions.enableSort,filters:this.props.filters,staticFilters:this.props.staticFilters,hasError:this.props.hasError,hasNextPage:this.props.hasNextPage,highlightColor:this.state.overlayOptions.highlightColor,isLoading:this.props.isLoading,isPhotonEnabled:this.props.options.isPhotonEnabled,isPrivateSite:this.props.options.isPrivateSite,isVisible:this.state.isVisible,locale:this.props.options.locale,onChangeSearch:this.props.setSearchQuery,onChangeSort:this.props.setSort,onLoadNextPage:this.loadNextPage,overlayTrigger:this.state.overlayOptions.overlayTrigger,postTypes:this.props.options.postTypes,response:this.props.response,resultFormat:e,searchQuery:this.props.searchQuery,showPoweredBy:this.state.overlayOptions.showPoweredBy,sort:this.props.sort,widgets:this.props.options.widgets,widgetOutsideOverlay:this.props.widgetOutsideOverlay,hasNonSearchWidgets:this.props.options.hasNonSearchWidgets})),document.body))}}s()(k,"defaultProps",{overlayOptions:{},widgets:[]}),t.Z=(0,u.$j)(((e,t)=>({filters:(0,w.Zj)(e),staticFilters:(0,w.Bk)(e),hasActiveQuery:(0,w.en)(e),hasError:(0,w.xT)(e),isHistoryNavigation:(0,w.wI)(e),hasNextPage:(0,w.Qy)(e),isLoading:(0,w.hg)(e),response:(0,w.ck)(e),searchQuery:(0,w.uP)(e),sort:(0,w.r$)(e,t.overlayOptions.defaultSort),widgetOutsideOverlay:(0,w.ZN)(e)})),{clearQueryValues:E.Mz,disableQueryStringIntegration:E.OZ,initializeQueryValues:E.Ln,makeSearchRequest:E.x1,setStaticFilter:E.O1,setFilter:E.Tv,setSearchQuery:E.ql,setSort:E.HD})(k)},3725:function(e,t,r){"use strict";var n=r(9196),s=r.n(n),o=r(5736),i=r(5348),a=r.n(i),c=r(1180);const __=o.__;let l=null;t.Z=e=>{var t;const[r]=(0,n.useState)((()=>a()("jetpack-instant-search__box-input-"))),o=(0,n.useRef)(null);return(0,n.useEffect)((()=>{var t;e.isVisible?(t=o.current,()=>{l=document.activeElement,t.focus()})():e.shouldRestoreFocus&&l&&l.focus()}),[e.isVisible,e.shouldRestoreFocus]),s().createElement(n.Fragment,null,s().createElement("div",{className:"jetpack-instant-search__box"},s().createElement("label",{className:"jetpack-instant-search__box-label",htmlFor:r},s().createElement("div",{className:"jetpack-instant-search__box-gridicon"},s().createElement(c.Z,{icon:"search",size:24})),s().createElement("input",{autoComplete:"off",id:r,className:"search-field jetpack-instant-search__box-input",inputMode:"search",onChange:e.isVisible?e.onChange:null,ref:o,placeholder:__("Search…","jetpack-search-pkg"),type:"search",value:null!==(t=e.searchQuery)&&void 0!==t?t:""}),"string"==typeof e.searchQuery&&e.searchQuery.length>0&& +/* Translators: Button is used to clear the search input query. */ +s().createElement("input",{type:"button",value:__("clear","jetpack-search-pkg"),onClick:e.onClear}),s().createElement("button",{className:"screen-reader-text assistive-text"},__("Search","jetpack-search-pkg")))))}},7704:function(e,t,r){"use strict";var n=r(9196),s=r.n(n),o=r(9873);t.Z=e=>s().createElement("div",{className:"jetpack-instant-search__search-form-controls",role:"form"},e.children,e.enableSort&&s().createElement(o.Z,{onChange:e.onChangeSort,resultFormat:e.resultFormat,value:e.sort}))},2547:function(e,t,r){"use strict";r.d(t,{Z:function(){return d},a:function(){return h}});var n=r(8294),s=r.n(n),o=(r(3679),r(9196)),i=r.n(o),a=r(4553),c=r.n(a),l=r(5348),u=r.n(l),p=r(2160);const h=e=>e.split(" ").join("T");class d extends o.Component{constructor(){super(...arguments),s()(this,"filtersList",(0,o.createRef)()),s()(this,"idPrefix",u()("jetpack-instant-search__search-filter-")),s()(this,"toggleFilter",(()=>{this.props.onChange(this.getIdentifier(),(0,p.b)(this.filtersList.current))})),s()(this,"toggleStaticFilter",(e=>{this.props.onChange(this.getIdentifier(),e.target.value)})),s()(this,"renderDate",(e=>{let{key_as_string:t,doc_count:r}=e;const{locale:n="en-US"}=this.props;return i().createElement("div",null,i().createElement("input",{checked:this.isChecked(t),disabled:!this.isChecked(t)&&0===r,id:`${this.idPrefix}-dates-${this.getIdentifier()}-${t}`,name:t,onChange:this.toggleFilter,type:"checkbox",className:"jetpack-instant-search__search-filter-list-input"}),i().createElement("label",{htmlFor:`${this.idPrefix}-dates-${this.getIdentifier()}-${t}`,className:"jetpack-instant-search__search-filter-list-label"},new Date(h(t)).toLocaleString(n,function(e){switch(e){case"day":return{year:"numeric",month:"long",day:"numeric"};case"month":return{year:"numeric",month:"long"};case"year":return{year:"numeric"}}return{year:"numeric",month:"long"}}(this.props.configuration.interval))," ","(",r,")"))})),s()(this,"renderPostType",(e=>{let{key:t,doc_count:r}=e;const n=t in this.props.postTypes?this.props.postTypes[t].singular_name:t;return i().createElement("div",null,i().createElement("input",{checked:this.isChecked(t),disabled:!this.isChecked(t)&&0===r,id:`${this.idPrefix}-post-types-${t}`,name:t,onChange:this.toggleFilter,type:"checkbox",className:"jetpack-instant-search__search-filter-list-input"}),i().createElement("label",{htmlFor:`${this.idPrefix}-post-types-${t}`,className:"jetpack-instant-search__search-filter-list-label"},c()(n)," (",r,")"))})),s()(this,"renderTaxonomy",(e=>{let{key:t,doc_count:r}=e;const[n,s]=t&&t.split(/\/(.+)/);return i().createElement("div",null,i().createElement("input",{checked:this.isChecked(n),disabled:!this.isChecked(n)&&0===r,id:`${this.idPrefix}-taxonomies-${n}`,name:n,onChange:this.toggleFilter,type:"checkbox",className:"jetpack-instant-search__search-filter-list-input"}),i().createElement("label",{htmlFor:`${this.idPrefix}-taxonomies-${n}`,className:"jetpack-instant-search__search-filter-list-label"},c()(s)," (",r,")"))})),s()(this,"renderGroup",(e=>i().createElement("div",null,i().createElement("input",{checked:this.isChecked(e.value),id:`${this.idPrefix}-groups-${e.value}`,name:this.props.configuration.filter_id,onChange:this.toggleStaticFilter,value:e.value,type:"radio",className:"jetpack-instant-search__search-filter-list-input"}),i().createElement("label",{htmlFor:`${this.idPrefix}-groups-${e.value}`,className:"jetpack-instant-search__search-filter-list-label"},e.name))))}getIdentifier(){return"postType"===this.props.type?"post_types":"date"===this.props.type?`${this.props.configuration.interval}_${this.props.configuration.field}`:"taxonomy"===this.props.type?this.props.configuration.taxonomy:"group"===this.props.type?this.props.configuration.filter_id:void 0}isChecked(e){return Boolean(this.props.value&&this.props.value.includes(e))}renderDates(){return[...this.props.aggregation.buckets.filter((e=>!!e)).map(this.renderDate)].reverse().slice(0,this.props.configuration.count)}renderPostTypes(){return this.props.aggregation.buckets.map(this.renderPostType)}renderTaxonomies(){return this.props.aggregation.buckets.map(this.renderTaxonomy)}renderGroups(){return this.props.configuration.values.map(this.renderGroup)}render(){return i().createElement("div",null,i().createElement("h3",{className:"jetpack-instant-search__search-filter-sub-heading"},this.props.configuration.name),i().createElement("div",{ref:this.filtersList},i().createElement("div",{className:"jetpack-instant-search__search-filter-list jetpack-instant-search__search-static-filter-list"},"group"===this.props.type&&this.renderGroups()),this.props.aggregation&&"buckets"in this.props.aggregation&&i().createElement("div",{className:"jetpack-instant-search__search-filter-list"},"date"===this.props.type&&this.renderDates(),"postType"===this.props.type&&this.renderPostTypes(),"taxonomy"===this.props.type&&this.renderTaxonomies())))}}},1631:function(e,t,r){"use strict";var n=r(8294),s=r.n(n),o=r(9196),i=r.n(o),a=r(5736),c=r(9309),l=r(2547),u=r(1547),p=r(8389),h=r(8050);const __=a.__;class d extends o.Component{constructor(){super(...arguments),s()(this,"onChangeFilter",((e,t)=>{this.props.setFilter(e,t),this.props.onChange&&this.props.onChange()})),s()(this,"onChangeStaticFilter",((e,t)=>{(0,h.GE)({filterName:e,filterValue:t}),this.props.setStaticFilter(e,t),this.props.onChange&&this.props.onChange()})),s()(this,"onClearFilters",(e=>{e.preventDefault(),"click"!==e.type&&("keydown"!==e.type||"Enter"!==e.key&&" "!==e.key)||(this.props.clearFilters(),this.props.onChange&&this.props.onChange())})),s()(this,"renderFilterComponent",(e=>{let{configuration:t,results:r}=e;return r&&i().createElement(l.Z,{aggregation:r,configuration:t,locale:this.props.locale,onChange:this.onChangeFilter,postTypes:this.props.postTypes,type:(0,u.jc)(t),value:this.props.filters[(0,u.jZ)(t)]})})),s()(this,"renderStaticFilterComponent",(e=>e.hasOwnProperty("visible")&&!e.visible?null:i().createElement(l.Z,{aggregation:[],configuration:e,locale:this.props.locale,onChange:this.onChangeStaticFilter,postTypes:this.props.postTypes,type:(0,u.jc)(e),value:this.props.staticFilters[(0,u.jZ)(e)]})))}hasActiveFilters(){return Object.keys(this.props.filters).length>0}render(){var e,t,r,n;if(!this.props.widget)return null;const s=(0,u.bA)(),o=null===(e=this.props.results)||void 0===e?void 0:e.aggregations;return i().createElement("div",{className:"jetpack-instant-search__search-filters"},this.props.showTitle&&i().createElement("h2",{className:"jetpack-instant-search__search-filters-title"},__("Filter options","jetpack-search-pkg")),this.props.showClearFiltersButton&&this.hasActiveFilters()&&i().createElement("a",{class:"jetpack-instant-search__clear-filters-link",href:"#",onClick:this.onClearFilters,onKeyDown:this.onClearFilters,role:"button",tabIndex:"0"},__("Clear filters","jetpack-search-pkg")),(null===(t=this.props.widget)||void 0===t?void 0:t.filters)&&this.props.widget.filters.length>0&&s.map(this.renderStaticFilterComponent),null===(r=this.props.widget)||void 0===r||null===(n=r.filters)||void 0===n?void 0:n.map((e=>o?{configuration:e,results:o[e.filter_id]}:null)).filter((e=>!!e)).filter((e=>{let{results:t}=e;return!!t&&Array.isArray(t.buckets)&&t.buckets.length>0})).map(this.renderFilterComponent))}}s()(d,"defaultProps",{showClearFiltersButton:!0,showTitle:!0}),t.Z=(0,c.$j)(null,{clearFilters:p.K5,setFilter:p.Tv,setStaticFilter:p.O1})(d)},9988:function(e,t,r){"use strict";var n=r(8294),s=r.n(n),o=r(9196),i=r.n(o),a=r(3725);const c=e=>e.preventDefault();class l extends o.Component{constructor(){super(...arguments),s()(this,"onClear",(()=>this.props.onChangeSearch(""))),s()(this,"onChangeSearch",(e=>this.props.onChangeSearch(e.currentTarget.value)))}render(){return i().createElement("form",{autoComplete:"off",onSubmit:c,role:"search",className:this.props.className},i().createElement("div",{className:"jetpack-instant-search__search-form"},i().createElement(a.Z,{isVisible:this.props.isVisible,onChange:this.onChangeSearch,onClear:this.onClear,shouldRestoreFocus:!0,searchQuery:this.props.searchQuery})))}}t.Z=l},3162:function(e,t,r){"use strict";var n=r(9196),s=r.n(n),o=r(1180);t.Z=e=>{let{comments:t,iconSize:r=18}=e;return t?s().createElement("div",{className:"jetpack-instant-search__search-result-comments"},s().createElement(o.Z,{icon:"comment",size:r}),s().createElement("span",{className:"jetpack-instant-search__search-result-comments-text",dangerouslySetInnerHTML:{__html:t.join(" ... ")}})):null}},1954:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(9196),s=r.n(n),o=r(4809),i=r(1459),a=r(3162),c=r(2547);function l(e){const{isMultiSite:t,locale:r="en-US"}=e,{result_type:n,fields:l,highlight:u}=e.result;if("post"!==n)return null;const p=Array.isArray(l["image.url.raw"])?l["image.url.raw"][0]:l["image.url.raw"];return s().createElement("li",{className:["jetpack-instant-search__search-result","jetpack-instant-search__search-result-expanded",`jetpack-instant-search__search-result-expanded--${l.post_type}`,p?"":"jetpack-instant-search__search-result-expanded--no-image",t?"is-multisite":""].join(" ")},s().createElement("div",{className:"jetpack-instant-search__search-result-expanded__content-container"},s().createElement("div",{className:"jetpack-instant-search__search-result-expanded__copy-container"},s().createElement("h3",{className:"jetpack-instant-search__search-result-title jetpack-instant-search__search-result-expanded__title"},s().createElement("a",{className:"jetpack-instant-search__search-result-title-link jetpack-instant-search__search-result-expanded__title-link",href:`//${l["permalink.url.raw"]}`,onClick:e.onClick,dangerouslySetInnerHTML:{__html:u.title}})),!t&&s().createElement(o.Z,{className:"jetpack-instant-search__search-result-expanded__path",onClick:e.onClick,url:`//${l["permalink.url.raw"]}`}),s().createElement("div",{className:"jetpack-instant-search__search-result-expanded__content",dangerouslySetInnerHTML:{__html:u.content.join(" ... ")}}),u.comments&&s().createElement(a.Z,{comments:u.comments})),s().createElement("a",{className:"jetpack-instant-search__search-result-expanded__image-link",href:`//${l["permalink.url.raw"]}`,onClick:e.onClick},s().createElement("div",{className:"jetpack-instant-search__search-result-expanded__image-container"},p?s().createElement(i.Z,{alt:l["image.alt_text"],className:"jetpack-instant-search__search-result-expanded__image",isPhotonEnabled:e.isPhotonEnabled,src:`//${p}`}):null))),t&&s().createElement("ul",{className:"jetpack-instant-search__search-result-expanded__footer"},s().createElement("li",null,s().createElement(i.Z,{alt:l.blog_name,className:"jetpack-instant-search__search-result-expanded__footer-blog-image",isPhotonEnabled:!1,height:24,width:24,src:l.blog_icon_url,lazyLoad:!1}),s().createElement("span",{className:"jetpack-instant-search__search-result-expanded__footer-blog"},l.blog_name)),s().createElement("li",null,s().createElement("span",{className:"jetpack-instant-search__search-result-expanded__footer-author"},l.author)),s().createElement("li",null,s().createElement("span",{className:"jetpack-instant-search__search-result-expanded__footer-date"},new Date((0,c.a)(l.date)).toLocaleDateString(r,{year:"numeric",month:"short",day:"numeric"})))))}},122:function(e,t,r){"use strict";var n=r(9196),s=r.n(n),o=r(1180),i=r(4809),a=r(883),c=r(3162);class l extends n.Component{getIconSize(){return 18}getTags(){let e=this.props.result.fields["tag.name.default"];return e?(Array.isArray(e)||(e=[e]),e.slice(0,5)):[]}getCategories(){let e=this.props.result.fields["category.name.default"];return e?(Array.isArray(e)||(e=[e]),e.slice(0,5)):[]}renderNoMatchingContent(){const e=this.getTags(),t=this.getCategories(),r=0===e.length&&0===t.length;return s().createElement("div",{className:"jetpack-instant-search__search-result-minimal-content"},r&&s().createElement(i.Z,{url:this.props.result.fields["permalink.url.raw"]}),s().createElement("div",{className:"jetpack-instant-search__search-result-minimal-cats-and-tags"},0!==e.length&&s().createElement("ul",{className:"jetpack-instant-search__search-result-minimal-tags"},e.map((e=>s().createElement("li",{className:"jetpack-instant-search__search-result-minimal-tag"},s().createElement(o.Z,{icon:"tag",size:this.getIconSize()}),s().createElement("span",{className:"jetpack-instant-search__search-result-minimal-tag-text"},e))))),0!==t.length&&s().createElement("ul",{className:"jetpack-instant-search__search-result-minimal-cats"},t.map((e=>s().createElement("li",{className:"jetpack-instant-search__search-result-minimal-cat"},s().createElement(o.Z,{icon:"folder",size:this.getIconSize()}),s().createElement("span",{className:"jetpack-instant-search__search-result-minimal-cat-text"},e)))))))}renderMatchingContent(){return s().createElement("div",{className:"jetpack-instant-search__search-result-minimal-content",dangerouslySetInnerHTML:{__html:this.props.result.highlight.content.join(" ... ")}})}render(){const{result_type:e,fields:t,highlight:r}=this.props.result;if("post"!==e)return null;const n=!r.content||""===r.content[0];return s().createElement("li",{className:"jetpack-instant-search__search-result jetpack-instant-search__search-result-minimal"},s().createElement("h3",{className:"jetpack-instant-search__search-result-title jetpack-instant-search__search-result-minimal-title"},s().createElement(a.Z,{postType:t.post_type,shortcodeTypes:t.shortcode_types}),s().createElement("a",{className:"jetpack-instant-search__search-result-title-link jetpack-instant-search__search-result-minimal-title-link",href:`//${t["permalink.url.raw"]}`,onClick:this.props.onClick,dangerouslySetInnerHTML:{__html:r.title}})),n?this.renderNoMatchingContent():this.renderMatchingContent(),s().createElement(c.Z,{comments:r&&r.comments}))}}t.Z=l},6504:function(e,t,r){"use strict";r(3679);var n=r(9196),s=r.n(n),o=r(5736),i=r(1180),a=r(1459),c=r(6565),l=r(4682);const __=o.__;class u extends n.Component{render(){var e;const{result_type:t,fields:r,highlight:n}=this.props.result;if("post"!==t)return null;const o=Array.isArray(r["image.url.raw"])?r["image.url.raw"][0]:r["image.url.raw"],u=Array.isArray(n.title)&&n.title[0].length>0?n.title[0]:__("No title","jetpack-search-pkg"),p="string"==typeof this.props.searchQuery&&""!==this.props.searchQuery.trim(),h=u.includes("<mark>"),d=p&&!h&&Array.isArray(n.content)&&(null===(e=n.content[0])||void 0===e?void 0:e.length)>0;return s().createElement("li",{className:"jetpack-instant-search__search-result jetpack-instant-search__search-result-product"},s().createElement("a",{className:"jetpack-instant-search__search-result-product-img-link",href:`//${r["permalink.url.raw"]}`,onClick:this.props.onClick},s().createElement("div",{className:"jetpack-instant-search__search-result-product-img-container "+(o?"":"jetpack-instant-search__search-result-product-img-container--placeholder")},o?s().createElement(a.Z,{alt:r["image.alt_text"],className:"jetpack-instant-search__search-result-product-img",isPhotonEnabled:this.props.isPhotonEnabled,src:`//${o}`}):s().createElement("div",{className:"jetpack-instant-search__search-result-product-img"},s().createElement(i.Z,{icon:"block",style:{}}),s().createElement(i.Z,{icon:"image",style:{},title:__("Does not have an image","jetpack-search-pkg")})))),s().createElement("h3",{className:"jetpack-instant-search__search-result-title jetpack-instant-search__search-result-product-title"},s().createElement("a",{className:"jetpack-instant-search__search-result-title-link",href:`//${r["permalink.url.raw"]}`,onClick:this.props.onClick,dangerouslySetInnerHTML:{__html:u}})),s().createElement(l.Z,{price:r["wc.price"],salePrice:r["wc.sale_price"],formattedPrice:r["wc.formatted_price"],formattedRegularPrice:r["wc.formatted_regular_price"],formattedSalePrice:r["wc.formatted_sale_price"]}),!!r["meta._wc_average_rating.double"]&&s().createElement(c.Z,{count:r["meta._wc_review_count.long"],rating:r["meta._wc_average_rating.double"],permalink:`//${r["permalink.url.raw"]}`}),d&&s().createElement("div",{className:"jetpack-instant-search__search-result-product-match"},s().createElement("mark",null,s().createElement(i.Z,{icon:"search",style:{},title:!1}),s().createElement("span",null,"comment"in n?__("Matches comments","jetpack-search-pkg"):__("Matches content","jetpack-search-pkg",0)))))}}t.Z=u},8192:function(e,t,r){"use strict";var n=r(2402),s=r.n(n),o=r(8294),i=r.n(o),a=r(9196),c=r.n(a),l=r(122),u=r(1954),p=r(6504),h=r(8050),d=r(9755);class f extends a.Component{constructor(){super(...arguments),i()(this,"onClick",(()=>{this.props.railcar&&(0,h.Lo)({...this.getCommonTrainTracksProps(),action:"click"})}))}componentDidMount(){this.props.railcar&&(0,h.Sn)(this.getCommonTrainTracksProps())}componentDidUpdate(e){this.props.railcar!==e.railcar&&this.props.railcar&&(0,h.Sn)(this.getCommonTrainTracksProps())}getCommonTrainTracksProps(){return{fetch_algo:this.props.railcar.fetch_algo,fetch_position:this.props.railcar.fetch_position,fetch_query:this.props.railcar.fetch_query,railcar:this.props.railcar.railcar,rec_blog_id:this.props.railcar.rec_blog_id,rec_post_id:this.props.railcar.rec_post_id,session_id:this.props.railcar.session_id,ui_algo:"jetpack-instant-search-ui/v1",ui_position:this.props.index}}render(){if(this.props.resultFormat===d.LI)return c().createElement(p.Z,s()({onClick:this.onClick},this.props));if(this.props.resultFormat===d.Pz){const e=this.props.staticFilters&&this.props.staticFilters.group_id&&this.props.staticFilters.group_id!==d.Bk;return c().createElement(u.Z,s()({onClick:this.onClick},this.props,{isMultiSite:e}))}return c().createElement(l.Z,s()({onClick:this.onClick},this.props))}}t.Z=f},2975:function(e,t,r){"use strict";var n=r(8294),s=r.n(n),o=r(5736),i=r(9196),a=r.n(i),c=r(1180),l=r(4741),u=r(423),p=r(7704),h=r(9988),d=r(8192),f=r(4524),m=r(5825),g=r(1547),v=r(9755);const __=o.__,_n=o._n;class y extends i.Component{constructor(){super(...arguments),s()(this,"state",{shouldShowMobileSecondary:!1}),s()(this,"toggleMobileSecondary",(e=>{"click"!==e.type&&("keydown"!==e.type||"Enter"!==e.key&&" "!==e.key)||(" "===e.key&&e.preventDefault(),this.setState((e=>({shouldShowMobileSecondary:!e.shouldShowMobileSecondary}))))})),s()(this,"closeOverlay",(e=>{e.preventDefault(),this.props.closeOverlay()})),s()(this,"onKeyPressHandler",(e=>{"Enter"===e.key&&(e.preventDefault(),this.props.closeOverlay())}))}hasFilterOptions(){var e,t;let r=[...this.props.widgets];return(null===(e=this.props.widgetOutsideOverlay)||void 0===e||null===(t=e.filters)||void 0===t?void 0:t.length)>0&&(r=[this.props.widgetOutsideOverlay,...r]),r.length>0}getSearchTitle(){const{total:e=0,corrected_query:t=!1}=this.props.response,r=""!==this.props.searchQuery,n=!1!==t,s=(new Intl.NumberFormat).format(e),i=this.props.staticFilters&&this.props.staticFilters.group_id&&this.props.staticFilters.group_id!==v.Bk;if(this.props.isLoading)return r?__("Searching…","jetpack-search-pkg",0):__("Loading popular results…","jetpack-search-pkg");if(0===e||this.props.hasError)return __("No results found","jetpack-search-pkg");if(r&&n)return(0,o.sprintf)( +/* translators: %1$s: number of results. %2$s: the corrected search query. */ +_n('Found %1$s result for "%2$s"','Found %1$s results for "%2$s"',e,"jetpack-search-pkg"),s,t);if(i){var a;const t=(0,g.bA)().filter((e=>"group_id"===e.filter_id)),r=1===t.length&&t[0].values?t[0].values.filter((e=>e.value!==v.Bk)):{},n=null!==(a=r[0])&&void 0!==a&&a.name?r[0].name:__("All P2","jetpack-search-pkg");return(0,o.sprintf)( +/* translators: %1$s: number of results. - %2$s: site name. */ +_n("Found %1$s result in %2$s","Found %1$s results in %2$s",e,"jetpack-search-pkg"),s,n)}return r?(0,o.sprintf)( +/* translators: %s: number of results. */ +_n("Found %s result","Found %s results",e,"jetpack-search-pkg"),s,this.props.searchQuery):__("Showing popular results","jetpack-search-pkg")}renderPrimarySection(){const{highlightColor:e,searchQuery:t}=this.props,{results:r=[],total:n=0,corrected_query:s=!1}=this.props.response,c=(0,m.B)(e),p=!1!==s,h=n>0;return a().createElement(i.Fragment,null,a().createElement("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t\t\t\t.jetpack-instant-search *::selection,\n\t\t\t\t\t\t\t.jetpack-instant-search .jetpack-instant-search__search-results .jetpack-instant-search__search-results-primary .jetpack-instant-search__search-result mark {\n\t\t\t\t\t\t\t\tcolor: ${c};\n\t\t\t\t\t\t\t\tbackground-color: ${e};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t`}}),a().createElement("h2",{className:"jetpack-instant-search__search-results-title"},this.getSearchTitle()),h&&p&&a().createElement("p",{className:"jetpack-instant-search__search-results-unused-query"}, +/* translators: %s: Search query. */ +(0,o.sprintf)(__('No results for "%s"',"jetpack-search-pkg"),t)),this.props.hasError&&a().createElement(l.Z,{type:"warning"},__("It looks like you're offline. Please reconnect for results.","jetpack-search-pkg")),h&&!this.props.hasError&&this.props.response._isOffline&&a().createElement(l.Z,{type:"warning"},__("It looks like you're offline. Please reconnect to load the latest results.","jetpack-search-pkg")),h&&!this.props.hasError&&a().createElement("ol",{className:`jetpack-instant-search__search-results-list is-format-${this.props.resultFormat}`},r.map(((e,t)=>a().createElement(d.Z,{index:t,key:t,staticFilters:this.props.staticFilters,isPhotonEnabled:this.props.isPhotonEnabled,locale:this.props.locale,railcar:this.props.isVisible?e.railcar:null,result:e,resultFormat:this.props.resultFormat,searchQuery:this.props.searchQuery})))),h&&this.props.hasNextPage&&a().createElement("div",{className:"jetpack-instant-search__search-results-pagination"},a().createElement(u.Z,{enableLoadOnScroll:this.props.enableLoadOnScroll,isLoading:this.props.isLoading,onLoadNextPage:this.props.onLoadNextPage})))}renderSecondarySection(){return a().createElement(f.Z,{filters:this.props.filters,staticFilters:this.props.staticFilters,isLoading:this.props.isLoading,locale:this.props.locale,postTypes:this.props.postTypes,response:this.props.response,showPoweredBy:this.props.showPoweredBy,widgets:this.props.widgets,widgetOutsideOverlay:this.props.widgetOutsideOverlay})}render(){return a().createElement("div",{"aria-hidden":!0===this.props.isLoading,className:"jetpack-instant-search__search-results"},a().createElement("div",{className:"jetpack-instant-search__search-results-controls",role:"form"},a().createElement(h.Z,{"aria-controls":"jetpack-instant-search__search-results-content",className:"jetpack-instant-search__search-results-search-form",isVisible:this.props.isVisible,onChangeSearch:this.props.onChangeSearch,searchQuery:this.props.searchQuery}),a().createElement("button",{className:"jetpack-instant-search__overlay-close",onClick:this.closeOverlay,onKeyPress:this.onKeyPressHandler,tabIndex:"0","aria-label":__("Close search results","jetpack-search-pkg")},a().createElement(c.Z,{icon:"cross",size:"24","aria-hidden":"true",focusable:"false"}))),a().createElement(p.Z,{enableSort:this.props.enableSort,onChangeSort:this.props.onChangeSort,resultFormat:this.props.resultFormat,sort:this.props.sort},(this.hasFilterOptions()||this.props.hasNonSearchWidgets)&&a().createElement("div",{role:"button",onClick:this.toggleMobileSecondary,onKeyDown:this.toggleMobileSecondary,tabIndex:"0",className:"jetpack-instant-search__search-results-filter-button"},__("Filters","jetpack-search-pkg"),a().createElement(c.Z,{icon:"chevron-down",size:16,alt:__("Show search filters","jetpack-search-pkg"),"aria-hidden":"true"}),a().createElement("span",{className:"screen-reader-text assistive-text"},this.state.shouldShowMobileSecondary?__("Hide filters","jetpack-search-pkg"):__("Show filters","jetpack-search-pkg")))),a().createElement("div",{"aria-live":"polite",className:"jetpack-instant-search__search-results-content",id:"jetpack-instant-search__search-results-content"},a().createElement("div",{className:"jetpack-instant-search__search-results-primary"},this.renderPrimarySection()),a().createElement("div",{className:["jetpack-instant-search__search-results-secondary",(this.state.shouldShowMobileSecondary?"jetpack-instant-search__search-results-secondary--show-as-modal":"")+" "].join(" ")},this.renderSecondarySection())))}}t.Z=y},9873:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(8294),s=r.n(n),o=r(9196),i=r.n(o),a=r(5736),c=r(343);const __=a.__;class l extends o.Component{constructor(){super(...arguments),s()(this,"handleKeyPress",(e=>{this.props.value!==e.currentTarget.value&&"Enter"===e.key&&(e.preventDefault(),this.props.onChange(e.currentTarget.dataset.value))})),s()(this,"handleClick",(e=>{this.props.value!==e.currentTarget.value&&(e.preventDefault(),this.props.onChange(e.currentTarget.dataset.value))})),s()(this,"handleSelectChange",(e=>{this.props.value!==e.currentTarget.value&&(e.preventDefault(),this.props.onChange(e.currentTarget.value))}))}render(){const e=(0,c.n)(this.props.resultFormat);return e.size>3?i().createElement("div",{"aria-controls":"jetpack-instant-search__search-results-content",className:"jetpack-instant-search__search-sort jetpack-instant-search__search-sort-with-select"},i().createElement("label",{htmlFor:"jetpack-instant-search__search-sort-select"},__("Sort:","jetpack-search-pkg")),i().createElement("select",{id:"jetpack-instant-search__search-sort-select",onBlur:this.handleSelectChange,onChange:this.handleSelectChange},[...e.entries()].map((e=>{let[t,r]=e;return i().createElement("option",{value:t,key:t,selected:this.props.value===t?"selected":""},r)})))):i().createElement("div",{"aria-controls":"jetpack-instant-search__search-results-content",className:"jetpack-instant-search__search-sort jetpack-instant-search__search-sort-with-links"},i().createElement("div",{className:"screen-reader-text"},__("Sort by: ","jetpack-search-pkg")),[...e.entries()].map((e=>{let[t,r]=e;return i().createElement("a",{className:"jetpack-instant-search__search-sort-option "+(this.props.value===t?"is-selected":""),"data-value":t,key:t,onClick:this.handleClick,onKeyPress:this.handleKeyPress,role:"button",tabIndex:0},r)})))}}},4524:function(e,t,r){"use strict";var n=r(9196),s=r.n(n),o=r(1850),i=r(1631),a=r(5181),c=r(8852);t.Z=e=>s().createElement("div",{className:"jetpack-instant-search__sidebar"},s().createElement(i.Z,{filters:e.filters,staticFilters:e.staticFilters,loading:e.isLoading,locale:e.locale,postTypes:e.postTypes,results:e.response,showClearFiltersButton:!0,widget:e.widgetOutsideOverlay}),s().createElement(a.Z,null),e.widgets.map((t=>(0,o.createPortal)(s().createElement("div",{id:`${t.widget_id}-portaled-wrapper`,className:"jetpack-instant-search__portaled-wrapper"},s().createElement(i.Z,{filters:e.filters,staticFilters:e.staticFilters,loading:e.isLoading,locale:e.locale,postTypes:e.postTypes,results:e.response,showClearFiltersButton:!1,showTitle:!1,widget:t})),document.getElementById(`${t.widget_id}-wrapper`)))),e.showPoweredBy&&s().createElement(c.Z,{locale:e.locale}))},5181:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(8294),s=r.n(n),o=r(9196),i=r.n(o);class a extends o.Component{constructor(){super(...arguments),s()(this,"container",(0,o.createRef)())}componentDidMount(){const e=document.getElementsByClassName("jetpack-instant-search__widget-area")[0];e&&(e.style.removeProperty("display"),this.container.current.appendChild(e))}shouldComponentUpdate(){return!1}render(){return i().createElement("div",{className:"jetpack-instant-search__widget-area-container",ref:this.container})}}},564:function(e,t,r){"use strict";function n(e,t,r){if(!e)return"";const n=decodeURIComponent(e);return(!t||"false"!==n)&&(!(!t||"true"!==n)||(r&&0*+n==0?+n:n))}function s(e,t,r){let s,o;const i={},a=e.split("&");for(t=void 0===t||t,r=void 0===r||r;s=a.shift();)s=s.split("="),o=s.shift(),void 0!==i[o]?i[o]=[].concat(i[o],n(s.shift(),t,r)):i[o]=n(s.shift(),t,r);return i}r.d(t,{J:function(){return s}})},5476:function(e,t,r){"use strict";r.d(t,{Wb:function(){return f},a5:function(){return d},yC:function(){return x}});r(3679);var n=r(8750),s=r(5731),o=r(7390),i=r.n(o),a=r(9353),c=r(1547),l=r(9755);let u;const p=(0,a.Z)(30,5*l.AG),h=(0,a.Z)(30,30*l.AG);function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={};return e.forEach((e=>{let{filters:r}=e;return r.forEach((e=>{t[e.filter_id]=m(e)}))})),t}function f(e){var t;return e=null!==(t=e)&&void 0!==t?t:{},Object.fromEntries(Object.entries(e).filter((e=>{var t;let[,r]=e;return(null==r||null===(t=r.buckets)||void 0===t?void 0:t.length)>0})).map((e=>{let[t,r]=e;const n=r.buckets.map((e=>({...e,doc_count:0})));return[t,{...r,buckets:n}]})))}function m(e){switch(e.type){case"date_histogram":return{date_histogram:{field:"post_date_gmt"===e.field?"date_gmt":"date",interval:e.interval}};case"taxonomy":{let t=`taxonomy.${e.taxonomy}.slug_slash_name`;return"post_tag"===e.taxonomy?t="tag.slug_slash_name":"category"===e.taxonomy&&(t="category.slug_slash_name"),{terms:{field:t,size:e.count}}}case"post_type":return{terms:{field:e.type,size:e.count}}}}C();const g=/(\d{4})-(\d{2})-(\d{2})/;function v(e,t,r){let n,s;"year"===r&&([,n,,]=t.match(g)),"month"===r&&([,n,s]=t.match(g));let o="",i="";if(s){const e=+s+1,t=e<10?`0${e}`:`${e}`;o=`${n}-${s}-01`,i=e<=12?`${n}-${t}-01`:+n+1+"-01-01"}else n&&(o=`${n}-01-01`,i=+n+1+"-01-01");return{range:{[e]:{gte:o,lt:i}}}}const y=new Map([["post_types",e=>({term:{post_type:e}})],["category",e=>({term:{"category.slug":e}})],["post_tag",e=>({term:{"tag.slug":e}})],["month_post_date",e=>v("date",e,"month")],["month_post_date_gmt",e=>v("date_gmt",e,"month")],["month_post_modified",e=>v("date",e,"month")],["month_post_modified_gmt",e=>v("date_gmt",e,"month")],["year_post_date",e=>v("date",e,"year")],["year_post_date_gmt",e=>v("date_gmt",e,"year")],["year_post_modified",e=>v("date",e,"year")],["year_post_modified_gmt",e=>v("date_gmt",e,"year")]]);function _(e){const t={};return Object.keys(e).forEach((r=>{const n=e[r];"group_id"===r&&n!==l.Bk&&(t[r]=n)})),t}function b(e,t,r){const n={bool:{must:[]}};return(0,c.wP)().filter((t=>{return r=e[t],Array.isArray(r)&&r.length>0;var r})).forEach((t=>{e[t].forEach((e=>{y.has(t)?n.bool.must.push(y.get(t)(e)):n.bool.must.push({term:{[`taxonomy.${t}.slug`]:e}})}))})),t&&n.bool.must.push(t),(null==r?void 0:r.length)>0&&n.bool.must.push({bool:{must_not:r.map((e=>y.get("post_types")(e)))}}),n}const E=new Map([["oldest","date_asc"],["newest","date_desc"],["relevance","score_default"]]);function w(e){return["price_asc","price_desc","rating_desc"].includes(e)?e:E.get(e,"score_default")}function k(e){let{aggregations:t,excludedPostTypes:r,filter:o,staticFilters:i,pageHandle:a,query:c,resultFormat:u,sort:p,postsPerPage:h=10,adminQueryFilter:d,isInCustomizer:f=!1}=e;null===c&&(c="");let m=["date","permalink.url.raw","tag.name.default","category.name.default","post_type","shortcode_types"];(u!==l.TZ||f)&&(m=m.concat(["has.image","image.url.raw","image.alt_text"])),(u===l.LI||f)&&(m=m.concat(["meta._wc_average_rating.double","meta._wc_review_count.long","wc.formatted_price","wc.formatted_regular_price","wc.formatted_sale_price","wc.price","wc.sale_price"])),i&&i.group_id&&i.group_id!==l.Bk&&(m=m.concat(["author","blog_name","blog_icon_url"]));let g={aggregations:t,fields:m,highlight_fields:["title","content","comments"],filter:b(o,d,r),query:encodeURIComponent(c),sort:w(p),page_handle:a,size:h};return i&&Object.keys(i).length>0&&(g={...g,..._(i)}),(0,n.c)((0,s.x)(g))}function S(e){return function(t){const r=p.get(e)||h.get(e);if("AbortError"===t.name)return r?{_isCached:!0,_isError:!1,_isOffline:!1,...r}:null;if(r)return{_isCached:!0,_isError:!0,_isOffline:!1,...r};throw t}}function j(e,t){return function(r){const n={...r,requestId:t};return p.set(e,n),h.set(e,n),n}}function C(){u&&u.abort(),u=new AbortController}function x(e,t){const r=i()(Array.from(arguments));if(!navigator.onLine&&h.get(r))return Promise.resolve(h.get(r)).then((e=>({_isCached:!0,_isError:!1,_isOffline:!0,...e})));if(p.get(r))return Promise.resolve(p.get(r)).then((e=>({_isCached:!0,_isError:!1,_isOffline:!1,...e})));const n=k(e),s=S(r),o=j(r,t),a=`/sites/${e.siteId}/search?${n}`,{apiNonce:c,apiRoot:d,homeUrl:f,isPrivateSite:m,isWpcom:g}=window[l.W1],v=`https://public-api.wordpress.com/rest/v1.3${a}`,y=`${f}/wp-json/wpcom-origin/v1.3${a}`,_=`${d}jetpack/v4/search?${n}`;let b=v;return m&&g?b=y:m&&(b=_),C(),fetch(b,{headers:m?{"X-WP-Nonce":c}:{},credentials:m?"include":"same-origin",signal:u.signal}).then((e=>200!==e.status?Promise.reject(`Unexpected response from API with status code ${e.status}.`):e)).then((e=>e.json())).then(o).catch(s)}},2601:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});r(3679);function n(e,t){Array.isArray(e)||(e=[e]);return 0!==e.filter((e=>t.includes(e))).length}},5825:function(e,t,r){"use strict";function n(e){const t=function(e){let t;return"#"===e[0]&&(t=e.substring(1)),3===t.length&&(t=t.split("").map((e=>`${e}${e}`)).join("")),t}(e);return(299*parseInt(t.substr(0,2),16)+587*parseInt(t.substr(2,2),16)+114*parseInt(t.substr(4,2),16))/1e3>=128?"black":"white"}r.d(t,{B:function(){return n}})},9755:function(e,t,r){"use strict";r.d(t,{AG:function(){return p},Bk:function(){return s},LI:function(){return u},PP:function(){return h},Pz:function(){return c},TZ:function(){return l},W1:function(){return o},aP:function(){return g},bk:function(){return m},kQ:function(){return f},oy:function(){return a},rs:function(){return v},yb:function(){return d},zg:function(){return i}});var n=r(5736);const __=n.__,s="__NO_GROUP__",o="JetpackInstantSearchOptions",i="jetpack-instant-search__overlay",a="ASC",c="expanded",l="minimal",u="product",p=6e4,h="relevance",d=1e3,f=["newest","oldest",h,"price_asc","price_desc","rating_desc"],m=[c,l,u],g=new Map([[h,__("Relevance","jetpack-search-pkg")],["newest",__("Newest","jetpack-search-pkg")],["oldest",__("Oldest","jetpack-search-pkg")]]),v=new Map([["price_asc",__("Price: low to high","jetpack-search-pkg")],["price_desc",__("Price: high to low","jetpack-search-pkg")],["rating_desc",__("Rating","jetpack-search-pkg")]])},4184:function(e,t,r){"use strict";r.d(t,{Em:function(){return i},vJ:function(){return a}});var n=r(9755);const s=new Map([["jetpack_search_color_theme","colorTheme"],["jetpack_search_enable_sort","enableSort"],["jetpack_search_highlight_color","highlightColor"],["jetpack_search_inf_scroll","enableInfScroll"],["jetpack_search_overlay_trigger","overlayTrigger"],["jetpack_search_show_powered_by","showPoweredBy"],["jetpack_search_result_format","resultFormat"]]);function o(){var e,t;return"function"==typeof(null===(e=window)||void 0===e||null===(t=e.wp)||void 0===t?void 0:t.customize)}function i(e){o()&&window.addEventListener("message",(t=>{var r;t.data&&t.target===window&&"jetpackSearchSectionOpen"===(null===(r=t.data)||void 0===r?void 0:r.key)&&"expanded"in t.data&&e(t.data.expanded)}))}function a(e){o()&&s.forEach(((t,r)=>{window.wp.customize(r,(r=>{r.bind((function(r){const s={[t]:r};window[n.W1].showResults=!0,window[n.W1].overlayOptions={...window[n.W1].overlayOptions,...s},e&&e(s)}))}))}))}},2160:function(e,t,r){"use strict";function n(e){return[...e.querySelectorAll('input[type="checkbox"]').values()].filter((e=>e.checked)).map((e=>e.name))}function s(e){const t={searchInputSelector:['input[name="s"]:not(.jetpack-instant-search__box-input)',"#searchform input.search-field:not(.jetpack-instant-search__box-input)",".search-form input.search-field:not(.jetpack-instant-search__box-input)",".searchform input.search-field:not(.jetpack-instant-search__box-input)"].join(", "),filterInputSelector:["a.jetpack-search-filter__link"],overlayTriggerSelector:[".jetpack-instant-search__open-overlay-button","header#site-header .search-toggle[data-toggle-target]"].join(",")};return e.theme_options?{...t,...e.theme_options}:t}r.d(t,{C:function(){return s},b:function(){return n}})},1547:function(e,t,r){"use strict";r.d(t,{$s:function(){return h},bA:function(){return i},do:function(){return l},i3:function(){return a},jZ:function(){return p},jc:function(){return d},wP:function(){return o}});r(3679);var n=r(9755);const s=Object.freeze(["post_types","category","post_format","post_tag","month_post_date","month_post_date_gmt","month_post_modified","month_post_modified_gmt","year_post_date","year_post_date_gmt","year_post_modified","year_post_modified_gmt"]);function o(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(e=window[n.W1])||void 0===e?void 0:e.widgets,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=window[n.W1])||void 0===t?void 0:t.widgetsOutsideOverlay;const i=new Set(s);return[...null!=r?r:[],...null!=o?o:[]].map((e=>e.filters)).filter((e=>Array.isArray(e))).reduce(((e,t)=>e.concat(t)),[]).filter((e=>"taxonomy"===e.type)).forEach((e=>i.add(e.taxonomy))),[...i]}function i(){var e;return null!==(e=window[n.W1])&&void 0!==e&&e.staticFilters?window[n.W1].staticFilters:[]}function a(){const e=i(),t=new Set;return e.forEach((e=>t.add(e.filter_id))),[...t]}function c(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(e=window[n.W1])||void 0===e?void 0:e.widgets;return null!==(t=null==r?void 0:r.map(u).reduce(((e,t)=>e.concat(t)),[]))&&void 0!==t?t:[]}function l(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(e=window[n.W1])||void 0===e?void 0:e.widgets;const r=c(t);return o().filter((e=>!r.includes(e)))}function u(e){return e.filters.map(p).filter((e=>"string"==typeof e))}function p(e){return"date_histogram"===e.type?`${e.interval}_${e.field}`:"taxonomy"===e.type?`${e.taxonomy}`:"post_type"===e.type?"post_types":"group"===e.type?e.filter_id:null}function h(e){return e.includes("month")?{field:e.split("month_").pop(),type:"date_histogram",interval:"month"}:e.includes("year")?{field:e.split("year_").pop(),type:"date_histogram",interval:"year"}:"post_types"===e?{type:"post_type"}:"group"===e?{type:"group"}:{type:"taxonomy",taxonomy:e}}function d(e){return"date_histogram"===e.type?"date":"taxonomy"===e.type?"taxonomy":"post_type"===e.type?"postType":"group"===e.type?"group":void 0}},9087:function(e,t,r){"use strict";r.d(t,{y:function(){return i}});r(3679);var n=r(9424),s=r(9196);function o(e){return e?e.split("?",1)[0]:""}function i(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const[a,c]=(0,s.useState)(null),l=o(e),u=["gif","jpg","jpeg","png","webp"],p=null==l?void 0:l.substring(l.lastIndexOf(".")+1).toLowerCase(),h=u.includes(p);return(0,s.useEffect)((()=>{if(i&&h){const s=(0,n.Z)(l,{resize:`${t},${r}`});c(s||e)}else c(e)}),[e,t,r,i,l,h]),a}},6302:function(e,t,r){"use strict";r.d(t,{Q0:function(){return u},_L:function(){return c},pm:function(){return a},ug:function(){return l}});r(3679);var n=r(8750),s=r(9755),o=r(1547),i=r(564);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.search;return(0,i.J)(e.substring(1),!1,!1)}function c(e){!function(e){if(history.pushState){const t=new window.URL(window.location.href);window[s.W1]&&"homeUrl"in window[s.W1]&&(t.href=window[s.W1].homeUrl),t.search=e,window.history.pushState(null,null,t.toString())}}((0,n.c)(e))}function l(){const e=a();return s.bk.includes(e.result_format)?e.result_format:null}function u(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(history.pushState&&history.replaceState){const s=new URL(e),i=a(s.search),c=[...(0,o.wP)(),...(0,o.i3)(),"s","sort"],l=Object.keys(i).some((e=>c.includes(e)));if(l&&c.forEach((e=>delete i[e])),s.search=(0,n.c)(i),r?window.history.replaceState(null,null,s.toString()):window.history.pushState(null,null,s.toString()),l)return void window.location.reload();t()}}},343:function(e,t,r){"use strict";r.d(t,{n:function(){return s}});var n=r(9755);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e!==n.LI?n.aP:new Map([...n.aP,...n.rs])}},8050:function(e,t,r){"use strict";r.d(t,{AM:function(){return c},GE:function(){return h},IJ:function(){return o},Lo:function(){return p},Ny:function(){return l},Sn:function(){return u},tU:function(){return i},vy:function(){return a}});let n=!0;const s={};function o(){n=!1}function i(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||n)&&(window._tkq=window._tkq||[])}function a(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||n)&&window._tkq.push(["clearIdentity"])}function c(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(t||n)&&(s.blog_id=e)}function l(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(r||n)&&window._tkq.push(["recordEvent",e,{...s,...t}])}function u(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];l("jetpack_instant_search_traintracks_render",e,t)}function p(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];l("jetpack_instant_search_traintracks_interact",e,t)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];l("jetpack_instant_search_static_filter_select",e,t)}},8389:function(e,t,r){"use strict";function n(e){return{type:"MAKE_SEARCH_REQUEST",options:e}}function s(e){let{options:t,response:r}=e;return{type:"RECORD_SUCCESSFUL_SEARCH_REQUEST",options:t,response:r}}function o(e){return{type:"RECORD_FAILED_SEARCH_REQUEST",error:e}}function i(){let{isHistoryNavigation:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"INITIALIZE_QUERY_VALUES",isHistoryNavigation:e}}function a(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"SET_SEARCH_QUERY",query:e,propagateToWindow:t}}function c(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"SET_SORT",sort:e,propagateToWindow:t}}function l(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"SET_FILTER",name:e,value:t,propagateToWindow:r}}function u(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"SET_STATIC_FILTER",name:e,value:t,propagateToWindow:r}}function p(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"CLEAR_FILTERS",propagateToWindow:e}}function h(){return{type:"CLEAR_QUERY_VALUES"}}function d(){return{type:"DISABLE_QUERY_STRING_INTEGRATION"}}r.d(t,{C0:function(){return s},HD:function(){return c},K5:function(){return p},Ln:function(){return i},Mz:function(){return h},O1:function(){return u},OZ:function(){return d},Tv:function(){return l},Y6:function(){return o},ql:function(){return a},x1:function(){return n}})},4587:function(e,t,r){"use strict";r(3679);var n=r(3259),s=r.n(n),o=r(5476),i=r(9755),a=r(1547),c=r(6302),l=r(8389);let u=0,p=!0;const h=s()(c._L,i.yb);t.Z={CLEAR_FILTERS:function(e){if(!1===e.propagateToWindow||!p)return;const t=(0,c.pm)();(0,a.wP)().forEach((e=>delete t[e])),(0,a.i3)().forEach((e=>delete t[e])),(0,c._L)(t)},DISABLE_QUERY_STRING_INTEGRATION:function(){p=!1},INITIALIZE_QUERY_VALUES:function(e,t){const r=(0,c.pm)();let n;"s"in r?t.dispatch((0,l.ql)(r.s,!1)):t.dispatch((0,l.ql)(null,!1)),i.kQ.includes(r.sort)?n=r.sort:"date"===r.orderby?n="string"==typeof r.order&&r.order.toUpperCase()===i.oy?"oldest":"newest":"relevance"===r.orderby&&(n="relevance"),"string"==typeof n&&t.dispatch((0,l.HD)(n,!1)),t.dispatch((0,l.K5)(!1)),(0,a.wP)().filter((e=>e in r)).forEach((e=>t.dispatch((0,l.Tv)(e,r[e],!1)))),(0,a.i3)().filter((e=>e in r)).forEach((e=>t.dispatch((0,l.O1)(e,r[e],!1))))},MAKE_SEARCH_REQUEST:function(e,t){u++,(0,o.yC)(e.options,u).then((r=>{null!==r&&t.dispatch((0,l.C0)({options:e.options,response:r}))})).catch((e=>{console.error("Jetpack Search encountered an error:",e),t.dispatch((0,l.Y6)(e))}))},SET_FILTER:function(e){if(!1===e.propagateToWindow||!p)return;if(!(0,a.wP)().includes(e.name))return;const t=(0,c.pm)();t[e.name]=e.value,(0,c._L)(t)},SET_STATIC_FILTER:function(e){if(!1===e.propagateToWindow)return;if(!(0,a.i3)().includes(e.name))return;const t=(0,c.pm)();t[e.name]=e.value,(0,c._L)(t)},SET_SEARCH_QUERY:function(e){if(!1===e.propagateToWindow||!p)return;const t=(0,c.pm)();null!==e.query?t.s=e.query:delete t.s,h(t)},SET_SORT:function(e){if(!1===e.propagateToWindow||!p)return;if(!i.kQ.includes(e.sort))return;const t=(0,c.pm)();t.sort=e.sort,delete t.order,delete t.orderby,(0,c._L)(t)}}},9379:function(e,t,r){"use strict";var n=r(835),s=r(4274),o=r.n(s),i=r(4587),a=r(4408);const c=[o()(i.Z)],l=(0,n.MT)(a.ZP,{},(0,n.md)(...c));t.Z=l},9267:function(e,t,r){"use strict";r.d(t,{hg:function(){return i},p:function(){return a},xT:function(){return o}});var n=r(5476);let s={};function o(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MAKE_SEARCH_REQUEST":case"RECORD_SUCCESSFUL_SEARCH_REQUEST":return!1;case"RECORD_FAILED_SEARCH_REQUEST":return!0}return e}function i(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MAKE_SEARCH_REQUEST":return!0;case"RECORD_SUCCESSFUL_SEARCH_REQUEST":case"RECORD_FAILED_SEARCH_REQUEST":return!1}return e}function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("RECORD_SUCCESSFUL_SEARCH_REQUEST"===t.type){if("requestId"in e&&"requestId"in t.response&&e.requestId>t.response.requestId)return e;const o={...t.response};var r;if(t.options.pageHandle&&(o.aggregations={..."aggregations"in e&&!Array.isArray(e)?e.aggregations:{},...Array.isArray(o.aggregations)?{}:o.aggregations},o.results=[..."results"in e?e.results:[],...o.results],s={}),Array.isArray(o.results)&&o.results.length>o.total&&(o.total=o.results.length),!t.options.pageHandle)(null===(r=o.results)||void 0===r?void 0:r.length)>0?s=(0,n.Wb)(o.aggregations):o.aggregations=s;return o}return e}},9049:function(e,t,r){"use strict";function n(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INITIALIZE_QUERY_VALUES":return t.isHistoryNavigation;case"SET_SEARCH_QUERY":case"SET_SORT":case"CLEAR_FILTERS":case"SET_FILTER":return!t.propagateToWindow&&e}return e}r.d(t,{w:function(){return n}})},4408:function(e,t,r){"use strict";var n=r(835),s=r(9267),o=r(4754),i=r(5188),a=r(9049);t.ZP=(0,n.UY)({filters:o.u8,staticFilters:o.OY,hasError:s.xT,isLoading:s.hg,isHistoryNavigation:a.w,response:s.p,searchQuery:o.w4,serverOptions:i.M,sort:o.DY})},4754:function(e,t,r){"use strict";r.d(t,{DY:function(){return i},OY:function(){return c},u8:function(){return a},w4:function(){return o}});r(3679);var n=r(9755),s=r(1547);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SEARCH_QUERY":return t.query;case"CLEAR_QUERY_VALUES":return null}return e}function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SORT":return n.kQ.includes(t.sort)?t.sort:e;case"CLEAR_QUERY_VALUES":return null}return e}function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_FILTERS":case"CLEAR_QUERY_VALUES":return{};case"SET_FILTER":if(!(0,s.wP)().includes(t.name)||!Array.isArray(t.value)&&"string"!=typeof t.value)return e;if(0===t.value.length){const r={...e};return delete r[t.name],r}return{...e,[t.name]:"string"==typeof t.value?[t.value]:t.value}}return e}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_QUERY_VALUES":return{};case"SET_STATIC_FILTER":return(0,s.i3)().includes(t.name)?{...e,[t.name]:t.value}:e}return e}},5188:function(e,t,r){"use strict";r.d(t,{M:function(){return s}});var n=r(9755);function s(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null!==(e=window[n.W1])&&void 0!==e?e:{};return t}},1530:function(e,t,r){"use strict";r.d(t,{Bk:function(){return h},Qy:function(){return a},ZN:function(){return f},Zj:function(){return p},ck:function(){return o},en:function(){return d},hg:function(){return c},r$:function(){return u},uP:function(){return l},wI:function(){return m},xT:function(){return i}});r(3679);var n=r(9755),s=r(1547);function o(e){return e.response}function i(e){return e.hasError}function a(e){var t;return!i(e)&&(null===(t=o(e))||void 0===t?void 0:t.page_handle)}function c(e){return e.isLoading}function l(e){return e.searchQuery}function u(e,t){return"string"!=typeof t&&(t=n.PP),"string"==typeof e.sort?e.sort:t}function p(e){return e.filters}function h(e){return e.staticFilters}function d(e){return null!==l(e)||function(e){return Object.keys(e.filters).length>0}(e)||function(e){return Object.keys(e.staticFilters).length>0}(e)||null!==e.sort}function f(e){if(!e.serverOptions.widgets||!e.filters)return{};const t=(0,s.do)(e.serverOptions.widgets);return{filters:Object.keys(e.filters).filter((e=>t.includes(e))).map(s.$s)}}function m(e){return e.isHistoryNavigation}},1128:function(e,t,r){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,s=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(s=n))})),t.splice(s,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(2942)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2942:function(e,t,r){r(875),e.exports=function(e){function t(e){let r,s,o,i=null;function a(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];if(!a.enabled)return;const o=a,i=Number(new Date),c=i-(r||i);o.diff=c,o.prev=r,o.curr=i,r=i,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");let l=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,((e,r)=>{if("%%"===e)return"%";l++;const s=t.formatters[r];if("function"==typeof s){const t=n[l];e=s.call(o,t),n.splice(l,1),l--}return e})),t.formatArgs.call(o,n);const u=o.log||t.log;u.apply(o,n)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(s!==t.namespaces&&(s=t.namespaces,o=t.enabled(e)),o),set:e=>{i=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(s),...t.skips.map(s).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),s=n.length;for(r=0;r<s;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(3171),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},9353:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});r(875);class n{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.first=null,this.items=Object.create(null),this.last=null,this.max=e,this.size=0,this.ttl=t}has(e){return e in this.items}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(e){if(this.has(e)){const t=this.items[e];delete this.items[e],this.size--,null!==t.prev&&(t.prev.next=t.next),null!==t.next&&(t.next.prev=t.prev),this.first===t&&(this.first=t.next),this.last===t&&(this.last=t.prev)}return this}evict(){const e=this.first;return delete this.items[e.key],this.first=e.next,this.first.prev=null,this.size--,this}get(e){let t;if(this.has(e)){const r=this.items[e];this.ttl>0&&r.expiry<=(new Date).getTime()?this.delete(e):(t=r.value,this.set(e,t,!0))}return t}keys(){return Object.keys(this.items)}set(e,t){let r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n||this.has(e)){if(r=this.items[e],r.value=t,!1===n&&(r.expiry=this.ttl>0?(new Date).getTime()+this.ttl:this.ttl),this.last!==r){const e=this.last,t=r.next,n=r.prev;this.first===r&&(this.first=r.next),r.next=null,r.prev=this.last,e.next=r,null!==n&&(n.next=t),null!==t&&(t.prev=n)}}else this.max>0&&this.size===this.max&&this.evict(),r=this.items[e]={expiry:this.ttl>0?(new Date).getTime()+this.ttl:this.ttl,key:e,prev:this.last,next:null,value:t},1==++this.size?this.first=r:this.last.next=r;return this.last=r,this}}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(isNaN(e)||e<0)throw new TypeError("Invalid max value");if(isNaN(t)||t<0)throw new TypeError("Invalid ttl value");return new n(e,t)}},9196:function(e){"use strict";e.exports=window.React},1850:function(e){"use strict";e.exports=window.ReactDOM},2819:function(e){"use strict";e.exports=window.lodash},2175:function(e){"use strict";e.exports=window.wp.blockEditor},5609:function(e){"use strict";e.exports=window.wp.components},7798:function(e){"use strict";e.exports=window.wp.coreData},9818:function(e){"use strict";e.exports=window.wp.data},9307:function(e){"use strict";e.exports=window.wp.element},5736:function(e){"use strict";e.exports=window.wp.i18n},444:function(e){"use strict";e.exports=window.wp.primitives},6483:function(e){"use strict";e.exports=window.wp.url},162:function(e){"use strict";e.exports=window.wp.viewport},2650:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{Z:function(){return n}})},255:function(e,t,r){"use strict";function n(){return n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}r.d(t,{Z:function(){return n}})},8617:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(2650);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}},7921:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,s={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(s[r]=e[r]);return s}r.d(t,{Z:function(){return n}})}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}(),function(){"use strict";var e=r(9307),t=r(5564);window.jetpackSearchConfigureInit=function(r){(0,e.render)(React.createElement(t.Z,null),document.getElementById(r))}}()}();
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.js.LICENSE.txt b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.js.LICENSE.txt new file mode 100644 index 00000000..1b9b0a99 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.js.LICENSE.txt @@ -0,0 +1,23 @@ +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ + +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v17.0.2 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.rtl.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.rtl.css new file mode 100644 index 00000000..3c05f60a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.rtl.css @@ -0,0 +1 @@ +.jetpack-instant-search__overlay{background:rgba(29,35,39,.7);bottom:0;box-sizing:border-box;color:#00101c;font-size:16px;left:0;opacity:1;overflow-x:hidden;overflow-y:auto;position:fixed;right:0;top:0;transition:opacity .1s ease-in;z-index:9999999999999}body.jps-theme-argent .jetpack-instant-search__overlay *{font-family:Helvetica,sans-serif}@media(max-width:767.98px){.jetpack-instant-search__overlay{padding:3em 1em}}@media(max-width:575.98px){.jetpack-instant-search__overlay{padding:0}}@media(min-width:768px){.jetpack-instant-search__overlay{padding:3em}}.jetpack-instant-search__overlay.is-hidden{background:transparent;opacity:0;visibility:hidden}.jetpack-instant-search__overlay *,.jetpack-instant-search__overlay :after,.jetpack-instant-search__overlay :before{box-sizing:inherit}@media print{.jetpack-instant-search__overlay.is-hidden{display:none}}.gridicon{fill:currentColor;display:inline-block}.gridicon.needs-offset g{transform:translate(-1px,1px)}.gridicon.needs-offset-x g{transform:translate(-1px)}.gridicon.needs-offset-y g{transform:translateY(1px)}.jetpack-instant-search__notice{font-size:14px;margin:1em 0;padding:.75em}.jetpack-instant-search__notice.jetpack-instant-search__notice--warning{background-color:#f5e6b3;color:#4f3500}.jetpack-instant-search__notice .gridicon{margin-left:.5em;margin-top:-5px;vertical-align:middle}.jetpack-instant-search__scroll-button{border:0;box-shadow:none;font-size:13px;outline:0}.jetpack-instant-search__search-sort{align-items:center;display:flex}.jetpack-instant-search__search-sort>label[for=jetpack-instant-search__search-sort-select]{flex-shrink:0;font-size:1em;font-weight:700;margin:0 0 0 .25em}.jetpack-instant-search__search-sort-with-links{font-size:13px}@media(max-width:575.98px){.jetpack-instant-search__search-sort-with-select{margin-left:1em;width:100%}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-sort-with-select{margin-left:0}}@media(min-width:992px){.jetpack-instant-search__search-sort-with-select{margin-top:-4px}}#jetpack-instant-search__search-sort-select{-webkit-appearance:auto;appearance:auto;background:#fff;border:1px solid #e6f1f5;border-radius:5px;color:#00101c;font-size:1em;height:inherit;padding:.25em}@media(max-width:575.98px){#jetpack-instant-search__search-sort-select{padding:.5em;width:100%}}.jetpack-instant-search__search-sort-option{color:#646970;cursor:pointer;padding:0 2px;text-decoration:none}.jetpack-instant-search__search-sort-option:after{color:#646970;content:"·";font-weight:400;padding-right:5px}.jetpack-instant-search__search-sort .jetpack-instant-search__search-sort-option:focus,.jetpack-instant-search__search-sort .jetpack-instant-search__search-sort-option:hover{text-decoration:none}.jetpack-instant-search__search-sort-option:last-child:after{content:""}.jetpack-instant-search__search-sort-option.is-selected{color:#044b7a;font-weight:600;text-decoration:none}.jetpack-instant-search__search-form-controls{align-items:center;display:flex;line-height:1.3;margin-left:56px;margin-right:56px;margin-top:16px;z-index:1}@media(max-width:991.98px){.jetpack-instant-search__search-form-controls{flex-direction:row-reverse;justify-content:space-between;left:0;margin-left:40px;margin-right:40px;position:relative;right:0}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-form-controls{flex-direction:row-reverse;justify-content:space-between;left:0;margin-left:40px;margin-right:40px;position:relative;right:0}}@media(max-width:767.98px){.jetpack-instant-search__search-form-controls{margin-left:20px;margin-right:20px}}@media(min-width:992px){.jetpack-instant-search__search-form-controls{left:320px;position:absolute}}@media(min-width:1200px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-form-controls{left:320px;position:absolute}}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-form-controls{left:0}.jetpack-instant-search__box{border-bottom:1px solid #e6f1f5;border-left:1px solid #e6f1f5}.jetpack-instant-search__box-label{align-items:center;display:flex;flex:0 0 100%;margin:0}input.jetpack-instant-search__box-input.search-field{-webkit-appearance:none;appearance:none;background:#fff;border:0;box-shadow:none;color:#3c434a;font-size:18px;height:60px;line-height:1;margin:0;max-width:none;padding:0 14px;text-indent:32px;vertical-align:middle}input.jetpack-instant-search__box-input.search-field:focus,input.jetpack-instant-search__box-input.search-field:hover{background:#fff;color:#00101c}input.jetpack-instant-search__box-input.search-field.search-field{letter-spacing:-.02em;padding-right:0;text-indent:0}.jetpack-instant-search__box-gridicon{align-items:center;display:flex;flex-shrink:0;height:60px;justify-content:center;position:relative;right:0;top:0;width:60px;z-index:1}.jetpack-instant-search__box-gridicon svg{fill:#646970}.jetpack-instant-search__box input[type=button]{word-wrap:normal;border:none;border-radius:0;color:#646970;cursor:pointer;font-size:1em;font-weight:400;height:60px;line-height:1;margin:0 0 0 .25em;padding:0;text-decoration:none;text-shadow:none;text-transform:none;transition:all .1s linear;width:60px}.jetpack-instant-search__box input[type=button],.jetpack-instant-search__box input[type=button]:focus,.jetpack-instant-search__box input[type=button]:hover{-webkit-appearance:none;appearance:none;background:none;box-shadow:none;outline:none}.jetpack-instant-search__box input[type=button]:focus,.jetpack-instant-search__box input[type=button]:hover{color:#3c434a}.jetpack-instant-search__box input[type=button]:focus{outline:1px dotted}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input{border:none;box-shadow:none;height:52px;outline-style:none;transition:color .15s ease-in-out,border-color .25s ease-in-out;width:100%}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input:focus,.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input:hover{border:none;box-shadow:none;outline-style:none}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-webkit-search-results-button,.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-webkit-search-results-decoration{appearance:none;-webkit-appearance:none;display:initial}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-webkit-search-cancel-button{display:none}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-ms-clear,.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-ms-reveal{display:none}.jetpack-instant-search__path-breadcrumb{font-size:.9em;margin:0;max-width:calc(100vw - 2em);overflow-x:hidden;text-overflow:ellipsis}.jetpack-instant-search__path-breadcrumb-link{max-width:100%;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.jetpack-instant-search__path-breadcrumb-link:focus,.jetpack-instant-search__path-breadcrumb-link:hover{text-decoration:underline}.jetpack-instant-search__path-breadcrumb,.jetpack-instant-search__path-breadcrumb-link{color:#3c434a}.jetpack-instant-search__search-result-comments{border-right:2px solid #f0f0f1;font-size:.9em;margin-right:8px;margin-top:16px;padding-right:16px;word-break:break-word}.jetpack-instant-search__search-result-comments .gridicon{margin-left:8px;vertical-align:middle}.jetpack-instant-search__search-result-title.jetpack-instant-search__search-result-minimal-title{margin-bottom:.4em}.jetpack-instant-search__search-result-title.jetpack-instant-search__search-result-minimal-title .gridicon{margin-left:8px}.jetpack-instant-search__search-result-minimal-cats-and-tags{display:flex;flex-flow:row wrap;font-size:.9375em}.jetpack-instant-search__search-result-minimal-cats,.jetpack-instant-search__search-result-minimal-tags{display:flex;flex-flow:row wrap;list-style-type:none;margin:0;padding:0}.jetpack-instant-search__search-result-minimal-cat,.jetpack-instant-search__search-result-minimal-tag{margin:0 0 0 .75em}.jetpack-instant-search__search-result-minimal-cat .gridicon,.jetpack-instant-search__search-result-minimal-tag .gridicon{margin-left:.25em}.jetpack-instant-search__search-result-minimal-cat .gridicon,.jetpack-instant-search__search-result-minimal-cat-text,.jetpack-instant-search__search-result-minimal-tag .gridicon,.jetpack-instant-search__search-result-minimal-tag-text{vertical-align:middle}.jetpack-instant-search__search-result-minimal-content{word-break:break-word}.jetpack-instant-search__search-result-expanded{display:flex;flex-flow:column}.jetpack-instant-search__search-result-expanded:last-child{margin-left:0}.jetpack-instant-search__search-result-expanded .jetpack-instant-search__search-result-expanded__title{width:100%}.jetpack-instant-search__search-result-expanded__path{color:#646970;font-size:.9375em;margin:0 0 .4em}.jetpack-instant-search__search-result-expanded__copy-container{max-width:100%}@media(min-width:576px){.jetpack-instant-search__search-result-expanded__copy-container{width:calc(100% - 128px - 1em)}}.jetpack-instant-search__search-result-expanded--no-image .jetpack-instant-search__search-result-expanded__copy-container{width:auto}.jetpack-instant-search__search-result-expanded__content{color:#00101c;font-size:.9375em}.jetpack-instant-search__search-result-expanded__image-link{margin-right:1em}@media(max-width:575.98px){.jetpack-instant-search__search-result-expanded__image-link{margin:0 auto .5em;order:-1}}.jetpack-instant-search__search-result-expanded__image-container{width:128px}@media(max-width:575.98px){.jetpack-instant-search__search-result-expanded__image-container{width:256px}}.jetpack-instant-search__search-result-expanded--no-image .jetpack-instant-search__search-result-expanded__image-container{display:none}.jetpack-instant-search__search-result-expanded__image-container{position:relative}.jetpack-instant-search__search-result-expanded__image-container:before{content:"";display:block;padding-top:100%;width:100%}.jetpack-instant-search__search-result-expanded__image{border-radius:5px;bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.jetpack-instant-search__search-result-expanded__content-container{display:flex;flex-flow:column}@media(min-width:576px){.jetpack-instant-search__search-result-expanded__content-container{flex-flow:row nowrap}}.jetpack-instant-search__search-result-expanded__footer{display:flex;list-style-type:none;margin-right:0;margin-top:10px;padding-right:0}.jetpack-instant-search__search-result-expanded__footer li{margin-left:10px}.jetpack-instant-search__search-result-expanded__footer-blog-image{border-radius:2px;margin-left:3px;vertical-align:middle}.jetpack-instant-search__search-result-expanded__footer-blog{font-size:13px;font-style:normal;font-weight:600;line-height:180%}.jetpack-instant-search__search-result-expanded__footer-author:after,.jetpack-instant-search__search-result-expanded__footer-blog:after{color:#636363;content:"·";margin-right:10px}.jetpack-instant-search__search-result-expanded__footer-author,.jetpack-instant-search__search-result-expanded__footer-date{color:#636363;font-size:13px;font-style:normal;font-weight:400}.jetpack-instant-search__product-rating-stars .gridicon{fill:#f0c930;vertical-align:middle}.jetpack-instant-search a.jetpack-instant-search__product-rating-count{color:#646970;font-size:.9em;text-decoration:underline;vertical-align:text-top}.jetpack-instant-search__product-price-regular{color:#646970;padding-left:.25em}.jetpack-instant-search__search-results-list.is-format-product{display:flex;flex-wrap:wrap;margin-left:40px;padding:0 0 3em}@media(max-width:991.98px){.jetpack-instant-search__search-results-list.is-format-product{margin-left:24px}}@media(max-width:767.98px){.jetpack-instant-search__search-results-list.is-format-product{margin-left:4px}}.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{display:flex;flex-direction:column;margin:0 0 16px 16px;position:relative;width:calc(50% - 16px)}@media(min-width:576px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(33.33333% - 16px)}}@media(min-width:768px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(25% - 16px)}}@media(min-width:992px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(33.33333% - 16px)}}@media(min-width:1200px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(25% - 16px)}}@media(min-width:1400px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(20% - 16px)}}.jetpack-instant-search__search-result>.jetpack-instant-search__search-result-product-img-link{display:block}.jetpack-instant-search__search-result-product-img-container{border-radius:5px;color:transparent;position:relative}.jetpack-instant-search__search-result-product-img-container.jetpack-instant-search__search-result-product-img-container--placeholder{background:#c3c4c7}.jetpack-instant-search__search-result-product-img-container .gridicon{fill:#fff}.jetpack-instant-search__search-result-product-img-container:before{content:"";display:block;padding-top:100%;width:100%}.jetpack-instant-search__search-result-product-img{border-radius:5px;bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.jetpack-instant-search__search-result-product-img>.gridicon{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}.jetpack-instant-search__search-result-product-img>.gridicons-image{height:25%;width:25%}.jetpack-instant-search__search-result-product-img>.gridicons-block{height:50%;width:50%}.jetpack-instant-search__search-result-title.jetpack-instant-search__search-result-product-title{font-size:1.25em;margin:.25em 0 0}.jetpack-instant-search__search-result-product-match{font-size:.9em;margin-top:.25em}.jetpack-instant-search__search-result-product-match mark{align-items:center;display:flex;font-weight:400}.jetpack-instant-search__search-result-product-match .gridicon{height:1em;margin-left:.25em;width:1em}.jetpack-instant-search__search-result{margin:0 0 2em}.jetpack-instant-search__search-result-title{font-size:1.6em;font-weight:400;line-height:1.35;margin:0;overflow-wrap:break-word}.jetpack-instant-search__search-result-title .jetpack-instant-search__search-result-title-link{text-decoration:none}.jetpack-instant-search__search-result-title .jetpack-instant-search__search-result-title-link:focus,.jetpack-instant-search__search-result-title .jetpack-instant-search__search-result-title-link:hover{text-decoration:underline}.jetpack-instant-search__search-filters{position:relative}.jetpack-instant-search__search-filters>div{margin-top:1em}.jetpack-instant-search__search-filters-title{color:#00101c;display:block;font-size:inherit;font-weight:700;line-height:1.3;margin:0;padding:0}.jetpack-instant-search__clear-filters-link{left:0;line-height:1.3;margin:0;position:absolute;top:0}.jetpack-instant-search__search-filter-sub-heading{color:#646970;font-size:inherit;margin:0;padding:0}.jetpack-instant-search__search-filter-list{text-align:right}.jetpack-instant-search__search-filter-list>div{align-items:baseline;display:flex;margin-top:8px}.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-input,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-input{-webkit-appearance:checkbox;appearance:checkbox;background:none;border:none;cursor:pointer;height:auto;margin:0;top:1px;width:auto}.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-input:after,.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-input:before,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-input:after,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-input:before{display:none!important}.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-label,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-label{color:inherit;cursor:pointer;display:inline-block;font-weight:400;margin:0 8px 0 0;padding:0;width:auto}.jetpack-instant-search__search-static-filter-list{font-size:.875rem;line-height:1.8}.jetpack-instant-search__widget-area-container{margin-bottom:2em}.jetpack-instant-search__jetpack-colophon{margin-bottom:2em;margin-top:2em;text-align:center}.jetpack-instant-search__jetpack-colophon-link{align-items:center;color:inherit;display:flex;text-decoration:none}.jetpack-instant-search__jetpack-colophon-logo{display:inline;height:16px;width:16px}.jetpack-instant-search__jetpack-colophon-text{color:#3c434a;font-size:.7em;font-weight:400;padding-right:6px}.jetpack-instant-search__sidebar{padding-top:14px}.jetpack-instant-search__sidebar .jetpack-instant-search__widget-area>.widget{background:none;border:none;margin:0;padding:0}.jetpack-instant-search__sidebar .jetpack-instant-search__widget-area>.widget a{font-weight:400}.jetpack-instant-search__sidebar h2.widgettitle{border:none;font-size:1.3em;margin:1em 0 .5em}.jetpack-instant-search__sidebar h2.widgettitle:after,.jetpack-instant-search__sidebar h2.widgettitle:before{display:none!important}.jetpack-instant-search__search-results{background:#fff;border-radius:3px;margin:0 auto;max-width:1080px;min-height:100%;position:relative;z-index:10}@media(max-width:575.98px){.jetpack-instant-search__search-results{border-radius:0}}@media(min-width:992px){.jetpack-instant-search__search-results{max-width:95%}}.jetpack-instant-search__search-results mark{background:#ffc;color:#00101c}.jetpack-instant-search__search-results-controls{display:flex}.jetpack-instant-search__search-results-content{display:flex;position:relative}.jetpack-instant-search__search-results-filter-button{align-items:center;border:0;color:#646970;cursor:pointer;display:flex;flex-shrink:0;font-size:12px;margin:0;padding:8px;text-decoration:none;transition:background-color .25s ease-in-out}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-filter-button{visibility:hidden}@media(min-width:576px){.jetpack-instant-search__search-results-filter-button{font-size:13px;padding:10px 14px}}@media(min-width:992px){.jetpack-instant-search__search-results-filter-button{display:none}.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-filter-button{display:flex}}@media(min-width:1200px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-filter-button{display:none}}.jetpack-instant-search__search-results-filter-button:focus,.jetpack-instant-search__search-results-filter-button:hover{color:#00101c}.jetpack-instant-search__search-results-filter-button .gridicon{margin-right:4px}.jetpack-instant-search__search-results-primary{margin:0;max-width:calc(100% - 320px);width:100%}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-primary{max-width:100%}@media(max-width:991.98px){.jetpack-instant-search__search-results-primary{max-width:100%}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-primary{max-width:100%}}.jetpack-instant-search__search-results-secondary{background:none;border-radius:0;border-right:1px solid #e6f1f5;bottom:0;box-shadow:none;color:#00101c;display:block;flex:none;padding:0 32px;position:static;width:320px}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-secondary{display:none}@media(max-width:991.98px){.jetpack-instant-search__search-results-secondary{display:none}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary{display:none}}@media(max-width:991.98px){.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:6px;box-shadow:0 2px 3px rgba(0,0,0,.1);display:block;left:1em;max-height:70vh;min-width:360px;overflow-y:scroll;padding:16px 24px;position:absolute;right:1em;top:0;width:auto;z-index:10}}@media(max-width:991.98px)and (max-width:575.98px){.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{max-height:80vh}}@media(max-width:991.98px){.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon{margin-bottom:1em}.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon-text{font-size:.8em}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{display:none}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:6px;box-shadow:0 2px 3px rgba(0,0,0,.1);display:block;left:1em;max-height:70vh;min-width:360px;overflow-y:scroll;padding:16px 24px;position:absolute;right:1em;top:0;width:auto;z-index:10}}@media(max-width:1199.98px)and (max-width:575.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{max-height:80vh}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon{margin-bottom:1em}.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon-text{font-size:.8em}.jetpack-instant-search__overlay--no-sidebar .jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{display:none}}.jetpack-instant-search__search-results-title,.jetpack-instant-search__search-results-unused-query{color:#00101c;font-size:1em;font-weight:700;line-height:1.3;margin:1em 56px 1.5em;padding:0;word-break:break-word}@media(max-width:991.98px){.jetpack-instant-search__search-results-title,.jetpack-instant-search__search-results-unused-query{margin-bottom:1em;margin-left:40px;margin-right:40px}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-title,.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-unused-query{margin-bottom:1em;margin-left:40px;margin-right:40px}}@media(max-width:767.98px){.jetpack-instant-search__search-results-title,.jetpack-instant-search__search-results-unused-query{margin-left:20px;margin-right:20px}}@media(min-width:992px){.jetpack-instant-search__search-results-title{padding-left:210px}}@media(min-width:1200px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-title{padding-left:210px}}.jetpack-instant-search__search-results-list{color:#00101c;list-style:none;margin-left:56px;margin-right:56px;padding:0}@media(max-width:991.98px){.jetpack-instant-search__search-results-list{margin-left:40px;margin-right:40px}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-list{margin-left:40px;margin-right:40px}}@media(max-width:767.98px){.jetpack-instant-search__search-results-list{margin-left:20px;margin-right:20px}}.jetpack-instant-search__search-results-list li:before{content:"";height:1px;position:absolute;width:1px}.jetpack-instant-search__search-results-search-form{font-size:.8em;margin:0;top:0;width:100%}button.jetpack-instant-search__overlay-close{align-items:center;-webkit-appearance:none;appearance:none;background:none;background-color:transparent!important;border:none;border-bottom:1px solid #e6f1f5;border-radius:0;box-shadow:none;cursor:pointer;display:flex;height:61px;justify-content:center;line-height:1;margin:0;outline:none;padding:0;text-decoration:none;text-shadow:none;text-transform:none;width:60px}button.jetpack-instant-search__overlay-close:focus,button.jetpack-instant-search__overlay-close:hover{-webkit-appearance:none;appearance:none;background:none;box-shadow:none;outline:none}button.jetpack-instant-search__overlay-close:focus{outline:1px dotted}button.jetpack-instant-search__overlay-close svg.gridicon{fill:#646970}button.jetpack-instant-search__overlay-close:active,button.jetpack-instant-search__overlay-close:focus,button.jetpack-instant-search__overlay-close:hover{background-color:transparent!important;border-color:#e6f1f5}button.jetpack-instant-search__overlay-close:active svg.gridicon,button.jetpack-instant-search__overlay-close:focus svg.gridicon,button.jetpack-instant-search__overlay-close:hover svg.gridicon{fill:#3c434a}.jetpack-instant-search__search-results-pagination{display:block;flex:none;margin:50px}.jetpack-instant-search .widget a,.jetpack-instant-search .widget.widget_archive ul li a,.jetpack-instant-search a{border:none;color:#001621;text-decoration:none}.jetpack-instant-search .widget a:focus,.jetpack-instant-search .widget a:hover,.jetpack-instant-search .widget.widget_archive ul li a:focus,.jetpack-instant-search .widget.widget_archive ul li a:hover,.jetpack-instant-search a:focus,.jetpack-instant-search a:hover{color:#044b7a;text-decoration:underline}.jetpack-search-filters-widget__filter-list{list-style-type:none}body.enable-search-modal .cover-modal.show-modal.search-modal.active{display:none}.screen-reader-text{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark{background:rgba(29,35,39,.7);color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget a,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget.widget_archive ul li a,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark a{color:#f6f7f7}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget a:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget a:hover,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget.widget_archive ul li a:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget.widget_archive ul li a:hover,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark a:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark a:hover{color:#0675c4}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-filters-title,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-result-expanded__content,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-list,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-title,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-unused-query{color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__jetpack-colophon-text,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__path-breadcrumb,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__path-breadcrumb-link{color:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-filter-sub-heading,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-result-expanded__path{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close{border-color:#3c434a}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box-gridicon svg,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close svg.gridicon{fill:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close{border-color:#3c434a}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close:focus svg.gridicon,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close:hover svg.gridicon{fill:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box input[type=button]{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box input[type=button]:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box input[type=button]:hover{color:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark input.jetpack-instant-search__box-input.search-field{background:#000;color:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark input.jetpack-instant-search__box-input.search-field:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark input.jetpack-instant-search__box-input.search-field:hover{background:#000;color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results{background:#000}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results mark{color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-filter-button{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-filter-button:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-filter-button:hover,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-secondary{color:#e6f1f5}@media(min-width:992px){.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-secondary{border-color:#3c434a}}@media(max-width:991.98px){.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{background:#000;border-color:#3c434a;box-shadow:0 2px 3px #3c434a}}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-sort-option,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-sort-option:after{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-sort-option.is-selected{color:#0675c4}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-result-product-img--placeholder{color:#2c3338}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark #jetpack-instant-search__search-sort-select{background:#000;border-color:#3c434a;color:#e6f1f5}.jp-search-configure-app-wrapper{flex-grow:1}.jp-search-configure-app-wrapper .jp-search-configure-loading-spinner{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}.jp-search-configure-app-wrapper .jetpack-instant-search{background:#f0f0f0;padding-top:2em;position:absolute;z-index:90}.jp-search-configure-app-wrapper .jetpack-instant-search .jetpack-instant-search__search-results{max-width:none}.jp-search-configure-app-wrapper .jetpack-instant-search a:not(.jetpack-instant-search__search-sort-option){pointer-events:none}.jp-search-configure-save-button{margin-left:4px}.jp-search-configure-save-button:first-of-type{margin-right:auto}@media(min-width:600px){.jp-search-configure-save-button{margin-left:8px}}@media(min-width:782px){.jp-search-configure-sidebar .jp-search-configure-save-button{display:none}}.jp-search-configure-header{align-items:center;display:flex;height:48px;justify-content:space-between;overflow:auto;padding:0 16px}@media(min-width:782px){.jp-search-configure-header{height:60px}}@media(min-width:600px){.jp-search-configure-header{overflow:visible}}.jp-search-configure-header__navigable-toolbar-wrapper{align-items:center;display:flex;justify-content:center}.jp-search-configure-header__title{font-size:20px;margin:0 0 0 20px;padding:0}.jp-search-configure-header__actions{display:flex}@media(min-width:600px){.jp-search-configure-header__actions .components-button.jp-search-configure-header__show-settings-button{margin-left:8px}}@media(min-width:782px){.jp-search-configure-header__actions .components-button.jp-search-configure-header__show-settings-button{display:none;margin-right:0}}.jp-search-configure-color-input .component-color-indicator{vertical-align:middle}.jp-search-configure-color-input .block-editor-color-gradient-control fieldset>legend{margin-bottom:12px}.jp-search-configure-color-input .block-editor-color-gradient-control fieldset>legend>.block-editor-color-gradient-control__color-indicator{margin-bottom:0}.jp-search-configure-color-input .components-circular-option-picker__option-wrapper :focus:after{right:-4px;top:-4px}.jp-search-configure-color-input .components-circular-option-picker__option-wrapper .components-button.is-pressed:focus:not(:disabled){box-shadow:inset 0 0 0 14px!important}.jp-search-configure-sidebar-options--is-disabled .jp-search-configure-color-input .components-button{cursor:not-allowed;filter:grayscale(.8);pointer-events:none}.jp-search-configure-sidebar-options--is-disabled .jp-search-configure-color-input .components-circular-option-picker__option-wrapper:hover{transform:scale(1)}.jp-search-configure-excluded-post-types-control{margin-top:8px}.jp-search-configure-excluded-post-types-control .jp-search-configure-excluded-post-types-control__label{margin-bottom:8px}.jp-search-configure-excluded-post-types-control .components-notice{margin:8px 0;padding-bottom:4px;padding-top:4px}.components-panel__header.jp-search-configure-sidebar__panel-tabs{border-top:0;justify-content:flex-start;margin-top:0;padding-left:12px;padding-right:0}.components-panel__header.jp-search-configure-sidebar__panel-tabs ul{display:flex;height:100%}.components-panel__header.jp-search-configure-sidebar__panel-tabs li{margin:0}.components-panel__header.jp-search-configure-sidebar__panel-tabs .components-button.jp-search-configure-sidebar__hide-settings-button{margin-left:4px}@media(min-width:600px){.components-panel__header.jp-search-configure-sidebar__panel-tabs .components-button.jp-search-configure-sidebar__hide-settings-button{margin-left:12px}}@media(min-width:782px){.components-panel__header.jp-search-configure-sidebar__panel-tabs .components-button.jp-search-configure-sidebar__hide-settings-button{display:none}}.components-button.jp-search-configure-sidebar__panel-tab{background:transparent;border:none;border-radius:0;box-shadow:none;color:#1e1e1e;cursor:pointer;display:inline-block;font-weight:400;height:49px;height:100%;margin-right:0;padding:3px 15px}.components-button.jp-search-configure-sidebar__panel-tab:after{speak:none;content:attr(data-label);display:block;font-weight:600;height:0;overflow:hidden;visibility:hidden}.components-button.jp-search-configure-sidebar__panel-tab.is-active{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) transparent,inset 0 -1.5px 0 0 var(--wp-admin-theme-color);font-weight:600;position:relative}.components-button.jp-search-configure-sidebar__panel-tab.is-active:before{border-bottom:1.5px solid transparent;bottom:1px;content:"";left:0;position:absolute;right:0;top:0}.components-button.jp-search-configure-sidebar__panel-tab:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-button.jp-search-configure-sidebar__panel-tab.is-active:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 -1.5px 0 0 var(--wp-admin-theme-color)}.jp-search-configure-sidebar-description{display:flex;padding:16px}.jp-search-configure-sidebar-description .block-editor-block-icon{margin-left:16px}.jp-search-configure-sidebar-description .components-button.is-tertiary{margin-right:-6px}.jp-search-configure-sidebar-options .components-base-control{margin-bottom:24px}.jp-search-configure-sidebar-options .components-base-control.components-checkbox-control,.jp-search-configure-sidebar-options .components-base-control.components-toggle-control,.jp-search-configure-sidebar-options .components-base-control:last-child{margin-bottom:0}.jp-search-configure-sidebar-options .components-checkbox-control__label{vertical-align:baseline}.jp-search-configure-result-format-radios{margin-bottom:1em}.jp-search-configure-sidebar-options .jp-search-configure-theme-buttons{display:flex;justify-content:space-around;margin-bottom:12px}.jp-search-configure-sidebar-options .jp-search-configure-theme-buttons button.components-button{display:flex;flex-direction:column;height:auto;padding-left:6px;padding-right:6px}.jp-search-configure-sidebar-options .jp-search-configure-theme-buttons button.components-button:first-child{margin-left:4px}.jp-search-configure-sidebar-options .jp-search-configure-theme-buttons button.components-button:last-child{margin-right:4px}.jp-search-configure-sidebar-options .jp-search-configure-theme-buttons button.components-button svg{border:2px solid #fff;border-radius:3px;margin-bottom:4px}.jp-search-configure-sidebar-options .jp-search-configure-theme-buttons button.components-button.jp-search-configure-theme-button--selected svg{border-color:#2f2f2f}.jp-search-configure-sidebar-options--is-disabled input{cursor:not-allowed;pointer-events:none}.jp-search-configure-sidebar-options--is-disabled input[type=checkbox],.jp-search-configure-sidebar-options--is-disabled input[type=radio]{background:#ddd;border-color:#ddd}.jp-search-configure-sidebar-options--is-disabled .components-radio-control__input[type=radio]:checked{background:#ccc;border-color:#ccc}.components-checkbox-control__input:disabled{background:#ddd;border-color:#ddd;cursor:not-allowed}#jp-search-configure .hide-if-no-js{height:100vh;margin:0;position:relative;text-align:center;width:100vw}#jp-search-configure .hide-if-no-js .jp-search-loader{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}#jp-search-configure .interface-interface-skeleton__header{background-color:#fff}.jp-search-configure-layout__body{display:flex;flex-grow:1;overflow:auto}.block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator{margin-bottom:12px}.block-editor-color-gradient-control__fieldset{min-width:0}.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__panel-title{display:flex;gap:8px}.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{align-self:center;height:12px;width:12px}.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator:first-child{margin-right:12px}.block-editor-panel-color-gradient-settings.is-opened .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{display:none}@media screen and (min-width:782px){.block-editor-panel-color-gradient-settings .components-circular-option-picker__swatches{display:grid;grid-template-columns:repeat(6,28px);justify-content:space-between}}.block-editor-block-inspector .block-editor-panel-color-gradient-settings .components-base-control{margin-bottom:inherit}.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__dropdown{display:block}.block-editor-panel-color-gradient-settings__dropdown{width:100%}.block-editor-panel-color-gradient-settings__dropdown-content .components-popover__content{width:280px}.block-editor-panel-color-gradient-settings__dropdown:last-child>div{border-bottom-width:0}.block-editor-panel-color-gradient-settings__item{padding-bottom:12px!important;padding-top:12px!important}.block-editor-panel-color-gradient-settings__item.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.block-editor-panel-color-gradient-settings__color-indicator{background:linear-gradient(45deg,transparent 48%,#ddd 0,#ddd 52%,transparent 0)}.block-editor-tools-panel-color-gradient-settings__item{border-bottom:1px solid rgba(0,0,0,.1);border-left:1px solid rgba(0,0,0,.1);border-right:1px solid rgba(0,0,0,.1);padding:0}.block-editor-tools-panel-color-gradient-settings__item.first{border-top:1px solid rgba(0,0,0,.1);border-top-left-radius:2px;border-top-right-radius:2px}.block-editor-tools-panel-color-gradient-settings__item.last{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.block-editor-tools-panel-color-gradient-settings__item>div,.block-editor-tools-panel-color-gradient-settings__item>div>button{border-radius:inherit}.block-editor-tools-panel-color-gradient-settings__dropdown{display:block;padding:0}.block-editor-tools-panel-color-gradient-settings__dropdown>button{height:46px}.block-editor-tools-panel-color-gradient-settings__dropdown>button.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.components-panel__header.interface-complementary-area-header__small{background:#fff;padding-left:4px}.components-panel__header.interface-complementary-area-header__small .interface-complementary-area-header__small-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}@media(min-width:782px){.components-panel__header.interface-complementary-area-header__small{display:none}}.interface-complementary-area-header{background:#fff;padding-left:4px}.interface-complementary-area{background:#fff;color:#1e1e1e}@media(min-width:600px){.interface-complementary-area{-webkit-overflow-scrolling:touch}}@media(min-width:782px){.interface-complementary-area{width:280px}}.interface-complementary-area .components-panel{border:none;position:relative;z-index:0}.interface-complementary-area .components-panel__header{position:sticky;top:0;z-index:1}.interface-complementary-area .components-panel__header.edit-post-sidebar__panel-tabs{top:48px}@media(min-width:782px){.interface-complementary-area .components-panel__header.edit-post-sidebar__panel-tabs{top:0}}.interface-complementary-area p{margin-top:0}.interface-complementary-area h2,.interface-complementary-area h3{color:#1e1e1e;font-size:13px;margin-bottom:1.5em}.interface-complementary-area hr{border-bottom:1px solid #f0f0f0;border-top:none;margin:1.5em 0}.interface-complementary-area div.components-toolbar,.interface-complementary-area div.components-toolbar-group{box-shadow:none;margin-bottom:1.5em}.interface-complementary-area div.components-toolbar-group:last-child,.interface-complementary-area div.components-toolbar:last-child{margin-bottom:0}.interface-complementary-area .block-editor-skip-to-selected-block:focus{bottom:10px;left:10px;right:auto;top:auto}@media(min-width:782px){body.js.is-fullscreen-mode{height:calc(100% + 32px);margin-top:-32px}body.js.is-fullscreen-mode #adminmenumain,body.js.is-fullscreen-mode #wpadminbar{display:none}body.js.is-fullscreen-mode #wpcontent,body.js.is-fullscreen-mode #wpfooter{margin-right:0}}html.interface-interface-skeleton__html-container{position:fixed;width:100%}@media(min-width:782px){html.interface-interface-skeleton__html-container{position:static;width:auto}}.interface-interface-skeleton{bottom:0;display:flex;flex-direction:row;height:auto;left:0;max-height:100%;position:fixed;top:46px}@media(min-width:783px){.interface-interface-skeleton{top:32px}.is-fullscreen-mode .interface-interface-skeleton{top:0}}.interface-interface-skeleton__editor{display:flex;flex:0 1 100%;flex-direction:column;overflow:hidden}.interface-interface-skeleton{right:0}@media(min-width:783px){.interface-interface-skeleton{right:160px}.auto-fold .interface-interface-skeleton{right:36px}}@media(min-width:961px){.auto-fold .interface-interface-skeleton{right:160px}}.folded .interface-interface-skeleton{right:0}@media(min-width:783px){.folded .interface-interface-skeleton{right:36px}}body.is-fullscreen-mode .interface-interface-skeleton{right:0!important}.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{background:#fff;bottom:0;color:#1e1e1e;display:block;flex-shrink:0;left:0;position:absolute;right:0;top:0;z-index:100000}@media(min-width:782px){.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{position:relative!important;width:auto;z-index:90}}.interface-interface-skeleton__sidebar{overflow:auto}@media(min-width:782px){.interface-interface-skeleton__sidebar{border-right:1px solid #e0e0e0}.interface-interface-skeleton__secondary-sidebar{border-left:1px solid #e0e0e0}}.interface-interface-skeleton__header{border-bottom:1px solid #e0e0e0;color:#1e1e1e;flex-shrink:0;height:auto;z-index:30}.interface-interface-skeleton__footer{background-color:#fff;border-top:1px solid #e0e0e0;bottom:0;color:#1e1e1e;display:none;flex-shrink:0;height:auto;position:absolute;right:0;width:100%;z-index:90}@media(min-width:782px){.interface-interface-skeleton__footer{display:flex}}.interface-interface-skeleton__footer .block-editor-block-breadcrumb{align-items:center;background:#fff;display:flex;font-size:13px;height:24px;padding:0 18px;z-index:30}.interface-interface-skeleton__actions{bottom:auto;color:#1e1e1e;left:0;position:fixed!important;right:auto;top:-9999em;width:280px;z-index:100000}.interface-interface-skeleton__actions:focus{bottom:0;top:auto}.interface-more-menu-dropdown{margin-right:-4px}.interface-more-menu-dropdown .components-button{padding:0 2px;width:auto}@media(min-width:600px){.interface-more-menu-dropdown{margin-right:0}.interface-more-menu-dropdown .components-button{padding:0 4px}}.interface-more-menu-dropdown__content .components-popover__content{min-width:280px}@media(min-width:480px){.interface-more-menu-dropdown__content .components-popover__content{max-width:480px;width:auto}}.interface-more-menu-dropdown__content .components-popover__content .components-dropdown-menu__menu{padding:0}.components-popover.interface-more-menu-dropdown__content{z-index:99998}.interface-pinned-items{display:flex}.interface-pinned-items .components-button:not(:first-child){display:none}@media(min-width:600px){.interface-pinned-items .components-button:not(:first-child){display:flex}}.interface-pinned-items .components-button{margin-right:4px}.interface-pinned-items .components-button svg{max-height:24px;max-width:24px}html.wp-toolbar{background:#fff}#wpbody-content>.notice,#wpfooter,.jp-search-configure-sidebar .components-button.interface-complementary-area__pin-unpin-item{display:none}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color--rgb:0,133,186;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-10--rgb:0,115,161;--wp-admin-theme-color-darker-20:#006187;--wp-admin-theme-color-darker-20--rgb:0,97,135;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-light{--wp-admin-border-width-focus:1.5px}}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color--rgb:56,88,233;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-10--rgb:33,69,230;--wp-admin-theme-color-darker-20:#183ad6;--wp-admin-theme-color-darker-20--rgb:24,58,214;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-modern{--wp-admin-border-width-focus:1.5px}}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color--rgb:9,100,132;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-10--rgb:7,82,108;--wp-admin-theme-color-darker-20:#064054;--wp-admin-theme-color-darker-20--rgb:6,64,84;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-blue{--wp-admin-border-width-focus:1.5px}}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color--rgb:70,64,60;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-10--rgb:56,51,48;--wp-admin-theme-color-darker-20:#2b2724;--wp-admin-theme-color-darker-20--rgb:43,39,36;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-coffee{--wp-admin-border-width-focus:1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color--rgb:82,63,109;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-10--rgb:70,54,93;--wp-admin-theme-color-darker-20:#3a2c4d;--wp-admin-theme-color-darker-20--rgb:58,44,77;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus:1.5px}}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color--rgb:225,77,67;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-10--rgb:221,56,45;--wp-admin-theme-color-darker-20:#d02c21;--wp-admin-theme-color-darker-20--rgb:208,44,33;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-midnight{--wp-admin-border-width-focus:1.5px}}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color--rgb:98,124,131;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-10--rgb:87,110,116;--wp-admin-theme-color-darker-20:#4c6066;--wp-admin-theme-color-darker-20--rgb:76,96,102;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-ocean{--wp-admin-border-width-focus:1.5px}}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color--rgb:221,130,59;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-10--rgb:217,116,38;--wp-admin-theme-color-darker-20:#c36922;--wp-admin-theme-color-darker-20--rgb:195,105,34;--wp-admin-border-width-focus:2px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus:1.5px}}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.asset.php new file mode 100644 index 00000000..bc1f9304 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.asset.php @@ -0,0 +1 @@ +<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'ef96289af83decd94a43'); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.css new file mode 100644 index 00000000..7b9bc320 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.css @@ -0,0 +1 @@ +.jp-search-dashboard-page-loading-spinner{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}@keyframes rotate-spinner{to{transform:rotate(1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-right-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}.jp-search-dashboard-promotion h1{font-size:var(--font-title-large);font-weight:600;line-height:1.2}.jp-search-dashboard-promotion ul.jp-product-promote li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-left:30px}.jp-search-dashboard-connection-screen{align-items:center;background:var(--jp-white-off);display:flex;width:100%}.jp-search-dashboard-connection-screen>div{width:100%}.jp-search-dashboard-connection-screen .jp-components__pricing-card .components-spinner{margin:0}.jp-search-dashboard-connection-screen .jp-search-dashboard-connection-footer__text{color:#3c434a;font-size:10.5px;font-weight:400;letter-spacing:-.02em;margin:0;text-align:center}.jp-search-dashboard-connection-screen .jp-search-dashboard-connection-footer__link{color:#3c434a}@media(min-width:1080px){.jp-connection__connect-screen-layout__left{width:70%}.jp-connection__connect-screen-required-plan{background:linear-gradient(90deg,#fff 70%,#f9f9f6 0);position:relative}}.jp-connection__connect-screen-required-plan__loading{display:none}@media(min-width:1080px){.jp-connection__connect-screen-required-plan__pricing-card{left:62%;position:absolute;top:14%}}.jp-connection__connect-screen-required-plan__pricing-card .jp-action-button--button.components-button{align-items:center;background:var(--jp-black)!important;border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;font-weight:500;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-connection__connect-screen-required-plan__with-subscription{margin-top:38px}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button{display:inline}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button{background:inherit!important;color:var(--jp-black)!important;display:inline;font-size:var(--font-title-small);font:inherit;height:auto;line-height:20px;min-width:0;padding:0;text-decoration:underline;width:auto}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button:hover{background:inherit;text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button:focus{background:inherit;box-shadow:none!important}.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__inner,.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__outer{border-right-color:var(--jp-black);border-top-color:var(--jp-black)}.jp-action-button--button{background:#000}.jp-action-button--button,.jp-action-button--button.components-button{border-radius:4px;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-style:normal;font-weight:600;height:40px;line-height:18px;min-width:264px;text-align:center}.jp-action-button__error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 0 0;color:var(--jp-red)!important;line-height:25px!important;padding-left:25px}.jp-connection__connect-screen-layout{background:var(--jp-white);border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.08)}.jp-connection__connect-screen-layout__loading{display:none}.jp-connection__connect-screen-layout__left,.jp-connection__connect-screen-layout__right{box-sizing:border-box}.jp-connection__connect-screen-layout__left{padding:25px}@media(min-width:600px){.jp-connection__connect-screen-layout__left{padding:64px 96px}}.jp-connection__connect-screen-layout__left .jetpack-logo{margin-bottom:24px}.jp-connection__connect-screen-layout__left h2{color:var(--jp-black);font-size:36px;font-style:normal;font-weight:700;line-height:40px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left h3{color:var(--jp-black);font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left li,.jp-connection__connect-screen-layout__left p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.jp-connection__connect-screen-layout__left p{color:#101517;margin:16px 0}.jp-connection__connect-screen-layout__left a{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__connect-screen-layout__left a:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-layout__left a:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__connect-screen-layout__left ul{list-style-type:none;padding:0}.jp-connection__connect-screen-layout__left ul li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-left:30px}.jp-connection__connect-screen-layout__right{padding:64px 0}.jp-connection__connect-screen-layout__right img{max-width:100%}.jp-connection__connect-screen-layout__two-columns{display:flex;flex-wrap:wrap}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:100%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:52%}}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{background:#f9f9f6;display:none;flex-basis:47%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{display:block}}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-10:#f2cf75;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-components__pricing-card{background:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 10px 40px rgba(0,0,0,.08);max-width:384px;padding:24px 24px 32px;width:-moz-fit-content;width:fit-content}@media screen and (min-width:600px){.jp-components__pricing-card{padding:32px 32px 44px}}.jp-components__pricing-card__icon img{height:32px;width:32px}.jp-components__pricing-card__title{color:#101517;font-size:32px;line-height:38px;margin:16px 0 24px}.jp-components__pricing-card__pricing{display:flex;flex-wrap:wrap}.jp-components__pricing-card__price-after,.jp-components__pricing-card__price-before{display:inline-block;font-size:54px;font-weight:700;line-height:40px;margin-bottom:8px;padding:0 2px}.jp-components__pricing-card__price-before{color:var(--jp-gray-20);margin-right:16px;position:relative}.jp-components__pricing-card__price-strikethrough{background:var(--jp-pink);border-radius:1.5px;height:3px;left:0;position:absolute;top:20px;width:100%}.jp-components__pricing-card__price-after{color:var(--jp-black)}.jp-components__pricing-card__currency{font-size:var(--font-title-small);font-weight:400;line-height:20px;vertical-align:super}.jp-components__pricing-card__price-details{align-self:flex-end;color:var(--jp-gray-50);font-size:14px;font-weight:400;letter-spacing:-.02em;line-height:17px;margin-bottom:8px}.jp-components__pricing-card__price-decimal{font-size:var(--font-label);line-height:14px;vertical-align:top}.jp-components__pricing-card__button{align-items:center;background:var(--jp-black);border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-components__pricing-card__info{color:var(--jp-gray-60);font-size:var(--font-label);letter-spacing:-.02em;line-height:20px}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off)}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1128px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;max-width:var(--max-container-width);width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));padding:0 24px}}.SqdhUZkXCRuIpErj1B3z.OZC_9a1LhpWF9dv15Gdh{max-width:none;padding:unset}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.jp-search-dashboard-upsell-page{line-height:1.5;width:100%}.jp-search-dashboard-upsell-page h1{line-height:1.2}.jp-search-dashboard-upsell-page>div{margin-left:0}.sexr0jUxC1jVixdKiDnC{margin-left:-20px}@media(max-width:782px){.sexr0jUxC1jVixdKiDnC{margin-left:-10px}}.sexr0jUxC1jVixdKiDnC.vKQ11sLeAM45M04P1ccj{background-color:var(--jp-white)}.jp-dashboard-footer{align-items:center;color:#000;display:flex;flex-flow:row wrap;justify-content:space-between;max-width:1128px;width:100%}.jp-dashboard-footer a,.jp-dashboard-footer a:hover,.jp-dashboard-footer a:visited{color:#000;text-decoration:none}.jp-dashboard-footer__jetpack-symbol,.jp-dashboard-footer__module-name{display:inline-block;vertical-align:middle}.jp-dashboard-footer__module-name{font-size:12px;font-weight:600;margin-left:5px}.dops-button{-webkit-appearance:none;appearance:none;background:#f6f7f7;border:1px solid #2271b1;border-radius:3px;box-sizing:border-box;color:#2271b1;cursor:pointer;display:inline-block;font-size:.875rem;margin:0;outline:0;overflow:hidden;padding:7px 14px 9px;text-decoration:none;text-overflow:ellipsis;vertical-align:top}.dops-button:hover{background:#f0f0f1;border-color:#0a4b78;color:#0a4b78}.dops-button:disabled,.dops-button[disabled]{background:#fff;border-color:#eee;color:#eee;cursor:default}.dops-button:focus{background:#fff;border-color:#2271b1;box-shadow:0 0 0 1px #2271b1}.dops-button.is-compact{line-height:2;padding:0 10px}.dops-button.is-compact:disabled{color:#eee}.dops-button.is-compact .gridicon{margin-top:-8px;top:4px}.dops-button.is-compact .gridicons-plus-small{margin-left:-4px}.dops-button.is-compact .gridicons-plus-small:last-of-type{margin-left:0}.dops-button.is-compact .gridicons-plus-small+.gridicon{margin-left:-4px}.dops-button.hidden{display:none}.dops-button .gridicon{height:18px;margin-top:-2px;position:relative;top:4px;width:18px}.dops-button.is-primary{background:#3582c4;border-color:#3582c4;color:#fff}.dops-button.is-primary:focus,.dops-button.is-primary:hover{background:#2271b1;border-color:#2271b1;color:#fff}.dops-button.is-primary:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2271b1}.dops-button.is-primary:disabled,.dops-button.is-primary[disabled]{background-color:#008ec2!important;border-color:#008ec2!important;box-shadow:none!important;color:#66c6e4!important;cursor:default;text-shadow:none!important}.dops-button.is-primary.is-compact{color:#fff;white-space:nowrap}.dops-button.is-scary{color:#d94f4f}.dops-button.is-scary:focus,.dops-button.is-scary:hover{border-color:#d94f4f}.dops-button.is-scary:focus{box-shadow:0 0 0 2px #eba3a3}.dops-button.is-scary:disabled,.dops-button.is-scary[disabled]{border-color:#eee;color:#f4cdcd}.dops-button.is-primary.is-scary{background:#d94f4f;border-color:#a02222;color:#fff}.dops-button.is-primary.is-scary:focus,.dops-button.is-primary.is-scary:hover{border-color:#4c1010}.dops-button.is-primary.is-scary:disabled,.dops-button.is-primary.is-scary[disabled]{background:#eba3a3;border-color:#e48484}.dops-button.is-borderless{border:none;color:#888;padding-left:0;padding-right:0}.dops-button.is-borderless:hover{color:#414141}.dops-button.is-borderless:focus{box-shadow:none}.dops-accessible-focus .dops-button.is-borderless:focus{outline:thin dotted}.dops-button.is-borderless .gridicon{height:24px;top:6px;width:24px}.dops-button.is-borderless:disabled,.dops-button.is-borderless[disabled]{background:#fff;color:#eee;cursor:default}.dops-button.is-borderless:disabled:active,.dops-button.is-borderless[disabled]:active{border-width:0}.dops-button.is-borderless.is-scary{color:#d94f4f}.dops-button.is-borderless.is-scary:focus,.dops-button.is-borderless.is-scary:hover{color:#a02222}.dops-button.is-borderless.is-scary[disabled]{color:#f4cdcd}.dops-button.is-borderless.is-compact{background:transparent;border-radius:0}.dops-button.is-borderless.is-compact .gridicon{height:18px;top:5px;width:18px}.dops-card{background:#fff;box-shadow:0 0 0 1px #c3c4c7,0 1px 1px 1px rgba(0,0,0,.04);box-sizing:border-box;display:block;margin:0 auto 10px;padding:16px;position:relative}.dops-card:after{clear:both;content:".";display:block;height:0;visibility:hidden}@media(min-width:481px){.dops-card{margin-bottom:16px;padding:24px}}.dops-card.is-compact{margin-bottom:1px}@media(min-width:481px){.dops-card.is-compact{margin-bottom:1px;padding:16px 24px}}.dops-card.is-card-link{padding-right:48px}h2.dops-card-title{font-size:rem(20px)}.dops-card__link-indicator{color:#d5d5d5;display:block;height:100%;position:absolute;right:16px;top:0}a.dops-card:hover .dops-card__link-indicator{color:#bbb}a.dops-card:focus{outline:0}a.dops-card:focus .dops-card__link-indicator{color:tint(#3582c4,20%)}.gridicon{fill:currentColor;display:inline-block}.gridicon.needs-offset g{transform:translate(1px,1px)}.gridicon.needs-offset-x g{transform:translate(1px)}.gridicon.needs-offset-y g{transform:translateY(1px)}.form-toggle[type=checkbox]{display:none}.form-toggle__switch{border-radius:12px;box-sizing:border-box;cursor:pointer;display:inline-block;flex:none;height:24px;outline:0;padding:2px;position:relative;transition:all .4s ease,box-shadow 0s;vertical-align:middle;width:40px}.form-toggle__switch:after,.form-toggle__switch:before{content:"";display:block;height:20px;position:relative;width:20px}.form-toggle__switch:after{background:#fff;border-radius:50%;left:0;transition:all .2s ease}.form-toggle__switch:before{display:none}.dops-accessible-focus .form-toggle__switch:focus{box-shadow:0 0 0 2px #3582c4}.form-toggle__label{cursor:pointer;display:flex}.is-disabled .form-toggle__label{cursor:default}.dops-accessible-focus .form-toggle:focus+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #3582c4}.dops-accessible-focus .form-toggle:focus:checked+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #78dcfa}.form-toggle+.form-toggle__label .form-toggle__switch{background:#bbb}.form-toggle:not(:disabled)+.form-toggle__switch:hover{background:#d5d5d5}.form-toggle:checked+.form-toggle__label .form-toggle__switch{background:#3582c4}.form-toggle:checked+.form-toggle__label .form-toggle__switch:after{left:16px}.form-toggle:checked:not(:disabled)+.form-toggle__switch:hover{background:#78dcfa}.form-toggle:disabled+span.form-toggle__switch{cursor:default;opacity:.25}.form-toggle.is-toggling+.form-toggle__switch{background:#3582c4}.form-toggle.is-toggling:checked+.form-toggle__switch{background:#d5d5d5}.form-toggle.is-compact+.form-toggle__switch{border-radius:8px;height:16px;width:24px}.form-toggle.is-compact+.form-toggle__switch:after,.form-toggle.is-compact+.form-toggle__switch:before{height:12px;width:12px}.form-toggle.is-compact:checked+.form-toggle__switch:after{left:8px}.jp-instant-search-upsell-nudge{color:#000;cursor:pointer;font-size:1em;text-decoration:none}.jp-instant-search-upsell-nudge:hover{color:#000}.jp-form-search-settings-group{width:100%}.jp-form-search-settings-group .dops-card{box-shadow:none;padding:4em 0 0}.jp-form-search-settings-group .form-toggle__label{margin:0}.jp-form-search-settings-group__toggle.is-instant-search{margin-top:4em}.jp-form-search-settings-group__toggle .jp-form-search-settings-group__toggle-container{display:flex}@media(max-width:960px){.jp-form-search-settings-group__toggle .jp-form-search-settings-group__toggle-container{justify-content:center}}.form-toggle__label-content{font-size:1.5em;font-weight:600;line-height:1.167}.form-toggle__label-content span{font-weight:400}.jp-form-search-settings-group__toggle-description{margin-top:1em}p.jp-form-search-settings-group__toggle-explanation{font-size:1em;font-weight:400;line-height:1.5;margin-bottom:0;margin-top:0}.jp-form-search-settings-group-buttons.jp-search-dashboard-row{margin-top:1.5em}.jp-form-search-settings-group-buttons__button{align-items:center;border-color:#000;display:flex;font-size:1em;justify-content:center;min-height:2.5em;padding:.5em 1.5em;text-align:center}.jp-form-search-settings-group-buttons__button.is-customize-search{background-color:#000;color:#fff}.jp-form-search-settings-group-buttons__button:disabled,.jp-form-search-settings-group-buttons__button[disabled]{background-color:#dcdcde;border-color:#dcdcde;color:#a7aaad;cursor:not-allowed}.jp-form-search-settings-group-buttons__button.is-widgets-editor{background:transparent;color:#000}.jp-form-search-settings-group-buttons__button.is-widgets-editor:disabled,.jp-form-search-settings-group-buttons__button.is-widgets-editor[disabled]{background:transparent;color:#a7aaad}.form-toggle.is-search-admin.is-compact+.form-toggle__switch{background:#fff;border:2px solid #000;border-radius:.75em;height:1.5em;width:3em}.form-toggle.is-search-admin.is-compact+.form-toggle__switch:after,.form-toggle.is-search-admin.is-compact+.form-toggle__switch:before{background-color:#000;height:.9375em;width:.9375em}.form-toggle.is-search-admin.is-compact+.form-toggle__switch:focus{box-shadow:0 0 0 2px #3582c4}.form-toggle.is-search-admin.is-compact:checked+.form-toggle__switch{background:#069e08;border-color:#069e08}.form-toggle.is-search-admin.is-compact:checked+.form-toggle__switch:after{background-color:#fff;left:1.5em}.form-toggle.is-search-admin.is-compact.is-toggling+.form-toggle__switch:after,.form-toggle.is-search-admin.is-compact.is-toggling+.form-toggle__switch:before{left:1.5em}.form-toggle.is-search-admin.is-compact.is-toggling:checked+.form-toggle__switch:after,.form-toggle.is-search-admin.is-compact.is-toggling:checked+.form-toggle__switch:before{left:0}.jp-search-dashboard-cut{border:2px solid #069e08;border-radius:4px;display:block;margin:2em 0;padding:1em 4em 1em 1.5em;position:relative;text-decoration:none}.jp-search-dashboard-cut span{display:block}.jp-search-dashboard-cut span:last-of-type{font-weight:600}.jp-search-dashboard-cut:focus span:last-of-type,.jp-search-dashboard-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:2px}.jp-search-dashboard-cut:focus:after,.jp-search-dashboard-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-search-dashboard-cut:after{color:#069e08;content:"→";font-size:1.5em;font-weight:600;position:absolute;right:1.5em;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-search-dashboard-row .form-toggle__switch-container.sm-col-span-1{display:flex;justify-content:center;padding-top:4px}.jp-mocked-instant-search{background:#fff;border-radius:3px;box-shadow:0 5px 25px rgba(0,0,0,.35);font-size:.75em;height:100%;margin:0 auto;overflow:hidden;user-select:none;width:100%}.jp-mocked-instant-search__search-controls{align-items:center;border-bottom:1px solid #e6f1f5;display:flex;flex-flow:row nowrap;justify-content:space-between}.jp-mocked-instant-search__search-icon{align-items:center;display:flex;height:60px;justify-content:center;width:60px}@media(max-width:660px){.jp-mocked-instant-search__search-icon{height:45px;width:45px}}.jp-mocked-instant-search__search-mock-input{width:calc(100% - 120px)}.jp-mocked-instant-search__close-button{align-items:center;background-color:transparent!important;border-left:1px solid #e6f1f5;display:flex;height:60px;justify-content:center;line-height:1;width:60px}.jp-mocked-instant-search__close-button svg.gridicon{fill:#646970}@media(max-width:660px){.jp-mocked-instant-search__close-button{height:45px;width:45px}}.jp-mocked-instant-search__search-results{display:flex;height:100%;position:relative}.jp-mocked-instant-search__search-results-primary{padding:1em 4em;width:100%}@media(min-width:661px){.jp-mocked-instant-search__search-results-primary{max-width:calc(100% - 220px)}}@media(max-width:660px){.jp-mocked-instant-search__search-results-primary{padding:2em}}.jp-mocked-instant-search__search-results-header{align-items:center;display:flex;flex-flow:row wrap;justify-content:space-between}.jp-mocked-instant-search__search-results-header .jp-mocked-instant-search__result-statistics{font-size:1em;font-weight:700}@media(max-width:480px){.jp-mocked-instant-search__search-results-header .jp-mocked-instant-search__result-statistics{width:100%}}.jp-mocked-instant-search__search-results-header .jp-mocked-instant-search__result-sort-list span{font-size:1em;margin-left:.5em}.jp-mocked-instant-search__search-results-header .jp-mocked-instant-search__result-sort-list span:first-child{margin-left:0}.jp-mocked-instant-search__search-results-header .jp-mocked-instant-search__result-sort-list .jp-mocked-instant-search__result-sort-selected{color:#069e08}@media(max-width:480px){.jp-mocked-instant-search__search-results-header .jp-mocked-instant-search__result-sort-list{width:100%}}.jp-mocked-instant-search__search-result{margin-top:1em}.jp-mocked-instant-search__search-results-secondary{background:none;border-left:1px solid #e6f1f5;border-radius:0;bottom:0;box-shadow:none;display:block;flex:none;padding-left:2em;padding-top:1em;position:static;width:220px}@media(max-width:660px){.jp-mocked-instant-search__search-results-secondary{display:none}}.jp-mocked-instant-search__search-filter-header{font-weight:700}.jp-mocked-instant-search__search-filter label{cursor:default}.jp-mocked-instant-search__search-filter label input[type=checkbox]{border:1px solid #e6e6fa;border-radius:5px;cursor:default}.jp-mocked-instant-search__search-filter span{background-color:#e6e6fa;display:inline-block;line-height:1.35;margin-left:1em;width:50em}.jp-mocked-instant-search__search-filter input[type=checkbox]{height:1em;width:1em}.jp-mocked-instant-search__search-filter-list{margin-top:1em}.jp-mocked-legacy-search{border-radius:3px;margin:0 auto;user-select:none;width:100%}.jp-mocked-legacy-search__search-controls{background:#fff;box-shadow:0 5px 25px rgba(0,0,0,.35);display:flex;flex-flow:row nowrap;width:100%}.jp-mocked-legacy-search__search-icon{align-items:center;display:flex;height:60px;justify-content:center;width:60px}.jp-mocked-legacy-search__search-input{align-items:center;display:flex;width:100%}#jp-plugin-container{min-height:100vh}.dops-notice{animation:appear .3s ease-in-out;background:#414141;border-radius:3px;box-sizing:border-box;color:#fff;display:flex;line-height:1.5;margin-bottom:24px;position:relative;width:100%}.dops-notice.is-success .dops-notice__icon-wrapper{background:#4ab866}.dops-notice.is-warning .dops-notice__icon-wrapper{background:#f0b849}.dops-notice.is-error .dops-notice__icon-wrapper{background:#d94f4f}.dops-notice.is-info .dops-notice__icon-wrapper{background:#3582c4}.dops-notice .dops-notice__dismiss,.dops-notice.is-error .dops-notice__dismiss,.dops-notice.is-info .dops-notice__dismiss,.dops-notice.is-success .dops-notice__dismiss,.dops-notice.is-warning .dops-notice__dismiss{overflow:hidden}.dops-notice__icon-wrapper{align-items:baseline;align-self:stretch;background:#747474;border-radius:3px 0 0 3px;color:#fff;display:flex;flex-shrink:0;justify-content:center;width:47px}.dops-notice__icon-wrapper .gridicon{margin-top:10px}@media(min-width:481px){.dops-notice__icon-wrapper .gridicon{margin-top:12px}}.dops-notice__content.dops-notice__content{flex-grow:1;font-size:12px;padding:13px}@media(min-width:481px){.dops-notice__content.dops-notice__content{font-size:14px}}.dops-notice__content.dops-notice__content a{color:#fff;text-decoration:underline}.dops-notice__content.dops-notice__content a:hover,.dops-notice__text a.dops-notice__text-no-underline{text-decoration:none}.dops-notice__text a,.dops-notice__text a:visited{color:#fff;text-decoration:underline}.dops-notice__text a:hover,.dops-notice__text a:visited:hover{color:#fff;text-decoration:none}.dops-notice__text ul{margin-bottom:0;margin-left:0}.dops-notice__text li{margin-left:2em;margin-top:.5em}.dops-notice__text p{margin-bottom:0;margin-top:.5em}.dops-notice__text p:first-child{margin-top:0}.dops-notice__button{cursor:pointer;margin-left:.428em}.dops-notice__dismiss{cursor:pointer;flex-shrink:0;padding:12px 12px 0}.dops-notice__dismiss .gridicon{height:18px;width:18px}@media(min-width:481px){.dops-notice__dismiss{padding:11px 11px 0}.dops-notice__dismiss .gridicon{height:24px;width:24px}}.dops-notice .dops-notice__dismiss{color:#bbb}.dops-notice .dops-notice__dismiss:focus,.dops-notice .dops-notice__dismiss:hover{color:#fff}a.dops-notice__action{align-items:center;color:#bbb;cursor:pointer;display:flex;font-size:12px;font-weight:400;padding:13px;text-decoration:none;white-space:nowrap}@media(min-width:481px){a.dops-notice__action{align-items:center;border-radius:0;flex-grow:0;flex-shrink:1;font-size:14px;margin:0 0 0 auto;padding:13px 16px}a.dops-notice__action .gridicon{height:24px;width:24px}}a.dops-notice__action:visited{color:#bbb}a.dops-notice__action:hover{color:#fff}a.dops-notice__action .gridicon{height:18px;margin-left:8px;opacity:.7;width:18px}.dops-notice.is-compact{border-radius:3px;display:inline-flex;flex-direction:row;flex-wrap:nowrap;line-height:1.5;margin:0;min-height:20px;padding:0;text-decoration:none;text-transform:none;vertical-align:middle;width:auto}.dops-notice.is-compact .dops-notice__content{font-size:12px;padding:6px 10px}.dops-notice.is-compact .dops-notice__icon-wrapper{width:28px}.dops-notice.is-compact .dops-notice__icon-wrapper .dops-notice__icon{height:18px;margin:0;width:18px}.dops-notice.is-compact .dops-notice__icon-wrapper .gridicon{margin-top:6px}.dops-notice.is-compact .dops-notice__dismiss{align-self:center;flex:none;margin:0 8px 0 0;padding:0;position:relative}.dops-notice.is-compact .dops-notice__dismiss .gridicon{height:18px;width:18px}.dops-notice.is-compact a.dops-notice__action{align-self:center;background:transparent;display:inline-block;font-size:12px;margin:0 0 0 16px;padding:0 10px}.dops-notice.is-compact a.dops-notice__action:active,.dops-notice.is-compact a.dops-notice__action:focus,.dops-notice.is-compact a.dops-notice__action:hover{background:transparent}.dops-notice.is-compact a.dops-notice__action .gridicon{height:14px;margin-left:8px;opacity:1;vertical-align:sub;width:14px}@keyframes appear{0%{opacity:0}to{opacity:1}}.global-notices{bottom:0;left:0;pointer-events:none;position:fixed;right:0;text-align:right;top:auto;z-index:179}@media(min-width:661px){.global-notices{bottom:auto;left:auto;max-width:calc(100% - 68px);right:16px;top:63px}}@media(min-width:961px){.global-notices{max-width:calc(100% - 208px);right:24px;top:71px}}@media(min-width:1041px){.global-notices{max-width:calc(100% - 224px);right:32px}}.global-notices .dops-notice{border-radius:0;box-shadow:0 2px 5px rgba(0,0,0,.2),0 0 56px rgba(0,0,0,.15);flex-wrap:nowrap;margin-bottom:0;pointer-events:auto;text-align:left}.global-notices .dops-notice .dops-notice__icon-wrapper{border-radius:0}@media(min-width:661px){.global-notices .dops-notice{border-radius:3px;display:flex;margin-bottom:24px;overflow:hidden}.global-notices .dops-notice .dops-notice__icon-wrapper{border-radius:3px 0 0 3px}.global-notices .dops-notice a.dops-notice__action{font-size:14px;padding:13px 16px}}.global-notices .dops-notice__dismiss{flex-shrink:0}@media(min-width:661px){.global-notices .dops-notice__dismiss{padding:13px 16px 0}}.jp-search-bar-chart__container{max-height:40px}.jp-search-chart-legend__box{border-radius:100%;display:inline-block;height:15px;margin-left:0;margin-right:5px;width:15px}.jp-search-chart-legend{display:inline-block;font-size:1em;list-style:none}ul.jp-search-chart-legend{padding:0}.jp-search-chart-legend li{display:inherit;padding-bottom:18px}.jp-search-chart-legend__count{padding:0 10px 0 3px}.jp-search-chart-legend li .jp-search-chart-legend__count,.jp-search-chart-legend li .jp-search-chart-legend__label{display:inherit;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jp-search-notice-box{background-color:#fff;border:.5px solid #dcdcde;border-radius:5px;color:#000}.jp-search-notice-box__important{border:.5px solid #d63638}.jp-search-notice-box a.dops-notice__action{color:#000;display:inline;font-weight:700;padding:0 0 0 5px}.jp-search-notice-box span.dops-notice__dismiss>svg,.jp-search-notice-box span.dops-notice__dismiss>svg:hover{color:#000}.jp-search-notice-box .dops-notice__icon-wrapper{color:#000;vertical-align:text-top}.jp-search-notice-box__important,.jp-search-notice-box__important .dops-notice__icon-wrapper,.jp-search-notice-box__important a.dops-notice__action{color:#d63638}.jp-search-notice-box>span.dops-notice__icon-wrapper>svg{margin:0}.jp-search-record-count p{font-size:1em}.jp-search-record-meter .jp-search-notice-box>span.dops-notice__icon-wrapper{background-color:hsla(0,0%,100%,0);padding-top:13px}.jp-search-record-meter{border-bottom:1px solid #dcdcde;padding:64px 0}.jp-search-record-meter__content h2{margin-top:0}.jp-search-record-meter__content{width:100%}.jp-search-dashboard-wrap{align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;margin:0 auto;width:100%}.jp-search-dashboard-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:calc(100% - 32px)}@media(min-width:600px){.jp-search-dashboard-row{grid-template-columns:repeat(8,1fr);margin:0 18px;width:calc(100% - 36px)}}@media(min-width:960px){.jp-search-dashboard-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px;width:calc(100% - 48px)}}.jp-search-dashboard-row .sm-col-span-1{grid-column-end:span 1}.jp-search-dashboard-row .sm-col-span-2{grid-column-end:span 2}.jp-search-dashboard-row .sm-col-span-3{grid-column-end:span 3}.jp-search-dashboard-row .sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.jp-search-dashboard-row .md-col-span-1{grid-column-end:span 1}.jp-search-dashboard-row .md-col-span-2{grid-column-end:span 2}.jp-search-dashboard-row .md-col-span-3{grid-column-end:span 3}.jp-search-dashboard-row .md-col-span-4{grid-column-end:span 4}.jp-search-dashboard-row .md-col-span-5{grid-column-end:span 5}.jp-search-dashboard-row .md-col-span-6{grid-column-end:span 6}.jp-search-dashboard-row .md-col-span-7{grid-column-end:span 7}.jp-search-dashboard-row .md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.jp-search-dashboard-row .lg-col-span-1{grid-column-end:span 1}.jp-search-dashboard-row .lg-col-span-2{grid-column-end:span 2}.jp-search-dashboard-row .lg-col-span-3{grid-column-end:span 3}.jp-search-dashboard-row .lg-col-span-4{grid-column-end:span 4}.jp-search-dashboard-row .lg-col-span-5{grid-column-end:span 5}.jp-search-dashboard-row .lg-col-span-6{grid-column-end:span 6}.jp-search-dashboard-row .lg-col-span-7{grid-column-end:span 7}.jp-search-dashboard-row .lg-col-span-8{grid-column-end:span 8}.jp-search-dashboard-row .lg-col-span-9{grid-column-end:span 9}.jp-search-dashboard-row .lg-col-span-10{grid-column-end:span 10}.jp-search-dashboard-row .lg-col-span-11{grid-column-end:span 11}.jp-search-dashboard-row .lg-col-span-12{grid-column-end:span 12}.jp-search-dashboard-row .lg-col-span-0{display:none}}@media(max-width:960px){.jp-search-dashboard-row .md-col-span-0{display:none}}@media(max-width:600px){.jp-search-dashboard-row .sm-col-span-0{display:none}.jp-search-dashboard-row .sm-col-span-1{display:block}}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}#wpcontent{padding-left:0!important}#screen-meta,#screen-meta-links{display:none}#jp-search-dashboard{background-color:#fff;color:#000;display:flex;font-size:16px;min-height:calc(100vh - 97px)}#jp-search-dashboard .jp-search-dashboard-page{width:100%}#jp-search-dashboard .jp-masthead__logo-link{pointer-events:none}#jp-search-dashboard .jp-search-dashboard-top{background-color:#f9f9f6;overflow:hidden}#jp-search-dashboard .jp-search-dashboard-top__title{padding:2.5em 0}#jp-search-dashboard .jp-search-dashboard-top__title h1{font-size:2.25em;line-height:1.111;margin:0}#jp-search-dashboard .jp-search-dashboard-top__mocked-search-interface{align-items:center;display:flex;flex-flow:column;height:15.625em;justify-content:center}#jp-search-dashboard .jp-search-dashboard-bottom{background-color:#fff}#jp-search-dashboard .jp-search-dashboard-footer,#jp-search-dashboard .jp-search-dashboard-header{background-color:#fff;padding:2.5em 0}@media(max-width:600px){#jp-search-dashboard{font-size:14px}}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.js new file mode 100644 index 00000000..30644260 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.js @@ -0,0 +1,13 @@ +/*! For license information please see jp-search-dashboard.js.LICENSE.txt */ +!function(){var t={9064:function(t,e,n){"use strict";n.d(e,{X:function(){return r}});const i={AED:{symbol:"د.إ.",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function r(t){return i[t]||{symbol:"$",grouping:",",decimal:".",precision:2}}},8899:function(t,e,n){"use strict";n.d(e,{LR:function(){return s}});var i=n(9064),r=n(2003);function s(t,e,n={}){const s=(0,i.X)(e);if(!s||isNaN(t))return null;const{decimal:o,grouping:a,precision:c,symbol:l}={...s,...n},h=t<0?"-":"",u=Math.abs(t),d=Math.floor(u);return{sign:h,symbol:l,integer:(0,r.Z)(u,c,o,a).split(o)[0],fraction:c>0?(0,r.Z)(u-d,c,o,a).slice(1):""}}},2003:function(t,e,n){"use strict";function i(t,e=0,n=".",i=","){const r=(t+"").replace(/[^0-9+\-Ee.]/g,""),s=isFinite(+r)?+r:0,o=isFinite(+e)?Math.abs(e):0,a=(o?function(t,e){const n=Math.pow(10,e);return""+(Math.round(t*n)/n).toFixed(e)}(s,o):""+Math.round(s)).split(".");return a[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(a[1]||"").length<o&&(a[1]=a[1]||"",a[1]+=new Array(o-a[1].length+1).join("0")),a.join(n)}n.d(e,{Z:function(){return i}})},8294:function(t){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},2402:function(t){function e(){return t.exports=e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(this,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},3807:function(t,e,n){"use strict";var i=n(917);i.kL.register(...i.zX),e.Z=i.kL},917:function(t,e,n){"use strict";n.d(e,{kL:function(){return ce},zX:function(){return qn}});var i=n(8095);var r=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){const r=e.listeners[i],s=e.duration;r.forEach((i=>i({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(n-e.start,s)})))}_refresh(){this._request||(this._running=!0,this._request=i.r.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((n,i)=>{if(!n.running||!n.items.length)return;const r=n.items;let s,o=r.length-1,a=!1;for(;o>=0;--o)s=r[o],s._active?(s._total>n.duration&&(n.duration=s._total),s.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(i.draw(),this._notify(i,n,t,"progress")),r.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const s="transparent",o={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const r=(0,i.c)(t||s),o=r.valid&&(0,i.c)(e||s);return o&&o.valid?o.mix(r,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class a{constructor(t,e,n,r){const s=e[n];r=(0,i.a)([t.to,r,s,t.from]);const a=(0,i.a)([t.from,s,r]);this._active=!0,this._fn=t.fn||o[t.type||typeof a],this._easing=i.e[t.easing]||i.e.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const r=this._target[this._prop],s=n-this._start,o=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=(0,i.a)([t.to,e,r,t.from]),this._from=(0,i.a)([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,r=this._from,s=this._loop,o=this._to;let a;if(this._active=r!==o&&(s||e<n),!this._active)return this._target[i]=o,void this._notify(!0);e<0?this._target[i]=r:(a=e/n%2,a=s&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[i]=this._fn(r,o,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,n)=>{t.push({res:e,rej:n})}))}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let t=0;t<n.length;t++)n[t][e]()}}i.d.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const c=Object.keys(i.d.animation);i.d.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),i.d.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),i.d.describe("animations",{_fallback:"animation"}),i.d.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class l{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!(0,i.i)(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((n=>{const r=t[n];if(!(0,i.i)(r))return;const s={};for(const t of c)s[t]=r[t];((0,i.b)(r.properties)&&r.properties||[n]).forEach((t=>{t!==n&&e.has(t)||e.set(t,s)}))}))}_animateOptions(t,e){const n=e.options,i=function(t,e){if(!e)return;let n=t.options;if(!n)return void(t.options=e);n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(t,n);if(!i)return[];const r=this._createAnimations(i,n);return n.$shared&&function(t,e){const n=[],i=Object.keys(e);for(let e=0;e<i.length;e++){const r=t[i[e]];r&&r.active()&&n.push(r.wait())}return Promise.all(n)}(t.options.$animations,n).then((()=>{t.options=n}),(()=>{})),r}_createAnimations(t,e){const n=this._properties,i=[],r=t.$animations||(t.$animations={}),s=Object.keys(e),o=Date.now();let c;for(c=s.length-1;c>=0;--c){const l=s[c];if("$"===l.charAt(0))continue;if("options"===l){i.push(...this._animateOptions(t,e));continue}const h=e[l];let u=r[l];const d=n.get(l);if(u){if(d&&u.active()){u.update(d,h,o);continue}u.cancel()}d&&d.duration?(r[l]=u=new a(d,t,l,h),i.push(u)):t[l]=h}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(r.add(this._chart,n),!0):void 0}}function h(t,e){const n=t&&t.options||{},i=n.reverse,r=void 0===n.min?e:0,s=void 0===n.max?e:0;return{start:i?s:r,end:i?r:s}}function u(t,e){const n=[],i=t._getSortedDatasetMetas(e);let r,s;for(r=0,s=i.length;r<s;++r)n.push(i[r].index);return n}function d(t,e,n,r={}){const s=t.keys,o="single"===r.mode;let a,c,l,h;if(null!==e){for(a=0,c=s.length;a<c;++a){if(l=+s[a],l===n){if(r.all)continue;break}h=t.values[l],(0,i.g)(h)&&(o||0===e||(0,i.s)(e)===(0,i.s)(h))&&(e+=h)}return e}}function p(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function f(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function g(t,e,n,i){for(const r of e.getMatchingVisibleMetas(i).reverse()){const e=t[r.index];if(n&&e>0||!n&&e<0)return r.index}return null}function m(t,e){const{chart:n,_cachedMeta:i}=t,r=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=i,c=s.axis,l=o.axis,h=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(s,o,i),u=e.length;let d;for(let t=0;t<u;++t){const n=e[t],{[c]:s,[l]:u}=n;d=(n._stacks||(n._stacks={}))[l]=f(r,h,s),d[a]=u,d._top=g(d,o,!0,i.type),d._bottom=g(d,o,!1,i.type)}}function b(t,e){const n=t.scales;return Object.keys(n).filter((t=>n[t].axis===e)).shift()}function y(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n]}}}const v=t=>"reset"===t||"none"===t,x=(t,e)=>e?t:Object.assign({},t);class _{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=p(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&y(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),r=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,s=e.xAxisID=(0,i.v)(n.xAxisID,b(t,"x")),o=e.yAxisID=(0,i.v)(n.yAxisID,b(t,"y")),a=e.rAxisID=(0,i.v)(n.rAxisID,b(t,"r")),c=e.indexAxis,l=e.iAxisID=r(c,s,o,a),h=e.vAxisID=r(c,o,s,a);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&(0,i.u)(this._data,this),t._stacked&&y(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if((0,i.i)(e))this._data=function(t){const e=Object.keys(t),n=new Array(e.length);let i,r,s;for(i=0,r=e.length;i<r;++i)s=e[i],n[i]={x:s,y:t[s]};return n}(e);else if(n!==e){if(n){(0,i.u)(n,this);const t=this._cachedMeta;y(t),t._parsed=[]}e&&Object.isExtensible(e)&&(0,i.l)(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const r=e._stacked;e._stacked=p(e.vScale,e),e.stack!==n.stack&&(i=!0,y(e),e.stack=n.stack),this._resyncElements(t),(i||r!==e._stacked)&&m(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:r}=this,{iScale:s,_stacked:o}=n,a=s.axis;let c,l,h,u=0===t&&e===r.length||n._sorted,d=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,h=r;else{h=(0,i.b)(r[t])?this.parseArrayData(n,r,t,e):(0,i.i)(r[t])?this.parseObjectData(n,r,t,e):this.parsePrimitiveData(n,r,t,e);const s=()=>null===l[a]||d&&l[a]<d[a];for(c=0;c<e;++c)n._parsed[c+t]=l=h[c],u&&(s()&&(u=!1),d=l);n._sorted=u}o&&m(this,h)}parsePrimitiveData(t,e,n,i){const{iScale:r,vScale:s}=t,o=r.axis,a=s.axis,c=r.getLabels(),l=r===s,h=new Array(i);let u,d,p;for(u=0,d=i;u<d;++u)p=u+n,h[u]={[o]:l||r.parse(c[p],p),[a]:s.parse(e[p],p)};return h}parseArrayData(t,e,n,i){const{xScale:r,yScale:s}=t,o=new Array(i);let a,c,l,h;for(a=0,c=i;a<c;++a)l=a+n,h=e[l],o[a]={x:r.parse(h[0],l),y:s.parse(h[1],l)};return o}parseObjectData(t,e,n,r){const{xScale:s,yScale:o}=t,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,l=new Array(r);let h,u,d,p;for(h=0,u=r;h<u;++h)d=h+n,p=e[d],l[h]={x:s.parse((0,i.f)(p,a),d),y:o.parse((0,i.f)(p,c),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const i=this.chart,r=this._cachedMeta,s=e[t.axis];return d({keys:u(i,!0),values:e._stacks[t.axis]},s,r.index,{mode:n})}updateRangeFromParsed(t,e,n,i){const r=n[e.axis];let s=null===r?NaN:r;const o=i&&n._stacks[e.axis];i&&o&&(i.values=o,s=d(i,r,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const n=this._cachedMeta,r=n._parsed,s=n._sorted&&t===n.iScale,o=r.length,a=this._getOtherScale(t),c=((t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:u(n,!0),values:null})(e,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=function(t){const{min:e,max:n,minDefined:i,maxDefined:r}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}(a);let p,f;function g(){f=r[p];const e=f[a.axis];return!(0,i.g)(f[t.axis])||h>e||d<e}for(p=0;p<o&&(g()||(this.updateRangeFromParsed(l,t,f,c),!s));++p);if(s)for(p=o-1;p>=0;--p)if(!g()){this.updateRangeFromParsed(l,t,f,c);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let r,s,o;for(r=0,s=e.length;r<s;++r)o=e[r][t.axis],(0,i.g)(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,i=e.vScale,r=this.getParsed(t);return{label:n?""+n.getLabelForValue(r[n.axis]):"",value:i?""+i.getLabelForValue(r[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,n,r,s;return(0,i.i)(t)?(e=t.top,n=t.right,r=t.bottom,s=t.left):e=n=r=s=t,{top:e,right:n,bottom:r,left:s,disabled:!1===t}}((0,i.v)(this.options.clip,function(t,e,n){if(!1===n)return!1;const i=h(t,n),r=h(e,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,i=n.data||[],r=e.chartArea,s=[],o=this._drawStart||0,a=this._drawCount||i.length-o,c=this.options.drawActiveElementsOnTop;let l;for(n.dataset&&n.dataset.draw(t,r,o,a),l=o;l<o+a;++l){const e=i[l];e.hidden||(e.active&&c?s.push(e):e.draw(t,r))}for(l=0;l<s.length;++l)s[l].draw(t,r)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const r=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,n){return(0,i.h)(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),s.parsed=this.getParsed(t),s.raw=r.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=function(t,e){return(0,i.h)(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),s.dataset=r,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=n,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const r="active"===e,s=this._cachedDataOpts,o=t+"-"+e,a=s[o],c=this.enableOptionSharing&&(0,i.j)(n);if(a)return x(a,c);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),u=r?[`${t}Hover`,"hover",t,""]:[t,""],d=l.getOptionScopes(this.getDataset(),h),p=Object.keys(i.d.elements[t]),f=l.resolveNamedOptions(d,p,(()=>this.getContext(n,r)),u);return f.$shared&&(f.$shared=c,s[o]=Object.freeze(x(f,c))),f}_resolveAnimations(t,e,n){const i=this.chart,r=this._cachedDataOpts,s=`animation-${e}`,o=r[s];if(o)return o;let a;if(!1!==i.options.animation){const i=this.chart.config,r=i.datasetAnimationScopeKeys(this._type,e),s=i.getOptionScopes(this.getDataset(),r);a=i.createResolver(s,this.getContext(t,n,e))}const c=new l(i,a&&a.animations);return a&&a._cacheable&&(r[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||v(t)||this.chart._animationsDisabled}updateElement(t,e,n,i){v(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!v(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const r=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[t,e,n]of this._syncList)this[t](e,n);this._syncList=[];const i=n.length,r=e.length,s=Math.min(r,i);s&&this.parse(0,s),r>i?this._insertElements(i,r-i,t):r<i&&this._removeElements(r,i-r)}_insertElements(t,e,n=!0){const i=this._cachedMeta,r=i.data,s=t+e;let o;const a=t=>{for(t.length+=e,o=t.length-1;o>=s;o--)t[o]=t[o-e]};for(a(r),o=t;o<s;++o)r[o]=new this.dataElementType;this._parsing&&a(i._parsed),this.parse(t,e),n&&this.updateElements(r,t,e,"reset")}updateElements(t,e,n,i){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,e);n._stacked&&y(n,i)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,i]=t;this[e](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function k(t){const e=t.iScale,n=function(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let r=[];for(let e=0,i=n.length;e<i;e++)r=r.concat(n[e].controller.getAllParsedValues(t));t._cache.$bar=(0,i._)(r.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let r,s,o,a,c=e._length;const l=()=>{32767!==o&&-32768!==o&&((0,i.j)(a)&&(c=Math.min(c,Math.abs(o-a)||c)),a=o)};for(r=0,s=n.length;r<s;++r)o=e.getPixelForValue(n[r]),l();for(a=void 0,r=0,s=e.ticks.length;r<s;++r)o=e.getPixelForTick(r),l();return c}function w(t,e,n,r){return(0,i.b)(t)?function(t,e,n,i){const r=n.parse(t[0],i),s=n.parse(t[1],i),o=Math.min(r,s),a=Math.max(r,s);let c=o,l=a;Math.abs(o)>Math.abs(a)&&(c=a,l=o),e[n.axis]=l,e._custom={barStart:c,barEnd:l,start:r,end:s,min:o,max:a}}(t,e,n,r):e[n.axis]=n.parse(t,r),e}function S(t,e,n,i){const r=t.iScale,s=t.vScale,o=r.getLabels(),a=r===s,c=[];let l,h,u,d;for(l=n,h=n+i;l<h;++l)d=e[l],u={},u[r.axis]=a||r.parse(o[l],l),c.push(w(d,u,s,l));return c}function C(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function E(t,e,n,i){let r=e.borderSkipped;const s={};if(!r)return void(t.borderSkipped=s);const{start:o,end:a,reverse:c,top:l,bottom:h}=function(t){let e,n,i,r,s;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(r="end",s="start"):(r="start",s="end"),{start:n,end:i,reverse:e,top:r,bottom:s}}(t);"middle"===r&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?r=l:(n._bottom||0)===i?r=h:(s[M(h,o,a,c)]=!0,r=l)),s[M(r,o,a,c)]=!0,t.borderSkipped=s}function M(t,e,n,i){var r,s,o;return i?(o=n,t=P(t=(r=t)===(s=e)?o:r===o?s:r,n,e)):t=P(t,e,n),t}function P(t,e,n){return"start"===t?e:"end"===t?n:t}function j(t,{inflateAmount:e},n){t.inflateAmount="auto"===e?1===n?.33:0:e}_.defaults={},_.prototype.datasetElementType=null,_.prototype.dataElementType=null;class O extends _{parsePrimitiveData(t,e,n,i){return S(t,e,n,i)}parseArrayData(t,e,n,i){return S(t,e,n,i)}parseObjectData(t,e,n,r){const{iScale:s,vScale:o}=t,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,l="x"===s.axis?a:c,h="x"===o.axis?a:c,u=[];let d,p,f,g;for(d=n,p=n+r;d<p;++d)g=e[d],f={},f[s.axis]=s.parse((0,i.f)(g,l),d),u.push(w((0,i.f)(g,h),f,o,d));return u}updateRangeFromParsed(t,e,n,i){super.updateRangeFromParsed(t,e,n,i);const r=n._custom;r&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:i}=e,r=this.getParsed(t),s=r._custom,o=C(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(r[i.axis]);return{label:""+n.getLabelForValue(r[n.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,r){const s="reset"===r,{index:o,_cachedMeta:{vScale:a}}=this,c=a.getBasePixel(),l=a.isHorizontal(),h=this._getRuler(),u=this.resolveDataElementOptions(e,r),d=this.getSharedOptions(u),p=this.includeOptions(r,d);this.updateSharedOptions(d,r,u);for(let u=e;u<e+n;u++){const e=this.getParsed(u),n=s||(0,i.k)(e[a.axis])?{base:c,head:c}:this._calculateBarValuePixels(u),f=this._calculateBarIndexPixels(u,h),g=(e._stacks||{})[a.axis],m={horizontal:l,base:n.base,enableBorderRadius:!g||C(e._custom)||o===g._top||o===g._bottom,x:l?n.head:f.center,y:l?f.center:n.head,height:l?f.size:Math.abs(n.size),width:l?Math.abs(n.size):f.size};p&&(m.options=d||this.resolveDataElementOptions(u,t[u].active?"active":r));const b=m.options||t[u].options;E(m,b,g,o),j(m,b,h.ratio),this.updateElement(t[u],u,m,r)}}_getStacks(t,e){const n=this._cachedMeta.iScale,r=n.getMatchingVisibleMetas(this._type),s=n.options.stacked,o=r.length,a=[];let c,l;for(c=0;c<o;++c)if(l=r[c],l.controller.options.grouped){if(void 0!==e){const t=l.controller.getParsed(e)[l.controller._cachedMeta.vScale.axis];if((0,i.k)(t)||isNaN(t))continue}if((!1===s||-1===a.indexOf(l.stack)||void 0===s&&void 0===l.stack)&&a.push(l.stack),l.index===t)break}return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const i=this._getStacks(t,n),r=void 0!==e?i.indexOf(e):-1;return-1===r?i.length-1:r}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,i=[];let r,s;for(r=0,s=e.data.length;r<s;++r)i.push(n.getPixelForValue(this.getParsed(r)[n.axis],r));const o=t.barThickness;return{min:o||k(e),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n},options:{base:r,minBarLength:s}}=this,o=r||0,a=this.getParsed(t),c=a._custom,l=C(c);let h,u,d=a[e.axis],p=0,f=n?this.applyStack(e,a,n):d;f!==d&&(p=f-d,f=d),l&&(d=c.barStart,f=c.barEnd-c.barStart,0!==d&&(0,i.s)(d)!==(0,i.s)(c.barEnd)&&(p=0),p+=d);const g=(0,i.k)(r)||l?p:r;let m=e.getPixelForValue(g);if(h=this.chart.getDataVisibility(t)?e.getPixelForValue(p+f):m,u=h-m,Math.abs(u)<s&&(u=function(t,e,n){return 0!==t?(0,i.s)(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}(u,e,o)*s,d===o&&(m-=u/2),h=m+u),m===e.getPixelForValue(o)){const t=(0,i.s)(u)*e.getLineWidthForValue(o)/2;m+=t,u-=t}return{size:u,base:m,head:h,center:h+u/2}}_calculateBarIndexPixels(t,e){const n=e.scale,r=this.options,s=r.skipNull,o=(0,i.v)(r.maxBarThickness,1/0);let a,c;if(e.grouped){const n=s?this._getStackCount(t):e.stackCount,l="flex"===r.barThickness?function(t,e,n,i){const r=e.pixels,s=r[t];let o=t>0?r[t-1]:null,a=t<r.length-1?r[t+1]:null;const c=n.categoryPercentage;null===o&&(o=s-(null===a?e.end-e.start:a-s)),null===a&&(a=s+s-o);const l=s-(s-Math.min(o,a))/2*c;return{chunk:Math.abs(a-o)/2*c/i,ratio:n.barPercentage,start:l}}(t,e,r,n):function(t,e,n,r){const s=n.barThickness;let o,a;return(0,i.k)(s)?(o=e.min*n.categoryPercentage,a=n.barPercentage):(o=s*r,a=1),{chunk:o/r,ratio:a,start:e.pixels[t]-o/2}}(t,e,r,n),h=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0);a=l.start+l.chunk*h+l.chunk/2,c=Math.min(o,l.chunk*l.ratio)}else a=n.getPixelForValue(this.getParsed(t)[n.axis],t),c=Math.min(o,e.min*e.ratio);return{base:a-c/2,head:a+c/2,center:a,size:c}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,i=n.length;let r=0;for(;r<i;++r)null!==this.getParsed(r)[e.axis]&&n[r].draw(this._ctx)}}O.id="bar",O.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},O.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class T extends _{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,i){const r=super.parsePrimitiveData(t,e,n,i);for(let t=0;t<r.length;t++)r[t]._custom=this.resolveDataElementOptions(t+n).radius;return r}parseArrayData(t,e,n,r){const s=super.parseArrayData(t,e,n,r);for(let t=0;t<s.length;t++){const r=e[n+t];s[t]._custom=(0,i.v)(r[2],this.resolveDataElementOptions(t+n).radius)}return s}parseObjectData(t,e,n,r){const s=super.parseObjectData(t,e,n,r);for(let t=0;t<s.length;t++){const r=e[n+t];s[t]._custom=(0,i.v)(r&&r.r&&+r.r,this.resolveDataElementOptions(t+n).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:n,yScale:i}=e,r=this.getParsed(t),s=n.getLabelForValue(r.x),o=i.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+s+", "+o+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,i){const r="reset"===i,{iScale:s,vScale:o}=this._cachedMeta,a=this.resolveDataElementOptions(e,i),c=this.getSharedOptions(a),l=this.includeOptions(i,c),h=s.axis,u=o.axis;for(let a=e;a<e+n;a++){const e=t[a],n=!r&&this.getParsed(a),c={},d=c[h]=r?s.getPixelForDecimal(.5):s.getPixelForValue(n[h]),p=c[u]=r?o.getBasePixel():o.getPixelForValue(n[u]);c.skip=isNaN(d)||isNaN(p),l&&(c.options=this.resolveDataElementOptions(a,e.active?"active":i),r&&(c.options.radius=0)),this.updateElement(e,a,c,i)}this.updateSharedOptions(c,i,a)}resolveDataElementOptions(t,e){const n=this.getParsed(t);let r=super.resolveDataElementOptions(t,e);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const s=r.radius;return"active"!==e&&(r.radius=0),r.radius+=(0,i.v)(n&&n._custom,s),r}}T.id="bubble",T.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},T.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class N extends _{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{let s,o,a=t=>+n[t];if((0,i.i)(n[t])){const{key:t="value"}=this._parsing;a=e=>+(0,i.f)(n[e],t)}for(s=t,o=t+e;s<o;++s)r._parsed[s]=a(s)}}_getRotation(){return(0,i.t)(this.options.rotation-90)}_getCircumference(){return(0,i.t)(this.options.circumference)}_getRotationExtents(){let t=i.T,e=-i.T;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)){const i=this.chart.getDatasetMeta(n).controller,r=i._getRotation(),s=i._getCircumference();t=Math.min(t,r),e=Math.max(e,r+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,r=this._cachedMeta,s=r.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-o)/2,0),c=Math.min((0,i.m)(this.options.cutout,a),1),l=this._getRingWeight(this.index),{circumference:h,rotation:u}=this._getRotationExtents(),{ratioX:d,ratioY:p,offsetX:f,offsetY:g}=function(t,e,n){let r=1,s=1,o=0,a=0;if(e<i.T){const c=t,l=c+e,h=Math.cos(c),u=Math.sin(c),d=Math.cos(l),p=Math.sin(l),f=(t,e,r)=>(0,i.p)(t,c,l,!0)?1:Math.max(e,e*n,r,r*n),g=(t,e,r)=>(0,i.p)(t,c,l,!0)?-1:Math.min(e,e*n,r,r*n),m=f(0,h,d),b=f(i.H,u,p),y=g(i.P,h,d),v=g(i.P+i.H,u,p);r=(m-y)/2,s=(b-v)/2,o=-(m+y)/2,a=-(b+v)/2}return{ratioX:r,ratioY:s,offsetX:o,offsetY:a}}(u,h,c),m=(n.width-o)/d,b=(n.height-o)/p,y=Math.max(Math.min(m,b)/2,0),v=(0,i.n)(this.options.radius,y),x=(v-Math.max(v*c,0))/this._getVisibleDatasetWeightTotal();this.offsetX=f*v,this.offsetY=g*v,r.total=this.calculateTotal(),this.outerRadius=v-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*l,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const n=this.options,r=this._cachedMeta,s=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===r._parsed[t]||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*s/i.T)}updateElements(t,e,n,i){const r="reset"===i,s=this.chart,o=s.chartArea,a=s.options.animation,c=(o.left+o.right)/2,l=(o.top+o.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,p=this.resolveDataElementOptions(e,i),f=this.getSharedOptions(p),g=this.includeOptions(i,f);let m,b=this._getRotation();for(m=0;m<e;++m)b+=this._circumference(m,r);for(m=e;m<e+n;++m){const e=this._circumference(m,r),n=t[m],s={x:c+this.offsetX,y:l+this.offsetY,startAngle:b,endAngle:b+e,circumference:e,outerRadius:d,innerRadius:u};g&&(s.options=f||this.resolveDataElementOptions(m,n.active?"active":i)),b+=e,this.updateElement(n,m,s,i)}this.updateSharedOptions(f,i,p)}calculateTotal(){const t=this._cachedMeta,e=t.data;let n,i=0;for(n=0;n<e.length;n++){const r=t._parsed[n];null===r||isNaN(r)||!this.chart.getDataVisibility(n)||e[n].hidden||(i+=Math.abs(r))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?i.T*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,r=n.data.labels||[],s=(0,i.o)(e._parsed[t],n.options.locale);return{label:r[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const n=this.chart;let i,r,s,o,a;if(!t)for(i=0,r=n.data.datasets.length;i<r;++i)if(n.isDatasetVisible(i)){s=n.getDatasetMeta(i),t=s.data,o=s.controller;break}if(!t)return 0;for(i=0,r=t.length;i<r;++i)a=o.resolveDataElementOptions(i),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,i=t.length;n<i;++n){const t=this.resolveDataElementOptions(n);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max((0,i.v)(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}N.id="doughnut",N.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},N.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},N.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n}}=t.legend.options;return e.labels.map(((e,i)=>{const r=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(i),index:i}}))}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const n=": "+t.formattedValue;return(0,i.b)(e)?(e=e.slice(),e[0]+=n):e+=n,e}}}}};class A extends _{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:r=[],_dataset:s}=e,o=this.chart._animationsDisabled;let{start:a,count:c}=function(t,e,n){const r=e.length;let s=0,o=r;if(t._sorted){const{iScale:a,_parsed:c}=t,l=a.axis,{min:h,max:u,minDefined:d,maxDefined:p}=a.getUserBounds();d&&(s=(0,i.w)(Math.min((0,i.x)(c,a.axis,h).lo,n?r:(0,i.x)(e,l,a.getPixelForValue(h)).lo),0,r-1)),o=p?(0,i.w)(Math.max((0,i.x)(c,a.axis,u).hi+1,n?0:(0,i.x)(e,l,a.getPixelForValue(u)).hi+1),s,r)-s:r-s}return{start:s,count:o}}(e,r,o);this._drawStart=a,this._drawCount=c,function(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,r={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=r,!0;const s=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),s}(e)&&(a=0,c=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!s._decimated,n.points=r;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:l},t),this.updateElements(r,a,c,t)}updateElements(t,e,n,r){const s="reset"===r,{iScale:o,vScale:a,_stacked:c,_dataset:l}=this._cachedMeta,h=this.resolveDataElementOptions(e,r),u=this.getSharedOptions(h),d=this.includeOptions(r,u),p=o.axis,f=a.axis,{spanGaps:g,segment:m}=this.options,b=(0,i.q)(g)?g:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||s||"none"===r;let v=e>0&&this.getParsed(e-1);for(let h=e;h<e+n;++h){const e=t[h],n=this.getParsed(h),g=y?e:{},x=(0,i.k)(n[f]),_=g[p]=o.getPixelForValue(n[p],h),k=g[f]=s||x?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,n,c):n[f],h);g.skip=isNaN(_)||isNaN(k)||x,g.stop=h>0&&n[p]-v[p]>b,m&&(g.parsed=n,g.raw=l.data[h]),d&&(g.options=u||this.resolveDataElementOptions(h,e.active?"active":r)),y||this.updateElement(e,h,g,r),v=n}this.updateSharedOptions(u,r,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const r=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,r,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}A.id="line",A.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},A.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class D extends _{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,r=n.data.labels||[],s=(0,i.o)(e._parsed[t].r,n.options.locale);return{label:r[t]||"",value:s}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(i/2,0),s=(r-Math.max(n.cutoutPercentage?r/100*n.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,n,r){const s="reset"===r,o=this.chart,a=this.getDataset(),c=o.options.animation,l=this._cachedMeta.rScale,h=l.xCenter,u=l.yCenter,d=l.getIndexAngle(0)-.5*i.P;let p,f=d;const g=360/this.countVisibleElements();for(p=0;p<e;++p)f+=this._computeAngle(p,r,g);for(p=e;p<e+n;p++){const e=t[p];let n=f,i=f+this._computeAngle(p,r,g),m=o.getDataVisibility(p)?l.getDistanceFromCenterForValue(a.data[p]):0;f=i,s&&(c.animateScale&&(m=0),c.animateRotate&&(n=i=d));const b={x:h,y:u,innerRadius:0,outerRadius:m,startAngle:n,endAngle:i,options:this.resolveDataElementOptions(p,e.active?"active":r)};this.updateElement(e,p,b,r)}}countVisibleElements(){const t=this.getDataset(),e=this._cachedMeta;let n=0;return e.data.forEach(((e,i)=>{!isNaN(t.data[i])&&this.chart.getDataVisibility(i)&&n++})),n}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?(0,i.t)(this.resolveDataElementOptions(t,e).angle||n):0}}D.id="polarArea",D.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},D.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n}}=t.legend.options;return e.labels.map(((e,i)=>{const r=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(i),index:i}}))}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class R extends N{}R.id="pie",R.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class I extends _{getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}update(t){const e=this._cachedMeta,n=e.dataset,i=e.data||[],r=e.iScale.getLabels();if(n.points=i,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const s={_loop:!0,_fullLoop:r.length===i.length,options:e};this.updateElement(n,void 0,s,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,n,i){const r=this.getDataset(),s=this._cachedMeta.rScale,o="reset"===i;for(let a=e;a<e+n;a++){const e=t[a],n=this.resolveDataElementOptions(a,e.active?"active":i),c=s.getPointPositionForValue(a,r.data[a]),l=o?s.xCenter:c.x,h=o?s.yCenter:c.y,u={x:l,y:h,angle:c.angle,skip:isNaN(l)||isNaN(h),options:n};this.updateElement(e,a,u,i)}}}I.id="radar",I.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},I.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class L extends A{}L.id="scatter",L.defaults={showLine:!1,fill:!1},L.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var z=Object.freeze({__proto__:null,BarController:O,BubbleController:T,DoughnutController:N,LineController:A,PolarAreaController:D,PieController:R,RadarController:I,ScatterController:L});function F(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class B{constructor(t){this.options=t||{}}formats(){return F()}parse(t,e){return F()}format(t,e){return F()}add(t,e,n){return F()}diff(t,e,n){return F()}startOf(t,e,n){return F()}endOf(t,e){return F()}}B.override=function(t){Object.assign(B.prototype,t)};var V={_date:B};function Z(t,e){return"native"in t?{x:t.x,y:t.y}:(0,i.y)(t,e)}function H(t,e,n,r){const{controller:s,data:o,_sorted:a}=t,c=s._cachedMeta.iScale;if(c&&e===c.axis&&"r"!==e&&a&&o.length){const t=c._reversePixels?i.A:i.x;if(!r)return t(o,e,n);if(s._sharedOptions){const i=o[0],r="function"==typeof i.getRange&&i.getRange(e);if(r){const i=t(o,e,n-r),s=t(o,e,n+r);return{lo:i.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function W(t,e,n,i,r){const s=t.getSortedVisibleDatasetMetas(),o=n[e];for(let t=0,n=s.length;t<n;++t){const{index:n,data:a}=s[t],{lo:c,hi:l}=H(s[t],e,o,r);for(let t=c;t<=l;++t){const e=a[t];e.skip||i(e,n,t)}}}function U(t,e,n,r){const s=[];if(!(0,i.z)(e,t.chartArea,t._minPadding))return s;return W(t,n,e,(function(t,n,i){t.inRange(e.x,e.y,r)&&s.push({element:t,datasetIndex:n,index:i})}),!0),s}function $(t,e,n,r,s){let o=[];const a=function(t){const e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){const r=e?Math.abs(t.x-i.x):0,s=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(s,2))}}(n);let c=Number.POSITIVE_INFINITY;return W(t,n,e,(function(n,l,h){const u=n.inRange(e.x,e.y,s);if(r&&!u)return;const d=n.getCenterPoint(s);if(!(0,i.z)(d,t.chartArea,t._minPadding)&&!u)return;const p=a(e,d);p<c?(o=[{element:n,datasetIndex:l,index:h}],c=p):p===c&&o.push({element:n,datasetIndex:l,index:h})})),o}function G(t,e,n,r,s){return(0,i.z)(e,t.chartArea,t._minPadding)?"r"!==n||r?$(t,e,n,r,s):function(t,e,n,r){let s=[];return W(t,n,e,(function(t,n,o){const{startAngle:a,endAngle:c}=t.getProps(["startAngle","endAngle"],r),{angle:l}=(0,i.B)(t,{x:e.x,y:e.y});(0,i.p)(l,a,c)&&s.push({element:t,datasetIndex:n,index:o})})),s}(t,e,n,s):[]}function J(t,e,n,i){const r=Z(e,t),s=[],o=n.axis,a="x"===o?"inXRange":"inYRange";let c=!1;return function(t,e){const n=t.getSortedVisibleDatasetMetas();let i,r,s;for(let t=0,o=n.length;t<o;++t){({index:i,data:r}=n[t]);for(let t=0,n=r.length;t<n;++t)s=r[t],s.skip||e(s,i,t)}}(t,((t,e,n)=>{t[a](r[o],i)&&s.push({element:t,datasetIndex:e,index:n}),t.inRange(r.x,r.y,i)&&(c=!0)})),n.intersect&&!c?[]:s}var Y={modes:{index(t,e,n,i){const r=Z(e,t),s=n.axis||"x",o=n.intersect?U(t,r,s,i):G(t,r,s,!1,i),a=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=o[0].index,n=t.data[e];n&&!n.skip&&a.push({element:n,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,n,i){const r=Z(e,t),s=n.axis||"xy";let o=n.intersect?U(t,r,s,i):G(t,r,s,!1,i);if(o.length>0){const e=o[0].datasetIndex,n=t.getDatasetMeta(e).data;o=[];for(let t=0;t<n.length;++t)o.push({element:n[t],datasetIndex:e,index:t})}return o},point:(t,e,n,i)=>U(t,Z(e,t),n.axis||"xy",i),nearest:(t,e,n,i)=>G(t,Z(e,t),n.axis||"xy",n.intersect,i),x:(t,e,n,i)=>J(t,e,{axis:"x",intersect:n.intersect},i),y:(t,e,n,i)=>J(t,e,{axis:"y",intersect:n.intersect},i)}};const K=["left","top","right","bottom"];function q(t,e){return t.filter((t=>t.pos===e))}function X(t,e){return t.filter((t=>-1===K.indexOf(t.pos)&&t.box.axis===e))}function Q(t,e){return t.sort(((t,n)=>{const i=e?n:t,r=e?t:n;return i.weight===r.weight?i.index-r.index:i.weight-r.weight}))}function tt(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:i,stackWeight:r}=n;if(!t||!K.includes(i))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=r}return e}(t),{vBoxMaxWidth:i,hBoxMaxHeight:r}=e;let s,o,a;for(s=0,o=t.length;s<o;++s){a=t[s];const{fullSize:o}=a.box,c=n[a.stack],l=c&&a.stackWeight/c.weight;a.horizontal?(a.width=l?l*i:o&&e.availableWidth,a.height=r):(a.width=i,a.height=l?l*r:o&&e.availableHeight)}return n}function et(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function nt(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function it(t,e,n,r){const{pos:s,box:o}=n,a=t.maxPadding;if(!(0,i.i)(s)){n.size&&(t[s]-=n.size);const e=r[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?o.height:o.width),n.size=e.size/e.count,t[s]+=n.size}o.getPadding&&nt(a,o.getPadding());const c=Math.max(0,e.outerWidth-et(a,t,"left","right")),l=Math.max(0,e.outerHeight-et(a,t,"top","bottom")),h=c!==t.w,u=l!==t.h;return t.w=c,t.h=l,n.horizontal?{same:h,other:u}:{same:u,other:h}}function rt(t,e){const n=e.maxPadding;function i(t){const i={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function st(t,e,n,i){const r=[];let s,o,a,c,l,h;for(s=0,o=t.length,l=0;s<o;++s){a=t[s],c=a.box,c.update(a.width||e.w,a.height||e.h,rt(a.horizontal,e));const{same:o,other:u}=it(e,n,a,i);l|=o&&r.length,h=h||u,c.fullSize||r.push(a)}return l&&st(r,e,n,i)||h}function ot(t,e,n,i,r){t.top=n,t.left=e,t.right=e+i,t.bottom=n+r,t.width=i,t.height=r}function at(t,e,n,r){const s=n.padding;let{x:o,y:a}=e;for(const c of t){const t=c.box,l=r[c.stack]||{count:1,placed:0,weight:1},h=c.stackWeight/l.weight||1;if(c.horizontal){const r=e.w*h,o=l.size||t.height;(0,i.j)(l.start)&&(a=l.start),t.fullSize?ot(t,s.left,a,n.outerWidth-s.right-s.left,o):ot(t,e.left+l.placed,a,r,o),l.start=a,l.placed+=r,a=t.bottom}else{const r=e.h*h,a=l.size||t.width;(0,i.j)(l.start)&&(o=l.start),t.fullSize?ot(t,o,s.top,a,n.outerHeight-s.bottom-s.top):ot(t,o,e.top+l.placed,a,r),l.start=o,l.placed+=r,o=t.right}}e.x=o,e.y=a}i.d.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var ct={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;const s=(0,i.C)(t.options.layout.padding),o=Math.max(e-s.width,0),a=Math.max(n-s.height,0),c=function(t){const e=function(t){const e=[];let n,i,r,s,o,a;for(n=0,i=(t||[]).length;n<i;++n)r=t[n],({position:s,options:{stack:o,stackWeight:a=1}}=r),e.push({index:n,box:r,pos:s,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&s+o,stackWeight:a});return e}(t),n=Q(e.filter((t=>t.box.fullSize)),!0),i=Q(q(e,"left"),!0),r=Q(q(e,"right")),s=Q(q(e,"top"),!0),o=Q(q(e,"bottom")),a=X(e,"x"),c=X(e,"y");return{fullSize:n,leftAndTop:i.concat(s),rightAndBottom:r.concat(c).concat(o).concat(a),chartArea:q(e,"chartArea"),vertical:i.concat(r).concat(c),horizontal:s.concat(o).concat(a)}}(t.boxes),l=c.vertical,h=c.horizontal;(0,i.D)(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const u=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),p=Object.assign({},s);nt(p,(0,i.C)(r));const f=Object.assign({maxPadding:p,w:o,h:a,x:s.left,y:s.top},s),g=tt(l.concat(h),d);st(c.fullSize,f,d,g),st(l,f,d,g),st(h,f,d,g)&&st(l,f,d,g),function(t){const e=t.maxPadding;function n(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(f),at(c.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,at(c.rightAndBottom,f,d,g),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},(0,i.D)(c.chartArea,(e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class lt{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class ht extends lt{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ut={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},dt=t=>null===t||""===t;const pt=!!i.J&&{passive:!0};function ft(t,e,n){t.canvas.removeEventListener(e,n,pt)}function gt(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function mt(t,e,n){const i=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||gt(n.addedNodes,i),e=e&&!gt(n.removedNodes,i);e&&n()}));return r.observe(document,{childList:!0,subtree:!0}),r}function bt(t,e,n){const i=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||gt(n.removedNodes,i),e=e&&!gt(n.addedNodes,i);e&&n()}));return r.observe(document,{childList:!0,subtree:!0}),r}const yt=new Map;let vt=0;function xt(){const t=window.devicePixelRatio;t!==vt&&(vt=t,yt.forEach(((e,n)=>{n.currentDevicePixelRatio!==t&&e()})))}function _t(t,e,n){const r=t.canvas,s=r&&(0,i.F)(r);if(!s)return;const o=(0,i.I)(((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()}),window),a=new ResizeObserver((t=>{const e=t[0],n=e.contentRect.width,i=e.contentRect.height;0===n&&0===i||o(n,i)}));return a.observe(s),function(t,e){yt.size||window.addEventListener("resize",xt),yt.set(t,e)}(t,o),a}function kt(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){yt.delete(t),yt.size||window.removeEventListener("resize",xt)}(t)}function wt(t,e,n){const r=t.canvas,s=(0,i.I)((e=>{null!==t.ctx&&n(function(t,e){const n=ut[t.type]||t.type,{x:r,y:s}=(0,i.y)(t,e);return{type:n,chart:e,native:t,x:void 0!==r?r:null,y:void 0!==s?s:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,n){t.addEventListener(e,n,pt)}(r,e,s),s}class St extends lt{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,r=t.getAttribute("height"),s=t.getAttribute("width");if(t.$chartjs={initial:{height:r,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",dt(s)){const e=(0,i.G)(t,"width");void 0!==e&&(t.width=e)}if(dt(r))if(""===t.style.height)t.height=t.width/(e||2);else{const e=(0,i.G)(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const n=e.$chartjs.initial;["height","width"].forEach((t=>{const r=n[t];(0,i.k)(r)?e.removeAttribute(t):e.setAttribute(t,r)}));const r=n.style||{};return Object.keys(r).forEach((t=>{e.style[t]=r[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),r={attach:mt,detach:bt,resize:_t}[e]||wt;i[e]=r(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];if(!i)return;({attach:kt,detach:kt,resize:kt}[e]||ft)(t,e,i),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,r){return(0,i.E)(t,e,n,r)}isAttached(t){const e=(0,i.F)(t);return!(!e||!e.isConnected)}}class Ct{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return(0,i.q)(this.x)&&(0,i.q)(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach((t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]})),i}}Ct.defaults={},Ct.defaultRoutes=void 0;const Et={values:t=>(0,i.b)(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const r=this.chart.options.locale;let s,o=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),o=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t));return n}(t,n)}const a=(0,i.L)(Math.abs(o)),c=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:s,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(l,this.options.ticks.format),(0,i.o)(t,r,l)},logarithmic(t,e,n){if(0===t)return"0";const r=t/Math.pow(10,Math.floor((0,i.L)(t)));return 1===r||2===r||5===r?Et.numeric.call(this,t,e,n):""}};var Mt={formatters:Et};function Pt(t,e){const n=t.options.ticks,r=n.maxTicksLimit||function(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),r=t._maxLength/n;return Math.floor(Math.min(i,r))}(t),s=n.major.enabled?function(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}(e):[],o=s.length,a=s[0],c=s[o-1],l=[];if(o>r)return function(t,e,n,i){let r,s=0,o=n[0];for(i=Math.ceil(i),r=0;r<t.length;r++)r===o&&(e.push(t[r]),s++,o=n[s*i])}(e,l,s,o/r),l;const h=function(t,e,n){const r=function(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}(t),s=e.length/n;if(!r)return Math.max(s,1);const o=(0,i.M)(r);for(let t=0,e=o.length-1;t<e;t++){const e=o[t];if(e>s)return e}return Math.max(s,1)}(s,e,r);if(o>0){let t,n;const r=o>1?Math.round((c-a)/(o-1)):null;for(jt(e,l,h,(0,i.k)(r)?0:a-r,a),t=0,n=o-1;t<n;t++)jt(e,l,h,s[t],s[t+1]);return jt(e,l,h,c,(0,i.k)(r)?e.length:c+r),l}return jt(e,l,h),l}function jt(t,e,n,r,s){const o=(0,i.v)(r,0),a=Math.min((0,i.v)(s,t.length),t.length);let c,l,h,u=0;for(n=Math.ceil(n),s&&(c=s-r,n=c/Math.floor(c/n)),h=o;h<0;)u++,h=Math.round(o+u*n);for(l=Math.max(o,0);l<a;l++)l===h&&(e.push(t[l]),u++,h=Math.round(o+u*n))}i.d.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Mt.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.d.route("scale.ticks","color","","color"),i.d.route("scale.grid","color","","borderColor"),i.d.route("scale.grid","borderColor","","borderColor"),i.d.route("scale.title","color","","color"),i.d.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),i.d.describe("scales",{_fallback:"scale"}),i.d.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Ot=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n;function Tt(t,e){const n=[],i=t.length/e,r=t.length;let s=0;for(;s<r;s+=i)n.push(t[Math.floor(s)]);return n}function Nt(t,e,n){const i=t.ticks.length,r=Math.min(e,i-1),s=t._startPixel,o=t._endPixel,a=1e-6;let c,l=t.getPixelForTick(r);if(!(n&&(c=1===i?Math.max(l-s,o-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(r-1))/2,l+=r<e?c:-c,l<s-a||l>o+a)))return l}function At(t){return t.drawTicks?t.tickLength:0}function Dt(t,e){if(!t.display)return 0;const n=(0,i.Z)(t.font,e),r=(0,i.C)(t.padding);return((0,i.b)(t.text)?t.text.length:1)*n.lineHeight+r.height}function Rt(t,e,n){let r=(0,i.$)(t);return(n&&"right"!==e||!n&&"right"===e)&&(r=(t=>"left"===t?"right":"right"===t?"left":t)(r)),r}class It extends Ct{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:r}=this;return t=(0,i.N)(t,Number.POSITIVE_INFINITY),e=(0,i.N)(e,Number.NEGATIVE_INFINITY),n=(0,i.N)(n,Number.POSITIVE_INFINITY),r=(0,i.N)(r,Number.NEGATIVE_INFINITY),{min:(0,i.N)(t,n),max:(0,i.N)(e,r),minDefined:(0,i.g)(t),maxDefined:(0,i.g)(e)}}getMinMax(t){let e,{min:n,max:r,minDefined:s,maxDefined:o}=this.getUserBounds();if(s&&o)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let i=0,c=a.length;i<c;++i)e=a[i].controller.getMinMax(this,t),s||(n=Math.min(n,e.min)),o||(r=Math.max(r,e.max));return n=o&&n>r?r:n,r=s&&n>r?n:r,{min:(0,i.N)(n,(0,i.N)(r,n)),max:(0,i.N)(r,(0,i.N)(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,i.O)(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:r,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,i.Q)(this,s,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=a<this.ticks.length;this._convertTicksToLabels(c?Tt(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=Pt(this,this.ticks),this._labelSizes=null),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,n=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){(0,i.O)(this.options.afterUpdate,[this])}beforeSetDimensions(){(0,i.O)(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){(0,i.O)(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),(0,i.O)(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){(0,i.O)(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,r,s;for(n=0,r=t.length;n<r;n++)s=t[n],s.label=(0,i.O)(e.callback,[s.value,n,t],this)}afterTickToLabelConversion(){(0,i.O)(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){(0,i.O)(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=this.ticks.length,r=e.minRotation||0,s=e.maxRotation;let o,a,c,l=r;if(!this._isVisible()||!e.display||r>=s||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const h=this._getLabelSizes(),u=h.widest.width,d=h.highest.height,p=(0,i.w)(this.chart.width-u,0,this.maxWidth);o=t.offset?this.maxWidth/n:p/(n-1),u+6>o&&(o=p/(n-(t.offset?.5:1)),a=this.maxHeight-At(t.grid)-e.padding-Dt(t.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),l=(0,i.R)(Math.min(Math.asin((0,i.w)((h.highest.height+6)/o,-1,1)),Math.asin((0,i.w)(a/c,-1,1))-Math.asin((0,i.w)(d/c,-1,1)))),l=Math.max(r,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){(0,i.O)(this.options.afterCalculateLabelRotation,[this])}beforeFit(){(0,i.O)(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:r,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=Dt(r,e.options.font);if(a?(t.width=this.maxWidth,t.height=At(s)+o):(t.height=this.maxHeight,t.width=At(s)+o),n.display&&this.ticks.length){const{first:e,last:r,widest:s,highest:o}=this._getLabelSizes(),c=2*n.padding,l=(0,i.t)(this.labelRotation),h=Math.cos(l),u=Math.sin(l);if(a){const e=n.mirror?0:u*s.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+c)}else{const e=n.mirror?0:h*s.width+u*o.height;t.width=Math.min(this.maxWidth,t.width+e+c)}this._calculatePadding(e,r,u,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:r,padding:s},position:o}=this.options,a=0!==this.labelRotation,c="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?c?(h=i*t.width,u=n*e.height):(h=n*t.height,u=i*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-o+s)*this.width/(this.width-o),0),this.paddingRight=Math.max((u-l+s)*this.width/(this.width-l),0)}else{let n=e.height/2,i=t.height/2;"start"===r?(n=0,i=t.height):"end"===r&&(n=e.height,i=0),this.paddingTop=n+s,this.paddingBottom=i+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,i.O)(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e<n;e++)(0,i.k)(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=Tt(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length)}return t}_computeLabelSizes(t,e){const{ctx:n,_longestTextCache:r}=this,s=[],o=[];let a,c,l,h,u,d,p,f,g,m,b,y=0,v=0;for(a=0;a<e;++a){if(h=t[a].label,u=this._resolveTickFontOptions(a),n.font=d=u.string,p=r[d]=r[d]||{data:{},gc:[]},f=u.lineHeight,g=m=0,(0,i.k)(h)||(0,i.b)(h)){if((0,i.b)(h))for(c=0,l=h.length;c<l;++c)b=h[c],(0,i.k)(b)||(0,i.b)(b)||(g=(0,i.S)(n,p.data,p.gc,g,b),m+=f)}else g=(0,i.S)(n,p.data,p.gc,g,h),m=f;s.push(g),o.push(m),y=Math.max(g,y),v=Math.max(m,v)}!function(t,e){(0,i.D)(t,(t=>{const n=t.gc,i=n.length/2;let r;if(i>e){for(r=0;r<i;++r)delete t.data[n[r]];n.splice(0,i)}}))}(r,e);const x=s.indexOf(y),_=o.indexOf(v),k=t=>({width:s[t]||0,height:o[t]||0});return{first:k(0),last:k(e-1),widest:k(x),highest:k(_),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return(0,i.U)(this._alignToPixels?(0,i.V)(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=function(t,e,n){return(0,i.h)(t,{tick:n,index:e,type:"tick"})}(this.getContext(),t,n))}return this.$context||(this.$context=(n=this.chart.getContext(),r=this,(0,i.h)(n,{scale:r,type:"scale"})));var n,r}_tickSize(){const t=this.options.ticks,e=(0,i.t)(this.labelRotation),n=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,a=s?s.widest.width+o:0,c=s?s.highest.height+o:0;return this.isHorizontal()?c*n>a*r?a/n:c/r:c*r<a*n?c/n:a/r}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,r=this.options,{grid:s,position:o}=r,a=s.offset,c=this.isHorizontal(),l=this.ticks.length+(a?1:0),h=At(s),u=[],d=s.setContext(this.getContext()),p=d.drawBorder?d.borderWidth:0,f=p/2,g=function(t){return(0,i.V)(n,t,p)};let m,b,y,v,x,_,k,w,S,C,E,M;if("top"===o)m=g(this.bottom),_=this.bottom-h,w=m-f,C=g(t.top)+f,M=t.bottom;else if("bottom"===o)m=g(this.top),C=t.top,M=g(t.bottom)-f,_=m+f,w=this.top+h;else if("left"===o)m=g(this.right),x=this.right-h,k=m-f,S=g(t.left)+f,E=t.right;else if("right"===o)m=g(this.left),S=t.left,E=g(t.right)-f,x=m+f,k=this.left+h;else if("x"===e){if("center"===o)m=g((t.top+t.bottom)/2+.5);else if((0,i.i)(o)){const t=Object.keys(o)[0],e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}C=t.top,M=t.bottom,_=m+f,w=_+h}else if("y"===e){if("center"===o)m=g((t.left+t.right)/2);else if((0,i.i)(o)){const t=Object.keys(o)[0],e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}x=m-f,k=x-h,S=t.left,E=t.right}const P=(0,i.v)(r.ticks.maxTicksLimit,l),j=Math.max(1,Math.ceil(l/P));for(b=0;b<l;b+=j){const t=s.setContext(this.getContext(b)),e=t.lineWidth,r=t.color,o=s.borderDash||[],l=t.borderDashOffset,h=t.tickWidth,d=t.tickColor,p=t.tickBorderDash||[],f=t.tickBorderDashOffset;y=Nt(this,b,a),void 0!==y&&(v=(0,i.V)(n,y,e),c?x=k=S=E=v:_=w=C=M=v,u.push({tx1:x,ty1:_,tx2:k,ty2:w,x1:S,y1:C,x2:E,y2:M,width:e,color:r,borderDash:o,borderDashOffset:l,tickWidth:h,tickColor:d,tickBorderDash:p,tickBorderDashOffset:f}))}return this._ticksLength=l,this._borderValue=m,u}_computeLabelItems(t){const e=this.axis,n=this.options,{position:r,ticks:s}=n,o=this.isHorizontal(),a=this.ticks,{align:c,crossAlign:l,padding:h,mirror:u}=s,d=At(n.grid),p=d+h,f=u?-h:p,g=-(0,i.t)(this.labelRotation),m=[];let b,y,v,x,_,k,w,S,C,E,M,P,j="middle";if("top"===r)k=this.bottom-f,w=this._getXAxisLabelAlignment();else if("bottom"===r)k=this.top+f,w=this._getXAxisLabelAlignment();else if("left"===r){const t=this._getYAxisLabelAlignment(d);w=t.textAlign,_=t.x}else if("right"===r){const t=this._getYAxisLabelAlignment(d);w=t.textAlign,_=t.x}else if("x"===e){if("center"===r)k=(t.top+t.bottom)/2+p;else if((0,i.i)(r)){const t=Object.keys(r)[0],e=r[t];k=this.chart.scales[t].getPixelForValue(e)+p}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===r)_=(t.left+t.right)/2-p;else if((0,i.i)(r)){const t=Object.keys(r)[0],e=r[t];_=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(d).textAlign}"y"===e&&("start"===c?j="top":"end"===c&&(j="bottom"));const O=this._getLabelSizes();for(b=0,y=a.length;b<y;++b){v=a[b],x=v.label;const t=s.setContext(this.getContext(b));S=this.getPixelForTick(b)+s.labelOffset,C=this._resolveTickFontOptions(b),E=C.lineHeight,M=(0,i.b)(x)?x.length:1;const e=M/2,n=t.color,c=t.textStrokeColor,h=t.textStrokeWidth;let d;if(o?(_=S,P="top"===r?"near"===l||0!==g?-M*E+E/2:"center"===l?-O.highest.height/2-e*E+E:-O.highest.height+E/2:"near"===l||0!==g?E/2:"center"===l?O.highest.height/2-e*E:O.highest.height-M*E,u&&(P*=-1)):(k=S,P=(1-M)*E/2),t.showLabelBackdrop){const e=(0,i.C)(t.backdropPadding),n=O.heights[b],r=O.widths[b];let s=k+P-e.top,o=_-e.left;switch(j){case"middle":s-=n/2;break;case"bottom":s-=n}switch(w){case"center":o-=r/2;break;case"right":o-=r}d={left:o,top:s,width:r+e.width,height:n+e.height,color:t.backdropColor}}m.push({rotation:g,label:x,font:C,color:n,strokeColor:c,strokeWidth:h,textOffset:P,textAlign:w,textBaseline:j,translation:[_,k],backdrop:d})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-(0,i.t)(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align&&(n="right"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:i,padding:r}}=this.options,s=t+r,o=this._getLabelSizes().widest.width;let a,c;return"left"===e?i?(c=this.right+r,"near"===n?a="left":"center"===n?(a="center",c+=o/2):(a="right",c+=o)):(c=this.right-s,"near"===n?a="right":"center"===n?(a="center",c-=o/2):(a="left",c=this.left)):"right"===e?i?(c=this.left+r,"near"===n?a="right":"center"===n?(a="center",c-=o/2):(a="left",c-=o)):(c=this.left+s,"near"===n?a="left":"center"===n?(a="center",c+=o/2):(a="right",c=this.right)):a="right",{textAlign:a,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:i,width:r,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,r,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex((e=>e.value===t));if(n>=0){return e.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,s;const o=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(r=0,s=i.length;r<s;++r){const t=i[r];e.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:n}}=this,r=n.setContext(this.getContext()),s=n.drawBorder?r.borderWidth:0;if(!s)return;const o=n.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let c,l,h,u;this.isHorizontal()?(c=(0,i.V)(t,this.left,s)-s/2,l=(0,i.V)(t,this.right,o)+o/2,h=u=a):(h=(0,i.V)(t,this.top,s)-s/2,u=(0,i.V)(t,this.bottom,o)+o/2,c=l=a),e.save(),e.lineWidth=r.borderWidth,e.strokeStyle=r.borderColor,e.beginPath(),e.moveTo(c,h),e.lineTo(l,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,n=this._computeLabelArea();n&&(0,i.W)(e,n);const r=this._labelItems||(this._labelItems=this._computeLabelItems(t));let s,o;for(s=0,o=r.length;s<o;++s){const t=r[s],n=t.font,o=t.label;t.backdrop&&(e.fillStyle=t.backdrop.color,e.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height));let a=t.textOffset;(0,i.X)(e,o,0,a,n,t)}n&&(0,i.Y)(e)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:r}}=this;if(!n.display)return;const s=(0,i.Z)(n.font),o=(0,i.C)(n.padding),a=n.align;let c=s.lineHeight/2;"bottom"===e||"center"===e||(0,i.i)(e)?(c+=o.bottom,(0,i.b)(n.text)&&(c+=s.lineHeight*(n.text.length-1))):c+=o.top;const{titleX:l,titleY:h,maxWidth:u,rotation:d}=function(t,e,n,r){const{top:s,left:o,bottom:a,right:c,chart:l}=t,{chartArea:h,scales:u}=l;let d,p,f,g=0;const m=a-s,b=c-o;if(t.isHorizontal()){if(p=(0,i.a0)(r,o,c),(0,i.i)(n)){const t=Object.keys(n)[0],i=n[t];f=u[t].getPixelForValue(i)+m-e}else f="center"===n?(h.bottom+h.top)/2+m-e:Ot(t,n,e);d=c-o}else{if((0,i.i)(n)){const t=Object.keys(n)[0],i=n[t];p=u[t].getPixelForValue(i)-b+e}else p="center"===n?(h.left+h.right)/2-b+e:Ot(t,n,e);f=(0,i.a0)(r,a,s),g="left"===n?-i.H:i.H}return{titleX:p,titleY:f,maxWidth:d,rotation:g}}(this,c,e,a);(0,i.X)(t,n.text,0,0,s,{color:n.color,maxWidth:u,rotation:d,textAlign:Rt(a,e,r),textBaseline:"middle",translation:[l,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=(0,i.v)(t.grid&&t.grid.z,-1);return this._isVisible()&&this.draw===It.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:n+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let r,s;for(r=0,s=e.length;r<s;++r){const s=e[r];s[n]!==this.id||t&&s.type!==t||i.push(s)}return i}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return(0,i.Z)(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Lt{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(e)&&(n=this.register(e));const r=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in r||(r[s]=t,function(t,e,n){const r=(0,i.a2)(Object.create(null),[n?i.d.get(n):{},i.d.get(e),t.defaults]);i.d.set(e,r),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((n=>{const r=n.split("."),s=r.pop(),o=[t].concat(r).join("."),a=e[n].split("."),c=a.pop(),l=a.join(".");i.d.route(o,s,l,c)}))}(e,t.defaultRoutes);t.descriptors&&i.d.describe(e,t.descriptors)}(t,o,n),this.override&&i.d.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,r=this.scope;n in e&&delete e[n],r&&n in i.d[r]&&(delete i.d[r][n],this.override&&delete i.a1[n])}}var zt=new class{constructor(){this.controllers=new Lt(_,"datasets",!0),this.elements=new Lt(Ct,"elements"),this.plugins=new Lt(Object,"plugins"),this.scales=new Lt(It,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach((e=>{const r=n||this._getRegistryForType(e);n||r.isForType(e)||r===this.plugins&&e.id?this._exec(t,r,e):(0,i.D)(e,(e=>{const i=n||this._getRegistryForType(e);this._exec(t,i,e)}))}))}_exec(t,e,n){const r=(0,i.a3)(t);(0,i.O)(n["before"+r],[],n),e[t](n),(0,i.O)(n["after"+r],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const i=e.get(t);if(void 0===i)throw new Error('"'+t+'" is not a registered '+n+".");return i}};class Ft{constructor(){this._init=[]}notify(t,e,n,i){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const r=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(r,t,e,n);return"afterDestroy"===e&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,n,r){r=r||{};for(const s of t){const t=s.plugin,o=t[n],a=[e,r,s.options];if(!1===(0,i.O)(o,a,t)&&r.cancelable)return!1}return!0}invalidate(){(0,i.k)(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,r=(0,i.v)(n.options&&n.options.plugins,{}),s=function(t){const e=[],n=Object.keys(zt.plugins.items);for(let t=0;t<n.length;t++)e.push(zt.getPlugin(n[t]));const i=t.plugins||[];for(let t=0;t<i.length;t++){const n=i[t];-1===e.indexOf(n)&&e.push(n)}return e}(n);return!1!==r||e?function(t,e,n,i){const r=[],s=t.getContext();for(let o=0;o<e.length;o++){const a=e[o],c=Bt(n[a.id],i);null!==c&&r.push({plugin:a,options:Vt(t.config,a,c,s)})}return r}(t,s,r,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,i=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function Bt(t,e){return e||!1!==t?!0===t?{}:t:null}function Vt(t,e,n,i){const r=t.pluginScopeKeys(e),s=t.getOptionScopes(n,r);return t.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Zt(t,e){const n=i.d.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function Ht(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(n=e.position)||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0)||t.charAt(0).toLowerCase();var n}function Wt(t){const e=t.options||(t.options={});e.plugins=(0,i.v)(e.plugins,{}),e.scales=function(t,e){const n=i.a1[t.type]||{scales:{}},r=e.scales||{},s=Zt(t.type,e),o=Object.create(null),a=Object.create(null);return Object.keys(r).forEach((t=>{const e=r[t];if(!(0,i.i)(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const c=Ht(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(c,s),h=n.scales||{};o[c]=o[c]||t,a[t]=(0,i.a9)(Object.create(null),[{axis:c},e,h[c],h[l]])})),t.data.datasets.forEach((n=>{const s=n.type||t.type,c=n.indexAxis||Zt(s,e),l=(i.a1[s]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,c),s=n[e+"AxisID"]||o[e]||e;a[s]=a[s]||Object.create(null),(0,i.a9)(a[s],[{axis:e},r[s],l[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];(0,i.a9)(e,[i.d.scales[e.type],i.d.scale])})),a}(t,e)}function Ut(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const $t=new Map,Gt=new Set;function Jt(t,e){let n=$t.get(t);return n||(n=e(),$t.set(t,n),Gt.add(n)),n}const Yt=(t,e,n)=>{const r=(0,i.f)(e,n);void 0!==r&&t.add(r)};class Kt{constructor(t){this._config=function(t){return(t=t||{}).data=Ut(t.data),Wt(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Ut(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Wt(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Jt(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Jt(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Jt(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Jt(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return i&&!e||(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:r,type:s}=this,o=this._cachedScopes(t,n),a=o.get(e);if(a)return a;const c=new Set;e.forEach((e=>{t&&(c.add(t),e.forEach((e=>Yt(c,t,e)))),e.forEach((t=>Yt(c,r,t))),e.forEach((t=>Yt(c,i.a1[s]||{},t))),e.forEach((t=>Yt(c,i.d,t))),e.forEach((t=>Yt(c,i.a4,t)))}));const l=Array.from(c);return 0===l.length&&l.push(Object.create(null)),Gt.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,i.a1[e]||{},i.d.datasets[e]||{},{type:e},i.d,i.a4]}resolveNamedOptions(t,e,n,r=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=qt(this._resolverCache,t,r);let c=o;if(function(t,e){const{isScriptable:n,isIndexable:r}=(0,i.a8)(t);for(const s of e){const e=n(s),o=r(s),a=(o||e)&&t[s];if(e&&((0,i.a5)(a)||Xt(a))||o&&(0,i.b)(a))return!0}return!1}(o,e)){s.$shared=!1,n=(0,i.a5)(n)?n():n;const e=this.createResolver(t,n,a);c=(0,i.a6)(o,n,e)}for(const t of e)s[t]=c[t];return s}createResolver(t,e,n=[""],r){const{resolver:s}=qt(this._resolverCache,t,n);return(0,i.i)(e)?(0,i.a6)(s,e,void 0,r):s}}function qt(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const s=n.join();let o=r.get(s);if(!o){o={resolver:(0,i.a7)(e,n),subPrefixes:n.filter((t=>!t.toLowerCase().includes("hover")))},r.set(s,o)}return o}const Xt=t=>(0,i.i)(t)&&Object.getOwnPropertyNames(t).reduce(((e,n)=>e||(0,i.a5)(t[n])),!1);const Qt=["top","bottom","left","right","chartArea"];function te(t,e){return"top"===t||"bottom"===t||-1===Qt.indexOf(t)&&"x"===e}function ee(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function ne(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),(0,i.O)(n&&n.onComplete,[t],e)}function ie(t){const e=t.chart,n=e.options.animation;(0,i.O)(n&&n.onProgress,[t],e)}function re(t){return(0,i.K)()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const se={},oe=t=>{const e=re(t);return Object.values(se).filter((t=>t.canvas===e)).pop()};function ae(t,e,n){const i=Object.keys(t);for(const r of i){const i=+r;if(i>=e){const s=t[r];delete t[r],(n>0||i>e)&&(t[i+n]=s)}}}class ce{constructor(t,e){const n=this.config=new Kt(e),s=re(t),o=oe(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!(0,i.K)()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?ht:St}(s)),this.platform.updateConfig(n);const c=this.platform.acquireContext(s,a.aspectRatio),l=c&&c.canvas,h=l&&l.height,u=l&&l.width;this.id=(0,i.aa)(),this.ctx=c,this.canvas=l,this.width=u,this.height=h,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Ft,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,i.ab)((t=>this.update(t)),a.resizeDelay||0),this._dataChanges=[],se[this.id]=this,c&&l?(r.listen(this,"complete",ne),r.listen(this,"progress",ie),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:r,_aspectRatio:s}=this;return(0,i.k)(t)?e&&s?s:r?n/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,i.ac)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,i.ad)(this.canvas,this.ctx),this}stop(){return r.stop(this),this}resize(t,e){r.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,r=this.canvas,s=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,t,e,s),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,(0,i.ac)(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),(0,i.O)(n.onResize,[this,o],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};(0,i.D)(t,((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,r=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];e&&(s=s.concat(Object.keys(e).map((t=>{const n=e[t],i=Ht(t,n),r="r"===i,s="x"===i;return{options:n,dposition:r?"chartArea":s?"bottom":"left",dtype:r?"radialLinear":s?"category":"linear"}})))),(0,i.D)(s,(e=>{const s=e.options,o=s.id,a=Ht(o,s),c=(0,i.v)(s.type,e.dtype);void 0!==s.position&&te(s.position,a)===te(e.dposition)||(s.position=e.dposition),r[o]=!0;let l=null;if(o in n&&n[o].type===c)l=n[o];else{l=new(zt.getScale(c))({id:o,type:c,ctx:this.ctx,chart:this}),n[l.id]=l}l.init(s,t)})),(0,i.D)(r,((t,e)=>{t||delete n[e]})),(0,i.D)(n,(t=>{ct.configure(this,t,t.options),ct.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort(((t,e)=>t.index-e.index)),n>e){for(let t=e;t<n;++t)this._destroyDatasetMeta(t);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(ee("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,n)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=e.length;n<r;n++){const r=e[n];let s=this.getDatasetMeta(n);const o=r.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(n),s=this.getDatasetMeta(n)),s.type=o,s.indexAxis=r.indexAxis||Zt(o,this.options),s.order=r.order||0,s.index=n,s.label=""+r.label,s.visible=this.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const e=zt.getController(o),{datasetElementType:r,dataElementType:a}=i.d.datasets[o];Object.assign(e.prototype,{dataElementType:zt.getElement(a),datasetElementType:r&&zt.getElement(r)}),s.controller=new e(this,n),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){(0,i.D)(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),n=!r&&-1===s.indexOf(e);e.buildOrUpdateElements(n),o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=n.layout.autoPadding?o:0,this._updateLayout(o),r||(0,i.D)(s,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ee("z","_idx"));const{_active:a,_lastEvent:c}=this;c?this._eventHandler(c,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){(0,i.D)(this.scales,(t=>{ct.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(0,i.ae)(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:r}of e){ae(t,i,"_removeElements"===n?-r:r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),r=n(0);for(let t=1;t<e;t++)if(!(0,i.ae)(r,n(t)))return;return Array.from(r).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ct.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],(0,i.D)(this.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,(0,i.a5)(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",i)&&(n.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(r.has(this)?this.attached&&!r.running(this)&&r.start(this):(this.draw(),ne({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let i,r;for(i=0,r=e.length;i<r;++i){const r=e[i];t&&!r.visible||n.push(r)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,r=!n.disabled,s=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(r&&(0,i.W)(e,{left:!1===n.left?0:s.left-n.left,right:!1===n.right?this.width:s.right+n.right,top:!1===n.top?0:s.top-n.top,bottom:!1===n.bottom?this.height:s.bottom+n.bottom}),t.controller.draw(),r&&(0,i.Y)(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,n,i){const r=Y.modes[e];return"function"==typeof r?r(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter((t=>t&&t._dataset===e)).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=(0,i.h)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const r=n?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,r);(0,i.j)(e)?(s.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),o.update(s,{visible:n}),this.update((e=>e.datasetIndex===t?r:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),r.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),(0,i.ad)(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete se[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},r=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};(0,i.D)(this.options.events,(t=>n(t,r)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(n,i)=>{t[n]&&(e.removeEventListener(this,n,i),delete t[n])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const o=()=>{i("attach",o),this.attached=!0,this.resize(),n("resize",r),n("detach",s)};s=()=>{this.attached=!1,i("resize",r),this._stop(),this._resize(0,0),n("attach",o)},e.isAttached(this.canvas)?o():s()}unbindEvents(){(0,i.D)(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},(0,i.D)(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let r,s,o,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+i+"DatasetHoverStyle"]()),o=0,a=t.length;o<a;++o){s=t[o];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map((({datasetIndex:t,index:e})=>{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}));!(0,i.af)(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}_updateHoverStyles(t,e,n){const i=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),s=r(e,t),o=n?t:r(t,e);s.length&&this.updateHoverStyle(s,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:(0,i.z)(t,this.chartArea,this._minPadding)},r=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,r))return;const s=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(s||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:r=[],options:s}=this,o=e,a=this._getActiveElements(t,r,n,o),c=(0,i.ag)(t),l=function(t,e,n,i){return n&&"mouseout"!==t.type?i?e:t:null}(t,this._lastEvent,n,c);n&&(this._lastEvent=null,(0,i.O)(s.onHover,[t,a,this],this),c&&(0,i.O)(s.onClick,[t,a,this],this));const h=!(0,i.af)(a,r);return(h||e)&&(this._active=a,this._updateHoverStyles(a,r,e)),this._lastEvent=l,h}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,i)}}const le=()=>(0,i.D)(ce.instances,(t=>t._plugins.invalidate())),he=!0;function ue(t,e,n){const{startAngle:r,pixelMargin:s,x:o,y:a,outerRadius:c,innerRadius:l}=e;let h=s/c;t.beginPath(),t.arc(o,a,c,r-h,n+h),l>s?(h=s/l,t.arc(o,a,l,n+h,r-h,!0)):t.arc(o,a,s,n+i.H,r-i.H),t.closePath(),t.clip()}function de(t,e,n,r){const s=(o=t.options.borderRadius,(0,i.ai)(o,["outerStart","outerEnd","innerStart","innerEnd"]));var o;const a=(n-e)/2,c=Math.min(a,r*e/2),l=t=>{const e=(n-Math.min(a,t))*r/2;return(0,i.w)(t,0,Math.min(a,e))};return{outerStart:l(s.outerStart),outerEnd:l(s.outerEnd),innerStart:(0,i.w)(s.innerStart,0,c),innerEnd:(0,i.w)(s.innerEnd,0,c)}}function pe(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function fe(t,e,n,r,s){const{x:o,y:a,startAngle:c,pixelMargin:l,innerRadius:h}=e,u=Math.max(e.outerRadius+r+n-l,0),d=h>0?h+r+n+l:0;let p=0;const f=s-c;if(r){const t=((h>0?h-r:0)+(u>0?u-r:0))/2;p=(f-(0!==t?f*t/(t+r):f))/2}const g=(f-Math.max(.001,f*u-n/i.P)/u)/2,m=c+g+p,b=s-g-p,{outerStart:y,outerEnd:v,innerStart:x,innerEnd:_}=de(e,d,u,b-m),k=u-y,w=u-v,S=m+y/k,C=b-v/w,E=d+x,M=d+_,P=m+x/E,j=b-_/M;if(t.beginPath(),t.arc(o,a,u,S,C),v>0){const e=pe(w,C,o,a);t.arc(e.x,e.y,v,C,b+i.H)}const O=pe(M,b,o,a);if(t.lineTo(O.x,O.y),_>0){const e=pe(M,j,o,a);t.arc(e.x,e.y,_,b+i.H,j+Math.PI)}if(t.arc(o,a,d,b-_/d,m+x/d,!0),x>0){const e=pe(E,P,o,a);t.arc(e.x,e.y,x,P+Math.PI,m-i.H)}const T=pe(k,m,o,a);if(t.lineTo(T.x,T.y),y>0){const e=pe(k,S,o,a);t.arc(e.x,e.y,y,m-i.H,S)}t.closePath()}function ge(t,e,n,r,s){const{options:o}=e,{borderWidth:a,borderJoinStyle:c}=o,l="inner"===o.borderAlign;a&&(l?(t.lineWidth=2*a,t.lineJoin=c||"round"):(t.lineWidth=a,t.lineJoin=c||"bevel"),e.fullCircles&&function(t,e,n){const{x:r,y:s,startAngle:o,pixelMargin:a,fullCircles:c}=e,l=Math.max(e.outerRadius-a,0),h=e.innerRadius+a;let u;for(n&&ue(t,e,o+i.T),t.beginPath(),t.arc(r,s,h,o+i.T,o,!0),u=0;u<c;++u)t.stroke();for(t.beginPath(),t.arc(r,s,l,o,o+i.T),u=0;u<c;++u)t.stroke()}(t,e,l),l&&ue(t,e,s),fe(t,e,n,r,s),t.stroke())}Object.defineProperties(ce,{defaults:{enumerable:he,value:i.d},instances:{enumerable:he,value:se},overrides:{enumerable:he,value:i.a1},registry:{enumerable:he,value:zt},version:{enumerable:he,value:"3.7.1"},getChart:{enumerable:he,value:oe},register:{enumerable:he,value:(...t)=>{zt.add(...t),le()}},unregister:{enumerable:he,value:(...t)=>{zt.remove(...t),le()}}});class me extends Ct{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,n){const r=this.getProps(["x","y"],n),{angle:s,distance:o}=(0,i.B)(r,{x:t,y:e}),{startAngle:a,endAngle:c,innerRadius:l,outerRadius:h,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),d=this.options.spacing/2,p=(0,i.v)(u,c-a)>=i.T||(0,i.p)(s,a,c),f=(0,i.ah)(o,l+d,h+d);return p&&f}getCenterPoint(t){const{x:e,y:n,startAngle:i,endAngle:r,innerRadius:s,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:c}=this.options,l=(i+r)/2,h=(s+o+c+a)/2;return{x:e+Math.cos(l)*h,y:n+Math.sin(l)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:n}=this,r=(e.offset||0)/2,s=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=n>i.T?Math.floor(n/i.T):0,0===n||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(r){o=r/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=i.P&&(o=r)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const a=function(t,e,n,r){const{fullCircles:s,startAngle:o,circumference:a}=e;let c=e.endAngle;if(s){fe(t,e,n,r,o+i.T);for(let e=0;e<s;++e)t.fill();isNaN(a)||(c=o+a%i.T,a%i.T==0&&(c+=i.T))}return fe(t,e,n,r,c),t.fill(),c}(t,this,o,s);ge(t,this,o,s,a),t.restore()}}function be(t,e,n=e){t.lineCap=(0,i.v)(n.borderCapStyle,e.borderCapStyle),t.setLineDash((0,i.v)(n.borderDash,e.borderDash)),t.lineDashOffset=(0,i.v)(n.borderDashOffset,e.borderDashOffset),t.lineJoin=(0,i.v)(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=(0,i.v)(n.borderWidth,e.borderWidth),t.strokeStyle=(0,i.v)(n.borderColor,e.borderColor)}function ye(t,e,n){t.lineTo(n.x,n.y)}function ve(t,e,n={}){const i=t.length,{start:r=0,end:s=i-1}=n,{start:o,end:a}=e,c=Math.max(r,o),l=Math.min(s,a),h=r<o&&s<o||r>a&&s>a;return{count:i,start:c,loop:e.loop,ilen:l<c&&!h?i+l-c:l-c}}function xe(t,e,n,r){const{points:s,options:o}=e,{count:a,start:c,loop:l,ilen:h}=ve(s,n,r),u=function(t){return t.stepped?i.ap:t.tension||"monotone"===t.cubicInterpolationMode?i.aq:ye}(o);let d,p,f,{move:g=!0,reverse:m}=r||{};for(d=0;d<=h;++d)p=s[(c+(m?h-d:d))%a],p.skip||(g?(t.moveTo(p.x,p.y),g=!1):u(t,f,p,m,o.stepped),f=p);return l&&(p=s[(c+(m?h:0))%a],u(t,f,p,m,o.stepped)),!!l}function _e(t,e,n,i){const r=e.points,{count:s,start:o,ilen:a}=ve(r,n,i),{move:c=!0,reverse:l}=i||{};let h,u,d,p,f,g,m=0,b=0;const y=t=>(o+(l?a-t:t))%s,v=()=>{p!==f&&(t.lineTo(m,f),t.lineTo(m,p),t.lineTo(m,g))};for(c&&(u=r[y(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[y(h)],u.skip)continue;const e=u.x,n=u.y,i=0|e;i===d?(n<p?p=n:n>f&&(f=n),m=(b*m+e)/++b):(v(),t.lineTo(e,n),d=i,b=0,p=f=n),g=n}v()}function ke(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||n)?_e:xe}me.id="arc",me.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},me.defaultRoutes={backgroundColor:"backgroundColor"};const we="function"==typeof Path2D;function Se(t,e,n,i){we&&!e.options.segment?function(t,e,n,i){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,i)&&r.closePath()),be(t,e.options),t.stroke(r)}(t,e,n,i):function(t,e,n,i){const{segments:r,options:s}=e,o=ke(e);for(const a of r)be(t,s,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}(t,e,n,i)}class Ce extends Ct{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;(0,i.aj)(this._points,n,t,r,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=(0,i.ak)(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,r=t[e],s=this.points,o=(0,i.al)(this,{property:e,start:r,end:r});if(!o.length)return;const a=[],c=function(t){return t.stepped?i.am:t.tension||"monotone"===t.cubicInterpolationMode?i.an:i.ao}(n);let l,h;for(l=0,h=o.length;l<h;++l){const{start:i,end:h}=o[l],u=s[i],d=s[h];if(u===d){a.push(u);continue}const p=c(u,d,Math.abs((r-u[e])/(d[e]-u[e])),n.stepped);p[e]=t[e],a.push(p)}return 1===a.length?a[0]:a}pathSegment(t,e,n){return ke(this)(t,this,e,n)}path(t,e,n){const i=this.segments,r=ke(this);let s=this._loop;e=e||0,n=n||this.points.length-e;for(const o of i)s&=r(t,this,o,{start:e,end:e+n-1});return!!s}draw(t,e,n,i){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),Se(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ee(t,e,n,i){const r=t.options,{[n]:s}=t.getProps([n],i);return Math.abs(e-s)<r.radius+r.hitRadius}Ce.id="line",Ce.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Ce.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Ce.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class Me extends Ct{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.options,{x:r,y:s}=this.getProps(["x","y"],n);return Math.pow(t-r,2)+Math.pow(e-s,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,e){return Ee(this,t,"x",e)}inYRange(t,e){return Ee(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const n=this.options;this.skip||n.radius<.1||!(0,i.z)(this,e,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,(0,i.ar)(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Pe(t,e){const{x:n,y:i,base:r,width:s,height:o}=t.getProps(["x","y","base","width","height"],e);let a,c,l,h,u;return t.horizontal?(u=o/2,a=Math.min(n,r),c=Math.max(n,r),l=i-u,h=i+u):(u=s/2,a=n-u,c=n+u,l=Math.min(i,r),h=Math.max(i,r)),{left:a,top:l,right:c,bottom:h}}function je(t,e,n,r){return t?0:(0,i.w)(e,n,r)}function Oe(t){const e=Pe(t),n=e.right-e.left,r=e.bottom-e.top,s=function(t,e,n){const r=t.options.borderWidth,s=t.borderSkipped,o=(0,i.at)(r);return{t:je(s.top,o.top,0,n),r:je(s.right,o.right,0,e),b:je(s.bottom,o.bottom,0,n),l:je(s.left,o.left,0,e)}}(t,n/2,r/2),o=function(t,e,n){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,o=(0,i.au)(s),a=Math.min(e,n),c=t.borderSkipped,l=r||(0,i.i)(s);return{topLeft:je(!l||c.top||c.left,o.topLeft,0,a),topRight:je(!l||c.top||c.right,o.topRight,0,a),bottomLeft:je(!l||c.bottom||c.left,o.bottomLeft,0,a),bottomRight:je(!l||c.bottom||c.right,o.bottomRight,0,a)}}(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:n-s.l-s.r,h:r-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Te(t,e,n,r){const s=null===e,o=null===n,a=t&&!(s&&o)&&Pe(t,r);return a&&(s||(0,i.ah)(e,a.left,a.right))&&(o||(0,i.ah)(n,a.top,a.bottom))}function Ne(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ae(t,e,n={}){const i=t.x!==n.x?-e:0,r=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-i,o=(t.y+t.h!==n.y+n.h?e:0)-r;return{x:t.x+i,y:t.y+r,w:t.w+s,h:t.h+o,radius:t.radius}}Me.id="point",Me.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Me.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class De extends Ct{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:r}}=this,{inner:s,outer:o}=Oe(this),a=(c=o.radius).topLeft||c.topRight||c.bottomLeft||c.bottomRight?i.as:Ne;var c;t.save(),o.w===s.w&&o.h===s.h||(t.beginPath(),a(t,Ae(o,e,s)),t.clip(),a(t,Ae(s,-e,o)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),a(t,Ae(s,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,n){return Te(this,t,e,n)}inXRange(t,e){return Te(this,t,null,e)}inYRange(t,e){return Te(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:i,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+i)/2:e,y:r?n:(n+i)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}De.id="bar",De.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},De.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Re=Object.freeze({__proto__:null,ArcElement:me,LineElement:Ce,PointElement:Me,BarElement:De});function Ie(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Le(t){t.data.datasets.forEach((t=>{Ie(t)}))}var ze={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled)return void Le(t);const r=t.width;t.data.datasets.forEach(((e,s)=>{const{_data:o,indexAxis:a}=e,c=t.getDatasetMeta(s),l=o||e.data;if("y"===(0,i.a)([a,t.options.indexAxis]))return;if("line"!==c.type)return;const h=t.scales[c.xAxisID];if("linear"!==h.type&&"time"!==h.type)return;if(t.options.parsing)return;let{start:u,count:d}=function(t,e){const n=e.length;let r,s=0;const{iScale:o}=t,{min:a,max:c,minDefined:l,maxDefined:h}=o.getUserBounds();return l&&(s=(0,i.w)((0,i.x)(e,o.axis,a).lo,0,n-1)),r=h?(0,i.w)((0,i.x)(e,o.axis,c).hi+1,s,n)-s:n-s,{start:s,count:r}}(c,l);if(d<=(n.threshold||4*r))return void Ie(e);let p;switch((0,i.k)(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),n.algorithm){case"lttb":p=function(t,e,n,i,r){const s=r.samples||i;if(s>=n)return t.slice(e,e+n);const o=[],a=(n-2)/(s-2);let c=0;const l=e+n-1;let h,u,d,p,f,g=e;for(o[c++]=t[g],h=0;h<s-2;h++){let i,r=0,s=0;const l=Math.floor((h+1)*a)+1+e,m=Math.min(Math.floor((h+2)*a)+1,n)+e,b=m-l;for(i=l;i<m;i++)r+=t[i].x,s+=t[i].y;r/=b,s/=b;const y=Math.floor(h*a)+1+e,v=Math.min(Math.floor((h+1)*a)+1,n)+e,{x:x,y:_}=t[g];for(d=p=-1,i=y;i<v;i++)p=.5*Math.abs((x-r)*(t[i].y-_)-(x-t[i].x)*(s-_)),p>d&&(d=p,u=t[i],f=i);o[c++]=u,g=f}return o[c++]=t[l],o}(l,u,d,r,n);break;case"min-max":p=function(t,e,n,r){let s,o,a,c,l,h,u,d,p,f,g=0,m=0;const b=[],y=e+n-1,v=t[e].x,x=t[y].x-v;for(s=e;s<e+n;++s){o=t[s],a=(o.x-v)/x*r,c=o.y;const e=0|a;if(e===l)c<p?(p=c,h=s):c>f&&(f=c,u=s),g=(m*g+o.x)/++m;else{const n=s-1;if(!(0,i.k)(h)&&!(0,i.k)(u)){const e=Math.min(h,u),i=Math.max(h,u);e!==d&&e!==n&&b.push({...t[e],x:g}),i!==d&&i!==n&&b.push({...t[i],x:g})}s>0&&n!==d&&b.push(t[n]),b.push(o),l=e,m=0,p=f=c,h=u=d=s}}return b}(l,u,d,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}e._decimated=p}))},destroy(t){Le(t)}};function Fe(t,e,n){const r=function(t){const e=t.options,n=e.fill;let r=(0,i.v)(n&&n.target,n);return void 0===r&&(r=!!e.backgroundColor),!1!==r&&null!==r&&(!0===r?"origin":r)}(t);if((0,i.i)(r))return!isNaN(r.value)&&r;let s=parseFloat(r);return(0,i.g)(s)&&Math.floor(s)===s?("-"!==r[0]&&"+"!==r[0]||(s=e+s),!(s===e||s<0||s>=n)&&s):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}class Be{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){const{x:r,y:s,radius:o}=this;return e=e||{start:0,end:i.T},t.arc(r,s,o,e.end,e.start,!0),!n.bounds}interpolate(t){const{x:e,y:n,radius:i}=this,r=t.angle;return{x:e+Math.cos(r)*i,y:n+Math.sin(r)*i,angle:r}}}function Ve(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:n}=t,r=e.options,s=e.getLabels().length,o=[],a=r.reverse?e.max:e.min,c=r.reverse?e.min:e.max;let l,h,u;if(u="start"===n?a:"end"===n?c:(0,i.i)(n)?n.value:e.getBaseValue(),r.grid.circular)return h=e.getPointPositionForValue(0,a),new Be({x:h.x,y:h.y,radius:e.getDistanceFromCenterForValue(u)});for(l=0;l<s;++l)o.push(e.getPointPositionForValue(l,u));return o}(t):function(t){const{scale:e={},fill:n}=t;let r,s=null;return"start"===n?s=e.bottom:"end"===n?s=e.top:(0,i.i)(n)?s=e.getPixelForValue(n.value):e.getBasePixel&&(s=e.getBasePixel()),(0,i.g)(s)?(r=e.isHorizontal(),{x:r?s:null,y:r?null:s}):null}(t)}function Ze(t,e,n){for(;e>t;e--){const t=n[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function He(t,e,n){const i=[];for(let r=0;r<n.length;r++){const s=n[r],{first:o,last:a,point:c}=We(s,e,"x");if(!(!c||o&&a))if(o)i.unshift(c);else if(t.push(c),!a)break}t.push(...i)}function We(t,e,n){const r=t.interpolate(e,n);if(!r)return{};const s=r[n],o=t.segments,a=t.points;let c=!1,l=!1;for(let t=0;t<o.length;t++){const e=o[t],r=a[e.start][n],h=a[e.end][n];if((0,i.ah)(s,r,h)){c=s===r,l=s===h;break}}return{first:c,last:l,point:r}}function Ue(t){const{chart:e,fill:n,line:r}=t;if((0,i.g)(n))return function(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}(e,n);if("stack"===n)return function(t){const{scale:e,index:n,line:i}=t,r=[],s=i.segments,o=i.points,a=function(t,e){const n=[],i=t.getMatchingVisibleMetas("line");for(let t=0;t<i.length;t++){const r=i[t];if(r.index===e)break;r.hidden||n.unshift(r.dataset)}return n}(e,n);a.push($e({x:null,y:e.bottom},i));for(let t=0;t<s.length;t++){const e=s[t];for(let t=e.start;t<=e.end;t++)He(r,o[t],a)}return new Ce({points:r,options:{}})}(t);if("shape"===n)return!0;const s=Ve(t);return s instanceof Be?s:$e(s,r)}function $e(t,e){let n=[],r=!1;return(0,i.b)(t)?(r=!0,n=t):n=function(t,e){const{x:n=null,y:i=null}=t||{},r=e.points,s=[];return e.segments.forEach((({start:t,end:e})=>{e=Ze(t,e,r);const o=r[t],a=r[e];null!==i?(s.push({x:o.x,y:i}),s.push({x:a.x,y:i})):null!==n&&(s.push({x:n,y:o.y}),s.push({x:n,y:a.y}))})),s}(t,e),n.length?new Ce({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Ge(t,e,n){let r=t[e].fill;const s=[e];let o;if(!n)return r;for(;!1!==r&&-1===s.indexOf(r);){if(!(0,i.g)(r))return r;if(o=t[r],!o)return!1;if(o.visible)return r;s.push(r),r=o.fill}return!1}function Je(t,e,n){const{segments:i,points:r}=e;let s=!0,o=!1;t.beginPath();for(const a of i){const{start:i,end:c}=a,l=r[i],h=r[Ze(i,c,r)];s?(t.moveTo(l.x,l.y),s=!1):(t.lineTo(l.x,n),t.lineTo(l.x,l.y)),o=!!e.pathSegment(t,a,{move:o}),o?t.closePath():t.lineTo(h.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Ye(t,e,n,r){if(r)return;let s=e[t],o=n[t];return"angle"===t&&(s=(0,i.aw)(s),o=(0,i.aw)(o)),{property:t,start:s,end:o}}function Ke(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function qe(t,e,n){const{top:i,bottom:r}=e.chart.chartArea,{property:s,start:o,end:a}=n||{};"x"===s&&(t.beginPath(),t.rect(o,i,a-o,r-i),t.clip())}function Xe(t,e,n,i){const r=e.interpolate(n,i);r&&t.lineTo(r.x,r.y)}function Qe(t,e){const{line:n,target:r,property:s,color:o,scale:a}=e,c=function(t,e,n){const r=t.segments,s=t.points,o=e.points,a=[];for(const t of r){let{start:r,end:c}=t;c=Ze(r,c,s);const l=Ye(n,s[r],s[c],t.loop);if(!e.segments){a.push({source:t,target:l,start:s[r],end:s[c]});continue}const h=(0,i.al)(e,l);for(const e of h){const r=Ye(n,o[e.start],o[e.end],e.loop),c=(0,i.av)(t,s,r);for(const t of c)a.push({source:t,target:e,start:{[n]:Ke(l,r,"start",Math.max)},end:{[n]:Ke(l,r,"end",Math.min)}})}}return a}(n,r,s);for(const{source:e,target:i,start:l,end:h}of c){const{style:{backgroundColor:c=o}={}}=e,u=!0!==r;t.save(),t.fillStyle=c,qe(t,a,u&&Ye(s,l,h)),t.beginPath();const d=!!n.pathSegment(t,e);let p;if(u){d?t.closePath():Xe(t,r,h,s);const e=!!r.pathSegment(t,i,{move:d,reverse:!0});p=d&&e,p||Xe(t,r,l,s)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function tn(t,e,n){const r=Ue(e),{line:s,scale:o,axis:a}=e,c=s.options,l=c.fill,h=c.backgroundColor,{above:u=h,below:d=h}=l||{};r&&s.points.length&&((0,i.W)(t,n),function(t,e){const{line:n,target:i,above:r,below:s,area:o,scale:a}=e,c=n._loop?"angle":e.axis;t.save(),"x"===c&&s!==r&&(Je(t,i,o.top),Qe(t,{line:n,target:i,color:r,scale:a,property:c}),t.restore(),t.save(),Je(t,i,o.bottom)),Qe(t,{line:n,target:i,color:s,scale:a,property:c}),t.restore()}(t,{line:s,target:r,above:u,below:d,area:n,scale:o,axis:a}),(0,i.Y)(t))}var en={id:"filler",afterDatasetsUpdate(t,e,n){const i=(t.data.datasets||[]).length,r=[];let s,o,a,c;for(o=0;o<i;++o)s=t.getDatasetMeta(o),a=s.dataset,c=null,a&&a.options&&a instanceof Ce&&(c={visible:t.isDatasetVisible(o),index:o,fill:Fe(a,o,i),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=c,r.push(c);for(o=0;o<i;++o)c=r[o],c&&!1!==c.fill&&(c.fill=Ge(r,o,n.propagate))},beforeDraw(t,e,n){const i="beforeDraw"===n.drawTime,r=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let e=r.length-1;e>=0;--e){const n=r[e].$filler;n&&(n.line.updateControlPoints(s,n.axis),i&&tn(t.ctx,n,s))}},beforeDatasetsDraw(t,e,n){if("beforeDatasetsDraw"!==n.drawTime)return;const i=t.getSortedVisibleDatasetMetas();for(let e=i.length-1;e>=0;--e){const n=i[e].$filler;n&&tn(t.ctx,n,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;i&&!1!==i.fill&&"beforeDatasetDraw"===n.drawTime&&tn(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const nn=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}};class rn extends Ct{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=(0,i.O)(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,n)=>t.sort(e,n,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const n=t.labels,r=(0,i.Z)(n.font),s=r.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:c}=nn(n,s);let l,h;e.font=r.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(o,s,a,c)+10):(h=this.maxHeight,l=this._fitCols(o,s,a,c)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,i){const{ctx:r,maxWidth:s,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],c=this.lineWidths=[0],l=i+o;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-l;return this.legendItems.forEach(((t,p)=>{const f=n+e/2+r.measureText(t.text).width;(0===p||c[c.length-1]+f+2*o>s)&&(h+=l,c[c.length-(p>0?0:1)]=0,d+=l,u++),a[p]={left:0,top:d,row:u,width:f,height:i},c[c.length-1]+=f+o})),h}_fitCols(t,e,n,i){const{ctx:r,maxHeight:s,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],c=this.columnSizes=[],l=s-t;let h=o,u=0,d=0,p=0,f=0;return this.legendItems.forEach(((t,s)=>{const g=n+e/2+r.measureText(t.text).width;s>0&&d+i+2*o>l&&(h+=u+o,c.push({width:u,height:d}),p+=u+o,f++,u=d=0),a[s]={left:p,top:d,col:f,width:g,height:i},u=Math.max(u,g),d+=i+o})),h+=u,c.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:r},rtl:s}}=this,o=(0,i.ax)(s,this.left,this.width);if(this.isHorizontal()){let s=0,a=(0,i.a0)(n,this.left+r,this.right-this.lineWidths[s]);for(const c of e)s!==c.row&&(s=c.row,a=(0,i.a0)(n,this.left+r,this.right-this.lineWidths[s])),c.top+=this.top+t+r,c.left=o.leftForLtr(o.x(a),c.width),a+=c.width+r}else{let s=0,a=(0,i.a0)(n,this.top+t+r,this.bottom-this.columnSizes[s].height);for(const c of e)c.col!==s&&(s=c.col,a=(0,i.a0)(n,this.top+t+r,this.bottom-this.columnSizes[s].height)),c.top=a,c.left+=this.left+r,c.left=o.leftForLtr(o.x(c.left),c.width),a+=c.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;(0,i.W)(t,this),this._draw(),(0,i.Y)(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:r}=this,{align:s,labels:o}=t,a=i.d.color,c=(0,i.ax)(t.rtl,this.left,this.width),l=(0,i.Z)(o.font),{color:h,padding:u}=o,d=l.size,p=d/2;let f;this.drawTitle(),r.textAlign=c.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:g,boxHeight:m,itemHeight:b}=nn(o,d),y=this.isHorizontal(),v=this._computeTitleHeight();f=y?{x:(0,i.a0)(s,this.left+u,this.right-n[0]),y:this.top+u+v,line:0}:{x:this.left+u,y:(0,i.a0)(s,this.top+v+u,this.bottom-e[0].height),line:0},(0,i.ay)(this.ctx,t.textDirection);const x=b+u;this.legendItems.forEach(((_,k)=>{r.strokeStyle=_.fontColor||h,r.fillStyle=_.fontColor||h;const w=r.measureText(_.text).width,S=c.textAlign(_.textAlign||(_.textAlign=o.textAlign)),C=g+p+w;let E=f.x,M=f.y;c.setWidth(this.width),y?k>0&&E+C+u>this.right&&(M=f.y+=x,f.line++,E=f.x=(0,i.a0)(s,this.left+u,this.right-n[f.line])):k>0&&M+x>this.bottom&&(E=f.x=E+e[f.line].width+u,f.line++,M=f.y=(0,i.a0)(s,this.top+v+u,this.bottom-e[f.line].height));!function(t,e,n){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;r.save();const s=(0,i.v)(n.lineWidth,1);if(r.fillStyle=(0,i.v)(n.fillStyle,a),r.lineCap=(0,i.v)(n.lineCap,"butt"),r.lineDashOffset=(0,i.v)(n.lineDashOffset,0),r.lineJoin=(0,i.v)(n.lineJoin,"miter"),r.lineWidth=s,r.strokeStyle=(0,i.v)(n.strokeStyle,a),r.setLineDash((0,i.v)(n.lineDash,[])),o.usePointStyle){const o={radius:g*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:s},a=c.xPlus(t,g/2),l=e+p;(0,i.ar)(r,o,a,l)}else{const o=e+Math.max((d-m)/2,0),a=c.leftForLtr(t,g),l=(0,i.au)(n.borderRadius);r.beginPath(),Object.values(l).some((t=>0!==t))?(0,i.as)(r,{x:a,y:o,w:g,h:m,radius:l}):r.rect(a,o,g,m),r.fill(),0!==s&&r.stroke()}r.restore()}(c.x(E),M,_),E=(0,i.az)(S,E+g+p,y?E+C:this.right,t.rtl),function(t,e,n){(0,i.X)(r,n.text,t,e+b/2,l,{strikethrough:n.hidden,textAlign:c.textAlign(n.textAlign)})}(c.x(E),M,_),y?f.x+=C+u:f.y+=x})),(0,i.aA)(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=(0,i.Z)(e.font),r=(0,i.C)(e.padding);if(!e.display)return;const s=(0,i.ax)(t.rtl,this.left,this.width),o=this.ctx,a=e.position,c=n.size/2,l=r.top+c;let h,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+l,u=(0,i.a0)(t.align,u,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=l+(0,i.a0)(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const p=(0,i.a0)(a,u,u+d);o.textAlign=s.textAlign((0,i.$)(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=n.string,(0,i.X)(o,e.text,p,h,n)}_computeTitleHeight(){const t=this.options.title,e=(0,i.Z)(t.font),n=(0,i.C)(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,r,s;if((0,i.ah)(t,this.left,this.right)&&(0,i.ah)(e,this.top,this.bottom))for(s=this.legendHitBoxes,n=0;n<s.length;++n)if(r=s[n],(0,i.ah)(t,r.left,r.left+r.width)&&(0,i.ah)(e,r.top,r.top+r.height))return this.legendItems[n];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,a=(s=n,null!==(r=o)&&null!==s&&r.datasetIndex===s.datasetIndex&&r.index===s.index);o&&!a&&(0,i.O)(e.onLeave,[t,o,this],this),this._hoveredItem=n,n&&!a&&(0,i.O)(e.onHover,[t,n,this],this)}else n&&(0,i.O)(e.onClick,[t,n,this],this);var r,s}}var sn={id:"legend",_element:rn,start(t,e,n){const i=t.legend=new rn({ctx:t.ctx,options:n,chart:t});ct.configure(t,i,n),ct.addBox(t,i)},stop(t){ct.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;ct.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),e.hidden=!0):(r.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:s,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(n?0:void 0),c=(0,i.C)(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:a.borderColor,pointStyle:r||a.pointStyle,rotation:a.rotation,textAlign:s||a.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class on extends Ct{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const r=(0,i.b)(n.text)?n.text.length:1;this._padding=(0,i.C)(n.padding);const s=r*(0,i.Z)(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:n,bottom:r,right:s,options:o}=this,a=o.align;let c,l,h,u=0;return this.isHorizontal()?(l=(0,i.a0)(a,n,s),h=e+t,c=s-n):("left"===o.position?(l=n+t,h=(0,i.a0)(a,r,e),u=-.5*i.P):(l=s-t,h=(0,i.a0)(a,e,r),u=.5*i.P),c=r-e),{titleX:l,titleY:h,maxWidth:c,rotation:u}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=(0,i.Z)(e.font),r=n.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:a,rotation:c}=this._drawArgs(r);(0,i.X)(t,e.text,0,0,n,{color:e.color,maxWidth:a,rotation:c,textAlign:(0,i.$)(e.align),textBaseline:"middle",translation:[s,o]})}}var an={id:"title",_element:on,start(t,e,n){!function(t,e){const n=new on({ctx:t.ctx,options:e,chart:t});ct.configure(t,n,e),ct.addBox(t,n),t.titleBlock=n}(t,n)},stop(t){const e=t.titleBlock;ct.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;ct.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const cn=new WeakMap;var ln={id:"subtitle",start(t,e,n){const i=new on({ctx:t.ctx,options:n,chart:t});ct.configure(t,i,n),ct.addBox(t,i),cn.set(t,i)},stop(t){ct.removeBox(t,cn.get(t)),cn.delete(t)},beforeUpdate(t,e,n){const i=cn.get(t);ct.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const hn={average(t){if(!t.length)return!1;let e,n,i=0,r=0,s=0;for(e=0,n=t.length;e<n;++e){const n=t[e].element;if(n&&n.hasValue()){const t=n.tooltipPosition();i+=t.x,r+=t.y,++s}}return{x:i/s,y:r/s}},nearest(t,e){if(!t.length)return!1;let n,r,s,o=e.x,a=e.y,c=Number.POSITIVE_INFINITY;for(n=0,r=t.length;n<r;++n){const r=t[n].element;if(r&&r.hasValue()){const t=r.getCenterPoint(),n=(0,i.aC)(e,t);n<c&&(c=n,s=r)}}if(s){const t=s.tooltipPosition();o=t.x,a=t.y}return{x:o,y:a}}};function un(t,e){return e&&((0,i.b)(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function dn(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function pn(t,e){const{element:n,datasetIndex:i,index:r}=e,s=t.getDatasetMeta(i).controller,{label:o,value:a}=s.getLabelAndValue(r);return{chart:t,label:o,parsed:s.getParsed(r),raw:t.data.datasets[i].data[r],formattedValue:a,dataset:s.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function fn(t,e){const n=t.chart.ctx,{body:r,footer:s,title:o}=t,{boxWidth:a,boxHeight:c}=e,l=(0,i.Z)(e.bodyFont),h=(0,i.Z)(e.titleFont),u=(0,i.Z)(e.footerFont),d=o.length,p=s.length,f=r.length,g=(0,i.C)(e.padding);let m=g.height,b=0,y=r.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(y+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),y){m+=f*(e.displayColors?Math.max(c,l.lineHeight):l.lineHeight)+(y-f)*l.lineHeight+(y-1)*e.bodySpacing}p&&(m+=e.footerMarginTop+p*u.lineHeight+(p-1)*e.footerSpacing);let v=0;const x=function(t){b=Math.max(b,n.measureText(t).width+v)};return n.save(),n.font=h.string,(0,i.D)(t.title,x),n.font=l.string,(0,i.D)(t.beforeBody.concat(t.afterBody),x),v=e.displayColors?a+2+e.boxPadding:0,(0,i.D)(r,(t=>{(0,i.D)(t.before,x),(0,i.D)(t.lines,x),(0,i.D)(t.after,x)})),v=0,n.font=u.string,(0,i.D)(t.footer,x),n.restore(),b+=g.width,{width:b,height:m}}function gn(t,e,n,i){const{x:r,width:s}=n,{width:o,chartArea:{left:a,right:c}}=t;let l="center";return"center"===i?l=r<=(a+c)/2?"left":"right":r<=s/2?l="left":r>=o-s/2&&(l="right"),function(t,e,n,i){const{x:r,width:s}=i,o=n.caretSize+n.caretPadding;return"left"===t&&r+s+o>e.width||"right"===t&&r-s-o<0||void 0}(l,t,e,n)&&(l="center"),l}function mn(t,e,n){const i=n.yAlign||e.yAlign||function(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||gn(t,e,n,i),yAlign:i}}function bn(t,e,n,r){const{caretSize:s,caretPadding:o,cornerRadius:a}=t,{xAlign:c,yAlign:l}=n,h=s+o,{topLeft:u,topRight:d,bottomLeft:p,bottomRight:f}=(0,i.au)(a);let g=function(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}(e,c);const m=function(t,e,n){let{y:i,height:r}=t;return"top"===e?i+=n:i-="bottom"===e?r+n:r/2,i}(e,l,h);return"center"===l?"left"===c?g+=h:"right"===c&&(g-=h):"left"===c?g-=Math.max(u,p)+s:"right"===c&&(g+=Math.max(d,f)+s),{x:(0,i.w)(g,0,r.width-e.width),y:(0,i.w)(m,0,r.height-e.height)}}function yn(t,e,n){const r=(0,i.C)(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-r.right:t.x+r.left}function vn(t){return un([],dn(t))}function xn(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}class kn extends Ct{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&e.options.animation&&n.animations,r=new l(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,n=this._tooltipItems,(0,i.h)(t,{tooltip:e,tooltipItems:n,type:"tooltip"})));var t,e,n}getTitle(t,e){const{callbacks:n}=e,i=n.beforeTitle.apply(this,[t]),r=n.title.apply(this,[t]),s=n.afterTitle.apply(this,[t]);let o=[];return o=un(o,dn(i)),o=un(o,dn(r)),o=un(o,dn(s)),o}getBeforeBody(t,e){return vn(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:n}=e,r=[];return(0,i.D)(t,(t=>{const e={before:[],lines:[],after:[]},i=xn(n,t);un(e.before,dn(i.beforeLabel.call(this,t))),un(e.lines,i.label.call(this,t)),un(e.after,dn(i.afterLabel.call(this,t))),r.push(e)})),r}getAfterBody(t,e){return vn(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:n}=e,i=n.beforeFooter.apply(this,[t]),r=n.footer.apply(this,[t]),s=n.afterFooter.apply(this,[t]);let o=[];return o=un(o,dn(i)),o=un(o,dn(r)),o=un(o,dn(s)),o}_createItems(t){const e=this._active,n=this.chart.data,r=[],s=[],o=[];let a,c,l=[];for(a=0,c=e.length;a<c;++a)l.push(pn(this.chart,e[a]));return t.filter&&(l=l.filter(((e,i,r)=>t.filter(e,i,r,n)))),t.itemSort&&(l=l.sort(((e,i)=>t.itemSort(e,i,n)))),(0,i.D)(l,(e=>{const n=xn(t.callbacks,e);r.push(n.labelColor.call(this,e)),s.push(n.labelPointStyle.call(this,e)),o.push(n.labelTextColor.call(this,e))})),this.labelColors=r,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let r,s=[];if(i.length){const t=hn[n.position].call(this,i,this._eventPosition);s=this._createItems(n),this.title=this.getTitle(s,n),this.beforeBody=this.getBeforeBody(s,n),this.body=this.getBody(s,n),this.afterBody=this.getAfterBody(s,n),this.footer=this.getFooter(s,n);const e=this._size=fn(this,n),o=Object.assign({},t,e),a=mn(this.chart,n,o),c=bn(n,o,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=s,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const r=this.getCaretPosition(t,n,i);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,n){const{xAlign:r,yAlign:s}=this,{caretSize:o,cornerRadius:a}=n,{topLeft:c,topRight:l,bottomLeft:h,bottomRight:u}=(0,i.au)(a),{x:d,y:p}=t,{width:f,height:g}=e;let m,b,y,v,x,_;return"center"===s?(x=p+g/2,"left"===r?(m=d,b=m-o,v=x+o,_=x-o):(m=d+f,b=m+o,v=x-o,_=x+o),y=m):(b="left"===r?d+Math.max(c,h)+o:"right"===r?d+f-Math.max(l,u)-o:this.caretX,"top"===s?(v=p,x=v-o,m=b-o,y=b+o):(v=p+g,x=v+o,m=b+o,y=b-o),_=v),{x1:m,x2:b,x3:y,y1:v,y2:x,y3:_}}drawTitle(t,e,n){const r=this.title,s=r.length;let o,a,c;if(s){const l=(0,i.ax)(n.rtl,this.x,this.width);for(t.x=yn(this,n.titleAlign,n),e.textAlign=l.textAlign(n.titleAlign),e.textBaseline="middle",o=(0,i.Z)(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=o.string,c=0;c<s;++c)e.fillText(r[c],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,c+1===s&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,e,n,r,s){const o=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:c,boxWidth:l,boxPadding:h}=s,u=(0,i.Z)(s.bodyFont),d=yn(this,"left",s),p=r.x(d),f=c<u.lineHeight?(u.lineHeight-c)/2:0,g=e.y+f;if(s.usePointStyle){const e={radius:Math.min(l,c)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},n=r.leftForLtr(p,l)+l/2,h=g+c/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,(0,i.ar)(t,e,n,h),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,(0,i.ar)(t,e,n,h)}else{t.lineWidth=o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const e=r.leftForLtr(p,l-h),n=r.leftForLtr(r.xPlus(p,1),l-h-2),a=(0,i.au)(o.borderRadius);Object.values(a).some((t=>0!==t))?(t.beginPath(),t.fillStyle=s.multiKeyBackground,(0,i.as)(t,{x:e,y:g,w:l,h:c,radius:a}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),(0,i.as)(t,{x:n,y:g+1,w:l-2,h:c-2,radius:a}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(e,g,l,c),t.strokeRect(e,g,l,c),t.fillStyle=o.backgroundColor,t.fillRect(n,g+1,l-2,c-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:r}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:c,boxWidth:l,boxPadding:h}=n,u=(0,i.Z)(n.bodyFont);let d=u.lineHeight,p=0;const f=(0,i.ax)(n.rtl,this.x,this.width),g=function(n){e.fillText(n,f.x(t.x+p),t.y+d/2),t.y+=d+s},m=f.textAlign(o);let b,y,v,x,_,k,w;for(e.textAlign=o,e.textBaseline="middle",e.font=u.string,t.x=yn(this,m,n),e.fillStyle=n.bodyColor,(0,i.D)(this.beforeBody,g),p=a&&"right"!==m?"center"===o?l/2+h:l+2+h:0,x=0,k=r.length;x<k;++x){for(b=r[x],y=this.labelTextColors[x],e.fillStyle=y,(0,i.D)(b.before,g),v=b.lines,a&&v.length&&(this._drawColorBox(e,t,x,f,n),d=Math.max(u.lineHeight,c)),_=0,w=v.length;_<w;++_)g(v[_]),d=u.lineHeight;(0,i.D)(b.after,g)}p=0,d=u.lineHeight,(0,i.D)(this.afterBody,g),t.y-=s}drawFooter(t,e,n){const r=this.footer,s=r.length;let o,a;if(s){const c=(0,i.ax)(n.rtl,this.x,this.width);for(t.x=yn(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=c.textAlign(n.footerAlign),e.textBaseline="middle",o=(0,i.Z)(n.footerFont),e.fillStyle=n.footerColor,e.font=o.string,a=0;a<s;++a)e.fillText(r[a],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+n.footerSpacing}}drawBackground(t,e,n,r){const{xAlign:s,yAlign:o}=this,{x:a,y:c}=t,{width:l,height:h}=n,{topLeft:u,topRight:d,bottomLeft:p,bottomRight:f}=(0,i.au)(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(a+u,c),"top"===o&&this.drawCaret(t,e,n,r),e.lineTo(a+l-d,c),e.quadraticCurveTo(a+l,c,a+l,c+d),"center"===o&&"right"===s&&this.drawCaret(t,e,n,r),e.lineTo(a+l,c+h-f),e.quadraticCurveTo(a+l,c+h,a+l-f,c+h),"bottom"===o&&this.drawCaret(t,e,n,r),e.lineTo(a+p,c+h),e.quadraticCurveTo(a,c+h,a,c+h-p),"center"===o&&"left"===s&&this.drawCaret(t,e,n,r),e.lineTo(a,c+u),e.quadraticCurveTo(a,c,a+u,c),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,r=n&&n.y;if(i||r){const n=hn[t.position].call(this,this._active,this._eventPosition);if(!n)return;const s=this._size=fn(this,t),o=Object.assign({},n,this._size),a=mn(e,t,o),c=bn(t,o,a,e);i._to===c.x&&r._to===c.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=s.width,this.height=s.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,c))}}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},s={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=(0,i.C)(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(s,t,r,e),(0,i.ay)(t,e.textDirection),s.y+=o.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),(0,i.aA)(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,r=t.map((({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),s=!(0,i.af)(n,r),o=this._positionChanged(r,e);(s||o)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,s=this._active||[],o=this._getActiveElements(t,s,e,n),a=this._positionChanged(o,t),c=e||!(0,i.af)(o,s)||a;return c&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),c}_getActiveElements(t,e,n,i){const r=this.options;if("mouseout"===t.type)return[];if(!i)return e;const s=this.chart.getElementsAtEventForMode(t,r.mode,r,n);return r.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:n,caretY:i,options:r}=this,s=hn[r.position].call(this,t,e);return!1!==s&&(n!==s.x||i!==s.y)}}kn.positioners=hn;var wn={id:"tooltip",_element:kn,positioners:hn,afterInit(t,e,n){n&&(t.tooltip=new kn({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip,n={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",n)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n))},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:i.aB,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:i.aB,beforeBody:i.aB,beforeLabel:i.aB,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return(0,i.k)(n)||(e+=n),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:i.aB,afterBody:i.aB,beforeFooter:i.aB,footer:i.aB,afterFooter:i.aB}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Sn=Object.freeze({__proto__:null,Decimation:ze,Filler:en,Legend:sn,SubTitle:ln,Title:an,Tooltip:wn});function Cn(t,e,n,i){const r=t.indexOf(e);if(-1===r)return((t,e,n,i)=>("string"==typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n))(t,e,n,i);return r!==t.lastIndexOf(e)?n:r}class En extends It{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:n,label:i}of e)t[n]===i&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if((0,i.k)(t))return null;const n=this.getLabels();return((t,e)=>null===t?null:(0,i.w)(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:Cn(n,t,(0,i.v)(e,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,i=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=t;n<=e;n++)i.push({value:n});return i}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Mn(t,e,{horizontal:n,minRotation:r}){const s=(0,i.t)(r),o=(n?Math.sin(s):Math.cos(s))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}En.id="category",En.defaults={ticks:{callback:En.prototype.getLabelForValue}};class Pn extends It{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return(0,i.k)(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this;const o=t=>r=e?r:t,a=t=>s=n?s:t;if(t){const t=(0,i.s)(r),e=(0,i.s)(s);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(r===s){let e=1;(s>=Number.MAX_SAFE_INTEGER||r<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*s)),a(s+e),t||o(r-e)}this.min=r,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=function(t,e){const n=[],{bounds:r,step:s,min:o,max:a,precision:c,count:l,maxTicks:h,maxDigits:u,includeBounds:d}=t,p=s||1,f=h-1,{min:g,max:m}=e,b=!(0,i.k)(o),y=!(0,i.k)(a),v=!(0,i.k)(l),x=(m-g)/(u+1);let _,k,w,S,C=(0,i.aE)((m-g)/f/p)*p;if(C<1e-14&&!b&&!y)return[{value:g},{value:m}];S=Math.ceil(m/C)-Math.floor(g/C),S>f&&(C=(0,i.aE)(S*C/f/p)*p),(0,i.k)(c)||(_=Math.pow(10,c),C=Math.ceil(C*_)/_),"ticks"===r?(k=Math.floor(g/C)*C,w=Math.ceil(m/C)*C):(k=g,w=m),b&&y&&s&&(0,i.aF)((a-o)/s,C/1e3)?(S=Math.round(Math.min((a-o)/C,h)),C=(a-o)/S,k=o,w=a):v?(k=b?o:k,w=y?a:w,S=l-1,C=(w-k)/S):(S=(w-k)/C,S=(0,i.aG)(S,Math.round(S),C/1e3)?Math.round(S):Math.ceil(S));const E=Math.max((0,i.aH)(C),(0,i.aH)(k));_=Math.pow(10,(0,i.k)(c)?E:c),k=Math.round(k*_)/_,w=Math.round(w*_)/_;let M=0;for(b&&(d&&k!==o?(n.push({value:o}),k<o&&M++,(0,i.aG)(Math.round((k+M*C)*_)/_,o,Mn(o,x,t))&&M++):k<o&&M++);M<S;++M)n.push({value:Math.round((k+M*C)*_)/_});return y&&d&&w!==a?n.length&&(0,i.aG)(n[n.length-1].value,a,Mn(a,x,t))?n[n.length-1].value=a:n.push({value:a}):y&&w!==a||n.push({value:w}),n}({maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&(0,i.aD)(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return(0,i.o)(t,this.chart.options.locale,this.options.ticks.format)}}class jn extends Pn{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=(0,i.g)(t)?t:0,this.max=(0,i.g)(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=(0,i.t)(this.options.ticks.minRotation),r=(t?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/r))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function On(t){return 1===t/Math.pow(10,Math.floor((0,i.L)(t)))}jn.id="linear",jn.defaults={ticks:{callback:Mt.formatters.numeric}};class Tn extends It{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=Pn.prototype.parse.apply(this,[t,e]);if(0!==n)return(0,i.g)(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=(0,i.g)(t)?Math.max(0,t):null,this.max=(0,i.g)(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,r=this.max;const s=e=>n=t?n:e,o=t=>r=e?r:t,a=(t,e)=>Math.pow(10,Math.floor((0,i.L)(t))+e);n===r&&(n<=0?(s(1),o(10)):(s(a(n,-1)),o(a(r,1)))),n<=0&&s(a(r,-1)),r<=0&&o(a(n,1)),this._zero&&this.min!==this._suggestedMin&&n===a(this.min,0)&&s(a(n,-1)),this.min=n,this.max=r}buildTicks(){const t=this.options,e=function(t,e){const n=Math.floor((0,i.L)(e.max)),r=Math.ceil(e.max/Math.pow(10,n)),s=[];let o=(0,i.N)(t.min,Math.pow(10,Math.floor((0,i.L)(e.min)))),a=Math.floor((0,i.L)(o)),c=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{s.push({value:o,major:On(o)}),++c,10===c&&(c=1,++a,l=a>=0?1:l),o=Math.round(c*Math.pow(10,a)*l)/l}while(a<n||a===n&&c<r);const h=(0,i.N)(t.max,o);return s.push({value:h,major:On(o)}),s}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&(0,i.aD)(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":(0,i.o)(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=(0,i.L)(t),this._valueRange=(0,i.L)(this.max)-(0,i.L)(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:((0,i.L)(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Nn(t){const e=t.ticks;if(e.display&&t.display){const t=(0,i.C)(e.backdropPadding);return(0,i.v)(e.font&&e.font.size,i.d.font.size)+t.height}return 0}function An(t,e,n,i,r){return t===i||t===r?{start:e-n/2,end:e+n/2}:t<i||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function Dn(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),r=[],s=[],o=t._pointLabels.length,a=t.options.pointLabels,c=a.centerPointLabels?i.P/o:0;for(let d=0;d<o;d++){const o=a.setContext(t.getPointLabelContext(d));s[d]=o.padding;const p=t.getPointPosition(d,t.drawingArea+s[d],c),f=(0,i.Z)(o.font),g=(l=t.ctx,h=f,u=t._pointLabels[d],u=(0,i.b)(u)?u:[u],{w:(0,i.aI)(l,h.string,u),h:u.length*h.lineHeight});r[d]=g;const m=(0,i.aw)(t.getIndexAngle(d)+c),b=Math.round((0,i.R)(m));Rn(n,e,m,An(b,p.x,g.w,0,180),An(b,p.y,g.h,90,270))}var l,h,u;t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=function(t,e,n){const r=[],s=t._pointLabels.length,o=t.options,a=Nn(o)/2,c=t.drawingArea,l=o.pointLabels.centerPointLabels?i.P/s:0;for(let o=0;o<s;o++){const s=t.getPointPosition(o,c+a+n[o],l),h=Math.round((0,i.R)((0,i.aw)(s.angle+i.H))),u=e[o],d=zn(s.y,u.h,h),p=In(h),f=Ln(s.x,u.w,p);r.push({x:s.x,y:d,textAlign:p,left:f,top:d,right:f+u.w,bottom:d+u.h})}return r}(t,r,s)}function Rn(t,e,n,i,r){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,c=0;i.start<e.l?(a=(e.l-i.start)/s,t.l=Math.min(t.l,e.l-a)):i.end>e.r&&(a=(i.end-e.r)/s,t.r=Math.max(t.r,e.r+a)),r.start<e.t?(c=(e.t-r.start)/o,t.t=Math.min(t.t,e.t-c)):r.end>e.b&&(c=(r.end-e.b)/o,t.b=Math.max(t.b,e.b+c))}function In(t){return 0===t||180===t?"center":t<180?"left":"right"}function Ln(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function zn(t,e,n){return 90===n||270===n?t-=e/2:(n>270||n<90)&&(t-=e),t}function Fn(t,e,n,r){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,i.T);else{let n=t.getPointPosition(0,e);s.moveTo(n.x,n.y);for(let i=1;i<r;i++)n=t.getPointPosition(i,e),s.lineTo(n.x,n.y)}}Tn.id="logarithmic",Tn.defaults={ticks:{callback:Mt.formatters.logarithmic,major:{enabled:!0}}};class Bn extends Pn{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=(0,i.C)(Nn(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=(0,i.g)(t)&&!isNaN(t)?t:0,this.max=(0,i.g)(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Nn(this.options))}generateTickLabels(t){Pn.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const n=(0,i.O)(this.options.pointLabels.callback,[t,e],this);return n||0===n?n:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Dn(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,i))}getIndexAngle(t){const e=i.T/(this._pointLabels.length||1),n=this.options.startAngle||0;return(0,i.aw)(t*e+(0,i.t)(n))}getDistanceFromCenterForValue(t){if((0,i.k)(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if((0,i.k)(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const n=e[t];return function(t,e,n){return(0,i.h)(t,{label:n,index:e,type:"pointLabel"})}(this.getContext(),t,n)}}getPointPosition(t,e,n=0){const r=this.getIndexAngle(t)-i.H+n;return{x:Math.cos(r)*e+this.xCenter,y:Math.sin(r)*e+this.yCenter,angle:r}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:i,bottom:r}=this._pointLabelItems[t];return{left:e,top:n,right:i,bottom:r}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),Fn(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:r}=e,s=this._pointLabels.length;let o,a,c;if(e.pointLabels.display&&function(t,e){const{ctx:n,options:{pointLabels:r}}=t;for(let s=e-1;s>=0;s--){const e=r.setContext(t.getPointLabelContext(s)),o=(0,i.Z)(e.font),{x:a,y:c,textAlign:l,left:h,top:u,right:d,bottom:p}=t._pointLabelItems[s],{backdropColor:f}=e;if(!(0,i.k)(f)){const t=(0,i.C)(e.backdropPadding);n.fillStyle=f,n.fillRect(h-t.left,u-t.top,d-h+t.width,p-u+t.height)}(0,i.X)(n,t._pointLabels[s],a,c+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,s),r.display&&this.ticks.forEach(((t,e)=>{if(0!==e){a=this.getDistanceFromCenterForValue(t.value);!function(t,e,n,i){const r=t.ctx,s=e.circular,{color:o,lineWidth:a}=e;!s&&!i||!o||!a||n<0||(r.save(),r.strokeStyle=o,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),Fn(t,n,s,i),r.closePath(),r.stroke(),r.restore())}(this,r.setContext(this.getContext(e-1)),a,s)}})),n.display){for(t.save(),o=s-1;o>=0;o--){const i=n.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:s}=i;s&&r&&(t.lineWidth=s,t.strokeStyle=r,t.setLineDash(i.borderDash),t.lineDashOffset=i.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const r=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((r,a)=>{if(0===a&&!e.reverse)return;const c=n.setContext(this.getContext(a)),l=(0,i.Z)(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[a].value),c.showLabelBackdrop){t.font=l.string,o=t.measureText(r.label).width,t.fillStyle=c.backdropColor;const e=(0,i.C)(c.backdropPadding);t.fillRect(-o/2-e.left,-s-l.size/2-e.top,o+e.width,l.size+e.height)}(0,i.X)(t,r.label,0,-s,l,{color:c.color})})),t.restore()}drawTitle(){}}Bn.id="radialLinear",Bn.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Mt.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},Bn.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Bn.descriptors={angleLines:{_fallback:"grid"}};const Vn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Zn=Object.keys(Vn);function Hn(t,e){return t-e}function Wn(t,e){if((0,i.k)(e))return null;const n=t._adapter,{parser:r,round:s,isoWeekday:o}=t._parseOpts;let a=e;return"function"==typeof r&&(a=r(a)),(0,i.g)(a)||(a="string"==typeof r?n.parse(a,r):n.parse(a)),null===a?null:(s&&(a="week"!==s||!(0,i.q)(o)&&!0!==o?n.startOf(a,s):n.startOf(a,"isoWeek",o)),+a)}function Un(t,e,n,i){const r=Zn.length;for(let s=Zn.indexOf(t);s<r-1;++s){const t=Vn[Zn[s]],r=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((n-e)/(r*t.size))<=i)return Zn[s]}return Zn[r-1]}function $n(t,e,n){if(n){if(n.length){const{lo:r,hi:s}=(0,i.aK)(n,e);t[n[r]>=e?n[r]:n[s]]=!0}}else t[e]=!0}function Gn(t,e,n){const i=[],r={},s=e.length;let o,a;for(o=0;o<s;++o)a=e[o],r[a]=o,i.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,i){const r=t._adapter,s=+r.startOf(e[0].value,i),o=e[e.length-1].value;let a,c;for(a=s;a<=o;a=+r.add(a,1,i))c=n[a],c>=0&&(e[c].major=!0);return e}(t,i,r,n):i}class Jn extends It{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const n=t.time||(t.time={}),r=this._adapter=new V._date(t.adapters.date);(0,i.a9)(n.displayFormats,r.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Wn(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:r,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function c(t){o||isNaN(t.min)||(r=Math.min(r,t.min)),a||isNaN(t.max)||(s=Math.max(s,t.max))}o&&a||(c(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||c(this.getMinMax(!1))),r=(0,i.g)(r)&&!isNaN(r)?r:+e.startOf(Date.now(),n),s=(0,i.g)(s)&&!isNaN(s)?s:+e.endOf(Date.now(),n)+1,this.min=Math.min(r,s-1),this.max=Math.max(r+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,r="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const s=this.min,o=this.max,a=(0,i.aJ)(r,s,o);return this._unit=e.unit||(n.autoSkip?Un(e.minUnit,this.min,this.max,this._getLabelCapacity(s)):function(t,e,n,i,r){for(let s=Zn.length-1;s>=Zn.indexOf(n);s--){const n=Zn[s];if(Vn[n].common&&t._adapter.diff(r,i,n)>=e-1)return n}return Zn[n?Zn.indexOf(n):0]}(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(t){for(let e=Zn.indexOf(t)+1,n=Zn.length;e<n;++e)if(Vn[Zn[e]].common)return Zn[e]}(this._unit):void 0,this.initOffsets(r),t.reverse&&a.reverse(),Gn(this,a,this._majorUnit)}initOffsets(t){let e,n,r=0,s=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),r=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,n=this.getDecimalForValue(t[t.length-1]),s=1===t.length?n:(n-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;r=(0,i.w)(r,0,o),s=(0,i.w)(s,0,o),this._offsets={start:r,end:s,factor:1/(r+1+s)}}_generate(){const t=this._adapter,e=this.min,n=this.max,r=this.options,s=r.time,o=s.unit||Un(s.minUnit,e,n,this._getLabelCapacity(e)),a=(0,i.v)(s.stepSize,1),c="week"===o&&s.isoWeekday,l=(0,i.q)(c)||!0===c,h={};let u,d,p=e;if(l&&(p=+t.startOf(p,"isoWeek",c)),p=+t.startOf(p,l?"day":o),t.diff(n,e,o)>1e5*a)throw new Error(e+" and "+n+" are too far apart with stepSize of "+a+" "+o);const f="data"===r.ticks.source&&this.getDataTimestamps();for(u=p,d=0;u<n;u=+t.add(u,a,o),d++)$n(h,u,f);return u!==n&&"ticks"!==r.bounds&&1!==d||$n(h,u,f),Object.keys(h).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}_tickFormatFunction(t,e,n,r){const s=this.options,o=s.time.displayFormats,a=this._unit,c=this._majorUnit,l=a&&o[a],h=c&&o[c],u=n[e],d=c&&h&&u&&u.major,p=this._adapter.format(t,r||(d?h:l)),f=s.ticks.callback;return f?(0,i.O)(f,[p,e,n],this):p}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e<n;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,r=(0,i.t)(this.isHorizontal()?e.maxRotation:e.minRotation),s=Math.cos(r),o=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:n*s+a*o,h:n*o+a*s}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,i=n[e.unit]||n.millisecond,r=this._tickFormatFunction(t,0,Gn(this,[t],this._majorUnit),i),s=this._getLabelSize(r),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,e=i.length;t<e;++t)n=n.concat(i[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const i=this.getLabels();for(e=0,n=i.length;e<n;++e)t.push(Wn(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return(0,i._)(t.sort(Hn))}}function Yn(t,e,n){let r,s,o,a,c=0,l=t.length-1;n?(e>=t[c].pos&&e<=t[l].pos&&({lo:c,hi:l}=(0,i.x)(t,"pos",e)),({pos:r,time:o}=t[c]),({pos:s,time:a}=t[l])):(e>=t[c].time&&e<=t[l].time&&({lo:c,hi:l}=(0,i.x)(t,"time",e)),({time:r,pos:o}=t[c]),({time:s,pos:a}=t[l]));const h=s-r;return h?o+(a-o)*(e-r)/h:o}Jn.id="time",Jn.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Kn extends Jn{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Yn(e,this.min),this._tableRange=Yn(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,i=[],r=[];let s,o,a,c,l;for(s=0,o=t.length;s<o;++s)c=t[s],c>=e&&c<=n&&i.push(c);if(i.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(s=0,o=i.length;s<o;++s)l=i[s+1],a=i[s-1],c=i[s],Math.round((l+a)/2)!==c&&r.push({time:c,pos:s/(o-1)});return r}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return t=e.length&&n.length?this.normalize(e.concat(n)):e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(Yn(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return Yn(this._table,n*this._tableRange+this._minPos,!0)}}Kn.id="timeseries",Kn.defaults=Jn.defaults;const qn=[z,Re,Sn,Object.freeze({__proto__:null,CategoryScale:En,LinearScale:jn,LogarithmicScale:Tn,RadialLinearScale:Bn,TimeScale:Jn,TimeSeriesScale:Kn})]},8095:function(t,e,n){"use strict";n.d(e,{$:function(){return o},A:function(){return Se},B:function(){return tt},C:function(){return be},D:function(){return x},E:function(){return sn},F:function(){return qe},G:function(){return cn},H:function(){return B},I:function(){return r},J:function(){return an},K:function(){return Ke},L:function(){return H},M:function(){return $},N:function(){return g},O:function(){return v},P:function(){return R},Q:function(){return xe},R:function(){return X},S:function(){return Xt},T:function(){return I},U:function(){return ot},V:function(){return te},W:function(){return re},X:function(){return ce},Y:function(){return se},Z:function(){return ye},_:function(){return je},a:function(){return ve},a0:function(){return a},a1:function(){return Gt},a2:function(){return C},a3:function(){return O},a4:function(){return Jt},a5:function(){return N},a6:function(){return Te},a7:function(){return Oe},a8:function(){return Ne},a9:function(){return E},aA:function(){return mn},aB:function(){return l},aC:function(){return et},aD:function(){return K},aE:function(){return U},aF:function(){return Y},aG:function(){return J},aH:function(){return Q},aI:function(){return Qt},aJ:function(){return Ce},aK:function(){return ke},aa:function(){return h},ab:function(){return s},ac:function(){return on},ad:function(){return ee},ae:function(){return A},af:function(){return _},ag:function(){return D},ah:function(){return at},ai:function(){return fe},aj:function(){return Ye},ak:function(){return kn},al:function(){return xn},am:function(){return hn},an:function(){return un},ao:function(){return ln},ap:function(){return oe},aq:function(){return ae},ar:function(){return ne},as:function(){return he},at:function(){return ge},au:function(){return me},av:function(){return vn},aw:function(){return it},ax:function(){return fn},ay:function(){return gn},az:function(){return c},b:function(){return d},c:function(){return Ut},d:function(){return qt},e:function(){return ut},f:function(){return j},g:function(){return f},h:function(){return _e},i:function(){return p},j:function(){return T},k:function(){return u},l:function(){return Me},m:function(){return b},n:function(){return y},o:function(){return pn},p:function(){return rt},q:function(){return G},r:function(){return i},s:function(){return W},t:function(){return q},u:function(){return Pe},v:function(){return m},w:function(){return st},x:function(){return we},y:function(){return nn},z:function(){return ie}});const i="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function r(t,e,n){const r=n||(t=>Array.prototype.slice.call(t));let s=!1,o=[];return function(...n){o=r(n),s||(s=!0,i.call(window,(()=>{s=!1,t.apply(e,o)})))}}function s(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const o=t=>"start"===t?"left":"end"===t?"right":"center",a=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2,c=(t,e,n,i)=>t===(i?"left":"right")?n:"center"===t?(e+n)/2:e;function l(){}const h=function(){let t=0;return function(){return t++}}();function u(t){return null==t}function d(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function p(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const f=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function g(t,e){return f(t)?t:e}function m(t,e){return void 0===t?e:t}const b=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,y=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function v(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function x(t,e,n,i){let r,s,o;if(d(t))if(s=t.length,i)for(r=s-1;r>=0;r--)e.call(n,t[r],r);else for(r=0;r<s;r++)e.call(n,t[r],r);else if(p(t))for(o=Object.keys(t),s=o.length,r=0;r<s;r++)e.call(n,t[o[r]],o[r])}function _(t,e){let n,i,r,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=t[n],s=e[n],r.datasetIndex!==s.datasetIndex||r.index!==s.index)return!1;return!0}function k(t){if(d(t))return t.map(k);if(p(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let r=0;for(;r<i;++r)e[n[r]]=k(t[n[r]]);return e}return t}function w(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function S(t,e,n,i){if(!w(t))return;const r=e[t],s=n[t];p(r)&&p(s)?C(r,s,i):e[t]=k(s)}function C(t,e,n){const i=d(e)?e:[e],r=i.length;if(!p(t))return t;const s=(n=n||{}).merger||S;for(let o=0;o<r;++o){if(!p(e=i[o]))continue;const r=Object.keys(e);for(let i=0,o=r.length;i<o;++i)s(r[i],t,e,n)}return t}function E(t,e){return C(t,e,{merger:M})}function M(t,e,n){if(!w(t))return;const i=e[t],r=n[t];p(i)&&p(r)?E(i,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=k(r))}function P(t,e){const n=t.indexOf(".",e);return-1===n?t.length:n}function j(t,e){if(""===e)return t;let n=0,i=P(e,n);for(;t&&i>n;)t=t[e.substr(n,i-n)],n=i+1,i=P(e,n);return t}function O(t){return t.charAt(0).toUpperCase()+t.slice(1)}const T=t=>void 0!==t,N=t=>"function"==typeof t,A=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function D(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const R=Math.PI,I=2*R,L=I+R,z=Number.POSITIVE_INFINITY,F=R/180,B=R/2,V=R/4,Z=2*R/3,H=Math.log10,W=Math.sign;function U(t){const e=Math.round(t);t=J(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(H(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function $(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i==0&&(e.push(i),e.push(t/i));return n===(0|n)&&e.push(n),e.sort(((t,e)=>t-e)).pop(),e}function G(t){return!isNaN(parseFloat(t))&&isFinite(t)}function J(t,e,n){return Math.abs(t-e)<n}function Y(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function K(t,e,n){let i,r,s;for(i=0,r=t.length;i<r;i++)s=t[i][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function q(t){return t*(R/180)}function X(t){return t*(180/R)}function Q(t){if(!f(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function tt(t,e){const n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i);let s=Math.atan2(i,n);return s<-.5*R&&(s+=I),{angle:s,distance:r}}function et(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function nt(t,e){return(t-e+L)%I-R}function it(t){return(t%I+I)%I}function rt(t,e,n,i){const r=it(t),s=it(e),o=it(n),a=it(s-r),c=it(o-r),l=it(r-s),h=it(r-o);return r===s||r===o||i&&s===o||a>c&&l<h}function st(t,e,n){return Math.max(e,Math.min(n,t))}function ot(t){return st(t,-32768,32767)}function at(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}const ct=t=>0===t||1===t,lt=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*I/n),ht=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*I/n)+1,ut={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*B),easeOutSine:t=>Math.sin(t*B),easeInOutSine:t=>-.5*(Math.cos(R*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ct(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ct(t)?t:lt(t,.075,.3),easeOutElastic:t=>ct(t)?t:ht(t,.075,.3),easeInOutElastic(t){const e=.1125;return ct(t)?t:t<.5?.5*lt(2*t,e,.45):.5+.5*ht(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ut.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*ut.easeInBounce(2*t):.5*ut.easeOutBounce(2*t-1)+.5},dt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},pt="0123456789ABCDEF",ft=t=>pt[15&t],gt=t=>pt[(240&t)>>4]+pt[15&t],mt=t=>(240&t)>>4==(15&t);function bt(t){var e=function(t){return mt(t.r)&&mt(t.g)&&mt(t.b)&&mt(t.a)}(t)?ft:gt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function yt(t){return t+.5|0}const vt=(t,e,n)=>Math.max(Math.min(t,n),e);function xt(t){return vt(yt(2.55*t),0,255)}function _t(t){return vt(yt(255*t),0,255)}function kt(t){return vt(yt(t/2.55)/100,0,1)}function wt(t){return vt(yt(100*t),0,100)}const St=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Ct=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Et(t,e,n){const i=e*Math.min(n,1-n),r=(e,r=(e+t/30)%12)=>n-i*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Mt(t,e,n){const i=(i,r=(i+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function Pt(t,e,n){const i=Et(t,1,.5);let r;for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)i[r]*=1-e-n,i[r]+=e;return i}function jt(t){const e=t.r/255,n=t.g/255,i=t.b/255,r=Math.max(e,n,i),s=Math.min(e,n,i),o=(r+s)/2;let a,c,l;return r!==s&&(l=r-s,c=o>.5?l/(2-r-s):l/(r+s),a=r===e?(n-i)/l+(n<i?6:0):r===n?(i-e)/l+2:(e-n)/l+4,a=60*a+.5),[0|a,c||0,o]}function Ot(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(_t)}function Tt(t,e,n){return Ot(Et,t,e,n)}function Nt(t){return(t%360+360)%360}function At(t){const e=Ct.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?xt(+e[5]):_t(+e[5]));const r=Nt(+e[2]),s=+e[3]/100,o=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return Ot(Pt,t,e,n)}(r,s,o):"hsv"===e[1]?function(t,e,n){return Ot(Mt,t,e,n)}(r,s,o):Tt(r,s,o),{r:n[0],g:n[1],b:n[2],a:i}}const Dt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Rt={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let It;function Lt(t){It||(It=function(){const t={},e=Object.keys(Rt),n=Object.keys(Dt);let i,r,s,o,a;for(i=0;i<e.length;i++){for(o=a=e[i],r=0;r<n.length;r++)s=n[r],a=a.replace(s,Dt[s]);s=parseInt(Rt[o],16),t[a]=[s>>16&255,s>>8&255,255&s]}return t}(),It.transparent=[0,0,0,0]);const e=It[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function zt(t,e,n){if(t){let i=jt(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=Tt(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function Ft(t,e){return t?Object.assign(e||{},t):t}function Bt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=_t(t[3]))):(e=Ft(t,{r:0,g:0,b:0,a:1})).a=_t(e.a),e}function Vt(t){return"r"===t.charAt(0)?function(t){const e=St.exec(t);let n,i,r,s=255;if(e){if(e[7]!==n){const t=+e[7];s=255&(e[8]?xt(t):255*t)}return n=+e[1],i=+e[3],r=+e[5],n=255&(e[2]?xt(n):n),i=255&(e[4]?xt(i):i),r=255&(e[6]?xt(r):r),{r:n,g:i,b:r,a:s}}}(t):At(t)}class Zt{constructor(t){if(t instanceof Zt)return t;const e=typeof t;let n;var i,r,s;"object"===e?n=Bt(t):"string"===e&&(s=(i=t).length,"#"===i[0]&&(4===s||5===s?r={r:255&17*dt[i[1]],g:255&17*dt[i[2]],b:255&17*dt[i[3]],a:5===s?17*dt[i[4]]:255}:7!==s&&9!==s||(r={r:dt[i[1]]<<4|dt[i[2]],g:dt[i[3]]<<4|dt[i[4]],b:dt[i[5]]<<4|dt[i[6]],a:9===s?dt[i[7]]<<4|dt[i[8]]:255})),n=r||Lt(t)||Vt(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Ft(this._rgb);return t&&(t.a=kt(t.a)),t}set rgb(t){this._rgb=Bt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${kt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?bt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=jt(t),n=e[0],i=wt(e[1]),r=wt(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${r}%, ${kt(t.a)})`:`hsl(${n}, ${i}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const n=this;if(t){const i=n.rgb,r=t.rgb;let s;const o=e===s?.5:e,a=2*o-1,c=i.a-r.a,l=((a*c==-1?a:(a+c)/(1+a*c))+1)/2;s=1-l,i.r=255&l*i.r+s*r.r+.5,i.g=255&l*i.g+s*r.g+.5,i.b=255&l*i.b+s*r.b+.5,i.a=o*i.a+(1-o)*r.a,n.rgb=i}return n}clone(){return new Zt(this.rgb)}alpha(t){return this._rgb.a=_t(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=yt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return zt(this._rgb,2,t),this}darken(t){return zt(this._rgb,2,-t),this}saturate(t){return zt(this._rgb,1,t),this}desaturate(t){return zt(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=jt(t);n[0]=Nt(n[0]+e),n=Tt(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function Ht(t){return new Zt(t)}const Wt=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Ut(t){return Wt(t)?t:Ht(t)}function $t(t){return Wt(t)?t:Ht(t).saturate(.5).darken(.1).hexString()}const Gt=Object.create(null),Jt=Object.create(null);function Yt(t,e){if(!e)return t;const n=e.split(".");for(let e=0,i=n.length;e<i;++e){const i=n[e];t=t[i]||(t[i]=Object.create(null))}return t}function Kt(t,e,n){return"string"==typeof e?C(Yt(t,e),n):C(Yt(t,""),e)}var qt=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>$t(e.backgroundColor),this.hoverBorderColor=(t,e)=>$t(e.borderColor),this.hoverColor=(t,e)=>$t(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return Kt(this,t,e)}get(t){return Yt(this,t)}describe(t,e){return Kt(Jt,t,e)}override(t,e){return Kt(Gt,t,e)}route(t,e,n,i){const r=Yt(this,t),s=Yt(this,n),o="_"+e;Object.defineProperties(r,{[o]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=s[i];return p(t)?Object.assign({},e,t):m(t,e)},set(t){this[o]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Xt(t,e,n,i,r){let s=e[r];return s||(s=e[r]=t.measureText(r).width,n.push(r)),s>i&&(i=s),i}function Qt(t,e,n,i){let r=(i=i||{}).data=i.data||{},s=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},s=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let o=0;const a=n.length;let c,l,h,u,p;for(c=0;c<a;c++)if(u=n[c],null!=u&&!0!==d(u))o=Xt(t,r,s,o,u);else if(d(u))for(l=0,h=u.length;l<h;l++)p=u[l],null==p||d(p)||(o=Xt(t,r,s,o,p));t.restore();const f=s.length/2;if(f>n.length){for(c=0;c<f;c++)delete r[s[c]];s.splice(0,f)}return o}function te(t,e,n){const i=t.currentDevicePixelRatio,r=0!==n?Math.max(n/2,.5):0;return Math.round((e-r)*i)/i+r}function ee(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function ne(t,e,n,i){let r,s,o,a,c;const l=e.pointStyle,h=e.rotation,u=e.radius;let d=(h||0)*F;if(l&&"object"==typeof l&&(r=l.toString(),"[object HTMLImageElement]"===r||"[object HTMLCanvasElement]"===r))return t.save(),t.translate(n,i),t.rotate(d),t.drawImage(l,-l.width/2,-l.height/2,l.width,l.height),void t.restore();if(!(isNaN(u)||u<=0)){switch(t.beginPath(),l){default:t.arc(n,i,u,0,I),t.closePath();break;case"triangle":t.moveTo(n+Math.sin(d)*u,i-Math.cos(d)*u),d+=Z,t.lineTo(n+Math.sin(d)*u,i-Math.cos(d)*u),d+=Z,t.lineTo(n+Math.sin(d)*u,i-Math.cos(d)*u),t.closePath();break;case"rectRounded":c=.516*u,a=u-c,s=Math.cos(d+V)*a,o=Math.sin(d+V)*a,t.arc(n-s,i-o,c,d-R,d-B),t.arc(n+o,i-s,c,d-B,d),t.arc(n+s,i+o,c,d,d+B),t.arc(n-o,i+s,c,d+B,d+R),t.closePath();break;case"rect":if(!h){a=Math.SQRT1_2*u,t.rect(n-a,i-a,2*a,2*a);break}d+=V;case"rectRot":s=Math.cos(d)*u,o=Math.sin(d)*u,t.moveTo(n-s,i-o),t.lineTo(n+o,i-s),t.lineTo(n+s,i+o),t.lineTo(n-o,i+s),t.closePath();break;case"crossRot":d+=V;case"cross":s=Math.cos(d)*u,o=Math.sin(d)*u,t.moveTo(n-s,i-o),t.lineTo(n+s,i+o),t.moveTo(n+o,i-s),t.lineTo(n-o,i+s);break;case"star":s=Math.cos(d)*u,o=Math.sin(d)*u,t.moveTo(n-s,i-o),t.lineTo(n+s,i+o),t.moveTo(n+o,i-s),t.lineTo(n-o,i+s),d+=V,s=Math.cos(d)*u,o=Math.sin(d)*u,t.moveTo(n-s,i-o),t.lineTo(n+s,i+o),t.moveTo(n+o,i-s),t.lineTo(n-o,i+s);break;case"line":s=Math.cos(d)*u,o=Math.sin(d)*u,t.moveTo(n-s,i-o),t.lineTo(n+s,i+o);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(d)*u,i+Math.sin(d)*u)}t.fill(),e.borderWidth>0&&t.stroke()}}function ie(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function re(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function se(t){t.restore()}function oe(t,e,n,i,r){if(!e)return t.lineTo(n.x,n.y);if("middle"===r){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else"after"===r!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function ae(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function ce(t,e,n,i,r,s={}){const o=d(e)?e:[e],a=s.strokeWidth>0&&""!==s.strokeColor;let c,l;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);u(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),c=0;c<o.length;++c)l=o[c],a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),u(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(l,n,i,s.maxWidth)),t.fillText(l,n,i,s.maxWidth),le(t,n,i,l,s),i+=r.lineHeight;t.restore()}function le(t,e,n,i,r){if(r.strikethrough||r.underline){const s=t.measureText(i),o=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,c=n-s.actualBoundingBoxAscent,l=n+s.actualBoundingBoxDescent,h=r.strikethrough?(c+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(o,h),t.lineTo(a,h),t.stroke()}}function he(t,e){const{x:n,y:i,w:r,h:s,radius:o}=e;t.arc(n+o.topLeft,i+o.topLeft,o.topLeft,-B,R,!0),t.lineTo(n,i+s-o.bottomLeft),t.arc(n+o.bottomLeft,i+s-o.bottomLeft,o.bottomLeft,R,B,!0),t.lineTo(n+r-o.bottomRight,i+s),t.arc(n+r-o.bottomRight,i+s-o.bottomRight,o.bottomRight,B,0,!0),t.lineTo(n+r,i+o.topRight),t.arc(n+r-o.topRight,i+o.topRight,o.topRight,0,-B,!0),t.lineTo(n+o.topLeft,i)}const ue=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),de=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function pe(t,e){const n=(""+t).match(ue);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}function fe(t,e){const n={},i=p(e),r=i?Object.keys(e):e,s=p(t)?i?n=>m(t[n],t[e[n]]):e=>t[e]:()=>t;for(const t of r)n[t]=+s(t)||0;return n}function ge(t){return fe(t,{top:"y",right:"x",bottom:"y",left:"x"})}function me(t){return fe(t,["topLeft","topRight","bottomLeft","bottomRight"])}function be(t){const e=ge(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ye(t,e){t=t||{},e=e||qt.font;let n=m(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let i=m(t.style,e.style);i&&!(""+i).match(de)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const r={family:m(t.family,e.family),lineHeight:pe(m(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:m(t.weight,e.weight),string:""};return r.string=function(t){return!t||u(t.size)||u(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function ve(t,e,n,i){let r,s,o,a=!0;for(r=0,s=t.length;r<s;++r)if(o=t[r],void 0!==o&&(void 0!==e&&"function"==typeof o&&(o=o(e),a=!1),void 0!==n&&d(o)&&(o=o[n%o.length],a=!1),void 0!==o))return i&&!a&&(i.cacheable=!1),o}function xe(t,e,n){const{min:i,max:r}=t,s=y(e,(r-i)/2),o=(t,e)=>n&&0===t?0:t+e;return{min:o(i,-Math.abs(s)),max:o(r,s)}}function _e(t,e){return Object.assign(Object.create(t),e)}function ke(t,e,n){n=n||(n=>t[n]<e);let i,r=t.length-1,s=0;for(;r-s>1;)i=s+r>>1,n(i)?s=i:r=i;return{lo:s,hi:r}}const we=(t,e,n)=>ke(t,n,(i=>t[i][e]<n)),Se=(t,e,n)=>ke(t,n,(i=>t[i][e]>=n));function Ce(t,e,n){let i=0,r=t.length;for(;i<r&&t[i]<e;)i++;for(;r>i&&t[r-1]>n;)r--;return i>0||r<t.length?t.slice(i,r):t}const Ee=["push","pop","shift","splice","unshift"];function Me(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Ee.forEach((e=>{const n="_onData"+O(e),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const r=i.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[n]&&t[n](...e)})),r}})})))}function Pe(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(e);-1!==r&&i.splice(r,1),i.length>0||(Ee.forEach((e=>{delete t[e]})),delete t._chartjs)}function je(t){const e=new Set;let n,i;for(n=0,i=t.length;n<i;++n)e.add(t[n]);return e.size===i?t:Array.from(e)}function Oe(t,e=[""],n=t,i,r=(()=>t[0])){T(i)||(i=Ve("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:i,_getTarget:r,override:r=>Oe([r,...t],e,n,i)};return new Proxy(s,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>Re(n,i,(()=>function(t,e,n,i){let r;for(const s of e)if(r=Ve(Ae(s,t),n),T(r))return De(t,r)?Fe(n,i,t,r):r}(i,e,t,n))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ze(t).includes(e),ownKeys:t=>Ze(t),set(t,e,n){const i=t._storage||(t._storage=r());return t[e]=i[e]=n,delete t._keys,!0}})}function Te(t,e,n,i){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Ne(t,i),setContext:e=>Te(t,e,n,i),override:r=>Te(t.override(r),e,n,i)};return new Proxy(r,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>Re(t,e,(()=>function(t,e,n){const{_proxy:i,_context:r,_subProxy:s,_descriptors:o}=t;let a=i[e];N(a)&&o.isScriptable(e)&&(a=function(t,e,n,i){const{_proxy:r,_context:s,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(s,o||i),a.delete(t),De(t,e)&&(e=Fe(r._scopes,r,t,e));return e}(e,a,t,n));d(a)&&a.length&&(a=function(t,e,n,i){const{_proxy:r,_context:s,_subProxy:o,_descriptors:a}=n;if(T(s.index)&&i(t))e=e[s.index%e.length];else if(p(e[0])){const n=e,i=r._scopes.filter((t=>t!==n));e=[];for(const c of n){const n=Fe(i,r,t,c);e.push(Te(n,s,o&&o[t],a))}}return e}(e,a,t,o.isIndexable));De(e,a)&&(a=Te(a,r,s&&s[e],o));return a}(t,e,n))),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,i)=>(t[n]=i,delete e[n],!0)})}function Ne(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:i,isScriptable:N(n)?n:()=>n,isIndexable:N(i)?i:()=>i}}const Ae=(t,e)=>t?t+O(e):e,De=(t,e)=>p(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Re(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const i=n();return t[e]=i,i}function Ie(t,e,n){return N(t)?t(e,n):t}const Le=(t,e)=>!0===t?e:"string"==typeof t?j(e,t):void 0;function ze(t,e,n,i,r){for(const s of e){const e=Le(n,s);if(e){t.add(e);const s=Ie(e._fallback,n,r);if(T(s)&&s!==n&&s!==i)return s}else if(!1===e&&T(i)&&n!==i)return null}return!1}function Fe(t,e,n,i){const r=e._rootScopes,s=Ie(e._fallback,n,i),o=[...t,...r],a=new Set;a.add(i);let c=Be(a,o,n,s||n,i);return null!==c&&((!T(s)||s===n||(c=Be(a,o,s,c,i),null!==c))&&Oe(Array.from(a),[""],r,s,(()=>function(t,e,n){const i=t._getTarget();e in i||(i[e]={});const r=i[e];if(d(r)&&p(n))return n;return r}(e,n,i))))}function Be(t,e,n,i,r){for(;n;)n=ze(t,e,n,i,r);return n}function Ve(t,e){for(const n of e){if(!n)continue;const e=n[t];if(T(e))return e}}function Ze(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const He=Number.EPSILON||1e-14,We=(t,e)=>e<t.length&&!t[e].skip&&t[e],Ue=t=>"x"===t?"y":"x";function $e(t,e,n,i){const r=t.skip?e:t,s=e,o=n.skip?e:n,a=et(s,r),c=et(o,s);let l=a/(a+c),h=c/(a+c);l=isNaN(l)?0:l,h=isNaN(h)?0:h;const u=i*l,d=i*h;return{previous:{x:s.x-u*(o.x-r.x),y:s.y-u*(o.y-r.y)},next:{x:s.x+d*(o.x-r.x),y:s.y+d*(o.y-r.y)}}}function Ge(t,e="x"){const n=Ue(e),i=t.length,r=Array(i).fill(0),s=Array(i);let o,a,c,l=We(t,0);for(o=0;o<i;++o)if(a=c,c=l,l=We(t,o+1),c){if(l){const t=l[e]-c[e];r[o]=0!==t?(l[n]-c[n])/t:0}s[o]=a?l?W(r[o-1])!==W(r[o])?0:(r[o-1]+r[o])/2:r[o-1]:r[o]}!function(t,e,n){const i=t.length;let r,s,o,a,c,l=We(t,0);for(let h=0;h<i-1;++h)c=l,l=We(t,h+1),c&&l&&(J(e[h],0,He)?n[h]=n[h+1]=0:(r=n[h]/e[h],s=n[h+1]/e[h],a=Math.pow(r,2)+Math.pow(s,2),a<=9||(o=3/Math.sqrt(a),n[h]=r*o*e[h],n[h+1]=s*o*e[h])))}(t,r,s),function(t,e,n="x"){const i=Ue(n),r=t.length;let s,o,a,c=We(t,0);for(let l=0;l<r;++l){if(o=a,a=c,c=We(t,l+1),!a)continue;const r=a[n],h=a[i];o&&(s=(r-o[n])/3,a[`cp1${n}`]=r-s,a[`cp1${i}`]=h-s*e[l]),c&&(s=(c[n]-r)/3,a[`cp2${n}`]=r+s,a[`cp2${i}`]=h+s*e[l])}}(t,s,e)}function Je(t,e,n){return Math.max(Math.min(t,n),e)}function Ye(t,e,n,i,r){let s,o,a,c;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)Ge(t,r);else{let n=i?t[t.length-1]:t[0];for(s=0,o=t.length;s<o;++s)a=t[s],c=$e(n,a,t[Math.min(s+1,o-(i?0:1))%o],e.tension),a.cp1x=c.previous.x,a.cp1y=c.previous.y,a.cp2x=c.next.x,a.cp2y=c.next.y,n=a}e.capBezierPoints&&function(t,e){let n,i,r,s,o,a=ie(t[0],e);for(n=0,i=t.length;n<i;++n)o=s,s=a,a=n<i-1&&ie(t[n+1],e),s&&(r=t[n],o&&(r.cp1x=Je(r.cp1x,e.left,e.right),r.cp1y=Je(r.cp1y,e.top,e.bottom)),a&&(r.cp2x=Je(r.cp2x,e.left,e.right),r.cp2y=Je(r.cp2y,e.top,e.bottom)))}(t,n)}function Ke(){return"undefined"!=typeof window&&"undefined"!=typeof document}function qe(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Xe(t,e,n){let i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}const Qe=t=>window.getComputedStyle(t,null);const tn=["top","right","bottom","left"];function en(t,e,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const s=tn[r];i[s]=parseFloat(t[e+"-"+s+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function nn(t,e){const{canvas:n,currentDevicePixelRatio:i}=e,r=Qe(n),s="border-box"===r.boxSizing,o=en(r,"padding"),a=en(r,"border","width"),{x:c,y:l,box:h}=function(t,e){const n=t.native||t,i=n.touches,r=i&&i.length?i[0]:n,{offsetX:s,offsetY:o}=r;let a,c,l=!1;if(((t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot))(s,o,n.target))a=s,c=o;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,c=r.clientY-t.top,l=!0}return{x:a,y:c,box:l}}(t,n),u=o.left+(h&&a.left),d=o.top+(h&&a.top);let{width:p,height:f}=e;return s&&(p-=o.width+a.width,f-=o.height+a.height),{x:Math.round((c-u)/p*n.width/i),y:Math.round((l-d)/f*n.height/i)}}const rn=t=>Math.round(10*t)/10;function sn(t,e,n,i){const r=Qe(t),s=en(r,"margin"),o=Xe(r.maxWidth,t,"clientWidth")||z,a=Xe(r.maxHeight,t,"clientHeight")||z,c=function(t,e,n){let i,r;if(void 0===e||void 0===n){const s=qe(t);if(s){const t=s.getBoundingClientRect(),o=Qe(s),a=en(o,"border","width"),c=en(o,"padding");e=t.width-c.width-a.width,n=t.height-c.height-a.height,i=Xe(o.maxWidth,s,"clientWidth"),r=Xe(o.maxHeight,s,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||z,maxHeight:r||z}}(t,e,n);let{width:l,height:h}=c;if("content-box"===r.boxSizing){const t=en(r,"border","width"),e=en(r,"padding");l-=e.width+t.width,h-=e.height+t.height}return l=Math.max(0,l-s.width),h=Math.max(0,i?Math.floor(l/i):h-s.height),l=rn(Math.min(l,o,c.maxWidth)),h=rn(Math.min(h,a,c.maxHeight)),l&&!h&&(h=rn(l/2)),{width:l,height:h}}function on(t,e,n){const i=e||1,r=Math.floor(t.height*i),s=Math.floor(t.width*i);t.height=r/i,t.width=s/i;const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||o.height!==r||o.width!==s)&&(t.currentDevicePixelRatio=i,o.height=r,o.width=s,t.ctx.setTransform(i,0,0,i,0,0),!0)}const an=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function cn(t,e){const n=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function ln(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function hn(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function un(t,e,n,i){const r={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},o=ln(t,r,n),a=ln(r,s,n),c=ln(s,e,n),l=ln(o,a,n),h=ln(a,c,n);return ln(l,h,n)}const dn=new Map;function pn(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let i=dn.get(n);return i||(i=new Intl.NumberFormat(t,e),dn.set(n,i)),i}(e,n).format(t)}function fn(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function gn(t,e){let n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function mn(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function bn(t){return"angle"===t?{between:rt,compare:nt,normalize:it}:{between:at,compare:(t,e)=>t-e,normalize:t=>t}}function yn({start:t,end:e,count:n,loop:i,style:r}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0,style:r}}function vn(t,e,n){if(!n)return[t];const{property:i,start:r,end:s}=n,o=e.length,{compare:a,between:c,normalize:l}=bn(i),{start:h,end:u,loop:d,style:p}=function(t,e,n){const{property:i,start:r,end:s}=n,{between:o,normalize:a}=bn(i),c=e.length;let l,h,{start:u,end:d,loop:p}=t;if(p){for(u+=c,d+=c,l=0,h=c;l<h&&o(a(e[u%c][i]),r,s);++l)u--,d--;u%=c,d%=c}return d<u&&(d+=c),{start:u,end:d,loop:p,style:t.style}}(t,e,n),f=[];let g,m,b,y=!1,v=null;const x=()=>y||c(r,b,g)&&0!==a(r,b),_=()=>!y||0===a(s,g)||c(s,b,g);for(let t=h,n=h;t<=u;++t)m=e[t%o],m.skip||(g=l(m[i]),g!==b&&(y=c(g,r,s),null===v&&x()&&(v=0===a(g,r)?t:n),null!==v&&_()&&(f.push(yn({start:v,end:t,loop:d,count:o,style:p})),v=null),n=t,b=g));return null!==v&&f.push(yn({start:v,end:u,loop:d,count:o,style:p})),f}function xn(t,e){const n=[],i=t.segments;for(let r=0;r<i.length;r++){const s=vn(i[r],t.points,e);s.length&&n.push(...s)}return n}function kn(t,e){const n=t.points,i=t.options.spanGaps,r=n.length;if(!r)return[];const s=!!t._loop,{start:o,end:a}=function(t,e,n,i){let r=0,s=e-1;if(n&&!i)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,n&&(s+=r);s>r&&t[s%e].skip;)s--;return s%=e,{start:r,end:s}}(n,r,s,i);if(!0===i)return wn(t,[{start:o,end:a,loop:s}],n,e);return wn(t,function(t,e,n,i){const r=t.length,s=[];let o,a=e,c=t[e];for(o=e+1;o<=n;++o){const n=t[o%r];n.skip||n.stop?c.skip||(i=!1,s.push({start:e%r,end:(o-1)%r,loop:i}),e=a=n.stop?o:null):(a=o,c.skip&&(e=o)),c=n}return null!==a&&s.push({start:e%r,end:a%r,loop:i}),s}(n,o,a<o?a+r:a,!!t._fullLoop&&0===o&&a===r-1),n,e)}function wn(t,e,n,i){return i&&i.setContext&&n?function(t,e,n,i){const r=t._chart.getContext(),s=Sn(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,c=n.length,l=[];let h=s,u=e[0].start,d=u;function p(t,e,i,r){const s=a?-1:1;if(t!==e){for(t+=c;n[t%c].skip;)t-=s;for(;n[e%c].skip;)e+=s;t%c!=e%c&&(l.push({start:t%c,end:e%c,loop:i,style:r}),h=r,u=e%c)}}for(const t of e){u=a?u:t.start;let e,s=n[u%c];for(d=u+1;d<=t.end;d++){const a=n[d%c];e=Sn(i.setContext(_e(r,{type:"segment",p0:s,p1:a,p0DataIndex:(d-1)%c,p1DataIndex:d%c,datasetIndex:o}))),Cn(e,h)&&p(u,d-1,t.loop,h),s=a,h=e}u<d-1&&p(u,d-1,t.loop,h)}return l}(t,e,n,i):e}function Sn(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Cn(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}},5235:function(t,e){var n;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var s=typeof n;if("string"===s||"number"===s)t.push(n);else if(Array.isArray(n)){if(n.length){var o=r.apply(null,n);o&&t.push(o)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var a in n)i.call(n,a)&&n[a]&&t.push(a);else t.push(n.toString())}}return t.join(" ")}t.exports?(r.default=r,t.exports=r):void 0===(n=function(){return r}.apply(e,[]))||(t.exports=n)}()},6198:function(t,e,n){var i=n(1210),r=n(5006),s=n(7232),o=i.TypeError;t.exports=function(t){if(r(t))return t;throw o(s(t)+" is not a function")}},1938:function(t,e,n){var i=n(1210),r=n(5006),s=i.String,o=i.TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw o("Can't set "+s(t)+" as a prototype")}},8987:function(t,e,n){var i=n(8875),r=n(42),s=n(2016),o=i("unscopables"),a=Array.prototype;null==a[o]&&s.f(a,o,{configurable:!0,value:r(null)}),t.exports=function(t){a[o][t]=!0}},3794:function(t,e,n){var i=n(1210),r=n(2702),s=i.String,o=i.TypeError;t.exports=function(t){if(r(t))return t;throw o(s(t)+" is not an object")}},8845:function(t,e,n){var i=n(4929),r=n(645),s=n(5570),o=function(t){return function(e,n,o){var a,c=i(e),l=s(c),h=r(o,l);if(t&&n!=n){for(;l>h;)if((a=c[h++])!=a)return!0}else for(;l>h;h++)if((t||h in c)&&c[h]===n)return t||h||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},237:function(t,e,n){var i=n(3715),r=i({}.toString),s=i("".slice);t.exports=function(t){return s(r(t),8,-1)}},5996:function(t,e,n){var i=n(1210),r=n(5165),s=n(5006),o=n(237),a=n(8875)("toStringTag"),c=i.Object,l="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),a))?n:l?o(e):"Object"==(i=o(e))&&s(e.callee)?"Arguments":i}},7398:function(t,e,n){var i=n(3715),r=Error,s=i("".replace),o=String(r("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,c=a.test(o);t.exports=function(t,e){if(c&&"string"==typeof t&&!r.prepareStackTrace)for(;e--;)t=s(t,a,"");return t}},1184:function(t,e,n){var i=n(4242),r=n(3496),s=n(4225),o=n(2016);t.exports=function(t,e,n){for(var a=r(e),c=o.f,l=s.f,h=0;h<a.length;h++){var u=a[h];i(t,u)||n&&i(n,u)||c(t,u,l(e,u))}}},5506:function(t,e,n){var i=n(7778),r=n(2016),s=n(9487);t.exports=i?function(t,e,n){return r.f(t,e,s(1,n))}:function(t,e,n){return t[e]=n,t}},9487:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},1568:function(t,e,n){var i=n(1210),r=n(5006),s=n(5506),o=n(6717),a=n(3071);t.exports=function(t,e,n,c){var l=!!c&&!!c.unsafe,h=!!c&&!!c.enumerable,u=!!c&&!!c.noTargetGet,d=c&&void 0!==c.name?c.name:e;return r(n)&&o(n,d,c),t===i?(h?t[e]=n:a(e,n),t):(l?!u&&t[e]&&(h=!0):delete t[e],h?t[e]=n:s(t,e,n),t)}},7778:function(t,e,n){var i=n(4258);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4716:function(t,e,n){var i=n(1210),r=n(2702),s=i.document,o=r(s)&&r(s.createElement);t.exports=function(t){return o?s.createElement(t):{}}},1455:function(t,e,n){var i=n(2265);t.exports=i("navigator","userAgent")||""},6475:function(t,e,n){var i,r,s=n(1210),o=n(1455),a=s.process,c=s.Deno,l=a&&a.versions||c&&c.version,h=l&&l.v8;h&&(r=(i=h.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!r&&o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(r=+i[1]),t.exports=r},9864:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1500:function(t,e,n){var i=n(4258),r=n(9487);t.exports=!i((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",r(1,7)),7!==t.stack)}))},8657:function(t,e,n){var i=n(1210),r=n(4225).f,s=n(5506),o=n(1568),a=n(3071),c=n(1184),l=n(9656);t.exports=function(t,e){var n,h,u,d,p,f=t.target,g=t.global,m=t.stat;if(n=g?i:m?i[f]||a(f,{}):(i[f]||{}).prototype)for(h in e){if(d=e[h],u=t.noTargetGet?(p=r(n,h))&&p.value:n[h],!l(g?h:f+(m?".":"#")+h,t.forced)&&void 0!==u){if(typeof d==typeof u)continue;c(d,u)}(t.sham||u&&u.sham)&&s(d,"sham",!0),o(n,h,d,t)}}},4258:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},9115:function(t,e,n){var i=n(5200),r=Function.prototype,s=r.apply,o=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?o.bind(s):function(){return o.apply(s,arguments)})},5200:function(t,e,n){var i=n(4258);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},4264:function(t,e,n){var i=n(5200),r=Function.prototype.call;t.exports=i?r.bind(r):function(){return r.apply(r,arguments)}},232:function(t,e,n){var i=n(7778),r=n(4242),s=Function.prototype,o=i&&Object.getOwnPropertyDescriptor,a=r(s,"name"),c=a&&"something"===function(){}.name,l=a&&(!i||i&&o(s,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:l}},3715:function(t,e,n){var i=n(5200),r=Function.prototype,s=r.bind,o=r.call,a=i&&s.bind(o,o);t.exports=i?function(t){return t&&a(t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},2265:function(t,e,n){var i=n(1210),r=n(5006),s=function(t){return r(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?s(i[t]):i[t]&&i[t][e]}},9722:function(t,e,n){var i=n(6198);t.exports=function(t,e){var n=t[e];return null==n?void 0:i(n)}},1210:function(t){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof window&&window)||function(){return this}()||Function("return this")()},4242:function(t,e,n){var i=n(3715),r=n(2103),s=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return s(r(t),e)}},3953:function(t){t.exports={}},2872:function(t,e,n){var i=n(2265);t.exports=i("document","documentElement")},4165:function(t,e,n){var i=n(7778),r=n(4258),s=n(4716);t.exports=!i&&!r((function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},600:function(t,e,n){var i=n(1210),r=n(3715),s=n(4258),o=n(237),a=i.Object,c=r("".split);t.exports=s((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?c(t,""):a(t)}:a},8088:function(t,e,n){var i=n(5006),r=n(2702),s=n(2025);t.exports=function(t,e,n){var o,a;return s&&i(o=e.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&s(t,a),t}},3667:function(t,e,n){var i=n(3715),r=n(5006),s=n(4434),o=i(Function.toString);r(s.inspectSource)||(s.inspectSource=function(t){return o(t)}),t.exports=s.inspectSource},7793:function(t,e,n){var i=n(2702),r=n(5506);t.exports=function(t,e){i(e)&&"cause"in e&&r(t,"cause",e.cause)}},2406:function(t,e,n){var i,r,s,o=n(4564),a=n(1210),c=n(3715),l=n(2702),h=n(5506),u=n(4242),d=n(4434),p=n(9116),f=n(3953),g="Object already initialized",m=a.TypeError,b=a.WeakMap;if(o||d.state){var y=d.state||(d.state=new b),v=c(y.get),x=c(y.has),_=c(y.set);i=function(t,e){if(x(y,t))throw new m(g);return e.facade=t,_(y,t,e),e},r=function(t){return v(y,t)||{}},s=function(t){return x(y,t)}}else{var k=p("state");f[k]=!0,i=function(t,e){if(u(t,k))throw new m(g);return e.facade=t,h(t,k,e),e},r=function(t){return u(t,k)?t[k]:{}},s=function(t){return u(t,k)}}t.exports={set:i,get:r,has:s,enforce:function(t){return s(t)?r(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=r(e)).type!==t)throw m("Incompatible receiver, "+t+" required");return n}}}},5006:function(t){t.exports=function(t){return"function"==typeof t}},9656:function(t,e,n){var i=n(4258),r=n(5006),s=/#|\.prototype\./,o=function(t,e){var n=c[a(t)];return n==h||n!=l&&(r(e)?i(e):!!e)},a=o.normalize=function(t){return String(t).replace(s,".").toLowerCase()},c=o.data={},l=o.NATIVE="N",h=o.POLYFILL="P";t.exports=o},2702:function(t,e,n){var i=n(5006);t.exports=function(t){return"object"==typeof t?null!==t:i(t)}},4832:function(t){t.exports=!1},664:function(t,e,n){var i=n(1210),r=n(2265),s=n(5006),o=n(3387),a=n(8264),c=i.Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return s(e)&&o(e.prototype,c(t))}},5570:function(t,e,n){var i=n(8464);t.exports=function(t){return i(t.length)}},6717:function(t,e,n){var i=n(4258),r=n(5006),s=n(4242),o=n(2016).f,a=n(232).CONFIGURABLE,c=n(3667),l=n(2406),h=l.enforce,u=l.get,d=!i((function(){return 8!==o((function(){}),"length",{value:8}).length})),p=String(String).split("String"),f=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||a&&t.name!==e)&&o(t,"name",{value:e,configurable:!0}),d&&n&&s(n,"arity")&&t.length!==n.arity&&o(t,"length",{value:n.arity});var i=h(t);return s(i,"source")||(i.source=p.join("string"==typeof e?e:"")),t};Function.prototype.toString=f((function(){return r(this)&&u(this).source||c(this)}),"toString")},9868:function(t,e,n){var i=n(6475),r=n(4258);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},4564:function(t,e,n){var i=n(1210),r=n(5006),s=n(3667),o=i.WeakMap;t.exports=r(o)&&/native code/.test(s(o))},1377:function(t,e,n){var i=n(2910);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},42:function(t,e,n){var i,r=n(3794),s=n(3238),o=n(9864),a=n(3953),c=n(2872),l=n(4716),h=n(9116),u=h("IE_PROTO"),d=function(){},p=function(t){return"<script>"+t+"</"+"script>"},f=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}var t,e;g="undefined"!=typeof document?document.domain&&i?f(i):((e=l("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):f(i);for(var n=o.length;n--;)delete g.prototype[o[n]];return g()};a[u]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=r(t),n=new d,d.prototype=null,n[u]=t):n=g(),void 0===e?n:s.f(n,e)}},3238:function(t,e,n){var i=n(7778),r=n(2879),s=n(2016),o=n(3794),a=n(4929),c=n(5321);e.f=i&&!r?Object.defineProperties:function(t,e){o(t);for(var n,i=a(e),r=c(e),l=r.length,h=0;l>h;)s.f(t,n=r[h++],i[n]);return t}},2016:function(t,e,n){var i=n(1210),r=n(7778),s=n(4165),o=n(2879),a=n(3794),c=n(8901),l=i.TypeError,h=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",p="configurable",f="writable";e.f=r?o?function(t,e,n){if(a(t),e=c(e),a(n),"function"==typeof t&&"prototype"===e&&"value"in n&&f in n&&!n.writable){var i=u(t,e);i&&i.writable&&(t[e]=n.value,n={configurable:p in n?n.configurable:i.configurable,enumerable:d in n?n.enumerable:i.enumerable,writable:!1})}return h(t,e,n)}:h:function(t,e,n){if(a(t),e=c(e),a(n),s)try{return h(t,e,n)}catch(t){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},4225:function(t,e,n){var i=n(7778),r=n(4264),s=n(9532),o=n(9487),a=n(4929),c=n(8901),l=n(4242),h=n(4165),u=Object.getOwnPropertyDescriptor;e.f=i?u:function(t,e){if(t=a(t),e=c(e),h)try{return u(t,e)}catch(t){}if(l(t,e))return o(!r(s.f,t,e),t[e])}},6112:function(t,e,n){var i=n(6166),r=n(9864).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},5603:function(t,e){e.f=Object.getOwnPropertySymbols},3387:function(t,e,n){var i=n(3715);t.exports=i({}.isPrototypeOf)},6166:function(t,e,n){var i=n(3715),r=n(4242),s=n(4929),o=n(8845).indexOf,a=n(3953),c=i([].push);t.exports=function(t,e){var n,i=s(t),l=0,h=[];for(n in i)!r(a,n)&&r(i,n)&&c(h,n);for(;e.length>l;)r(i,n=e[l++])&&(~o(h,n)||c(h,n));return h}},5321:function(t,e,n){var i=n(6166),r=n(9864);t.exports=Object.keys||function(t){return i(t,r)}},9532:function(t,e){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);e.f=r?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},2025:function(t,e,n){var i=n(3715),r=n(3794),s=n(1938);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=i(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),s(i),e?t(n,i):n.__proto__=i,n}}():void 0)},896:function(t,e,n){var i=n(1210),r=n(4264),s=n(5006),o=n(2702),a=i.TypeError;t.exports=function(t,e){var n,i;if("string"===e&&s(n=t.toString)&&!o(i=r(n,t)))return i;if(s(n=t.valueOf)&&!o(i=r(n,t)))return i;if("string"!==e&&s(n=t.toString)&&!o(i=r(n,t)))return i;throw a("Can't convert object to primitive value")}},3496:function(t,e,n){var i=n(2265),r=n(3715),s=n(6112),o=n(5603),a=n(3794),c=r([].concat);t.exports=i("Reflect","ownKeys")||function(t){var e=s.f(a(t)),n=o.f;return n?c(e,n(t)):e}},9780:function(t,e,n){var i=n(2016).f;t.exports=function(t,e,n){n in t||i(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},5262:function(t,e,n){var i=n(1210).TypeError;t.exports=function(t){if(null==t)throw i("Can't call method on "+t);return t}},3071:function(t,e,n){var i=n(1210),r=Object.defineProperty;t.exports=function(t,e){try{r(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},9116:function(t,e,n){var i=n(1843),r=n(3705),s=i("keys");t.exports=function(t){return s[t]||(s[t]=r(t))}},4434:function(t,e,n){var i=n(1210),r=n(3071),s="__core-js_shared__",o=i[s]||r(s,{});t.exports=o},1843:function(t,e,n){var i=n(4832),r=n(4434);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.22.4",mode:i?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE",source:"https://github.com/zloirock/core-js"})},645:function(t,e,n){var i=n(8249),r=Math.max,s=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):s(n,e)}},4929:function(t,e,n){var i=n(600),r=n(5262);t.exports=function(t){return i(r(t))}},8249:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){var i=+t;return i!=i||0===i?0:(i>0?n:e)(i)}},8464:function(t,e,n){var i=n(8249),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},2103:function(t,e,n){var i=n(1210),r=n(5262),s=i.Object;t.exports=function(t){return s(r(t))}},357:function(t,e,n){var i=n(1210),r=n(4264),s=n(2702),o=n(664),a=n(9722),c=n(896),l=n(8875),h=i.TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!s(t)||o(t))return t;var n,i=a(t,u);if(i){if(void 0===e&&(e="default"),n=r(i,t,e),!s(n)||o(n))return n;throw h("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},8901:function(t,e,n){var i=n(357),r=n(664);t.exports=function(t){var e=i(t,"string");return r(e)?e:e+""}},5165:function(t,e,n){var i={};i[n(8875)("toStringTag")]="z",t.exports="[object z]"===String(i)},2910:function(t,e,n){var i=n(1210),r=n(5996),s=i.String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return s(t)}},7232:function(t,e,n){var i=n(1210).String;t.exports=function(t){try{return i(t)}catch(t){return"Object"}}},3705:function(t,e,n){var i=n(3715),r=0,s=Math.random(),o=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++r+s,36)}},8264:function(t,e,n){var i=n(9868);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},2879:function(t,e,n){var i=n(7778),r=n(4258);t.exports=i&&r((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8875:function(t,e,n){var i=n(1210),r=n(1843),s=n(4242),o=n(3705),a=n(9868),c=n(8264),l=r("wks"),h=i.Symbol,u=h&&h.for,d=c?h:h&&h.withoutSetter||o;t.exports=function(t){if(!s(l,t)||!a&&"string"!=typeof l[t]){var e="Symbol."+t;a&&s(h,t)?l[t]=h[t]:l[t]=c&&u?u(e):d(e)}return l[t]}},6266:function(t,e,n){"use strict";var i=n(2265),r=n(4242),s=n(5506),o=n(3387),a=n(2025),c=n(1184),l=n(9780),h=n(8088),u=n(1377),d=n(7793),p=n(7398),f=n(1500),g=n(7778),m=n(4832);t.exports=function(t,e,n,b){var y="stackTraceLimit",v=b?2:1,x=t.split("."),_=x[x.length-1],k=i.apply(null,x);if(k){var w=k.prototype;if(!m&&r(w,"cause")&&delete w.cause,!n)return k;var S=i("Error"),C=e((function(t,e){var n=u(b?e:t,void 0),i=b?new k(t):new k;return void 0!==n&&s(i,"message",n),f&&s(i,"stack",p(i.stack,2)),this&&o(w,this)&&h(i,this,C),arguments.length>v&&d(i,arguments[v]),i}));if(C.prototype=w,"Error"!==_?a?a(C,S):c(C,S,{name:!0}):g&&y in k&&(l(C,k,y),l(C,k,"prepareStackTrace")),c(C,k),!m)try{w.name!==_&&s(w,"name",_),w.constructor=C}catch(t){}return C}}},3679:function(t,e,n){"use strict";var i=n(8657),r=n(8845).includes,s=n(4258),o=n(8987);i({target:"Array",proto:!0,forced:s((function(){return!Array(1).includes()}))},{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},875:function(t,e,n){var i=n(8657),r=n(1210),s=n(9115),o=n(6266),a="WebAssembly",c=r.WebAssembly,l=7!==Error("e",{cause:7}).cause,h=function(t,e){var n={};n[t]=o(t,e,l),i({global:!0,arity:1,forced:l},n)},u=function(t,e){if(c&&c[t]){var n={};n[t]=o("WebAssembly."+t,e,l),i({target:a,stat:!0,arity:1,forced:l},n)}};h("Error",(function(t){return function(e){return s(t,this,arguments)}})),h("EvalError",(function(t){return function(e){return s(t,this,arguments)}})),h("RangeError",(function(t){return function(e){return s(t,this,arguments)}})),h("ReferenceError",(function(t){return function(e){return s(t,this,arguments)}})),h("SyntaxError",(function(t){return function(e){return s(t,this,arguments)}})),h("TypeError",(function(t){return function(e){return s(t,this,arguments)}})),h("URIError",(function(t){return function(e){return s(t,this,arguments)}})),u("CompileError",(function(t){return function(e){return s(t,this,arguments)}})),u("LinkError",(function(t){return function(e){return s(t,this,arguments)}})),u("RuntimeError",(function(t){return function(e){return s(t,this,arguments)}}))},951:function(t,e,n){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let i=0,r=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(i++,"%c"===t&&(r=i))})),e.splice(r,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(1741)(e);const{formatters:i}=t.exports;i.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},1741:function(t,e,n){t.exports=function(t){function e(t){let n,r,s,o=null;function a(...t){if(!a.enabled)return;const i=a,r=Number(new Date),s=r-(n||r);i.diff=s,i.prev=n,i.curr=r,n=r,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";o++;const s=e.formatters[r];if("function"==typeof s){const e=t[o];n=s.call(i,e),t.splice(o,1),o--}return n})),e.formatArgs.call(i,t);(i.log||e.log).apply(i,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=i,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(r!==e.namespaces&&(r=e.namespaces,s=e.enabled(t)),s),set:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function i(t,n){const i=e(this.namespace+(void 0===n?":":n)+t);return i.log=this.log,i}function r(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(r),...e.skips.map(r).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const i=("string"==typeof t?t:"").split(/[\s,]+/),r=i.length;for(n=0;n<r;n++)i[n]&&("-"===(t=i[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,i;for(n=0,i=e.skips.length;n<i;n++)if(e.skips[n].test(t))return!1;for(n=0,i=e.names.length;n<i;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(3171),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},4299:function(t,e,n){var i=n(9738)(n(9159),"DataView");t.exports=i},9504:function(t,e,n){var i=n(52),r=n(9224),s=n(5417),o=n(7488),a=n(3236);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}c.prototype.clear=i,c.prototype.delete=r,c.prototype.get=s,c.prototype.has=o,c.prototype.set=a,t.exports=c},3646:function(t,e,n){var i=n(2047),r=n(2348),s=n(5082),o=n(7671),a=n(4148);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}c.prototype.clear=i,c.prototype.delete=r,c.prototype.get=s,c.prototype.has=o,c.prototype.set=a,t.exports=c},7406:function(t,e,n){var i=n(9738)(n(9159),"Map");t.exports=i},4474:function(t,e,n){var i=n(1873),r=n(603),s=n(8339),o=n(5213),a=n(1052);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}c.prototype.clear=i,c.prototype.delete=r,c.prototype.get=s,c.prototype.has=o,c.prototype.set=a,t.exports=c},8911:function(t,e,n){var i=n(9738)(n(9159),"Promise");t.exports=i},4508:function(t,e,n){var i=n(9738)(n(9159),"Set");t.exports=i},8918:function(t,e,n){var i=n(3646),r=n(580),s=n(473),o=n(6991),a=n(388),c=n(6786);function l(t){var e=this.__data__=new i(t);this.size=e.size}l.prototype.clear=r,l.prototype.delete=s,l.prototype.get=o,l.prototype.has=a,l.prototype.set=c,t.exports=l},4924:function(t,e,n){var i=n(9159).Symbol;t.exports=i},9651:function(t,e,n){var i=n(9159).Uint8Array;t.exports=i},7769:function(t,e,n){var i=n(9738)(n(9159),"WeakMap");t.exports=i},2665:function(t){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},9270:function(t){t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t}},5922:function(t){t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,s=[];++n<i;){var o=t[n];e(o,n,t)&&(s[r++]=o)}return s}},8407:function(t,e,n){var i=n(2536),r=n(4968),s=n(6259),o=n(9410),a=n(2979),c=n(9960),l=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=s(t),h=!n&&r(t),u=!n&&!h&&o(t),d=!n&&!h&&!u&&c(t),p=n||h||u||d,f=p?i(t.length,String):[],g=f.length;for(var m in t)!e&&!l.call(t,m)||p&&("length"==m||u&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||f.push(m);return f}},4729:function(t){t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}},8615:function(t){t.exports=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}},80:function(t,e,n){var i=n(4316),r=n(31),s=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];s.call(t,e)&&r(o,n)&&(void 0!==n||e in t)||i(t,e,n)}},9702:function(t,e,n){var i=n(31);t.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return-1}},3724:function(t,e,n){var i=n(4222),r=n(6703);t.exports=function(t,e){return t&&i(e,r(e),t)}},8805:function(t,e,n){var i=n(4222),r=n(6067);t.exports=function(t,e){return t&&i(e,r(e),t)}},4316:function(t,e,n){var i=n(1153);t.exports=function(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},8871:function(t,e,n){var i=n(8918),r=n(9270),s=n(80),o=n(3724),a=n(8805),c=n(9162),l=n(3920),h=n(2378),u=n(2321),d=n(9852),p=n(2454),f=n(5947),g=n(8197),m=n(6041),b=n(9435),y=n(6259),v=n(9410),x=n(6579),_=n(731),k=n(4634),w=n(6703),S=n(6067),C="[object Arguments]",E="[object Function]",M="[object Object]",P={};P[C]=P["[object Array]"]=P["[object ArrayBuffer]"]=P["[object DataView]"]=P["[object Boolean]"]=P["[object Date]"]=P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Map]"]=P["[object Number]"]=P[M]=P["[object RegExp]"]=P["[object Set]"]=P["[object String]"]=P["[object Symbol]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P["[object Error]"]=P[E]=P["[object WeakMap]"]=!1,t.exports=function t(e,n,j,O,T,N){var A,D=1&n,R=2&n,I=4&n;if(j&&(A=T?j(e,O,T,N):j(e)),void 0!==A)return A;if(!_(e))return e;var L=y(e);if(L){if(A=g(e),!D)return l(e,A)}else{var z=f(e),F=z==E||"[object GeneratorFunction]"==z;if(v(e))return c(e,D);if(z==M||z==C||F&&!T){if(A=R||F?{}:b(e),!D)return R?u(e,a(A,e)):h(e,o(A,e))}else{if(!P[z])return T?e:{};A=m(e,z,D)}}N||(N=new i);var B=N.get(e);if(B)return B;N.set(e,A),k(e)?e.forEach((function(i){A.add(t(i,n,j,i,e,N))})):x(e)&&e.forEach((function(i,r){A.set(r,t(i,n,j,r,e,N))}));var V=L?void 0:(I?R?p:d:R?S:w)(e);return r(V||e,(function(i,r){V&&(i=e[r=i]),s(A,r,t(i,n,j,r,e,N))})),A}},6205:function(t,e,n){var i=n(731),r=Object.create,s=function(){function t(){}return function(e){if(!i(e))return{};if(r)return r(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=s},8248:function(t,e,n){var i=n(8615),r=n(8574);t.exports=function t(e,n,s,o,a){var c=-1,l=e.length;for(s||(s=r),a||(a=[]);++c<l;){var h=e[c];n>0&&s(h)?n>1?t(h,n-1,s,o,a):i(a,h):o||(a[a.length]=h)}return a}},3691:function(t,e,n){var i=n(608),r=n(5446);t.exports=function(t,e){for(var n=0,s=(e=i(e,t)).length;null!=t&&n<s;)t=t[r(e[n++])];return n&&n==s?t:void 0}},9223:function(t,e,n){var i=n(8615),r=n(6259);t.exports=function(t,e,n){var s=e(t);return r(t)?s:i(s,n(t))}},530:function(t,e,n){var i=n(4924),r=n(8792),s=n(8004),o=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?r(t):s(t)}},8017:function(t){t.exports=function(t,e){return null!=t&&e in Object(t)}},5189:function(t,e,n){var i=n(530),r=n(1642);t.exports=function(t){return r(t)&&"[object Arguments]"==i(t)}},1794:function(t,e,n){var i=n(5947),r=n(1642);t.exports=function(t){return r(t)&&"[object Map]"==i(t)}},9190:function(t,e,n){var i=n(5095),r=n(5164),s=n(731),o=n(3178),a=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,h=c.toString,u=l.hasOwnProperty,d=RegExp("^"+h.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||r(t))&&(i(t)?d:a).test(o(t))}},4145:function(t,e,n){var i=n(5947),r=n(1642);t.exports=function(t){return r(t)&&"[object Set]"==i(t)}},5783:function(t,e,n){var i=n(530),r=n(65),s=n(1642),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return s(t)&&r(t.length)&&!!o[i(t)]}},7798:function(t,e,n){var i=n(7238),r=n(3104),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return r(t);var e=[];for(var n in Object(t))s.call(t,n)&&"constructor"!=n&&e.push(n);return e}},6008:function(t,e,n){var i=n(731),r=n(7238),s=n(5722),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return s(t);var e=r(t),n=[];for(var a in t)("constructor"!=a||!e&&o.call(t,a))&&n.push(a);return n}},1802:function(t,e,n){var i=n(8213),r=n(5790);t.exports=function(t,e){return i(t,e,(function(e,n){return r(t,n)}))}},8213:function(t,e,n){var i=n(3691),r=n(7419),s=n(608);t.exports=function(t,e,n){for(var o=-1,a=e.length,c={};++o<a;){var l=e[o],h=i(t,l);n(h,l)&&r(c,s(l,t),h)}return c}},4113:function(t,e,n){var i=n(5885),r=n(1838),s=n(5490);t.exports=function(t,e){return s(r(t,e,i),t+"")}},7419:function(t,e,n){var i=n(80),r=n(608),s=n(2979),o=n(731),a=n(5446);t.exports=function(t,e,n,c){if(!o(t))return t;for(var l=-1,h=(e=r(e,t)).length,u=h-1,d=t;null!=d&&++l<h;){var p=a(e[l]),f=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return t;if(l!=u){var g=d[p];void 0===(f=c?c(g,p,d):void 0)&&(f=o(g)?g:s(e[l+1])?[]:{})}i(d,p,f),d=d[p]}return t}},2552:function(t,e,n){var i=n(6636),r=n(1153),s=n(5885),o=r?function(t,e){return r(t,"toString",{configurable:!0,enumerable:!1,value:i(e),writable:!0})}:s;t.exports=o},6658:function(t){t.exports=function(t,e,n){var i=-1,r=t.length;e<0&&(e=-e>r?0:r+e),(n=n>r?r:n)<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(r);++i<r;)s[i]=t[i+e];return s}},2536:function(t){t.exports=function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}},3042:function(t,e,n){var i=n(4924),r=n(4729),s=n(6259),o=n(6260),a=i?i.prototype:void 0,c=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(s(e))return r(e,t)+"";if(o(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n}},718:function(t){t.exports=function(t){return function(e){return t(e)}}},1086:function(t,e,n){var i=n(608),r=n(1892),s=n(4025),o=n(5446);t.exports=function(t,e){return e=i(e,t),null==(t=s(t,e))||delete t[o(r(e))]}},608:function(t,e,n){var i=n(6259),r=n(4703),s=n(9091),o=n(6700);t.exports=function(t,e){return i(t)?t:r(t,e)?[t]:s(o(t))}},2367:function(t,e,n){var i=n(9651);t.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}},9162:function(t,e,n){t=n.nmd(t);var i=n(9159),r=e&&!e.nodeType&&e,s=r&&t&&!t.nodeType&&t,o=s&&s.exports===r?i.Buffer:void 0,a=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,i=a?a(n):new t.constructor(n);return t.copy(i),i}},3868:function(t,e,n){var i=n(2367);t.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},6860:function(t){var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},5508:function(t,e,n){var i=n(4924),r=i?i.prototype:void 0,s=r?r.valueOf:void 0;t.exports=function(t){return s?Object(s.call(t)):{}}},7259:function(t,e,n){var i=n(2367);t.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},3920:function(t){t.exports=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}},4222:function(t,e,n){var i=n(80),r=n(4316);t.exports=function(t,e,n,s){var o=!n;n||(n={});for(var a=-1,c=e.length;++a<c;){var l=e[a],h=s?s(n[l],t[l],l,n,t):void 0;void 0===h&&(h=t[l]),o?r(n,l,h):i(n,l,h)}return n}},2378:function(t,e,n){var i=n(4222),r=n(2864);t.exports=function(t,e){return i(t,r(t),e)}},2321:function(t,e,n){var i=n(4222),r=n(2759);t.exports=function(t,e){return i(t,r(t),e)}},5126:function(t,e,n){var i=n(9159)["__core-js_shared__"];t.exports=i},7236:function(t,e,n){var i=n(4113),r=n(1550);t.exports=function(t){return i((function(e,n){var i=-1,s=n.length,o=s>1?n[s-1]:void 0,a=s>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(s--,o):void 0,a&&r(n[0],n[1],a)&&(o=s<3?void 0:o,s=1),e=Object(e);++i<s;){var c=n[i];c&&t(e,c,i,o)}return e}))}},4951:function(t,e,n){var i=n(8566);t.exports=function(t){return i(t)?void 0:t}},1153:function(t,e,n){var i=n(9738),r=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=r},61:function(t,e,n){var i=n(6263),r=n(1838),s=n(5490);t.exports=function(t){return s(r(t,void 0,i),t+"")}},6150:function(t){var e="object"==typeof window&&window&&window.Object===Object&&window;t.exports=e},9852:function(t,e,n){var i=n(9223),r=n(2864),s=n(6703);t.exports=function(t){return i(t,s,r)}},2454:function(t,e,n){var i=n(9223),r=n(2759),s=n(6067);t.exports=function(t){return i(t,s,r)}},8914:function(t,e,n){var i=n(999);t.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}},9738:function(t,e,n){var i=n(9190),r=n(6029);t.exports=function(t,e){var n=r(t,e);return i(n)?n:void 0}},7181:function(t,e,n){var i=n(6756)(Object.getPrototypeOf,Object);t.exports=i},8792:function(t,e,n){var i=n(4924),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,a=i?i.toStringTag:void 0;t.exports=function(t){var e=s.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(t){}var r=o.call(t);return i&&(e?t[a]=n:delete t[a]),r}},2864:function(t,e,n){var i=n(5922),r=n(3095),s=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(t){return null==t?[]:(t=Object(t),i(o(t),(function(e){return s.call(t,e)})))}:r;t.exports=a},2759:function(t,e,n){var i=n(8615),r=n(7181),s=n(2864),o=n(3095),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)i(e,s(t)),t=r(t);return e}:o;t.exports=a},5947:function(t,e,n){var i=n(4299),r=n(7406),s=n(8911),o=n(4508),a=n(7769),c=n(530),l=n(3178),h="[object Map]",u="[object Promise]",d="[object Set]",p="[object WeakMap]",f="[object DataView]",g=l(i),m=l(r),b=l(s),y=l(o),v=l(a),x=c;(i&&x(new i(new ArrayBuffer(1)))!=f||r&&x(new r)!=h||s&&x(s.resolve())!=u||o&&x(new o)!=d||a&&x(new a)!=p)&&(x=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,i=n?l(n):"";if(i)switch(i){case g:return f;case m:return h;case b:return u;case y:return d;case v:return p}return e}),t.exports=x},6029:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},6467:function(t,e,n){var i=n(608),r=n(4968),s=n(6259),o=n(2979),a=n(65),c=n(5446);t.exports=function(t,e,n){for(var l=-1,h=(e=i(e,t)).length,u=!1;++l<h;){var d=c(e[l]);if(!(u=null!=t&&n(t,d)))break;t=t[d]}return u||++l!=h?u:!!(h=null==t?0:t.length)&&a(h)&&o(d,h)&&(s(t)||r(t))}},52:function(t,e,n){var i=n(6772);t.exports=function(){this.__data__=i?i(null):{},this.size=0}},9224:function(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},5417:function(t,e,n){var i=n(6772),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(i){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(e,t)?e[t]:void 0}},7488:function(t,e,n){var i=n(6772),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:r.call(e,t)}},3236:function(t,e,n){var i=n(6772);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}},8197:function(t){var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,i=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(i.index=t.index,i.input=t.input),i}},6041:function(t,e,n){var i=n(2367),r=n(3868),s=n(6860),o=n(5508),a=n(7259);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return i(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return r(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(t,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return s(t);case"[object Symbol]":return o(t)}}},9435:function(t,e,n){var i=n(6205),r=n(7181),s=n(7238);t.exports=function(t){return"function"!=typeof t.constructor||s(t)?{}:i(r(t))}},8574:function(t,e,n){var i=n(4924),r=n(4968),s=n(6259),o=i?i.isConcatSpreadable:void 0;t.exports=function(t){return s(t)||r(t)||!!(o&&t&&t[o])}},2979:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var i=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&e.test(t))&&t>-1&&t%1==0&&t<n}},1550:function(t,e,n){var i=n(31),r=n(5847),s=n(2979),o=n(731);t.exports=function(t,e,n){if(!o(n))return!1;var a=typeof e;return!!("number"==a?r(n)&&s(e,n.length):"string"==a&&e in n)&&i(n[e],t)}},4703:function(t,e,n){var i=n(6259),r=n(6260),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(i(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!r(t))||(o.test(t)||!s.test(t)||null!=e&&t in Object(e))}},999:function(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5164:function(t,e,n){var i,r=n(5126),s=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";t.exports=function(t){return!!s&&s in t}},7238:function(t){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},2047:function(t){t.exports=function(){this.__data__=[],this.size=0}},2348:function(t,e,n){var i=n(9702),r=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=i(e,t);return!(n<0)&&(n==e.length-1?e.pop():r.call(e,n,1),--this.size,!0)}},5082:function(t,e,n){var i=n(9702);t.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}},7671:function(t,e,n){var i=n(9702);t.exports=function(t){return i(this.__data__,t)>-1}},4148:function(t,e,n){var i=n(9702);t.exports=function(t,e){var n=this.__data__,r=i(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}},1873:function(t,e,n){var i=n(9504),r=n(3646),s=n(7406);t.exports=function(){this.size=0,this.__data__={hash:new i,map:new(s||r),string:new i}}},603:function(t,e,n){var i=n(8914);t.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}},8339:function(t,e,n){var i=n(8914);t.exports=function(t){return i(this,t).get(t)}},5213:function(t,e,n){var i=n(8914);t.exports=function(t){return i(this,t).has(t)}},1052:function(t,e,n){var i=n(8914);t.exports=function(t,e){var n=i(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}},9370:function(t,e,n){var i=n(6650);t.exports=function(t){var e=i(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},6772:function(t,e,n){var i=n(9738)(Object,"create");t.exports=i},3104:function(t,e,n){var i=n(6756)(Object.keys,Object);t.exports=i},5722:function(t){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},3098:function(t,e,n){t=n.nmd(t);var i=n(6150),r=e&&!e.nodeType&&e,s=r&&t&&!t.nodeType&&t,o=s&&s.exports===r&&i.process,a=function(){try{var t=s&&s.require&&s.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a},8004:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},6756:function(t){t.exports=function(t,e){return function(n){return t(e(n))}}},1838:function(t,e,n){var i=n(2665),r=Math.max;t.exports=function(t,e,n){return e=r(void 0===e?t.length-1:e,0),function(){for(var s=arguments,o=-1,a=r(s.length-e,0),c=Array(a);++o<a;)c[o]=s[e+o];o=-1;for(var l=Array(e+1);++o<e;)l[o]=s[o];return l[e]=n(c),i(t,this,l)}}},4025:function(t,e,n){var i=n(3691),r=n(6658);t.exports=function(t,e){return e.length<2?t:i(t,r(e,0,-1))}},9159:function(t,e,n){var i=n(6150),r="object"==typeof self&&self&&self.Object===Object&&self,s=i||r||Function("return this")();t.exports=s},5490:function(t,e,n){var i=n(2552),r=n(121)(i);t.exports=r},121:function(t){var e=Date.now;t.exports=function(t){var n=0,i=0;return function(){var r=e(),s=16-(r-i);if(i=r,s>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},580:function(t,e,n){var i=n(3646);t.exports=function(){this.__data__=new i,this.size=0}},473:function(t){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},6991:function(t){t.exports=function(t){return this.__data__.get(t)}},388:function(t){t.exports=function(t){return this.__data__.has(t)}},6786:function(t,e,n){var i=n(3646),r=n(7406),s=n(4474);t.exports=function(t,e){var n=this.__data__;if(n instanceof i){var o=n.__data__;if(!r||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new s(o)}return n.set(t,e),this.size=n.size,this}},9091:function(t,e,n){var i=n(9370),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=i((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,(function(t,n,i,r){e.push(i?r.replace(s,"$1"):n||t)})),e}));t.exports=o},5446:function(t,e,n){var i=n(6260);t.exports=function(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}},3178:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},2515:function(t,e,n){var i=n(80),r=n(4222),s=n(7236),o=n(5847),a=n(7238),c=n(6703),l=Object.prototype.hasOwnProperty,h=s((function(t,e){if(a(e)||o(e))r(e,c(e),t);else for(var n in e)l.call(e,n)&&i(t,n,e[n])}));t.exports=h},6636:function(t){t.exports=function(t){return function(){return t}}},31:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},6263:function(t,e,n){var i=n(8248);t.exports=function(t){return(null==t?0:t.length)?i(t,1):[]}},5790:function(t,e,n){var i=n(8017),r=n(6467);t.exports=function(t,e){return null!=t&&r(t,e,i)}},5885:function(t){t.exports=function(t){return t}},4968:function(t,e,n){var i=n(5189),r=n(1642),s=Object.prototype,o=s.hasOwnProperty,a=s.propertyIsEnumerable,c=i(function(){return arguments}())?i:function(t){return r(t)&&o.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},6259:function(t){var e=Array.isArray;t.exports=e},5847:function(t,e,n){var i=n(5095),r=n(65);t.exports=function(t){return null!=t&&r(t.length)&&!i(t)}},9410:function(t,e,n){t=n.nmd(t);var i=n(9159),r=n(2773),s=e&&!e.nodeType&&e,o=s&&t&&!t.nodeType&&t,a=o&&o.exports===s?i.Buffer:void 0,c=(a?a.isBuffer:void 0)||r;t.exports=c},5095:function(t,e,n){var i=n(530),r=n(731);t.exports=function(t){if(!r(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},65:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},6579:function(t,e,n){var i=n(1794),r=n(718),s=n(3098),o=s&&s.isMap,a=o?r(o):i;t.exports=a},731:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},1642:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},8566:function(t,e,n){var i=n(530),r=n(7181),s=n(1642),o=Function.prototype,a=Object.prototype,c=o.toString,l=a.hasOwnProperty,h=c.call(Object);t.exports=function(t){if(!s(t)||"[object Object]"!=i(t))return!1;var e=r(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==h}},4634:function(t,e,n){var i=n(4145),r=n(718),s=n(3098),o=s&&s.isSet,a=o?r(o):i;t.exports=a},6260:function(t,e,n){var i=n(530),r=n(1642);t.exports=function(t){return"symbol"==typeof t||r(t)&&"[object Symbol]"==i(t)}},9960:function(t,e,n){var i=n(5783),r=n(718),s=n(3098),o=s&&s.isTypedArray,a=o?r(o):i;t.exports=a},6703:function(t,e,n){var i=n(8407),r=n(7798),s=n(5847);t.exports=function(t){return s(t)?i(t):r(t)}},6067:function(t,e,n){var i=n(8407),r=n(6008),s=n(5847);t.exports=function(t){return s(t)?i(t,!0):r(t)}},1892:function(t){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},6650:function(t,e,n){var i=n(4474);function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=t.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(r.Cache||i),n}r.Cache=i,t.exports=r},6697:function(t){t.exports=function(){}},8520:function(t,e,n){var i=n(4729),r=n(8871),s=n(1086),o=n(608),a=n(4222),c=n(4951),l=n(61),h=n(2454),u=l((function(t,e){var n={};if(null==t)return n;var l=!1;e=i(e,(function(e){return e=o(e,t),l||(l=e.length>1),e})),a(t,h(t),n),l&&(n=r(n,7,c));for(var u=e.length;u--;)s(n,e[u]);return n}));t.exports=u},1962:function(t,e,n){var i=n(1802),r=n(61)((function(t,e){return null==t?{}:i(t,e)}));t.exports=r},3095:function(t){t.exports=function(){return[]}},2773:function(t){t.exports=function(){return!1}},6700:function(t,e,n){var i=n(3042);t.exports=function(t){return null==t?"":i(t)}},5348:function(t,e,n){var i=n(6700),r=0;t.exports=function(t){var e=++r;return i(t)+e}},9710:function(){},1494:function(t,e){"use strict";e.Z={"admin-page":"sexr0jUxC1jVixdKiDnC",background:"vKQ11sLeAM45M04P1ccj"}},281:function(t,e){"use strict";e.Z={"section-hero":"vMa4i_Dza2t5Zi_Bw9Nf"}},5785:function(){},9054:function(){},3080:function(t,e){"use strict";e.Z={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",smCols:"4",mdCols:"8",lgCols:"12","col-sm-1":"RuVLl3q4lxTQa3wbhBJB","col-sm-1-start":"f9LZTRG4MMK42rS89afW","col-sm-1-end":"bHe_zKxjjpUwHw_MdYE1","col-sm-2":"QZbNrOqE2aNSn50xVhpU","col-sm-2-start":"ev7W3z7zVYPeHAlYqZjf","col-sm-2-end":"NJWd1m_e7lOiPYru2ZMP","col-sm-3":"Xc6nt1Qc1DI0Z2A3gt1r","col-sm-3-start":"UIcN_GXiPRoIsin8Kohg","col-sm-3-end":"GRKCyqb5LufCSCgykKFc","col-sm-4":"i_qTq8gqhhC3vIUepVRB","col-sm-4-start":"G3qaZ3Jpbvam_1XvGxgc","col-sm-4-end":"VRCNYKZtO9zukEwmgP1y","col-md-1":"tRm008K_WJL79WoNZTNL","col-md-1-start":"l5T2P_bgKts4tdaRkS1d","col-md-1-end":"zOCxfLZpF6BlgC7a_Yq1","col-md-2":"F80DdgVn0m5OpvtSQWka","col-md-2-start":"oI1c7JYfiJtMQHbhngtU","col-md-2-end":"pMQtA_4jh1_1lVknqEP5","col-md-3":"VenqMpdgyKQVUNNQcfqd","col-md-3-start":"seNYL99uoczf9V4MxBxT","col-md-3-end":"YKfF1HFhI9KygA5l3b2J","col-md-4":"yAi0Cv1xDWkoqsaUhvhR","col-md-4-start":"ubhnyZOnkgxNhh6XtVWv","col-md-4-end":"RGOPGQbWMJ9Ei5oFxS7X","col-md-5":"Sz1E2aWbX483ijdi6yge","col-md-5-start":"tku6_bRYrX9tMbgYGmIl","col-md-5-end":"b5JHttOhSEcI1WBlqAjk","col-md-6":"FboSx5MoKTAWbxXyYlCw","col-md-6-start":"Jhs8yEEmodG30edbJvag","col-md-6-end":"IpzbbKVqEqPcfIGkXkwt","col-md-7":"mhCPwfAZ4Kmm_empzJAq","col-md-7-start":"x034ilrJF7rO9UJB2rI1","col-md-7-end":"Wt8t2e16viRrOJ1lLA5v","col-md-8":"S6pIrEy9AMLKx9bgh_Ae","col-md-8-start":"kEfI4tGyuWfHTlRnvIab","col-md-8-end":"PUzX4RRsKq1dnsz3gebS","col-lg-1":"X_pdcLJikd8LS_YAdJlB","col-lg-1-start":"tl936d14Huby4khYp05X","col-lg-1-end":"hnge0LnR69d3NXEtEE1t","col-lg-2":"fj0NUMuyZQcPNgKcjp5Z","col-lg-2-start":"R2ncBX7a2NigdYCcV1OX","col-lg-2-end":"t8vMSDVYno9k9itRwnXb","col-lg-3":"wsDuEN2GqHx6qzo8dUdk","col-lg-3-start":"cIEVPUweWtLBy3xaXnMx","col-lg-3-end":"fajUWBwu1m2B479j3jmz","col-lg-4":"YR0c7fQTgMkDdWzwSyLp","col-lg-4-start":"xlwp8BmplxkKNMI7gamo","col-lg-4-end":"_C4O1w9DUqx1m3gPf8aA","col-lg-5":"Z54F1hAErckAIrKlxnXW","col-lg-5-start":"ezSDWkRHmKSxDJXxuiOH","col-lg-5-end":"T0ChoeAjGJjkkNrYhD4g","col-lg-6":"qtMoMPF6yHvGJnWHSsde","col-lg-6-start":"gdoywN5VPiWERfIBqkph","col-lg-6-end":"wUev_VH5uf_pwFFlbnAU","col-lg-7":"egIPDFJsOpownTClq9XP","col-lg-7-start":"yGhp9yoAW7k0kQik9AB7","col-lg-7-end":"SJ43U9mR5wUg5V2qBeQA","col-lg-8":"cTuyHfMwSUJxN_HdIEgd","col-lg-8-start":"smCr8DaIagcumdvdldiK","col-lg-8-end":"T03NHzQJvzwL6wAfIiTL","col-lg-9":"pMvxM3RJGjqyNdf9qg1Y","col-lg-9-start":"iIVpNRwEnQ_JI5gpp9EN","col-lg-9-end":"ZbQ4u4vGSX5rJOje4uGL","col-lg-10":"gKb5wuIDAlKGbrjK2vxy","col-lg-10-start":"Z7pINdImE2WJiYnZBTqm","col-lg-10-end":"ZTxp6qpvwurMdOnLLSz1","col-lg-11":"NnQTlbfnxPDR6cQ7rygg","col-lg-11-start":"O137wZd6Yl0olSA9PsXR","col-lg-11-end":"zf2OJtQ2MPz6SDoh6CB0","col-lg-12":"U3H6UHW6HqRt9hdzVg3O","col-lg-12-start":"zynnNeS_ZBTxABcVpUQH","col-lg-12-end":"vI8tltFZtFUNAy9Iag9s"}},8730:function(t,e){"use strict";e.Z={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",container:"SqdhUZkXCRuIpErj1B3z",fluid:"OZC_9a1LhpWF9dv15Gdh"}},9478:function(){},1683:function(){},9610:function(){},2917:function(){},3171:function(t){var e=1e3,n=60*e,i=60*n,r=24*i,s=7*r,o=365.25*r;function a(t,e,n,i){var r=e>=1.5*n;return Math.round(t/n)+" "+i+(r?"s":"")}t.exports=function(t,c){c=c||{};var l=typeof t;if("string"===l&&t.length>0)return function(t){if((t=String(t)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*s;case"days":case"day":case"d":return c*r;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(t);if("number"===l&&isFinite(t))return c.long?function(t){var s=Math.abs(t);if(s>=r)return a(t,s,r,"day");if(s>=i)return a(t,s,i,"hour");if(s>=n)return a(t,s,n,"minute");if(s>=e)return a(t,s,e,"second");return t+" ms"}(t):function(t){var s=Math.abs(t);if(s>=r)return Math.round(t/r)+"d";if(s>=i)return Math.round(t/i)+"h";if(s>=n)return Math.round(t/n)+"m";if(s>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},7556:function(t,e,n){"use strict";var i=n(3713);function r(){}function s(){}s.resetWarningCache=r,t.exports=function(){function t(t,e,n,r,s,o){if(o!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:s,resetWarningCache:r};return n.PropTypes=n,n}},5844:function(t,e,n){t.exports=n(7556)()},3713:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},469:function(t,e,n){"use strict";var i=n(758);function r(){}function s(){}s.resetWarningCache=r,t.exports=function(){function t(t,e,n,r,s,o){if(o!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:s,resetWarningCache:r};return n.PropTypes=n,n}},5162:function(t,e,n){t.exports=n(469)()},758:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6975:function(t,e,n){"use strict";var i=n(951),r=n.n(i),s=n(2819);const o=r()("dops:analytics");let a,c;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const l={initialize:function(t,e,n){l.setUser(t,e),l.setSuperProps(n),l.identifyUser()},setGoogleAnalyticsEnabled:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=t,this.googleAnalyticsKey=e},setMcAnalyticsEnabled:function(t){this.mcAnalyticsEnabled=t},setUser:function(t,e){c={ID:t,username:e}},setSuperProps:function(t){a=t},assignSuperProps:function(t){a=(0,s.assign)(a,t)},mc:{bumpStat:function(t,e){const n=function(t,e){let n="";if("object"==typeof t){for(const e in t)n+="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]);o("Bumping stats %o",t)}else n="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e),o('Bumping stat "%s" in group "%s"',e,t);return n}(t,e);l.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(t,e){const n=function(t,e){let n="";if("object"==typeof t){for(const e in t)n+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]);o("Built stats %o",t)}else n="&"+encodeURIComponent(t)+"="+encodeURIComponent(e),o('Built stat "%s" in group "%s"',e,t);return n}(t,e);l.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(t,e){l.tracks.recordPageView(t),l.ga.recordPageView(t,e)}},purchase:{record:function(t,e,n,i,r,s,o){l.ga.recordPurchase(t,e,n,i,r,s,o)}},tracks:{recordEvent:function(t,e){e=e||{},0===t.indexOf("akismet_")||0===t.indexOf("jetpack_")?(a&&(o("- Super Props: %o",a),e=(0,s.assign)(e,a)),o('Record event "%s" called with props %s',t,JSON.stringify(e)),window._tkq.push(["recordEvent",t,e])):o('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(t){const e="object"==typeof t?t:{target:t};l.tracks.recordEvent("jetpack_wpa_click",e)},recordPageView:function(t){l.tracks.recordEvent("akismet_page_view",{path:t})},setOptOut:function(t){o("Pushing setOptOut: %o",t),window._tkq.push(["setOptOut",t])}},ga:{initialized:!1,initialize:function(){let t={};l.ga.initialized||(c&&(t={userId:"u-"+c.ID}),window.ga("create",this.googleAnalyticsKey,"auto",t),l.ga.initialized=!0)},recordPageView:function(t,e){l.ga.initialize(),o("Recording Page View ~ [URL: "+t+"] [Title: "+e+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",t),window.ga("send",{hitType:"pageview",page:t,title:e}))},recordEvent:function(t,e,n,i){l.ga.initialize();let r="Recording Event ~ [Category: "+t+"] [Action: "+e+"]";void 0!==n&&(r+=" [Option Label: "+n+"]"),void 0!==i&&(r+=" [Option Value: "+i+"]"),o(r),this.googleAnalyticsEnabled&&window.ga("send","event",t,e,n,i)},recordPurchase:function(t,e,n,i,r,s,o){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:t,revenue:i,currency:o}),window.ga("ecommerce:addItem",{id:t,name:e,sku:n,price:r,quantity:s}),window.ga("ecommerce:send")}},identifyUser:function(){c&&window._tkq.push(["identifyUser",c.ID,c.username])},setProperties:function(t){window._tkq.push(["setProperties",t])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};e.Z=l},4743:function(t,e,n){"use strict";n(875);var i=n(2819),r=n(6483),s=n(1132);function o(t){class e extends Error{constructor(){super(...arguments),this.name=t}}return e}const a=o("JsonParseError"),c=o("JsonParseAfterRedirectError"),l=o("Api404Error"),h=o("Api404AfterRedirectError"),u=o("FetchNetworkError");const d=new function(t,e){let n=t,o={"X-WP-Nonce":e},a={credentials:"same-origin",headers:o},c={method:"post",credentials:"same-origin",headers:(0,i.assign)({},o,{"Content-type":"application/json"})},l=function(t){const e=t.split("?"),n=e.length>1?e[1]:"",i=n.length?n.split("&"):[];return i.push("_cacheBuster="+(new Date).getTime()),e[0]+"?"+i.join("&")};const h={setApiRoot(t){n=t},setApiNonce(t){o={"X-WP-Nonce":t},a={credentials:"same-origin",headers:o},c={method:"post",credentials:"same-origin",headers:(0,i.assign)({},o,{"Content-type":"application/json"})}},setCacheBusterCallback:t=>{l=t},registerSite:(t,e)=>{const i={registration_nonce:t,no_iframe:!0};return(0,s.jetpackConfigHas)("consumer_slug")&&(i.plugin_slug=(0,s.jetpackConfigGet)("consumer_slug")),null!==e&&(i.redirect_uri=e),d(`${n}jetpack/v4/connection/register`,c,{body:JSON.stringify(i)}).then(p).then(f)},fetchAuthorizationUrl:t=>u((0,r.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:t}),a).then(p).then(f),fetchSiteConnectionData:()=>u(`${n}jetpack/v4/connection/data`,a).then(f),fetchSiteConnectionStatus:()=>u(`${n}jetpack/v4/connection`,a).then(f),fetchSiteConnectionTest:()=>u(`${n}jetpack/v4/connection/test`,a).then(p).then(f),fetchUserConnectionData:()=>u(`${n}jetpack/v4/connection/data`,a).then(f),fetchUserTrackingSettings:()=>u(`${n}jetpack/v4/tracking/settings`,a).then(p).then(f),updateUserTrackingSettings:t=>d(`${n}jetpack/v4/tracking/settings`,c,{body:JSON.stringify(t)}).then(p).then(f),disconnectSite:()=>d(`${n}jetpack/v4/connection`,c,{body:JSON.stringify({isActive:!1})}).then(p).then(f),fetchConnectUrl:()=>u(`${n}jetpack/v4/connection/url`,a).then(p).then(f),unlinkUser:()=>d(`${n}jetpack/v4/connection/user`,c,{body:JSON.stringify({linked:!1})}).then(p).then(f),reconnect:()=>d(`${n}jetpack/v4/connection/reconnect`,c).then(p).then(f),fetchConnectedPlugins:()=>u(`${n}jetpack/v4/connection/plugins`,a).then(p).then(f),setHasSeenWCConnectionModal:()=>d(`${n}jetpack/v4/seen-wc-connection-modal`,c).then(p).then(f),fetchModules:()=>u(`${n}jetpack/v4/module/all`,a).then(p).then(f),fetchModule:t=>u(`${n}jetpack/v4/module/${t}`,a).then(p).then(f),activateModule:t=>d(`${n}jetpack/v4/module/${t}/active`,c,{body:JSON.stringify({active:!0})}).then(p).then(f),deactivateModule:t=>d(`${n}jetpack/v4/module/${t}/active`,c,{body:JSON.stringify({active:!1})}),updateModuleOptions:(t,e)=>d(`${n}jetpack/v4/module/${t}`,c,{body:JSON.stringify(e)}).then(p).then(f),updateSettings:t=>d(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(t)}).then(p).then(f),getProtectCount:()=>u(`${n}jetpack/v4/module/protect/data`,a).then(p).then(f),resetOptions:t=>d(`${n}jetpack/v4/options/${t}`,c,{body:JSON.stringify({reset:!0})}).then(p).then(f),activateVaultPress:()=>d(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(p).then(f),getVaultPressData:()=>u(`${n}jetpack/v4/module/vaultpress/data`,a).then(p).then(f),installPlugin:(t,e)=>{const i={slug:t,status:"active"};return e&&(i.source=e),d(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify(i)}).then(p).then(f)},activateAkismet:()=>d(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(p).then(f),getAkismetData:()=>u(`${n}jetpack/v4/module/akismet/data`,a).then(p).then(f),checkAkismetKey:()=>u(`${n}jetpack/v4/module/akismet/key/check`,a).then(p).then(f),checkAkismetKeyTyped:t=>d(`${n}jetpack/v4/module/akismet/key/check`,c,{body:JSON.stringify({api_key:t})}).then(p).then(f),fetchStatsData:t=>u(function(t){let e=`${n}jetpack/v4/module/stats/data`;-1!==e.indexOf("?")?e+=`&range=${encodeURIComponent(t)}`:e+=`?range=${encodeURIComponent(t)}`;return e}(t),a).then(p).then(f).then(g),getPluginUpdates:()=>u(`${n}jetpack/v4/updates/plugins`,a).then(p).then(f),getPlans:()=>u(`${n}jetpack/v4/plans`,a).then(p).then(f),fetchSettings:()=>u(`${n}jetpack/v4/settings`,a).then(p).then(f),updateSetting:t=>d(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(t)}).then(p).then(f),fetchSiteData:()=>u(`${n}jetpack/v4/site`,a).then(p).then(f).then((t=>JSON.parse(t.data))),fetchSiteFeatures:()=>u(`${n}jetpack/v4/site/features`,a).then(p).then(f).then((t=>JSON.parse(t.data))),fetchSiteProducts:()=>u(`${n}jetpack/v4/site/products`,a).then(p).then(f),fetchSitePurchases:()=>u(`${n}jetpack/v4/site/purchases`,a).then(p).then(f).then((t=>JSON.parse(t.data))),fetchSiteBenefits:()=>u(`${n}jetpack/v4/site/benefits`,a).then(p).then(f).then((t=>JSON.parse(t.data))),fetchSiteDiscount:()=>u(`${n}jetpack/v4/site/discount`,a).then(p).then(f).then((t=>t.data)),fetchSetupQuestionnaire:()=>u(`${n}jetpack/v4/setup/questionnaire`,a).then(p).then(f),fetchRecommendationsData:()=>u(`${n}jetpack/v4/recommendations/data`,a).then(p).then(f),fetchRecommendationsProductSuggestions:()=>u(`${n}jetpack/v4/recommendations/product-suggestions`,a).then(p).then(f),fetchRecommendationsUpsell:()=>u(`${n}jetpack/v4/recommendations/upsell`,a).then(p).then(f),fetchRecommendationsConditional:()=>u(`${n}jetpack/v4/recommendations/conditional`,a).then(p).then(f),saveRecommendationsData:t=>d(`${n}jetpack/v4/recommendations/data`,c,{body:JSON.stringify({data:t})}).then(p),fetchProducts:()=>u(`${n}jetpack/v4/products`,a).then(p).then(f),fetchRewindStatus:()=>u(`${n}jetpack/v4/rewind`,a).then(p).then(f).then((t=>JSON.parse(t.data))),fetchScanStatus:()=>u(`${n}jetpack/v4/scan`,a).then(p).then(f).then((t=>JSON.parse(t.data))),dismissJetpackNotice:t=>d(`${n}jetpack/v4/notice/${t}`,c,{body:JSON.stringify({dismissed:!0})}).then(p).then(f),fetchPluginsData:()=>u(`${n}jetpack/v4/plugins`,a).then(p).then(f),fetchIntroOffers:()=>u(`${n}jetpack/v4/intro-offers`,a).then(p).then(f),fetchVerifySiteGoogleStatus:t=>u(null!==t?`${n}jetpack/v4/verify-site/google/${t}`:`${n}jetpack/v4/verify-site/google`,a).then(p).then(f),verifySiteGoogle:t=>d(`${n}jetpack/v4/verify-site/google`,c,{body:JSON.stringify({keyring_id:t})}).then(p).then(f),sendMobileLoginEmail:()=>d(`${n}jetpack/v4/mobile/send-login-email`,c).then(p).then(f),submitSurvey:t=>d(`${n}jetpack/v4/marketing/survey`,c,{body:JSON.stringify(t)}).then(p).then(f),saveSetupQuestionnaire:t=>d(`${n}jetpack/v4/setup/questionnaire`,c,{body:JSON.stringify(t)}).then(p).then(f),updateLicensingError:t=>d(`${n}jetpack/v4/licensing/error`,c,{body:JSON.stringify(t)}).then(p).then(f),updateLicenseKey:t=>d(`${n}jetpack/v4/licensing/set-license`,c,{body:JSON.stringify({license:t})}).then(p).then(f),getUserLicensesCounts:()=>u(`${n}jetpack/v4/licensing/user/counts`,a).then(p).then(f),getUserLicenses:()=>u(`${n}jetpack/v4/licensing/user/licenses`,a).then(p).then(f),updateLicensingActivationNoticeDismiss:t=>d(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,c,{body:JSON.stringify({last_detached_count:t})}).then(p).then(f),updateRecommendationsStep:t=>d(`${n}jetpack/v4/recommendations/step`,c,{body:JSON.stringify({step:t})}).then(p),confirmIDCSafeMode:()=>d(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,c).then(p),startIDCFresh:t=>d(`${n}jetpack/v4/identity-crisis/start-fresh`,c,{body:JSON.stringify({redirect_uri:t})}).then(p).then(f),migrateIDC:()=>d(`${n}jetpack/v4/identity-crisis/migrate`,c).then(p),attachLicenses:t=>d(`${n}jetpack/v4/licensing/attach-licenses`,c,{body:JSON.stringify({licenses:t})}).then(p).then(f),fetchSearchPlanInfo:()=>u(`${n}jetpack/v4/search/plan`,a).then(p).then(f),fetchSearchSettings:()=>u(`${n}jetpack/v4/search/settings`,a).then(p).then(f),updateSearchSettings:t=>d(`${n}jetpack/v4/search/settings`,c,{body:JSON.stringify(t)}).then(p).then(f),fetchSearchStats:()=>u(`${n}jetpack/v4/search/stats`,a).then(p).then(f),fetchWafSettings:()=>u(`${n}jetpack/v4/waf`,a).then(p).then(f),fetchWordAdsSettings:()=>u(`${n}jetpack/v4/wordads/settings`,a).then(p).then(f),updateWordAdsSettings:t=>d(`${n}jetpack/v4/wordads/settings`,c,{body:JSON.stringify(t)}),fetchSearchPricing:()=>u(`${n}jetpack/v4/search/pricing`,a).then(p).then(f)};function u(t,e){return fetch(l(t),e)}function d(t,e,n){return fetch(t,(0,i.assign)({},e,n)).catch(m)}function g(t){return t.general&&void 0===t.general.response||t.week&&void 0===t.week.response||t.month&&void 0===t.month.response?t:{}}(0,i.assign)(this,h)};function p(t){return t.status>=200&&t.status<300?t:404===t.status?new Promise((()=>{throw t.redirected?new h(t.redirected):new l})):t.json().catch((t=>g(t))).then((e=>{const n=new Error(`${e.message} (Status ${t.status})`);throw n.response=e,n.name="ApiError",n}))}function f(t){return t.json().catch((e=>g(e,t.redirected,t.url)))}function g(t,e,n){throw e?new c(n):new a}function m(){throw new u}e.ZP=d},7121:function(t,e,n){"use strict";var i=n(9196),r=n.n(i),s=n(5736),o=n(5609),a=n(5162),c=n.n(a);n(9710);const __=s.__,l=t=>{const{label:e,onClick:n,isLoading:i,displayError:s,errorMessage:a}=t;return r().createElement("div",{className:"jp-action-button"},r().createElement(o.Button,{className:"jp-action-button--button",label:e,onClick:n,variant:"primary",disabled:i},i?r().createElement(o.Spinner,null):e),s&&r().createElement("p",{className:"jp-action-button__error"},a))};l.propTypes={label:c().string.isRequired,onClick:c().func,isLoading:c().bool,displayError:c().bool,errorMessage:c().string},l.defaultProps={isLoading:!1,displayError:!1,errorMessage:__("An error occurred. Please try again.","jetpack-search-pkg")},e.Z=l},1163:function(t,e,n){"use strict";var i=n(9196),r=n.n(i),s=n(5736),o=n(5162),a=n.n(o),c=n(5235),l=n.n(c),h=n(1494),u=n(2392),d=n(1202),p=n(8218),f=n(2939);const __=s.__,g=t=>{const{children:e,moduleName:n,moduleNameHref:i,a8cLogoHref:s,showHeader:o,showFooter:a,showBackground:c,header:g}=t,m=l()(h.Z["admin-page"],{[h.Z.background]:c});return r().createElement("div",{className:m},o&&r().createElement(p.Z,{horizontalSpacing:5},r().createElement(f.Z,null,g||r().createElement(d.Z,null))),r().createElement(p.Z,{fluid:!0,horizontalSpacing:0},r().createElement(f.Z,null,e)),a&&r().createElement(p.Z,{horizontalSpacing:5},r().createElement(f.Z,null,r().createElement(u.Z,{moduleName:n,a8cLogoHref:s,moduleNameHref:i}))))};g.defaultProps={moduleName:__("Jetpack","jetpack-search-pkg"),showHeader:!0,header:null,showFooter:!0,showBackground:!0},g.propTypes={a8cLogoHref:a().string,moduleName:a().string,showHeader:a().bool,header:a().node,showFooter:a().bool,moduleNameHref:a().string,showBackground:a().bool},e.Z=g},3244:function(t,e,n){"use strict";var i=n(9196),r=n.n(i),s=n(281);e.Z=t=>{const{children:e}=t;return r().createElement("div",{className:s.Z["section-hero"]},e)}},207:function(t,e,n){"use strict";var i=n(2402),r=n.n(i),s=n(9196),o=n.n(s),a=n(5235),c=n.n(a),l=n(5736),h=n(5162),u=n.n(h);const __=l.__,d=t=>{const{title:e,height:n,className:i,...s}=t;return o().createElement("svg",r()({role:"img",x:"0",y:"0",viewBox:"0 0 935 38.2",enableBackground:"new 0 0 935 38.2","aria-labelledby":"jp-automattic-byline-logo-title",height:n,className:c()("jp-automattic-byline-logo",i)},s),o().createElement("title",{id:"jp-automattic-byline-logo-title"},e),o().createElement("path",{d:"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"}),o().createElement("path",{d:"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z"}),o().createElement("path",{d:"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7zM886.2 37l-23.4-24.1 -2.3-2.5V37h-6.8V1h6.5l22.7 24.1 2.3 2.6V1h6.8v36H886.2zM902.3 37V1H935v5.6h-26v9.2h20v5.5h-20v10.1h26V37H902.3z"}))};d.defaultProps={title:__("An Automattic Airline","jetpack-search-pkg"),height:7,className:""},d.propTypes={title:u().string,height:u().number,className:u().string},e.Z=d},900:function(t,e,n){"use strict";var i=n(8294),r=n.n(i),s=n(9196),o=n.n(s),a=n(5736);n(5785);const __=a.__;class c extends s.Component{needsOffset(t,e){return["gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-info","gridicons-info-outline","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(t)>=0&&e%18==0}getSVGTitle(t){if("title"in this.props)return this.props.title?o().createElement("title",null,this.props.title):null;switch(t){default:return null;case"gridicons-audio":return o().createElement("title",null,__("Has audio.","jetpack-search-pkg"));case"gridicons-calendar":return o().createElement("title",null,__("Is an event.","jetpack-search-pkg"));case"gridicons-cart":return o().createElement("title",null,__("Is a product.","jetpack-search-pkg"));case"chevron-down":return o().createElement("title",null,__("Show filters","jetpack-search-pkg"));case"gridicons-comment":return o().createElement("title",null,__("Matching comment.","jetpack-search-pkg"));case"gridicons-cross":return o().createElement("title",null,__("Close.","jetpack-search-pkg"));case"gridicons-filter":return o().createElement("title",null,__("Toggle search filters.","jetpack-search-pkg"));case"gridicons-folder":return o().createElement("title",null,__("Category","jetpack-search-pkg"));case"gridicons-info":case"gridicons-info-outline":return o().createElement("title",null,__("Information.","jetpack-search-pkg"));case"gridicons-image-multiple":return o().createElement("title",null,__("Has multiple images.","jetpack-search-pkg"));case"gridicons-image":return o().createElement("title",null,__("Has an image.","jetpack-search-pkg"));case"gridicons-page":return o().createElement("title",null,__("Page","jetpack-search-pkg"));case"gridicons-post":return o().createElement("title",null,__("Post","jetpack-search-pkg"));case"gridicons-jetpack-search":case"gridicons-search":return o().createElement("title",null,__("Magnifying Glass","jetpack-search-pkg"));case"gridicons-tag":return o().createElement("title",null,__("Tag","jetpack-search-pkg"));case"gridicons-video":return o().createElement("title",null,__("Has a video.","jetpack-search-pkg"))}}renderIcon(t){switch(t){default:return null;case"gridicons-audio":return o().createElement("g",null,o().createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"}));case"gridicons-block":return o().createElement("g",null,o().createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"}));case"gridicons-calendar":return o().createElement("g",null,o().createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"}));case"gridicons-cart":return o().createElement("g",null,o().createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"}));case"gridicons-checkmark":return o().createElement("g",null,o().createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"}));case"gridicons-chevron-down":return o().createElement("g",null,o().createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"}));case"gridicons-comment":return o().createElement("g",null,o().createElement("path",{d:"M3 6v9c0 1.105.895 2 2 2h9v5l5.325-3.804c1.05-.75 1.675-1.963 1.675-3.254V6c0-1.105-.895-2-2-2H5c-1.105 0-2 .895-2 2z"}));case"gridicons-cross":return o().createElement("g",null,o().createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"}));case"gridicons-filter":return o().createElement("g",null,o().createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"}));case"gridicons-folder":return o().createElement("g",null,o().createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"}));case"gridicons-image":return o().createElement("g",null,o().createElement("path",{d:"M13 9.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5zM22 6v12c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2zm-2 0H4v7.444L8 9l5.895 6.55 1.587-1.85c.798-.932 2.24-.932 3.037 0L20 15.426V6z"}));case"gridicons-image-multiple":return o().createElement("g",null,o().createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"}));case"gridicons-info":return o().createElement("g",null,o().createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}));case"gridicons-info-outline":return o().createElement("g",null,o().createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"}));case"gridicons-jetpack-search":return o().createElement("g",null,o().createElement("path",{d:"M0 9.257C0 4.15 4.151 0 9.257 0c5.105 0 9.256 4.151 9.256 9.257a9.218 9.218 0 01-2.251 6.045l.034.033h1.053L24 22.01l-1.986 1.989-6.664-6.662v-1.055l-.033-.033a9.218 9.218 0 01-6.06 2.264C4.15 18.513 0 14.362 0 9.257zm4.169 1.537h4.61V1.82l-4.61 8.973zm5.547-3.092v8.974l4.61-8.974h-4.61z"}));case"gridicons-pages":return o().createElement("g",null,o().createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"}));case"gridicons-posts":return o().createElement("g",null,o().createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"}));case"gridicons-search":return o().createElement("g",null,o().createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"}));case"gridicons-star-outline":return o().createElement("g",null,o().createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"}));case"gridicons-star":return o().createElement("g",null,o().createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}));case"gridicons-tag":return o().createElement("g",null,o().createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"}));case"gridicons-video":return o().createElement("g",null,o().createElement("path",{d:"M20 4v2h-2V4H6v2H4V4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2v-2h2v2h12v-2h2v2c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 16H4v-3h2v3zm0-5H4V8h2v3zm4 4V9l4.5 3-4.5 3zm10 1h-2v-3h2v3zm0-5h-2V8h2v3z"}))}}render(){const{size:t=24,className:e=""}=this.props,n=this.props.height||t,i=this.props.width||t,r=this.props.style||{height:n,width:i},s="gridicons-"+this.props.icon;let a=["gridicon",s,e];return this.needsOffset(s,t)&&a.push("needs-offset"),a=a.join(" "),o().createElement("svg",{className:a,focusable:this.props.focusable,height:n,onClick:this.props.onClick,style:r,viewBox:"0 0 24 24",width:i,xmlns:"http://www.w3.org/2000/svg","aria-hidden":this.props["aria-hidden"]},this.getSVGTitle(s),this.renderIcon(s))}}r()(c,"defaultProps",{"aria-hidden":"false",focusable:"true"}),e.Z=c},2392:function(t,e,n){"use strict";var i=n(2402),r=n.n(i),s=n(9196),o=n.n(s),a=n(5736),c=n(5235),l=n.n(c),h=n(5162),u=n.n(h),d=n(207),p=(n(9054),n(1202));const __=a.__,f=t=>{const{a8cLogoHref:e,moduleName:n,className:i,moduleNameHref:s,...a}=t;return o().createElement("div",r()({className:l()("jp-dashboard-footer",i)},a),o().createElement("div",{className:"jp-dashboard-footer__footer-left"},o().createElement(p.Z,{logoColor:"#000",showText:!1,height:16,className:"jp-dashboard-footer__jetpack-symbol","aria-label":__("Jetpack logo","jetpack-search-pkg")}),o().createElement("span",{className:"jp-dashboard-footer__module-name"},s?o().createElement("a",{href:s,"aria-label":n},n):n)),o().createElement("div",{className:"jp-dashboard-footer__footer-right"},o().createElement("a",{href:e,"aria-label":__("An Automattic Airline","jetpack-search-pkg")},o().createElement(d.Z,null))))};f.defaultProps={a8cLogoHref:"https://automattic.com",moduleName:__("Jetpack","jetpack-search-pkg"),className:"",moduleNameHref:"https://jetpack.com"},f.propTypes={a8cLogoHref:u().string,moduleName:u().string,className:u().string,moduleNameHref:u().string},e.Z=f},1202:function(t,e,n){"use strict";var i=n(2402),r=n.n(i),s=n(8294),o=n.n(s),a=n(5162),c=n.n(a),l=n(9196),h=n.n(l),u=n(5235),d=n.n(u),p=n(5736);const __=p.__;class f extends h().Component{render(){const{logoColor:t,showText:e,className:n,...i}=this.props,s=e?"0 0 118 32":"0 0 32 32";return h().createElement("svg",r()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:s,className:d()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title"},i),h().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-search-pkg")),h().createElement("path",{fill:t,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),e&&h().createElement(l.Fragment,null,h().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),h().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),h().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),h().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),h().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),h().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),h().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}o()(f,"propTypes",{className:c().string,width:c().number,height:c().number,showText:c().bool,logoColor:c().string}),o()(f,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"}),e.Z=f},2939:function(t,e,n){"use strict";var i=n(9196),r=n.n(i),s=n(5235),o=n.n(s),a=n(5162),c=n.n(a),l=n(3080);const h=Number(l.Z.smCols),u=Number(l.Z.mdCols),d=Number(l.Z.lgCols),p=t=>{var e,n,i,s,a,c,p,f,g,m,b,y,v,x,_;const{children:k,className:w}=t,S=Math.min(h,null!==(e=null==t?void 0:t.sm)&&void 0!==e?e:h),C=Math.min(h,null!==(n=null==t||null===(i=t.sm)||void 0===i?void 0:i.start)&&void 0!==n?n:0),E=Math.min(h,null!==(s=null==t||null===(a=t.sm)||void 0===a?void 0:a.end)&&void 0!==s?s:0),M=Math.min(u,null!==(c=null==t?void 0:t.md)&&void 0!==c?c:u),P=Math.min(u,null!==(p=null==t||null===(f=t.md)||void 0===f?void 0:f.start)&&void 0!==p?p:0),j=Math.min(u,null!==(g=null==t||null===(m=t.md)||void 0===m?void 0:m.end)&&void 0!==g?g:0),O=Math.min(d,null!==(b=null==t?void 0:t.lg)&&void 0!==b?b:d),T=Math.min(d,null!==(y=null==t||null===(v=t.lg)||void 0===v?void 0:v.start)&&void 0!==y?y:0),N=Math.min(d,null!==(x=null==t||null===(_=t.lg)||void 0===_?void 0:_.end)&&void 0!==x?x:0),A=o()(w,{[l.Z[`col-sm-${S}`]]:!(C&&E),[l.Z[`col-sm-${C}-start`]]:C>0,[l.Z[`col-sm-${E}-end`]]:E>0,[l.Z[`col-md-${M}`]]:!(P&&j),[l.Z[`col-md-${P}-start`]]:P>0,[l.Z[`col-md-${j}-end`]]:j>0,[l.Z[`col-lg-${O}`]]:!(T&&N),[l.Z[`col-lg-${T}-start`]]:T>0,[l.Z[`col-lg-${N}-end`]]:N>0});return r().createElement("div",{className:A},k)};p.proptypes={className:c().string,sm:c().oneOfType([c().number,c().shape({start:c().number,end:c().number})]),md:c().oneOfType([c().number,c().shape({start:c().number,end:c().number})]),lg:c().oneOfType([c().number,c().shape({start:c().number,end:c().number})]),children:c().node},e.Z=p},8218:function(t,e,n){"use strict";var i=n(9196),r=n.n(i),s=n(5235),o=n.n(s),a=n(5162),c=n.n(a),l=n(8730);const h=t=>{const{children:e,fluid:n,className:i}=t,s=`calc( var(--horizontal-spacing) * ${t.horizontalSpacing} )`,a={paddingTop:s,paddingBottom:s,rowGap:`calc( var(--horizontal-spacing) * ${t.horizontalGap} )`},c=o()(i,l.Z.container,{[l.Z.fluid]:n});return r().createElement("div",{className:c,style:a},e)};h.propTypes={fluid:c().bool,className:c().string,horizontalSpacing:c().number,horizontalGap:c().number,children:c().node},h.defaultProps={fluid:!1,horizontalGap:1,horizontalSpacing:1},e.Z=h},667:function(t,e,n){"use strict";var i=n(9196),r=n.n(i),s=n(5162),o=n.n(s),a=n(5609),c=n(8899),l=n(5736);n(9478);const __=l.__,h=t=>-1===t.fraction.indexOf("00"),u=t=>{const e=(0,c.LR)(t.priceBefore,t.currencyCode),n=(0,c.LR)(t.priceAfter,t.currencyCode);return r().createElement("div",{className:"jp-components__pricing-card"},t.icon&&r().createElement("div",{className:"jp-components__pricing-card__icon"},r().createElement("img",{src:t.icon,alt:(0,l.sprintf)( +/* translators: placeholder is a product name */ +__("Icon for the product %s","jetpack-search-pkg"),t.title)})),r().createElement("h1",{className:"jp-components__pricing-card__title"},t.title),r().createElement("div",{className:"jp-components__pricing-card__pricing"},t.priceBefore!==t.priceAfter&&r().createElement("div",{className:"jp-components__pricing-card__price-before"},r().createElement("span",{className:"jp-components__pricing-card__currency"},e.symbol),r().createElement("span",{className:"jp-components__pricing-card__price"},e.integer),h(e)&&r().createElement("span",{className:"jp-components__pricing-card__price-decimal"}," ",e.fraction),r().createElement("div",{className:"jp-components__pricing-card__price-strikethrough"})),r().createElement("div",{className:"jp-components__pricing-card__price-after"},r().createElement("span",{className:"jp-components__pricing-card__currency"},n.symbol),r().createElement("span",{className:"jp-components__pricing-card__price"},n.integer),h(n)&&r().createElement("span",{className:"jp-components__pricing-card__price-decimal"},n.fraction)),r().createElement("span",{className:"jp-components__pricing-card__price-details"},t.priceDetails)),t.children&&r().createElement("div",{className:"jp-components__pricing-card__extra-content-wrapper"},t.children),t.ctaText&&r().createElement("div",{className:"jp-components__pricing-card__cta"},r().createElement(a.Button,{className:"jp-components__pricing-card__button",label:t.ctaText,onClick:t.onCtaClick},t.ctaText)),t.infoText&&r().createElement("div",{className:"jp-components__pricing-card__info"},t.infoText))};u.propTypes={title:o().string.isRequired,icon:o().string,priceBefore:o().number.isRequired,priceAfter:o().number.isRequired,priceDetails:o().string,currencyCode:o().string,ctaText:o().string,onCtaClick:o().func,infoText:o().oneOfType([o().string,o().object])},u.defaultProps={currencyCode:"USD",priceDetails:__("/month, paid yearly","jetpack-search-pkg")},e.Z=u},5033:function(t,e,n){"use strict";var i=n(9196),r=n.n(i),s=n(5162),o=n.n(s);n(1683);const a=t=>{const e=t.className+" jp-components-spinner",n={width:t.size,height:t.size,fontSize:t.size,borderTopColor:t.color},i={borderTopColor:t.color,borderRightColor:t.color};return r().createElement("div",{className:e},r().createElement("div",{className:"jp-components-spinner__outer",style:n},r().createElement("div",{className:"jp-components-spinner__inner",style:i})))};a.propTypes={color:o().string,className:o().string,size:o().number},a.defaultProps={color:"#FFFFFF",className:"",size:20},e.Z=a},9922:function(t,e,n){"use strict";function i(t,e,n,i){const r=new URL("https://wordpress.com/checkout/"),s=new URL(`${r}${e}/${t}`);return s.searchParams.set("redirect_to",n),i||s.searchParams.set("unlinked",1),s.searchParams.set("site",e),s.toString()}n.d(e,{Z:function(){return i}})},6324:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});n(3679);function i(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let i;var r;"undefined"!=typeof window&&(i=null===(r=window.Initial_State)||void 0===r?void 0:r.calypsoEnv);if(0===t.search("https://")){const e=new URL(t);t=`https://${e.host}${e.pathname}`,n.url=encodeURIComponent(t)}else n.source=encodeURIComponent(t);Object.keys(e).map((t=>{n[t]=encodeURIComponent(e[t])})),!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),i&&(n.calypso_env=i);const s=Object.keys(n).map((t=>t+"="+n[t])).join("&");return"https://jetpack.com/redirect/?"+s}},1132:function(t,e,n){let i={};try{i=n(8420)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),i={missingConfig:!0}}const r=t=>i.hasOwnProperty(t);t.exports={jetpackConfigHas:r,jetpackConfigGet:t=>{if(!r(t))throw'This app requires the "'+t+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return i[t]}}},2458:function(t,e,n){"use strict";var i=n(9196),r=n.n(i),s=n(5162),o=n.n(s);const a=t=>{const{images:e,assetBaseUrl:n}=t;if(!e.length)return null;const i=e.map(((t,e)=>r().createElement(r().Fragment,{key:e},r().createElement("img",{src:n+t,alt:""}))));return r().createElement("div",{className:"jp-connection__connect-screen__image-slider"},i)};a.propTypes={images:o().arrayOf(o().string).isRequired,assetBaseUrl:o().string},a.defaultProps={assetBaseUrl:""},e.Z=a},8524:function(t,e,n){"use strict";var i=n(9196),r=n.n(i),s=n(5162),o=n.n(s),a=n(1202),c=n(2458);n(9610);const l=t=>{const{title:e,children:n,className:i,assetBaseUrl:s,images:o}=t,l=null==o?void 0:o.length;return r().createElement("div",{className:"jp-connection__connect-screen-layout"+(l?" jp-connection__connect-screen-layout__two-columns":"")+(i?" "+i:"")},r().createElement("div",{className:"jp-connection__connect-screen-layout__left"},r().createElement(a.Z,null),r().createElement("h2",null,e),n),l?r().createElement("div",{className:"jp-connection__connect-screen-layout__right"},r().createElement(c.Z,{images:o,assetBaseUrl:s})):null)};l.propTypes={title:o().string,className:o().string,images:o().arrayOf(o().string),assetBaseUrl:o().string},e.Z=l},7710:function(t,e,n){"use strict";var i=n(9196),r=n.n(i),s=n(5162),o=n.n(s),a=n(5736),c=n(4082),l=n(1294),h=n(8258);const __=a.__,u=t=>{const{title:e,autoTrigger:n,buttonLabel:i,apiRoot:s,apiNonce:o,registrationNonce:a,from:u,redirectUri:d,children:p,priceBefore:f,priceAfter:g,pricingIcon:m,pricingTitle:b,pricingCurrencyCode:y,wpcomProductSlug:v,siteProductAvailabilityHandler:x}=t,{handleRegisterSite:_,isRegistered:k,isUserConnected:w,siteIsRegistering:S,userIsConnecting:C,registrationError:E}=(0,l.Z)({registrationNonce:a,redirectUri:d,apiRoot:s,apiNonce:o,autoTrigger:n,from:u}),M=v||"",{run:P,hasCheckoutStarted:j}=(0,h.Z)({productSlug:M,redirectUrl:d,siteProductAvailabilityHandler:x,from:u}),O=!k||!w,T=Boolean(E),N=S||C||j,A=M?P:_;return r().createElement(c.Z,{title:e,buttonLabel:i,priceBefore:f,priceAfter:g,pricingIcon:m,pricingTitle:b,pricingCurrencyCode:y,handleButtonClick:A,showConnectButton:O,displayButtonError:T,buttonIsLoading:N},p)};u.propTypes={title:o().string,buttonLabel:o().string,apiRoot:o().string.isRequired,apiNonce:o().string.isRequired,registrationNonce:o().string.isRequired,from:o().string,redirectUri:o().string.isRequired,autoTrigger:o().bool,pricingTitle:o().string.isRequired,icon:o().string,priceBefore:o().number.isRequired,priceAfter:o().number.isRequired,pricingCurrencyCode:o().string,wpcomProductSlug:o().string,checkSiteHasWpcomProduct:o().func},u.defaultProps={title:__("Over 5 million WordPress sites are faster and more secure","jetpack-search-pkg"),buttonLabel:__("Set up Jetpack","jetpack-search-pkg"),pricingCurrencyCode:"USD",autoTrigger:!1},e.Z=u},4082:function(t,e,n){"use strict";var i=n(9196),r=n.n(i),s=n(5162),o=n.n(s),a=n(5736),c=n(6324),l=n(7121),h=n(667),u=n(9307),d=n(8524);n(2917);const __=a.__,p=t=>{const{title:e,buttonLabel:n,children:i,priceBefore:s,priceAfter:o,pricingIcon:a,pricingTitle:p,pricingCurrencyCode:f,isLoading:g,handleButtonClick:m,showConnectButton:b,displayButtonError:y,buttonIsLoading:v}=t,x=(0,u.createInterpolateElement)(__("By clicking the button above, you agree to our <tosLink>Terms of Service</tosLink> and to <shareDetailsLink>share details</shareDetailsLink> with WordPress.com.","jetpack-search-pkg"),{tosLink:r().createElement("a",{href:(0,c.Z)("wpcom-tos"),rel:"noopener noreferrer",target:"_blank"}),shareDetailsLink:r().createElement("a",{href:(0,c.Z)("jetpack-support-what-data-does-jetpack-sync"),rel:"noopener noreferrer",target:"_blank"})}),_=(0,u.createInterpolateElement)(__("Already have a subscription? <connectButton/>","jetpack-search-pkg"),{connectButton:r().createElement(l.Z,{label:__("Log in to get started","jetpack-search-pkg"),onClick:m,isLoading:v})});return r().createElement(d.Z,{title:e,className:"jp-connection__connect-screen-required-plan"+(g?" jp-connection__connect-screen-required-plan__loading":"")},r().createElement("div",{className:"jp-connection__connect-screen-required-plan__content"},i,r().createElement("div",{className:"jp-connection__connect-screen-required-plan__pricing-card"},r().createElement(h.Z,{title:p,icon:a,priceBefore:s,currencyCode:f,priceAfter:o,infoText:b?x:""},b&&r().createElement(l.Z,{label:n,onClick:m,displayError:y,isLoading:v}))),b&&r().createElement("div",{className:"jp-connection__connect-screen-required-plan__with-subscription"},_)))};p.propTypes={pricingTitle:o().string.isRequired,priceBefore:o().number.isRequired,priceAfter:o().number.isRequired,pricingCurrencyCode:o().string,title:o().string,buttonLabel:o().string,pricingIcon:o().string,isLoading:o().bool,handleButtonClick:o().func,showConnectButton:o().bool,displayButtonError:o().bool,buttonIsLoading:o().bool},p.defaultProps={pricingCurrencyCode:"USD",showConnectButton:!0,isLoading:!1,buttonIsLoading:!1,displayButtonError:!1,handleButtonClick:()=>{}},e.Z=p},1294:function(t,e,n){"use strict";var i,r=n(9196),s=n(9818),o=n(4743),a=n(428);const c=null!==(i=window)&&void 0!==i&&i.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};e.Z=function(){let{registrationNonce:t=c.registrationNonce,apiRoot:e=c.apiRoot,apiNonce:n=c.apiNonce,redirectUri:i,autoTrigger:l,from:h,skipUserConnection:u}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{registerSite:d,connectUser:p,refreshConnectedPlugins:f}=(0,s.useDispatch)(a.t),g=(0,s.useSelect)((t=>t(a.t).getRegistrationError())),{siteIsRegistering:m,userIsConnecting:b,userConnectionData:y,connectedPlugins:v,isRegistered:x,isUserConnected:_,hasConnectedOwner:k}=(0,s.useSelect)((t=>({siteIsRegistering:t(a.t).getSiteIsRegistering(),userIsConnecting:t(a.t).getUserIsConnecting(),userConnectionData:t(a.t).getUserConnectionData(),connectedPlugins:t(a.t).getConnectedPlugins(),...t(a.t).getConnectionStatus()}))),w=()=>{u?i&&(window.location=i):p({from:h,redirectUri:i})},S=e=>{e&&e.preventDefault(),x?w():d({registrationNonce:t,redirectUri:i}).then((()=>{w()}))};return(0,r.useEffect)((()=>{o.ZP.setApiRoot(e),o.ZP.setApiNonce(n)}),[e,n]),(0,r.useEffect)((()=>{!l||m||b||S()}),[]),{handleRegisterSite:S,handleConnectUser:w,refreshConnectedPlugins:f,isRegistered:x,isUserConnected:_,siteIsRegistering:m,userIsConnecting:b,registrationError:g,userConnectionData:y,hasConnectedOwner:k,connectedPlugins:v}}},8258:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var i,r=n(9196),s=n(9818),o=n(4743),a=n(9922),c=n(428),l=n(1294);const{registrationNonce:h,apiRoot:u,apiNonce:d,siteSuffix:p}=null!==(i=window)&&void 0!==i&&i.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};function f(){let{productSlug:t,redirectUrl:e,siteSuffix:n=p,siteProductAvailabilityHandler:i=null,from:f}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[g,m]=(0,r.useState)(!1),{registerSite:b}=(0,s.useDispatch)(c.t),{isUserConnected:y,isRegistered:v,handleConnectUser:x}=(0,l.Z)({redirectUri:e,from:f}),_=(0,a.Z)(t,n,e,y),k=()=>Promise.resolve(i&&i()).then((t=>{if(t)return x();window.location.href=_})),w=t=>{if(t&&t.preventDefault(),m(!0),v)return k();b({registrationNonce:h,redirectUri:e}).then(k)};return(0,r.useEffect)((()=>{o.ZP.setApiRoot(u),o.ZP.setApiNonce(d)}),[]),{run:w,isRegistered:v,hasCheckoutStarted:g}}},7523:function(t,e,n){"use strict";n.d(e,{LI:function(){return s},N4:function(){return a},T1:function(){return l},TS:function(){return h},ZP:function(){return x},i6:function(){return r},qV:function(){return c},r7:function(){return o},wQ:function(){return d}});var i=n(4743);const r="SET_CONNECTION_STATUS",s="SET_CONNECTION_STATUS_IS_FETCHING",o="SET_SITE_IS_REGISTERING",a="SET_USER_IS_CONNECTING",c="SET_REGISTRATION_ERROR",l="CLEAR_REGISTRATION_ERROR",h="SET_AUTHORIZATION_URL",u="CONNECT_USER",d="SET_CONNECTED_PLUGINS",p=t=>({type:r,connectionStatus:t}),f=t=>({type:o,isRegistering:t}),g=t=>({type:a,isConnecting:t}),m=t=>({type:c,registrationError:t}),b=()=>({type:l}),y=t=>({type:h,authorizationUrl:t}),v=t=>({type:d,connectedPlugins:t});const x={setConnectionStatus:p,setConnectionStatusIsFetching:t=>({type:s,isFetching:t}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:t=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:t}),setSiteIsRegistering:f,setUserIsConnecting:g,setRegistrationError:m,clearRegistrationError:b,setAuthorizationUrl:y,registerSite:function*(t){let{registrationNonce:e,redirectUri:n}=t;yield b(),yield f(!0);try{const t=yield{type:"REGISTER_SITE",registrationNonce:e,redirectUri:n};return yield p({isRegistered:!0}),yield y(t.authorizeUrl),yield f(!1),Promise.resolve(t)}catch(t){return yield m(t),yield f(!1),Promise.reject(t)}},connectUser:function*(){let{from:t,redirectFunc:e,redirectUri:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yield g(!0),yield{type:u,from:t,redirectFunc:e,redirectUri:n}},setConnectedPlugins:v,refreshConnectedPlugins:()=>async t=>{let{dispatch:e}=t;return await new Promise((t=>i.ZP.fetchConnectedPlugins().then((n=>{e(v(n)),t(n)}))))}}},1432:function(t,e,n){"use strict";var i=n(4743),r=n(9818),s=n(428);const o=(0,r.createRegistryControl)((t=>{let{resolveSelect:e}=t;return function(){let{from:t,redirectFunc:n,redirectUri:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((r,o)=>{e(s.t).getAuthorizationUrl(i).then((e=>{const i=n||(t=>window.location.assign(t)),s=new URL(e);t&&s.searchParams.set("from",encodeURIComponent(t));const o=s.toString();i(o),r(o)})).catch((t=>{o(t)}))}))}}));e.Z={FETCH_AUTHORIZATION_URL:t=>{let{redirectUri:e}=t;return i.ZP.fetchAuthorizationUrl(e)},REGISTER_SITE:t=>{let{registrationNonce:e,redirectUri:n}=t;return i.ZP.registerSite(e,n)},CONNECT_USER:o}},1479:function(t,e,n){"use strict";var i=n(9818),r=n(7523);const s=(0,i.combineReducers)({connectionStatus:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return e.type===r.i6?{...t,...e.connectionStatus}:t},connectionStatusIsFetching:function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0;return e.type===r.LI?e.isFetching:t},siteIsRegistering:function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0;return e.type===r.r7?e.isRegistering:t},userIsConnecting:function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0;return e.type===r.N4?e.isConnecting:t},registrationError:(t,e)=>{switch(e.type){case r.T1:return!1;case r.qV:return e.registrationError;default:return t}},authorizationUrl:(t,e)=>e.type===r.TS?e.authorizationUrl:t,userConnectionData:(t,e)=>(e.type,t),connectedPlugins:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return e.type===r.wQ?e.connectedPlugins:t}});e.Z=s},7728:function(t,e,n){"use strict";var i=n(9818),r=n(7523),s=n(428);const o={getAuthorizationUrl:{isFulfilled:function(t){const e=Boolean(t.authorizationUrl);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];const a=(0,i.select)(s.t).hasFinishedResolution("getAuthorizationUrl",r);return e&&!a&&(0,i.dispatch)(s.t).finishResolution("getAuthorizationUrl",r),e},*fulfill(t){const e=yield r.ZP.fetchAuthorizationUrl(t);yield r.ZP.setAuthorizationUrl(e.authorizeUrl)}}};e.Z={...o}},2725:function(t,e){"use strict";const n={getConnectionStatus:t=>t.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:t=>t.siteIsRegistering||!1,getUserIsConnecting:t=>t.userIsConnecting||!1,getRegistrationError:t=>t.registrationError||!1,getAuthorizationUrl:t=>t.authorizationUrl||!1,getUserConnectionData:t=>t.userConnectionData||!1,getConnectedPlugins:t=>t.connectedPlugins||[]};e.Z=n},3535:function(t,e,n){"use strict";var i=n(8294),r=n.n(i),s=n(9818);class o{static mayBeInit(t,e){null===o.store&&(o.store=(0,s.createReduxStore)(t,e),(0,s.register)(o.store))}}r()(o,"store",null),e.Z=o},428:function(t,e,n){"use strict";n.d(e,{t:function(){return l}});var i=n(1479),r=n(7523),s=n(2725),o=n(7728),a=n(1432),c=n(3535);const l="jetpack-connection",h=window.JP_CONNECTION_INITIAL_STATE;h||console.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),c.Z.mayBeInit(l,{__experimentalUseThunks:!0,reducer:i.Z,actions:r.ZP,selectors:s.Z,resolvers:o.Z,controls:a.Z,initialState:h||{}})},4855:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});var i=n(8294),r=n.n(i),s=n(5844),o=n.n(s),a=n(9196),c=n.n(a),l=n(5235),h=n.n(l),u=n(6697),d=n.n(u);class p extends c().Component{render(){const t=this.props.href?"a":"button",{primary:e,compact:n,scary:i,borderless:r,className:s,...o}=this.props,a=h()({"dops-button":!0,"is-compact":n,"is-primary":e,"is-scary":i,"is-borderless":r});return o.className=h()(s,a),c().createElement(t,o,this.props.children)}}r()(p,"displayName","Button"),r()(p,"propTypes",{disabled:o().bool,compact:o().bool,primary:o().bool,scary:o().bool,type:o().string,href:o().string,onClick:o().func,borderless:o().bool,className:o().string}),r()(p,"defaultProps",{disabled:!1,type:"button",onClick:d(),borderless:!1})},8195:function(t,e,n){"use strict";var i=n(8294),r=n.n(i),s=n(5844),o=n.n(s),a=n(9196),c=n.n(a),l=n(5235),h=n.n(l),u=n(2515),d=n.n(u),p=n(8520),f=n.n(p),g=n(900);class m extends c().Component{constructor(){super(...arguments),r()(this,"_renderWithTitle",(()=>{const t="dops-card-section-orient-"+(this.props.vertical?"vertical":"horizontal");return c().createElement("div",{className:t},c().createElement("h4",{ref:"label",className:"dops-card-section-label"},this.props.title),c().createElement("div",{ref:"content",className:"dops-card-section-content"},this.props.children))}))}render(){return c().createElement("div",{className:h()("dops-card-section",this.props.className),style:this.props.style},this.props.title?this._renderWithTitle():this.props.children)}}r()(m,"propTypes",{title:o().any,vertical:o().any,style:o().object,className:o().string,device:o().oneOf(["desktop","tablet","phone"])}),r()(m,"defaultProps",{vertical:null});class b extends c().Component{render(){return c().createElement("div",{className:"dops-card-footer"},this.props.children)}}class y extends c().Component{constructor(){super(...arguments),r()(this,"_renderIcon",(()=>c().createElement("span",{className:"dops-card-icon",style:{color:this.props.iconColor}},this.props.icon&&c().createElement(g.Z,{icon:this.props.icon,style:{backgroundColor:this.props.iconColor}}),this.props.iconLabel)))}render(){const t=h()("dops-card",this.props.className,{"is-card-link":!!this.props.href,"is-compact":this.props.compact}),e=["compact","tagName","meta","iconColor"];let n,i;return this.props.href?n=c().createElement(g.Z,{className:"dops-card__link-indicator",icon:this.props.target?"external":"chevron-right"}):e.push("href","target"),this.props.title&&(i=c().createElement("h2",{className:"dops-card-title"},this.props.title,this.props.meta&&c().createElement("span",{className:"dops-card-meta"},this.props.meta),(this.props.icon||this.props.iconLabel)&&this._renderIcon())),c().createElement(this.props.href?"a":this.props.tagName,d()(f()(this.props,e),{className:t}),n,i,this.props.children)}}r()(y,"propTypes",{meta:o().any,icon:o().string,iconLabel:o().any,iconColor:o().string,style:o().object,className:o().string,href:o().string,onClick:o().func,title:o().string,tagName:o().string,target:o().string,compact:o().bool,children:o().node}),r()(y,"defaultProps",{iconColor:"#787878",className:"",tagName:"div",onClick:()=>{}}),y.Section=m,y.Footer=b,e.Z=y},2341:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});var i=n(9196),r=n.n(i),s=n(9818),o=n(6975),a=n(4743),c=n(7011),l=n(2897),h=n(8625),u=n(9700),d=n(1164);function p(){const{isFullyConnected:t}=(0,c.Z)();return(0,i.useMemo)((()=>{const t=(0,s.select)(l.t).getAPIRootUrl(),e=(0,s.select)(l.t).getAPINonce();t&&a.ZP.setApiRoot(t),e&&a.ZP.setApiNonce(e),(()=>{const t=(0,s.select)(l.t).getWpcomUser(),e=(0,s.select)(l.t).getBlogId();t&&o.Z.initialize(t.ID,t.login,{blog_id:e})})(),o.Z.tracks.recordEvent("jetpack_search_admin_page_view",{current_version:(0,s.select)(l.t).getVersion()})}),[]),r().createElement(r().Fragment,null,!t&&r().createElement(h.Z,null),t&&r().createElement(f,null))}function f(){(0,s.useSelect)((t=>t(l.t).getSearchPlanInfo()),[]);const t=(0,s.useSelect)((t=>t(l.t).supportsSearch())),e=(0,s.useSelect)((t=>t(l.t).isResolving("getSearchPlanInfo")||!t(l.t).hasStartedResolution("getSearchPlanInfo")));return r().createElement(r().Fragment,null,t&&r().createElement(d.Z,{isLoading:e}),!t&&r().createElement(u.Z,{isLoading:e}))}},2668:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var i=n(2402),r=n.n(i),s=n(8294),o=n.n(s),a=n(9196),c=n.n(a),l=n(5235),h=n.n(l),u=n(8520),d=n.n(u),p=n(6450);class f extends c().Component{render(){return c().createElement(p.Z,r()({},d()(this.props,"className"),{className:h()(this.props.className,"is-compact")}),this.props.children)}}o()(f,"displayName","CompactFormToggle")},6450:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var i=n(8294),r=n.n(i),s=n(5844),o=n.n(s),a=n(9196),c=n.n(a),l=n(5235),h=n.n(l);class u extends a.Component{constructor(){super(...arguments),r()(this,"state",{}),this.onKeyDown=this.onKeyDown.bind(this),this.onClick=this.onClick.bind(this),this.onLabelClick=this.onLabelClick.bind(this)}UNSAFE_componentWillMount(){this.id=this.constructor.idNum++}onKeyDown(t){this.props.disabled||("Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.props.onChange()),this.props.onKeyDown(t))}onClick(){this.props.disabled||this.props.onChange()}onLabelClick(t){if(this.props.disabled)return;const e=t.target.nodeName.toLowerCase();"a"!==e&&"input"!==e&&"select"!==e&&(t.preventDefault(),this.props.onChange())}render(){const t=this.props.id||"toggle-"+this.id,e=h()("form-toggle",this.props.className,{"is-toggling":this.props.toggling});return c().createElement(a.Fragment,null,c().createElement("div",{className:h()("form-toggle__switch-container",this.props.switchClassNames)},c().createElement("input",{className:e,type:"checkbox",checked:this.props.checked,readOnly:!0,disabled:this.props.disabled}),c().createElement("span",{className:h()("form-toggle__switch",this.props.switchClassNames),disabled:this.props.disabled,id:t,onClick:this.onClick,onKeyDown:this.onKeyDown,role:"checkbox","aria-checked":this.props.checked,"aria-label":this.props["aria-label"],tabIndex:this.props.disabled?-1:0,ref:"toggleSwitch"})),c().createElement("label",{className:h()("form-toggle__label",this.props.labelClassNames),htmlFor:t},c().createElement("span",{className:h()("form-toggle__label-content",this.props.labelClassNames),onClick:this.onLabelClick},this.props.children)))}}r()(u,"propTypes",{onChange:o().func,onKeyDown:o().func,checked:o().bool,disabled:o().bool,id:o().string,className:o().string,toggling:o().bool,"aria-label":o().string,children:o().node,disabledReason:o().node,switchClassNames:o().string,labelClassNames:o().string}),r()(u,"defaultProps",{checked:!1,disabled:!1,onKeyDown:()=>{},onChange:()=>{},disabledReason:""}),r()(u,"idNum",0)},9268:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var i=n(9196),r=n.n(i),s=n(4034),o=n(8448);function a(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{handleLocalNoticeDismissClick:null,notices:Object.freeze([])};const e=t.notices.map((function(e){const n=e=>()=>{e&&t.handleLocalNoticeDismissClick(e.id)};return r().createElement(s.Z,{key:"notice-"+e.id,status:e.status,duration:e.duration||null,text:e.text,isCompact:e.isCompact,onDismissClick:n(e),showDismiss:e.showDismiss},e.button&&r().createElement(o.Z,{href:e.href,onClick:n(e)},e.button))}));return e.length?r().createElement("div",{id:t.id,className:"global-notices"},e):null}},3459:function(t,e,n){"use strict";n.d(e,{Iz:function(){return p},MQ:function(){return f},RT:function(){return h},b3:function(){return o},mF:function(){return a},tF:function(){return u}});var i=n(5348),r=n.n(i),s=n(5736);const __=s.__,o="CREATE_NOTICE",a="REMOVE_NOTICE";function c(t,e){var n;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s={id:i.id||r()(),duration:null!==(n=i.duration)&&void 0!==n?n:2e3,showDismiss:"boolean"!=typeof i.showDismiss||i.showDismiss,isPersistent:i.isPersistent||!1,displayOnNextPage:i.displayOnNextPage||!1,status:t,text:e};return{type:o,notice:s}}function l(t){return{type:a,notice:{id:t}}}const h=c.bind(null,"is-success"),u=c.bind(null,"is-error"),d=(c.bind(null,"is-info"),c.bind(null,"is-warning")),p=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:__("Updating settings…","jetpack-search-pkg");return c("is-info",t,{duration:3e4,id:"search-updating-settings"})},f=()=>l("search-updating-settings");e.ZP={createNotice:c,removeNotice:l,successNotice:h,errorNotice:u,warningNotice:d,updatingNotice:p,removeUpdatingNotice:f}},2963:function(t,e,n){"use strict";var i=n(3459);e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{notices:[]},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case i.b3:return{...t,notices:[...t.notices,e.notice]};case i.mF:return{...t,notices:t.notices.filter((t=>t.id!==e.notice.id))}}return t}},5260:function(t,e){"use strict";e.Z={getNotices:t=>{var e;return null!==(e=t.notices.notices)&&void 0!==e?e:[]}}},7430:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(9196),r=n.n(i),s=n(5033);function o(){return r().createElement(s.Z,{className:"jp-search-dashboard-page-loading-spinner",color:"#000",size:32})}},943:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var i=n(9196),r=n.n(i),s=n(7387),o=n(24);function a(t){let{supportsInstantSearch:e=!0,supportsOnlyClassicSearch:n=!1}=t;const a=n&&!e;return r().createElement(i.Fragment,null,a&&r().createElement(o.Z,null),!a&&r().createElement(s.Z,null))}},7387:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var i=n(9196),r=n.n(i),s=n(5736),o=n(900),a=n(6332);const __=s.__;function c(){return r().createElement("div",{className:"jp-mocked-instant-search","aria-hidden":"true"},r().createElement("div",{className:"jp-mocked-instant-search__search-controls"},r().createElement("div",{className:"jp-mocked-instant-search__search-icon"},r().createElement(o.Z,{icon:"search",size:24})),r().createElement("div",{className:"jp-mocked-instant-search__search-mock-input"},r().createElement(a.Z,{style:{height:"50px",width:"80%",maxWidth:"212px"}})),r().createElement("div",{className:"jp-mocked-instant-search__close-button"},r().createElement(o.Z,{icon:"cross",size:24}))),r().createElement("div",{className:"jp-mocked-instant-search__search-results"},r().createElement("div",{className:"jp-mocked-instant-search__search-results-primary"},r().createElement("div",{className:"jp-mocked-instant-search__search-results-header"},r().createElement("div",{className:"jp-mocked-instant-search__result-statistics"}, +/* translators: %s is replaced with the number of search results */ +(0,s.sprintf)(__("Found %s results","jetpack-search-pkg"),"27")),r().createElement("div",{className:"jp-mocked-instant-search__result-sort-list"},r().createElement("span",{className:"jp-mocked-instant-search__result-sort-selected"},__("Relevance","jetpack-search-pkg")),r().createElement("span",null,"·"),r().createElement("span",null,__("Newest","jetpack-search-pkg")),r().createElement("span",null,"·"),r().createElement("span",null,__("Oldest","jetpack-search-pkg")))),r().createElement("div",{className:"jp-mocked-instant-search__search-results-content"},Array.apply(null,Array(3)).map(((t,e)=>r().createElement("div",{className:"jp-mocked-instant-search__search-result",key:e},r().createElement(a.Z,{style:{height:"2.5em",width:"50%",maxWidth:"200px",margin:"0.1em 0.1em 1em 0.1em"}}),r().createElement(a.Z,{style:{height:"1em",width:"90%",margin:"0.1em"}}),r().createElement(a.Z,{style:{height:"1em",width:"70%",margin:"0.1em"}})))))),r().createElement("div",{className:"jp-mocked-instant-search__search-results-secondary"},r().createElement("div",{className:"jp-mocked-instant-search__search-filter-header"},__("Filter options","jetpack-search-pkg")),r().createElement("div",{className:"jp-mocked-instant-search__search-filter-list"},Array.apply(null,Array(2)).map(((t,e)=>r().createElement("div",{className:"jp-mocked-instant-search__search-filter",key:e},r().createElement("label",null,r().createElement("input",{type:"checkbox",disabled:"disabled"})," ",r().createElement(a.Z,{style:{width:"30%"}})))))))))}},24:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var i=n(9196),r=n.n(i),s=n(900),o=n(6332);function a(){return r().createElement("div",{className:"jp-mocked-legacy-search","aria-hidden":"true"},r().createElement("div",{className:"jp-mocked-legacy-search__search-controls"},r().createElement("div",{className:"jp-mocked-legacy-search__search-icon"},r().createElement(s.Z,{icon:"search",size:24})),r().createElement("div",{className:"jp-mocked-legacy-search__search-input"},r().createElement(o.Z,{style:{height:"50px",width:"80%",maxWidth:"212px"}}))))}},6332:function(t,e,n){"use strict";var i=n(9196),r=n.n(i);e.Z=t=>r().createElement("div",{className:"jp-search-dashboard__text-row-placeholder",style:{display:"inline-block",borderRadius:"10px",maxHeight:"1.5em",width:"100%",height:"1em",backgroundColor:"#E9EFF3",...t.style}})},2794:function(t,e,n){"use strict";n.d(e,{Z:function(){return b}});var i=n(9196),r=n.n(i),s=n(5235),o=n.n(s),a=n(5736),c=n(9307),l=n(6975),h=n(6324),u=n(4855),d=n(8195),p=n(2668),f=n(7436);const __=a.__,g=__("Jetpack Search is an incredibly powerful and customizable replacement for the search capability built into WordPress that helps your visitors find the right content.","jetpack-search-pkg"),m=__("Instant search will allow your visitors to get search results as soon as they start typing. If deactivated, Jetpack Search will still optimize your search results but visitors will have to submit a search query before seeing any results.","jetpack-search-pkg");function b(t){let{siteAdminUrl:e,updateOptions:n,domain:s,isSavingEitherOption:b,isModuleEnabled:y,isInstantSearchEnabled:v,isInstantSearchPromotionActive:x,upgradeBillPeriod:_,supportsOnlyClassicSearch:k,supportsSearch:w,supportsInstantSearch:S,isTogglingModule:C,isTogglingInstantSearch:E}=t;const M=b||!y||!v||!S,P=b||!y,j=encodeURIComponent(e+"admin.php?page=jetpack-search"),O=(0,h.Z)("monthly"===_?"jetpack-search-monthly":"jetpack-search",{site:s}),T=(0,i.useCallback)((()=>{const t={module_active:!y};v!==!y&&(t.instant_search_enabled=!y&&S),n(t),l.Z.tracks.recordEvent("jetpack_search_module_toggle",t)}),[S,y,n,v]),N=(0,i.useCallback)((()=>{const t={instant_search_enabled:S&&!v};t.instant_search_enabled&&(t.module_active=!0),n(t),l.Z.tracks.recordEvent("jetpack_search_instant_toggle",t)}),[S,v,n]);return r().createElement("div",{className:"jp-form-settings-group jp-form-search-settings-group"},r().createElement(d.Z,{className:o()({"jp-form-has-child":!0,"jp-form-settings-disable":!1})},r().createElement("div",{className:"jp-form-search-settings-group-inside"},r().createElement("div",{className:"jp-form-search-settings-group__toggle is-search jp-search-dashboard-wrap"},r().createElement("div",{className:"jp-search-dashboard-row"},r().createElement("div",{className:"lg-col-span-2 md-col-span-1 sm-col-span-0"}),r().createElement(p.Z,{checked:y&&w,disabled:b||!w,onChange:T,toggling:C,className:"is-search-admin",switchClassNames:"lg-col-span-1 md-col-span-1 sm-col-span-1",labelClassNames:" lg-col-span-7 md-col-span-5 sm-col-span-3","aria-label":__("Enable Jetpack Search","jetpack-search-pkg")},__("Enable Jetpack Search","jetpack-search-pkg")),r().createElement("div",{className:"lg-col-span-2 md-col-span-1 sm-col-span-0"})),r().createElement("div",{className:"jp-search-dashboard-row"},r().createElement("div",{className:"lg-col-span-3 md-col-span-2 sm-col-span-1"}),r().createElement("div",{className:"jp-form-search-settings-group__toggle-description lg-col-span-7 md-col-span-5 sm-col-span-3"},r().createElement("p",{className:"jp-form-search-settings-group__toggle-explanation"},g)),r().createElement("div",{className:"lg-col-span-2 md-col-span-1 sm-col-span-0"}))),r().createElement("div",{className:"jp-form-search-settings-group__toggle is-instant-search jp-search-dashboard-wrap"},r().createElement("div",{className:"jp-search-dashboard-row"},r().createElement("div",{className:"lg-col-span-2 md-col-span-1 sm-col-span-0"}),r().createElement(p.Z,{checked:y&&v&&S,disabled:b||!S,onChange:N,toggling:E,className:"is-search-admin",switchClassNames:"lg-col-span-1 md-col-span-1 sm-col-span-1",labelClassNames:" lg-col-span-7 md-col-span-5 sm-col-span-3","aria-label":__("Enable instant search experience (recommended)","jetpack-search-pkg")},(0,c.createInterpolateElement)(__("Enable instant search experience <span>(recommended)</span>","jetpack-search-pkg"),{span:r().createElement("span",null)}))),r().createElement("div",{className:"jp-search-dashboard-row"},r().createElement("div",{className:"lg-col-span-3 md-col-span-2 sm-col-span-1"}),r().createElement("div",{className:"jp-form-search-settings-group__toggle-description lg-col-span-7 md-col-span-5 sm-col-span-3"},S&&r().createElement(i.Fragment,null,r().createElement("p",{className:"jp-form-search-settings-group__toggle-explanation"},m)),!S&&x&&r().createElement(f.Z,{href:O,upgrade:k})),r().createElement("div",{className:"lg-col-span-2 md-col-span-1 sm-col-span-0"})),S&&r().createElement("div",{className:"jp-form-search-settings-group-buttons jp-search-dashboard-row"},r().createElement("div",{className:"lg-col-span-3 md-col-span-2 sm-col-span-1"}),r().createElement(u.Z,{className:"jp-form-search-settings-group-buttons__button is-customize-search lg-col-span-4 md-col-span-5 sm-col-span-3",href:M?void 0:(0,a.sprintf)("admin.php?page=jetpack-search-configure",j),disabled:M},r().createElement("span",null,__("Customize search results","jetpack-search-pkg"))),r().createElement("div",{className:"lg-col-span-0 md-col-span-1 sm-col-span-0"}),r().createElement("div",{className:"lg-col-span-0 md-col-span-2 sm-col-span-1"}),r().createElement(u.Z,{className:"jp-form-search-settings-group-buttons__button is-widgets-editor lg-col-span-3 md-col-span-5 sm-col-span-3",href:P?void 0:(0,a.sprintf)("widgets.php",j),disabled:P},r().createElement("span",null,__("Edit sidebar widgets","jetpack-search-pkg"))),r().createElement("div",{className:"lg-col-span-2 md-col-span-1 sm-col-span-0"}))))))}},4034:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var i=n(8294),r=n.n(i),s=n(5844),o=n.n(s),a=n(9196),c=n.n(a),l=n(5235),h=n.n(l),u=n(6697),d=n.n(u),p=n(900);class f extends c().Component{constructor(){super(...arguments),r()(this,"dismissTimeout",null),r()(this,"getIcon",(()=>{let t;switch(this.props.status){case"is-info":default:t="info";break;case"is-success":t="checkmark";break;case"is-error":case"is-warning":t="notice"}return t})),r()(this,"clearText",(t=>"string"==typeof t?t.replace(/(<([^>]+)>)/gi,""):t)),r()(this,"onKeyDownCallback",(t=>e=>{13!==e.which&&32!==e.which||t&&t(e)}))}componentDidMount(){this.props.duration>0&&(this.dismissTimeout=setTimeout(this.props.onDismissClick,this.props.duration))}componentWillUnmount(){this.dismissTimeout&&clearTimeout(this.dismissTimeout)}render(){const{children:t,className:e,icon:n,isCompact:i,onDismissClick:r,showDismiss:s=!i,status:o,text:a,dismissText:l}=this.props,u=h()("dops-notice",o,e,{"is-compact":i,"is-dismissable":s});return c().createElement("div",{className:u},c().createElement("span",{className:"dops-notice__icon-wrapper"},c().createElement(p.Z,{className:"dops-notice__icon",icon:n||this.getIcon(),size:24})),c().createElement("span",{className:"dops-notice__content"},c().createElement("span",{className:"dops-notice__text"},a?this.clearText(a):t)),a?t:null,s&&c().createElement("span",{role:"button",onKeyDown:this.onKeyDownCallback(r),tabIndex:"0",className:"dops-notice__dismiss",onClick:r},c().createElement(p.Z,{icon:"cross",size:24}),c().createElement("span",{className:"dops-notice__screen-reader-text screen-reader-text"},l)))}}r()(f,"displayName","SimpleNotice"),r()(f,"defaultProps",{duration:0,status:null,showDismiss:!0,className:"",onDismissClick:d()}),r()(f,"propTypes",{status:o().string,showDismiss:o().bool,isCompact:o().bool,duration:o().number,text:o().oneOfType([o().oneOfType([o().string,o().node]),o().arrayOf(o().oneOfType([o().string,o().node]))]),icon:o().string,onDismissClick:o().func,className:o().string})},8448:function(t,e,n){"use strict";n.d(e,{Z:function(){return h}});var i=n(8294),r=n.n(i),s=n(5844),o=n.n(s),a=n(9196),c=n.n(a),l=n(900);class h extends c().Component{render(){const t={className:"dops-notice__action",href:this.props.href,onClick:this.props.onClick};return this.props.external&&(t.target="_blank"),c().createElement("a",t,c().createElement("span",null,this.props.children),this.props.icon&&c().createElement(l.Z,{icon:this.props.icon,size:24}),this.props.external&&c().createElement(l.Z,{icon:"external",size:24}))}}r()(h,"displayName","NoticeAction"),r()(h,"propTypes",{href:o().string,onClick:o().func,external:o().bool,icon:o().string}),r()(h,"defaultProps",{external:!1})},8625:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});var i=n(9196),r=n.n(i),s=n(9818),o=n(6324),a=n(3244),c=n(8218),l=n(2939),h=n(7710),u=n(5736),d=n(7430),p=n(6204),f=n(2897);const __=u.__;function g(t){let{isLoading:e=!1}=t;(0,s.useSelect)((t=>t(f.t).getSearchPricing()),[]);const n=(0,s.useSelect)((t=>t(f.t).getAPINonce()),[]),u=(0,s.useSelect)((t=>t(f.t).getAPIRootUrl()),[]),g=(0,s.useSelect)((t=>t(f.t).getPriceBefore()),[]),m=(0,s.useSelect)((t=>t(f.t).getPriceAfter()),[]),b=(0,s.useSelect)((t=>t(f.t).getPriceCurrencyCode()),[]),y=(0,s.useSelect)((t=>t(f.t).getRegistrationNonce()),[]),{fetchSearchPlanInfo:v}=(0,s.useDispatch)(f.t),x=(0,i.useCallback)((()=>v().then((t=>null==t?void 0:t.supports_search))),[v]),_=(0,s.useSelect)((t=>t(f.t).isResolving("getSearchPricing")||!t(f.t).hasStartedResolution("getSearchPricing")||e),[e]);return r().createElement(r().Fragment,null,_&&r().createElement(d.Z,null),!_&&r().createElement("div",{className:"jp-search-dashboard-connection-screen"},r().createElement(a.Z,null,r().createElement(c.Z,{horizontalSpacing:3,horizontalGap:3},r().createElement(l.Z,{lg:12,md:8,sm:4},r().createElement(h.Z,{buttonLabel:__("Get Jetpack Search","jetpack-search-pkg"),priceAfter:m/12,priceBefore:g/12,pricingCurrencyCode:b,pricingIcon:"data:image/svg+xml,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z' fill='%23000'/%3E%3C/svg%3E",pricingTitle:__("Jetpack Search","jetpack-search-pkg"),title:__("The best WordPress search experience","jetpack-search-pkg"),apiRoot:u,apiNonce:n,registrationNonce:y,from:"jetpack-search",redirectUri:"admin.php?page=jetpack-search",wpcomProductSlug:"jetpack_search",siteProductAvailabilityHandler:x},r().createElement(p.Z,null))),r().createElement(l.Z,{lg:12,md:8,sm:4},r().createElement("div",{className:"jp-search-dashboard-connection-footer"},r().createElement("p",{className:"jp-search-dashboard-connection-footer__text"},__("Special introductory pricing, all renewals are at full price. 14 day money back guarantee.","jetpack-search-pkg")),r().createElement("p",{className:"jp-search-dashboard-connection-footer__text"},"*"," ",__("Pricing will automatically adjust based on the number of records in your search index.","jetpack-search-pkg")," ",r().createElement("a",{href:(0,o.Z)("search-product-pricing"),className:"jp-search-dashboard-connection-footer__link"},__("Learn more","jetpack-search-pkg")))))))))}},1164:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});var i=n(9196),r=n.n(i),s=n(9818),o=n(5736),a=n(1202),c=n(2392),l=n(2794),h=n(943),u=n(2897),d=n(9268),p=n(8904),f=n(7430);const __=o.__;function g(t){let{isLoading:e=!1}=t;(0,s.useSelect)((t=>t(u.t).getSearchPlanInfo()),[]),(0,s.useSelect)((t=>t(u.t).getSearchModuleStatus()),[]),(0,s.useSelect)((t=>t(u.t).getSearchStats()),[]);const n=(0,s.useSelect)((t=>t(u.t).isResolving("getSearchModuleStatus")||!t(u.t).hasStartedResolution("getSearchModuleStatus")||t(u.t).isResolving("getSearchStats")||!t(u.t).hasStartedResolution("getSearchStats")||t(u.t).isResolving("getSearchPlanInfo")||!t(u.t).hasStartedResolution("getSearchPlanInfo")||e),[e]),i=(0,s.useSelect)((t=>t(u.t).getSiteAdminUrl())),o=i+"admin.php?page=jetpack_about",g=(0,s.useDispatch)(u.t).updateJetpackSettings,m=(0,s.useSelect)((t=>t(u.t).isInstantSearchPromotionActive())),b=(0,s.useSelect)((t=>t(u.t).getCalypsoSlug())),y=(0,s.useSelect)((t=>t(u.t).getUpgradeBillPeriod())),v=(0,s.useSelect)((t=>t(u.t).supportsOnlyClassicSearch())),x=(0,s.useSelect)((t=>t(u.t).supportsSearch())),_=(0,s.useSelect)((t=>t(u.t).supportsInstantSearch())),k=(0,s.useSelect)((t=>t(u.t).isModuleEnabled())),w=(0,s.useSelect)((t=>t(u.t).isInstantSearchEnabled())),S=(0,s.useSelect)((t=>t(u.t).isUpdatingJetpackSettings())),C=(0,s.useSelect)((t=>t(u.t).isTogglingModule())),E=(0,s.useSelect)((t=>t(u.t).isTogglingInstantSearch())),M=(0,s.useSelect)((t=>t(u.t).getTierMaximumRecords())),P=(0,s.useSelect)((t=>t(u.t).getPostCount())),j=(0,s.useSelect)((t=>t(u.t).getPostTypeBreakdown())),O=(0,s.useSelect)((t=>t(u.t).getLastIndexedDate())),T=(0,s.useDispatch)(u.t).removeNotice,N=(0,s.useSelect)((t=>t(u.t).getNotices()),[]),A=(0,s.useSelect)((t=>t(u.t).isFeatureEnabled("record-meter")));return r().createElement(r().Fragment,null,n&&r().createElement(f.Z,null),!n&&r().createElement("div",{className:"jp-search-dashboard-page"},r().createElement("div",{className:"jp-search-dashboard-header jp-search-dashboard-wrap"},r().createElement("div",{className:"jp-search-dashboard-row"},r().createElement("div",{className:"lg-col-span-12 md-col-span-8 sm-col-span-4"},r().createElement("div",{className:"jp-search-dashboard-header__logo-container"},r().createElement(a.Z,{className:"jp-search-dashboard-header__masthead"}))))),r().createElement("div",{className:"jp-search-dashboard-top jp-search-dashboard-wrap"},r().createElement("div",{className:"jp-search-dashboard-row"},r().createElement("div",{className:"jp-search-dashboard-top__title lg-col-span-6 md-col-span-7 sm-col-span-4"},r().createElement("h1",null,__("Help your visitors find exactly what they're looking for, fast","jetpack-search-pkg"))),r().createElement("div",{className:" lg-col-span-6 md-col-span-1 sm-col-span-0"})),r().createElement("div",{className:"jp-search-dashboard-row","aria-hidden":"true"},r().createElement("div",{className:"lg-col-span-1 md-col-span-1 sm-col-span-0"}),r().createElement("div",{className:"jp-search-dashboard-top__mocked-search-interface lg-col-span-10 md-col-span-6 sm-col-span-4"},r().createElement(h.Z,{supportsInstantSearch:_,supportsOnlyClassicSearch:v})),r().createElement("div",{className:"lg-col-span-1 md-col-span-1 sm-col-span-0"}))),A&&r().createElement(p.Z,{postCount:P,postTypeBreakdown:j,tierMaximumRecords:M,lastIndexedDate:O}),r().createElement("div",{className:"jp-search-dashboard-bottom"},r().createElement(l.Z,{siteAdminUrl:i,updateOptions:g,domain:b,isInstantSearchPromotionActive:m,upgradeBillPeriod:y,supportsOnlyClassicSearch:v,supportsSearch:x,supportsInstantSearch:_,isModuleEnabled:k,isInstantSearchEnabled:w,isSavingEitherOption:S,isTogglingModule:C,isTogglingInstantSearch:E})),r().createElement("div",{className:"jp-search-dashboard-footer jp-search-dashboard-wrap"},r().createElement("div",{className:"jp-search-dashboard-row"},r().createElement(c.Z,{a8cLogoHref:o,moduleName:__("Jetpack Search","jetpack-search-pkg"),className:"lg-col-span-12 md-col-span-8 sm-col-span-4"}))),r().createElement(d.Z,{notices:N,handleLocalNoticeDismissClick:T})))}},9700:function(t,e,n){"use strict";n.d(e,{Z:function(){return m}});var i=n(9196),r=n.n(i),s=n(5736),o=n(9818),a=n(1163),c=n(3244),l=n(8218),h=n(2939),u=n(667),d=n(2897),p=n(3070),f=n(6204),g=n(7430);const __=s.__;function m(t){let{isLoading:e=!1}=t;(0,o.useSelect)((t=>t(d.t).getSearchPricing()),[]);const n=(0,o.useSelect)((t=>t(d.t).isResolving("getSearchPricing")||!t(d.t).hasStartedResolution("getSearchPricing")||e),[e]),s=(0,o.useSelect)((t=>t(d.t).getPriceBefore()/12),[]),m=(0,o.useSelect)((t=>t(d.t).getPriceAfter()/12),[]),b=(0,o.useSelect)((t=>t(d.t).getPriceCurrencyCode()),[]),y=(0,o.useSelect)((t=>t(d.t).getCalypsoSlug()),[]),v=(0,o.useSelect)((t=>t(d.t).getSiteAdminUrl()),[]),x=(0,i.useCallback)((()=>{window.location.href=(0,p.Z)({siteSuffix:y,redirectUrl:`${v}admin.php?page=jetpack-search`})}),[y,v]),_=__("14 day money back guarantee.","jetpack-search-pkg"),k=__("Special introductory pricing, all renewals are at full price. 14 day money back guarantee.","jetpack-search-pkg");return r().createElement(r().Fragment,null,n&&r().createElement(g.Z,null),!n&&r().createElement("div",{className:"jp-search-dashboard-upsell-page"},r().createElement(a.Z,{withHeader:!0,withFooter:!0,moduleName:__("Jetpack Search","jetpack-search-pkg"),a8cLogoHref:"https://www.jetpack.com"},r().createElement(c.Z,null,r().createElement(l.Z,{horizontalSpacing:3,horizontalGap:3},r().createElement(h.Z,{lg:6,md:6,sm:4},r().createElement("h1",null,__("The best WordPress search experience","jetpack-search-pkg")),r().createElement(f.Z,null)),r().createElement(h.Z,{lg:1,md:1,sm:0}),r().createElement(h.Z,{lg:5,md:6,sm:4},r().createElement(u.Z,{ctaText:__("Get Jetpack Search","jetpack-search-pkg"),icon:"data:image/svg+xml,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z' fill='%23000'/%3E%3C/svg%3E",infoText:m===s?_:k,onCtaClick:x,priceAfter:m,priceBefore:s,pricingCurrencyCode:b,title:__("Jetpack Search","jetpack-search-pkg")})))))))}},529:function(t,e,n){"use strict";n.d(e,{v:function(){return c}});n(3679);var i=n(9196),r=n.n(i),s=n(3807),o=n(5736);const __=o.__,a={type:"bar",options:{layout:{padding:{left:-10}},borderRadius:100,borderSkipped:"middle",indexAxis:"y",maintainAspectRatio:!1,aspectRatio:1.3,barThickness:24,scales:{x:{stacked:!0,grid:{display:!1,drawBorder:!1},ticks:{display:!1}},y:{stacked:!0,grid:{display:!1,drawBorder:!1},ticks:{display:!1}}},plugins:{title:{display:!1},subtitle:{display:!1},legend:{display:!1,labels:{filter:function(t){return!t.text.includes(__("remaining","jetpack-search-pkg"))}}}}}};class c extends r().Component{constructor(t){super(t),this.canvasRef=r().createRef()}componentDidMount(){this.myChart=new s.Z(this.canvasRef.current,{...a,data:{labels:[""],datasets:this.props.data.map((t=>t.data))}}),this.forceUpdate()}getLegendItems(){var t,e;return null!==(t=null===(e=this.myChart)||void 0===e?void 0:e.legend.legendItems)&&void 0!==t?t:[]}render(){var t,e;return!1===this.props.isValid?null:r().createElement("div",{className:"jp-search-bar-chart"},r().createElement("div",{className:"jp-search-bar-chart__container"},r().createElement("canvas",{ref:this.canvasRef},r().createElement("p",null,__("Text alternative for this chart is in the data table below","jetpack-search-pkg")),r().createElement("table",{border:"0",cellPadding:"5",summary:"This is the text alternative for the canvas graphic."},r().createElement("caption",null,__("Records Indexed for Jetpack Search","jetpack-search-pkg")),r().createElement("tbody",null,r().createElement("tr",null,r().createElement("th",{scope:"col"},__("Post type","jetpack-search-pkg")),(null===(t=this.state)||void 0===t?void 0:t.legendItems.length)&&this.state.legendItems.map((t=>r().createElement("th",{key:t.text,scope:"col"},t.text)))),r().createElement("tr",null,r().createElement("th",{scope:"row"},__("Record count","jetpack-search-pkg")),(null===(e=this.state)||void 0===e?void 0:e.legendItems.length)&&this.state.legendItems.map((t=>r().createElement("td",{key:t.text},this.props.data[t.datasetIndex].data.data)))))))),r().createElement("div",{className:"jp-search-chart-legend__container"},r().createElement("ul",{className:"jp-search-chart-legend"},this.getLegendItems().map((t=>{var e,n;const i=null===(e=this.props.data[t.datasetIndex])||void 0===e||null===(n=e.data)||void 0===n?void 0:n.data,s=Array.isArray(i)?i[0]:null;return r().createElement("li",{key:t.text},r().createElement("div",{className:"jp-search-chart-legend__box",style:{backgroundColor:t.fillStyle}}),r().createElement("span",{className:"jp-search-chart-legend__label",children:t.text}),r().createElement("span",{className:"jp-search-chart-legend__count"},"(","number"==typeof s?s.toLocaleString():s,")"))})))))}}},8904:function(t,e,n){"use strict";n.d(e,{Z:function(){return h}});var i=n(9196),r=n.n(i),s=n(5736),o=n(529),a=n(1299),c=n(1307),l=n(439);const __=s.__;function h(t){let{postCount:e,postTypeBreakdown:n,tierMaximumRecords:s,lastIndexedDate:h}=t;const[u,d]=(0,i.useState)((0,l.ZP)(e,n,s,h));return r().createElement("div",{className:"jp-search-record-meter jp-search-dashboard-wrap","data-testid":"record-meter"},r().createElement("div",{className:"jp-search-dashboard-row"},r().createElement("div",{className:"lg-col-span-2 md-col-span-1 sm-col-span-0"}),r().createElement("div",{className:"jp-search-record-meter__content lg-col-span-8 md-col-span-6 sm-col-span-4"},r().createElement("h2",null, +/* translators: 'Your search index' is a breakdown of the site's indexed post type content, + such as the number of indexed posts, pages etc. */ +__("Your search index","jetpack-search-pkg")),r().createElement("div",null,r().createElement(a.D,{recordCount:u.recordCount,tierMaximumRecords:s}),r().createElement(o.v,{data:u.data,isValid:u.isValid,postTypeBreakdown:n}),r().createElement(c.f,{recordCount:u.recordCount,tierMaximumRecords:s,hasBeenIndexed:u.hasBeenIndexed,hasValidData:u.hasValidData,hasItems:u.hasItems}))),r().createElement("div",{className:"lg-col-span-2 md-col-span-1 sm-col-span-0"})))}},439:function(t,e,n){"use strict";n.d(e,{ZP:function(){return s}});var i=n(5736);const __=i.__,r=n(550);function s(t,e,n,i){const s=[],c=[];let l=0,h=!0,u=!0,d=!0;"object"==typeof e&&"string"==typeof i||(h=!1),void 0!==i&&void 0!==t||(u=!1);const p=h&&u?Object.keys(e).length:0;0===p&&(d=!1);const f=[r.colors["Blue 30"],r.colors["Orange 30"],r.colors["WooCommerce Purple 30"],r.colors["Green 30"],r.colors["Yellow 30"]];if(p>0&&h&&u){for(let t=0;t<p;t++){const n=Object.values(e)[t],{count:i,slug:r}=n;c.push({data:a(i,f[t],r)}),l+=i}const t=function(t,e,n){t.sort(((t,e)=>t.data.data[0]<e.data.data[0]?1:-1));const i=n<=e?n:e;return{includedItems:t.slice(0,i),otherItems:t.slice(i,e)}}(c,p,5);for(const e in t.includedItems)s.push({data:a(t.includedItems[e].data.data[0],f[e],t.includedItems[e].data.label)});t.otherItems.length>0&&s.push({data:a(o(t.otherItems),r.colors["Gray 30"],"other")}),"number"==typeof n&&n-l>0&&s.push({data:a(n-l,r.colors["Gray 0"],__("remaining","jetpack-search-pkg"))})}return{data:s,recordCount:l,hasBeenIndexed:u,hasValidData:h,hasItems:d,isValid:u&&h&&d}}function o(t){let e=0;for(const n in t)e=t[n].data.data[0]+e;return e}function a(t,e,n){return{data:[t],label:n,backgroundColor:e}}},1307:function(t,e,n){"use strict";n.d(e,{f:function(){return l}});n(3679);var i=n(9196),r=n.n(i),s=n(5736),o=n(4034),a=n(8448);const __=s.__,c="jetpack-search-dismissed-notices";function l(t){var e;const n=[],l=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{1:{id:1,message:__("Search was unable to locate your content. Jetpack's servers ran into a problem when trying to communicate with your site, which is needed for Search to work properly.","jetpack-search-pkg"),isImportant:!0},2:{id:2,message:__("Your content has not yet been indexed for Search","jetpack-search-pkg")},3:{id:3,message:__("We weren't able to locate any content for Search to index. Perhaps you don't yet have any posts or pages?","jetpack-search-pkg")},4:{id:4,message:(0,s.sprintf)(// translators: %s: site's current plan record limit +__("You recently surpassed %d records and will be automatically upgraded to the next billing tier <p> learn more <p>","jetpack-search-pkg"),t),link:{text:__("learn more","jetpack-search-pkg"),url:"https://jetpack.com/support/search/product-pricing/"}},5:{id:5,message:(0,s.sprintf)(// translators: %s: site's current plan record limit +__("You're close to the max amount of records for this billing tier. Once you hit %s indexed records, you'll automatically be billed for <br> the next tier <p> learn more <p>","jetpack-search-pkg"),t),link:{text:__("learn more","jetpack-search-pkg"),url:"https://jetpack.com/support/search/product-pricing/"}}}}(t.tierMaximumRecords),[h,u]=(0,i.useState)(!0),d=null!==(e=sessionStorage.getItem(c))&&void 0!==e?e:"";if(!1===t.hasValidData&&!d.includes("1")&&n.push("1"),!1===t.hasBeenIndexed&&!d.includes("2")&&n.push("2"),!1===t.hasItems&&!d.includes("3")&&n.push("3"),"number"==typeof t.tierMaximumRecords&&t.recordCount>t.tierMaximumRecords&&!d.includes("4")&&n.push("4"),"number"==typeof t.tierMaximumRecords&&t.recordCount>.8*t.tierMaximumRecords&&t.recordCount<t.tierMaximumRecords&&!d.includes("5")&&n.push("5"),n.length<1||!h)return null;const p=l[n[0]],f=p.isImportant?"jp-search-notice-box jp-search-notice-box__important":"jp-search-notice-box";return r().createElement(o.Z,{isCompact:!1,status:"is-info",className:f,onDismissClick:()=>{u(!1),d.includes(p.id)||sessionStorage.setItem(c,d+p.id)}},p.message,p.link&&r().createElement(a.Z,{href:p.link.url,external:!0},p.link.text))}},1299:function(t,e,n){"use strict";n.d(e,{D:function(){return a}});var i=n(9196),r=n.n(i),s=n(5736),o=n(9307);const __=s.__;function a(t){var e,n;if(!t.recordCount)return null;const i="number"==typeof t.recordCount?null===(e=t.recordCount)||void 0===e?void 0:e.toLocaleString():t.recordCount,a="number"==typeof t.tierMaximumRecords?null===(n=t.tierMaximumRecords)||void 0===n?void 0:n.toLocaleString():t.tierMaximumRecords;let c;return c=a?(0,o.createInterpolateElement)((0,s.sprintf)(// translators: %1$s: site's current record count, %2$s: record limit of the current plan +__("<s>%1$s</s> records indexed out of the <s>%2$s</s> allotted for your current plan","jetpack-search-pkg"),i,a),{s:r().createElement("strong",null)}):(0,o.createInterpolateElement)((0,s.sprintf)(// translators: %1$s: site's current record count, %2$s: record limit of the current plan +__("<s>%1$s</s> records indexed","jetpack-search-pkg"),i),{s:r().createElement("strong",null)}),r().createElement("div",{"data-testid":"record-count",className:"jp-search-record-count"},r().createElement("p",null,c))}},6204:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(9196),r=n.n(i),s=n(5736);const __=s.__;function o(){return r().createElement("div",{className:"jp-search-dashboard-promotion"},r().createElement("h3",null,__("Allow viewers to search through your site's records, lightning fast.","jetpack-search-pkg")),r().createElement("ul",{className:"jp-product-promote"},r().createElement("li",null,__("Customizable filtering","jetpack-search-pkg")),r().createElement("li",null,__("Support for 29 languages","jetpack-search-pkg")),r().createElement("li",null,__("Content displayed within results is updated in real-time","jetpack-search-pkg")),r().createElement("li",null,__("If you grow into a new pricing tier, we'll let you know before your next billing cycle","jetpack-search-pkg")),r().createElement("li",null,__("Best-in-class support","jetpack-search-pkg"))))}},7436:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(9196),r=n.n(i),s=n(5736);const __=s.__;function o(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{upgrade:!0};return r().createElement("a",{className:"jp-instant-search-upsell-nudge jp-search-dashboard-cut",href:t.href},r().createElement("span",null,__("Offer instant search results to your visitors as soon as they start typing. ","jetpack-search-pkg")),r().createElement("span",null,t.upgrade&&r().createElement("b",null,__("Upgrade to Jetpack Instant Search now","jetpack-search-pkg")),!t.upgrade&&r().createElement("b",null,__("Purchase Jetpack Instant Search now","jetpack-search-pkg"))))}},7011:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var i=n(9818),r=n(428);function s(){const t=(0,i.useSelect)((t=>t(r.t).getConnectionStatus()),[]);return{connectionStatus:t,isFullyConnected:Object.keys(t).length&&t.isUserConnected&&t.isRegistered}}},8210:function(t,e,n){"use strict";var i=n(1862),r=n(8385),s=n(5867),o=n(3459),a=n(8552);const c={...i.ZP,...r.ZP,...s.ZP,...o.ZP,...a.ZP};e.Z=c},1862:function(t,e,n){"use strict";n.d(e,{dz:function(){return h},ff:function(){return u}});var i=n(1962),r=n.n(i),s=n(9818),o=n(5736),a=n(7029),c=n(3459),l=n(2897);const __=o.__,h="SET_JETPACK_SETTINGS";function u(t){return{type:h,options:t}}e.ZP={updateJetpackSettings:function*(t){try{yield(0,c.Iz)(),yield u({is_updating:!0}),yield u(t),yield(0,a.RF)(t);const e=yield(0,a.es)();return yield u(e),(0,c.RT)(__("Updated settings.","jetpack-search-pkg"))}catch(t){const e=r()((0,s.select)(l.t).getSearchModuleStatus(),["module_active","instant_search_enabled"]);return yield u(e),(0,c.tF)(__("Error Update settings…","jetpack-search-pkg"))}finally{yield(0,c.MQ)(),yield u({is_updating:!1})}},setJetpackSettings:u}},8552:function(t,e,n){"use strict";n.d(e,{Hb:function(){return i},l0:function(){return r}});const i="SET_SEARCH_PRICING";function r(t){return{type:"SET_SEARCH_PRICING",options:t}}e.ZP={setSearchPricing:r}},8385:function(t,e,n){"use strict";n.d(e,{$w:function(){return r},og:function(){return s}});var i=n(7029);const r="SET_SEARCH_PLAN_INFO";function s(t){return{type:"SET_SEARCH_PLAN_INFO",options:t}}e.ZP={setSearchPlanInfo:s,fetchSearchPlanInfo:i.FZ}},5867:function(t,e,n){"use strict";n.d(e,{Em:function(){return i},XV:function(){return r}});const i="SET_SEARCH_STATS";function r(t){return{type:"SET_SEARCH_STATS",options:t}}e.ZP={setSearchStats:r}},7029:function(t,e,n){"use strict";n.d(e,{FZ:function(){return u},RF:function(){return h},UP:function(){return p},Yt:function(){return d},es:function(){return l}});var i=n(4743);const r="FETCH_JETPACK_SETTINGS",s="UPDATE_JETPACK_SETTINGS",o="FETCH_SEARCH_PLAN_INFO",a="FETCH_SEARCH_STATS",c="FETCH_SEARCH_PRICING",l=()=>({type:r}),h=t=>({type:s,settings:t});function*u(){return yield{type:o}}const d=()=>({type:a}),p=()=>({type:c});e.ZP={[r]:function(){return i.ZP.fetchSearchSettings()},[s]:function(t){return i.ZP.updateSearchSettings(t.settings)},[o]:function(){return i.ZP.fetchSearchPlanInfo()},[a]:function(){return i.ZP.fetchSearchStats()},[c]:function(){return i.ZP.fetchSearchPricing()}}},2897:function(t,e,n){"use strict";n.d(e,{i:function(){return l},t:function(){return c}});var i=n(7529),r=n(8210),s=n(8869),o=n(5440),a=n(7029);const c="jetpack-search-plugin",l={reducer:i.Z,actions:r.Z,selectors:s.Z,resolvers:o.ZP,controls:a.ZP,initialState:window.JETPACK_SEARCH_DASHBOARD_INITIAL_STATE||{}}},3326:function(t,e){"use strict";e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t}},7529:function(t,e,n){"use strict";var i=n(9818),r=n(5934),s=n(6819),o=n(3784),a=n(8006),c=n(460),l=n(3326),h=n(2963),u=n(4628);const d=(0,i.combineReducers)({siteData:r.Z,jetpackSettings:o.Z,sitePlan:a.Z,siteStats:c.Z,userData:s.Z,features:l.Z,notices:h.Z,searchPricing:u.Z});e.Z=d},3784:function(t,e,n){"use strict";var i=n(1862);e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return e.type===i.dz?{...t,...e.options,is_toggling_module:t.module_active!==e.options.module_active&&!!e.options.is_updating,is_toggling_instant_search:t.instant_search_enabled!==e.options.instant_search_enabled&&!!e.options.is_updating}:t}},4628:function(t,e,n){"use strict";var i=n(8552);e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return e.type===i.Hb?{...t,...e.options}:t}},5934:function(t,e){"use strict";e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t}},8006:function(t,e,n){"use strict";var i=n(8385);e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return e.type===i.$w?{...t,...e.options}:t}},460:function(t,e,n){"use strict";var i=n(5867);e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return e.type===i.Em?{...t,...e.options}:t}},6819:function(t,e){"use strict";e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t}},5440:function(t,e,n){"use strict";var i=n(5736),r=n(7029),s=n(1862),o=n(8385),a=n(5867),c=n(3459),l=n(8552);const __=i.__;e.ZP={getSearchModuleStatus:function*(){try{const t=yield(0,r.es)();if(t)return(0,s.ff)(t)}catch(t){return(0,c.tF)(__("Error fetching settings…","jetpack-search-pkg"))}},getSearchPlanInfo:function*(){try{const t=yield(0,r.FZ)();if(t)return(0,o.og)(t)}catch(t){return(0,c.tF)(__("Error fetching search plan…","jetpack-search-pkg"))}},getSearchStats:function*(){try{const t=yield(0,r.Yt)();if(t)return(0,a.XV)(t)}catch(t){return(0,c.tF)(__("Error fetching search stats","jetpack-search-pkg"))}},getSearchPricing:function*(){try{const t=yield(0,r.UP)();if(t)return(0,l.l0)(t)}catch(t){}}}},6770:function(t,e,n){"use strict";n(3679);const i={isFeatureEnabled:(t,e)=>Array.isArray(t.features)&&t.features.includes(e)};e.Z=i},8869:function(t,e,n){"use strict";var i=n(5101),r=n(362),s=n(1957),o=n(5614),a=n(5260),c=n(6770),l=n(4220),h=n(741);const u={...i.Z,...r.Z,...s.Z,...o.Z,...a.Z,...c.Z,...l.Z,...h.Z};e.Z=u},362:function(t,e){"use strict";e.Z={getSearchModuleStatus:t=>t.jetpackSettings,isModuleEnabled:t=>t.jetpackSettings.module_active,isInstantSearchEnabled:t=>t.jetpackSettings.instant_search_enabled,isUpdatingJetpackSettings:t=>t.jetpackSettings.is_updating,isTogglingModule:t=>t.jetpackSettings.is_toggling_module,isTogglingInstantSearch:t=>t.jetpackSettings.is_toggling_instant_search}},741:function(t,e){"use strict";e.Z={getSearchPricing:t=>t.searchPricing,getPriceBefore:t=>{var e;return null!==(e=t.searchPricing.full_price)&&void 0!==e?e:0},getPriceAfter:t=>{var e;return null!==(e=t.searchPricing.discount_price)&&void 0!==e?e:0},getPriceCurrencyCode:t=>{var e;return null!==(e=t.searchPricing.currency_code)&&void 0!==e?e:"USD"}}},5101:function(t,e){"use strict";e.Z={getAPIRootUrl:t=>{var e,n;return null!==(e=null===(n=t.siteData)||void 0===n?void 0:n.WP_API_root)&&void 0!==e?e:null},getAPINonce:t=>{var e,n;return null!==(e=null===(n=t.siteData)||void 0===n?void 0:n.WP_API_nonce)&&void 0!==e?e:null},getRegistrationNonce:t=>{var e,n;return null!==(e=null===(n=t.siteData)||void 0===n?void 0:n.registrationNonce)&&void 0!==e?e:null},getSiteAdminUrl:t=>{var e,n;return null!==(e=null===(n=t.siteData)||void 0===n?void 0:n.adminUrl)&&void 0!==e?e:null},isInstantSearchPromotionActive:t=>{var e,n;return null===(e=null===(n=t.siteData)||void 0===n?void 0:n.showPromotions)||void 0===e||e},getBlogId:t=>{var e,n;return null!==(e=null===(n=t.siteData)||void 0===n?void 0:n.blogId)&&void 0!==e?e:0},getVersion:t=>{var e,n;return null!==(e=null===(n=t.siteData)||void 0===n?void 0:n.version)&&void 0!==e?e:"development"},getCalypsoSlug:t=>{var e;return null===(e=t.siteData)||void 0===e?void 0:e.calypsoSlug}}},1957:function(t,e){"use strict";e.Z={getSearchPlanInfo:t=>t.sitePlan,hasBusinessPlan:t=>t.sitePlan.supports_only_classic_search,hasActiveSearchPurchase:t=>t.sitePlan.supports_instant_search,supportsInstantSearch:t=>t.sitePlan.supports_instant_search,supportsOnlyClassicSearch:t=>t.sitePlan.supports_only_classic_search,getUpgradeBillPeriod:t=>{var e;return null===(e=t.sitePlan)||void 0===e?void 0:e.default_upgrade_bill_period},supportsSearch:t=>t.sitePlan.supports_instant_search||t.sitePlan.supports_only_classic_search,getTierMaximumRecords:t=>t.sitePlan.tier_maximum_records}},4220:function(t,e){"use strict";e.Z={getSearchStats:t=>t.siteStats,getPostCount:t=>{var e;return null===(e=t.siteStats)||void 0===e?void 0:e.post_count},getPostTypeBreakdown:t=>{var e;return null===(e=t.siteStats)||void 0===e?void 0:e.post_type_breakdown},getLastIndexedDate:t=>{var e;return null===(e=t.siteStats)||void 0===e?void 0:e.last_indexed_date}}},5614:function(t,e){"use strict";e.Z={getWpcomUser:t=>{var e,n;return null===(e=t.userData)||void 0===e||null===(n=e.currentUser)||void 0===n?void 0:n.wpcomUser}}},3070:function(t,e,n){"use strict";function i(t){let{product:e="jetpack_search",isUserConnected:n=!0,siteSuffix:i,redirectUrl:r=""}=t;const s=new URL("https://wordpress.com/checkout/"),o=new URL(`${s}${i}/${e}`);return o.searchParams.set("redirect_to",r),n||o.searchParams.set("unlinked",1),o.searchParams.set("site",i),o.toString()}n.d(e,{Z:function(){return i}})},8420:function(t){"use strict";if(void 0==={consumer_slug:"jetpack-search"}){var e=new Error('Cannot find module \'{"consumer_slug":"jetpack-search"}\'');throw e.code="MODULE_NOT_FOUND",e}t.exports={consumer_slug:"jetpack-search"}},9196:function(t){"use strict";t.exports=window.React},1850:function(t){"use strict";t.exports=window.ReactDOM},2819:function(t){"use strict";t.exports=window.lodash},5609:function(t){"use strict";t.exports=window.wp.components},9818:function(t){"use strict";t.exports=window.wp.data},9307:function(t){"use strict";t.exports=window.wp.element},5736:function(t){"use strict";t.exports=window.wp.i18n},6483:function(t){"use strict";t.exports=window.wp.url},550:function(t){"use strict";t.exports=JSON.parse('{"version":"2.5.0","colors":{"White":"#fff","Black":"#000","Gray":"#646970","Gray 0":"#f6f7f7","Gray 5":"#dcdcde","Gray 10":"#c3c4c7","Gray 20":"#a7aaad","Gray 30":"#8c8f94","Gray 40":"#787c82","Gray 50":"#646970","Gray 60":"#50575e","Gray 70":"#3c434a","Gray 80":"#2c3338","Gray 90":"#1d2327","Gray 100":"#101517","Blue":"#0675c4","Blue 0":"#e9f0f5","Blue 5":"#bbe0fa","Blue 10":"#91caf2","Blue 20":"#68b3e8","Blue 30":"#399ce3","Blue 40":"#1689db","Blue 50":"#0675c4","Blue 60":"#055d9c","Blue 70":"#044b7a","Blue 80":"#02395c","Blue 90":"#01283d","Blue 100":"#001621","Purple":"#984a9c","Purple 0":"#f2e9ed","Purple 5":"#ebcee0","Purple 10":"#e3afd5","Purple 20":"#d48fc8","Purple 30":"#c475bd","Purple 40":"#b35eb1","Purple 50":"#984a9c","Purple 60":"#7c3982","Purple 70":"#662c6e","Purple 80":"#4d2054","Purple 90":"#35163b","Purple 100":"#1e0c21","Pink":"#c9356e","Pink 0":"#f5e9ed","Pink 5":"#f2ceda","Pink 10":"#f7a8c3","Pink 20":"#f283aa","Pink 30":"#eb6594","Pink 40":"#e34c84","Pink 50":"#c9356e","Pink 60":"#ab235a","Pink 70":"#8c1749","Pink 80":"#700f3b","Pink 90":"#4f092a","Pink 100":"#260415","Red":"#d63638","Red 0":"#f7ebec","Red 5":"#facfd2","Red 10":"#ffabaf","Red 20":"#ff8085","Red 30":"#f86368","Red 40":"#e65054","Red 50":"#d63638","Red 60":"#b32d2e","Red 70":"#8a2424","Red 80":"#691c1c","Red 90":"#451313","Red 100":"#240a0a","Orange":"#b26200","Orange 0":"#f5ece6","Orange 5":"#f7dcc6","Orange 10":"#ffbf86","Orange 20":"#faa754","Orange 30":"#e68b28","Orange 40":"#d67709","Orange 50":"#b26200","Orange 60":"#8a4d00","Orange 70":"#704000","Orange 80":"#543100","Orange 90":"#361f00","Orange 100":"#1f1200","Yellow":"#9d6e00","Yellow 0":"#f5f1e1","Yellow 5":"#f5e6b3","Yellow 10":"#f2d76b","Yellow 20":"#f0c930","Yellow 30":"#deb100","Yellow 40":"#c08c00","Yellow 50":"#9d6e00","Yellow 60":"#7d5600","Yellow 70":"#674600","Yellow 80":"#4f3500","Yellow 90":"#320","Yellow 100":"#1c1300","Green":"#008a20","Green 0":"#e6f2e8","Green 5":"#b8e6bf","Green 10":"#68de86","Green 20":"#1ed15a","Green 30":"#00ba37","Green 40":"#00a32a","Green 50":"#008a20","Green 60":"#007017","Green 70":"#005c12","Green 80":"#00450c","Green 90":"#003008","Green 100":"#001c05","Celadon":"#008763","Celadon 0":"#e4f2ed","Celadon 5":"#a7e8d3","Celadon 10":"#66deb9","Celadon 20":"#31cc9f","Celadon 30":"#09b585","Celadon 40":"#009e73","Celadon 50":"#008763","Celadon 60":"#007053","Celadon 70":"#005c44","Celadon 80":"#004533","Celadon 90":"#003024","Celadon 100":"#001c15","WordPress Blue":"#006088","WordPress Blue 0":"#e6f1f5","WordPress Blue 5":"#bedae6","WordPress Blue 10":"#98c6d9","WordPress Blue 20":"#6ab3d0","WordPress Blue 30":"#3895ba","WordPress Blue 40":"#187aa2","WordPress Blue 50":"#006088","WordPress Blue 60":"#004e6e","WordPress Blue 70":"#003c56","WordPress Blue 80":"#002c40","WordPress Blue 90":"#001d2d","WordPress Blue 100":"#00101c","Simplenote Blue":"#3361cc","Simplenote Blue 0":"#e9ecf5","Simplenote Blue 5":"#ced9f2","Simplenote Blue 10":"#abc1f5","Simplenote Blue 20":"#84a4f0","Simplenote Blue 30":"#618df2","Simplenote Blue 40":"#4678eb","Simplenote Blue 50":"#3361cc","Simplenote Blue 60":"#1d4fc4","Simplenote Blue 70":"#113ead","Simplenote Blue 80":"#0d2f85","Simplenote Blue 90":"#09205c","Simplenote Blue 100":"#05102e","WooCommerce Purple":"#7f54b3","WooCommerce Purple 0":"#f7edf7","WooCommerce Purple 5":"#e5cfe8","WooCommerce Purple 10":"#d6b4e0","WooCommerce Purple 20":"#c792e0","WooCommerce Purple 30":"#af7dd1","WooCommerce Purple 40":"#9a69c7","WooCommerce Purple 50":"#7f54b3","WooCommerce Purple 60":"#674399","WooCommerce Purple 70":"#533582","WooCommerce Purple 80":"#3c2861","WooCommerce Purple 90":"#271b3d","WooCommerce Purple 100":"#140e1f","Jetpack Green":"#069e08","Jetpack Green 0":"#f0f2eb","Jetpack Green 5":"#d0e6b8","Jetpack Green 10":"#9dd977","Jetpack Green 20":"#64ca43","Jetpack Green 30":"#2fb41f","Jetpack Green 40":"#069e08","Jetpack Green 50":"#008710","Jetpack Green 60":"#007117","Jetpack Green 70":"#005b18","Jetpack Green 80":"#004515","Jetpack Green 90":"#003010","Jetpack Green 100":"#001c09"}}')}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var s=e[i]={id:i,loaded:!1,exports:{}};return t[i](s,s.exports,n),s.loaded=!0,s.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){"use strict";var t=n(1850),e=n.n(t),i=n(9196),r=n.n(i),s=n(9818),o=n(2897),a=n(2341);const c=(0,s.createReduxStore)(o.t,o.i);function l(){const t=document.getElementById("jp-search-dashboard");null!==t&&e().render(r().createElement(a.Z,null),t)}(0,s.register)(c),"loading"!==document.readyState?l():document.addEventListener("DOMContentLoaded",l)}()}();
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.js.LICENSE.txt b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.js.LICENSE.txt new file mode 100644 index 00000000..3a638bad --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.js.LICENSE.txt @@ -0,0 +1,20 @@ +/* + * Exposes number format capability + * + * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors). + * @license See CREDITS.md + * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js + */ + +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ + +/*! + * Chart.js v3.7.1 + * https://www.chartjs.org + * (c) 2022 Chart.js Contributors + * Released under the MIT License + */ diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.rtl.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.rtl.css new file mode 100644 index 00000000..969e1d52 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/dashboard/jp-search-dashboard.rtl.css @@ -0,0 +1 @@ +.jp-search-dashboard-page-loading-spinner{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}@keyframes rotate-spinner{to{transform:rotate(-1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-left-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}.jp-search-dashboard-promotion h1{font-size:var(--font-title-large);font-weight:600;line-height:1.2}.jp-search-dashboard-promotion ul.jp-product-promote li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-right:30px}.jp-search-dashboard-connection-screen{align-items:center;background:var(--jp-white-off);display:flex;width:100%}.jp-search-dashboard-connection-screen>div{width:100%}.jp-search-dashboard-connection-screen .jp-components__pricing-card .components-spinner{margin:0}.jp-search-dashboard-connection-screen .jp-search-dashboard-connection-footer__text{color:#3c434a;font-size:10.5px;font-weight:400;letter-spacing:-.02em;margin:0;text-align:center}.jp-search-dashboard-connection-screen .jp-search-dashboard-connection-footer__link{color:#3c434a}@media(min-width:1080px){.jp-connection__connect-screen-layout__left{width:70%}.jp-connection__connect-screen-required-plan{background:linear-gradient(270deg,#fff 70%,#f9f9f6 0);position:relative}}.jp-connection__connect-screen-required-plan__loading{display:none}@media(min-width:1080px){.jp-connection__connect-screen-required-plan__pricing-card{position:absolute;right:62%;top:14%}}.jp-connection__connect-screen-required-plan__pricing-card .jp-action-button--button.components-button{align-items:center;background:var(--jp-black)!important;border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;font-weight:500;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-connection__connect-screen-required-plan__with-subscription{margin-top:38px}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button{display:inline}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button{background:inherit!important;color:var(--jp-black)!important;display:inline;font-size:var(--font-title-small);font:inherit;height:auto;line-height:20px;min-width:0;padding:0;text-decoration:underline;width:auto}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button:hover{background:inherit;text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-required-plan__with-subscription .jp-action-button--button.components-button:focus{background:inherit;box-shadow:none!important}.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__inner,.jp-connection__connect-screen-required-plan__with-subscription .jp-components-spinner__outer{border-left-color:var(--jp-black);border-top-color:var(--jp-black)}.jp-action-button--button{background:#000}.jp-action-button--button,.jp-action-button--button.components-button{border-radius:4px;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;font-style:normal;font-weight:600;height:40px;line-height:18px;min-width:264px;text-align:center}.jp-action-button__error{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIgc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIiBmaWxsPSIjRDYzNjM5Ii8+PC9zdmc+) no-repeat 100% 0;color:var(--jp-red)!important;line-height:25px!important;padding-right:25px}.jp-connection__connect-screen-layout{background:var(--jp-white);border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.08)}.jp-connection__connect-screen-layout__loading{display:none}.jp-connection__connect-screen-layout__left,.jp-connection__connect-screen-layout__right{box-sizing:border-box}.jp-connection__connect-screen-layout__left{padding:25px}@media(min-width:600px){.jp-connection__connect-screen-layout__left{padding:64px 96px}}.jp-connection__connect-screen-layout__left .jetpack-logo{margin-bottom:24px}.jp-connection__connect-screen-layout__left h2{color:var(--jp-black);font-size:36px;font-style:normal;font-weight:700;line-height:40px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left h3{color:var(--jp-black);font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left li,.jp-connection__connect-screen-layout__left p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.jp-connection__connect-screen-layout__left p{color:#101517;margin:16px 0}.jp-connection__connect-screen-layout__left a{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__connect-screen-layout__left a:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-layout__left a:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__connect-screen-layout__left ul{list-style-type:none;padding:0}.jp-connection__connect-screen-layout__left ul li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-right:30px}.jp-connection__connect-screen-layout__right{padding:64px 0}.jp-connection__connect-screen-layout__right img{max-width:100%}.jp-connection__connect-screen-layout__two-columns{display:flex;flex-wrap:wrap}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:100%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:52%}}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{background:#f9f9f6;display:none;flex-basis:47%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{display:block}}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-10:#f2cf75;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var( --jp-green-40 );--jp-green-secondary:var( --jp-green-30 );--jp-border-radius:4px;--jp-menu-border-height:1px;--jp-underline-thickness:2px}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-components__pricing-card{background:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 10px 40px rgba(0,0,0,.08);max-width:384px;padding:24px 24px 32px;width:-moz-fit-content;width:fit-content}@media screen and (min-width:600px){.jp-components__pricing-card{padding:32px 32px 44px}}.jp-components__pricing-card__icon img{height:32px;width:32px}.jp-components__pricing-card__title{color:#101517;font-size:32px;line-height:38px;margin:16px 0 24px}.jp-components__pricing-card__pricing{display:flex;flex-wrap:wrap}.jp-components__pricing-card__price-after,.jp-components__pricing-card__price-before{display:inline-block;font-size:54px;font-weight:700;line-height:40px;margin-bottom:8px;padding:0 2px}.jp-components__pricing-card__price-before{color:var(--jp-gray-20);margin-left:16px;position:relative}.jp-components__pricing-card__price-strikethrough{background:var(--jp-pink);border-radius:1.5px;height:3px;position:absolute;right:0;top:20px;width:100%}.jp-components__pricing-card__price-after{color:var(--jp-black)}.jp-components__pricing-card__currency{font-size:var(--font-title-small);font-weight:400;line-height:20px;vertical-align:super}.jp-components__pricing-card__price-details{align-self:flex-end;color:var(--jp-gray-50);font-size:14px;font-weight:400;letter-spacing:-.02em;line-height:17px;margin-bottom:8px}.jp-components__pricing-card__price-decimal{font-size:var(--font-label);line-height:14px;vertical-align:top}.jp-components__pricing-card__button{align-items:center;background:var(--jp-black);border-radius:var(--jp-border-radius);color:var(--jp-white)!important;font-size:18px;height:auto;justify-content:center;margin:24px 0 32px;padding:14px 24px;width:100%}.jp-components__pricing-card__info{color:var(--jp-gray-60);font-size:var(--font-label);letter-spacing:-.02em;line-height:20px}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off)}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1128px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;max-width:var(--max-container-width);width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));padding:0 24px}}.SqdhUZkXCRuIpErj1B3z.OZC_9a1LhpWF9dv15Gdh{max-width:none;padding:unset}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.jp-search-dashboard-upsell-page{line-height:1.5;width:100%}.jp-search-dashboard-upsell-page h1{line-height:1.2}.jp-search-dashboard-upsell-page>div{margin-right:0}.sexr0jUxC1jVixdKiDnC{margin-right:-20px}@media(max-width:782px){.sexr0jUxC1jVixdKiDnC{margin-right:-10px}}.sexr0jUxC1jVixdKiDnC.vKQ11sLeAM45M04P1ccj{background-color:var(--jp-white)}.jp-dashboard-footer{align-items:center;color:#000;display:flex;flex-flow:row wrap;justify-content:space-between;max-width:1128px;width:100%}.jp-dashboard-footer a,.jp-dashboard-footer a:hover,.jp-dashboard-footer a:visited{color:#000;text-decoration:none}.jp-dashboard-footer__jetpack-symbol,.jp-dashboard-footer__module-name{display:inline-block;vertical-align:middle}.jp-dashboard-footer__module-name{font-size:12px;font-weight:600;margin-right:5px}.dops-button{-webkit-appearance:none;appearance:none;background:#f6f7f7;border:1px solid #2271b1;border-radius:3px;box-sizing:border-box;color:#2271b1;cursor:pointer;display:inline-block;font-size:.875rem;margin:0;outline:0;overflow:hidden;padding:7px 14px 9px;text-decoration:none;text-overflow:ellipsis;vertical-align:top}.dops-button:hover{background:#f0f0f1;border-color:#0a4b78;color:#0a4b78}.dops-button:disabled,.dops-button[disabled]{background:#fff;border-color:#eee;color:#eee;cursor:default}.dops-button:focus{background:#fff;border-color:#2271b1;box-shadow:0 0 0 1px #2271b1}.dops-button.is-compact{line-height:2;padding:0 10px}.dops-button.is-compact:disabled{color:#eee}.dops-button.is-compact .gridicon{margin-top:-8px;top:4px}.dops-button.is-compact .gridicons-plus-small{margin-right:-4px}.dops-button.is-compact .gridicons-plus-small:last-of-type{margin-right:0}.dops-button.is-compact .gridicons-plus-small+.gridicon{margin-right:-4px}.dops-button.hidden{display:none}.dops-button .gridicon{height:18px;margin-top:-2px;position:relative;top:4px;width:18px}.dops-button.is-primary{background:#3582c4;border-color:#3582c4;color:#fff}.dops-button.is-primary:focus,.dops-button.is-primary:hover{background:#2271b1;border-color:#2271b1;color:#fff}.dops-button.is-primary:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2271b1}.dops-button.is-primary:disabled,.dops-button.is-primary[disabled]{background-color:#008ec2!important;border-color:#008ec2!important;box-shadow:none!important;color:#66c6e4!important;cursor:default;text-shadow:none!important}.dops-button.is-primary.is-compact{color:#fff;white-space:nowrap}.dops-button.is-scary{color:#d94f4f}.dops-button.is-scary:focus,.dops-button.is-scary:hover{border-color:#d94f4f}.dops-button.is-scary:focus{box-shadow:0 0 0 2px #eba3a3}.dops-button.is-scary:disabled,.dops-button.is-scary[disabled]{border-color:#eee;color:#f4cdcd}.dops-button.is-primary.is-scary{background:#d94f4f;border-color:#a02222;color:#fff}.dops-button.is-primary.is-scary:focus,.dops-button.is-primary.is-scary:hover{border-color:#4c1010}.dops-button.is-primary.is-scary:disabled,.dops-button.is-primary.is-scary[disabled]{background:#eba3a3;border-color:#e48484}.dops-button.is-borderless{border:none;color:#888;padding-left:0;padding-right:0}.dops-button.is-borderless:hover{color:#414141}.dops-button.is-borderless:focus{box-shadow:none}.dops-accessible-focus .dops-button.is-borderless:focus{outline:thin dotted}.dops-button.is-borderless .gridicon{height:24px;top:6px;width:24px}.dops-button.is-borderless:disabled,.dops-button.is-borderless[disabled]{background:#fff;color:#eee;cursor:default}.dops-button.is-borderless:disabled:active,.dops-button.is-borderless[disabled]:active{border-width:0}.dops-button.is-borderless.is-scary{color:#d94f4f}.dops-button.is-borderless.is-scary:focus,.dops-button.is-borderless.is-scary:hover{color:#a02222}.dops-button.is-borderless.is-scary[disabled]{color:#f4cdcd}.dops-button.is-borderless.is-compact{background:transparent;border-radius:0}.dops-button.is-borderless.is-compact .gridicon{height:18px;top:5px;width:18px}.dops-card{background:#fff;box-shadow:0 0 0 1px #c3c4c7,0 1px 1px 1px rgba(0,0,0,.04);box-sizing:border-box;display:block;margin:0 auto 10px;padding:16px;position:relative}.dops-card:after{clear:both;content:".";display:block;height:0;visibility:hidden}@media(min-width:481px){.dops-card{margin-bottom:16px;padding:24px}}.dops-card.is-compact{margin-bottom:1px}@media(min-width:481px){.dops-card.is-compact{margin-bottom:1px;padding:16px 24px}}.dops-card.is-card-link{padding-left:48px}h2.dops-card-title{font-size:rem(20px)}.dops-card__link-indicator{color:#d5d5d5;display:block;height:100%;left:16px;position:absolute;top:0}a.dops-card:hover .dops-card__link-indicator{color:#bbb}a.dops-card:focus{outline:0}a.dops-card:focus .dops-card__link-indicator{color:tint(#3582c4,20%)}.gridicon{fill:currentColor;display:inline-block}.gridicon.needs-offset g{transform:translate(-1px,1px)}.gridicon.needs-offset-x g{transform:translate(-1px)}.gridicon.needs-offset-y g{transform:translateY(1px)}.form-toggle[type=checkbox]{display:none}.form-toggle__switch{border-radius:12px;box-sizing:border-box;cursor:pointer;display:inline-block;flex:none;height:24px;outline:0;padding:2px;position:relative;transition:all .4s ease,box-shadow 0s;vertical-align:middle;width:40px}.form-toggle__switch:after,.form-toggle__switch:before{content:"";display:block;height:20px;position:relative;width:20px}.form-toggle__switch:after{background:#fff;border-radius:50%;right:0;transition:all .2s ease}.form-toggle__switch:before{display:none}.dops-accessible-focus .form-toggle__switch:focus{box-shadow:0 0 0 2px #3582c4}.form-toggle__label{cursor:pointer;display:flex}.is-disabled .form-toggle__label{cursor:default}.dops-accessible-focus .form-toggle:focus+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #3582c4}.dops-accessible-focus .form-toggle:focus:checked+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #78dcfa}.form-toggle+.form-toggle__label .form-toggle__switch{background:#bbb}.form-toggle:not(:disabled)+.form-toggle__switch:hover{background:#d5d5d5}.form-toggle:checked+.form-toggle__label .form-toggle__switch{background:#3582c4}.form-toggle:checked+.form-toggle__label .form-toggle__switch:after{right:16px}.form-toggle:checked:not(:disabled)+.form-toggle__switch:hover{background:#78dcfa}.form-toggle:disabled+span.form-toggle__switch{cursor:default;opacity:.25}.form-toggle.is-toggling+.form-toggle__switch{background:#3582c4}.form-toggle.is-toggling:checked+.form-toggle__switch{background:#d5d5d5}.form-toggle.is-compact+.form-toggle__switch{border-radius:8px;height:16px;width:24px}.form-toggle.is-compact+.form-toggle__switch:after,.form-toggle.is-compact+.form-toggle__switch:before{height:12px;width:12px}.form-toggle.is-compact:checked+.form-toggle__switch:after{right:8px}.jp-instant-search-upsell-nudge{color:#000;cursor:pointer;font-size:1em;text-decoration:none}.jp-instant-search-upsell-nudge:hover{color:#000}.jp-form-search-settings-group{width:100%}.jp-form-search-settings-group .dops-card{box-shadow:none;padding:4em 0 0}.jp-form-search-settings-group .form-toggle__label{margin:0}.jp-form-search-settings-group__toggle.is-instant-search{margin-top:4em}.jp-form-search-settings-group__toggle .jp-form-search-settings-group__toggle-container{display:flex}@media(max-width:960px){.jp-form-search-settings-group__toggle .jp-form-search-settings-group__toggle-container{justify-content:center}}.form-toggle__label-content{font-size:1.5em;font-weight:600;line-height:1.167}.form-toggle__label-content span{font-weight:400}.jp-form-search-settings-group__toggle-description{margin-top:1em}p.jp-form-search-settings-group__toggle-explanation{font-size:1em;font-weight:400;line-height:1.5;margin-bottom:0;margin-top:0}.jp-form-search-settings-group-buttons.jp-search-dashboard-row{margin-top:1.5em}.jp-form-search-settings-group-buttons__button{align-items:center;border-color:#000;display:flex;font-size:1em;justify-content:center;min-height:2.5em;padding:.5em 1.5em;text-align:center}.jp-form-search-settings-group-buttons__button.is-customize-search{background-color:#000;color:#fff}.jp-form-search-settings-group-buttons__button:disabled,.jp-form-search-settings-group-buttons__button[disabled]{background-color:#dcdcde;border-color:#dcdcde;color:#a7aaad;cursor:not-allowed}.jp-form-search-settings-group-buttons__button.is-widgets-editor{background:transparent;color:#000}.jp-form-search-settings-group-buttons__button.is-widgets-editor:disabled,.jp-form-search-settings-group-buttons__button.is-widgets-editor[disabled]{background:transparent;color:#a7aaad}.form-toggle.is-search-admin.is-compact+.form-toggle__switch{background:#fff;border:2px solid #000;border-radius:.75em;height:1.5em;width:3em}.form-toggle.is-search-admin.is-compact+.form-toggle__switch:after,.form-toggle.is-search-admin.is-compact+.form-toggle__switch:before{background-color:#000;height:.9375em;width:.9375em}.form-toggle.is-search-admin.is-compact+.form-toggle__switch:focus{box-shadow:0 0 0 2px #3582c4}.form-toggle.is-search-admin.is-compact:checked+.form-toggle__switch{background:#069e08;border-color:#069e08}.form-toggle.is-search-admin.is-compact:checked+.form-toggle__switch:after{background-color:#fff;right:1.5em}.form-toggle.is-search-admin.is-compact.is-toggling+.form-toggle__switch:after,.form-toggle.is-search-admin.is-compact.is-toggling+.form-toggle__switch:before{right:1.5em}.form-toggle.is-search-admin.is-compact.is-toggling:checked+.form-toggle__switch:after,.form-toggle.is-search-admin.is-compact.is-toggling:checked+.form-toggle__switch:before{right:0}.jp-search-dashboard-cut{border:2px solid #069e08;border-radius:4px;display:block;margin:2em 0;padding:1em 1.5em 1em 4em;position:relative;text-decoration:none}.jp-search-dashboard-cut span{display:block}.jp-search-dashboard-cut span:last-of-type{font-weight:600}.jp-search-dashboard-cut:focus span:last-of-type,.jp-search-dashboard-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:2px}.jp-search-dashboard-cut:focus:after,.jp-search-dashboard-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-search-dashboard-cut:after{color:#069e08;content:"→";font-size:1.5em;font-weight:600;left:1.5em;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-search-dashboard-row .form-toggle__switch-container.sm-col-span-1{display:flex;justify-content:center;padding-top:4px}.jp-mocked-instant-search{background:#fff;border-radius:3px;box-shadow:0 5px 25px rgba(0,0,0,.35);font-size:.75em;height:100%;margin:0 auto;overflow:hidden;user-select:none;width:100%}.jp-mocked-instant-search__search-controls{align-items:center;border-bottom:1px solid #e6f1f5;display:flex;flex-flow:row nowrap;justify-content:space-between}.jp-mocked-instant-search__search-icon{align-items:center;display:flex;height:60px;justify-content:center;width:60px}@media(max-width:660px){.jp-mocked-instant-search__search-icon{height:45px;width:45px}}.jp-mocked-instant-search__search-mock-input{width:calc(100% - 120px)}.jp-mocked-instant-search__close-button{align-items:center;background-color:transparent!important;border-right:1px solid #e6f1f5;display:flex;height:60px;justify-content:center;line-height:1;width:60px}.jp-mocked-instant-search__close-button svg.gridicon{fill:#646970}@media(max-width:660px){.jp-mocked-instant-search__close-button{height:45px;width:45px}}.jp-mocked-instant-search__search-results{display:flex;height:100%;position:relative}.jp-mocked-instant-search__search-results-primary{padding:1em 4em;width:100%}@media(min-width:661px){.jp-mocked-instant-search__search-results-primary{max-width:calc(100% - 220px)}}@media(max-width:660px){.jp-mocked-instant-search__search-results-primary{padding:2em}}.jp-mocked-instant-search__search-results-header{align-items:center;display:flex;flex-flow:row wrap;justify-content:space-between}.jp-mocked-instant-search__search-results-header .jp-mocked-instant-search__result-statistics{font-size:1em;font-weight:700}@media(max-width:480px){.jp-mocked-instant-search__search-results-header .jp-mocked-instant-search__result-statistics{width:100%}}.jp-mocked-instant-search__search-results-header .jp-mocked-instant-search__result-sort-list span{font-size:1em;margin-right:.5em}.jp-mocked-instant-search__search-results-header .jp-mocked-instant-search__result-sort-list span:first-child{margin-right:0}.jp-mocked-instant-search__search-results-header .jp-mocked-instant-search__result-sort-list .jp-mocked-instant-search__result-sort-selected{color:#069e08}@media(max-width:480px){.jp-mocked-instant-search__search-results-header .jp-mocked-instant-search__result-sort-list{width:100%}}.jp-mocked-instant-search__search-result{margin-top:1em}.jp-mocked-instant-search__search-results-secondary{background:none;border-radius:0;border-right:1px solid #e6f1f5;bottom:0;box-shadow:none;display:block;flex:none;padding-right:2em;padding-top:1em;position:static;width:220px}@media(max-width:660px){.jp-mocked-instant-search__search-results-secondary{display:none}}.jp-mocked-instant-search__search-filter-header{font-weight:700}.jp-mocked-instant-search__search-filter label{cursor:default}.jp-mocked-instant-search__search-filter label input[type=checkbox]{border:1px solid #e6e6fa;border-radius:5px;cursor:default}.jp-mocked-instant-search__search-filter span{background-color:#e6e6fa;display:inline-block;line-height:1.35;margin-right:1em;width:50em}.jp-mocked-instant-search__search-filter input[type=checkbox]{height:1em;width:1em}.jp-mocked-instant-search__search-filter-list{margin-top:1em}.jp-mocked-legacy-search{border-radius:3px;margin:0 auto;user-select:none;width:100%}.jp-mocked-legacy-search__search-controls{background:#fff;box-shadow:0 5px 25px rgba(0,0,0,.35);display:flex;flex-flow:row nowrap;width:100%}.jp-mocked-legacy-search__search-icon{align-items:center;display:flex;height:60px;justify-content:center;width:60px}.jp-mocked-legacy-search__search-input{align-items:center;display:flex;width:100%}#jp-plugin-container{min-height:100vh}.dops-notice{animation:appear .3s ease-in-out;background:#414141;border-radius:3px;box-sizing:border-box;color:#fff;display:flex;line-height:1.5;margin-bottom:24px;position:relative;width:100%}.dops-notice.is-success .dops-notice__icon-wrapper{background:#4ab866}.dops-notice.is-warning .dops-notice__icon-wrapper{background:#f0b849}.dops-notice.is-error .dops-notice__icon-wrapper{background:#d94f4f}.dops-notice.is-info .dops-notice__icon-wrapper{background:#3582c4}.dops-notice .dops-notice__dismiss,.dops-notice.is-error .dops-notice__dismiss,.dops-notice.is-info .dops-notice__dismiss,.dops-notice.is-success .dops-notice__dismiss,.dops-notice.is-warning .dops-notice__dismiss{overflow:hidden}.dops-notice__icon-wrapper{align-items:baseline;align-self:stretch;background:#747474;border-radius:0 3px 3px 0;color:#fff;display:flex;flex-shrink:0;justify-content:center;width:47px}.dops-notice__icon-wrapper .gridicon{margin-top:10px}@media(min-width:481px){.dops-notice__icon-wrapper .gridicon{margin-top:12px}}.dops-notice__content.dops-notice__content{flex-grow:1;font-size:12px;padding:13px}@media(min-width:481px){.dops-notice__content.dops-notice__content{font-size:14px}}.dops-notice__content.dops-notice__content a{color:#fff;text-decoration:underline}.dops-notice__content.dops-notice__content a:hover,.dops-notice__text a.dops-notice__text-no-underline{text-decoration:none}.dops-notice__text a,.dops-notice__text a:visited{color:#fff;text-decoration:underline}.dops-notice__text a:hover,.dops-notice__text a:visited:hover{color:#fff;text-decoration:none}.dops-notice__text ul{margin-bottom:0;margin-right:0}.dops-notice__text li{margin-right:2em;margin-top:.5em}.dops-notice__text p{margin-bottom:0;margin-top:.5em}.dops-notice__text p:first-child{margin-top:0}.dops-notice__button{cursor:pointer;margin-right:.428em}.dops-notice__dismiss{cursor:pointer;flex-shrink:0;padding:12px 12px 0}.dops-notice__dismiss .gridicon{height:18px;width:18px}@media(min-width:481px){.dops-notice__dismiss{padding:11px 11px 0}.dops-notice__dismiss .gridicon{height:24px;width:24px}}.dops-notice .dops-notice__dismiss{color:#bbb}.dops-notice .dops-notice__dismiss:focus,.dops-notice .dops-notice__dismiss:hover{color:#fff}a.dops-notice__action{align-items:center;color:#bbb;cursor:pointer;display:flex;font-size:12px;font-weight:400;padding:13px;text-decoration:none;white-space:nowrap}@media(min-width:481px){a.dops-notice__action{align-items:center;border-radius:0;flex-grow:0;flex-shrink:1;font-size:14px;margin:0 auto 0 0;padding:13px 16px}a.dops-notice__action .gridicon{height:24px;width:24px}}a.dops-notice__action:visited{color:#bbb}a.dops-notice__action:hover{color:#fff}a.dops-notice__action .gridicon{height:18px;margin-right:8px;opacity:.7;width:18px}.dops-notice.is-compact{border-radius:3px;display:inline-flex;flex-direction:row;flex-wrap:nowrap;line-height:1.5;margin:0;min-height:20px;padding:0;text-decoration:none;text-transform:none;vertical-align:middle;width:auto}.dops-notice.is-compact .dops-notice__content{font-size:12px;padding:6px 10px}.dops-notice.is-compact .dops-notice__icon-wrapper{width:28px}.dops-notice.is-compact .dops-notice__icon-wrapper .dops-notice__icon{height:18px;margin:0;width:18px}.dops-notice.is-compact .dops-notice__icon-wrapper .gridicon{margin-top:6px}.dops-notice.is-compact .dops-notice__dismiss{align-self:center;flex:none;margin:0 0 0 8px;padding:0;position:relative}.dops-notice.is-compact .dops-notice__dismiss .gridicon{height:18px;width:18px}.dops-notice.is-compact a.dops-notice__action{align-self:center;background:transparent;display:inline-block;font-size:12px;margin:0 16px 0 0;padding:0 10px}.dops-notice.is-compact a.dops-notice__action:active,.dops-notice.is-compact a.dops-notice__action:focus,.dops-notice.is-compact a.dops-notice__action:hover{background:transparent}.dops-notice.is-compact a.dops-notice__action .gridicon{height:14px;margin-right:8px;opacity:1;vertical-align:sub;width:14px}@keyframes appear{0%{opacity:0}to{opacity:1}}.global-notices{bottom:0;left:0;pointer-events:none;position:fixed;right:0;text-align:left;top:auto;z-index:179}@media(min-width:661px){.global-notices{bottom:auto;left:16px;max-width:calc(100% - 68px);right:auto;top:63px}}@media(min-width:961px){.global-notices{left:24px;max-width:calc(100% - 208px);top:71px}}@media(min-width:1041px){.global-notices{left:32px;max-width:calc(100% - 224px)}}.global-notices .dops-notice{border-radius:0;box-shadow:0 2px 5px rgba(0,0,0,.2),0 0 56px rgba(0,0,0,.15);flex-wrap:nowrap;margin-bottom:0;pointer-events:auto;text-align:right}.global-notices .dops-notice .dops-notice__icon-wrapper{border-radius:0}@media(min-width:661px){.global-notices .dops-notice{border-radius:3px;display:flex;margin-bottom:24px;overflow:hidden}.global-notices .dops-notice .dops-notice__icon-wrapper{border-radius:0 3px 3px 0}.global-notices .dops-notice a.dops-notice__action{font-size:14px;padding:13px 16px}}.global-notices .dops-notice__dismiss{flex-shrink:0}@media(min-width:661px){.global-notices .dops-notice__dismiss{padding:13px 16px 0}}.jp-search-bar-chart__container{max-height:40px}.jp-search-chart-legend__box{border-radius:100%;display:inline-block;height:15px;margin-left:5px;margin-right:0;width:15px}.jp-search-chart-legend{display:inline-block;font-size:1em;list-style:none}ul.jp-search-chart-legend{padding:0}.jp-search-chart-legend li{display:inherit;padding-bottom:18px}.jp-search-chart-legend__count{padding:0 3px 0 10px}.jp-search-chart-legend li .jp-search-chart-legend__count,.jp-search-chart-legend li .jp-search-chart-legend__label{display:inherit;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jp-search-notice-box{background-color:#fff;border:.5px solid #dcdcde;border-radius:5px;color:#000}.jp-search-notice-box__important{border:.5px solid #d63638}.jp-search-notice-box a.dops-notice__action{color:#000;display:inline;font-weight:700;padding:0 5px 0 0}.jp-search-notice-box span.dops-notice__dismiss>svg,.jp-search-notice-box span.dops-notice__dismiss>svg:hover{color:#000}.jp-search-notice-box .dops-notice__icon-wrapper{color:#000;vertical-align:text-top}.jp-search-notice-box__important,.jp-search-notice-box__important .dops-notice__icon-wrapper,.jp-search-notice-box__important a.dops-notice__action{color:#d63638}.jp-search-notice-box>span.dops-notice__icon-wrapper>svg{margin:0}.jp-search-record-count p{font-size:1em}.jp-search-record-meter .jp-search-notice-box>span.dops-notice__icon-wrapper{background-color:hsla(0,0%,100%,0);padding-top:13px}.jp-search-record-meter{border-bottom:1px solid #dcdcde;padding:64px 0}.jp-search-record-meter__content h2{margin-top:0}.jp-search-record-meter__content{width:100%}.jp-search-dashboard-wrap{align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;margin:0 auto;width:100%}.jp-search-dashboard-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:calc(100% - 32px)}@media(min-width:600px){.jp-search-dashboard-row{grid-template-columns:repeat(8,1fr);margin:0 18px;width:calc(100% - 36px)}}@media(min-width:960px){.jp-search-dashboard-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px;width:calc(100% - 48px)}}.jp-search-dashboard-row .sm-col-span-1{grid-column-end:span 1}.jp-search-dashboard-row .sm-col-span-2{grid-column-end:span 2}.jp-search-dashboard-row .sm-col-span-3{grid-column-end:span 3}.jp-search-dashboard-row .sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.jp-search-dashboard-row .md-col-span-1{grid-column-end:span 1}.jp-search-dashboard-row .md-col-span-2{grid-column-end:span 2}.jp-search-dashboard-row .md-col-span-3{grid-column-end:span 3}.jp-search-dashboard-row .md-col-span-4{grid-column-end:span 4}.jp-search-dashboard-row .md-col-span-5{grid-column-end:span 5}.jp-search-dashboard-row .md-col-span-6{grid-column-end:span 6}.jp-search-dashboard-row .md-col-span-7{grid-column-end:span 7}.jp-search-dashboard-row .md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.jp-search-dashboard-row .lg-col-span-1{grid-column-end:span 1}.jp-search-dashboard-row .lg-col-span-2{grid-column-end:span 2}.jp-search-dashboard-row .lg-col-span-3{grid-column-end:span 3}.jp-search-dashboard-row .lg-col-span-4{grid-column-end:span 4}.jp-search-dashboard-row .lg-col-span-5{grid-column-end:span 5}.jp-search-dashboard-row .lg-col-span-6{grid-column-end:span 6}.jp-search-dashboard-row .lg-col-span-7{grid-column-end:span 7}.jp-search-dashboard-row .lg-col-span-8{grid-column-end:span 8}.jp-search-dashboard-row .lg-col-span-9{grid-column-end:span 9}.jp-search-dashboard-row .lg-col-span-10{grid-column-end:span 10}.jp-search-dashboard-row .lg-col-span-11{grid-column-end:span 11}.jp-search-dashboard-row .lg-col-span-12{grid-column-end:span 12}.jp-search-dashboard-row .lg-col-span-0{display:none}}@media(max-width:960px){.jp-search-dashboard-row .md-col-span-0{display:none}}@media(max-width:600px){.jp-search-dashboard-row .sm-col-span-0{display:none}.jp-search-dashboard-row .sm-col-span-1{display:block}}*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}#wpcontent{padding-right:0!important}#screen-meta,#screen-meta-links{display:none}#jp-search-dashboard{background-color:#fff;color:#000;display:flex;font-size:16px;min-height:calc(100vh - 97px)}#jp-search-dashboard .jp-search-dashboard-page{width:100%}#jp-search-dashboard .jp-masthead__logo-link{pointer-events:none}#jp-search-dashboard .jp-search-dashboard-top{background-color:#f9f9f6;overflow:hidden}#jp-search-dashboard .jp-search-dashboard-top__title{padding:2.5em 0}#jp-search-dashboard .jp-search-dashboard-top__title h1{font-size:2.25em;line-height:1.111;margin:0}#jp-search-dashboard .jp-search-dashboard-top__mocked-search-interface{align-items:center;display:flex;flex-flow:column;height:15.625em;justify-content:center}#jp-search-dashboard .jp-search-dashboard-bottom{background-color:#fff}#jp-search-dashboard .jp-search-dashboard-footer,#jp-search-dashboard .jp-search-dashboard-header{background-color:#fff;padding:2.5em 0}@media(max-width:600px){#jp-search-dashboard{font-size:14px}}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.asset.php new file mode 100644 index 00000000..5c65a3e0 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.asset.php @@ -0,0 +1 @@ +<?php return array('dependencies' => array('wp-i18n', 'wp-jp-i18n-loader', 'wp-polyfill'), 'version' => '6b8fbf775e705a849bc7'); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.css new file mode 100644 index 00000000..32d8d869 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.css @@ -0,0 +1 @@ +.jetpack-instant-search__overlay{background:rgba(29,35,39,.7);bottom:0;box-sizing:border-box;color:#00101c;font-size:16px;left:0;opacity:1;overflow-x:hidden;overflow-y:auto;position:fixed;right:0;top:0;transition:opacity .1s ease-in;z-index:9999999999999}body.jps-theme-argent .jetpack-instant-search__overlay *{font-family:Helvetica,sans-serif}@media(max-width:767.98px){.jetpack-instant-search__overlay{padding:3em 1em}}@media(max-width:575.98px){.jetpack-instant-search__overlay{padding:0}}@media(min-width:768px){.jetpack-instant-search__overlay{padding:3em}}.jetpack-instant-search__overlay.is-hidden{background:transparent;opacity:0;visibility:hidden}.jetpack-instant-search__overlay *,.jetpack-instant-search__overlay :after,.jetpack-instant-search__overlay :before{box-sizing:inherit}@media print{.jetpack-instant-search__overlay.is-hidden{display:none}}.gridicon{fill:currentColor;display:inline-block}.gridicon.needs-offset g{transform:translate(1px,1px)}.gridicon.needs-offset-x g{transform:translate(1px)}.gridicon.needs-offset-y g{transform:translateY(1px)}.jetpack-instant-search__notice{font-size:14px;margin:1em 0;padding:.75em}.jetpack-instant-search__notice.jetpack-instant-search__notice--warning{background-color:#f5e6b3;color:#4f3500}.jetpack-instant-search__notice .gridicon{margin-right:.5em;margin-top:-5px;vertical-align:middle}.jetpack-instant-search__scroll-button{border:0;box-shadow:none;font-size:13px;outline:0}.jetpack-instant-search__search-sort{align-items:center;display:flex}.jetpack-instant-search__search-sort>label[for=jetpack-instant-search__search-sort-select]{flex-shrink:0;font-size:1em;font-weight:700;margin:0 .25em 0 0}.jetpack-instant-search__search-sort-with-links{font-size:13px}@media(max-width:575.98px){.jetpack-instant-search__search-sort-with-select{margin-right:1em;width:100%}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-sort-with-select{margin-right:0}}@media(min-width:992px){.jetpack-instant-search__search-sort-with-select{margin-top:-4px}}#jetpack-instant-search__search-sort-select{-webkit-appearance:auto;appearance:auto;background:#fff;border:1px solid #e6f1f5;border-radius:5px;color:#00101c;font-size:1em;height:inherit;padding:.25em}@media(max-width:575.98px){#jetpack-instant-search__search-sort-select{padding:.5em;width:100%}}.jetpack-instant-search__search-sort-option{color:#646970;cursor:pointer;padding:0 2px;text-decoration:none}.jetpack-instant-search__search-sort-option:after{color:#646970;content:"·";font-weight:400;padding-left:5px}.jetpack-instant-search__search-sort .jetpack-instant-search__search-sort-option:focus,.jetpack-instant-search__search-sort .jetpack-instant-search__search-sort-option:hover{text-decoration:none}.jetpack-instant-search__search-sort-option:last-child:after{content:""}.jetpack-instant-search__search-sort-option.is-selected{color:#044b7a;font-weight:600;text-decoration:none}.jetpack-instant-search__search-form-controls{align-items:center;display:flex;line-height:1.3;margin-left:56px;margin-right:56px;margin-top:16px;z-index:1}@media(max-width:991.98px){.jetpack-instant-search__search-form-controls{flex-direction:row-reverse;justify-content:space-between;left:0;margin-left:40px;margin-right:40px;position:relative;right:0}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-form-controls{flex-direction:row-reverse;justify-content:space-between;left:0;margin-left:40px;margin-right:40px;position:relative;right:0}}@media(max-width:767.98px){.jetpack-instant-search__search-form-controls{margin-left:20px;margin-right:20px}}@media(min-width:992px){.jetpack-instant-search__search-form-controls{position:absolute;right:320px}}@media(min-width:1200px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-form-controls{position:absolute;right:320px}}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-form-controls{right:0}.jetpack-instant-search__box{border-bottom:1px solid #e6f1f5;border-right:1px solid #e6f1f5}.jetpack-instant-search__box-label{align-items:center;display:flex;flex:0 0 100%;margin:0}input.jetpack-instant-search__box-input.search-field{-webkit-appearance:none;appearance:none;background:#fff;border:0;box-shadow:none;color:#3c434a;font-size:18px;height:60px;line-height:1;margin:0;max-width:none;padding:0 14px;text-indent:32px;vertical-align:middle}input.jetpack-instant-search__box-input.search-field:focus,input.jetpack-instant-search__box-input.search-field:hover{background:#fff;color:#00101c}input.jetpack-instant-search__box-input.search-field.search-field{letter-spacing:-.02em;padding-left:0;text-indent:0}.jetpack-instant-search__box-gridicon{align-items:center;display:flex;flex-shrink:0;height:60px;justify-content:center;left:0;position:relative;top:0;width:60px;z-index:1}.jetpack-instant-search__box-gridicon svg{fill:#646970}.jetpack-instant-search__box input[type=button]{word-wrap:normal;border:none;border-radius:0;color:#646970;cursor:pointer;font-size:1em;font-weight:400;height:60px;line-height:1;margin:0 .25em 0 0;padding:0;text-decoration:none;text-shadow:none;text-transform:none;transition:all .1s linear;width:60px}.jetpack-instant-search__box input[type=button],.jetpack-instant-search__box input[type=button]:focus,.jetpack-instant-search__box input[type=button]:hover{-webkit-appearance:none;appearance:none;background:none;box-shadow:none;outline:none}.jetpack-instant-search__box input[type=button]:focus,.jetpack-instant-search__box input[type=button]:hover{color:#3c434a}.jetpack-instant-search__box input[type=button]:focus{outline:1px dotted}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input{border:none;box-shadow:none;height:52px;outline-style:none;transition:color .15s ease-in-out,border-color .25s ease-in-out;width:100%}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input:focus,.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input:hover{border:none;box-shadow:none;outline-style:none}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-webkit-search-results-button,.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-webkit-search-results-decoration{appearance:none;-webkit-appearance:none;display:initial}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-webkit-search-cancel-button{display:none}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-ms-clear,.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-ms-reveal{display:none}.jetpack-instant-search__path-breadcrumb{font-size:.9em;margin:0;max-width:calc(100vw - 2em);overflow-x:hidden;text-overflow:ellipsis}.jetpack-instant-search__path-breadcrumb-link{max-width:100%;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.jetpack-instant-search__path-breadcrumb-link:focus,.jetpack-instant-search__path-breadcrumb-link:hover{text-decoration:underline}.jetpack-instant-search__path-breadcrumb,.jetpack-instant-search__path-breadcrumb-link{color:#3c434a}.jetpack-instant-search__search-result-comments{border-left:2px solid #f0f0f1;font-size:.9em;margin-left:8px;margin-top:16px;padding-left:16px;word-break:break-word}.jetpack-instant-search__search-result-comments .gridicon{margin-right:8px;vertical-align:middle}.jetpack-instant-search__search-result-title.jetpack-instant-search__search-result-minimal-title{margin-bottom:.4em}.jetpack-instant-search__search-result-title.jetpack-instant-search__search-result-minimal-title .gridicon{margin-right:8px}.jetpack-instant-search__search-result-minimal-cats-and-tags{display:flex;flex-flow:row wrap;font-size:.9375em}.jetpack-instant-search__search-result-minimal-cats,.jetpack-instant-search__search-result-minimal-tags{display:flex;flex-flow:row wrap;list-style-type:none;margin:0;padding:0}.jetpack-instant-search__search-result-minimal-cat,.jetpack-instant-search__search-result-minimal-tag{margin:0 .75em 0 0}.jetpack-instant-search__search-result-minimal-cat .gridicon,.jetpack-instant-search__search-result-minimal-tag .gridicon{margin-right:.25em}.jetpack-instant-search__search-result-minimal-cat .gridicon,.jetpack-instant-search__search-result-minimal-cat-text,.jetpack-instant-search__search-result-minimal-tag .gridicon,.jetpack-instant-search__search-result-minimal-tag-text{vertical-align:middle}.jetpack-instant-search__search-result-minimal-content{word-break:break-word}.jetpack-instant-search__search-result-expanded{display:flex;flex-flow:column}.jetpack-instant-search__search-result-expanded:last-child{margin-right:0}.jetpack-instant-search__search-result-expanded .jetpack-instant-search__search-result-expanded__title{width:100%}.jetpack-instant-search__search-result-expanded__path{color:#646970;font-size:.9375em;margin:0 0 .4em}.jetpack-instant-search__search-result-expanded__copy-container{max-width:100%}@media(min-width:576px){.jetpack-instant-search__search-result-expanded__copy-container{width:calc(100% - 128px - 1em)}}.jetpack-instant-search__search-result-expanded--no-image .jetpack-instant-search__search-result-expanded__copy-container{width:auto}.jetpack-instant-search__search-result-expanded__content{color:#00101c;font-size:.9375em}.jetpack-instant-search__search-result-expanded__image-link{margin-left:1em}@media(max-width:575.98px){.jetpack-instant-search__search-result-expanded__image-link{margin:0 auto .5em;order:-1}}.jetpack-instant-search__search-result-expanded__image-container{width:128px}@media(max-width:575.98px){.jetpack-instant-search__search-result-expanded__image-container{width:256px}}.jetpack-instant-search__search-result-expanded--no-image .jetpack-instant-search__search-result-expanded__image-container{display:none}.jetpack-instant-search__search-result-expanded__image-container{position:relative}.jetpack-instant-search__search-result-expanded__image-container:before{content:"";display:block;padding-top:100%;width:100%}.jetpack-instant-search__search-result-expanded__image{border-radius:5px;bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.jetpack-instant-search__search-result-expanded__content-container{display:flex;flex-flow:column}@media(min-width:576px){.jetpack-instant-search__search-result-expanded__content-container{flex-flow:row nowrap}}.jetpack-instant-search__search-result-expanded__footer{display:flex;list-style-type:none;margin-left:0;margin-top:10px;padding-left:0}.jetpack-instant-search__search-result-expanded__footer li{margin-right:10px}.jetpack-instant-search__search-result-expanded__footer-blog-image{border-radius:2px;margin-right:3px;vertical-align:middle}.jetpack-instant-search__search-result-expanded__footer-blog{font-size:13px;font-style:normal;font-weight:600;line-height:180%}.jetpack-instant-search__search-result-expanded__footer-author:after,.jetpack-instant-search__search-result-expanded__footer-blog:after{color:#636363;content:"·";margin-left:10px}.jetpack-instant-search__search-result-expanded__footer-author,.jetpack-instant-search__search-result-expanded__footer-date{color:#636363;font-size:13px;font-style:normal;font-weight:400}.jetpack-instant-search__product-rating-stars .gridicon{fill:#f0c930;vertical-align:middle}.jetpack-instant-search a.jetpack-instant-search__product-rating-count{color:#646970;font-size:.9em;text-decoration:underline;vertical-align:text-top}.jetpack-instant-search__product-price-regular{color:#646970;padding-right:.25em}.jetpack-instant-search__search-results-list.is-format-product{display:flex;flex-wrap:wrap;margin-right:40px;padding:0 0 3em}@media(max-width:991.98px){.jetpack-instant-search__search-results-list.is-format-product{margin-right:24px}}@media(max-width:767.98px){.jetpack-instant-search__search-results-list.is-format-product{margin-right:4px}}.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{display:flex;flex-direction:column;margin:0 16px 16px 0;position:relative;width:calc(50% - 16px)}@media(min-width:576px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(33.33333% - 16px)}}@media(min-width:768px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(25% - 16px)}}@media(min-width:992px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(33.33333% - 16px)}}@media(min-width:1200px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(25% - 16px)}}@media(min-width:1400px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(20% - 16px)}}.jetpack-instant-search__search-result>.jetpack-instant-search__search-result-product-img-link{display:block}.jetpack-instant-search__search-result-product-img-container{border-radius:5px;color:transparent;position:relative}.jetpack-instant-search__search-result-product-img-container.jetpack-instant-search__search-result-product-img-container--placeholder{background:#c3c4c7}.jetpack-instant-search__search-result-product-img-container .gridicon{fill:#fff}.jetpack-instant-search__search-result-product-img-container:before{content:"";display:block;padding-top:100%;width:100%}.jetpack-instant-search__search-result-product-img{border-radius:5px;bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.jetpack-instant-search__search-result-product-img>.gridicon{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.jetpack-instant-search__search-result-product-img>.gridicons-image{height:25%;width:25%}.jetpack-instant-search__search-result-product-img>.gridicons-block{height:50%;width:50%}.jetpack-instant-search__search-result-title.jetpack-instant-search__search-result-product-title{font-size:1.25em;margin:.25em 0 0}.jetpack-instant-search__search-result-product-match{font-size:.9em;margin-top:.25em}.jetpack-instant-search__search-result-product-match mark{align-items:center;display:flex;font-weight:400}.jetpack-instant-search__search-result-product-match .gridicon{height:1em;margin-right:.25em;width:1em}.jetpack-instant-search__search-result{margin:0 0 2em}.jetpack-instant-search__search-result-title{font-size:1.6em;font-weight:400;line-height:1.35;margin:0;overflow-wrap:break-word}.jetpack-instant-search__search-result-title .jetpack-instant-search__search-result-title-link{text-decoration:none}.jetpack-instant-search__search-result-title .jetpack-instant-search__search-result-title-link:focus,.jetpack-instant-search__search-result-title .jetpack-instant-search__search-result-title-link:hover{text-decoration:underline}.jetpack-instant-search__search-filters{position:relative}.jetpack-instant-search__search-filters>div{margin-top:1em}.jetpack-instant-search__search-filters-title{color:#00101c;display:block;font-size:inherit;font-weight:700;line-height:1.3;margin:0;padding:0}.jetpack-instant-search__clear-filters-link{line-height:1.3;margin:0;position:absolute;right:0;top:0}.jetpack-instant-search__search-filter-sub-heading{color:#646970;font-size:inherit;margin:0;padding:0}.jetpack-instant-search__search-filter-list{text-align:left}.jetpack-instant-search__search-filter-list>div{align-items:baseline;display:flex;margin-top:8px}.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-input,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-input{-webkit-appearance:checkbox;appearance:checkbox;background:none;border:none;cursor:pointer;height:auto;margin:0;top:1px;width:auto}.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-input:after,.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-input:before,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-input:after,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-input:before{display:none!important}.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-label,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-label{color:inherit;cursor:pointer;display:inline-block;font-weight:400;margin:0 0 0 8px;padding:0;width:auto}.jetpack-instant-search__search-static-filter-list{font-size:.875rem;line-height:1.8}.jetpack-instant-search__widget-area-container{margin-bottom:2em}.jetpack-instant-search__jetpack-colophon{margin-bottom:2em;margin-top:2em;text-align:center}.jetpack-instant-search__jetpack-colophon-link{align-items:center;color:inherit;display:flex;text-decoration:none}.jetpack-instant-search__jetpack-colophon-logo{display:inline;height:16px;width:16px}.jetpack-instant-search__jetpack-colophon-text{color:#3c434a;font-size:.7em;font-weight:400;padding-left:6px}.jetpack-instant-search__sidebar{padding-top:14px}.jetpack-instant-search__sidebar .jetpack-instant-search__widget-area>.widget{background:none;border:none;margin:0;padding:0}.jetpack-instant-search__sidebar .jetpack-instant-search__widget-area>.widget a{font-weight:400}.jetpack-instant-search__sidebar h2.widgettitle{border:none;font-size:1.3em;margin:1em 0 .5em}.jetpack-instant-search__sidebar h2.widgettitle:after,.jetpack-instant-search__sidebar h2.widgettitle:before{display:none!important}.jetpack-instant-search__search-results{background:#fff;border-radius:3px;margin:0 auto;max-width:1080px;min-height:100%;position:relative;z-index:10}@media(max-width:575.98px){.jetpack-instant-search__search-results{border-radius:0}}@media(min-width:992px){.jetpack-instant-search__search-results{max-width:95%}}.jetpack-instant-search__search-results mark{background:#ffc;color:#00101c}.jetpack-instant-search__search-results-controls{display:flex}.jetpack-instant-search__search-results-content{display:flex;position:relative}.jetpack-instant-search__search-results-filter-button{align-items:center;border:0;color:#646970;cursor:pointer;display:flex;flex-shrink:0;font-size:12px;margin:0;padding:8px;text-decoration:none;transition:background-color .25s ease-in-out}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-filter-button{visibility:hidden}@media(min-width:576px){.jetpack-instant-search__search-results-filter-button{font-size:13px;padding:10px 14px}}@media(min-width:992px){.jetpack-instant-search__search-results-filter-button{display:none}.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-filter-button{display:flex}}@media(min-width:1200px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-filter-button{display:none}}.jetpack-instant-search__search-results-filter-button:focus,.jetpack-instant-search__search-results-filter-button:hover{color:#00101c}.jetpack-instant-search__search-results-filter-button .gridicon{margin-left:4px}.jetpack-instant-search__search-results-primary{margin:0;max-width:calc(100% - 320px);width:100%}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-primary{max-width:100%}@media(max-width:991.98px){.jetpack-instant-search__search-results-primary{max-width:100%}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-primary{max-width:100%}}.jetpack-instant-search__search-results-secondary{background:none;border-left:1px solid #e6f1f5;border-radius:0;bottom:0;box-shadow:none;color:#00101c;display:block;flex:none;padding:0 32px;position:static;width:320px}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-secondary{display:none}@media(max-width:991.98px){.jetpack-instant-search__search-results-secondary{display:none}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary{display:none}}@media(max-width:991.98px){.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:6px;box-shadow:0 2px 3px rgba(0,0,0,.1);display:block;left:1em;max-height:70vh;min-width:360px;overflow-y:scroll;padding:16px 24px;position:absolute;right:1em;top:0;width:auto;z-index:10}}@media(max-width:991.98px)and (max-width:575.98px){.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{max-height:80vh}}@media(max-width:991.98px){.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon{margin-bottom:1em}.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon-text{font-size:.8em}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{display:none}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:6px;box-shadow:0 2px 3px rgba(0,0,0,.1);display:block;left:1em;max-height:70vh;min-width:360px;overflow-y:scroll;padding:16px 24px;position:absolute;right:1em;top:0;width:auto;z-index:10}}@media(max-width:1199.98px)and (max-width:575.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{max-height:80vh}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon{margin-bottom:1em}.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon-text{font-size:.8em}.jetpack-instant-search__overlay--no-sidebar .jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{display:none}}.jetpack-instant-search__search-results-title,.jetpack-instant-search__search-results-unused-query{color:#00101c;font-size:1em;font-weight:700;line-height:1.3;margin:1em 56px 1.5em;padding:0;word-break:break-word}@media(max-width:991.98px){.jetpack-instant-search__search-results-title,.jetpack-instant-search__search-results-unused-query{margin-bottom:1em;margin-left:40px;margin-right:40px}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-title,.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-unused-query{margin-bottom:1em;margin-left:40px;margin-right:40px}}@media(max-width:767.98px){.jetpack-instant-search__search-results-title,.jetpack-instant-search__search-results-unused-query{margin-left:20px;margin-right:20px}}@media(min-width:992px){.jetpack-instant-search__search-results-title{padding-right:210px}}@media(min-width:1200px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-title{padding-right:210px}}.jetpack-instant-search__search-results-list{color:#00101c;list-style:none;margin-left:56px;margin-right:56px;padding:0}@media(max-width:991.98px){.jetpack-instant-search__search-results-list{margin-left:40px;margin-right:40px}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-list{margin-left:40px;margin-right:40px}}@media(max-width:767.98px){.jetpack-instant-search__search-results-list{margin-left:20px;margin-right:20px}}.jetpack-instant-search__search-results-list li:before{content:"";height:1px;position:absolute;width:1px}.jetpack-instant-search__search-results-search-form{font-size:.8em;margin:0;top:0;width:100%}button.jetpack-instant-search__overlay-close{align-items:center;-webkit-appearance:none;appearance:none;background:none;background-color:transparent!important;border:none;border-bottom:1px solid #e6f1f5;border-radius:0;box-shadow:none;cursor:pointer;display:flex;height:61px;justify-content:center;line-height:1;margin:0;outline:none;padding:0;text-decoration:none;text-shadow:none;text-transform:none;width:60px}button.jetpack-instant-search__overlay-close:focus,button.jetpack-instant-search__overlay-close:hover{-webkit-appearance:none;appearance:none;background:none;box-shadow:none;outline:none}button.jetpack-instant-search__overlay-close:focus{outline:1px dotted}button.jetpack-instant-search__overlay-close svg.gridicon{fill:#646970}button.jetpack-instant-search__overlay-close:active,button.jetpack-instant-search__overlay-close:focus,button.jetpack-instant-search__overlay-close:hover{background-color:transparent!important;border-color:#e6f1f5}button.jetpack-instant-search__overlay-close:active svg.gridicon,button.jetpack-instant-search__overlay-close:focus svg.gridicon,button.jetpack-instant-search__overlay-close:hover svg.gridicon{fill:#3c434a}.jetpack-instant-search__search-results-pagination{display:block;flex:none;margin:50px}.jetpack-instant-search .widget a,.jetpack-instant-search .widget.widget_archive ul li a,.jetpack-instant-search a{border:none;color:#001621;text-decoration:none}.jetpack-instant-search .widget a:focus,.jetpack-instant-search .widget a:hover,.jetpack-instant-search .widget.widget_archive ul li a:focus,.jetpack-instant-search .widget.widget_archive ul li a:hover,.jetpack-instant-search a:focus,.jetpack-instant-search a:hover{color:#044b7a;text-decoration:underline}.jetpack-search-filters-widget__filter-list{list-style-type:none}body.enable-search-modal .cover-modal.show-modal.search-modal.active{display:none}.screen-reader-text{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark{background:rgba(29,35,39,.7);color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget a,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget.widget_archive ul li a,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark a{color:#f6f7f7}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget a:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget a:hover,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget.widget_archive ul li a:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget.widget_archive ul li a:hover,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark a:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark a:hover{color:#0675c4}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-filters-title,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-result-expanded__content,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-list,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-title,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-unused-query{color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__jetpack-colophon-text,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__path-breadcrumb,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__path-breadcrumb-link{color:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-filter-sub-heading,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-result-expanded__path{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close{border-color:#3c434a}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box-gridicon svg,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close svg.gridicon{fill:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close{border-color:#3c434a}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close:focus svg.gridicon,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close:hover svg.gridicon{fill:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box input[type=button]{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box input[type=button]:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box input[type=button]:hover{color:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark input.jetpack-instant-search__box-input.search-field{background:#000;color:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark input.jetpack-instant-search__box-input.search-field:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark input.jetpack-instant-search__box-input.search-field:hover{background:#000;color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results{background:#000}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results mark{color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-filter-button{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-filter-button:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-filter-button:hover,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-secondary{color:#e6f1f5}@media(min-width:992px){.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-secondary{border-color:#3c434a}}@media(max-width:991.98px){.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{background:#000;border-color:#3c434a;box-shadow:0 2px 3px #3c434a}}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-sort-option,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-sort-option:after{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-sort-option.is-selected{color:#0675c4}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-result-product-img--placeholder{color:#2c3338}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark #jetpack-instant-search__search-sort-select{background:#000;border-color:#3c434a;color:#e6f1f5}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.js new file mode 100644 index 00000000..05ef0a3d --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.js @@ -0,0 +1,15 @@ +"use strict";(self.webpackChunkjetpack_search=self.webpackChunkjetpack_search||[]).push([[613],{5332:function(e,t,r){r.d(t,{Z:function(){return o}});var s=r(8294),n=r.n(s),a=r(211),i=r(4184);class o extends a.Component{constructor(){super(...arguments),n()(this,"handleOverlayOptionsUpdate",(e=>{this.props.updateOverlayOptions(e,(()=>this.props.showResults()))}))}componentDidMount(){(0,i.vJ)(this.handleOverlayOptionsUpdate),(0,i.Em)(this.props.toggleResults)}render(){return null}}},1773:function(e,t,r){r.d(t,{Z:function(){return l}});var s=r(8294),n=r.n(s),a=(r(3679),r(211)),i=r(3259),o=r.n(i);class l extends a.Component{constructor(){super(...arguments),n()(this,"handleCompositionStart",(()=>this.setState({isComposing:!0}))),n()(this,"handleCompositionEnd",(()=>this.setState({isComposing:!1}))),n()(this,"handleFilterInputClick",(e=>{e.preventDefault(),e.currentTarget.dataset.filterType&&("taxonomy"===e.currentTarget.dataset.filterType?this.props.setFilter(e.currentTarget.dataset.taxonomy,e.currentTarget.dataset.val):this.props.setFilter(e.currentTarget.dataset.filterType,e.currentTarget.dataset.val)),this.props.setSearchQuery(""),this.props.showResults()})),n()(this,"handleHistoryNavigation",(()=>{this.props.initializeQueryValues({isHistoryNavigation:!0})})),n()(this,"handleInput",o()((e=>{var t,r;null!==(t=e.inputType)&&void 0!==t&&t.includes("format")||""===e.target.value||(this.state.isComposing||"submit"!==this.props.overlayOptions.overlayTrigger&&(this.props.setSearchQuery(e.target.value),"immediate"===this.props.overlayOptions.overlayTrigger&&this.props.showResults(),"results"===this.props.overlayOptions.overlayTrigger&&(null===(r=this.props.response)||void 0===r?void 0:r.results)&&this.props.showResults()))}),200)),n()(this,"handleKeyup",(e=>{"Enter"===e.key&&(this.props.setSearchQuery(e.target.value),this.props.showResults())})),n()(this,"handleOverlayTriggerClick",(e=>{e.stopImmediatePropagation(),this.props.setSearchQuery(""),this.props.showResults()})),n()(this,"handleSubmit",(e=>{if(e.preventDefault(),this.handleInput.flush(),!this.props.isVisible){var t;const r=null===(t=e.target.querySelector(this.props.themeOptions.searchInputSelector))||void 0===t?void 0:t.value;"string"==typeof r&&this.props.setSearchQuery(r),this.props.showResults()}})),n()(this,"fixBodyScroll",(()=>{var e;this.props.isVisible?(this.preventBodyScroll(),null===(e=window)||void 0===e||e.scrollTo(0,0)):this.props.isVisible||this.restoreBodyScroll()})),this.state={isComposing:!1,bodyScrollTop:0,previousStyle:null,previousBodyStyleAttribute:""},this.props.initializeQueryValues()}componentDidMount(){this.disableUnnecessaryFormAndInputAttributes(),this.addEventListeners()}componentWillUnmount(){this.removeEventListeners(),this.restoreBodyScroll()}componentDidUpdate(e){this.props.isVisible!==e.isVisible&&this.fixBodyScroll()}disableUnnecessaryFormAndInputAttributes(){document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.removeAttribute("required"),e.removeAttribute("autocomplete"),e.form.removeAttribute("autocomplete")}))}addEventListeners(){window.addEventListener("popstate",this.handleHistoryNavigation),document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.form.addEventListener("submit",this.handleSubmit),e.addEventListener("keyup",this.handleKeyup),e.addEventListener("input",this.handleInput),e.addEventListener("compositionstart",this.handleCompositionStart),e.addEventListener("compositionend",this.handleCompositionEnd)})),document.querySelectorAll(this.props.themeOptions.overlayTriggerSelector).forEach((e=>{e.addEventListener("click",this.handleOverlayTriggerClick,!0)})),document.querySelectorAll(this.props.themeOptions.filterInputSelector).forEach((e=>{e.addEventListener("click",this.handleFilterInputClick)}))}removeEventListeners(){window.removeEventListener("popstate",this.handleHistoryNavigation),document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.form.removeEventListener("submit",this.handleSubmit),e.removeEventListener("keyup",this.handleKeyup),e.removeEventListener("input",this.handleInput),e.removeEventListener("compositionstart",this.handleCompositionStart),e.removeEventListener("compositionend",this.handleCompositionEnd)})),document.querySelectorAll(this.props.themeOptions.overlayTriggerSelector).forEach((e=>{e.removeEventListener("click",this.handleOverlayTriggerClick,!0)})),document.querySelectorAll(this.props.themeOptions.filterInputSelector).forEach((e=>{e.removeEventListener("click",this.handleFilterInputClick)}))}preventBodyScroll(){this.setState({bodyScrollTop:parseInt(window.scrollY)||0,previousStyle:{top:document.body.style.top,left:document.body.style.left,right:document.body.style.right,scrollBehavior:document.documentElement.style.scrollBehavior},previousBodyStyleAttribute:document.body.getAttribute("style")},(()=>{var e,t;const r=(null===(e=document.documentElement)||void 0===e?void 0:e.scrollHeight)-(null===(t=document.body)||void 0===t?void 0:t.scrollHeight)||0;document.body.setAttribute("style","position: fixed !important"),document.body.style.top=`-${this.state.bodyScrollTop-r}px`,document.body.style.left=0,document.body.style.right=0}))}restoreBodyScroll(){var e,t,r,s,n,a,i,o;this.state.previousBodyStyleAttribute?document.body.setAttribute("style",this.state.previousBodyStyleAttribute):document.body.removeAttribute("style"),document.body.style.top=null!==(e=null===(t=this.state.previousStyle)||void 0===t?void 0:t.top)&&void 0!==e?e:"",document.body.style.left=null!==(r=null===(s=this.state.previousStyle)||void 0===s?void 0:s.left)&&void 0!==r?r:"",document.body.style.right=null!==(n=null===(a=this.state.previousStyle)||void 0===a?void 0:a.right)&&void 0!==n?n:"",document.documentElement.style.scrollBehavior="revert",this.state.bodyScrollTop>0&&window.scrollTo(0,this.state.bodyScrollTop),document.documentElement.style.scrollBehavior=null!==(i=null===(o=this.state.previousStyle)||void 0===o?void 0:o.scrollBehavior)&&void 0!==i?i:"",this.setState({bodyScrollTop:0,previousStyle:null,previousBodyStyleAttribute:""})}render(){return null}}},1180:function(e,t,r){var s=r(8294),n=r.n(s),a=r(211),i=r.n(a),o=r(5736);const __=o.__;class l extends a.Component{needsOffset(e,t){return["gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-info","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(e)>=0&&t%18==0}getSVGTitle(e){if("title"in this.props)return this.props.title?i().createElement("title",null,this.props.title):null;switch(e){default:return null;case"gridicons-audio":return i().createElement("title",null,__("Has audio.","jetpack-search-pkg"));case"gridicons-calendar":return i().createElement("title",null,__("Is an event.","jetpack-search-pkg"));case"gridicons-cart":return i().createElement("title",null,__("Is a product.","jetpack-search-pkg"));case"chevron-down":return i().createElement("title",null,__("Show filters","jetpack-search-pkg"));case"gridicons-comment":return i().createElement("title",null,__("Matching comment.","jetpack-search-pkg"));case"gridicons-cross":return i().createElement("title",null,__("Close search results","jetpack-search-pkg"));case"gridicons-filter":return i().createElement("title",null,__("Toggle search filters.","jetpack-search-pkg"));case"gridicons-folder":return i().createElement("title",null,__("Category","jetpack-search-pkg"));case"gridicons-image-multiple":return i().createElement("title",null,__("Has multiple images.","jetpack-search-pkg"));case"gridicons-image":return i().createElement("title",null,__("Has an image.","jetpack-search-pkg"));case"gridicons-page":return i().createElement("title",null,__("Page","jetpack-search-pkg"));case"gridicons-post":return i().createElement("title",null,__("Post","jetpack-search-pkg"));case"gridicons-jetpack-search":case"gridicons-search":return i().createElement("title",null,__("Magnifying Glass","jetpack-search-pkg"));case"gridicons-tag":return i().createElement("title",null,__("Tag","jetpack-search-pkg"));case"gridicons-video":return i().createElement("title",null,__("Has a video.","jetpack-search-pkg"))}}renderIcon(e){switch(e){default:return null;case"gridicons-audio":return i().createElement("g",null,i().createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"}));case"gridicons-block":return i().createElement("g",null,i().createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"}));case"gridicons-calendar":return i().createElement("g",null,i().createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"}));case"gridicons-cart":return i().createElement("g",null,i().createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"}));case"gridicons-checkmark":return i().createElement("g",null,i().createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"}));case"gridicons-chevron-down":return i().createElement("g",null,i().createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"}));case"gridicons-comment":return i().createElement("g",null,i().createElement("path",{d:"M3 6v9c0 1.105.895 2 2 2h9v5l5.325-3.804c1.05-.75 1.675-1.963 1.675-3.254V6c0-1.105-.895-2-2-2H5c-1.105 0-2 .895-2 2z"}));case"gridicons-cross":return i().createElement("g",null,i().createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"}));case"gridicons-filter":return i().createElement("g",null,i().createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"}));case"gridicons-folder":return i().createElement("g",null,i().createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"}));case"gridicons-image":return i().createElement("g",null,i().createElement("path",{d:"M13 9.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5zM22 6v12c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2zm-2 0H4v7.444L8 9l5.895 6.55 1.587-1.85c.798-.932 2.24-.932 3.037 0L20 15.426V6z"}));case"gridicons-image-multiple":return i().createElement("g",null,i().createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"}));case"gridicons-info":return i().createElement("g",null,i().createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}));case"gridicons-jetpack-search":return i().createElement("g",null,i().createElement("path",{d:"M0 9.257C0 4.15 4.151 0 9.257 0c5.105 0 9.256 4.151 9.256 9.257a9.218 9.218 0 01-2.251 6.045l.034.033h1.053L24 22.01l-1.986 1.989-6.664-6.662v-1.055l-.033-.033a9.218 9.218 0 01-6.06 2.264C4.15 18.513 0 14.362 0 9.257zm4.169 1.537h4.61V1.82l-4.61 8.973zm5.547-3.092v8.974l4.61-8.974h-4.61z"}));case"gridicons-pages":return i().createElement("g",null,i().createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"}));case"gridicons-posts":return i().createElement("g",null,i().createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"}));case"gridicons-search":return i().createElement("g",null,i().createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"}));case"gridicons-star-outline":return i().createElement("g",null,i().createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"}));case"gridicons-star":return i().createElement("g",null,i().createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}));case"gridicons-tag":return i().createElement("g",null,i().createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"}));case"gridicons-video":return i().createElement("g",null,i().createElement("path",{d:"M20 4v2h-2V4H6v2H4V4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2v-2h2v2h12v-2h2v2c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 16H4v-3h2v3zm0-5H4V8h2v3zm4 4V9l4.5 3-4.5 3zm10 1h-2v-3h2v3zm0-5h-2V8h2v3z"}))}}render(){const{size:e=24,className:t=""}=this.props,r=this.props.height||e,s=this.props.width||e,n=this.props.style||{height:r,width:s},a="gridicons-"+this.props.icon;let o=["gridicon",a,t];return this.needsOffset(a,e)&&o.push("needs-offset"),o=o.join(" "),i().createElement("svg",{className:o,focusable:this.props.focusable,height:r,onClick:this.props.onClick,style:n,viewBox:"0 0 24 24",width:s,xmlns:"http://www.w3.org/2000/svg","aria-hidden":this.props["aria-hidden"]},this.getSVGTitle(a),this.renderIcon(a))}}n()(l,"defaultProps",{"aria-hidden":"false",focusable:"true"}),t.Z=l},8852:function(e,t,r){var s=r(211),n=r.n(s),a=r(5736);const __=a.__,i="#fff",o=n().createElement("svg",{className:"jetpack-instant-search__jetpack-colophon-logo",height:12,width:12,viewBox:"0 0 32 32"},n().createElement("path",{className:"jetpack-logo__icon-circle",fill:"#069e08",d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),n().createElement("polygon",{className:"jetpack-logo__icon-triangle",fill:i,points:"15,19 7,19 15,3 "}),n().createElement("polygon",{className:"jetpack-logo__icon-triangle",fill:i,points:"17,29 17,13 25,13 "}));t.Z=e=>{const t="string"==typeof e.locale?e.locale.split("-",1)[0]:null,r=t&&"en"!==t?"https://"+t+".jetpack.com/search?utm_source=poweredby":"https://jetpack.com/search?utm_source=poweredby";return n().createElement("div",{className:"jetpack-instant-search__jetpack-colophon"},n().createElement("a",{href:r,rel:"external noopener noreferrer nofollow",target:"_blank",className:"jetpack-instant-search__jetpack-colophon-link"},o,n().createElement("span",{className:"jetpack-instant-search__jetpack-colophon-text"},__("Search powered by Jetpack","jetpack-search-pkg"))))}},4741:function(e,t,r){var s=r(211),n=r.n(s),a=r(1180);t.Z=e=>{let{type:t,children:r}=e;return"warning"!==t?null:n().createElement("div",{className:"jetpack-instant-search__notice jetpack-instant-search__notice--warning"},n().createElement(a.Z,{icon:"info",size:20}),r)}},6321:function(e,t,r){var s=r(5736),n=r(211),a=r.n(n),i=r(9755);const __=s.__;t.Z=e=>{const{children:t,closeOverlay:r,colorTheme:s,hasOverlayWidgets:o,isVisible:l}=e;return(0,n.useEffect)((()=>{const e=e=>{"Escape"===e.key&&(e.preventDefault(),r())},t=e=>{var t;const s=document.getElementsByClassName("jetpack-instant-search__search-results")[0];null!==(t=e.target)&&void 0!==t&&t.isConnected&&s&&!s.contains(e.target)&&r()};return window.addEventListener("keydown",e),l?window.addEventListener("click",t):window.removeEventListener("click",t),()=>{window.removeEventListener("keydown",e),window.removeEventListener("click",t)}}),[r,l]),a().createElement("div",{"aria-hidden":!l,"aria-labelledby":"jetpack-instant-search__overlay-title",className:["jetpack-instant-search",i.zg,`jetpack-instant-search__overlay--${s}`,o?"":"jetpack-instant-search__overlay--no-sidebar",l?"":"is-hidden"].join(" "),role:"dialog"},a().createElement("h1",{id:"jetpack-instant-search__overlay-title",className:"screen-reader-text"},__("Search results","jetpack-search-pkg")),t)}},4809:function(e,t,r){var s=r(211),n=r.n(s);t.Z=e=>{let{className:t,onClick:r,url:s}=e;const a=function(e){const t=e.split("/").filter((e=>e.length>0));return t.shift(),t}(s);return a.length<1?null:n().createElement("div",{className:`jetpack-instant-search__path-breadcrumb ${t||""}`},n().createElement("a",{className:"jetpack-instant-search__path-breadcrumb-link",href:`//${s}`,onClick:r},a.map(((e,t,r)=>n().createElement("span",{className:"jetpack-instant-search__path-breadcrumb-piece",key:e},decodeURIComponent(e),t!==r.length-1?" › ":"")))))}},1459:function(e,t,r){var s=r(2402),n=r.n(s),a=r(211),i=r.n(a),o=r(9087);t.Z=e=>{const{alt:t,isPhotonEnabled:r,maxHeight:s=600,maxWidth:l=600,src:c,lazyLoad:p=!0,...h}=e,u=(0,a.useRef)(),[d,m]=(0,a.useState)(null),g=(0,o.y)(c,l,s,r);return(0,a.useEffect)((()=>{if(!g)return;let e=null;return p&&"IntersectionObserver"in window?(e=new window.IntersectionObserver(((e,t)=>{for(const r of e)r.isIntersecting&&(m(g),t.unobserve(r.target))})),e.observe(u.current)):m(g),()=>{var t;null===(t=e)||void 0===t||t.disconnect()}}),[p,g]),i().createElement("img",n()({alt:t,ref:u,src:d},h))}},883:function(e,t,r){r(3679);var s=r(211),n=r.n(s),a=r(1180),i=r(2601);const o=["youtube","ooyala","anvplayer","wpvideo","bc_video","video","brightcove","tp_video","jwplayer","tempo-video","vimeo"],l=["gallery","ione_media_gallery"],c=["audio","soundcloud"],p={product:"cart",video:"video",gallery:"image-multiple",event:"calendar",events:"calendar"};t.Z=e=>{let{postType:t,shortcodeTypes:r,iconSize:s=18}=e;if(Object.keys(p).includes(t))return n().createElement(a.Z,{icon:p[t],size:s});const h=(0,i.Z)(r,o),u=(0,i.Z)(r,c),d=(0,i.Z)(r,l);return h?n().createElement(a.Z,{icon:"video",size:s}):u?n().createElement(a.Z,{icon:"audio",size:s}):"page"===t?n().createElement(a.Z,{icon:"pages",size:s}):d?n().createElement(a.Z,{icon:"image-multiple",size:s}):null}},4682:function(e,t,r){var s=r(211),n=r.n(s);class a extends s.Component{render(){const{formattedPrice:e,formattedSalePrice:t,formattedRegularPrice:r,price:a,salePrice:i}=this.props;return a?n().createElement("span",{className:"jetpack-instant-search__product-price"},i>0?n().createElement(s.Fragment,null,n().createElement("s",{className:"jetpack-instant-search__product-price-regular",dangerouslySetInnerHTML:{__html:r}}),n().createElement("span",{dangerouslySetInnerHTML:{__html:t}})):n().createElement("span",{dangerouslySetInnerHTML:{__html:e}})):null}}t.Z=a},6565:function(e,t,r){r.d(t,{Z:function(){return o}});var s=r(5736),n=r(211),a=r.n(n),i=r(1180);const _n=s._n;function o(e){let{rating:t=0,count:r=0,permalink:n}=e;return a().createElement("div",{className:"jetpack-instant-search__product-rating"},a().createElement("span",{"aria-hidden":!0,className:"jetpack-instant-search__product-rating-stars"},Array(5).fill(a().createElement(i.Z,{size:16,icon:"star-outline"})).fill(a().createElement(i.Z,{size:16,icon:"star"}),0,t))," ",a().createElement("a",{"aria-hidden":!0,className:"jetpack-instant-search__product-rating-count",href:n+"#reviews"},(0,s.sprintf)( +/* Translators: the placeholder is the number of product reviews. */ +_n("%d review","%d reviews",r,"jetpack-search-pkg"),r)),a().createElement("span",{className:"screen-reader-text"},(0,s.sprintf)( +/* Translators: the first placeholder is the average product rating out of 5; the second is the number of product reviews. */ +_n("Average rating of %1$d out of 5 from %2$d review.","Average rating of %1$d out of 5 from %2$d reviews.",r,"jetpack-search-pkg"),Number(t).toFixed(2),r)))}},423:function(e,t,r){var s=r(8294),n=r.n(s),a=r(211),i=r.n(a),o=r(5736),l=r(3259),c=r.n(l),p=r(9755);const __=o.__;class h extends a.Component{constructor(){super(...arguments),n()(this,"overlayElement",document.getElementsByClassName(p.zg)[0]),n()(this,"checkScroll",c()((()=>{this.props.enableLoadOnScroll&&window.innerHeight+this.overlayElement.scrollTop>=this.overlayElement.scrollHeight&&this.props.onLoadNextPage()}),100))}componentDidMount(){this.overlayElement.addEventListener("scroll",this.checkScroll)}componentDidUnmount(){this.overlayElement.removeEventListener("scroll",this.checkScroll)}render(){return i().createElement("button",{className:"jetpack-instant-search__scroll-button",disabled:this.props.isLoading,onClick:this.props.onLoadNextPage},this.props.isLoading?i().createElement("span",null,__("Loading…","jetpack-search-pkg")):i().createElement("span",null,__("Load more","jetpack-search-pkg")))}}t.Z=h},5652:function(e,t,r){var s=r(8294),n=r.n(s),a=r(211),i=r.n(a),o=r(3259),l=r.n(o),c=r(9309),p=r(7390),h=r.n(p),u=r(5332),d=r(1773),m=r(6321),g=r(2975),_=r(8050),f=r(9755),v=r(1547),y=r(6302),E=r(8389),k=r(1530);class w extends a.Component{constructor(){var e;super(...arguments),e=this,n()(this,"getResultFormat",(()=>{const e=(0,y.ug)();return this.props.staticFilters&&this.props.staticFilters.group_id&&this.props.staticFilters.group_id!==f.Bk?f.Pz:e||this.state.overlayOptions.resultFormat})),n()(this,"initializeStaticFilters",(()=>{const e=(0,v.bA)();e.length>0&&0===Object.keys(this.props.staticFilters).length&&e.forEach((e=>this.props.setStaticFilter(e.filter_id,e.selected,!0)))})),n()(this,"hideResults",(e=>{this.props.shouldIntegrateWithDom&&(0,y.Q0)(this.props.initialHref,(()=>{this.setState({isVisible:!1}),this.props.clearQueryValues()}),e)})),n()(this,"toggleResults",(e=>{this.props.shouldIntegrateWithDom&&this.state.isVisible!==e&&(e&&this.initializeStaticFilters(),this.setState({isVisible:e}))})),n()(this,"showResults",this.toggleResults.bind(this,!0)),n()(this,"onChangeQueryString",(e=>{this.getResults(),this.props.hasActiveQuery&&!this.state.isVisible&&this.showResults(),!this.props.hasActiveQuery&&e&&this.hideResults(e),null!==this.props.searchQuery&&document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.value=this.props.searchQuery}))})),n()(this,"loadNextPage",(()=>{this.props.hasNextPage&&this.getResults({pageHandle:this.props.response.page_handle})})),n()(this,"getResults",(function(){let{pageHandle:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.props.makeSearchRequest({aggregations:t?{}:e.props.aggregations,excludedPostTypes:e.state.overlayOptions.excludedPostTypes,filter:e.props.filters,staticFilters:e.props.staticFilters,pageHandle:t,query:e.props.searchQuery,resultFormat:e.getResultFormat(),siteId:e.props.options.siteId,sort:e.props.sort,postsPerPage:e.props.options.postsPerPage,adminQueryFilter:e.props.options.adminQueryFilter,isInCustomizer:e.props.isInCustomizer})})),n()(this,"updateOverlayOptions",((e,t)=>{this.setState((t=>({overlayOptionsCustomizerOverride:{...t.overlayOptionsCustomizerOverride,...e}})),t)})),this.state={isVisible:!!this.props.initialIsVisible,overlayOptionsCustomizerOverride:{}},this.getResults=l()(this.getResults,200),this.props.enableAnalytics?this.initializeAnalytics():(0,_.IJ)(),this.props.shouldIntegrateWithDom?this.props.initializeQueryValues():this.props.disableQueryStringIntegration()}static getDerivedStateFromProps(e,t){return{overlayOptions:{...e.overlayOptions,...t.overlayOptionsCustomizerOverride}}}componentDidMount(){this.getResults(),this.props.hasActiveQuery&&this.showResults()}componentDidUpdate(e,t){e.searchQuery===this.props.searchQuery&&e.sort===this.props.sort&&h()(e.filters)===h()(this.props.filters)&&h()(e.staticFilters)===h()(this.props.staticFilters)||this.onChangeQueryString(this.props.isHistoryNavigation),t.overlayOptions.defaultSort!==this.state.overlayOptions.defaultSort&&this.props.setSort(this.state.overlayOptions.defaultSort),h()(t.overlayOptions.excludedPostTypes)!==h()(this.state.overlayOptions.excludedPostTypes)&&this.getResults()}initializeAnalytics(){(0,_.tU)(),(0,_.vy)(),(0,_.AM)(this.props.options.siteId)}render(){const e=this.getResultFormat(),t=this.props.shouldCreatePortal?a.createPortal:e=>e;return i().createElement(a.Fragment,null,this.props.isInCustomizer&&i().createElement(u.Z,{showResults:this.showResults,toggleResults:this.toggleResults,updateOverlayOptions:this.updateOverlayOptions}),this.props.shouldIntegrateWithDom&&i().createElement(d.Z,{initializeQueryValues:this.props.initializeQueryValues,isVisible:this.state.isVisible,overlayOptions:this.state.overlayOptions,setFilter:this.props.setFilter,setSearchQuery:this.props.setSearchQuery,showResults:this.showResults,themeOptions:this.props.themeOptions}),t(i().createElement(m.Z,{closeColor:this.state.overlayOptions.closeColor,closeOverlay:this.hideResults,colorTheme:this.state.overlayOptions.colorTheme,hasOverlayWidgets:this.props.hasOverlayWidgets,isVisible:this.state.isVisible},i().createElement(g.Z,{closeOverlay:this.hideResults,enableLoadOnScroll:this.state.overlayOptions.enableInfScroll,enableSort:this.state.overlayOptions.enableSort,filters:this.props.filters,staticFilters:this.props.staticFilters,hasError:this.props.hasError,hasNextPage:this.props.hasNextPage,highlightColor:this.state.overlayOptions.highlightColor,isLoading:this.props.isLoading,isPhotonEnabled:this.props.options.isPhotonEnabled,isPrivateSite:this.props.options.isPrivateSite,isVisible:this.state.isVisible,locale:this.props.options.locale,onChangeSearch:this.props.setSearchQuery,onChangeSort:this.props.setSort,onLoadNextPage:this.loadNextPage,overlayTrigger:this.state.overlayOptions.overlayTrigger,postTypes:this.props.options.postTypes,response:this.props.response,resultFormat:e,searchQuery:this.props.searchQuery,showPoweredBy:this.state.overlayOptions.showPoweredBy,sort:this.props.sort,widgets:this.props.options.widgets,widgetOutsideOverlay:this.props.widgetOutsideOverlay,hasNonSearchWidgets:this.props.options.hasNonSearchWidgets})),document.body))}}n()(w,"defaultProps",{overlayOptions:{},widgets:[]}),t.Z=(0,c.$j)(((e,t)=>({filters:(0,k.Zj)(e),staticFilters:(0,k.Bk)(e),hasActiveQuery:(0,k.en)(e),hasError:(0,k.xT)(e),isHistoryNavigation:(0,k.wI)(e),hasNextPage:(0,k.Qy)(e),isLoading:(0,k.hg)(e),response:(0,k.ck)(e),searchQuery:(0,k.uP)(e),sort:(0,k.r$)(e,t.overlayOptions.defaultSort),widgetOutsideOverlay:(0,k.ZN)(e)})),{clearQueryValues:E.Mz,disableQueryStringIntegration:E.OZ,initializeQueryValues:E.Ln,makeSearchRequest:E.x1,setStaticFilter:E.O1,setFilter:E.Tv,setSearchQuery:E.ql,setSort:E.HD})(w)},3725:function(e,t,r){var s=r(211),n=r.n(s),a=r(5736),i=r(5348),o=r.n(i),l=r(1180);const __=a.__;let c=null;t.Z=e=>{var t;const[r]=(0,s.useState)((()=>o()("jetpack-instant-search__box-input-"))),a=(0,s.useRef)(null);return(0,s.useEffect)((()=>{var t;e.isVisible?(t=a.current,()=>{c=document.activeElement,t.focus()})():e.shouldRestoreFocus&&c&&c.focus()}),[e.isVisible,e.shouldRestoreFocus]),n().createElement(s.Fragment,null,n().createElement("div",{className:"jetpack-instant-search__box"},n().createElement("label",{className:"jetpack-instant-search__box-label",htmlFor:r},n().createElement("div",{className:"jetpack-instant-search__box-gridicon"},n().createElement(l.Z,{icon:"search",size:24})),n().createElement("input",{autoComplete:"off",id:r,className:"search-field jetpack-instant-search__box-input",inputMode:"search",onChange:e.isVisible?e.onChange:null,ref:a,placeholder:__("Search…","jetpack-search-pkg"),type:"search",value:null!==(t=e.searchQuery)&&void 0!==t?t:""}),"string"==typeof e.searchQuery&&e.searchQuery.length>0&& +/* Translators: Button is used to clear the search input query. */ +n().createElement("input",{type:"button",value:__("clear","jetpack-search-pkg"),onClick:e.onClear}),n().createElement("button",{className:"screen-reader-text assistive-text"},__("Search","jetpack-search-pkg")))))}},7704:function(e,t,r){var s=r(211),n=r.n(s),a=r(9873);t.Z=e=>n().createElement("div",{className:"jetpack-instant-search__search-form-controls",role:"form"},e.children,e.enableSort&&n().createElement(a.Z,{onChange:e.onChangeSort,resultFormat:e.resultFormat,value:e.sort}))},2547:function(e,t,r){r.d(t,{Z:function(){return d},a:function(){return u}});var s=r(8294),n=r.n(s),a=(r(3679),r(211)),i=r.n(a),o=r(4553),l=r.n(o),c=r(5348),p=r.n(c),h=r(2160);const u=e=>e.split(" ").join("T");class d extends a.Component{constructor(){super(...arguments),n()(this,"filtersList",(0,a.createRef)()),n()(this,"idPrefix",p()("jetpack-instant-search__search-filter-")),n()(this,"toggleFilter",(()=>{this.props.onChange(this.getIdentifier(),(0,h.b)(this.filtersList.current))})),n()(this,"toggleStaticFilter",(e=>{this.props.onChange(this.getIdentifier(),e.target.value)})),n()(this,"renderDate",(e=>{let{key_as_string:t,doc_count:r}=e;const{locale:s="en-US"}=this.props;return i().createElement("div",null,i().createElement("input",{checked:this.isChecked(t),disabled:!this.isChecked(t)&&0===r,id:`${this.idPrefix}-dates-${this.getIdentifier()}-${t}`,name:t,onChange:this.toggleFilter,type:"checkbox",className:"jetpack-instant-search__search-filter-list-input"}),i().createElement("label",{htmlFor:`${this.idPrefix}-dates-${this.getIdentifier()}-${t}`,className:"jetpack-instant-search__search-filter-list-label"},new Date(u(t)).toLocaleString(s,function(e){switch(e){case"day":return{year:"numeric",month:"long",day:"numeric"};case"month":return{year:"numeric",month:"long"};case"year":return{year:"numeric"}}return{year:"numeric",month:"long"}}(this.props.configuration.interval))," ","(",r,")"))})),n()(this,"renderPostType",(e=>{let{key:t,doc_count:r}=e;const s=t in this.props.postTypes?this.props.postTypes[t].singular_name:t;return i().createElement("div",null,i().createElement("input",{checked:this.isChecked(t),disabled:!this.isChecked(t)&&0===r,id:`${this.idPrefix}-post-types-${t}`,name:t,onChange:this.toggleFilter,type:"checkbox",className:"jetpack-instant-search__search-filter-list-input"}),i().createElement("label",{htmlFor:`${this.idPrefix}-post-types-${t}`,className:"jetpack-instant-search__search-filter-list-label"},l()(s)," (",r,")"))})),n()(this,"renderTaxonomy",(e=>{let{key:t,doc_count:r}=e;const[s,n]=t&&t.split(/\/(.+)/);return i().createElement("div",null,i().createElement("input",{checked:this.isChecked(s),disabled:!this.isChecked(s)&&0===r,id:`${this.idPrefix}-taxonomies-${s}`,name:s,onChange:this.toggleFilter,type:"checkbox",className:"jetpack-instant-search__search-filter-list-input"}),i().createElement("label",{htmlFor:`${this.idPrefix}-taxonomies-${s}`,className:"jetpack-instant-search__search-filter-list-label"},l()(n)," (",r,")"))})),n()(this,"renderGroup",(e=>i().createElement("div",null,i().createElement("input",{checked:this.isChecked(e.value),id:`${this.idPrefix}-groups-${e.value}`,name:this.props.configuration.filter_id,onChange:this.toggleStaticFilter,value:e.value,type:"radio",className:"jetpack-instant-search__search-filter-list-input"}),i().createElement("label",{htmlFor:`${this.idPrefix}-groups-${e.value}`,className:"jetpack-instant-search__search-filter-list-label"},e.name))))}getIdentifier(){return"postType"===this.props.type?"post_types":"date"===this.props.type?`${this.props.configuration.interval}_${this.props.configuration.field}`:"taxonomy"===this.props.type?this.props.configuration.taxonomy:"group"===this.props.type?this.props.configuration.filter_id:void 0}isChecked(e){return Boolean(this.props.value&&this.props.value.includes(e))}renderDates(){return[...this.props.aggregation.buckets.filter((e=>!!e)).map(this.renderDate)].reverse().slice(0,this.props.configuration.count)}renderPostTypes(){return this.props.aggregation.buckets.map(this.renderPostType)}renderTaxonomies(){return this.props.aggregation.buckets.map(this.renderTaxonomy)}renderGroups(){return this.props.configuration.values.map(this.renderGroup)}render(){return i().createElement("div",null,i().createElement("h3",{className:"jetpack-instant-search__search-filter-sub-heading"},this.props.configuration.name),i().createElement("div",{ref:this.filtersList},i().createElement("div",{className:"jetpack-instant-search__search-filter-list jetpack-instant-search__search-static-filter-list"},"group"===this.props.type&&this.renderGroups()),this.props.aggregation&&"buckets"in this.props.aggregation&&i().createElement("div",{className:"jetpack-instant-search__search-filter-list"},"date"===this.props.type&&this.renderDates(),"postType"===this.props.type&&this.renderPostTypes(),"taxonomy"===this.props.type&&this.renderTaxonomies())))}}},1631:function(e,t,r){var s=r(8294),n=r.n(s),a=r(211),i=r.n(a),o=r(5736),l=r(9309),c=r(2547),p=r(1547),h=r(8389),u=r(8050);const __=o.__;class d extends a.Component{constructor(){super(...arguments),n()(this,"onChangeFilter",((e,t)=>{this.props.setFilter(e,t),this.props.onChange&&this.props.onChange()})),n()(this,"onChangeStaticFilter",((e,t)=>{(0,u.GE)({filterName:e,filterValue:t}),this.props.setStaticFilter(e,t),this.props.onChange&&this.props.onChange()})),n()(this,"onClearFilters",(e=>{e.preventDefault(),"click"!==e.type&&("keydown"!==e.type||"Enter"!==e.key&&" "!==e.key)||(this.props.clearFilters(),this.props.onChange&&this.props.onChange())})),n()(this,"renderFilterComponent",(e=>{let{configuration:t,results:r}=e;return r&&i().createElement(c.Z,{aggregation:r,configuration:t,locale:this.props.locale,onChange:this.onChangeFilter,postTypes:this.props.postTypes,type:(0,p.jc)(t),value:this.props.filters[(0,p.jZ)(t)]})})),n()(this,"renderStaticFilterComponent",(e=>e.hasOwnProperty("visible")&&!e.visible?null:i().createElement(c.Z,{aggregation:[],configuration:e,locale:this.props.locale,onChange:this.onChangeStaticFilter,postTypes:this.props.postTypes,type:(0,p.jc)(e),value:this.props.staticFilters[(0,p.jZ)(e)]})))}hasActiveFilters(){return Object.keys(this.props.filters).length>0}render(){var e,t,r,s;if(!this.props.widget)return null;const n=(0,p.bA)(),a=null===(e=this.props.results)||void 0===e?void 0:e.aggregations;return i().createElement("div",{className:"jetpack-instant-search__search-filters"},this.props.showTitle&&i().createElement("h2",{className:"jetpack-instant-search__search-filters-title"},__("Filter options","jetpack-search-pkg")),this.props.showClearFiltersButton&&this.hasActiveFilters()&&i().createElement("a",{class:"jetpack-instant-search__clear-filters-link",href:"#",onClick:this.onClearFilters,onKeyDown:this.onClearFilters,role:"button",tabIndex:"0"},__("Clear filters","jetpack-search-pkg")),(null===(t=this.props.widget)||void 0===t?void 0:t.filters)&&this.props.widget.filters.length>0&&n.map(this.renderStaticFilterComponent),null===(r=this.props.widget)||void 0===r||null===(s=r.filters)||void 0===s?void 0:s.map((e=>a?{configuration:e,results:a[e.filter_id]}:null)).filter((e=>!!e)).filter((e=>{let{results:t}=e;return!!t&&Array.isArray(t.buckets)&&t.buckets.length>0})).map(this.renderFilterComponent))}}n()(d,"defaultProps",{showClearFiltersButton:!0,showTitle:!0}),t.Z=(0,l.$j)(null,{clearFilters:h.K5,setFilter:h.Tv,setStaticFilter:h.O1})(d)},9988:function(e,t,r){var s=r(8294),n=r.n(s),a=r(211),i=r.n(a),o=r(3725);const l=e=>e.preventDefault();class c extends a.Component{constructor(){super(...arguments),n()(this,"onClear",(()=>this.props.onChangeSearch(""))),n()(this,"onChangeSearch",(e=>this.props.onChangeSearch(e.currentTarget.value)))}render(){return i().createElement("form",{autoComplete:"off",onSubmit:l,role:"search",className:this.props.className},i().createElement("div",{className:"jetpack-instant-search__search-form"},i().createElement(o.Z,{isVisible:this.props.isVisible,onChange:this.onChangeSearch,onClear:this.onClear,shouldRestoreFocus:!0,searchQuery:this.props.searchQuery})))}}t.Z=c},3162:function(e,t,r){var s=r(211),n=r.n(s),a=r(1180);t.Z=e=>{let{comments:t,iconSize:r=18}=e;return t?n().createElement("div",{className:"jetpack-instant-search__search-result-comments"},n().createElement(a.Z,{icon:"comment",size:r}),n().createElement("span",{className:"jetpack-instant-search__search-result-comments-text",dangerouslySetInnerHTML:{__html:t.join(" ... ")}})):null}},1954:function(e,t,r){r.d(t,{Z:function(){return c}});var s=r(211),n=r.n(s),a=r(4809),i=r(1459),o=r(3162),l=r(2547);function c(e){const{isMultiSite:t,locale:r="en-US"}=e,{result_type:s,fields:c,highlight:p}=e.result;if("post"!==s)return null;const h=Array.isArray(c["image.url.raw"])?c["image.url.raw"][0]:c["image.url.raw"];return n().createElement("li",{className:["jetpack-instant-search__search-result","jetpack-instant-search__search-result-expanded",`jetpack-instant-search__search-result-expanded--${c.post_type}`,h?"":"jetpack-instant-search__search-result-expanded--no-image",t?"is-multisite":""].join(" ")},n().createElement("div",{className:"jetpack-instant-search__search-result-expanded__content-container"},n().createElement("div",{className:"jetpack-instant-search__search-result-expanded__copy-container"},n().createElement("h3",{className:"jetpack-instant-search__search-result-title jetpack-instant-search__search-result-expanded__title"},n().createElement("a",{className:"jetpack-instant-search__search-result-title-link jetpack-instant-search__search-result-expanded__title-link",href:`//${c["permalink.url.raw"]}`,onClick:e.onClick,dangerouslySetInnerHTML:{__html:p.title}})),!t&&n().createElement(a.Z,{className:"jetpack-instant-search__search-result-expanded__path",onClick:e.onClick,url:`//${c["permalink.url.raw"]}`}),n().createElement("div",{className:"jetpack-instant-search__search-result-expanded__content",dangerouslySetInnerHTML:{__html:p.content.join(" ... ")}}),p.comments&&n().createElement(o.Z,{comments:p.comments})),n().createElement("a",{className:"jetpack-instant-search__search-result-expanded__image-link",href:`//${c["permalink.url.raw"]}`,onClick:e.onClick},n().createElement("div",{className:"jetpack-instant-search__search-result-expanded__image-container"},h?n().createElement(i.Z,{alt:c["image.alt_text"],className:"jetpack-instant-search__search-result-expanded__image",isPhotonEnabled:e.isPhotonEnabled,src:`//${h}`}):null))),t&&n().createElement("ul",{className:"jetpack-instant-search__search-result-expanded__footer"},n().createElement("li",null,n().createElement(i.Z,{alt:c.blog_name,className:"jetpack-instant-search__search-result-expanded__footer-blog-image",isPhotonEnabled:!1,height:24,width:24,src:c.blog_icon_url,lazyLoad:!1}),n().createElement("span",{className:"jetpack-instant-search__search-result-expanded__footer-blog"},c.blog_name)),n().createElement("li",null,n().createElement("span",{className:"jetpack-instant-search__search-result-expanded__footer-author"},c.author)),n().createElement("li",null,n().createElement("span",{className:"jetpack-instant-search__search-result-expanded__footer-date"},new Date((0,l.a)(c.date)).toLocaleDateString(r,{year:"numeric",month:"short",day:"numeric"})))))}},122:function(e,t,r){var s=r(211),n=r.n(s),a=r(1180),i=r(4809),o=r(883),l=r(3162);class c extends s.Component{getIconSize(){return 18}getTags(){let e=this.props.result.fields["tag.name.default"];return e?(Array.isArray(e)||(e=[e]),e.slice(0,5)):[]}getCategories(){let e=this.props.result.fields["category.name.default"];return e?(Array.isArray(e)||(e=[e]),e.slice(0,5)):[]}renderNoMatchingContent(){const e=this.getTags(),t=this.getCategories(),r=0===e.length&&0===t.length;return n().createElement("div",{className:"jetpack-instant-search__search-result-minimal-content"},r&&n().createElement(i.Z,{url:this.props.result.fields["permalink.url.raw"]}),n().createElement("div",{className:"jetpack-instant-search__search-result-minimal-cats-and-tags"},0!==e.length&&n().createElement("ul",{className:"jetpack-instant-search__search-result-minimal-tags"},e.map((e=>n().createElement("li",{className:"jetpack-instant-search__search-result-minimal-tag"},n().createElement(a.Z,{icon:"tag",size:this.getIconSize()}),n().createElement("span",{className:"jetpack-instant-search__search-result-minimal-tag-text"},e))))),0!==t.length&&n().createElement("ul",{className:"jetpack-instant-search__search-result-minimal-cats"},t.map((e=>n().createElement("li",{className:"jetpack-instant-search__search-result-minimal-cat"},n().createElement(a.Z,{icon:"folder",size:this.getIconSize()}),n().createElement("span",{className:"jetpack-instant-search__search-result-minimal-cat-text"},e)))))))}renderMatchingContent(){return n().createElement("div",{className:"jetpack-instant-search__search-result-minimal-content",dangerouslySetInnerHTML:{__html:this.props.result.highlight.content.join(" ... ")}})}render(){const{result_type:e,fields:t,highlight:r}=this.props.result;if("post"!==e)return null;const s=!r.content||""===r.content[0];return n().createElement("li",{className:"jetpack-instant-search__search-result jetpack-instant-search__search-result-minimal"},n().createElement("h3",{className:"jetpack-instant-search__search-result-title jetpack-instant-search__search-result-minimal-title"},n().createElement(o.Z,{postType:t.post_type,shortcodeTypes:t.shortcode_types}),n().createElement("a",{className:"jetpack-instant-search__search-result-title-link jetpack-instant-search__search-result-minimal-title-link",href:`//${t["permalink.url.raw"]}`,onClick:this.props.onClick,dangerouslySetInnerHTML:{__html:r.title}})),s?this.renderNoMatchingContent():this.renderMatchingContent(),n().createElement(l.Z,{comments:r&&r.comments}))}}t.Z=c},6504:function(e,t,r){r(3679);var s=r(211),n=r.n(s),a=r(5736),i=r(1180),o=r(1459),l=r(6565),c=r(4682);const __=a.__;class p extends s.Component{render(){var e;const{result_type:t,fields:r,highlight:s}=this.props.result;if("post"!==t)return null;const a=Array.isArray(r["image.url.raw"])?r["image.url.raw"][0]:r["image.url.raw"],p=Array.isArray(s.title)&&s.title[0].length>0?s.title[0]:__("No title","jetpack-search-pkg"),h="string"==typeof this.props.searchQuery&&""!==this.props.searchQuery.trim(),u=p.includes("<mark>"),d=h&&!u&&Array.isArray(s.content)&&(null===(e=s.content[0])||void 0===e?void 0:e.length)>0;return n().createElement("li",{className:"jetpack-instant-search__search-result jetpack-instant-search__search-result-product"},n().createElement("a",{className:"jetpack-instant-search__search-result-product-img-link",href:`//${r["permalink.url.raw"]}`,onClick:this.props.onClick},n().createElement("div",{className:"jetpack-instant-search__search-result-product-img-container "+(a?"":"jetpack-instant-search__search-result-product-img-container--placeholder")},a?n().createElement(o.Z,{alt:r["image.alt_text"],className:"jetpack-instant-search__search-result-product-img",isPhotonEnabled:this.props.isPhotonEnabled,src:`//${a}`}):n().createElement("div",{className:"jetpack-instant-search__search-result-product-img"},n().createElement(i.Z,{icon:"block",style:{}}),n().createElement(i.Z,{icon:"image",style:{},title:__("Does not have an image","jetpack-search-pkg")})))),n().createElement("h3",{className:"jetpack-instant-search__search-result-title jetpack-instant-search__search-result-product-title"},n().createElement("a",{className:"jetpack-instant-search__search-result-title-link",href:`//${r["permalink.url.raw"]}`,onClick:this.props.onClick,dangerouslySetInnerHTML:{__html:p}})),n().createElement(c.Z,{price:r["wc.price"],salePrice:r["wc.sale_price"],formattedPrice:r["wc.formatted_price"],formattedRegularPrice:r["wc.formatted_regular_price"],formattedSalePrice:r["wc.formatted_sale_price"]}),!!r["meta._wc_average_rating.double"]&&n().createElement(l.Z,{count:r["meta._wc_review_count.long"],rating:r["meta._wc_average_rating.double"],permalink:`//${r["permalink.url.raw"]}`}),d&&n().createElement("div",{className:"jetpack-instant-search__search-result-product-match"},n().createElement("mark",null,n().createElement(i.Z,{icon:"search",style:{},title:!1}),n().createElement("span",null,"comment"in s?__("Matches comments","jetpack-search-pkg"):__("Matches content","jetpack-search-pkg",0)))))}}t.Z=p},8192:function(e,t,r){var s=r(2402),n=r.n(s),a=r(8294),i=r.n(a),o=r(211),l=r.n(o),c=r(122),p=r(1954),h=r(6504),u=r(8050),d=r(9755);class m extends o.Component{constructor(){super(...arguments),i()(this,"onClick",(()=>{this.props.railcar&&(0,u.Lo)({...this.getCommonTrainTracksProps(),action:"click"})}))}componentDidMount(){this.props.railcar&&(0,u.Sn)(this.getCommonTrainTracksProps())}componentDidUpdate(e){this.props.railcar!==e.railcar&&this.props.railcar&&(0,u.Sn)(this.getCommonTrainTracksProps())}getCommonTrainTracksProps(){return{fetch_algo:this.props.railcar.fetch_algo,fetch_position:this.props.railcar.fetch_position,fetch_query:this.props.railcar.fetch_query,railcar:this.props.railcar.railcar,rec_blog_id:this.props.railcar.rec_blog_id,rec_post_id:this.props.railcar.rec_post_id,session_id:this.props.railcar.session_id,ui_algo:"jetpack-instant-search-ui/v1",ui_position:this.props.index}}render(){if(this.props.resultFormat===d.LI)return l().createElement(h.Z,n()({onClick:this.onClick},this.props));if(this.props.resultFormat===d.Pz){const e=this.props.staticFilters&&this.props.staticFilters.group_id&&this.props.staticFilters.group_id!==d.Bk;return l().createElement(p.Z,n()({onClick:this.onClick},this.props,{isMultiSite:e}))}return l().createElement(c.Z,n()({onClick:this.onClick},this.props))}}t.Z=m},2975:function(e,t,r){var s=r(8294),n=r.n(s),a=r(5736),i=r(211),o=r.n(i),l=r(1180),c=r(4741),p=r(423),h=r(7704),u=r(9988),d=r(8192),m=r(4524),g=r(5825),_=r(1547),f=r(9755);const __=a.__,_n=a._n;class v extends i.Component{constructor(){super(...arguments),n()(this,"state",{shouldShowMobileSecondary:!1}),n()(this,"toggleMobileSecondary",(e=>{"click"!==e.type&&("keydown"!==e.type||"Enter"!==e.key&&" "!==e.key)||(" "===e.key&&e.preventDefault(),this.setState((e=>({shouldShowMobileSecondary:!e.shouldShowMobileSecondary}))))})),n()(this,"closeOverlay",(e=>{e.preventDefault(),this.props.closeOverlay()})),n()(this,"onKeyPressHandler",(e=>{"Enter"===e.key&&(e.preventDefault(),this.props.closeOverlay())}))}hasFilterOptions(){var e,t;let r=[...this.props.widgets];return(null===(e=this.props.widgetOutsideOverlay)||void 0===e||null===(t=e.filters)||void 0===t?void 0:t.length)>0&&(r=[this.props.widgetOutsideOverlay,...r]),r.length>0}getSearchTitle(){const{total:e=0,corrected_query:t=!1}=this.props.response,r=""!==this.props.searchQuery,s=!1!==t,n=(new Intl.NumberFormat).format(e),i=this.props.staticFilters&&this.props.staticFilters.group_id&&this.props.staticFilters.group_id!==f.Bk;if(this.props.isLoading)return r?__("Searching…","jetpack-search-pkg",0):__("Loading popular results…","jetpack-search-pkg");if(0===e||this.props.hasError)return __("No results found","jetpack-search-pkg");if(r&&s)return(0,a.sprintf)( +/* translators: %1$s: number of results. %2$s: the corrected search query. */ +_n('Found %1$s result for "%2$s"','Found %1$s results for "%2$s"',e,"jetpack-search-pkg"),n,t);if(i){var o;const t=(0,_.bA)().filter((e=>"group_id"===e.filter_id)),r=1===t.length&&t[0].values?t[0].values.filter((e=>e.value!==f.Bk)):{},s=null!==(o=r[0])&&void 0!==o&&o.name?r[0].name:__("All P2","jetpack-search-pkg");return(0,a.sprintf)( +/* translators: %1$s: number of results. - %2$s: site name. */ +_n("Found %1$s result in %2$s","Found %1$s results in %2$s",e,"jetpack-search-pkg"),n,s)}return r?(0,a.sprintf)( +/* translators: %s: number of results. */ +_n("Found %s result","Found %s results",e,"jetpack-search-pkg"),n,this.props.searchQuery):__("Showing popular results","jetpack-search-pkg")}renderPrimarySection(){const{highlightColor:e,searchQuery:t}=this.props,{results:r=[],total:s=0,corrected_query:n=!1}=this.props.response,l=(0,g.B)(e),h=!1!==n,u=s>0;return o().createElement(i.Fragment,null,o().createElement("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t\t\t\t.jetpack-instant-search *::selection,\n\t\t\t\t\t\t\t.jetpack-instant-search .jetpack-instant-search__search-results .jetpack-instant-search__search-results-primary .jetpack-instant-search__search-result mark {\n\t\t\t\t\t\t\t\tcolor: ${l};\n\t\t\t\t\t\t\t\tbackground-color: ${e};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t`}}),o().createElement("h2",{className:"jetpack-instant-search__search-results-title"},this.getSearchTitle()),u&&h&&o().createElement("p",{className:"jetpack-instant-search__search-results-unused-query"}, +/* translators: %s: Search query. */ +(0,a.sprintf)(__('No results for "%s"',"jetpack-search-pkg"),t)),this.props.hasError&&o().createElement(c.Z,{type:"warning"},__("It looks like you're offline. Please reconnect for results.","jetpack-search-pkg")),u&&!this.props.hasError&&this.props.response._isOffline&&o().createElement(c.Z,{type:"warning"},__("It looks like you're offline. Please reconnect to load the latest results.","jetpack-search-pkg")),u&&!this.props.hasError&&o().createElement("ol",{className:`jetpack-instant-search__search-results-list is-format-${this.props.resultFormat}`},r.map(((e,t)=>o().createElement(d.Z,{index:t,key:t,staticFilters:this.props.staticFilters,isPhotonEnabled:this.props.isPhotonEnabled,locale:this.props.locale,railcar:this.props.isVisible?e.railcar:null,result:e,resultFormat:this.props.resultFormat,searchQuery:this.props.searchQuery})))),u&&this.props.hasNextPage&&o().createElement("div",{className:"jetpack-instant-search__search-results-pagination"},o().createElement(p.Z,{enableLoadOnScroll:this.props.enableLoadOnScroll,isLoading:this.props.isLoading,onLoadNextPage:this.props.onLoadNextPage})))}renderSecondarySection(){return o().createElement(m.Z,{filters:this.props.filters,staticFilters:this.props.staticFilters,isLoading:this.props.isLoading,locale:this.props.locale,postTypes:this.props.postTypes,response:this.props.response,showPoweredBy:this.props.showPoweredBy,widgets:this.props.widgets,widgetOutsideOverlay:this.props.widgetOutsideOverlay})}render(){return o().createElement("div",{"aria-hidden":!0===this.props.isLoading,className:"jetpack-instant-search__search-results"},o().createElement("div",{className:"jetpack-instant-search__search-results-controls",role:"form"},o().createElement(u.Z,{"aria-controls":"jetpack-instant-search__search-results-content",className:"jetpack-instant-search__search-results-search-form",isVisible:this.props.isVisible,onChangeSearch:this.props.onChangeSearch,searchQuery:this.props.searchQuery}),o().createElement("button",{className:"jetpack-instant-search__overlay-close",onClick:this.closeOverlay,onKeyPress:this.onKeyPressHandler,tabIndex:"0","aria-label":__("Close search results","jetpack-search-pkg")},o().createElement(l.Z,{icon:"cross",size:"24","aria-hidden":"true",focusable:"false"}))),o().createElement(h.Z,{enableSort:this.props.enableSort,onChangeSort:this.props.onChangeSort,resultFormat:this.props.resultFormat,sort:this.props.sort},(this.hasFilterOptions()||this.props.hasNonSearchWidgets)&&o().createElement("div",{role:"button",onClick:this.toggleMobileSecondary,onKeyDown:this.toggleMobileSecondary,tabIndex:"0",className:"jetpack-instant-search__search-results-filter-button"},__("Filters","jetpack-search-pkg"),o().createElement(l.Z,{icon:"chevron-down",size:16,alt:__("Show search filters","jetpack-search-pkg"),"aria-hidden":"true"}),o().createElement("span",{className:"screen-reader-text assistive-text"},this.state.shouldShowMobileSecondary?__("Hide filters","jetpack-search-pkg"):__("Show filters","jetpack-search-pkg")))),o().createElement("div",{"aria-live":"polite",className:"jetpack-instant-search__search-results-content",id:"jetpack-instant-search__search-results-content"},o().createElement("div",{className:"jetpack-instant-search__search-results-primary"},this.renderPrimarySection()),o().createElement("div",{className:["jetpack-instant-search__search-results-secondary",(this.state.shouldShowMobileSecondary?"jetpack-instant-search__search-results-secondary--show-as-modal":"")+" "].join(" ")},this.renderSecondarySection())))}}t.Z=v},9873:function(e,t,r){r.d(t,{Z:function(){return c}});var s=r(8294),n=r.n(s),a=r(211),i=r.n(a),o=r(5736),l=r(343);const __=o.__;class c extends a.Component{constructor(){super(...arguments),n()(this,"handleKeyPress",(e=>{this.props.value!==e.currentTarget.value&&"Enter"===e.key&&(e.preventDefault(),this.props.onChange(e.currentTarget.dataset.value))})),n()(this,"handleClick",(e=>{this.props.value!==e.currentTarget.value&&(e.preventDefault(),this.props.onChange(e.currentTarget.dataset.value))})),n()(this,"handleSelectChange",(e=>{this.props.value!==e.currentTarget.value&&(e.preventDefault(),this.props.onChange(e.currentTarget.value))}))}render(){const e=(0,l.n)(this.props.resultFormat);return e.size>3?i().createElement("div",{"aria-controls":"jetpack-instant-search__search-results-content",className:"jetpack-instant-search__search-sort jetpack-instant-search__search-sort-with-select"},i().createElement("label",{htmlFor:"jetpack-instant-search__search-sort-select"},__("Sort:","jetpack-search-pkg")),i().createElement("select",{id:"jetpack-instant-search__search-sort-select",onBlur:this.handleSelectChange,onChange:this.handleSelectChange},[...e.entries()].map((e=>{let[t,r]=e;return i().createElement("option",{value:t,key:t,selected:this.props.value===t?"selected":""},r)})))):i().createElement("div",{"aria-controls":"jetpack-instant-search__search-results-content",className:"jetpack-instant-search__search-sort jetpack-instant-search__search-sort-with-links"},i().createElement("div",{className:"screen-reader-text"},__("Sort by: ","jetpack-search-pkg")),[...e.entries()].map((e=>{let[t,r]=e;return i().createElement("a",{className:"jetpack-instant-search__search-sort-option "+(this.props.value===t?"is-selected":""),"data-value":t,key:t,onClick:this.handleClick,onKeyPress:this.handleKeyPress,role:"button",tabIndex:0},r)})))}}},4524:function(e,t,r){var s=r(211),n=r.n(s),a=r(1631),i=r(5181),o=r(8852);t.Z=e=>n().createElement("div",{className:"jetpack-instant-search__sidebar"},n().createElement(a.Z,{filters:e.filters,staticFilters:e.staticFilters,loading:e.isLoading,locale:e.locale,postTypes:e.postTypes,results:e.response,showClearFiltersButton:!0,widget:e.widgetOutsideOverlay}),n().createElement(i.Z,null),e.widgets.map((t=>(0,s.createPortal)(n().createElement("div",{id:`${t.widget_id}-portaled-wrapper`,className:"jetpack-instant-search__portaled-wrapper"},n().createElement(a.Z,{filters:e.filters,staticFilters:e.staticFilters,loading:e.isLoading,locale:e.locale,postTypes:e.postTypes,results:e.response,showClearFiltersButton:!1,showTitle:!1,widget:t})),document.getElementById(`${t.widget_id}-wrapper`)))),e.showPoweredBy&&n().createElement(o.Z,{locale:e.locale}))},5181:function(e,t,r){r.d(t,{Z:function(){return o}});var s=r(8294),n=r.n(s),a=r(211),i=r.n(a);class o extends a.Component{constructor(){super(...arguments),n()(this,"container",(0,a.createRef)())}componentDidMount(){const e=document.getElementsByClassName("jetpack-instant-search__widget-area")[0];e&&(e.style.removeProperty("display"),this.container.current.appendChild(e))}shouldComponentUpdate(){return!1}render(){return i().createElement("div",{className:"jetpack-instant-search__widget-area-container",ref:this.container})}}},564:function(e,t,r){function s(e,t,r){if(!e)return"";const s=decodeURIComponent(e);return(!t||"false"!==s)&&(!(!t||"true"!==s)||(r&&0*+s==0?+s:s))}function n(e,t,r){let n,a;const i={},o=e.split("&");for(t=void 0===t||t,r=void 0===r||r;n=o.shift();)n=n.split("="),a=n.shift(),void 0!==i[a]?i[a]=[].concat(i[a],s(n.shift(),t,r)):i[a]=s(n.shift(),t,r);return i}r.d(t,{J:function(){return n}})},1559:function(e,t,r){r.r(t),r.d(t,{initialize:function(){return u}});r(554);var s=r(762),n=r(2687),a=r(9309),i=r(5652),o=r(2160),l=r(9755),c=r(5476),p=r(4184),h=r(9379);function u(){window[l.W1]&&"siteId"in window[l.W1]&&(0,n.render)(s.ZP.createElement(a.zt,{store:h.Z},s.ZP.createElement(i.Z,{aggregations:(0,c.a5)([...window[l.W1].widgets,...window[l.W1].widgetsOutsideOverlay]),enableAnalytics:!0,hasOverlayWidgets:!!window[l.W1].hasOverlayWidgets,initialHref:window.location.href,initialIsVisible:window[l.W1].showResults,isInCustomizer:(0,p.bS)(),overlayOptions:window[l.W1].overlayOptions,options:window[l.W1],shouldCreatePortal:!0,shouldIntegrateWithDom:!0,themeOptions:(0,o.C)(window[l.W1])})),document.body)}},5476:function(e,t,r){r.d(t,{Wb:function(){return m},a5:function(){return d},yC:function(){return T}});r(3679);var s=r(8750),n=r(5731),a=r(7390),i=r.n(a),o=r(9353),l=r(1547),c=r(9755);let p;const h=(0,o.Z)(30,5*c.AG),u=(0,o.Z)(30,30*c.AG);function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={};return e.forEach((e=>{let{filters:r}=e;return r.forEach((e=>{t[e.filter_id]=g(e)}))})),t}function m(e){var t;return e=null!==(t=e)&&void 0!==t?t:{},Object.fromEntries(Object.entries(e).filter((e=>{var t;let[,r]=e;return(null==r||null===(t=r.buckets)||void 0===t?void 0:t.length)>0})).map((e=>{let[t,r]=e;const s=r.buckets.map((e=>({...e,doc_count:0})));return[t,{...r,buckets:s}]})))}function g(e){switch(e.type){case"date_histogram":return{date_histogram:{field:"post_date_gmt"===e.field?"date_gmt":"date",interval:e.interval}};case"taxonomy":{let t=`taxonomy.${e.taxonomy}.slug_slash_name`;return"post_tag"===e.taxonomy?t="tag.slug_slash_name":"category"===e.taxonomy&&(t="category.slug_slash_name"),{terms:{field:t,size:e.count}}}case"post_type":return{terms:{field:e.type,size:e.count}}}}C();const _=/(\d{4})-(\d{2})-(\d{2})/;function f(e,t,r){let s,n;"year"===r&&([,s,,]=t.match(_)),"month"===r&&([,s,n]=t.match(_));let a="",i="";if(n){const e=+n+1,t=e<10?`0${e}`:`${e}`;a=`${s}-${n}-01`,i=e<=12?`${s}-${t}-01`:+s+1+"-01-01"}else s&&(a=`${s}-01-01`,i=+s+1+"-01-01");return{range:{[e]:{gte:a,lt:i}}}}const v=new Map([["post_types",e=>({term:{post_type:e}})],["category",e=>({term:{"category.slug":e}})],["post_tag",e=>({term:{"tag.slug":e}})],["month_post_date",e=>f("date",e,"month")],["month_post_date_gmt",e=>f("date_gmt",e,"month")],["month_post_modified",e=>f("date",e,"month")],["month_post_modified_gmt",e=>f("date_gmt",e,"month")],["year_post_date",e=>f("date",e,"year")],["year_post_date_gmt",e=>f("date_gmt",e,"year")],["year_post_modified",e=>f("date",e,"year")],["year_post_modified_gmt",e=>f("date_gmt",e,"year")]]);function y(e){const t={};return Object.keys(e).forEach((r=>{const s=e[r];"group_id"===r&&s!==c.Bk&&(t[r]=s)})),t}function E(e,t,r){const s={bool:{must:[]}};return(0,l.wP)().filter((t=>{return r=e[t],Array.isArray(r)&&r.length>0;var r})).forEach((t=>{e[t].forEach((e=>{v.has(t)?s.bool.must.push(v.get(t)(e)):s.bool.must.push({term:{[`taxonomy.${t}.slug`]:e}})}))})),t&&s.bool.must.push(t),(null==r?void 0:r.length)>0&&s.bool.must.push({bool:{must_not:r.map((e=>v.get("post_types")(e)))}}),s}const k=new Map([["oldest","date_asc"],["newest","date_desc"],["relevance","score_default"]]);function w(e){return["price_asc","price_desc","rating_desc"].includes(e)?e:k.get(e,"score_default")}function S(e){let{aggregations:t,excludedPostTypes:r,filter:a,staticFilters:i,pageHandle:o,query:l,resultFormat:p,sort:h,postsPerPage:u=10,adminQueryFilter:d,isInCustomizer:m=!1}=e;null===l&&(l="");let g=["date","permalink.url.raw","tag.name.default","category.name.default","post_type","shortcode_types"];(p!==c.TZ||m)&&(g=g.concat(["has.image","image.url.raw","image.alt_text"])),(p===c.LI||m)&&(g=g.concat(["meta._wc_average_rating.double","meta._wc_review_count.long","wc.formatted_price","wc.formatted_regular_price","wc.formatted_sale_price","wc.price","wc.sale_price"])),i&&i.group_id&&i.group_id!==c.Bk&&(g=g.concat(["author","blog_name","blog_icon_url"]));let _={aggregations:t,fields:g,highlight_fields:["title","content","comments"],filter:E(a,d,r),query:encodeURIComponent(l),sort:w(h),page_handle:o,size:u};return i&&Object.keys(i).length>0&&(_={..._,...y(i)}),(0,s.c)((0,n.x)(_))}function b(e){return function(t){const r=h.get(e)||u.get(e);if("AbortError"===t.name)return r?{_isCached:!0,_isError:!1,_isOffline:!1,...r}:null;if(r)return{_isCached:!0,_isError:!0,_isOffline:!1,...r};throw t}}function j(e,t){return function(r){const s={...r,requestId:t};return h.set(e,s),u.set(e,s),s}}function C(){p&&p.abort(),p=new AbortController}function T(e,t){const r=i()(Array.from(arguments));if(!navigator.onLine&&u.get(r))return Promise.resolve(u.get(r)).then((e=>({_isCached:!0,_isError:!1,_isOffline:!0,...e})));if(h.get(r))return Promise.resolve(h.get(r)).then((e=>({_isCached:!0,_isError:!1,_isOffline:!1,...e})));const s=S(e),n=b(r),a=j(r,t),o=`/sites/${e.siteId}/search?${s}`,{apiNonce:l,apiRoot:d,homeUrl:m,isPrivateSite:g,isWpcom:_}=window[c.W1],f=`https://public-api.wordpress.com/rest/v1.3${o}`,v=`${m}/wp-json/wpcom-origin/v1.3${o}`,y=`${d}jetpack/v4/search?${s}`;let E=f;return g&&_?E=v:g&&(E=y),C(),fetch(E,{headers:g?{"X-WP-Nonce":l}:{},credentials:g?"include":"same-origin",signal:p.signal}).then((e=>200!==e.status?Promise.reject(`Unexpected response from API with status code ${e.status}.`):e)).then((e=>e.json())).then(a).catch(n)}},2601:function(e,t,r){r.d(t,{Z:function(){return s}});r(3679);function s(e,t){Array.isArray(e)||(e=[e]);return 0!==e.filter((e=>t.includes(e))).length}},5825:function(e,t,r){function s(e){const t=function(e){let t;return"#"===e[0]&&(t=e.substring(1)),3===t.length&&(t=t.split("").map((e=>`${e}${e}`)).join("")),t}(e);return(299*parseInt(t.substr(0,2),16)+587*parseInt(t.substr(2,2),16)+114*parseInt(t.substr(4,2),16))/1e3>=128?"black":"white"}r.d(t,{B:function(){return s}})},2160:function(e,t,r){function s(e){return[...e.querySelectorAll('input[type="checkbox"]').values()].filter((e=>e.checked)).map((e=>e.name))}function n(e){const t={searchInputSelector:['input[name="s"]:not(.jetpack-instant-search__box-input)',"#searchform input.search-field:not(.jetpack-instant-search__box-input)",".search-form input.search-field:not(.jetpack-instant-search__box-input)",".searchform input.search-field:not(.jetpack-instant-search__box-input)"].join(", "),filterInputSelector:["a.jetpack-search-filter__link"],overlayTriggerSelector:[".jetpack-instant-search__open-overlay-button","header#site-header .search-toggle[data-toggle-target]"].join(",")};return e.theme_options?{...t,...e.theme_options}:t}r.d(t,{C:function(){return n},b:function(){return s}})},3499:function(e,t){const r=()=>{};t.Z=()=>r},1547:function(e,t,r){r.d(t,{$s:function(){return u},bA:function(){return i},do:function(){return c},i3:function(){return o},jZ:function(){return h},jc:function(){return d},wP:function(){return a}});r(3679);var s=r(9755);const n=Object.freeze(["post_types","category","post_format","post_tag","month_post_date","month_post_date_gmt","month_post_modified","month_post_modified_gmt","year_post_date","year_post_date_gmt","year_post_modified","year_post_modified_gmt"]);function a(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(e=window[s.W1])||void 0===e?void 0:e.widgets,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=window[s.W1])||void 0===t?void 0:t.widgetsOutsideOverlay;const i=new Set(n);return[...null!=r?r:[],...null!=a?a:[]].map((e=>e.filters)).filter((e=>Array.isArray(e))).reduce(((e,t)=>e.concat(t)),[]).filter((e=>"taxonomy"===e.type)).forEach((e=>i.add(e.taxonomy))),[...i]}function i(){var e;return null!==(e=window[s.W1])&&void 0!==e&&e.staticFilters?window[s.W1].staticFilters:[]}function o(){const e=i(),t=new Set;return e.forEach((e=>t.add(e.filter_id))),[...t]}function l(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(e=window[s.W1])||void 0===e?void 0:e.widgets;return null!==(t=null==r?void 0:r.map(p).reduce(((e,t)=>e.concat(t)),[]))&&void 0!==t?t:[]}function c(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(e=window[s.W1])||void 0===e?void 0:e.widgets;const r=l(t);return a().filter((e=>!r.includes(e)))}function p(e){return e.filters.map(h).filter((e=>"string"==typeof e))}function h(e){return"date_histogram"===e.type?`${e.interval}_${e.field}`:"taxonomy"===e.type?`${e.taxonomy}`:"post_type"===e.type?"post_types":"group"===e.type?e.filter_id:null}function u(e){return e.includes("month")?{field:e.split("month_").pop(),type:"date_histogram",interval:"month"}:e.includes("year")?{field:e.split("year_").pop(),type:"date_histogram",interval:"year"}:"post_types"===e?{type:"post_type"}:"group"===e?{type:"group"}:{type:"taxonomy",taxonomy:e}}function d(e){return"date_histogram"===e.type?"date":"taxonomy"===e.type?"taxonomy":"post_type"===e.type?"postType":"group"===e.type?"group":void 0}},9087:function(e,t,r){r.d(t,{y:function(){return i}});r(3679);var s=r(9424),n=r(211);function a(e){return e?e.split("?",1)[0]:""}function i(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const[o,l]=(0,n.useState)(null),c=a(e),p=["gif","jpg","jpeg","png","webp"],h=null==c?void 0:c.substring(c.lastIndexOf(".")+1).toLowerCase(),u=p.includes(h);return(0,n.useEffect)((()=>{if(i&&u){const n=(0,s.Z)(c,{resize:`${t},${r}`});l(n||e)}else l(e)}),[e,t,r,i,c,u]),o}},6302:function(e,t,r){r.d(t,{Q0:function(){return p},_L:function(){return l},pm:function(){return o},ug:function(){return c}});r(3679);var s=r(8750),n=r(9755),a=r(1547),i=r(564);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.search;return(0,i.J)(e.substring(1),!1,!1)}function l(e){!function(e){if(history.pushState){const t=new window.URL(window.location.href);window[n.W1]&&"homeUrl"in window[n.W1]&&(t.href=window[n.W1].homeUrl),t.search=e,window.history.pushState(null,null,t.toString())}}((0,s.c)(e))}function c(){const e=o();return n.bk.includes(e.result_format)?e.result_format:null}function p(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(history.pushState&&history.replaceState){const n=new URL(e),i=o(n.search),l=[...(0,a.wP)(),...(0,a.i3)(),"s","sort"],c=Object.keys(i).some((e=>l.includes(e)));if(c&&l.forEach((e=>delete i[e])),n.search=(0,s.c)(i),r?window.history.replaceState(null,null,n.toString()):window.history.pushState(null,null,n.toString()),c)return void window.location.reload();t()}}},343:function(e,t,r){r.d(t,{n:function(){return n}});var s=r(9755);function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e!==s.LI?s.aP:new Map([...s.aP,...s.rs])}},8050:function(e,t,r){r.d(t,{AM:function(){return l},GE:function(){return u},IJ:function(){return a},Lo:function(){return h},Sn:function(){return p},tU:function(){return i},vy:function(){return o}});let s=!0;const n={};function a(){s=!1}function i(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||s)&&(window._tkq=window._tkq||[])}function o(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||s)&&window._tkq.push(["clearIdentity"])}function l(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(t||s)&&(n.blog_id=e)}function c(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(r||s)&&window._tkq.push(["recordEvent",e,{...n,...t}])}function p(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c("jetpack_instant_search_traintracks_render",e,t)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c("jetpack_instant_search_traintracks_interact",e,t)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c("jetpack_instant_search_static_filter_select",e,t)}},8389:function(e,t,r){function s(e){return{type:"MAKE_SEARCH_REQUEST",options:e}}function n(e){let{options:t,response:r}=e;return{type:"RECORD_SUCCESSFUL_SEARCH_REQUEST",options:t,response:r}}function a(e){return{type:"RECORD_FAILED_SEARCH_REQUEST",error:e}}function i(){let{isHistoryNavigation:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"INITIALIZE_QUERY_VALUES",isHistoryNavigation:e}}function o(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"SET_SEARCH_QUERY",query:e,propagateToWindow:t}}function l(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"SET_SORT",sort:e,propagateToWindow:t}}function c(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"SET_FILTER",name:e,value:t,propagateToWindow:r}}function p(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"SET_STATIC_FILTER",name:e,value:t,propagateToWindow:r}}function h(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"CLEAR_FILTERS",propagateToWindow:e}}function u(){return{type:"CLEAR_QUERY_VALUES"}}function d(){return{type:"DISABLE_QUERY_STRING_INTEGRATION"}}r.d(t,{C0:function(){return n},HD:function(){return l},K5:function(){return h},Ln:function(){return i},Mz:function(){return u},O1:function(){return p},OZ:function(){return d},Tv:function(){return c},Y6:function(){return a},ql:function(){return o},x1:function(){return s}})},4587:function(e,t,r){r(3679);var s=r(3259),n=r.n(s),a=r(5476),i=r(9755),o=r(1547),l=r(6302),c=r(8389);let p=0,h=!0;const u=n()(l._L,i.yb);t.Z={CLEAR_FILTERS:function(e){if(!1===e.propagateToWindow||!h)return;const t=(0,l.pm)();(0,o.wP)().forEach((e=>delete t[e])),(0,o.i3)().forEach((e=>delete t[e])),(0,l._L)(t)},DISABLE_QUERY_STRING_INTEGRATION:function(){h=!1},INITIALIZE_QUERY_VALUES:function(e,t){const r=(0,l.pm)();let s;"s"in r?t.dispatch((0,c.ql)(r.s,!1)):t.dispatch((0,c.ql)(null,!1)),i.kQ.includes(r.sort)?s=r.sort:"date"===r.orderby?s="string"==typeof r.order&&r.order.toUpperCase()===i.oy?"oldest":"newest":"relevance"===r.orderby&&(s="relevance"),"string"==typeof s&&t.dispatch((0,c.HD)(s,!1)),t.dispatch((0,c.K5)(!1)),(0,o.wP)().filter((e=>e in r)).forEach((e=>t.dispatch((0,c.Tv)(e,r[e],!1)))),(0,o.i3)().filter((e=>e in r)).forEach((e=>t.dispatch((0,c.O1)(e,r[e],!1))))},MAKE_SEARCH_REQUEST:function(e,t){p++,(0,a.yC)(e.options,p).then((r=>{null!==r&&t.dispatch((0,c.C0)({options:e.options,response:r}))})).catch((e=>{console.error("Jetpack Search encountered an error:",e),t.dispatch((0,c.Y6)(e))}))},SET_FILTER:function(e){if(!1===e.propagateToWindow||!h)return;if(!(0,o.wP)().includes(e.name))return;const t=(0,l.pm)();t[e.name]=e.value,(0,l._L)(t)},SET_STATIC_FILTER:function(e){if(!1===e.propagateToWindow)return;if(!(0,o.i3)().includes(e.name))return;const t=(0,l.pm)();t[e.name]=e.value,(0,l._L)(t)},SET_SEARCH_QUERY:function(e){if(!1===e.propagateToWindow||!h)return;const t=(0,l.pm)();null!==e.query?t.s=e.query:delete t.s,u(t)},SET_SORT:function(e){if(!1===e.propagateToWindow||!h)return;if(!i.kQ.includes(e.sort))return;const t=(0,l.pm)();t.sort=e.sort,delete t.order,delete t.orderby,(0,l._L)(t)}}},9379:function(e,t,r){var s=r(835),n=r(4274),a=r.n(n),i=r(4587),o=r(4408);const l=[a()(i.Z)],c=(0,s.MT)(o.ZP,{},(0,s.md)(...l));t.Z=c},9267:function(e,t,r){r.d(t,{hg:function(){return i},p:function(){return o},xT:function(){return a}});var s=r(5476);let n={};function a(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MAKE_SEARCH_REQUEST":case"RECORD_SUCCESSFUL_SEARCH_REQUEST":return!1;case"RECORD_FAILED_SEARCH_REQUEST":return!0}return e}function i(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MAKE_SEARCH_REQUEST":return!0;case"RECORD_SUCCESSFUL_SEARCH_REQUEST":case"RECORD_FAILED_SEARCH_REQUEST":return!1}return e}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("RECORD_SUCCESSFUL_SEARCH_REQUEST"===t.type){if("requestId"in e&&"requestId"in t.response&&e.requestId>t.response.requestId)return e;const a={...t.response};var r;if(t.options.pageHandle&&(a.aggregations={..."aggregations"in e&&!Array.isArray(e)?e.aggregations:{},...Array.isArray(a.aggregations)?{}:a.aggregations},a.results=[..."results"in e?e.results:[],...a.results],n={}),Array.isArray(a.results)&&a.results.length>a.total&&(a.total=a.results.length),!t.options.pageHandle)(null===(r=a.results)||void 0===r?void 0:r.length)>0?n=(0,s.Wb)(a.aggregations):a.aggregations=n;return a}return e}},9049:function(e,t,r){function s(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INITIALIZE_QUERY_VALUES":return t.isHistoryNavigation;case"SET_SEARCH_QUERY":case"SET_SORT":case"CLEAR_FILTERS":case"SET_FILTER":return!t.propagateToWindow&&e}return e}r.d(t,{w:function(){return s}})},4408:function(e,t,r){var s=r(835),n=r(9267),a=r(4754),i=r(5188),o=r(9049);t.ZP=(0,s.UY)({filters:a.u8,staticFilters:a.OY,hasError:n.xT,isLoading:n.hg,isHistoryNavigation:o.w,response:n.p,searchQuery:a.w4,serverOptions:i.M,sort:a.DY})},4754:function(e,t,r){r.d(t,{DY:function(){return i},OY:function(){return l},u8:function(){return o},w4:function(){return a}});r(3679);var s=r(9755),n=r(1547);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SEARCH_QUERY":return t.query;case"CLEAR_QUERY_VALUES":return null}return e}function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SORT":return s.kQ.includes(t.sort)?t.sort:e;case"CLEAR_QUERY_VALUES":return null}return e}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_FILTERS":case"CLEAR_QUERY_VALUES":return{};case"SET_FILTER":if(!(0,n.wP)().includes(t.name)||!Array.isArray(t.value)&&"string"!=typeof t.value)return e;if(0===t.value.length){const r={...e};return delete r[t.name],r}return{...e,[t.name]:"string"==typeof t.value?[t.value]:t.value}}return e}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_QUERY_VALUES":return{};case"SET_STATIC_FILTER":return(0,n.i3)().includes(t.name)?{...e,[t.name]:t.value}:e}return e}},5188:function(e,t,r){r.d(t,{M:function(){return n}});var s=r(9755);function n(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null!==(e=window[s.W1])&&void 0!==e?e:{};return t}},1530:function(e,t,r){r.d(t,{Bk:function(){return u},Qy:function(){return o},ZN:function(){return m},Zj:function(){return h},ck:function(){return a},en:function(){return d},hg:function(){return l},r$:function(){return p},uP:function(){return c},wI:function(){return g},xT:function(){return i}});r(3679);var s=r(9755),n=r(1547);function a(e){return e.response}function i(e){return e.hasError}function o(e){var t;return!i(e)&&(null===(t=a(e))||void 0===t?void 0:t.page_handle)}function l(e){return e.isLoading}function c(e){return e.searchQuery}function p(e,t){return"string"!=typeof t&&(t=s.PP),"string"==typeof e.sort?e.sort:t}function h(e){return e.filters}function u(e){return e.staticFilters}function d(e){return null!==c(e)||function(e){return Object.keys(e.filters).length>0}(e)||function(e){return Object.keys(e.staticFilters).length>0}(e)||null!==e.sort}function m(e){if(!e.serverOptions.widgets||!e.filters)return{};const t=(0,n.do)(e.serverOptions.widgets);return{filters:Object.keys(e.filters).filter((e=>t.includes(e))).map(n.$s)}}function g(e){return e.isHistoryNavigation}}}]);
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.rtl.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.rtl.css new file mode 100644 index 00000000..d3d5054e --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.rtl.css @@ -0,0 +1 @@ +.jetpack-instant-search__overlay{background:rgba(29,35,39,.7);bottom:0;box-sizing:border-box;color:#00101c;font-size:16px;left:0;opacity:1;overflow-x:hidden;overflow-y:auto;position:fixed;right:0;top:0;transition:opacity .1s ease-in;z-index:9999999999999}body.jps-theme-argent .jetpack-instant-search__overlay *{font-family:Helvetica,sans-serif}@media(max-width:767.98px){.jetpack-instant-search__overlay{padding:3em 1em}}@media(max-width:575.98px){.jetpack-instant-search__overlay{padding:0}}@media(min-width:768px){.jetpack-instant-search__overlay{padding:3em}}.jetpack-instant-search__overlay.is-hidden{background:transparent;opacity:0;visibility:hidden}.jetpack-instant-search__overlay *,.jetpack-instant-search__overlay :after,.jetpack-instant-search__overlay :before{box-sizing:inherit}@media print{.jetpack-instant-search__overlay.is-hidden{display:none}}.gridicon{fill:currentColor;display:inline-block}.gridicon.needs-offset g{transform:translate(-1px,1px)}.gridicon.needs-offset-x g{transform:translate(-1px)}.gridicon.needs-offset-y g{transform:translateY(1px)}.jetpack-instant-search__notice{font-size:14px;margin:1em 0;padding:.75em}.jetpack-instant-search__notice.jetpack-instant-search__notice--warning{background-color:#f5e6b3;color:#4f3500}.jetpack-instant-search__notice .gridicon{margin-left:.5em;margin-top:-5px;vertical-align:middle}.jetpack-instant-search__scroll-button{border:0;box-shadow:none;font-size:13px;outline:0}.jetpack-instant-search__search-sort{align-items:center;display:flex}.jetpack-instant-search__search-sort>label[for=jetpack-instant-search__search-sort-select]{flex-shrink:0;font-size:1em;font-weight:700;margin:0 0 0 .25em}.jetpack-instant-search__search-sort-with-links{font-size:13px}@media(max-width:575.98px){.jetpack-instant-search__search-sort-with-select{margin-left:1em;width:100%}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-sort-with-select{margin-left:0}}@media(min-width:992px){.jetpack-instant-search__search-sort-with-select{margin-top:-4px}}#jetpack-instant-search__search-sort-select{-webkit-appearance:auto;appearance:auto;background:#fff;border:1px solid #e6f1f5;border-radius:5px;color:#00101c;font-size:1em;height:inherit;padding:.25em}@media(max-width:575.98px){#jetpack-instant-search__search-sort-select{padding:.5em;width:100%}}.jetpack-instant-search__search-sort-option{color:#646970;cursor:pointer;padding:0 2px;text-decoration:none}.jetpack-instant-search__search-sort-option:after{color:#646970;content:"·";font-weight:400;padding-right:5px}.jetpack-instant-search__search-sort .jetpack-instant-search__search-sort-option:focus,.jetpack-instant-search__search-sort .jetpack-instant-search__search-sort-option:hover{text-decoration:none}.jetpack-instant-search__search-sort-option:last-child:after{content:""}.jetpack-instant-search__search-sort-option.is-selected{color:#044b7a;font-weight:600;text-decoration:none}.jetpack-instant-search__search-form-controls{align-items:center;display:flex;line-height:1.3;margin-left:56px;margin-right:56px;margin-top:16px;z-index:1}@media(max-width:991.98px){.jetpack-instant-search__search-form-controls{flex-direction:row-reverse;justify-content:space-between;left:0;margin-left:40px;margin-right:40px;position:relative;right:0}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-form-controls{flex-direction:row-reverse;justify-content:space-between;left:0;margin-left:40px;margin-right:40px;position:relative;right:0}}@media(max-width:767.98px){.jetpack-instant-search__search-form-controls{margin-left:20px;margin-right:20px}}@media(min-width:992px){.jetpack-instant-search__search-form-controls{left:320px;position:absolute}}@media(min-width:1200px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-form-controls{left:320px;position:absolute}}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-form-controls{left:0}.jetpack-instant-search__box{border-bottom:1px solid #e6f1f5;border-left:1px solid #e6f1f5}.jetpack-instant-search__box-label{align-items:center;display:flex;flex:0 0 100%;margin:0}input.jetpack-instant-search__box-input.search-field{-webkit-appearance:none;appearance:none;background:#fff;border:0;box-shadow:none;color:#3c434a;font-size:18px;height:60px;line-height:1;margin:0;max-width:none;padding:0 14px;text-indent:32px;vertical-align:middle}input.jetpack-instant-search__box-input.search-field:focus,input.jetpack-instant-search__box-input.search-field:hover{background:#fff;color:#00101c}input.jetpack-instant-search__box-input.search-field.search-field{letter-spacing:-.02em;padding-right:0;text-indent:0}.jetpack-instant-search__box-gridicon{align-items:center;display:flex;flex-shrink:0;height:60px;justify-content:center;position:relative;right:0;top:0;width:60px;z-index:1}.jetpack-instant-search__box-gridicon svg{fill:#646970}.jetpack-instant-search__box input[type=button]{word-wrap:normal;border:none;border-radius:0;color:#646970;cursor:pointer;font-size:1em;font-weight:400;height:60px;line-height:1;margin:0 0 0 .25em;padding:0;text-decoration:none;text-shadow:none;text-transform:none;transition:all .1s linear;width:60px}.jetpack-instant-search__box input[type=button],.jetpack-instant-search__box input[type=button]:focus,.jetpack-instant-search__box input[type=button]:hover{-webkit-appearance:none;appearance:none;background:none;box-shadow:none;outline:none}.jetpack-instant-search__box input[type=button]:focus,.jetpack-instant-search__box input[type=button]:hover{color:#3c434a}.jetpack-instant-search__box input[type=button]:focus{outline:1px dotted}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input{border:none;box-shadow:none;height:52px;outline-style:none;transition:color .15s ease-in-out,border-color .25s ease-in-out;width:100%}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input:focus,.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input:hover{border:none;box-shadow:none;outline-style:none}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-webkit-search-results-button,.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-webkit-search-results-decoration{appearance:none;-webkit-appearance:none;display:initial}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-webkit-search-cancel-button{display:none}.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-ms-clear,.jetpack-instant-search__box input[type=search].jetpack-instant-search__box-input::-ms-reveal{display:none}.jetpack-instant-search__path-breadcrumb{font-size:.9em;margin:0;max-width:calc(100vw - 2em);overflow-x:hidden;text-overflow:ellipsis}.jetpack-instant-search__path-breadcrumb-link{max-width:100%;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.jetpack-instant-search__path-breadcrumb-link:focus,.jetpack-instant-search__path-breadcrumb-link:hover{text-decoration:underline}.jetpack-instant-search__path-breadcrumb,.jetpack-instant-search__path-breadcrumb-link{color:#3c434a}.jetpack-instant-search__search-result-comments{border-right:2px solid #f0f0f1;font-size:.9em;margin-right:8px;margin-top:16px;padding-right:16px;word-break:break-word}.jetpack-instant-search__search-result-comments .gridicon{margin-left:8px;vertical-align:middle}.jetpack-instant-search__search-result-title.jetpack-instant-search__search-result-minimal-title{margin-bottom:.4em}.jetpack-instant-search__search-result-title.jetpack-instant-search__search-result-minimal-title .gridicon{margin-left:8px}.jetpack-instant-search__search-result-minimal-cats-and-tags{display:flex;flex-flow:row wrap;font-size:.9375em}.jetpack-instant-search__search-result-minimal-cats,.jetpack-instant-search__search-result-minimal-tags{display:flex;flex-flow:row wrap;list-style-type:none;margin:0;padding:0}.jetpack-instant-search__search-result-minimal-cat,.jetpack-instant-search__search-result-minimal-tag{margin:0 0 0 .75em}.jetpack-instant-search__search-result-minimal-cat .gridicon,.jetpack-instant-search__search-result-minimal-tag .gridicon{margin-left:.25em}.jetpack-instant-search__search-result-minimal-cat .gridicon,.jetpack-instant-search__search-result-minimal-cat-text,.jetpack-instant-search__search-result-minimal-tag .gridicon,.jetpack-instant-search__search-result-minimal-tag-text{vertical-align:middle}.jetpack-instant-search__search-result-minimal-content{word-break:break-word}.jetpack-instant-search__search-result-expanded{display:flex;flex-flow:column}.jetpack-instant-search__search-result-expanded:last-child{margin-left:0}.jetpack-instant-search__search-result-expanded .jetpack-instant-search__search-result-expanded__title{width:100%}.jetpack-instant-search__search-result-expanded__path{color:#646970;font-size:.9375em;margin:0 0 .4em}.jetpack-instant-search__search-result-expanded__copy-container{max-width:100%}@media(min-width:576px){.jetpack-instant-search__search-result-expanded__copy-container{width:calc(100% - 128px - 1em)}}.jetpack-instant-search__search-result-expanded--no-image .jetpack-instant-search__search-result-expanded__copy-container{width:auto}.jetpack-instant-search__search-result-expanded__content{color:#00101c;font-size:.9375em}.jetpack-instant-search__search-result-expanded__image-link{margin-right:1em}@media(max-width:575.98px){.jetpack-instant-search__search-result-expanded__image-link{margin:0 auto .5em;order:-1}}.jetpack-instant-search__search-result-expanded__image-container{width:128px}@media(max-width:575.98px){.jetpack-instant-search__search-result-expanded__image-container{width:256px}}.jetpack-instant-search__search-result-expanded--no-image .jetpack-instant-search__search-result-expanded__image-container{display:none}.jetpack-instant-search__search-result-expanded__image-container{position:relative}.jetpack-instant-search__search-result-expanded__image-container:before{content:"";display:block;padding-top:100%;width:100%}.jetpack-instant-search__search-result-expanded__image{border-radius:5px;bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.jetpack-instant-search__search-result-expanded__content-container{display:flex;flex-flow:column}@media(min-width:576px){.jetpack-instant-search__search-result-expanded__content-container{flex-flow:row nowrap}}.jetpack-instant-search__search-result-expanded__footer{display:flex;list-style-type:none;margin-right:0;margin-top:10px;padding-right:0}.jetpack-instant-search__search-result-expanded__footer li{margin-left:10px}.jetpack-instant-search__search-result-expanded__footer-blog-image{border-radius:2px;margin-left:3px;vertical-align:middle}.jetpack-instant-search__search-result-expanded__footer-blog{font-size:13px;font-style:normal;font-weight:600;line-height:180%}.jetpack-instant-search__search-result-expanded__footer-author:after,.jetpack-instant-search__search-result-expanded__footer-blog:after{color:#636363;content:"·";margin-right:10px}.jetpack-instant-search__search-result-expanded__footer-author,.jetpack-instant-search__search-result-expanded__footer-date{color:#636363;font-size:13px;font-style:normal;font-weight:400}.jetpack-instant-search__product-rating-stars .gridicon{fill:#f0c930;vertical-align:middle}.jetpack-instant-search a.jetpack-instant-search__product-rating-count{color:#646970;font-size:.9em;text-decoration:underline;vertical-align:text-top}.jetpack-instant-search__product-price-regular{color:#646970;padding-left:.25em}.jetpack-instant-search__search-results-list.is-format-product{display:flex;flex-wrap:wrap;margin-left:40px;padding:0 0 3em}@media(max-width:991.98px){.jetpack-instant-search__search-results-list.is-format-product{margin-left:24px}}@media(max-width:767.98px){.jetpack-instant-search__search-results-list.is-format-product{margin-left:4px}}.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{display:flex;flex-direction:column;margin:0 0 16px 16px;position:relative;width:calc(50% - 16px)}@media(min-width:576px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(33.33333% - 16px)}}@media(min-width:768px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(25% - 16px)}}@media(min-width:992px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(33.33333% - 16px)}}@media(min-width:1200px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(25% - 16px)}}@media(min-width:1400px){.jetpack-instant-search__search-result.jetpack-instant-search__search-result-product{width:calc(20% - 16px)}}.jetpack-instant-search__search-result>.jetpack-instant-search__search-result-product-img-link{display:block}.jetpack-instant-search__search-result-product-img-container{border-radius:5px;color:transparent;position:relative}.jetpack-instant-search__search-result-product-img-container.jetpack-instant-search__search-result-product-img-container--placeholder{background:#c3c4c7}.jetpack-instant-search__search-result-product-img-container .gridicon{fill:#fff}.jetpack-instant-search__search-result-product-img-container:before{content:"";display:block;padding-top:100%;width:100%}.jetpack-instant-search__search-result-product-img{border-radius:5px;bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.jetpack-instant-search__search-result-product-img>.gridicon{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}.jetpack-instant-search__search-result-product-img>.gridicons-image{height:25%;width:25%}.jetpack-instant-search__search-result-product-img>.gridicons-block{height:50%;width:50%}.jetpack-instant-search__search-result-title.jetpack-instant-search__search-result-product-title{font-size:1.25em;margin:.25em 0 0}.jetpack-instant-search__search-result-product-match{font-size:.9em;margin-top:.25em}.jetpack-instant-search__search-result-product-match mark{align-items:center;display:flex;font-weight:400}.jetpack-instant-search__search-result-product-match .gridicon{height:1em;margin-left:.25em;width:1em}.jetpack-instant-search__search-result{margin:0 0 2em}.jetpack-instant-search__search-result-title{font-size:1.6em;font-weight:400;line-height:1.35;margin:0;overflow-wrap:break-word}.jetpack-instant-search__search-result-title .jetpack-instant-search__search-result-title-link{text-decoration:none}.jetpack-instant-search__search-result-title .jetpack-instant-search__search-result-title-link:focus,.jetpack-instant-search__search-result-title .jetpack-instant-search__search-result-title-link:hover{text-decoration:underline}.jetpack-instant-search__search-filters{position:relative}.jetpack-instant-search__search-filters>div{margin-top:1em}.jetpack-instant-search__search-filters-title{color:#00101c;display:block;font-size:inherit;font-weight:700;line-height:1.3;margin:0;padding:0}.jetpack-instant-search__clear-filters-link{left:0;line-height:1.3;margin:0;position:absolute;top:0}.jetpack-instant-search__search-filter-sub-heading{color:#646970;font-size:inherit;margin:0;padding:0}.jetpack-instant-search__search-filter-list{text-align:right}.jetpack-instant-search__search-filter-list>div{align-items:baseline;display:flex;margin-top:8px}.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-input,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-input{-webkit-appearance:checkbox;appearance:checkbox;background:none;border:none;cursor:pointer;height:auto;margin:0;top:1px;width:auto}.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-input:after,.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-input:before,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-input:after,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-input:before{display:none!important}.jetpack-instant-search__search-filter-list .jetpack-instant-search__search-filter-list-label,.jetpack-instant-search__search-filter-list .widget_search .jetpack-instant-search__search-filter-list-label{color:inherit;cursor:pointer;display:inline-block;font-weight:400;margin:0 8px 0 0;padding:0;width:auto}.jetpack-instant-search__search-static-filter-list{font-size:.875rem;line-height:1.8}.jetpack-instant-search__widget-area-container{margin-bottom:2em}.jetpack-instant-search__jetpack-colophon{margin-bottom:2em;margin-top:2em;text-align:center}.jetpack-instant-search__jetpack-colophon-link{align-items:center;color:inherit;display:flex;text-decoration:none}.jetpack-instant-search__jetpack-colophon-logo{display:inline;height:16px;width:16px}.jetpack-instant-search__jetpack-colophon-text{color:#3c434a;font-size:.7em;font-weight:400;padding-right:6px}.jetpack-instant-search__sidebar{padding-top:14px}.jetpack-instant-search__sidebar .jetpack-instant-search__widget-area>.widget{background:none;border:none;margin:0;padding:0}.jetpack-instant-search__sidebar .jetpack-instant-search__widget-area>.widget a{font-weight:400}.jetpack-instant-search__sidebar h2.widgettitle{border:none;font-size:1.3em;margin:1em 0 .5em}.jetpack-instant-search__sidebar h2.widgettitle:after,.jetpack-instant-search__sidebar h2.widgettitle:before{display:none!important}.jetpack-instant-search__search-results{background:#fff;border-radius:3px;margin:0 auto;max-width:1080px;min-height:100%;position:relative;z-index:10}@media(max-width:575.98px){.jetpack-instant-search__search-results{border-radius:0}}@media(min-width:992px){.jetpack-instant-search__search-results{max-width:95%}}.jetpack-instant-search__search-results mark{background:#ffc;color:#00101c}.jetpack-instant-search__search-results-controls{display:flex}.jetpack-instant-search__search-results-content{display:flex;position:relative}.jetpack-instant-search__search-results-filter-button{align-items:center;border:0;color:#646970;cursor:pointer;display:flex;flex-shrink:0;font-size:12px;margin:0;padding:8px;text-decoration:none;transition:background-color .25s ease-in-out}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-filter-button{visibility:hidden}@media(min-width:576px){.jetpack-instant-search__search-results-filter-button{font-size:13px;padding:10px 14px}}@media(min-width:992px){.jetpack-instant-search__search-results-filter-button{display:none}.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-filter-button{display:flex}}@media(min-width:1200px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-filter-button{display:none}}.jetpack-instant-search__search-results-filter-button:focus,.jetpack-instant-search__search-results-filter-button:hover{color:#00101c}.jetpack-instant-search__search-results-filter-button .gridicon{margin-right:4px}.jetpack-instant-search__search-results-primary{margin:0;max-width:calc(100% - 320px);width:100%}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-primary{max-width:100%}@media(max-width:991.98px){.jetpack-instant-search__search-results-primary{max-width:100%}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-primary{max-width:100%}}.jetpack-instant-search__search-results-secondary{background:none;border-radius:0;border-right:1px solid #e6f1f5;bottom:0;box-shadow:none;color:#00101c;display:block;flex:none;padding:0 32px;position:static;width:320px}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-secondary{display:none}@media(max-width:991.98px){.jetpack-instant-search__search-results-secondary{display:none}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary{display:none}}@media(max-width:991.98px){.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:6px;box-shadow:0 2px 3px rgba(0,0,0,.1);display:block;left:1em;max-height:70vh;min-width:360px;overflow-y:scroll;padding:16px 24px;position:absolute;right:1em;top:0;width:auto;z-index:10}}@media(max-width:991.98px)and (max-width:575.98px){.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{max-height:80vh}}@media(max-width:991.98px){.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon{margin-bottom:1em}.jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon-text{font-size:.8em}.jetpack-instant-search__overlay--no-sidebar .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{display:none}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:6px;box-shadow:0 2px 3px rgba(0,0,0,.1);display:block;left:1em;max-height:70vh;min-width:360px;overflow-y:scroll;padding:16px 24px;position:absolute;right:1em;top:0;width:auto;z-index:10}}@media(max-width:1199.98px)and (max-width:575.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{max-height:80vh}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon{margin-bottom:1em}.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal .jetpack-instant-search__jetpack-colophon-text{font-size:.8em}.jetpack-instant-search__overlay--no-sidebar .jp-search-configure-app-wrapper .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{display:none}}.jetpack-instant-search__search-results-title,.jetpack-instant-search__search-results-unused-query{color:#00101c;font-size:1em;font-weight:700;line-height:1.3;margin:1em 56px 1.5em;padding:0;word-break:break-word}@media(max-width:991.98px){.jetpack-instant-search__search-results-title,.jetpack-instant-search__search-results-unused-query{margin-bottom:1em;margin-left:40px;margin-right:40px}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-title,.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-unused-query{margin-bottom:1em;margin-left:40px;margin-right:40px}}@media(max-width:767.98px){.jetpack-instant-search__search-results-title,.jetpack-instant-search__search-results-unused-query{margin-left:20px;margin-right:20px}}@media(min-width:992px){.jetpack-instant-search__search-results-title{padding-left:210px}}@media(min-width:1200px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-title{padding-left:210px}}.jetpack-instant-search__search-results-list{color:#00101c;list-style:none;margin-left:56px;margin-right:56px;padding:0}@media(max-width:991.98px){.jetpack-instant-search__search-results-list{margin-left:40px;margin-right:40px}}@media(max-width:1199.98px){.jp-search-configure-app-wrapper .jetpack-instant-search__search-results-list{margin-left:40px;margin-right:40px}}@media(max-width:767.98px){.jetpack-instant-search__search-results-list{margin-left:20px;margin-right:20px}}.jetpack-instant-search__search-results-list li:before{content:"";height:1px;position:absolute;width:1px}.jetpack-instant-search__search-results-search-form{font-size:.8em;margin:0;top:0;width:100%}button.jetpack-instant-search__overlay-close{align-items:center;-webkit-appearance:none;appearance:none;background:none;background-color:transparent!important;border:none;border-bottom:1px solid #e6f1f5;border-radius:0;box-shadow:none;cursor:pointer;display:flex;height:61px;justify-content:center;line-height:1;margin:0;outline:none;padding:0;text-decoration:none;text-shadow:none;text-transform:none;width:60px}button.jetpack-instant-search__overlay-close:focus,button.jetpack-instant-search__overlay-close:hover{-webkit-appearance:none;appearance:none;background:none;box-shadow:none;outline:none}button.jetpack-instant-search__overlay-close:focus{outline:1px dotted}button.jetpack-instant-search__overlay-close svg.gridicon{fill:#646970}button.jetpack-instant-search__overlay-close:active,button.jetpack-instant-search__overlay-close:focus,button.jetpack-instant-search__overlay-close:hover{background-color:transparent!important;border-color:#e6f1f5}button.jetpack-instant-search__overlay-close:active svg.gridicon,button.jetpack-instant-search__overlay-close:focus svg.gridicon,button.jetpack-instant-search__overlay-close:hover svg.gridicon{fill:#3c434a}.jetpack-instant-search__search-results-pagination{display:block;flex:none;margin:50px}.jetpack-instant-search .widget a,.jetpack-instant-search .widget.widget_archive ul li a,.jetpack-instant-search a{border:none;color:#001621;text-decoration:none}.jetpack-instant-search .widget a:focus,.jetpack-instant-search .widget a:hover,.jetpack-instant-search .widget.widget_archive ul li a:focus,.jetpack-instant-search .widget.widget_archive ul li a:hover,.jetpack-instant-search a:focus,.jetpack-instant-search a:hover{color:#044b7a;text-decoration:underline}.jetpack-search-filters-widget__filter-list{list-style-type:none}body.enable-search-modal .cover-modal.show-modal.search-modal.active{display:none}.screen-reader-text{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark{background:rgba(29,35,39,.7);color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget a,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget.widget_archive ul li a,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark a{color:#f6f7f7}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget a:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget a:hover,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget.widget_archive ul li a:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .widget.widget_archive ul li a:hover,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark a:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark a:hover{color:#0675c4}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-filters-title,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-result-expanded__content,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-list,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-title,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-unused-query{color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__jetpack-colophon-text,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__path-breadcrumb,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__path-breadcrumb-link{color:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-filter-sub-heading,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-result-expanded__path{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close{border-color:#3c434a}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box-gridicon svg,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close svg.gridicon{fill:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close{border-color:#3c434a}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close:focus svg.gridicon,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark button.jetpack-instant-search__overlay-close:hover svg.gridicon{fill:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box input[type=button]{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box input[type=button]:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__box input[type=button]:hover{color:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark input.jetpack-instant-search__box-input.search-field{background:#000;color:#a7aaad}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark input.jetpack-instant-search__box-input.search-field:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark input.jetpack-instant-search__box-input.search-field:hover{background:#000;color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results{background:#000}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results mark{color:#e6f1f5}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-filter-button{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-filter-button:focus,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-filter-button:hover,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-secondary{color:#e6f1f5}@media(min-width:992px){.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-secondary{border-color:#3c434a}}@media(max-width:991.98px){.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-results-secondary.jetpack-instant-search__search-results-secondary--show-as-modal{background:#000;border-color:#3c434a;box-shadow:0 2px 3px #3c434a}}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-sort-option,.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-sort-option:after{color:#8c8f94}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-sort-option.is-selected{color:#0675c4}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark .jetpack-instant-search__search-result-product-img--placeholder{color:#2c3338}.jetpack-instant-search__overlay.jetpack-instant-search__overlay--dark #jetpack-instant-search__search-sort-select{background:#000;border-color:#3c434a;color:#e6f1f5}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.defaultVendors.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.defaultVendors.js new file mode 100644 index 00000000..4ff99380 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.defaultVendors.js @@ -0,0 +1,2 @@ +/*! For license information please see jp-search.defaultVendors.js.LICENSE.txt */ +(self.webpackChunkjetpack_search=self.webpackChunkjetpack_search||[]).push([[303],{8294:function(t){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},2402:function(t){function e(){return t.exports=e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(this,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},6198:function(t,e,n){var r=n(1210),o=n(5006),i=n(7232),u=r.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not a function")}},1938:function(t,e,n){var r=n(1210),o=n(5006),i=r.String,u=r.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw u("Can't set "+i(t)+" as a prototype")}},8987:function(t,e,n){var r=n(8875),o=n(42),i=n(2016),u=r("unscopables"),c=Array.prototype;null==c[u]&&i.f(c,u,{configurable:!0,value:o(null)}),t.exports=function(t){c[u][t]=!0}},3794:function(t,e,n){var r=n(1210),o=n(2702),i=r.String,u=r.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not an object")}},8845:function(t,e,n){var r=n(4929),o=n(645),i=n(5570),u=function(t){return function(e,n,u){var c,a=r(e),f=i(a),l=o(u,f);if(t&&n!=n){for(;f>l;)if((c=a[l++])!=c)return!0}else for(;f>l;l++)if((t||l in a)&&a[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},237:function(t,e,n){var r=n(3715),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},5996:function(t,e,n){var r=n(1210),o=n(5165),i=n(5006),u=n(237),c=n(8875)("toStringTag"),a=r.Object,f="Arguments"==u(function(){return arguments}());t.exports=o?u:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),c))?n:f?u(e):"Object"==(r=u(e))&&i(e.callee)?"Arguments":r}},7398:function(t,e,n){var r=n(3715),o=Error,i=r("".replace),u=String(o("zxcasd").stack),c=/\n\s*at [^:]*:[^\n]*/,a=c.test(u);t.exports=function(t,e){if(a&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=i(t,c,"");return t}},1184:function(t,e,n){var r=n(4242),o=n(3496),i=n(4225),u=n(2016);t.exports=function(t,e,n){for(var c=o(e),a=u.f,f=i.f,l=0;l<c.length;l++){var s=c[l];r(t,s)||n&&r(n,s)||a(t,s,f(e,s))}}},5506:function(t,e,n){var r=n(7778),o=n(2016),i=n(9487);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9487:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},1568:function(t,e,n){var r=n(1210),o=n(5006),i=n(5506),u=n(6717),c=n(3071);t.exports=function(t,e,n,a){var f=!!a&&!!a.unsafe,l=!!a&&!!a.enumerable,s=!!a&&!!a.noTargetGet,p=a&&void 0!==a.name?a.name:e;return o(n)&&u(n,p,a),t===r?(l?t[e]=n:c(e,n),t):(f?!s&&t[e]&&(l=!0):delete t[e],l?t[e]=n:i(t,e,n),t)}},7778:function(t,e,n){var r=n(4258);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4716:function(t,e,n){var r=n(1210),o=n(2702),i=r.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},1455:function(t,e,n){var r=n(2265);t.exports=r("navigator","userAgent")||""},6475:function(t,e,n){var r,o,i=n(1210),u=n(1455),c=i.process,a=i.Deno,f=c&&c.versions||a&&a.version,l=f&&f.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&u&&(!(r=u.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=u.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},9864:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1500:function(t,e,n){var r=n(4258),o=n(9487);t.exports=!r((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},8657:function(t,e,n){var r=n(1210),o=n(4225).f,i=n(5506),u=n(1568),c=n(3071),a=n(1184),f=n(9656);t.exports=function(t,e){var n,l,s,p,_,d=t.target,v=t.global,h=t.stat;if(n=v?r:h?r[d]||c(d,{}):(r[d]||{}).prototype)for(l in e){if(p=e[l],s=t.noTargetGet?(_=o(n,l))&&_.value:n[l],!f(v?l:d+(h?".":"#")+l,t.forced)&&void 0!==s){if(typeof p==typeof s)continue;a(p,s)}(t.sham||s&&s.sham)&&i(p,"sham",!0),u(n,l,p,t)}}},4258:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},9115:function(t,e,n){var r=n(5200),o=Function.prototype,i=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?u.bind(i):function(){return u.apply(i,arguments)})},5200:function(t,e,n){var r=n(4258);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},4264:function(t,e,n){var r=n(5200),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},232:function(t,e,n){var r=n(7778),o=n(4242),i=Function.prototype,u=r&&Object.getOwnPropertyDescriptor,c=o(i,"name"),a=c&&"something"===function(){}.name,f=c&&(!r||r&&u(i,"name").configurable);t.exports={EXISTS:c,PROPER:a,CONFIGURABLE:f}},3715:function(t,e,n){var r=n(5200),o=Function.prototype,i=o.bind,u=o.call,c=r&&i.bind(u,u);t.exports=r?function(t){return t&&c(t)}:function(t){return t&&function(){return u.apply(t,arguments)}}},2265:function(t,e,n){var r=n(1210),o=n(5006),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},9722:function(t,e,n){var r=n(6198);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},1210:function(t){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof window&&window)||function(){return this}()||Function("return this")()},4242:function(t,e,n){var r=n(3715),o=n(2103),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3953:function(t){t.exports={}},2872:function(t,e,n){var r=n(2265);t.exports=r("document","documentElement")},4165:function(t,e,n){var r=n(7778),o=n(4258),i=n(4716);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},600:function(t,e,n){var r=n(1210),o=n(3715),i=n(4258),u=n(237),c=r.Object,a=o("".split);t.exports=i((function(){return!c("z").propertyIsEnumerable(0)}))?function(t){return"String"==u(t)?a(t,""):c(t)}:c},8088:function(t,e,n){var r=n(5006),o=n(2702),i=n(2025);t.exports=function(t,e,n){var u,c;return i&&r(u=e.constructor)&&u!==n&&o(c=u.prototype)&&c!==n.prototype&&i(t,c),t}},3667:function(t,e,n){var r=n(3715),o=n(5006),i=n(4434),u=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},7793:function(t,e,n){var r=n(2702),o=n(5506);t.exports=function(t,e){r(e)&&"cause"in e&&o(t,"cause",e.cause)}},2406:function(t,e,n){var r,o,i,u=n(4564),c=n(1210),a=n(3715),f=n(2702),l=n(5506),s=n(4242),p=n(4434),_=n(9116),d=n(3953),v="Object already initialized",h=c.TypeError,y=c.WeakMap;if(u||p.state){var m=p.state||(p.state=new y),b=a(m.get),g=a(m.has),x=a(m.set);r=function(t,e){if(g(m,t))throw new h(v);return e.facade=t,x(m,t,e),e},o=function(t){return b(m,t)||{}},i=function(t){return g(m,t)}}else{var w=_("state");d[w]=!0,r=function(t,e){if(s(t,w))throw new h(v);return e.facade=t,l(t,w,e),e},o=function(t){return s(t,w)?t[w]:{}},i=function(t){return s(t,w)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!f(e)||(n=o(e)).type!==t)throw h("Incompatible receiver, "+t+" required");return n}}}},5006:function(t){t.exports=function(t){return"function"==typeof t}},9656:function(t,e,n){var r=n(4258),o=n(5006),i=/#|\.prototype\./,u=function(t,e){var n=a[c(t)];return n==l||n!=f&&(o(e)?r(e):!!e)},c=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},a=u.data={},f=u.NATIVE="N",l=u.POLYFILL="P";t.exports=u},2702:function(t,e,n){var r=n(5006);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},4832:function(t){t.exports=!1},664:function(t,e,n){var r=n(1210),o=n(2265),i=n(5006),u=n(3387),c=n(8264),a=r.Object;t.exports=c?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&u(e.prototype,a(t))}},5570:function(t,e,n){var r=n(8464);t.exports=function(t){return r(t.length)}},6717:function(t,e,n){var r=n(4258),o=n(5006),i=n(4242),u=n(2016).f,c=n(232).CONFIGURABLE,a=n(3667),f=n(2406),l=f.enforce,s=f.get,p=!r((function(){return 8!==u((function(){}),"length",{value:8}).length})),_=String(String).split("String"),d=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!i(t,"name")||c&&t.name!==e)&&u(t,"name",{value:e,configurable:!0}),p&&n&&i(n,"arity")&&t.length!==n.arity&&u(t,"length",{value:n.arity});var r=l(t);return i(r,"source")||(r.source=_.join("string"==typeof e?e:"")),t};Function.prototype.toString=d((function(){return o(this)&&s(this).source||a(this)}),"toString")},9868:function(t,e,n){var r=n(6475),o=n(4258);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},4564:function(t,e,n){var r=n(1210),o=n(5006),i=n(3667),u=r.WeakMap;t.exports=o(u)&&/native code/.test(i(u))},1377:function(t,e,n){var r=n(2910);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},42:function(t,e,n){var r,o=n(3794),i=n(3238),u=n(9864),c=n(3953),a=n(2872),f=n(4716),l=n(9116),s=l("IE_PROTO"),p=function(){},_=function(t){return"<script>"+t+"</"+"script>"},d=function(t){t.write(_("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;v="undefined"!=typeof document?document.domain&&r?d(r):((e=f("iframe")).style.display="none",a.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(_("document.F=Object")),t.close(),t.F):d(r);for(var n=u.length;n--;)delete v.prototype[u[n]];return v()};c[s]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p.prototype=o(t),n=new p,p.prototype=null,n[s]=t):n=v(),void 0===e?n:i.f(n,e)}},3238:function(t,e,n){var r=n(7778),o=n(2879),i=n(2016),u=n(3794),c=n(4929),a=n(5321);e.f=r&&!o?Object.defineProperties:function(t,e){u(t);for(var n,r=c(e),o=a(e),f=o.length,l=0;f>l;)i.f(t,n=o[l++],r[n]);return t}},2016:function(t,e,n){var r=n(1210),o=n(7778),i=n(4165),u=n(2879),c=n(3794),a=n(8901),f=r.TypeError,l=Object.defineProperty,s=Object.getOwnPropertyDescriptor,p="enumerable",_="configurable",d="writable";e.f=o?u?function(t,e,n){if(c(t),e=a(e),c(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n.writable){var r=s(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:_ in n?n.configurable:r.configurable,enumerable:p in n?n.enumerable:r.enumerable,writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(c(t),e=a(e),c(n),i)try{return l(t,e,n)}catch(t){}if("get"in n||"set"in n)throw f("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},4225:function(t,e,n){var r=n(7778),o=n(4264),i=n(9532),u=n(9487),c=n(4929),a=n(8901),f=n(4242),l=n(4165),s=Object.getOwnPropertyDescriptor;e.f=r?s:function(t,e){if(t=c(t),e=a(e),l)try{return s(t,e)}catch(t){}if(f(t,e))return u(!o(i.f,t,e),t[e])}},6112:function(t,e,n){var r=n(6166),o=n(9864).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},5603:function(t,e){e.f=Object.getOwnPropertySymbols},3387:function(t,e,n){var r=n(3715);t.exports=r({}.isPrototypeOf)},6166:function(t,e,n){var r=n(3715),o=n(4242),i=n(4929),u=n(8845).indexOf,c=n(3953),a=r([].push);t.exports=function(t,e){var n,r=i(t),f=0,l=[];for(n in r)!o(c,n)&&o(r,n)&&a(l,n);for(;e.length>f;)o(r,n=e[f++])&&(~u(l,n)||a(l,n));return l}},5321:function(t,e,n){var r=n(6166),o=n(9864);t.exports=Object.keys||function(t){return r(t,o)}},9532:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2025:function(t,e,n){var r=n(3715),o=n(3794),i=n(1938);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},896:function(t,e,n){var r=n(1210),o=n(4264),i=n(5006),u=n(2702),c=r.TypeError;t.exports=function(t,e){var n,r;if("string"===e&&i(n=t.toString)&&!u(r=o(n,t)))return r;if(i(n=t.valueOf)&&!u(r=o(n,t)))return r;if("string"!==e&&i(n=t.toString)&&!u(r=o(n,t)))return r;throw c("Can't convert object to primitive value")}},3496:function(t,e,n){var r=n(2265),o=n(3715),i=n(6112),u=n(5603),c=n(3794),a=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(c(t)),n=u.f;return n?a(e,n(t)):e}},9780:function(t,e,n){var r=n(2016).f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},5262:function(t,e,n){var r=n(1210).TypeError;t.exports=function(t){if(null==t)throw r("Can't call method on "+t);return t}},3071:function(t,e,n){var r=n(1210),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},9116:function(t,e,n){var r=n(1843),o=n(3705),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},4434:function(t,e,n){var r=n(1210),o=n(3071),i="__core-js_shared__",u=r[i]||o(i,{});t.exports=u},1843:function(t,e,n){var r=n(4832),o=n(4434);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.22.4",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE",source:"https://github.com/zloirock/core-js"})},645:function(t,e,n){var r=n(8249),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},4929:function(t,e,n){var r=n(600),o=n(5262);t.exports=function(t){return r(o(t))}},8249:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){var r=+t;return r!=r||0===r?0:(r>0?n:e)(r)}},8464:function(t,e,n){var r=n(8249),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},2103:function(t,e,n){var r=n(1210),o=n(5262),i=r.Object;t.exports=function(t){return i(o(t))}},357:function(t,e,n){var r=n(1210),o=n(4264),i=n(2702),u=n(664),c=n(9722),a=n(896),f=n(8875),l=r.TypeError,s=f("toPrimitive");t.exports=function(t,e){if(!i(t)||u(t))return t;var n,r=c(t,s);if(r){if(void 0===e&&(e="default"),n=o(r,t,e),!i(n)||u(n))return n;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},8901:function(t,e,n){var r=n(357),o=n(664);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},5165:function(t,e,n){var r={};r[n(8875)("toStringTag")]="z",t.exports="[object z]"===String(r)},2910:function(t,e,n){var r=n(1210),o=n(5996),i=r.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},7232:function(t,e,n){var r=n(1210).String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},3705:function(t,e,n){var r=n(3715),o=0,i=Math.random(),u=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},8264:function(t,e,n){var r=n(9868);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},2879:function(t,e,n){var r=n(7778),o=n(4258);t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8875:function(t,e,n){var r=n(1210),o=n(1843),i=n(4242),u=n(3705),c=n(9868),a=n(8264),f=o("wks"),l=r.Symbol,s=l&&l.for,p=a?l:l&&l.withoutSetter||u;t.exports=function(t){if(!i(f,t)||!c&&"string"!=typeof f[t]){var e="Symbol."+t;c&&i(l,t)?f[t]=l[t]:f[t]=a&&s?s(e):p(e)}return f[t]}},6266:function(t,e,n){"use strict";var r=n(2265),o=n(4242),i=n(5506),u=n(3387),c=n(2025),a=n(1184),f=n(9780),l=n(8088),s=n(1377),p=n(7793),_=n(7398),d=n(1500),v=n(7778),h=n(4832);t.exports=function(t,e,n,y){var m="stackTraceLimit",b=y?2:1,g=t.split("."),x=g[g.length-1],w=r.apply(null,g);if(w){var O=w.prototype;if(!h&&o(O,"cause")&&delete O.cause,!n)return w;var S=r("Error"),E=e((function(t,e){var n=s(y?e:t,void 0),r=y?new w(t):new w;return void 0!==n&&i(r,"message",n),d&&i(r,"stack",_(r.stack,2)),this&&u(O,this)&&l(r,this,E),arguments.length>b&&p(r,arguments[b]),r}));if(E.prototype=O,"Error"!==x?c?c(E,S):a(E,S,{name:!0}):v&&m in w&&(f(E,w,m),f(E,w,"prepareStackTrace")),a(E,w),!h)try{O.name!==x&&i(O,"name",x),O.constructor=E}catch(t){}return E}}},3679:function(t,e,n){"use strict";var r=n(8657),o=n(8845).includes,i=n(4258),u=n(8987);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),u("includes")},875:function(t,e,n){var r=n(8657),o=n(1210),i=n(9115),u=n(6266),c="WebAssembly",a=o.WebAssembly,f=7!==Error("e",{cause:7}).cause,l=function(t,e){var n={};n[t]=u(t,e,f),r({global:!0,arity:1,forced:f},n)},s=function(t,e){if(a&&a[t]){var n={};n[t]=u("WebAssembly."+t,e,f),r({target:c,stat:!0,arity:1,forced:f},n)}};l("Error",(function(t){return function(e){return i(t,this,arguments)}})),l("EvalError",(function(t){return function(e){return i(t,this,arguments)}})),l("RangeError",(function(t){return function(e){return i(t,this,arguments)}})),l("ReferenceError",(function(t){return function(e){return i(t,this,arguments)}})),l("SyntaxError",(function(t){return function(e){return i(t,this,arguments)}})),l("TypeError",(function(t){return function(e){return i(t,this,arguments)}})),l("URIError",(function(t){return function(e){return i(t,this,arguments)}})),s("CompileError",(function(t){return function(e){return i(t,this,arguments)}})),s("LinkError",(function(t){return function(e){return i(t,this,arguments)}})),s("RuntimeError",(function(t){return function(e){return i(t,this,arguments)}}))},4273:function(t){!function(){"use strict";var e=[],n=3988292384;function r(t){var e,r,o,i,u=-1;for(e=0,o=t.length;e<o;e+=1){for(i=255&(u^t[e]),r=0;r<8;r+=1)1==(1&i)?i=i>>>1^n:i>>>=1;u=u>>>8^i}return-1^u}function o(t,n){var r,i,u;if(void 0!==o.crc&&n&&t||(o.crc=-1,t)){for(r=o.crc,i=0,u=t.length;i<u;i+=1)r=r>>>8^e[255&(r^t[i])];return o.crc=r,-1^r}}!function(){var t,r,o;for(r=0;r<256;r+=1){for(t=r,o=0;o<8;o+=1)1&t?t=n^t>>>1:t>>>=1;e[r]=t>>>0}}(),t.exports=function(t,e){var n;t="string"==typeof t?(n=t,Array.prototype.map.call(n,(function(t){return t.charCodeAt(0)}))):t;return((e?r(t):o(t))>>>0).toString(16)},t.exports.direct=r,t.exports.table=o}()},7390:function(t){"use strict";t.exports=function(t,e){e||(e={}),"function"==typeof e&&(e={cmp:e});var n,r="boolean"==typeof e.cycles&&e.cycles,o=e.cmp&&(n=e.cmp,function(t){return function(e,r){var o={key:e,value:t[e]},i={key:r,value:t[r]};return n(o,i)}}),i=[];return function t(e){if(e&&e.toJSON&&"function"==typeof e.toJSON&&(e=e.toJSON()),void 0!==e){if("number"==typeof e)return isFinite(e)?""+e:"null";if("object"!=typeof e)return JSON.stringify(e);var n,u;if(Array.isArray(e)){for(u="[",n=0;n<e.length;n++)n&&(u+=","),u+=t(e[n])||"null";return u+"]"}if(null===e)return"null";if(-1!==i.indexOf(e)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var c=i.push(e)-1,a=Object.keys(e).sort(o&&o(e));for(u="",n=0;n<a.length;n++){var f=a[n],l=t(e[f]);l&&(u&&(u+=","),u+=JSON.stringify(f)+":"+l)}return i.splice(c,1),"{"+u+"}"}}(t)}},7692:function(t,e,n){"use strict";var r=n(3801),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function a(t){return r.isMemo(t)?u:c[t.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=u;var f=Object.defineProperty,l=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,_=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(d){var o=_(n);o&&o!==d&&t(e,o,r)}var u=l(n);s&&(u=u.concat(s(n)));for(var c=a(e),v=a(n),h=0;h<u.length;++h){var y=u[h];if(!(i[y]||r&&r[y]||v&&v[y]||c&&c[y])){var m=p(n,y);try{f(e,y,m)}catch(t){}}}}return e}},4924:function(t,e,n){var r=n(9159).Symbol;t.exports=r},4729:function(t){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},530:function(t,e,n){var r=n(4924),o=n(8792),i=n(8004),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?o(t):i(t)}},3042:function(t,e,n){var r=n(4924),o=n(4729),i=n(6259),u=n(6260),c=r?r.prototype:void 0,a=c?c.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(u(e))return a?a.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n}},9504:function(t,e,n){var r=n(310),o=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(o,""):t}},6150:function(t){var e="object"==typeof window&&window&&window.Object===Object&&window;t.exports=e},8792:function(t,e,n){var r=n(4924),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(t){}var o=u.call(t);return r&&(e?t[c]=n:delete t[c]),o}},8004:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},9159:function(t,e,n){var r=n(6150),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},310:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},3259:function(t,e,n){var r=n(731),o=n(6199),i=n(4934),u=Math.max,c=Math.min;t.exports=function(t,e,n){var a,f,l,s,p,_,d=0,v=!1,h=!1,y=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function m(e){var n=a,r=f;return a=f=void 0,d=e,s=t.apply(r,n)}function b(t){return d=t,p=setTimeout(x,e),v?m(t):s}function g(t){var n=t-_;return void 0===_||n>=e||n<0||h&&t-d>=l}function x(){var t=o();if(g(t))return w(t);p=setTimeout(x,function(t){var n=e-(t-_);return h?c(n,l-(t-d)):n}(t))}function w(t){return p=void 0,y&&a?m(t):(a=f=void 0,s)}function O(){var t=o(),n=g(t);if(a=arguments,f=this,_=t,n){if(void 0===p)return b(_);if(h)return clearTimeout(p),p=setTimeout(x,e),m(_)}return void 0===p&&(p=setTimeout(x,e)),s}return e=i(e)||0,r(n)&&(v=!!n.leading,l=(h="maxWait"in n)?u(i(n.maxWait)||0,e):l,y="trailing"in n?!!n.trailing:y),O.cancel=function(){void 0!==p&&clearTimeout(p),d=0,a=_=f=p=void 0},O.flush=function(){return void 0===p?s:w(o())},O}},6259:function(t){var e=Array.isArray;t.exports=e},731:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},1642:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},6260:function(t,e,n){var r=n(530),o=n(1642);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},6199:function(t,e,n){var r=n(9159);t.exports=function(){return r.Date.now()}},4934:function(t,e,n){var r=n(9504),o=n(731),i=n(6260),u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,a=/^0o[0-7]+$/i,f=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=c.test(t);return n||a.test(t)?f(t.slice(2),n?2:8):u.test(t)?NaN:+t}},6700:function(t,e,n){var r=n(3042);t.exports=function(t){return null==t?"":r(t)}},5348:function(t,e,n){var r=n(6700),o=0;t.exports=function(t){var e=++o;return r(t)+e}},9424:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(4273),o=n.n(r),i=n(3191),u=n.n(i),c=(0,n(3499).Z)("photon"),a={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},f="__domain__.invalid",l="http://".concat(f);function s(t,e){var n;try{n=new URL(t,l)}catch(t){return null}var r,i,s,p,_,d="https:"===n.protocol,v=new URL("https://i0.wp.com");if(_=n.host,/^i[0-2]\.wp\.com$/.test(_))v.pathname=n.pathname,v.hostname=n.hostname;else{if(n.search)return null;var h=n.href.replace("".concat(n.protocol,"/"),"");"blob:"===n.protocol&&(h=n.pathname.replace("://","//")),n.hostname===f&&(h=n.pathname),v.pathname=h,v.hostname=(r=h,i=o()(r),s=u()(i),p="i"+Math.floor(3*s()),c('determined server "%s" to use with "%s"',p,r),p+".wp.com"),d&&v.searchParams.set("ssl",1)}if(e)for(var y in e)"host"!==y&&"hostname"!==y?"secure"!==y||e[y]?v.searchParams.set(a[y]||y,e[y]):v.protocol="http:":v.hostname=e[y];return c("generated Photon URL: %s",v.href),v.href}},211:function(t,e,n){var r=n(3538),o=n(2687);function i(t,e){for(var n in e)t[n]=e[n];return t}function u(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function c(t){this.props=t}function a(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:u(this.props,t)}function r(e){return this.shouldComponentUpdate=n,o.createElement(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(c.prototype=new o.Component).isPureReactComponent=!0,c.prototype.shouldComponentUpdate=function(t,e){return u(this.props,t)||u(this.state,e)};var f=o.options.__b;o.options.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),f&&f(t)};var l="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function s(t){function e(e,n){var r=i({},e);return delete r.ref,t(r,(n=e.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return e.$$typeof=l,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var p=function(t,e){return null==t?null:o.toChildArray(o.toChildArray(t).map(e))},_={map:p,forEach:p,count:function(t){return t?o.toChildArray(t).length:0},only:function(t){var e=o.toChildArray(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:o.toChildArray},d=o.options.__e;o.options.__e=function(t,e,n){if(t.then)for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e);d(t,e,n)};var v=o.options.unmount;function h(){this.__u=0,this.t=null,this.__b=null}function y(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function m(t){var e,n,r;function i(i){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){r=t})),r)throw r;if(!n)throw e;return o.createElement(n,i)}return i.displayName="Lazy",i.__f=!0,i}function b(){this.o=null,this.u=null}o.options.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),v&&v(t)},(h.prototype=new o.Component).__c=function(t,e){var n=e.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=y(r.__v),i=!1,u=function(){i||(i=!0,n.__R=null,o?o(c):c())};n.__R=u;var c=function(){if(!--r.__u){if(r.state.__e){var t=r.state.__e;r.__v.__k[0]=function t(e,n,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return t(e,n,r)})),e.__c&&e.__c.__P===n&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__e:r.__b=null});e=r.t.pop();)e.forceUpdate()}},a=!0===e.__h;r.__u++||a||r.setState({__e:r.__b=r.__v.__k[0]}),t.then(u,u)},h.prototype.componentWillUnmount=function(){this.t=[]},h.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function t(e,n,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),e.__c.__H=null),null!=(e=i({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=n),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return t(e,n,r)}))),e}(this.__b,n,r.__O=r.__P)}this.__b=null}var u=e.__e&&o.createElement(o.Fragment,null,t.fallback);return u&&(u.__h=null),[o.createElement(o.Fragment,null,e.__e?null:t.children),u]};var g=function(t,e,n){if(++n[1]===n[0]&&t.u.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.u.size))for(n=t.o;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.o=n=n[2]}};function x(t){return this.getChildContext=function(){return t.context},t.children}function w(t){var e=this,n=t.i;e.componentWillUnmount=function(){o.render(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),t.__v?(e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),o.render(o.createElement(x,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function O(t,e){return o.createElement(w,{__v:t,i:e})}(b.prototype=new o.Component).__e=function(t){var e=this,n=y(e.__v),r=e.u.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),g(e,t,r)):o()};n?n(i):i()}},b.prototype.render=function(t){this.o=null,this.u=new Map;var e=o.toChildArray(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.u.set(e[n],this.o=[1,0,this.o]);return t.children},b.prototype.componentDidUpdate=b.prototype.componentDidMount=function(){var t=this;this.u.forEach((function(e,n){g(t,n,e)}))};var S="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,E=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,C="undefined"!=typeof document,P=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};function k(t,e,n){return null==e.__k&&(e.textContent=""),o.render(t,e),"function"==typeof n&&n(),t?t.__c:null}function j(t,e,n){return o.hydrate(t,e),"function"==typeof n&&n(),t?t.__c:null}o.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(o.Component.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var N=o.options.event;function R(){}function T(){return this.cancelBubble}function A(){return this.defaultPrevented}o.options.event=function(t){return N&&(t=N(t)),t.persist=R,t.isPropagationStopped=T,t.isDefaultPrevented=A,t.nativeEvent=t};var M,D={configurable:!0,get:function(){return this.class}},U=o.options.vnode;o.options.vnode=function(t){var e=t.type,n=t.props,r=n;if("string"==typeof e){var i=-1===e.indexOf("-");for(var u in r={},n){var c=n[u];C&&"children"===u&&"noscript"===e||"value"===u&&"defaultValue"in n&&null==c||("defaultValue"===u&&"value"in n&&null==n.value?u="value":"download"===u&&!0===c?c="":/ondoubleclick/i.test(u)?u="ondblclick":/^onchange(textarea|input)/i.test(u+e)&&!P(n.type)?u="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(u)?u=u.toLowerCase():i&&E.test(u)?u=u.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===c&&(c=void 0),r[u]=c)}"select"==e&&r.multiple&&Array.isArray(r.value)&&(r.value=o.toChildArray(n.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==e&&null!=r.defaultValue&&(r.value=o.toChildArray(n.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),t.props=r}e&&n.class!=n.className&&(D.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",D)),t.$$typeof=S,U&&U(t)};var F=o.options.__r;o.options.__r=function(t){F&&F(t),M=t.__c};var $={ReactCurrentDispatcher:{current:{readContext:function(t){return M.__n[t.__c].props.value}}}};function L(t){return o.createElement.bind(null,t)}function I(t){return!!t&&t.$$typeof===S}function W(t){return I(t)?o.cloneElement.apply(null,arguments):t}function Z(t){return!!t.__k&&(o.render(null,t),!0)}function H(t){return t&&(t.base||1===t.nodeType&&t)||null}var z=function(t,e){return t(e)},B=function(t,e){return t(e)},V=o.Fragment,q={useState:r.useState,useReducer:r.useReducer,useEffect:r.useEffect,useLayoutEffect:r.useLayoutEffect,useRef:r.useRef,useImperativeHandle:r.useImperativeHandle,useMemo:r.useMemo,useCallback:r.useCallback,useContext:r.useContext,useDebugValue:r.useDebugValue,version:"17.0.2",Children:_,render:k,hydrate:j,unmountComponentAtNode:Z,createPortal:O,createElement:o.createElement,createContext:o.createContext,createFactory:L,cloneElement:W,createRef:o.createRef,Fragment:o.Fragment,isValidElement:I,findDOMNode:H,Component:o.Component,PureComponent:c,memo:a,forwardRef:s,flushSync:B,unstable_batchedUpdates:z,StrictMode:V,Suspense:h,SuspenseList:b,lazy:m,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$};Object.keys(r).forEach((function(t){e[t]=r[t]})),e.createElement=o.createElement,e.createContext=o.createContext,e.createRef=o.createRef,e.Fragment=o.Fragment,e.Component=o.Component,e.version="17.0.2",e.Children=_,e.render=k,e.hydrate=j,e.unmountComponentAtNode=Z,e.createPortal=O,e.createFactory=L,e.cloneElement=W,e.isValidElement=I,e.findDOMNode=H,e.PureComponent=c,e.memo=a,e.forwardRef=s,e.flushSync=B,e.unstable_batchedUpdates=z,e.StrictMode=V,e.Suspense=h,e.SuspenseList=b,e.lazy=m,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$,e.default=q},762:function(t,e,n){"use strict";var r=n(3538),o=n(2687);function i(t,e){for(var n in e)t[n]=e[n];return t}function u(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function c(t){this.props=t}(c.prototype=new o.Component).isPureReactComponent=!0,c.prototype.shouldComponentUpdate=function(t,e){return u(this.props,t)||u(this.state,e)};var a=o.options.__b;o.options.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),a&&a(t)};var f="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var l=function(t,e){return null==t?null:(0,o.toChildArray)((0,o.toChildArray)(t).map(e))},s={map:l,forEach:l,count:function(t){return t?(0,o.toChildArray)(t).length:0},only:function(t){var e=(0,o.toChildArray)(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:o.toChildArray},p=o.options.__e;o.options.__e=function(t,e,n){if(t.then)for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e);p(t,e,n)};var _=o.options.unmount;function d(){this.__u=0,this.t=null,this.__b=null}function v(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function h(){this.u=null,this.o=null}o.options.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),_&&_(t)},(d.prototype=new o.Component).__c=function(t,e){var n=e.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=v(r.__v),i=!1,u=function(){i||(i=!0,n.__R=null,o?o(c):c())};n.__R=u;var c=function(){if(!--r.__u){if(r.state.__e){var t=r.state.__e;r.__v.__k[0]=function t(e,n,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return t(e,n,r)})),e.__c&&e.__c.__P===n&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__e:r.__b=null});e=r.t.pop();)e.forceUpdate()}},a=!0===e.__h;r.__u++||a||r.setState({__e:r.__b=r.__v.__k[0]}),t.then(u,u)},d.prototype.componentWillUnmount=function(){this.t=[]},d.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function t(e,n,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),e.__c.__H=null),null!=(e=i({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=n),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return t(e,n,r)}))),e}(this.__b,n,r.__O=r.__P)}this.__b=null}var u=e.__e&&(0,o.createElement)(o.Fragment,null,t.fallback);return u&&(u.__h=null),[(0,o.createElement)(o.Fragment,null,e.__e?null:t.children),u]};var y=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function m(t){return this.getChildContext=function(){return t.context},t.children}function b(t){var e=this,n=t.i;e.componentWillUnmount=function(){(0,o.render)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),t.__v?(e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),(0,o.render)((0,o.createElement)(m,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(h.prototype=new o.Component).__e=function(t){var e=this,n=v(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),y(e,t,r)):o()};n?n(i):i()}},h.prototype.render=function(t){this.u=null,this.o=new Map;var e=(0,o.toChildArray)(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},h.prototype.componentDidUpdate=h.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){y(t,n,e)}))};var g="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,x=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,w="undefined"!=typeof document,O=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};o.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(o.Component.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var S=o.options.event;function E(){}function C(){return this.cancelBubble}function P(){return this.defaultPrevented}o.options.event=function(t){return S&&(t=S(t)),t.persist=E,t.isPropagationStopped=C,t.isDefaultPrevented=P,t.nativeEvent=t};var k,j={configurable:!0,get:function(){return this.class}},N=o.options.vnode;o.options.vnode=function(t){var e=t.type,n=t.props,r=n;if("string"==typeof e){var i=-1===e.indexOf("-");for(var u in r={},n){var c=n[u];w&&"children"===u&&"noscript"===e||"value"===u&&"defaultValue"in n&&null==c||("defaultValue"===u&&"value"in n&&null==n.value?u="value":"download"===u&&!0===c?c="":/ondoubleclick/i.test(u)?u="ondblclick":/^onchange(textarea|input)/i.test(u+e)&&!O(n.type)?u="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(u)?u=u.toLowerCase():i&&x.test(u)?u=u.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===c&&(c=void 0),r[u]=c)}"select"==e&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,o.toChildArray)(n.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==e&&null!=r.defaultValue&&(r.value=(0,o.toChildArray)(n.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),t.props=r}e&&n.class!=n.className&&(j.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",j)),t.$$typeof=g,N&&N(t)};var R=o.options.__r;o.options.__r=function(t){R&&R(t),k=t.__c};var T={ReactCurrentDispatcher:{current:{readContext:function(t){return k.__n[t.__c].props.value}}}};function A(t){return!!t&&t.$$typeof===g}o.Fragment;e.ZP={useState:r.useState,useReducer:r.useReducer,useEffect:r.useEffect,useLayoutEffect:r.useLayoutEffect,useRef:r.useRef,useImperativeHandle:r.useImperativeHandle,useMemo:r.useMemo,useCallback:r.useCallback,useContext:r.useContext,useDebugValue:r.useDebugValue,version:"17.0.2",Children:s,render:function(t,e,n){return null==e.__k&&(e.textContent=""),(0,o.render)(t,e),"function"==typeof n&&n(),t?t.__c:null},hydrate:function(t,e,n){return(0,o.hydrate)(t,e),"function"==typeof n&&n(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&((0,o.render)(null,t),!0)},createPortal:function(t,e){return(0,o.createElement)(b,{__v:t,i:e})},createElement:o.createElement,createContext:o.createContext,createFactory:function(t){return o.createElement.bind(null,t)},cloneElement:function(t){return A(t)?o.cloneElement.apply(null,arguments):t},createRef:o.createRef,Fragment:o.Fragment,isValidElement:A,findDOMNode:function(t){return t&&(t.base||1===t.nodeType&&t)||null},Component:o.Component,PureComponent:c,memo:function(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:u(this.props,t)}function r(e){return this.shouldComponentUpdate=n,(0,o.createElement)(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(t){function e(e,n){var r=i({},e);return delete r.ref,t(r,(n=e.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return e.$$typeof=f,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e},flushSync:function(t,e){return t(e)},unstable_batchedUpdates:function(t,e){return t(e)},StrictMode:o.Fragment,Suspense:d,SuspenseList:h,lazy:function(t){var e,n,r;function i(i){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){r=t})),r)throw r;if(!n)throw e;return(0,o.createElement)(n,i)}return i.displayName="Lazy",i.__f=!0,i},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:T}},2687:function(t,e,n){"use strict";n.r(e),n.d(e,{Component:function(){return g},Fragment:function(){return b},cloneElement:function(){return W},createContext:function(){return Z},createElement:function(){return h},createRef:function(){return m},h:function(){return h},hydrate:function(){return I},isValidElement:function(){return u},options:function(){return o},render:function(){return L},toChildArray:function(){return P}});var r,o,i,u,c,a,f,l,s={},p=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function d(t,e){for(var n in e)t[n]=e[n];return t}function v(t){var e=t.parentNode;e&&e.removeChild(t)}function h(t,e,n){var o,i,u,c={};for(u in e)"key"==u?o=e[u]:"ref"==u?i=e[u]:c[u]=e[u];if(arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(u in t.defaultProps)void 0===c[u]&&(c[u]=t.defaultProps[u]);return y(t,c,o,i,null)}function y(t,e,n,r,u){var c={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==u?++i:u};return null==u&&null!=o.vnode&&o.vnode(c),c}function m(){return{current:null}}function b(t){return t.children}function g(t,e){this.props=t,this.context=e}function x(t,e){if(null==e)return t.__?x(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?x(t):null}function w(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return w(t)}}function O(t){(!t.__d&&(t.__d=!0)&&c.push(t)&&!S.__r++||f!==o.debounceRendering)&&((f=o.debounceRendering)||a)(S)}function S(){for(var t;S.__r=c.length;)t=c.sort((function(t,e){return t.__v.__b-e.__v.__b})),c=[],t.some((function(t){var e,n,r,o,i,u;t.__d&&(i=(o=(e=t).__v).__e,(u=e.__P)&&(n=[],(r=d({},o)).__v=o.__v+1,A(u,o,r,e.__n,void 0!==u.ownerSVGElement,null!=o.__h?[i]:null,n,null==i?x(o):i,o.__h),M(n,o),o.__e!=i&&w(o)))}))}function E(t,e,n,r,o,i,u,c,a,f){var l,_,d,v,h,m,g,w=r&&r.__k||p,O=w.length;for(n.__k=[],l=0;l<e.length;l++)if(null!=(v=n.__k[l]=null==(v=e[l])||"boolean"==typeof v?null:"string"==typeof v||"number"==typeof v||"bigint"==typeof v?y(null,v,null,null,v):Array.isArray(v)?y(b,{children:v},null,null,null):v.__b>0?y(v.type,v.props,v.key,null,v.__v):v)){if(v.__=n,v.__b=n.__b+1,null===(d=w[l])||d&&v.key==d.key&&v.type===d.type)w[l]=void 0;else for(_=0;_<O;_++){if((d=w[_])&&v.key==d.key&&v.type===d.type){w[_]=void 0;break}d=null}A(t,v,d=d||s,o,i,u,c,a,f),h=v.__e,(_=v.ref)&&d.ref!=_&&(g||(g=[]),d.ref&&g.push(d.ref,null,v),g.push(_,v.__c||h,v)),null!=h?(null==m&&(m=h),"function"==typeof v.type&&v.__k===d.__k?v.__d=a=C(v,a,t):a=k(t,v,d,w,h,a),"function"==typeof n.type&&(n.__d=a)):a&&d.__e==a&&a.parentNode!=t&&(a=x(d))}for(n.__e=m,l=O;l--;)null!=w[l]&&("function"==typeof n.type&&null!=w[l].__e&&w[l].__e==n.__d&&(n.__d=x(r,l+1)),F(w[l],w[l]));if(g)for(l=0;l<g.length;l++)U(g[l],g[++l],g[++l])}function C(t,e,n){for(var r,o=t.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=t,e="function"==typeof r.type?C(r,e,n):k(n,r,r,o,r.__e,e));return e}function P(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){P(t,e)})):e.push(t)),e}function k(t,e,n,r,o,i){var u,c,a;if(void 0!==e.__d)u=e.__d,e.__d=void 0;else if(null==n||o!=i||null==o.parentNode)t:if(null==i||i.parentNode!==t)t.appendChild(o),u=null;else{for(c=i,a=0;(c=c.nextSibling)&&a<r.length;a+=2)if(c==o)break t;t.insertBefore(o,i),u=i}return void 0!==u?u:o.nextSibling}function j(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||_.test(e)?n:n+"px"}function N(t,e,n,r,o){var i;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||j(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||j(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r||t.addEventListener(e,i?T:R,i):t.removeEventListener(e,i?T:R,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null!=n&&(!1!==n||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,n):t.removeAttribute(e))}}function R(t){this.l[t.type+!1](o.event?o.event(t):t)}function T(t){this.l[t.type+!0](o.event?o.event(t):t)}function A(t,e,n,r,i,u,c,a,f){var l,s,p,_,v,h,y,m,x,w,O,S=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(f=n.__h,a=e.__e=n.__e,e.__h=null,u=[a]),(l=o.__b)&&l(e);try{t:if("function"==typeof S){if(m=e.props,x=(l=S.contextType)&&r[l.__c],w=l?x?x.props.value:l.__:r,n.__c?y=(s=e.__c=n.__c).__=s.__E:("prototype"in S&&S.prototype.render?e.__c=s=new S(m,w):(e.__c=s=new g(m,w),s.constructor=S,s.render=$),x&&x.sub(s),s.props=m,s.state||(s.state={}),s.context=w,s.__n=r,p=s.__d=!0,s.__h=[]),null==s.__s&&(s.__s=s.state),null!=S.getDerivedStateFromProps&&(s.__s==s.state&&(s.__s=d({},s.__s)),d(s.__s,S.getDerivedStateFromProps(m,s.__s))),_=s.props,v=s.state,p)null==S.getDerivedStateFromProps&&null!=s.componentWillMount&&s.componentWillMount(),null!=s.componentDidMount&&s.__h.push(s.componentDidMount);else{if(null==S.getDerivedStateFromProps&&m!==_&&null!=s.componentWillReceiveProps&&s.componentWillReceiveProps(m,w),!s.__e&&null!=s.shouldComponentUpdate&&!1===s.shouldComponentUpdate(m,s.__s,w)||e.__v===n.__v){s.props=m,s.state=s.__s,e.__v!==n.__v&&(s.__d=!1),s.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),s.__h.length&&c.push(s);break t}null!=s.componentWillUpdate&&s.componentWillUpdate(m,s.__s,w),null!=s.componentDidUpdate&&s.__h.push((function(){s.componentDidUpdate(_,v,h)}))}s.context=w,s.props=m,s.state=s.__s,(l=o.__r)&&l(e),s.__d=!1,s.__v=e,s.__P=t,l=s.render(s.props,s.state,s.context),s.state=s.__s,null!=s.getChildContext&&(r=d(d({},r),s.getChildContext())),p||null==s.getSnapshotBeforeUpdate||(h=s.getSnapshotBeforeUpdate(_,v)),O=null!=l&&l.type===b&&null==l.key?l.props.children:l,E(t,Array.isArray(O)?O:[O],e,n,r,i,u,c,a,f),s.base=e.__e,e.__h=null,s.__h.length&&c.push(s),y&&(s.__E=s.__=null),s.__e=!1}else null==u&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=D(n.__e,e,n,r,i,u,c,f);(l=o.diffed)&&l(e)}catch(t){e.__v=null,(f||null!=u)&&(e.__e=a,e.__h=!!f,u[u.indexOf(a)]=null),o.__e(t,e,n)}}function M(t,e){o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function D(t,e,n,o,i,u,c,a){var f,l,p,_=n.props,d=e.props,h=e.type,y=0;if("svg"===h&&(i=!0),null!=u)for(;y<u.length;y++)if((f=u[y])&&(f===t||(h?f.localName==h:3==f.nodeType))){t=f,u[y]=null;break}if(null==t){if(null===h)return document.createTextNode(d);t=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,d.is&&d),u=null,a=!1}if(null===h)_===d||a&&t.data===d||(t.data=d);else{if(u=u&&r.call(t.childNodes),l=(_=n.props||s).dangerouslySetInnerHTML,p=d.dangerouslySetInnerHTML,!a){if(null!=u)for(_={},y=0;y<t.attributes.length;y++)_[t.attributes[y].name]=t.attributes[y].value;(p||l)&&(p&&(l&&p.__html==l.__html||p.__html===t.innerHTML)||(t.innerHTML=p&&p.__html||""))}if(function(t,e,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in e||N(t,i,null,n[i],r);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===e[i]||N(t,i,e[i],n[i],r)}(t,d,_,i,a),p)e.__k=[];else if(y=e.props.children,E(t,Array.isArray(y)?y:[y],e,n,o,i&&"foreignObject"!==h,u,c,u?u[0]:n.__k&&x(n,0),a),null!=u)for(y=u.length;y--;)null!=u[y]&&v(u[y]);a||("value"in d&&void 0!==(y=d.value)&&(y!==t.value||"progress"===h&&!y)&&N(t,"value",y,_.value,!1),"checked"in d&&void 0!==(y=d.checked)&&y!==t.checked&&N(t,"checked",y,_.checked,!1))}return t}function U(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,n)}}function F(t,e,n){var r,i;if(o.unmount&&o.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||U(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){o.__e(t,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&F(r[i],e,"function"!=typeof t.type);n||null==t.__e||v(t.__e),t.__e=t.__d=void 0}function $(t,e,n){return this.constructor(t,n)}function L(t,e,n){var i,u,c;o.__&&o.__(t,e),u=(i="function"==typeof n)?null:n&&n.__k||e.__k,c=[],A(e,t=(!i&&n||e).__k=h(b,null,[t]),u||s,s,void 0!==e.ownerSVGElement,!i&&n?[n]:u?null:e.firstChild?r.call(e.childNodes):null,c,!i&&n?n:u?u.__e:e.firstChild,i),M(c,t)}function I(t,e){L(t,e,I)}function W(t,e,n){var o,i,u,c=d({},t.props);for(u in e)"key"==u?o=e[u]:"ref"==u?i=e[u]:c[u]=e[u];return arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),y(t.type,c,o||t.key,i||t.ref,null)}function Z(t,e){var n={__c:e="__cC"+l++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(O)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}r=p.slice,o={__e:function(t,e){for(var n,r,o;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(t)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(t),o=n.__d),o)return n.__E=n}catch(e){t=e}throw t}},i=0,u=function(t){return null!=t&&void 0===t.constructor},g.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof t&&(t=t(d({},n),this.props)),t&&d(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),O(this))},g.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),O(this))},g.prototype.render=b,c=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,S.__r=0,l=0},3538:function(t,e,n){"use strict";n.r(e),n.d(e,{useCallback:function(){return w},useContext:function(){return O},useDebugValue:function(){return S},useEffect:function(){return y},useErrorBoundary:function(){return E},useImperativeHandle:function(){return g},useLayoutEffect:function(){return m},useMemo:function(){return x},useReducer:function(){return h},useRef:function(){return b},useState:function(){return v}});var r,o,i,u=n(2687),c=0,a=[],f=u.options.__b,l=u.options.__r,s=u.options.diffed,p=u.options.__c,_=u.options.unmount;function d(t,e){u.options.__h&&u.options.__h(o,t,c||e),c=0;var n=o.__H||(o.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function v(t){return c=1,h(R,t)}function h(t,e,n){var i=d(r++,2);return i.t=t,i.__c||(i.__=[n?n(e):R(void 0,e),function(t){var e=i.t(i.__[0],t);i.__[0]!==e&&(i.__=[e,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function y(t,e){var n=d(r++,3);!u.options.__s&&N(n.__H,e)&&(n.__=t,n.__H=e,o.__H.__h.push(n))}function m(t,e){var n=d(r++,4);!u.options.__s&&N(n.__H,e)&&(n.__=t,n.__H=e,o.__h.push(n))}function b(t){return c=5,x((function(){return{current:t}}),[])}function g(t,e,n){c=6,m((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==n?n:n.concat(t))}function x(t,e){var n=d(r++,7);return N(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function w(t,e){return c=8,x((function(){return t}),e)}function O(t){var e=o.context[t.__c],n=d(r++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(o)),e.props.value):t.__}function S(t,e){u.options.useDebugValue&&u.options.useDebugValue(e?e(t):t)}function E(t){var e=d(r++,10),n=v();return e.__=t,o.componentDidCatch||(o.componentDidCatch=function(t){e.__&&e.__(t),n[1](t)}),[n[0],function(){n[1](void 0)}]}function C(){a.forEach((function(t){if(t.__P)try{t.__H.__h.forEach(k),t.__H.__h.forEach(j),t.__H.__h=[]}catch(e){t.__H.__h=[],u.options.__e(e,t.__v)}})),a=[]}u.options.__b=function(t){o=null,f&&f(t)},u.options.__r=function(t){l&&l(t),r=0;var e=(o=t.__c).__H;e&&(e.__h.forEach(k),e.__h.forEach(j),e.__h=[])},u.options.diffed=function(t){s&&s(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==a.push(e)&&i===u.options.requestAnimationFrame||((i=u.options.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(r),P&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);P&&(e=requestAnimationFrame(n))})(C)),o=null},u.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(k),t.__h=t.__h.filter((function(t){return!t.__||j(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],u.options.__e(n,t.__v)}})),p&&p(t,e)},u.options.unmount=function(t){_&&_(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(k)}catch(t){u.options.__e(t,e.__v)}};var P="function"==typeof requestAnimationFrame;function k(t){var e=o;"function"==typeof t.__c&&t.__c(),o=e}function j(t){var e=o;t.__c=t.__(),o=e}function N(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function R(t,e){return"function"==typeof e?e(t):e}},5731:function(t,e){"use strict";var n=Object.prototype,r=n.toString,o=n.hasOwnProperty,i="[object Object]",u="[object Array]";function c(t,e){return null!=t?t+"["+e+"]":e}e.x=function t(e,n,a){var f=r.call(e);if(void 0===a)if(f===i)a={};else{if(f!==u)return;a=[]}for(var l in e)if(o.call(e,l)){var s=e[l];if(null!=s)switch(r.call(s)){case u:case i:t(s,c(n,l),a);break;default:a[c(n,l)]=s}}return a}},8750:function(t,e,n){"use strict";function r(t,e){var n,r,o,i="";for(n in t)if(void 0!==(o=t[n]))if(Array.isArray(o))for(r=0;r<o.length;r++)i&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(o[r]);else i&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(o);return(e||"")+i}n.d(e,{c:function(){return r}})},8922:function(t,e){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,a=n?Symbol.for("react.provider"):60109,f=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,s=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,_=n?Symbol.for("react.suspense"):60113,d=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,m=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,g=n?Symbol.for("react.scope"):60119;function x(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case l:case s:case i:case c:case u:case _:return t;default:switch(t=t&&t.$$typeof){case f:case p:case h:case v:case a:return t;default:return e}}case o:return e}}}function w(t){return x(t)===s}e.AsyncMode=l,e.ConcurrentMode=s,e.ContextConsumer=f,e.ContextProvider=a,e.Element=r,e.ForwardRef=p,e.Fragment=i,e.Lazy=h,e.Memo=v,e.Portal=o,e.Profiler=c,e.StrictMode=u,e.Suspense=_,e.isAsyncMode=function(t){return w(t)||x(t)===l},e.isConcurrentMode=w,e.isContextConsumer=function(t){return x(t)===f},e.isContextProvider=function(t){return x(t)===a},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return x(t)===p},e.isFragment=function(t){return x(t)===i},e.isLazy=function(t){return x(t)===h},e.isMemo=function(t){return x(t)===v},e.isPortal=function(t){return x(t)===o},e.isProfiler=function(t){return x(t)===c},e.isStrictMode=function(t){return x(t)===u},e.isSuspense=function(t){return x(t)===_},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===s||t===c||t===u||t===_||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===h||t.$$typeof===v||t.$$typeof===a||t.$$typeof===f||t.$$typeof===p||t.$$typeof===m||t.$$typeof===b||t.$$typeof===g||t.$$typeof===y)},e.typeOf=x},3801:function(t,e,n){"use strict";t.exports=n(8922)},4223:function(t,e){"use strict";var n=60103,r=60106,o=60107,i=60108,u=60114,c=60109,a=60110,f=60112,l=60113,s=60120,p=60115,_=60116,d=60121,v=60122,h=60117,y=60129,m=60131;if("function"==typeof Symbol&&Symbol.for){var b=Symbol.for;n=b("react.element"),r=b("react.portal"),o=b("react.fragment"),i=b("react.strict_mode"),u=b("react.profiler"),c=b("react.provider"),a=b("react.context"),f=b("react.forward_ref"),l=b("react.suspense"),s=b("react.suspense_list"),p=b("react.memo"),_=b("react.lazy"),d=b("react.block"),v=b("react.server.block"),h=b("react.fundamental"),y=b("react.debug_trace_mode"),m=b("react.legacy_hidden")}function g(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case o:case u:case i:case l:case s:return t;default:switch(t=t&&t.$$typeof){case a:case f:case _:case p:case c:return t;default:return e}}case r:return e}}}e.isContextConsumer=function(t){return g(t)===a}},1637:function(t,e,n){"use strict";t.exports=n(4223)},373:function(t,e,n){"use strict";n.d(e,{E:function(){return o}});var r=n(211),o=n.n(r)().createContext(null)},1290:function(t,e,n){"use strict";var r=n(211),o=n.n(r),i=n(373),u=n(5053),c=n(999);e.Z=function(t){var e=t.store,n=t.context,a=t.children,f=(0,r.useMemo)((function(){var t=(0,u.X)(e);return{store:e,subscription:t}}),[e]),l=(0,r.useMemo)((function(){return e.getState()}),[e]);(0,c.L)((function(){var t=f.subscription;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),l!==e.getState()&&t.notifyNestedSubs(),function(){t.tryUnsubscribe(),t.onStateChange=null}}),[f,l]);var s=n||i.E;return o().createElement(s.Provider,{value:f},a)}},5642:function(t,e,n){"use strict";n.d(e,{Z:function(){return w}});var r=n(255),o=n(7921),i=n(7692),u=n.n(i),c=n(211),a=n.n(c),f=n(1637),l=n(5053),s=n(999),p=n(373),_=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],d=["reactReduxForwardedRef"],v=[],h=[null,null];function y(t,e){var n=t[1];return[e.payload,n+1]}function m(t,e,n){(0,s.L)((function(){return t.apply(void 0,e)}),n)}function b(t,e,n,r,o,i,u){t.current=r,e.current=o,n.current=!1,i.current&&(i.current=null,u())}function g(t,e,n,r,o,i,u,c,a,f){if(t){var l=!1,s=null,p=function(){if(!l){var t,n,p=e.getState();try{t=r(p,o.current)}catch(t){n=t,s=t}n||(s=null),t===i.current?u.current||a():(i.current=t,c.current=t,u.current=!0,f({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=p,n.trySubscribe(),p();return function(){if(l=!0,n.tryUnsubscribe(),n.onStateChange=null,s)throw s}}}var x=function(){return[null,0]};function w(t,e){void 0===e&&(e={});var n=e,i=n.getDisplayName,s=void 0===i?function(t){return"ConnectAdvanced("+t+")"}:i,w=n.methodName,O=void 0===w?"connectAdvanced":w,S=n.renderCountProp,E=void 0===S?void 0:S,C=n.shouldHandleStateChanges,P=void 0===C||C,k=n.storeKey,j=void 0===k?"store":k,N=(n.withRef,n.forwardRef),R=void 0!==N&&N,T=n.context,A=void 0===T?p.E:T,M=(0,o.Z)(n,_),D=A;return function(e){var n=e.displayName||e.name||"Component",i=s(n),p=(0,r.Z)({},M,{getDisplayName:s,methodName:O,renderCountProp:E,shouldHandleStateChanges:P,storeKey:j,displayName:i,wrappedComponentName:n,WrappedComponent:e}),_=M.pure;var w=_?c.useMemo:function(t){return t()};function S(n){var i=(0,c.useMemo)((function(){var t=n.reactReduxForwardedRef,e=(0,o.Z)(n,d);return[n.context,t,e]}),[n]),u=i[0],s=i[1],_=i[2],O=(0,c.useMemo)((function(){return u&&u.Consumer&&(0,f.isContextConsumer)(a().createElement(u.Consumer,null))?u:D}),[u,D]),S=(0,c.useContext)(O),E=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(S)&&Boolean(S.store);var C=E?n.store:S.store,k=(0,c.useMemo)((function(){return function(e){return t(e.dispatch,p)}(C)}),[C]),j=(0,c.useMemo)((function(){if(!P)return h;var t=(0,l.X)(C,E?null:S.subscription),e=t.notifyNestedSubs.bind(t);return[t,e]}),[C,E,S]),N=j[0],R=j[1],T=(0,c.useMemo)((function(){return E?S:(0,r.Z)({},S,{subscription:N})}),[E,S,N]),A=(0,c.useReducer)(y,v,x),M=A[0][0],U=A[1];if(M&&M.error)throw M.error;var F=(0,c.useRef)(),$=(0,c.useRef)(_),L=(0,c.useRef)(),I=(0,c.useRef)(!1),W=w((function(){return L.current&&_===$.current?L.current:k(C.getState(),_)}),[C,M,_]);m(b,[$,F,I,_,W,L,R]),m(g,[P,C,N,k,$,F,I,L,R,U],[C,N,k]);var Z=(0,c.useMemo)((function(){return a().createElement(e,(0,r.Z)({},W,{ref:s}))}),[s,e,W]);return(0,c.useMemo)((function(){return P?a().createElement(O.Provider,{value:T},Z):Z}),[O,Z,T])}var C=_?a().memo(S):S;if(C.WrappedComponent=e,C.displayName=S.displayName=i,R){var k=a().forwardRef((function(t,e){return a().createElement(C,(0,r.Z)({},t,{reactReduxForwardedRef:e}))}));return k.displayName=i,k.WrappedComponent=e,u()(k,e)}return u()(C,e)}}},1479:function(t,e,n){"use strict";var r=n(255),o=n(7921),i=n(5642),u=n(8588),c=n(2320),a=n(2004),f=n(4769),l=n(8164),s=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function p(t,e,n){for(var r=e.length-1;r>=0;r--){var o=e[r](t);if(o)return o}return function(e,r){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function _(t,e){return t===e}function d(t){var e=void 0===t?{}:t,n=e.connectHOC,d=void 0===n?i.Z:n,v=e.mapStateToPropsFactories,h=void 0===v?a.ZP:v,y=e.mapDispatchToPropsFactories,m=void 0===y?c.ZP:y,b=e.mergePropsFactories,g=void 0===b?f.ZP:b,x=e.selectorFactory,w=void 0===x?l.ZP:x;return function(t,e,n,i){void 0===i&&(i={});var c=i,a=c.pure,f=void 0===a||a,l=c.areStatesEqual,v=void 0===l?_:l,y=c.areOwnPropsEqual,b=void 0===y?u.Z:y,x=c.areStatePropsEqual,O=void 0===x?u.Z:x,S=c.areMergedPropsEqual,E=void 0===S?u.Z:S,C=(0,o.Z)(c,s),P=p(t,h,"mapStateToProps"),k=p(e,m,"mapDispatchToProps"),j=p(n,g,"mergeProps");return d(w,(0,r.Z)({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:P,initMapDispatchToProps:k,initMergeProps:j,pure:f,areStatesEqual:v,areOwnPropsEqual:b,areStatePropsEqual:O,areMergedPropsEqual:E},C))}}e.Z=d()},2320:function(t,e,n){"use strict";var r=n(7059),o=n(278);e.ZP=[function(t){return"function"==typeof t?(0,o.xv)(t,"mapDispatchToProps"):void 0},function(t){return t?void 0:(0,o.dX)((function(t){return{dispatch:t}}))},function(t){return t&&"object"==typeof t?(0,o.dX)((function(e){return(0,r.Z)(t,e)})):void 0}]},2004:function(t,e,n){"use strict";var r=n(278);e.ZP=[function(t){return"function"==typeof t?(0,r.xv)(t,"mapStateToProps"):void 0},function(t){return t?void 0:(0,r.dX)((function(){return{}}))}]},4769:function(t,e,n){"use strict";var r=n(255);function o(t,e,n){return(0,r.Z)({},n,t,e)}e.ZP=[function(t){return"function"==typeof t?function(t){return function(e,n){n.displayName;var r,o=n.pure,i=n.areMergedPropsEqual,u=!1;return function(e,n,c){var a=t(e,n,c);return u?o&&i(a,r)||(r=a):(u=!0,r=a),r}}}(t):void 0},function(t){return t?void 0:function(){return o}}]},8164:function(t,e,n){"use strict";n.d(e,{ZP:function(){return c}});var r=n(7921),o=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function i(t,e,n,r){return function(o,i){return n(t(o,i),e(r,i),i)}}function u(t,e,n,r,o){var i,u,c,a,f,l=o.areStatesEqual,s=o.areOwnPropsEqual,p=o.areStatePropsEqual,_=!1;function d(o,_){var d,v,h=!s(_,u),y=!l(o,i);return i=o,u=_,h&&y?(c=t(i,u),e.dependsOnOwnProps&&(a=e(r,u)),f=n(c,a,u)):h?(t.dependsOnOwnProps&&(c=t(i,u)),e.dependsOnOwnProps&&(a=e(r,u)),f=n(c,a,u)):y?(d=t(i,u),v=!p(d,c),c=d,v&&(f=n(c,a,u)),f):f}return function(o,l){return _?d(o,l):(c=t(i=o,u=l),a=e(r,u),f=n(c,a,u),_=!0,f)}}function c(t,e){var n=e.initMapStateToProps,c=e.initMapDispatchToProps,a=e.initMergeProps,f=(0,r.Z)(e,o),l=n(t,f),s=c(t,f),p=a(t,f);return(f.pure?u:i)(l,s,p,t,f)}},278:function(t,e,n){"use strict";function r(t){return function(e,n){var r=t(e,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function o(t){return null!==t.dependsOnOwnProps&&void 0!==t.dependsOnOwnProps?Boolean(t.dependsOnOwnProps):1!==t.length}function i(t,e){return function(e,n){n.displayName;var r=function(t,e){return r.dependsOnOwnProps?r.mapToProps(t,e):r.mapToProps(t)};return r.dependsOnOwnProps=!0,r.mapToProps=function(e,n){r.mapToProps=t,r.dependsOnOwnProps=o(t);var i=r(e,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=o(i),i=r(e,n)),i},r}}n.d(e,{dX:function(){return r},xv:function(){return i}})},1654:function(t,e,n){"use strict";n.d(e,{$j:function(){return o.Z},zt:function(){return r.Z}});var r=n(1290),o=(n(5642),n(373),n(1479));n(7518),n(8882),n(6271)},7518:function(t,e,n){"use strict";n(373),n(6271)},2830:function(t,e,n){"use strict";n(211),n(373)},8882:function(t,e,n){"use strict";n(211),n(2830),n(5053),n(999),n(373)},6271:function(t,e,n){"use strict";n(211),n(373),n(2830)},9309:function(t,e,n){"use strict";n.d(e,{$j:function(){return r.$j},zt:function(){return r.zt}});var r=n(1654),o=n(9523);(0,n(2935).F)(o.m)},5053:function(t,e,n){"use strict";n.d(e,{X:function(){return i}});var r=n(2935);var o={notify:function(){},get:function(){return[]}};function i(t,e){var n,i=o;function u(){a.onStateChange&&a.onStateChange()}function c(){var o,c,a;n||(n=e?e.addNestedSub(u):t.subscribe(u),o=(0,r.k)(),c=null,a=null,i={clear:function(){c=null,a=null},notify:function(){o((function(){for(var t=c;t;)t.callback(),t=t.next}))},get:function(){for(var t=[],e=c;e;)t.push(e),e=e.next;return t},subscribe:function(t){var e=!0,n=a={callback:t,next:null,prev:a};return n.prev?n.prev.next=n:c=n,function(){e&&null!==c&&(e=!1,n.next?n.next.prev=n.prev:a=n.prev,n.prev?n.prev.next=n.next:c=n.next)}}})}var a={addNestedSub:function(t){return c(),i.subscribe(t)},notifyNestedSubs:function(){i.notify()},handleChangeWrapper:u,isSubscribed:function(){return Boolean(n)},trySubscribe:c,tryUnsubscribe:function(){n&&(n(),n=void 0,i.clear(),i=o)},getListeners:function(){return i}};return a}},2935:function(t,e,n){"use strict";n.d(e,{F:function(){return o},k:function(){return i}});var r=function(t){t()},o=function(t){return r=t},i=function(){return r}},7059:function(t,e,n){"use strict";function r(t,e){var n={},r=function(r){var o=t[r];"function"==typeof o&&(n[r]=function(){return e(o.apply(void 0,arguments))})};for(var o in t)r(o);return n}n.d(e,{Z:function(){return r}})},9523:function(t,e,n){"use strict";n.d(e,{m:function(){return r.unstable_batchedUpdates}});var r=n(211)},8588:function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}function o(t,e){if(r(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(e,n[i])||!r(t[n[i]],e[n[i]]))return!1;return!0}n.d(e,{Z:function(){return o}})},999:function(t,e,n){"use strict";n.d(e,{L:function(){return o}});var r=n(211),o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect},835:function(t,e,n){"use strict";n.d(e,{MT:function(){return f},UY:function(){return l},md:function(){return p}});var r=n(8617);function o(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var i="function"==typeof Symbol&&Symbol.observable||"@@observable",u=function(){return Math.random().toString(36).substring(7).split("").join(".")},c={INIT:"@@redux/INIT"+u(),REPLACE:"@@redux/REPLACE"+u(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+u()}};function a(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function f(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(o(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(o(1));return n(f)(t,e)}if("function"!=typeof t)throw new Error(o(2));var u=t,l=e,s=[],p=s,_=!1;function d(){p===s&&(p=s.slice())}function v(){if(_)throw new Error(o(3));return l}function h(t){if("function"!=typeof t)throw new Error(o(4));if(_)throw new Error(o(5));var e=!0;return d(),p.push(t),function(){if(e){if(_)throw new Error(o(6));e=!1,d();var n=p.indexOf(t);p.splice(n,1),s=null}}}function y(t){if(!a(t))throw new Error(o(7));if(void 0===t.type)throw new Error(o(8));if(_)throw new Error(o(9));try{_=!0,l=u(l,t)}finally{_=!1}for(var e=s=p,n=0;n<e.length;n++){(0,e[n])()}return t}function m(t){if("function"!=typeof t)throw new Error(o(10));u=t,y({type:c.REPLACE})}function b(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(o(11));function n(){t.next&&t.next(v())}return n(),{unsubscribe:e(n)}}})[i]=function(){return this},t}return y({type:c.INIT}),(r={dispatch:y,subscribe:h,getState:v,replaceReducer:m})[i]=b,r}function l(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var i=e[r];0,"function"==typeof t[i]&&(n[i]=t[i])}var u,a=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:c.INIT}))throw new Error(o(12));if(void 0===n(void 0,{type:c.PROBE_UNKNOWN_ACTION()}))throw new Error(o(13))}))}(n)}catch(t){u=t}return function(t,e){if(void 0===t&&(t={}),u)throw u;for(var r=!1,i={},c=0;c<a.length;c++){var f=a[c],l=n[f],s=t[f],p=l(s,e);if(void 0===p){e&&e.type;throw new Error(o(14))}i[f]=p,r=r||p!==s}return(r=r||a.length!==Object.keys(t).length)?i:t}}function s(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function p(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),i=function(){throw new Error(o(15))},u={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map((function(t){return t(u)}));return i=s.apply(void 0,c)(n.dispatch),(0,r.Z)((0,r.Z)({},n),{},{dispatch:i})}}}},4274:function(t){"use strict";function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}t.exports=function(t){var n,r={};return e(r,t),(n=function(t){return function(e){return function(n){var o,i,u=r[n.type],c=e(n);if(u)for(o=0;o<u.length;o++)(i=u[o](n,t))&&t.dispatch(i);return c}}}).effects=r,n}},3191:function(t){"use strict";var e=256,n=[],r=window,o=Math.pow(e,6),i=Math.pow(2,52),u=2*i,c=255,a=Math.random;function f(t){var n,r=t.length,o=this,i=0,u=o.i=o.j=0,a=o.S=[];for(r||(t=[r++]);i<e;)a[i]=i++;for(i=0;i<e;i++)a[i]=a[u=c&u+t[i%r]+(n=a[i])],a[u]=n;(o.g=function(t){for(var n,r=0,i=o.i,u=o.j,a=o.S;t--;)n=a[i=c&i+1],r=r*e+a[c&(a[i]=a[u=c&u+n])+(a[u]=n)];return o.i=i,o.j=u,r})(e)}function l(t,e){var n,r=[],o=(typeof t)[0];if(e&&"o"==o)for(n in t)try{r.push(l(t[n],e-1))}catch(t){}return r.length?r:"s"==o?t:t+"\0"}function s(t,e){for(var n,r=t+"",o=0;o<r.length;)e[c&o]=c&(n^=19*e[c&o])+r.charCodeAt(o++);return _(e)}function p(t){try{return r.crypto.getRandomValues(t=new Uint8Array(e)),_(t)}catch(t){return[+new Date,r,r.navigator&&r.navigator.plugins,r.screen,_(n)]}}function _(t){return String.fromCharCode.apply(0,t)}t.exports=function(r,c){if(c&&!0===c.global)return c.global=!1,Math.random=t.exports(r,c),c.global=!0,Math.random;var a=c&&c.entropy||!1,d=[],v=(s(l(a?[r,_(n)]:0 in arguments?r:p(),3),d),new f(d));return s(_(v.S),n),function(){for(var t=v.g(6),n=o,r=0;t<i;)t=(t+r)*e,n*=e,r=v.g(1);for(;t>=u;)t/=2,n/=2,r>>>=1;return(t+r)/n}},t.exports.resetGlobal=function(){Math.random=a},s(Math.random(),n)},4553:function(t){var e=/<\/?([a-z][a-z0-9]*)\b[^>]*>?/gi;t.exports=function(t){return(t=t||"").replace(e,"").trim()}},9353:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});n(875);class r{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.size=0,this.ttl=e}has(t){return t in this.items}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(t){if(this.has(t)){const e=this.items[t];delete this.items[t],this.size--,null!==e.prev&&(e.prev.next=e.next),null!==e.next&&(e.next.prev=e.prev),this.first===e&&(this.first=e.next),this.last===e&&(this.last=e.prev)}return this}evict(){const t=this.first;return delete this.items[t.key],this.first=t.next,this.first.prev=null,this.size--,this}get(t){let e;if(this.has(t)){const n=this.items[t];this.ttl>0&&n.expiry<=(new Date).getTime()?this.delete(t):(e=n.value,this.set(t,e,!0))}return e}keys(){return Object.keys(this.items)}set(t,e){let n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r||this.has(t)){if(n=this.items[t],n.value=e,!1===r&&(n.expiry=this.ttl>0?(new Date).getTime()+this.ttl:this.ttl),this.last!==n){const t=this.last,e=n.next,r=n.prev;this.first===n&&(this.first=n.next),n.next=null,n.prev=this.last,t.next=n,null!==r&&(r.next=e),null!==e&&(e.prev=r)}}else this.max>0&&this.size===this.max&&this.evict(),n=this.items[t]={expiry:this.ttl>0?(new Date).getTime()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:e},1==++this.size?this.first=n:this.last.next=n;return this.last=n,this}}function o(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(isNaN(t)||t<0)throw new TypeError("Invalid max value");if(isNaN(e)||e<0)throw new TypeError("Invalid ttl value");return new r(t,e)}},2650:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:function(){return r}})},255:function(t,e,n){"use strict";function r(){return r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,{Z:function(){return r}})},8617:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(2650);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){(0,r.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},7921:function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}n.d(e,{Z:function(){return r}})}}]);
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.defaultVendors.js.LICENSE.txt b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.defaultVendors.js.LICENSE.txt new file mode 100644 index 00000000..21010121 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.defaultVendors.js.LICENSE.txt @@ -0,0 +1,17 @@ +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v17.0.2 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.js new file mode 100644 index 00000000..f7baf117 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.js @@ -0,0 +1 @@ +!function(){var e,t,n,r,o,i={9755:function(e,t,n){"use strict";n.d(t,{AG:function(){return d},Bk:function(){return o},LI:function(){return l},PP:function(){return f},Pz:function(){return u},TZ:function(){return s},W1:function(){return i},aP:function(){return w},bk:function(){return g},kQ:function(){return h},oy:function(){return c},rs:function(){return m},yb:function(){return p},zg:function(){return a}});var r=n(5736);const __=r.__,o="__NO_GROUP__",i="JetpackInstantSearchOptions",a="jetpack-instant-search__overlay",c="ASC",u="expanded",s="minimal",l="product",d=6e4,f="relevance",p=1e3,h=["newest","oldest",f,"price_asc","price_desc","rating_desc"],g=[u,s,l],w=new Map([[f,__("Relevance","jetpack-search-pkg")],["newest",__("Newest","jetpack-search-pkg")],["oldest",__("Oldest","jetpack-search-pkg")]]),m=new Map([["price_asc",__("Price: low to high","jetpack-search-pkg")],["price_desc",__("Price: high to low","jetpack-search-pkg")],["rating_desc",__("Rating","jetpack-search-pkg")]])},4184:function(e,t,n){"use strict";n.d(t,{Em:function(){return a},bS:function(){return i},vJ:function(){return c}});var r=n(9755);const o=new Map([["jetpack_search_color_theme","colorTheme"],["jetpack_search_enable_sort","enableSort"],["jetpack_search_highlight_color","highlightColor"],["jetpack_search_inf_scroll","enableInfScroll"],["jetpack_search_overlay_trigger","overlayTrigger"],["jetpack_search_show_powered_by","showPoweredBy"],["jetpack_search_result_format","resultFormat"]]);function i(){var e,t;return"function"==typeof(null===(e=window)||void 0===e||null===(t=e.wp)||void 0===t?void 0:t.customize)}function a(e){i()&&window.addEventListener("message",(t=>{var n;t.data&&t.target===window&&"jetpackSearchSectionOpen"===(null===(n=t.data)||void 0===n?void 0:n.key)&&"expanded"in t.data&&e(t.data.expanded)}))}function c(e){i()&&o.forEach(((t,n)=>{window.wp.customize(n,(n=>{n.bind((function(n){const o={[t]:n};window[r.W1].showResults=!0,window[r.W1].overlayOptions={...window[r.W1].overlayOptions,...o},e&&e(o)}))}))}))}},554:function(e,t,n){n.p=window.JetpackInstantSearchOptions.webpackPublicPath},5736:function(e){"use strict";e.exports=window.wp.i18n},5417:function(e){"use strict";e.exports=window.wp.jpI18nLoader}},a={};function c(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e](n,n.exports,c),n.exports}c.m=i,c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=function(e){return Promise.all(Object.keys(c.f).reduce((function(t,n){return c.f[n](e,t),t}),[]))},c.u=function(e){return{303:"jp-search.defaultVendors",613:"jp-search.chunk-main-payload"}[e]+".js?minify=false&ver="+{303:"668f0c6415f2f255b839",613:"02cd66cf353df7dd3a4a"}[e]},c.miniCssF=function(e){return"jp-search.chunk-main-payload.css?minify=false&ver=bb70b64f7ed44c5422d6"},function(){if(!c.miniCssF)throw new Error("MiniCSSWithRTLPlugin was loaded before MiniCSSExtractPlugin");var e;c.miniCssF=(e=c.miniCssF,function(t){var n="rtl"===document.dir,r=e(t);return n?r.replace(/\.css(?:$|\?)/,".rtl$&"):r})}(),c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e={},t="jetpack-search:",c.l=function(n,r,o,i){if(e[n])e[n].push(r);else{var a,u;if(void 0!==o)for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var d=s[l];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+o){a=d;break}}a||(u=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack",t+o),a.src=n),e[n]=[r];var f=function(t,r){a.onerror=a.onload=null,clearTimeout(p);var o=e[n];if(delete e[n],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((function(e){return e(r)})),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),u&&document.head.appendChild(a)}},n={613:0},c.f.wpI18n=function(e,t){n[e]?t.push(n[e]):0===n[e]&&t.push(n[e]=function(e){var t=c(5417);return t&&t.downloadI18n?t.downloadI18n("build/instant-search/"+c.u(e),"jetpack-search-pkg","plugin"):Promise.reject(new Error("I18n loader is not available. Check that WordPress is exporting wp.jpI18nLoader."))}(e).then((function(){n[e]=!1}),(function(t){n[e]=0,console.error("Failed to fetch i18n data: ",t)})))},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e}(),r=function(e){return new Promise((function(t,n){var r=c.miniCssF(e),o=c.p+r;if(function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var o=(a=n[r]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(o===e||o===t))return a}var i=document.getElementsByTagName("style");for(r=0;r<i.length;r++){var a;if((o=(a=i[r]).getAttribute("data-href"))===e||o===t)return a}}(r,o))return t();!function(e,t,n,r){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(i){if(o.onerror=o.onload=null,"load"===i.type)n();else{var a=i&&("load"===i.type?"missing":i.type),c=i&&i.target&&i.target.href||t,u=new Error("Loading CSS chunk "+e+" failed.\n("+c+")");u.code="CSS_CHUNK_LOAD_FAILED",u.type=a,u.request=c,o.parentNode.removeChild(o),r(u)}},o.href=t,document.head.appendChild(o)}(e,o,t,n)}))},o={942:0},c.f.miniCss=function(e,t){o[e]?t.push(o[e]):0!==o[e]&&{613:1}[e]&&t.push(o[e]=r(e).then((function(){o[e]=0}),(function(t){throw delete o[e],t})))},function(){var e={942:0};c.f.j=function(t,n){var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,o){r=e[t]=[n,o]}));n.push(r[2]=o);var i=c.p+c.u(t),a=new Error;c.l(i,(function(n){if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=function(t,n){var r,o,i=n[0],a=n[1],u=n[2],s=0;if(i.some((function(t){return 0!==e[t]}))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(u)u(c)}for(t&&t(n);s<i.length;s++)o=i[s],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunkjetpack_search=self.webpackChunkjetpack_search||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),function(){"use strict";c(554);var e=c(9755),t=c(4184);function n(){Promise.all([c.e(303),c.e(613)]).then(c.bind(c,1559)).then((e=>e.initialize()))}window[e.W1]&&(0,t.vJ)(),"loading"!==document.readyState?n():document.addEventListener("DOMContentLoaded",n)}()}();
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/compatibility/jetpack.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/compatibility/jetpack.php new file mode 100644 index 00000000..bb626eed --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/compatibility/jetpack.php @@ -0,0 +1,29 @@ +<?php +/** + * Jetpack compatibility + * + * @package automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search\Compatibility\Jetpack; + +use Automattic\Jetpack\Search\Plan; +use Jetpack; + +/** + * Override the condition to show Search submenu when Jetpack plugin exists. + */ +function should_show_jetpack_search_submenu() { + if ( ! current_user_can( 'manage_options' ) ) { + return false; + } + + // If site is in Offline Mode or not connected yet. + if ( ! Jetpack::is_active_and_not_offline_mode() ) { + return false; + } + + return ( new Plan() )->ever_supported_search(); +} + +add_filter( 'jetpack_search_should_add_search_submenu', __NAMESPACE__ . '\should_show_jetpack_search_submenu' ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-cli.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-cli.php new file mode 100644 index 00000000..78fec3d4 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-cli.php @@ -0,0 +1,70 @@ +<?php +/** + * CLI class exposed by WPCLI + * + * @package automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search; + +use \WP_CLI; +use \WP_CLI_Command; +use \WP_Error; + +if ( ! class_exists( 'WP_CLI_Command' ) ) { + return; +} + +/** + * Provide functionality by WPCLI. + */ +class CLI extends WP_CLI_Command { + /** + * Auto config instant search, including set result format, set up overlay widgets and add a search input to the home page thru widgets or blocks. + * + * ## EXAMPLES + * + * wp jetpack-search auto_config user_login + * + * wp jetpack-search auto_config user_id + * + * @param array $args - Args passsed in. + */ + public function auto_config( $args ) { + try { + if ( empty( $args ) ) { + WP_CLI::error( 'A user login or ID is required.' ); + } + + // Some functions may require admin capabilities to run. + $ret = $this->set_user( $args[0] ); + if ( is_wp_error( $ret ) ) { + WP_CLI::error( $ret->get_error_message() ); + } + + WP_CLI::line( 'Running as user ' . $ret->user_login . '…' ); + $blog_id = Helper::get_wpcom_site_id(); + Instant_Search::instance( $blog_id )->auto_config_search(); + WP_CLI::success( 'Auto config success!' ); + } catch ( \Exception $e ) { + WP_CLI::error( $e->getMessage() ); + } + } + + /** + * Set current user by ID or login + * + * @param string|int $user User ID or login. + */ + protected function set_user( $user ) { + $get_user_by = 'login'; + if ( filter_var( $user, FILTER_VALIDATE_INT ) > 0 ) { + $get_user_by = 'ID'; + } + $user_info = get_user_by( $get_user_by, (string) $user ); + if ( ! $user_info ) { + return new WP_Error( 'user_not_found', "Could not find user '${user}' by ${get_user_by}." ); + } + return wp_set_current_user( $user_info->ID ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-helper.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-helper.php index f7f85591..d45d0175 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-helper.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-helper.php @@ -7,7 +7,7 @@ namespace Automattic\Jetpack\Search; -use GP_Locales; // TODO: Migrate this to the package, or find an alternative. +use GP_Locales; use Jetpack; // TODO: Remove this once migrated. /** @@ -348,8 +348,8 @@ class Helper { return false; } - // WordPress search doesn't use nonces. - // phpcs:disable WordPress.Security.NonceVerification.Recommended + // phpcs:disable WordPress.Security.NonceVerification.Recommended -- WordPress search doesn't use nonces. + // phpcs:disable WordPress.Security.ValidatedSanitizedInput -- Sanitization happens at the end. if ( empty( $_GET['post_type'] ) ) { $post_types_from_query = array(); } elseif ( is_array( $_GET['post_type'] ) ) { @@ -357,9 +357,9 @@ class Helper { } else { $post_types_from_query = (array) explode( ',', $_GET['post_type'] ); } - // phpcs:enable WordPress.Security.NonceVerification.Recommended + // phpcs:enable WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput - $post_types_from_query = array_map( 'trim', $post_types_from_query ); + $post_types_from_query = array_map( 'sanitize_key', $post_types_from_query ); $diff_query = self::array_diff( (array) $post_types, $post_types_from_query ); @@ -650,7 +650,7 @@ class Helper { public static function are_filters_by_widget_disabled() { /** * Allows developers to disable filters being set by widget, in favor of manually - * setting filters via `Jetpack_Search::set_filters()`. + * setting filters via `Classic_Search::set_filters()`. * * @module search * @@ -692,14 +692,9 @@ class Helper { * @return bool */ public static function is_valid_locale( $locale ) { - // TODO: Replace JETPACK__GLOTPRESS_LOCALES_PATH. if ( ! class_exists( 'GP_Locales' ) ) { - if ( defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) && file_exists( JETPACK__GLOTPRESS_LOCALES_PATH ) ) { - require JETPACK__GLOTPRESS_LOCALES_PATH; - } else { - // Assume locale to be valid if we can't check with GlotPress. - return true; - } + // Assume locale to be valid if we can't check with GlotPress. + return true; } return false !== GP_Locales::by_field( 'wp_locale', $locale ); } @@ -712,11 +707,9 @@ class Helper { * @return string $script_version Version number. */ public static function get_asset_version( $file ) { - // TODO: Replace Jetpack:: invocation. - // TODO: Replace JETPACK__PLUGIN_DIR and JETPACK__VERSION. - return Jetpack::is_development_version() && file_exists( JETPACK__PLUGIN_DIR . $file ) - ? filemtime( JETPACK__PLUGIN_DIR . $file ) - : JETPACK__VERSION; + return Package::is_development_version() && file_exists( Package::get_installed_path() . $file ) + ? filemtime( Package::get_installed_path() . $file ) + : Package::VERSION; } /** @@ -861,11 +854,9 @@ class Helper { 'homeUrl' => home_url(), 'locale' => str_replace( '_', '-', self::is_valid_locale( get_locale() ) ? get_locale() : 'en_US' ), 'postsPerPage' => $posts_per_page, - 'siteId' => class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'get_option' ) ? Jetpack::get_option( 'id' ) : get_current_blog_id(), + 'siteId' => self::get_wpcom_site_id(), 'postTypes' => $post_type_labels, - // TODO: Enable this once instant search build pipeline has been moved to the Search package. - // 'webpackPublicPath' => plugins_url( '/build/instant-search/', __DIR__ ). - 'webpackPublicPath' => plugins_url( '_inc/build/instant-search/', JETPACK__PLUGIN_FILE ), + 'webpackPublicPath' => plugins_url( '/build/instant-search/', __DIR__ ), 'isPhotonEnabled' => ( $is_wpcom || $is_jetpack_photon_enabled ) && ! $is_private_site, // config values related to private site support. @@ -905,4 +896,41 @@ class Helper { </div> <?php } + + /** + * Gets all of the active plugins via site options. + * Forked from Jetpack::get_active_plugins from the Jetpack plugin. + * + * @return string[] + */ + public static function get_active_plugins() { + // active_plugins plugins as values. + $active_plugins = (array) get_option( 'active_plugins', array() ); + + // active_sitewide_plugins stores plugins as keys. + if ( is_multisite() ) { + $network_plugins = array_keys( get_site_option( 'active_sitewide_plugins', array() ) ); + if ( $network_plugins ) { + $active_plugins = array_merge( $active_plugins, $network_plugins ); + } + } + + sort( $active_plugins ); + return array_unique( $active_plugins ); + } + + /** + * Get the current site's WordPress.com ID. + * + * @return int Blog ID. + */ + public static function get_wpcom_site_id() { + // Returns local blog ID for a multi-site network. + if ( defined( 'IS_WPCOM' ) && constant( 'IS_WPCOM' ) ) { + return \get_current_blog_id(); + } + + // Returns cache site ID. + return \Jetpack_Options::get_option( 'id' ); + } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-module-control.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-module-control.php index ea97b03c..87e76960 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-module-control.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-module-control.php @@ -7,8 +7,7 @@ namespace Automattic\Jetpack\Search; -use Automattic\Jetpack\Status; -use Jetpack_Options; +use Automattic\Jetpack\Modules; use WP_Error; /** @@ -35,7 +34,15 @@ class Module_Control { * @param Plan|null $plan - Plan object. */ public function __construct( $plan = null ) { - $this->plan = is_null( $plan ) ? new Plan() : $plan; + $this->plan = $plan === null ? new Plan() : $plan; + if ( ! did_action( 'jetpack_search_module_control_initialized' ) ) { + add_filter( 'jetpack_get_available_standalone_modules', array( $this, 'search_filter_available_modules' ), 10, 1 ); + + /** + * Fires when the Automattic\Jetpack\Search\Module_Control is initialized for the first time. + */ + do_action( 'jetpack_search_module_control_initialized' ); + } } /** @@ -44,7 +51,7 @@ class Module_Control { * @return bool */ public function is_active() { - return in_array( self::JETPACK_SEARCH_MODULE_SLUG, $this->get_active_modules(), true ); + return ( new Modules() )->is_active( self::JETPACK_SEARCH_MODULE_SLUG ); } /** @@ -60,94 +67,18 @@ class Module_Control { * Activiate Search module */ public function activate() { - /** - * Fires before a module is activated. - * - * @since 2.6.0 - * - * @param string $module Module slug. - * @param bool $exit Should we exit after the module has been activated. Default to true. - * @param bool $redirect Should the user be redirected after module activation? Default to true. - */ - do_action( 'jetpack_pre_activate_module', self::JETPACK_SEARCH_MODULE_SLUG ); - - // If it's already active, then don't do it again. - if ( $this->is_active() ) { - return true; - } - // Not available for offline mode. - $is_offline_mode = ( new Status() )->is_offline_mode(); - if ( $is_offline_mode ) { - return new WP_Error( 'offline_mode', __( 'Search module can not be activated in offline mode.', 'jetpack-search-pkg' ) ); - } - // Return false if no plan supports search. if ( ! $this->plan->supports_search() ) { return new WP_Error( 'not_supported', __( 'Your plan does not support Jetpack Search.', 'jetpack-search-pkg' ) ); } - $active_modules = $this->get_active_modules(); - $active_modules[] = self::JETPACK_SEARCH_MODULE_SLUG; - - $success = Jetpack_Options::update_option( self::JETPACK_ACTIVE_MODULES_OPTION_KEY, $active_modules ); - - /** - * Fired after a module has been deactivated. - * - * @since 4.2.0 - * - * @param string $module Module slug. - * @param boolean $success whether the module was deactivated. - */ - do_action( 'jetpack_activate_module', self::JETPACK_SEARCH_MODULE_SLUG, $success ); - /** - * Fires when a module is deactivated. - * The dynamic part of the filter, $module, is the module slug. - * - * @since 1.9.0 - * - * @param string $module Module slug. - */ - do_action( 'jetpack_activate_module_' . self::JETPACK_SEARCH_MODULE_SLUG ); - - return $success; + return ( new Modules() )->activate( self::JETPACK_SEARCH_MODULE_SLUG, false, false ); } /** * Deactiviate Search module */ public function deactivate() { - /** - * Fires when a module is deactivated. - * - * @since 1.9.0 - * - * @param string $module Module slug. - */ - do_action( 'jetpack_pre_deactivate_module', self::JETPACK_SEARCH_MODULE_SLUG ); - - $active_modules = $this->get_active_modules(); - $active_modules = array_values( array_diff( $active_modules, array( self::JETPACK_SEARCH_MODULE_SLUG ) ) ); - - $success = Jetpack_Options::update_option( self::JETPACK_ACTIVE_MODULES_OPTION_KEY, $active_modules ); - - /** - * Fired after a module has been deactivated. - * - * @since 4.2.0 - * - * @param string $module Module slug. - * @param boolean $success whether the module was deactivated. - */ - do_action( 'jetpack_deactivate_module', self::JETPACK_SEARCH_MODULE_SLUG, $success ); - /** - * Fires when a module is deactivated. - * The dynamic part of the filter, $module, is the module slug. - * - * @since 1.9.0 - * - * @param string $module Module slug. - */ - do_action( 'jetpack_deactivate_module_' . self::JETPACK_SEARCH_MODULE_SLUG ); + $success = ( new Modules() )->deactivate( self::JETPACK_SEARCH_MODULE_SLUG ); $this->disable_instant_search(); @@ -177,6 +108,9 @@ class Module_Control { if ( ! $this->is_active() ) { return new WP_Error( 'search_module_inactive', __( 'Search module needs to be activated before enabling instant search.', 'jetpack-search-pkg' ) ); } + if ( ! $this->plan->supports_instant_search() ) { + return new WP_Error( 'not_supported', __( 'Your plan does not support Instant Search.', 'jetpack-search-pkg' ) ); + } return update_option( self::SEARCH_MODULE_INSTANT_SEARCH_OPTION_KEY, true ); } @@ -191,27 +125,27 @@ class Module_Control { /** * Get a list of activated modules as an array of module slugs. + * + * @deprecated 0.12.3 + * @return Array $active_modules */ public function get_active_modules() { - $active_modules = Jetpack_Options::get_option( self::JETPACK_ACTIVE_MODULES_OPTION_KEY ); + _deprecated_function( + __METHOD__, + 'jetpack-search-0.12.3', + 'Automattic\\Jetpack\\Modules\\get_active' + ); - if ( ! is_array( $active_modules ) ) { - $active_modules = array(); - } - - /** - * Allow filtering of the active modules. - * - * Gives theme and plugin developers the power to alter the modules that - * are activated on the fly. - * - * @since 5.8.0 - * - * @param array $active Array of active module slugs. - */ - $active_modules = apply_filters( 'jetpack_active_modules', $active_modules ); - - return array_unique( $active_modules ); + return ( new Modules() )->get_active(); } + /** + * Adds search to the list of available modules + * + * @param array $modules The available modules. + * @return array + */ + public function search_filter_available_modules( $modules ) { + return array_merge( array( self::JETPACK_SEARCH_MODULE_SLUG ), $modules ); + } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-package.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-package.php new file mode 100644 index 00000000..18e616ea --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-package.php @@ -0,0 +1,62 @@ +<?php +/** + * Search package information. + * + * @package automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search; + +/** + * Search package general information + */ +class Package { + const VERSION = '0.14.2'; + const SLUG = 'search'; + + /** + * The path where package is installed. + * + * @var string + */ + protected static $installed_path; + + /** + * Adds the package slug and version to the package version tracker's data. + * + * @param array $package_versions The package version array. + * + * @return array The packge version array. + */ + public static function send_version_to_tracker( $package_versions ) { + // Multiple versions could co-exist, we want to send the version which is in use. + // `jetpack-autoloader` would load classes from the latest package, so we send the latest version here. + if ( empty( $package_versions[ self::SLUG ] ) || version_compare( $package_versions[ self::SLUG ], self::VERSION, '<' ) ) { + $package_versions[ self::SLUG ] = self::VERSION; + } + return $package_versions; + } + + /** + * Whether Jetpack Search Package's version maps to a public release, or a development version. + */ + public static function is_development_version() { + return (bool) apply_filters( + 'jetpack_search_is_development_version', + ! preg_match( '/^\d+(\.\d+)+$/', self::VERSION ) + ); + } + + /** + * Return the path where the package is installed with trailing slash. + * It's important not to use a constant, as there could be multiple versions of search package installed. + * + * @return string + */ + public static function get_installed_path() { + if ( static::$installed_path === null ) { + static::$installed_path = dirname( __DIR__ ) . DIRECTORY_SEPARATOR; + } + return apply_filters( 'jetpack_search_installed_path', static::$installed_path ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-plan.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-plan.php index 41134260..47486530 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-plan.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-plan.php @@ -43,9 +43,12 @@ class Plan { */ public function get_plan_info_from_wpcom() { $blog_id = Jetpack_Options::get_option( 'id' ); - $response = Client::wpcom_json_api_request_as_user( + $response = Client::wpcom_json_api_request_as_blog( '/sites/' . $blog_id . '/jetpack-search/plan', - '2' + '2', + array(), + null, + 'wpcom' ); // store plan in options. @@ -84,7 +87,7 @@ class Plan { */ public function supports_instant_search() { $plan_info = $this->get_plan_info(); - return isset( $plan_info['supports_instant_search'] ) && $plan_info['supports_instant_search']; + return ( isset( $plan_info['supports_instant_search'] ) && $plan_info['supports_instant_search'] ) || $this->has_jetpack_search_product(); } /** @@ -92,7 +95,7 @@ class Plan { */ public function supports_search() { $plan_info = $this->get_plan_info(); - return isset( $plan_info['supports_search'] ) && $plan_info['supports_search']; + return ( isset( $plan_info['supports_search'] ) && $plan_info['supports_search'] ) || $this->has_jetpack_search_product(); } /** @@ -114,27 +117,42 @@ class Plan { * Update `has_jetpack_search_product` regarding the plan information * * @param array|WP_Error $response - Resopnse from WPCOM. + * @return bool - true on success, false on failure. */ public function update_search_plan_info( $response ) { if ( is_wp_error( $response ) ) { - return null; + return false; } $body = json_decode( wp_remote_retrieve_body( $response ), true ); $status_code = wp_remote_retrieve_response_code( $response ); - if ( 200 !== $status_code || ! isset( $body['supports_instant_search'] ) ) { - return null; + if ( 200 !== $status_code ) { + return false; + } + + return $this->set_plan_options( $body ); + } + + /** + * Set plan info to options table + * + * @param array $plan_info - the decoded plan info array. + */ + public function set_plan_options( $plan_info ) { + if ( ! isset( $plan_info['supports_instant_search'] ) ) { + return false; } // set option whether has Jetpack Search plan for capability reason. - if ( get_option( 'has_jetpack_search_product' ) !== (bool) $body['supports_instant_search'] ) { - update_option( 'has_jetpack_search_product', (bool) $body['supports_instant_search'] ); + if ( get_option( 'has_jetpack_search_product' ) !== (bool) $plan_info['supports_instant_search'] ) { + update_option( 'has_jetpack_search_product', (bool) $plan_info['supports_instant_search'] ); } // We use this option to determine the visibility of search submenu. // If the site ever had search subscription, then we record it and show the menu after. - if ( $body['supports_instant_search'] ) { + if ( $plan_info['supports_instant_search'] ) { update_option( self::JETPACK_SEARCH_EVER_SUPPORTED_SEARCH, true, false ); } - update_option( self::JETPACK_SEARCH_PLAN_INFO_OPTION_KEY, $body ); + update_option( self::JETPACK_SEARCH_PLAN_INFO_OPTION_KEY, $plan_info ); + return true; } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-product.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-product.php new file mode 100644 index 00000000..129b03ad --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-product.php @@ -0,0 +1,125 @@ +<?php +/** + * Class to fetch Search product pricing + * + * @package automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search; + +use Automattic\Jetpack\Constants; +use WP_Error; + +/** + * Class to fetch Search product pricing + * + * @package Automattic\Jetpack\Search + */ +class Product { + const DEFAULT_PROMOTED_PRODUCT = 'jetpack_search'; + const DEFAULT_TIER_INFO = array( + 'currency_code' => 'USD', + 'discount_price' => 0, + 'full_price' => 0, + ); + + /** + * Gets information about the currently promoted search product. + * + * @return object A object of the current search product being promoted if the request was successful, or a WP_Error otherwise. + */ + public static function get_promoted_product() { + $search_products = static::get_products(); + if ( ! is_array( $search_products ) || ! isset( $search_products[ self::DEFAULT_PROMOTED_PRODUCT ] ) ) { + return new WP_Error( 500, __( 'error fetching products', 'jetpack-search-pkg' ) ); + } + return $search_products[ self::DEFAULT_PROMOTED_PRODUCT ]; + } + + /** + * Get search product tier for the site + * + * @param int $record_count The number of record to estimate the tier. + */ + public static function get_site_tier_pricing( $record_count = 0 ) { + $product = static::get_promoted_product(); + if ( is_wp_error( $product ) || ! isset( $product['price_tier_list'] ) ) { + return static::DEFAULT_TIER_INFO; + } + $price_tier_list = $product['price_tier_list']; + array_multisort( array_column( $price_tier_list, 'maximum_units' ), SORT_ASC, $price_tier_list ); + + foreach ( $product['price_tier_list'] as $price_tier ) { + if ( $record_count <= $price_tier['maximum_units'] ) { + break; + } + } + + // minimum_price and maximum_price are integers. + $minimum_price = $price_tier['minimum_price'] / 100; + $discount_price = $minimum_price; + if ( isset( $product['sale_coupon']['discount'] ) ) { + $discount_price = static::get_discount_price( $minimum_price, $product['sale_coupon'] ); + } + + // 1. Flat fee in the same tier, so for search, `minimum_price == maximum_price`. + // 2. `maximum_units` is empty on the highest tier, so the logic displays the highest or the highest matching tier. + return array( + 'currency_code' => $product['currency_code'], + 'discount_price' => $discount_price, + 'full_price' => $minimum_price, + 'minimum_units' => $price_tier['minimum_units'], + 'maximum_units' => $price_tier['maximum_units'], + 'estimated_count' => $record_count, + ); + } + + /** + * Get all search products + */ + public static function get_products() { + $search_products = wp_cache_get( 'search_products', Package::SLUG ); + if ( false !== $search_products ) { + return $search_products; + } + $request_url = Constants::get_constant( 'JETPACK__WPCOM_JSON_API_BASE' ) . '/rest/v1.1/products?locale=' . get_user_locale() . '&type=jetpack'; + $wpcom_response = wp_remote_get( esc_url_raw( $request_url ) ); + $response_code = wp_remote_retrieve_response_code( $wpcom_response ); + if ( 200 !== $response_code ) { + return new WP_Error( $response_code, __( 'error fetching products', 'jetpack-search-pkg' ) ); + } + $products = json_decode( wp_remote_retrieve_body( $wpcom_response ), true ); + $search_products = array_filter( + $products, + function ( $product, $key ) { + return 0 === strpos( 'jetpack_search', $key ); + }, + ARRAY_FILTER_USE_BOTH + ); + // We don't want to cache error response for too long. + $time_to_cache = ! empty( $search_products ) ? DAY_IN_SECONDS : 5 * MINUTES_IN_SECONDS; + wp_cache_set( 'search_products', $search_products, Package::SLUG, $time_to_cache ); + return $search_products; + } + + /** + * Return discount price + * + * @param decimal $full_price Full price. + * @param array $sale_coupon Sale coupon. + */ + protected static function get_discount_price( $full_price, $sale_coupon ) { + $discount_price = $full_price; + if ( isset( $sale_coupon['discount'] ) ) { + $coupon_start_date = strtotime( $sale_coupon['start_date'] ); + $coupon_expires = strtotime( $sale_coupon['expires'] ); + if ( $coupon_start_date <= time() && $coupon_expires > time() ) { + $discount = intval( $sale_coupon['discount'] ); + $discount = $discount > 0 && $discount <= 100 ? $discount : 0; + $discount_price *= 1 - $discount / 100; + } + } + return $discount_price; + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-rest-controller.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-rest-controller.php index 209e989e..02292ffe 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-rest-controller.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-rest-controller.php @@ -9,6 +9,7 @@ namespace Automattic\Jetpack\Search; use Automattic\Jetpack\Connection\Client; +use Automattic\Jetpack\Modules; use Jetpack_Options; use WP_Error; use WP_REST_Request; @@ -37,10 +38,12 @@ class REST_Controller { * * @param bool $is_wpcom - Whether it's run on WPCOM. * @param Module_Control|null $module_control - Module_Control object if any. + * @param Plan|null $plan - Plan object if any. */ - public function __construct( $is_wpcom = false, $module_control = null ) { + public function __construct( $is_wpcom = false, $module_control = null, $plan = null ) { $this->is_wpcom = $is_wpcom; - $this->search_module = is_null( $module_control ) ? new Module_Control() : $module_control; + $this->search_module = $module_control === null ? new Module_Control() : $module_control; + $this->plan = $plan === null ? new Plan() : $plan; } /** @@ -56,7 +59,7 @@ class REST_Controller { array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_search_plan' ), - 'permission_callback' => array( $this, 'search_permissions_callback' ), + 'permission_callback' => array( $this, 'require_admin_privilege_callback' ), ) ); register_rest_route( @@ -65,7 +68,7 @@ class REST_Controller { array( 'methods' => WP_REST_Server::EDITABLE, 'callback' => array( $this, 'update_settings' ), - 'permission_callback' => array( $this, 'search_permissions_callback' ), + 'permission_callback' => array( $this, 'require_admin_privilege_callback' ), ) ); register_rest_route( @@ -74,7 +77,16 @@ class REST_Controller { array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_settings' ), - 'permission_callback' => array( $this, 'search_permissions_callback' ), + 'permission_callback' => array( $this, 'require_admin_privilege_callback' ), + ) + ); + register_rest_route( + 'jetpack/v4', + '/search/stats', + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_stats' ), + 'permission_callback' => array( $this, 'require_admin_privilege_callback' ), ) ); register_rest_route( @@ -86,6 +98,33 @@ class REST_Controller { 'permission_callback' => 'is_user_logged_in', ) ); + register_rest_route( + 'jetpack/v4', + '/search/plan/activate', + array( + 'methods' => WP_REST_Server::EDITABLE, + 'callback' => array( $this, 'activate_plan' ), + 'permission_callback' => array( $this, 'require_admin_privilege_callback' ), + ) + ); + register_rest_route( + 'jetpack/v4', + '/search/plan/deactivate', + array( + 'methods' => WP_REST_Server::EDITABLE, + 'callback' => array( $this, 'deactivate_plan' ), + 'permission_callback' => array( $this, 'require_admin_privilege_callback' ), + ) + ); + register_rest_route( + 'jetpack/v4', + '/search/pricing', + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => array( $this, 'product_pricing' ), + 'permission_callback' => 'is_user_logged_in', + ) + ); } /** @@ -93,7 +132,7 @@ class REST_Controller { * * @return bool|WP_Error True if a blog token was used to sign the request, WP_Error otherwise. */ - public function search_permissions_callback() { + public function require_admin_privilege_callback() { if ( current_user_can( 'manage_options' ) ) { return true; } @@ -139,14 +178,14 @@ class REST_Controller { } $errors = array(); - if ( ! is_null( $module_active ) ) { - $module_active_updated = $this->search_module->update_status( $module_active ); + if ( $module_active !== null ) { + $module_active_updated = ( new Modules() )->update_status( Package::SLUG, $module_active, false, false ); if ( is_wp_error( $module_active_updated ) ) { $errors['module_active'] = $module_active_updated; } } - if ( ! is_null( $instant_search_enabled ) ) { + if ( $instant_search_enabled !== null ) { $instant_search_enabled_updated = $this->search_module->update_instant_search_status( $instant_search_enabled ); if ( is_wp_error( $instant_search_enabled_updated ) ) { $errors['instant_search_enabled'] = $instant_search_enabled_updated; @@ -168,7 +207,7 @@ class REST_Controller { ); } - return $this->get_settings(); + return rest_ensure_response( $this->get_settings() ); } /** @@ -178,7 +217,7 @@ class REST_Controller { * @param boolean $instant_search_enabled - Instant Search status. */ protected function validate_search_settings( $module_active, $instant_search_enabled ) { - if ( ( true === $instant_search_enabled && false === $module_active ) || ( is_null( $module_active ) && is_null( $instant_search_enabled ) ) ) { + if ( ( true === $instant_search_enabled && false === $module_active ) || ( $module_active === null && $instant_search_enabled === null ) ) { return new WP_Error( 'rest_invalid_arguments', esc_html__( 'The arguments passed in are invalid.', 'jetpack-search-pkg' ), @@ -192,13 +231,25 @@ class REST_Controller { * GET `jetpack/v4/search/settings` */ public function get_settings() { - return array( - 'module_active' => $this->search_module->is_active(), - 'instant_search_enabled' => $this->search_module->is_instant_search_enabled(), + return rest_ensure_response( + array( + 'module_active' => $this->search_module->is_active(), + 'instant_search_enabled' => $this->search_module->is_instant_search_enabled(), + ) ); } /** + * Proxy the request to WPCOM and return the response. + * + * GET `jetpack/v4/search/stats` + */ + public function get_stats() { + $response = ( new Stats() )->get_stats_from_wpcom(); + return $this->make_proper_response( $response ); + } + + /** * Search Endpoint for private sites. * * GET `jetpack/v4/search` @@ -212,14 +263,94 @@ class REST_Controller { $request->get_query_params(), sprintf( '/sites/%d/search', absint( $blog_id ) ) ); - $response = Client::wpcom_json_api_request_as_user( $path, '1.3', array(), null, 'rest' ); - return $this->make_proper_response( $response ); + $response = Client::wpcom_json_api_request_as_blog( $path, '1.3', array(), null, 'rest' ); + return rest_ensure_response( $this->make_proper_response( $response ) ); + } + + /** + * Activate plan: activate the search module, instant search and do initial configuration. + * Typically called from WPCOM. + * + * POST `jetpack/v4/search/plan/activate` + * + * @param WP_REST_Request $request - REST request. + */ + public function activate_plan( $request ) { + $default_options = array( + 'search_plan_info' => null, + 'enable_search' => true, + 'enable_instant_search' => true, + 'auto_config_search' => true, + ); + $payload = $request->get_json_params(); + $payload = wp_parse_args( $payload, $default_options ); + + // Update plan data, plan info is in the request body. + // We do this to avoid another call to WPCOM and reduce latency. + if ( $payload['search_plan_info'] === null || ! $this->plan->set_plan_options( $payload['search_plan_info'] ) ) { + $this->plan->get_plan_info_from_wpcom(); + } + + // Enable search module by default, unless `enable_search` is explicitly set to boolean `false`. + if ( false !== $payload['enable_search'] ) { + // Eligibility is checked in `activate` function. + $ret = $this->search_module->activate(); + if ( is_wp_error( $ret ) ) { + return $ret; + } + } + + // Enable instant search by default, unless `enable_instant_search` is explicitly set to boolean `false`. + if ( false !== $payload['enable_instant_search'] ) { + // Eligibility is checked in `enable_instant_search` function. + $ret = $this->search_module->enable_instant_search(); + if ( is_wp_error( $ret ) ) { + return $ret; + } + } + + // Automatically configure necessary settings for instant search, unless `auto_config_search` is explicitly set to boolean `false`. + if ( false !== $payload['auto_config_search'] ) { + Instant_Search::instance( $this->get_blog_id() )->auto_config_search(); + } + + return rest_ensure_response( + array( + 'code' => 'success', + ) + ); + } + + /** + * Deactivate plan: turn off search module and instant search. + * If the plan is still valid then the function would simply deactivate the search module. + * Typically called from WPCOM. + * + * POST `jetpack/v4/search/plan/deactivate` + */ + public function deactivate_plan() { + // Instant Search would be disabled along with search module. + $this->search_module->deactivate(); + return rest_ensure_response( + array( + 'code' => 'success', + ) + ); + } + + /** + * Pricing for record count of the site + */ + public function product_pricing() { + $record_count = intval( Stats::estimate_count() ); + $tier_pricing = Product::get_site_tier_pricing( $record_count ); + return rest_ensure_response( $tier_pricing ); } /** * Forward remote response to client with error handling. * - * @param array|WP_Error $response - Resopnse from WPCOM. + * @param array|WP_Error $response - Response from WPCOM. */ protected function make_proper_response( $response ) { if ( is_wp_error( $response ) ) { diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-settings.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-settings.php index ec4a9ed8..26a2c597 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-settings.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-settings.php @@ -14,6 +14,9 @@ if ( ! defined( 'ABSPATH' ) ) { /** * Class to initialize search settings on the site. + * + * 1. Settings are synced to WPCOM according to `Automattic\Jetpack\Sync\Modules\Search::$options_to_sync`. + * 2. All synced options must also be explicitly whitelisted and sanitized on WPCOM; see `PCYsg-sBM-p2`. */ class Settings { diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-stats.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-stats.php new file mode 100644 index 00000000..1dac29dc --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-stats.php @@ -0,0 +1,89 @@ +<?php +/** + * Get search stats for use in the wp-admin dashboard. + * + * @package automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search; + +use Automattic\Jetpack\Connection\Client; +use Jetpack_Options; + +/** + * Search stats (e.g. post count, post type breakdown) + */ +class Stats { + const CACHE_EXPIRY = 5 * MINUTE_IN_SECONDS; + const CACHE_GROUP = 'jetpack_search'; + const COUNT_ESTIMATE_CACHE_KEY = 'count_estimate'; + + /** + * Get stats from the WordPress.com API for the current blog ID. + */ + public function get_stats_from_wpcom() { + $blog_id = Jetpack_Options::get_option( 'id' ); + + if ( ! is_numeric( $blog_id ) ) { + return null; + } + + $response = Client::wpcom_json_api_request_as_blog( + '/sites/' . (int) $blog_id . '/jetpack-search/stats', + '2', + array(), + null, + 'wpcom' + ); + + return $response; + } + + /** + * Estimate record counts via a local database query. + */ + public static function estimate_count() { + $cached_value = wp_cache_get( self::COUNT_ESTIMATE_CACHE_KEY, self::CACHE_GROUP ); + if ( false !== $cached_value ) { + return $cached_value; + } + + global $wpdb; + $indexable_statuses = get_post_stati( array( 'public' => true ) ); + $unindexable_post_types = array_merge( + // Explicitly exclude various post types registered by plugins. + array( + 'elementor_library', // Used by Elementor. + 'jp_sitemap', // Used by Jetpack. + 'product_variation', // Used by Woocommerce. + 'redirect_rule', // Used by the Safe Redirect plugin. + 'reply', // Used by bbpress. + 'scheduled-action', // Used by Woocommerce. + ), + get_post_types( + array( + 'exclude_from_search' => true, + 'public' => false, + ), + 'names', + 'or' + ) + ); + + $prep_for_query = function ( $string ) use ( $wpdb ) { + // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedSimplePlaceholder -- This is used to sanitize post type names. + return $wpdb->prepare( "'%s'", $string ); + }; + + $statuses_list = implode( ',', array_map( $prep_for_query, $indexable_statuses ) ); + $post_types_list = implode( ',', array_map( $prep_for_query, $unindexable_post_types ) ); + + $count = (int) $wpdb->get_var( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- This is properly prepared, but the query is constructed using variables. + "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_status IN ($statuses_list) AND post_type NOT IN ($post_types_list)" + ); + + wp_cache_set( self::COUNT_ESTIMATE_CACHE_KEY, $count, self::CACHE_GROUP, self::CACHE_EXPIRY ); + return $count; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-template-tags.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-template-tags.php index a212af00..4c718cd8 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-template-tags.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/class-template-tags.php @@ -2,10 +2,6 @@ /** * Template tags class used primarily for rendering widget-related HTML. * - * Currently, this package can only run in the Jetpack plugin due to its usage of Jetpack_Search. - * Once Jetpack_Search has been migrated to the package as Classic_Search, - * this library will be independent from the Jetpack plugin. - * * @package automattic/jetpack-search */ @@ -28,12 +24,11 @@ class Template_Tags { * @param array $post_types An array of post types to make filterable. */ public static function render_available_filters( $filters = null, $post_types = null ) { - if ( is_null( $filters ) ) { - // TODO: Must be migrated to use Classic_Search once the migration is underway. - $filters = \Jetpack_Search::instance()->get_filters(); + if ( $filters === null ) { + $filters = Classic_Search::instance()->get_filters(); } - if ( is_null( $post_types ) ) { + if ( $post_types === null ) { $post_types = get_post_types( array( 'exclude_from_search' => false ) ); } @@ -44,8 +39,7 @@ class Template_Tags { $active_post_types = array(); if ( Helper::post_types_differ_searchable( $post_types ) ) { // get the active filter buckets from the query. - // TODO: Must be migrated to use Classic_Search once the migration is underway. - $active_buckets = \Jetpack_Search::instance()->get_active_filter_buckets(); + $active_buckets = Classic_Search::instance()->get_active_filter_buckets(); $post_types_differ_query = Helper::post_types_differ_query( $post_types ); // remove any post_type filters from display if the current query @@ -83,9 +77,8 @@ class Template_Tags { * @param array $filters The available filters for the current query. */ public static function render_instant_filters( $filters = null ) { - if ( is_null( $filters ) ) { - // TODO: Must be migrated to use Classic_Search once the migration is underway. - $filters = \Jetpack_Search::instance()->get_filters(); + if ( $filters === null ) { + $filters = Classic_Search::instance()->get_filters(); } foreach ( (array) $filters as $filter ) { diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/classic-search/class-classic-search.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/classic-search/class-classic-search.php new file mode 100644 index 00000000..c1fda05a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/classic-search/class-classic-search.php @@ -0,0 +1,1895 @@ +<?php +/** + * Classic Search: Our original search experience with filtering capability. + * + * @package @automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search; + +use Automattic\Jetpack\Connection\Client; +use WP_Error; +use WP_Query; +use WP_Tax_Query; + +/** + * Class responsible for enabling the Classic Search experience on the site. + */ +class Classic_Search { + /** + * The singleton instance of this class. + * + * @since 5.0.0 + * @var Classic_Search + */ + private static $instance; + + /** + * The number of found posts. + * + * @since 5.0.0 + * @var int + */ + protected $found_posts = 0; + + /** + * The search result, as returned by the WordPress.com REST API. + * + * @since 5.0.0 + * @var array + */ + protected $search_result; + + /** + * This site's blog ID on WordPress.com. + * + * @since 5.0.0 + * @var int + */ + protected $jetpack_blog_id; + + /** + * The Elasticsearch aggregations (filters). + * + * @since 5.0.0 + * @var array + */ + protected $aggregations = array(); + + /** + * The maximum number of aggregations allowed. + * + * @since 5.0.0 + * @var int + */ + protected $max_aggregations_count = 100; + + /** + * Statistics about the last Elasticsearch query. + * + * @since 5.6.0 + * @var array + */ + protected $last_query_info = array(); + + /** + * Statistics about the last Elasticsearch query failure. + * + * @since 5.6.0 + * @var array + */ + protected $last_query_failure_info = array(); + + /** + * Languages with custom analyzers. Other languages are supported, but are analyzed with the default analyzer. + * + * @since 5.0.0 + * @var array + */ + public static $analyzed_langs = array( 'ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en', 'es', 'eu', 'fa', 'fi', 'fr', 'he', 'hi', 'hu', 'hy', 'id', 'it', 'ja', 'ko', 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh' ); + + /** + * The constructor is not used for this singleton class. + */ + protected function __construct() { + } + + /** + * Returns a class singleton. Initializes with first-time setup if given a blog ID parameter. + * + * @param string $blog_id Blog id. + * @return static The class singleton. + */ + public static function instance( $blog_id = null ) { + if ( ! isset( self::$instance ) ) { + if ( null === $blog_id ) { + $blog_id = Helper::get_wpcom_site_id(); + } + self::$instance = new static(); + self::$instance->setup( $blog_id ); + } + return self::$instance; + } + + /** + * Alias of the instance function. + */ + public static function initialize() { + return call_user_func_array( array( static::class, 'instance' ), func_get_args() ); + } + + /** + * Performs setup tasks for the singleton. To be used exclusively after singleton instantitaion. + * + * @param string $blog_id Blog id. + */ + public function setup( $blog_id ) { + if ( ! $blog_id ) { + return; + } + + $this->jetpack_blog_id = $blog_id; + $this->init_hooks(); + } + + /** + * Prevent __clone()'ing of this class. + * + * @since 5.0.0 + */ + public function __clone() { + wp_die( "Please don't __clone Classic_Search" ); + } + + /** + * Prevent __wakeup()'ing of this class. + * + * @since 5.0.0 + */ + public function __wakeup() { + wp_die( "Please don't __wakeup Classic_Search" ); + } + + /** + * Setup the various hooks needed for the plugin to take over search duties. + * + * @since 5.0.0 + */ + public function init_hooks() { + if ( ! is_admin() ) { + add_filter( 'posts_pre_query', array( $this, 'filter__posts_pre_query' ), 10, 2 ); + + add_filter( 'jetpack_search_es_wp_query_args', array( $this, 'filter__add_date_filter_to_query' ), 10, 2 ); + + add_action( 'did_jetpack_search_query', array( $this, 'store_last_query_info' ) ); + add_action( 'failed_jetpack_search_query', array( $this, 'store_query_failure' ) ); + + add_action( 'init', array( $this, 'set_filters_from_widgets' ) ); + + add_action( 'pre_get_posts', array( $this, 'maybe_add_post_type_as_var' ) ); + } else { + add_action( 'update_option', array( $this, 'track_widget_updates' ), 10, 3 ); + } + + add_action( 'jetpack_deactivate_module_search', array( $this, 'move_search_widgets_to_inactive' ) ); + } + + /** + * Does this site have a VIP index + * Get the version number to use when loading the file. Allows us to bypass cache when developing. + * + * @since 6.0 + * @return string $script_version Version number. + */ + public function has_vip_index() { + return defined( 'JETPACK_SEARCH_VIP_INDEX' ) && JETPACK_SEARCH_VIP_INDEX; + } + + /** + * When an Elasticsearch query fails, this stores it and enqueues some debug information in the footer. + * + * @since 5.6.0 + * + * @param array $meta Information about the failure. + */ + public function store_query_failure( $meta ) { + $this->last_query_failure_info = $meta; + add_action( 'wp_footer', array( $this, 'print_query_failure' ) ); + } + + /** + * Outputs information about the last Elasticsearch failure. + * + * @since 5.6.0 + */ + public function print_query_failure() { + if ( $this->last_query_failure_info ) { + printf( + '<!-- Jetpack Search failed with code %s: %s - %s -->', + esc_html( $this->last_query_failure_info['response_code'] ), + esc_html( $this->last_query_failure_info['json']['error'] ), + esc_html( $this->last_query_failure_info['json']['message'] ) + ); + } + } + + /** + * Stores information about the last Elasticsearch query and enqueues some debug information in the footer. + * + * @since 5.6.0 + * + * @param array $meta Information about the query. + */ + public function store_last_query_info( $meta ) { + $this->last_query_info = $meta; + add_action( 'wp_footer', array( $this, 'print_query_success' ) ); + } + + /** + * Outputs information about the last Elasticsearch search. + * + * @since 5.6.0 + */ + public function print_query_success() { + if ( $this->last_query_info ) { + printf( + '<!-- Jetpack Search took %s ms, ES time %s ms -->', + (int) $this->last_query_info['elapsed_time'], + esc_html( $this->last_query_info['es_time'] ) + ); + + if ( isset( $_GET['searchdebug'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended + printf( + '<!-- Query response data: %s -->', + esc_html( print_r( $this->last_query_info, 1 ) ) // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r + ); + } + } + } + + /** + * Returns the last query information, or false if no information was stored. + * + * @since 5.8.0 + * + * @return bool|array + */ + public function get_last_query_info() { + return empty( $this->last_query_info ) ? false : $this->last_query_info; + } + + /** + * Returns the last query failure information, or false if no failure information was stored. + * + * @since 5.8.0 + * + * @return bool|array + */ + public function get_last_query_failure_info() { + return empty( $this->last_query_failure_info ) ? false : $this->last_query_failure_info; + } + + /** + * Wraps a WordPress filter called "jetpack_search_disable_widget_filters" that allows + * developers to disable filters supplied by the search widget. Useful if filters are + * being defined at the code level. + * + * @since 5.7.0 + * @deprecated 5.8.0 Use Helper::are_filters_by_widget_disabled() directly. + * + * @return bool + */ + public function are_filters_by_widget_disabled() { + return Helper::are_filters_by_widget_disabled(); + } + + /** + * Retrieves a list of known Jetpack search filters widget IDs, gets the filters for each widget, + * and applies those filters to this Classic_Search object. + * + * @since 5.7.0 + */ + public function set_filters_from_widgets() { + if ( Helper::are_filters_by_widget_disabled() ) { + return; + } + + $filters = Helper::get_filters_from_widgets(); + + if ( ! empty( $filters ) ) { + $this->set_filters( $filters ); + } + } + + /** + * Restricts search results to certain post types via a GET argument. + * + * @since 5.8.0 + * + * @param WP_Query $query A WP_Query instance. + */ + public function maybe_add_post_type_as_var( WP_Query $query ) { + $post_type = ( ! empty( $_GET['post_type'] ) ) ? sanitize_key( $_GET['post_type'] ) : false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( $this->should_handle_query( $query ) && $post_type ) { + $post_types = ( is_string( $post_type ) && false !== strpos( $post_type, ',' ) ) + ? explode( ',', $post_type ) + : (array) $post_type; + $post_types = array_map( 'sanitize_key', $post_types ); + $query->set( 'post_type', $post_types ); + } + } + + /** + * Run a search on the WordPress.com public API. + * + * @since 5.0.0 + * + * @param array $es_args Args conforming to the WP.com /sites/<blog_id>/search endpoint. + * + * @return object|WP_Error The response from the public API, or a WP_Error. + */ + public function search( array $es_args ) { + $endpoint = sprintf( '/sites/%s/search', $this->jetpack_blog_id ); + $service_url = 'https://public-api.wordpress.com/rest/v1' . $endpoint; + + $do_authenticated_request = false; + + if ( class_exists( 'Automattic\\Jetpack\\Connection\\Client' ) && + isset( $es_args['authenticated_request'] ) && + true === $es_args['authenticated_request'] ) { + $do_authenticated_request = true; + } + + unset( $es_args['authenticated_request'] ); + + $request_args = array( + 'headers' => array( + 'Content-Type' => 'application/json', + ), + 'timeout' => 10, + 'user-agent' => 'jetpack_search', + ); + + $request_body = wp_json_encode( $es_args ); + + $start_time = microtime( true ); + + if ( $do_authenticated_request ) { + $request_args['method'] = 'POST'; + + $request = Client::wpcom_json_api_request_as_blog( $endpoint, Client::WPCOM_JSON_API_VERSION, $request_args, $request_body ); + } else { + $request_args = array_merge( + $request_args, + array( + 'body' => $request_body, + ) + ); + + $request = wp_remote_post( $service_url, $request_args ); + } + + $end_time = microtime( true ); + + if ( is_wp_error( $request ) ) { + return $request; + } + $response_code = wp_remote_retrieve_response_code( $request ); + + if ( ! $response_code || $response_code < 200 || $response_code >= 300 ) { + return new WP_Error( 'invalid_search_api_response', 'Invalid response from API - ' . $response_code ); + } + + $response = json_decode( wp_remote_retrieve_body( $request ), true ); + + $took = is_array( $response ) && ! empty( $response['took'] ) + ? $response['took'] + : null; + + $query = array( + 'args' => $es_args, + 'response' => $response, + 'response_code' => $response_code, + 'elapsed_time' => ( $end_time - $start_time ) * 1000, // Convert from float seconds to ms. + 'es_time' => $took, + 'url' => $service_url, + ); + + /** + * Fires after a search request has been performed. + * + * Includes the following info in the $query parameter: + * + * array args Array of Elasticsearch arguments for the search + * array response Raw API response, JSON decoded + * int response_code HTTP response code of the request + * float elapsed_time Roundtrip time of the search request, in milliseconds + * float es_time Amount of time Elasticsearch spent running the request, in milliseconds + * string url API url that was queried + * + * @module search + * + * @since 5.0.0 + * @since 5.8.0 This action now fires on all queries instead of just successful queries. + * + * @param array $query Array of information about the query performed + */ + do_action( 'did_jetpack_search_query', $query ); + + if ( ! $response_code || $response_code < 200 || $response_code >= 300 ) { + /** + * Fires after a search query request has failed + * + * @module search + * + * @since 5.6.0 + * + * @param array Array containing the response code and response from the failed search query + */ + do_action( + 'failed_jetpack_search_query', + array( + 'response_code' => $response_code, + 'json' => $response, + ) + ); + + return new WP_Error( 'invalid_search_api_response', 'Invalid response from API - ' . $response_code ); + } + + return $response; + } + + /** + * Bypass the normal Search query and offload it to Jetpack servers. + * + * This is the main hook of the plugin and is responsible for returning the posts that match the search query. + * + * @since 5.0.0 + * + * @param array $posts Current array of posts (still pre-query). + * @param WP_Query $query The WP_Query being filtered. + * + * @return array Array of matching posts. + */ + public function filter__posts_pre_query( $posts, $query ) { + if ( ! $this->should_handle_query( $query ) ) { + // Intentionally not adding the 'jetpack_search_abort' action since this should fire for every request except for search. + return $posts; + } + + $this->do_search( $query ); + + if ( ! is_array( $this->search_result ) ) { + do_action( 'jetpack_search_abort', 'no_search_results_array', $this->search_result ); + return $posts; + } + + // If no results, nothing to do. + if ( ! count( $this->search_result['results']['hits'] ) ) { + return array(); + } + + $post_ids = array(); + + foreach ( $this->search_result['results']['hits'] as $result ) { + $post_ids[] = (int) $result['fields']['post_id']; + } + + // Query all posts now. + $args = array( + 'post__in' => $post_ids, + 'orderby' => 'post__in', + 'perm' => 'readable', + 'post_type' => 'any', + 'ignore_sticky_posts' => true, + 'suppress_filters' => true, + 'posts_per_page' => $query->get( 'posts_per_page' ), + ); + + $posts_query = new WP_Query( $args ); + + // WP Core doesn't call the set_found_posts and its filters when filtering posts_pre_query like we do, so need to do these manually. + $query->found_posts = $this->found_posts; + $query->max_num_pages = ceil( $this->found_posts / $query->get( 'posts_per_page' ) ); + + return $posts_query->posts; + } + + /** + * Build up the search, then run it against the Jetpack servers. + * + * @since 5.0.0 + * + * @param WP_Query $query The original WP_Query to use for the parameters of our search. + */ + public function do_search( WP_Query $query ) { + if ( ! $this->should_handle_query( $query ) ) { + // If we make it here, either 'filter__posts_pre_query' somehow allowed it or a different entry to do_search. + do_action( 'jetpack_search_abort', 'search_attempted_non_search_query', $query ); + return; + } + + $page = ( $query->get( 'paged' ) ) ? absint( $query->get( 'paged' ) ) : 1; + + // Get maximum allowed offset and posts per page values for the API. + $max_offset = Helper::get_max_offset(); + $max_posts_per_page = Helper::get_max_posts_per_page(); + + $posts_per_page = $query->get( 'posts_per_page' ); + if ( $posts_per_page > $max_posts_per_page ) { + $posts_per_page = $max_posts_per_page; + } + + // Start building the WP-style search query args. + // They'll be translated to ES format args later. + $es_wp_query_args = array( + 'query' => $query->get( 's' ), + 'posts_per_page' => $posts_per_page, + 'paged' => $page, + 'orderby' => $query->get( 'orderby' ), + 'order' => $query->get( 'order' ), + ); + + if ( ! empty( $this->aggregations ) ) { + $es_wp_query_args['aggregations'] = $this->aggregations; + } + + // Did we query for authors? + if ( $query->get( 'author_name' ) ) { + $es_wp_query_args['author_name'] = $query->get( 'author_name' ); + } + + $es_wp_query_args['post_type'] = $this->get_es_wp_query_post_type_for_query( $query ); + $es_wp_query_args['terms'] = $this->get_es_wp_query_terms_for_query( $query ); + + /** + * Modify the search query parameters, such as controlling the post_type. + * + * These arguments are in the format of WP_Query arguments + * + * @module search + * + * @since 5.0.0 + * + * @param array $es_wp_query_args The current query args, in WP_Query format. + * @param WP_Query $query The original WP_Query object. + */ + $es_wp_query_args = apply_filters( 'jetpack_search_es_wp_query_args', $es_wp_query_args, $query ); + + // If page * posts_per_page is greater than our max offset, send a 404. This is necessary because the offset is + // capped at Helper::get_max_offset(), so a high page would always return the last page of results otherwise. + if ( ( $es_wp_query_args['paged'] * $es_wp_query_args['posts_per_page'] ) > $max_offset ) { + $query->set_404(); + + return; + } + + // If there were no post types returned, then 404 to avoid querying against non-public post types, which could + // happen if we don't add the post type restriction to the ES query. + if ( empty( $es_wp_query_args['post_type'] ) ) { + $query->set_404(); + + return; + } + + // Convert the WP-style args into ES args. + $es_query_args = $this->convert_wp_es_to_es_args( $es_wp_query_args ); + + // Only trust ES to give us IDs, not the content since it is a mirror. + $es_query_args['fields'] = array( + 'post_id', + ); + + /** + * Modify the underlying ES query that is passed to the search endpoint. The returned args must represent a valid ES query + * + * This filter is harder to use if you're unfamiliar with ES, but allows complete control over the query + * + * @module search + * + * @since 5.0.0 + * + * @param array $es_query_args The raw Elasticsearch query args. + * @param WP_Query $query The original WP_Query object. + */ + $es_query_args = apply_filters( 'jetpack_search_es_query_args', $es_query_args, $query ); + + // Do the actual search query! + $this->search_result = $this->search( $es_query_args ); + + if ( is_wp_error( $this->search_result ) || ! is_array( $this->search_result ) || empty( $this->search_result['results'] ) || empty( $this->search_result['results']['hits'] ) ) { + $this->found_posts = 0; + + return; + } + + // If we have aggregations, fix the ordering to match the input order (ES doesn't guarantee the return order). + if ( isset( $this->search_result['results']['aggregations'] ) && ! empty( $this->search_result['results']['aggregations'] ) ) { + $this->search_result['results']['aggregations'] = $this->fix_aggregation_ordering( $this->search_result['results']['aggregations'], $this->aggregations ); + } + + // Total number of results for paging purposes. Capped at $max_offset + $posts_per_page, as deep paging gets quite expensive. + $this->found_posts = min( $this->search_result['results']['total'], $max_offset + $posts_per_page ); + } + + /** + * If the query has already been run before filters have been updated, then we need to re-run the query + * to get the latest aggregations. + * + * This is especially useful for supporting widget management in the customizer. + * + * @since 5.8.0 + * + * @return bool Whether the query was successful or not. + */ + public function update_search_results_aggregations() { + if ( empty( $this->last_query_info ) || empty( $this->last_query_info['args'] ) ) { + return false; + } + + $es_args = $this->last_query_info['args']; + $builder = new WPES\Query_Builder(); + $this->add_aggregations_to_es_query_builder( $this->aggregations, $builder ); + $es_args['aggregations'] = $builder->build_aggregation(); + + $this->search_result = $this->search( $es_args ); + + return ! is_wp_error( $this->search_result ); + } + + /** + * Given a WP_Query, convert its WP_Tax_Query (if present) into the WP-style Elasticsearch term arguments for the search. + * + * @since 5.0.0 + * + * @param WP_Query $query The original WP_Query object for which to parse the taxonomy query. + * + * @return array The new WP-style Elasticsearch arguments (that will be converted into 'real' Elasticsearch arguments). + */ + public function get_es_wp_query_terms_for_query( WP_Query $query ) { + $args = array(); + + $the_tax_query = $query->tax_query; + + if ( ! $the_tax_query ) { + return $args; + } + + if ( ! $the_tax_query instanceof WP_Tax_Query || empty( $the_tax_query->queried_terms ) || ! is_array( $the_tax_query->queried_terms ) ) { + return $args; + } + + $args = array(); + + foreach ( $the_tax_query->queries as $tax_query ) { + // Right now we only support slugs...see note above. + if ( ! is_array( $tax_query ) || 'slug' !== $tax_query['field'] ) { + continue; + } + + $taxonomy = $tax_query['taxonomy']; + + if ( ! isset( $args[ $taxonomy ] ) || ! is_array( $args[ $taxonomy ] ) ) { + $args[ $taxonomy ] = array(); + } + + $args[ $taxonomy ] = array_merge( $args[ $taxonomy ], $tax_query['terms'] ); + } + + return $args; + } + + /** + * Parse out the post type from a WP_Query. + * + * Only allows post types that are not marked as 'exclude_from_search'. + * + * @since 5.0.0 + * + * @param WP_Query $query Original WP_Query object. + * + * @return array Array of searchable post types corresponding to the original query. + */ + public function get_es_wp_query_post_type_for_query( WP_Query $query ) { + $post_types = $query->get( 'post_type' ); + + // If we're searching 'any', we want to only pass searchable post types to Elasticsearch. + if ( 'any' === $post_types ) { + $post_types = array_values( + get_post_types( + array( + 'exclude_from_search' => false, + ) + ) + ); + } + + if ( ! is_array( $post_types ) ) { + $post_types = array( $post_types ); + } + + $post_types = array_unique( $post_types ); + + $sanitized_post_types = array(); + + // Make sure the post types are queryable. + foreach ( $post_types as $post_type ) { + if ( ! $post_type ) { + continue; + } + + $post_type_object = get_post_type_object( $post_type ); + if ( ! $post_type_object || $post_type_object->exclude_from_search ) { + continue; + } + + $sanitized_post_types[] = $post_type; + } + + return $sanitized_post_types; + } + + /** + * Initialize widgets for the Search module (on wp.com only). + * + * @module search + */ + public function action__widgets_init() { + // NOTE: This module only exists on WPCOM. + // TODO: Migrate this function to WPCOM! + require_once __DIR__ . '/class.jetpack-search-widget-filters.php'; + + register_widget( 'Jetpack_Search_Widget_Filters' ); + } + + /** + * Get the Elasticsearch result. + * + * @since 5.0.0 + * + * @param bool $raw If true, does not check for WP_Error or return the 'results' array - the JSON decoded HTTP response. + * + * @return array|bool The search results, or false if there was a failure. + */ + public function get_search_result( $raw = false ) { + if ( $raw ) { + return $this->search_result; + } + + return ( ! empty( $this->search_result ) && ! is_wp_error( $this->search_result ) && is_array( $this->search_result ) && ! empty( $this->search_result['results'] ) ) ? $this->search_result['results'] : false; + } + + /** + * Add the date portion of a WP_Query onto the query args. + * + * @since 5.0.0 + * + * @param array $es_wp_query_args The Elasticsearch query arguments in WordPress form. + * @param WP_Query $query The original WP_Query. + * + * @return array The es wp query args, with date filters added (as needed). + */ + public function filter__add_date_filter_to_query( array $es_wp_query_args, WP_Query $query ) { + if ( $query->get( 'year' ) ) { + if ( $query->get( 'monthnum' ) ) { + // Padding. + $date_monthnum = sprintf( '%02d', $query->get( 'monthnum' ) ); + + if ( $query->get( 'day' ) ) { + // Padding. + $date_day = sprintf( '%02d', $query->get( 'day' ) ); + + $date_start = $query->get( 'year' ) . '-' . $date_monthnum . '-' . $date_day . ' 00:00:00'; + $date_end = $query->get( 'year' ) . '-' . $date_monthnum . '-' . $date_day . ' 23:59:59'; + } else { + $days_in_month = gmdate( 't', mktime( 0, 0, 0, $query->get( 'monthnum' ), 14, $query->get( 'year' ) ) ); // 14 = middle of the month so no chance of DST issues + + $date_start = $query->get( 'year' ) . '-' . $date_monthnum . '-01 00:00:00'; + $date_end = $query->get( 'year' ) . '-' . $date_monthnum . '-' . $days_in_month . ' 23:59:59'; + } + } else { + $date_start = $query->get( 'year' ) . '-01-01 00:00:00'; + $date_end = $query->get( 'year' ) . '-12-31 23:59:59'; + } + + $es_wp_query_args['date_range'] = array( + 'field' => 'date', + 'gte' => $date_start, + 'lte' => $date_end, + ); + } + + return $es_wp_query_args; + } + + /** + * Converts WP_Query style args to Elasticsearch args. + * + * @since 5.0.0 + * + * @param array $args Array of WP_Query style arguments. + * + * @return array Array of ES style query arguments. + */ + public function convert_wp_es_to_es_args( array $args ) { + $defaults = array( + 'blog_id' => get_current_blog_id(), + 'query' => null, // Search phrase. + 'query_fields' => array(), // list of fields to search. + 'excess_boost' => array(), // map of field to excess boost values (multiply). + 'post_type' => null, // string or an array. + 'terms' => array(), // ex: array( 'taxonomy-1' => array( 'slug' ), 'taxonomy-2' => array( 'slug-a', 'slug-b' ) ). phpcs:ignore Squiz.PHP.CommentedOutCode.Found. + 'author' => null, // id or an array of ids. + 'author_name' => array(), // string or an array. + 'date_range' => null, // array( 'field' => 'date', 'gt' => 'YYYY-MM-dd', 'lte' => 'YYYY-MM-dd' ); date formats: 'YYYY-MM-dd' or 'YYYY-MM-dd HH:MM:SS'. phpcs:ignore Squiz.PHP.CommentedOutCode.Found. + 'orderby' => null, // Defaults to 'relevance' if query is set, otherwise 'date'. Pass an array for multiple orders. + 'order' => 'DESC', + 'posts_per_page' => 10, + 'offset' => null, + 'paged' => null, + /** + * Aggregations. Examples: + * array( + * 'Tag' => array( 'type' => 'taxonomy', 'taxonomy' => 'post_tag', 'count' => 10 ) ), + * 'Post Type' => array( 'type' => 'post_type', 'count' => 10 ) ), + * ); + */ + 'aggregations' => null, + ); + + $args = wp_parse_args( $args, $defaults ); + + $parser = new WPES\Query_Parser( + $args['query'], + /** + * Filter the languages used by Jetpack Search's Query Parser. + * + * @module search + * + * @since 7.9.0 + * + * @param array $languages The array of languages. Default is value of get_locale(). + */ + apply_filters( 'jetpack_search_query_languages', array( get_locale() ) ) + ); + + if ( empty( $args['query_fields'] ) ) { + if ( $this->has_vip_index() ) { + // VIP indices do not have per language fields. + $match_fields = $this->_get_caret_boosted_fields( + array( + 'title' => 0.1, + 'content' => 0.1, + 'excerpt' => 0.1, + 'tag.name' => 0.1, + 'category.name' => 0.1, + 'author_login' => 0.1, + 'author' => 0.1, + ) + ); + + $boost_fields = $this->_get_caret_boosted_fields( + $this->_apply_boosts_multiplier( + array( + 'title' => 2, + 'tag.name' => 1, + 'category.name' => 1, + 'author_login' => 1, + 'author' => 1, + ), + $args['excess_boost'] + ) + ); + + $boost_phrase_fields = $this->_get_caret_boosted_fields( + array( + 'title' => 1, + 'content' => 1, + 'excerpt' => 1, + 'tag.name' => 1, + 'category.name' => 1, + 'author' => 1, + ) + ); + } else { + $match_fields = $parser->merge_ml_fields( + array( + 'title' => 0.1, + 'content' => 0.1, + 'excerpt' => 0.1, + 'tag.name' => 0.1, + 'category.name' => 0.1, + ), + $this->_get_caret_boosted_fields( + array( + 'author_login' => 0.1, + 'author' => 0.1, + ) + ) + ); + + $boost_fields = $parser->merge_ml_fields( + $this->_apply_boosts_multiplier( + array( + 'title' => 2, + 'tag.name' => 1, + 'category.name' => 1, + ), + $args['excess_boost'] + ), + $this->_get_caret_boosted_fields( + $this->_apply_boosts_multiplier( + array( + 'author_login' => 1, + 'author' => 1, + ), + $args['excess_boost'] + ) + ) + ); + + $boost_phrase_fields = $parser->merge_ml_fields( + array( + 'title' => 1, + 'content' => 1, + 'excerpt' => 1, + 'tag.name' => 1, + 'category.name' => 1, + ), + $this->_get_caret_boosted_fields( + array( + 'author' => 1, + ) + ) + ); + } + } else { + // If code is overriding the fields, then use that. Important for backwards compatibility. + $match_fields = $args['query_fields']; + $boost_phrase_fields = $match_fields; + $boost_fields = null; + } + + $parser->phrase_filter( + array( + 'must_query_fields' => $match_fields, + 'boost_query_fields' => null, + ) + ); + $parser->remaining_query( + array( + 'must_query_fields' => $match_fields, + 'boost_query_fields' => $boost_fields, + ) + ); + + // Boost on phrase matches. + $parser->remaining_query( + array( + 'boost_query_fields' => $boost_phrase_fields, + 'boost_query_type' => 'phrase', + ) + ); + + /** + * Modify the recency decay parameters for the search query. + * + * The recency decay lowers the search scores based on the age of a post relative to an origin date. Basic adjustments: + * - origin: A date. Posts with this date will have the highest score and no decay applied. Default is today. + * - offset: Number of days/months/years (eg 30d). All posts within this time range of the origin (before and after) will have no decay applied. Default is no offset. + * - scale: The number of days/months/years from the origin+offset at which the decay will equal the decay param. Default 360d + * - decay: The amount of decay applied at offset+scale. Default 0.9. + * + * The curve applied is a Gaussian. More details available at {@see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-decay} + * + * @module search + * + * @since 5.8.0 + * + * @param array $decay_params The decay parameters. + * @param array $args The WP query parameters. + */ + $decay_params = apply_filters( + 'jetpack_search_recency_score_decay', + array( + 'origin' => gmdate( 'Y-m-d' ), + 'scale' => '360d', + 'decay' => 0.9, + ), + $args + ); + + if ( ! empty( $decay_params ) ) { + // Newer content gets weighted slightly higher. + $parser->add_decay( + 'gauss', + array( + 'date_gmt' => $decay_params, + ) + ); + } + + $es_query_args = array( + 'blog_id' => absint( $args['blog_id'] ), + 'size' => absint( $args['posts_per_page'] ), + ); + + // ES "from" arg (offset). + if ( $args['offset'] ) { + $es_query_args['from'] = absint( $args['offset'] ); + } elseif ( $args['paged'] ) { + $es_query_args['from'] = max( 0, ( absint( $args['paged'] ) - 1 ) * $es_query_args['size'] ); + } + + $es_query_args['from'] = min( $es_query_args['from'], Helper::get_max_offset() ); + + if ( ! is_array( $args['author_name'] ) ) { + $args['author_name'] = array( $args['author_name'] ); + } + + // ES stores usernames, not IDs, so transform. + if ( ! empty( $args['author'] ) ) { + if ( ! is_array( $args['author'] ) ) { + $args['author'] = array( $args['author'] ); + } + + foreach ( $args['author'] as $author ) { + $user = get_user_by( 'id', $author ); + + if ( $user && ! empty( $user->user_login ) ) { + $args['author_name'][] = $user->user_login; + } + } + } + + /* + * Build the filters from the query elements. + * Filters rock because they are cached from one query to the next + * but they are cached as individual filters, rather than all combined together. + * May get performance boost by also caching the top level boolean filter too. + */ + + if ( $args['post_type'] ) { + if ( ! is_array( $args['post_type'] ) ) { + $args['post_type'] = array( $args['post_type'] ); + } + + $parser->add_filter( + array( + 'terms' => array( + 'post_type' => $args['post_type'], + ), + ) + ); + } + + if ( $args['author_name'] ) { + $parser->add_filter( + array( + 'terms' => array( + 'author_login' => $args['author_name'], + ), + ) + ); + } + + if ( ! empty( $args['date_range'] ) && isset( $args['date_range']['field'] ) ) { + $field = $args['date_range']['field']; + + unset( $args['date_range']['field'] ); + + $parser->add_filter( + array( + 'range' => array( + $field => $args['date_range'], + ), + ) + ); + } + + if ( is_array( $args['terms'] ) ) { + foreach ( $args['terms'] as $tax => $terms ) { + $terms = (array) $terms; + + if ( count( $terms ) && mb_strlen( $tax ) ) { + switch ( $tax ) { + case 'post_tag': + $tax_fld = 'tag.slug'; + + break; + + case 'category': + $tax_fld = 'category.slug'; + + break; + + default: + $tax_fld = 'taxonomy.' . $tax . '.slug'; + + break; + } + + foreach ( $terms as $term ) { + $parser->add_filter( + array( + 'term' => array( + $tax_fld => $term, + ), + ) + ); + } + } + } + } + + if ( ! $args['orderby'] ) { + if ( $args['query'] ) { + $args['orderby'] = array( 'relevance' ); + } else { + $args['orderby'] = array( 'date' ); + } + } + + // Validate the "order" field. + switch ( strtolower( $args['order'] ) ) { + case 'asc': + $args['order'] = 'asc'; + break; + + case 'desc': + default: + $args['order'] = 'desc'; + break; + } + + $es_query_args['sort'] = array(); + + foreach ( (array) $args['orderby'] as $orderby ) { + // Translate orderby from WP field to ES field. + switch ( $orderby ) { + case 'relevance': + // never order by score ascending. + $es_query_args['sort'][] = array( + '_score' => array( + 'order' => 'desc', + ), + ); + + break; + + case 'date': + $es_query_args['sort'][] = array( + 'date' => array( + 'order' => $args['order'], + ), + ); + + break; + + case 'ID': + $es_query_args['sort'][] = array( + 'id' => array( + 'order' => $args['order'], + ), + ); + + break; + + case 'author': + $es_query_args['sort'][] = array( + 'author.raw' => array( + 'order' => $args['order'], + ), + ); + + break; + } // End switch. + } // End foreach. + + if ( empty( $es_query_args['sort'] ) ) { + unset( $es_query_args['sort'] ); + } + + // Aggregations. + if ( ! empty( $args['aggregations'] ) ) { + $this->add_aggregations_to_es_query_builder( $args['aggregations'], $parser ); + } + + $es_query_args['filter'] = $parser->build_filter(); + $es_query_args['query'] = $parser->build_query(); + $es_query_args['aggregations'] = $parser->build_aggregation(); + + return $es_query_args; + } + + /** + * Given an array of aggregations, parse and add them onto the query builder object for use in Elasticsearch. + * + * @since 5.0.0 + * + * @param array $aggregations Array of aggregations (filters) to add to the query builder. + * @param Automattic\Jetpack\Search\WPES\Query_Builder $builder The builder instance that is creating the Elasticsearch query. + */ + public function add_aggregations_to_es_query_builder( array $aggregations, $builder ) { + foreach ( $aggregations as $label => $aggregation ) { + if ( ! isset( $aggregation['type'] ) ) { + continue; + } + switch ( $aggregation['type'] ) { + case 'taxonomy': + $this->add_taxonomy_aggregation_to_es_query_builder( $aggregation, $label, $builder ); + + break; + + case 'post_type': + $this->add_post_type_aggregation_to_es_query_builder( $aggregation, $label, $builder ); + + break; + + case 'date_histogram': + $this->add_date_histogram_aggregation_to_es_query_builder( $aggregation, $label, $builder ); + + break; + } + } + } + + /** + * Given an individual taxonomy aggregation, add it to the query builder object for use in Elasticsearch. + * + * @since 5.0.0 + * + * @param array $aggregation The aggregation to add to the query builder. + * @param string $label The 'label' (unique id) for this aggregation. + * @param Automattic\Jetpack\Search\WPES\Query_Builder $builder The builder instance that is creating the Elasticsearch query. + */ + public function add_taxonomy_aggregation_to_es_query_builder( array $aggregation, $label, $builder ) { + $field = null; + + switch ( $aggregation['taxonomy'] ) { + case 'post_tag': + $field = 'tag'; + break; + + case 'category': + $field = 'category'; + break; + + default: + $field = 'taxonomy.' . $aggregation['taxonomy']; + break; + } + + $builder->add_aggs( + $label, + array( + 'terms' => array( + 'field' => $field . '.slug', + 'size' => min( (int) $aggregation['count'], $this->max_aggregations_count ), + ), + ) + ); + } + + /** + * Given an individual post_type aggregation, add it to the query builder object for use in Elasticsearch. + * + * @since 5.0.0 + * + * @param array $aggregation The aggregation to add to the query builder. + * @param string $label The 'label' (unique id) for this aggregation. + * @param Automattic\Jetpack\Search\WPES\Query_Builder $builder The builder instance that is creating the Elasticsearch query. + */ + public function add_post_type_aggregation_to_es_query_builder( array $aggregation, $label, $builder ) { + $builder->add_aggs( + $label, + array( + 'terms' => array( + 'field' => 'post_type', + 'size' => min( (int) $aggregation['count'], $this->max_aggregations_count ), + ), + ) + ); + } + + /** + * Given an individual date_histogram aggregation, add it to the query builder object for use in Elasticsearch. + * + * @since 5.0.0 + * + * @param array $aggregation The aggregation to add to the query builder. + * @param string $label The 'label' (unique id) for this aggregation. + * @param Automattic\Jetpack\Search\WPES\Query_Builder $builder The builder instance that is creating the Elasticsearch query. + */ + public function add_date_histogram_aggregation_to_es_query_builder( array $aggregation, $label, $builder ) { + $args = array( + 'interval' => $aggregation['interval'], + 'field' => ( ! empty( $aggregation['field'] ) && 'post_date_gmt' === $aggregation['field'] ) ? 'date_gmt' : 'date', + ); + + if ( isset( $aggregation['min_doc_count'] ) ) { + $args['min_doc_count'] = (int) $aggregation['min_doc_count']; + } else { + $args['min_doc_count'] = 1; + } + + $builder->add_aggs( + $label, + array( + 'date_histogram' => $args, + ) + ); + } + + /** + * And an existing filter object with a list of additional filters. + * + * Attempts to optimize the filters somewhat. + * + * @since 5.0.0 + * + * @param array $curr_filter The existing filters to build upon. + * @param array $filters The new filters to add. + * + * @return array The resulting merged filters. + */ + public static function and_es_filters( array $curr_filter, array $filters ) { + if ( ! is_array( $curr_filter ) || isset( $curr_filter['match_all'] ) ) { + if ( 1 === count( $filters ) ) { + return $filters[0]; + } + + return array( + 'and' => $filters, + ); + } + + return array( + 'and' => array_merge( array( $curr_filter ), $filters ), + ); + } + + /** + * Set the available filters for the search. + * + * These get rendered via the Jetpack_Search_Widget() widget. + * + * Behind the scenes, these are implemented using Elasticsearch Aggregations. + * + * If you do not require counts of how many documents match each filter, please consider using regular WP Query + * arguments instead, such as via the jetpack_search_es_wp_query_args filter + * + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html + * + * @since 5.0.0 + * + * @param array $aggregations Array of filters (aggregations) to apply to the search. + */ + public function set_filters( array $aggregations ) { + foreach ( (array) $aggregations as $key => $agg ) { + if ( empty( $agg['name'] ) ) { + $aggregations[ $key ]['name'] = $key; + } + } + $this->aggregations = $aggregations; + } + + /** + * Get the raw Aggregation results from the Elasticsearch response. + * + * @since 5.0.0 + * + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html + * + * @return array Array of Aggregations performed on the search. + */ + public function get_search_aggregations_results() { + $aggregations = array(); + + $search_result = $this->get_search_result(); + + if ( ! empty( $search_result ) && ! empty( $search_result['aggregations'] ) ) { + $aggregations = $search_result['aggregations']; + } + + return $aggregations; + } + + /** + * Get the results of the Filters performed, including the number of matching documents. + * + * Returns an array of Filters (keyed by $label, as passed to Classic_Search::set_filters()), containing the Filter and all resulting + * matching buckets, the url for applying/removing each bucket, etc. + * + * NOTE - if this is called before the search is performed, an empty array will be returned. Use the $aggregations class + * member if you need to access the raw filters set in Classic_Search::set_filters(). + * + * @since 5.0.0 + * + * @param WP_Query $query The optional original WP_Query to use for determining which filters are active. Defaults to the main query. + * + * @return array Array of filters applied and info about them. + */ + public function get_filters( WP_Query $query = null ) { + if ( ! $query instanceof WP_Query ) { + global $wp_query; + + $query = $wp_query; + } + + $aggregation_data = $this->aggregations; + + if ( empty( $aggregation_data ) ) { + return $aggregation_data; + } + + $aggregation_results = $this->get_search_aggregations_results(); + + if ( ! $aggregation_results ) { + return $aggregation_data; + } + + // NOTE - Looping over the _results_, not the original configured aggregations, so we get the 'real' data from ES. + foreach ( $aggregation_results as $label => $aggregation ) { + if ( empty( $aggregation ) ) { + continue; + } + + $type = $this->aggregations[ $label ]['type']; + + $aggregation_data[ $label ]['buckets'] = array(); + + $existing_term_slugs = array(); + + $tax_query_var = null; + + // Figure out which terms are active in the query, for this taxonomy. + if ( 'taxonomy' === $this->aggregations[ $label ]['type'] ) { + $tax_query_var = $this->get_taxonomy_query_var( $this->aggregations[ $label ]['taxonomy'] ); + + if ( ! empty( $query->tax_query ) && ! empty( $query->tax_query->queries ) && is_array( $query->tax_query->queries ) ) { + foreach ( $query->tax_query->queries as $tax_query ) { + if ( is_array( $tax_query ) && $this->aggregations[ $label ]['taxonomy'] === $tax_query['taxonomy'] && + 'slug' === $tax_query['field'] && + is_array( $tax_query['terms'] ) ) { + $existing_term_slugs = array_merge( $existing_term_slugs, $tax_query['terms'] ); + } + } + } + } + + // Now take the resulting found aggregation items and generate the additional info about them, such as activation/deactivation url, name, count, etc. + $buckets = array(); + + if ( ! empty( $aggregation['buckets'] ) ) { + $buckets = (array) $aggregation['buckets']; + } + + if ( 'date_histogram' === $type ) { + // re-order newest to oldest. + $buckets = array_reverse( $buckets ); + } + + // Some aggregation types like date_histogram don't support the max results parameter. + if ( is_int( $this->aggregations[ $label ]['count'] ) && count( $buckets ) > $this->aggregations[ $label ]['count'] ) { + $buckets = array_slice( $buckets, 0, $this->aggregations[ $label ]['count'] ); + } + + foreach ( $buckets as $item ) { + $query_vars = array(); + $active = false; + $remove_url = null; + $name = ''; + + // What type was the original aggregation? + switch ( $type ) { + case 'taxonomy': + $taxonomy = $this->aggregations[ $label ]['taxonomy']; + + $term = get_term_by( 'slug', $item['key'], $taxonomy ); + + if ( ! $term || ! $tax_query_var ) { + continue 2; // switch() is considered a looping structure. + } + + $query_vars = array( + $tax_query_var => implode( '+', array_merge( $existing_term_slugs, array( $term->slug ) ) ), + ); + + $name = $term->name; + + // Let's determine if this term is active or not. + + if ( in_array( $item['key'], $existing_term_slugs, true ) ) { + $active = true; + + $slug_count = count( $existing_term_slugs ); + + if ( $slug_count > 1 ) { + $remove_url = Helper::add_query_arg( + $tax_query_var, + rawurlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) ) + ); + } else { + $remove_url = Helper::remove_query_arg( $tax_query_var ); + } + } + + break; + + case 'post_type': + $post_type = get_post_type_object( $item['key'] ); + + if ( ! $post_type || $post_type->exclude_from_search ) { + continue 2; // switch() is considered a looping structure. + } + + $query_vars = array( + 'post_type' => $item['key'], + ); + + $name = $post_type->labels->singular_name; + + // Is this post type active on this search? + $post_types = $query->get( 'post_type' ); + + if ( ! is_array( $post_types ) ) { + $post_types = array( $post_types ); + } + + if ( in_array( $item['key'], $post_types, true ) ) { + $active = true; + + $post_type_count = count( $post_types ); + + // For the right 'remove filter' url, we need to remove the post type from the array, or remove the param entirely if it's the only one. + if ( $post_type_count > 1 ) { + $remove_url = Helper::add_query_arg( + 'post_type', + rawurlencode( implode( ',', array_diff( $post_types, array( $item['key'] ) ) ) ) + ); + } else { + $remove_url = Helper::remove_query_arg( 'post_type' ); + } + } + + break; + + case 'date_histogram': + $timestamp = $item['key'] / 1000; + + $current_year = $query->get( 'year' ); + $current_month = $query->get( 'monthnum' ); + $current_day = $query->get( 'day' ); + + switch ( $this->aggregations[ $label ]['interval'] ) { + case 'year': + $year = (int) gmdate( 'Y', $timestamp ); + + $query_vars = array( + 'year' => $year, + 'monthnum' => false, + 'day' => false, + ); + + $name = $year; + + // Is this year currently selected? + if ( ! empty( $current_year ) && (int) $current_year === $year ) { + $active = true; + + $remove_url = Helper::remove_query_arg( array( 'year', 'monthnum', 'day' ) ); + } + + break; + + case 'month': + $year = (int) gmdate( 'Y', $timestamp ); + $month = (int) gmdate( 'n', $timestamp ); + + $query_vars = array( + 'year' => $year, + 'monthnum' => $month, + 'day' => false, + ); + + $name = gmdate( 'F Y', $timestamp ); + + // Is this month currently selected? + if ( ! empty( $current_year ) && (int) $current_year === $year && + ! empty( $current_month ) && (int) $current_month === $month ) { + $active = true; + + $remove_url = Helper::remove_query_arg( array( 'year', 'monthnum' ) ); + } + + break; + + case 'day': + $year = (int) gmdate( 'Y', $timestamp ); + $month = (int) gmdate( 'n', $timestamp ); + $day = (int) gmdate( 'j', $timestamp ); + + $query_vars = array( + 'year' => $year, + 'monthnum' => $month, + 'day' => $day, + ); + + $name = gmdate( 'F jS, Y', $timestamp ); + + // Is this day currently selected? + if ( ! empty( $current_year ) && (int) $current_year === $year && + ! empty( $current_month ) && (int) $current_month === $month && + ! empty( $current_day ) && (int) $current_day === $day ) { + $active = true; + + $remove_url = Helper::remove_query_arg( array( 'day' ) ); + } + + break; + + default: + continue 3; // switch() is considered a looping structure. + } // End switch. + + break; + + default: + // continue 2; // switch() is considered a looping structure. + } // End switch. + + // Need to urlencode param values since add_query_arg doesn't. + $url_params = urlencode_deep( $query_vars ); + + $aggregation_data[ $label ]['buckets'][] = array( + 'url' => Helper::add_query_arg( $url_params ), + 'query_vars' => $query_vars, + 'name' => $name, + 'count' => $item['doc_count'], + 'active' => $active, + 'remove_url' => $remove_url, + 'type' => $type, + 'type_label' => $aggregation_data[ $label ]['name'], + 'widget_id' => ! empty( $aggregation_data[ $label ]['widget_id'] ) ? $aggregation_data[ $label ]['widget_id'] : 0, + ); + } // End foreach. + } // End foreach. + + /** + * Modify the aggregation filters returned by get_filters(). + * + * Useful if you are setting custom filters outside of the supported filters (taxonomy, post_type etc.) and + * want to hook them up so they're returned when you call `get_filters()`. + * + * @module search + * + * @since 6.9.0 + * + * @param array $aggregation_data The array of filters keyed on label. + * @param WP_Query $query The WP_Query object. + */ + return apply_filters( 'jetpack_search_get_filters', $aggregation_data, $query ); + } + + /** + * Get the filters that are currently applied to this search. + * + * @since 5.0.0 + * + * @return array Array of filters that were applied. + */ + public function get_active_filter_buckets() { + $active_buckets = array(); + + $filters = $this->get_filters(); + + if ( ! is_array( $filters ) ) { + return $active_buckets; + } + + foreach ( $filters as $filter ) { + if ( isset( $filter['buckets'] ) && is_array( $filter['buckets'] ) ) { + foreach ( $filter['buckets'] as $item ) { + if ( isset( $item['active'] ) && $item['active'] ) { + $active_buckets[] = $item; + } + } + } + } + + return $active_buckets; + } + + /** + * Calculate the right query var to use for a given taxonomy. + * + * Allows custom code to modify the GET var that is used to represent a given taxonomy, via the jetpack_search_taxonomy_query_var filter. + * + * @since 5.0.0 + * + * @param string $taxonomy_name The name of the taxonomy for which to get the query var. + * + * @return bool|string The query var to use for this taxonomy, or false if none found. + */ + public function get_taxonomy_query_var( $taxonomy_name ) { + $taxonomy = get_taxonomy( $taxonomy_name ); + + if ( ! $taxonomy || is_wp_error( $taxonomy ) ) { + return false; + } + + /** + * Modify the query var to use for a given taxonomy + * + * @module search + * + * @since 5.0.0 + * + * @param string $query_var The current query_var for the taxonomy + * @param string $taxonomy_name The taxonomy name + */ + return apply_filters( 'jetpack_search_taxonomy_query_var', $taxonomy->query_var, $taxonomy_name ); + } + + /** + * Takes an array of aggregation results, and ensures the array key ordering matches the key order in $desired + * which is the input order. + * + * Necessary because ES does not always return aggregations in the same order that you pass them in, + * and it should be possible to control the display order easily. + * + * @since 5.0.0 + * + * @param array $aggregations Aggregation results to be reordered. + * @param array $desired Array with keys representing the desired ordering. + * + * @return array A new array with reordered keys, matching those in $desired. + */ + public function fix_aggregation_ordering( array $aggregations, array $desired ) { + if ( empty( $aggregations ) || empty( $desired ) ) { + return $aggregations; + } + + $reordered = array(); + + foreach ( array_keys( $desired ) as $agg_name ) { + if ( isset( $aggregations[ $agg_name ] ) ) { + $reordered[ $agg_name ] = $aggregations[ $agg_name ]; + } + } + + return $reordered; + } + + /** + * Sends events to Tracks when a search filters widget is updated. + * + * @since 5.8.0 + * + * @param string $option The option name. Only "widget_jetpack-search-filters" is cared about. + * @param array $old_value The old option value. + * @param array $new_value The new option value. + */ + public function track_widget_updates( $option, $old_value, $new_value ) { + if ( 'widget_jetpack-search-filters' !== $option ) { + return; + } + + $event = Helper::get_widget_tracks_value( $old_value, $new_value ); + if ( ! $event ) { + return; + } + + $tracking = new \Automattic\Jetpack\Tracking(); + $tracking->tracks_record_event( + wp_get_current_user(), + sprintf( 'jetpack_search_widget_%s', $event['action'] ), + $event['widget'] + ); + } + + /** + * Moves any active search widgets to the inactive category. + * + * @since 5.9.0 + */ + public function move_search_widgets_to_inactive() { + if ( ! is_active_widget( false, false, Helper::FILTER_WIDGET_BASE, true ) ) { + return; + } + + $sidebars_widgets = wp_get_sidebars_widgets(); + + if ( ! is_array( $sidebars_widgets ) ) { + return; + } + + $changed = false; + + foreach ( $sidebars_widgets as $sidebar => $widgets ) { + if ( 'wp_inactive_widgets' === $sidebar || 'orphaned_widgets' === substr( $sidebar, 0, 16 ) ) { + continue; + } + + if ( is_array( $widgets ) ) { + foreach ( $widgets as $key => $widget ) { + if ( _get_widget_id_base( $widget ) === Helper::FILTER_WIDGET_BASE ) { + $changed = true; + + array_unshift( $sidebars_widgets['wp_inactive_widgets'], $widget ); + unset( $sidebars_widgets[ $sidebar ][ $key ] ); + } + } + } + } + + if ( $changed ) { + wp_set_sidebars_widgets( $sidebars_widgets ); + } + } + + /** + * Determine whether a given WP_Query should be handled by ElasticSearch. + * + * @param WP_Query $query The WP_Query object. + * + * @return bool + */ + public function should_handle_query( $query ) { + /** + * Determine whether a given WP_Query should be handled by ElasticSearch. + * + * @module search + * + * @since 5.6.0 + * + * @param bool $should_handle Should be handled by Jetpack Search. + * @param WP_Query $query The WP_Query object. + */ + return apply_filters( 'jetpack_search_should_handle_query', $query->is_main_query() && $query->is_search(), $query ); + } + + /** + * Transforms an array with fields name as keys and boosts as value into + * shorthand "caret" format. + * + * @param array $fields_boost [ "title" => "2", "content" => "1" ]. + * + * @return array [ "title^2", "content^1" ] + */ + private function _get_caret_boosted_fields( array $fields_boost ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore + $caret_boosted_fields = array(); + foreach ( $fields_boost as $field => $boost ) { + $caret_boosted_fields[] = "$field^$boost"; + } + return $caret_boosted_fields; + } + + /** + * Apply a multiplier to boost values. + * + * @param array $fields_boost [ "title" => 2, "content" => 1 ]. + * @param array $fields_boost_multiplier [ "title" => 0.1234 ]. + * + * @return array [ "title" => "0.247", "content" => "1.000" ] + */ + private function _apply_boosts_multiplier( array $fields_boost, array $fields_boost_multiplier ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore + foreach ( $fields_boost as $field_name => $field_boost ) { + if ( isset( $fields_boost_multiplier[ $field_name ] ) ) { + $fields_boost[ $field_name ] *= $fields_boost_multiplier[ $field_name ]; + } + + // Set a floor and format the number as string. + $fields_boost[ $field_name ] = number_format( + max( 0.001, $fields_boost[ $field_name ] ), + 3, + '.', + '' + ); + } + + return $fields_boost; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customberg/class-customberg.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customberg/class-customberg.php new file mode 100644 index 00000000..cafe88e3 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customberg/class-customberg.php @@ -0,0 +1,145 @@ +<?php +/** + * A class that adds a search customization interface to wp-admin. + * + * @package automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search; + +use Automattic\Jetpack\Assets; +use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Status; +use Automattic\Jetpack\Tracking; + +/** + * Responsible for adding a search customization interface to wp-admin. + * + * @package Automattic\Jetpack\Search + */ +class Customberg { + /** + * The singleton instance of this class. + * + * @var Customberg + */ + protected static $instance; + + /** + * Get the singleton instance of the class. + * + * @return Customberg + */ + public static function instance() { + if ( ! isset( self::$instance ) ) { + self::$instance = new static(); + self::$instance->init_hooks(); + } + + return self::$instance; + } + + /** + * Adds action hooks. + */ + public function init_hooks() { + add_action( 'admin_menu', array( $this, 'add_wp_admin_page' ), 999 ); + } + + /** + * Adds a wp-admin page without adding a sidebar submenu item. + */ + public function add_wp_admin_page() { + if ( ! $this->should_add_page() ) { + return; + } + + // Intentionally omits adding a submenu via the first null argument. + $hook = add_submenu_page( + null, + __( 'Search Settings', 'jetpack-search-pkg' ), + __( 'Search', 'jetpack-search-pkg' ), + 'manage_options', // Must be an admin. + 'jetpack-search-configure', + array( $this, 'jetpack_search_admin_page' ) + ); + + add_action( "admin_print_scripts-$hook", array( $this, 'load_assets' ) ); + add_action( 'admin_footer', array( 'Automattic\Jetpack\Search\Helper', 'print_instant_search_sidebar' ) ); + } + + /** + * Prints the dashboard container. + */ + public function jetpack_search_admin_page() { + // TODO: Spin this function off into a static helper function in a helper class for code reuse. + $static_url = apply_filters( 'jetpack_static_url', '//en.wordpress.com/i/loading/loading-64.gif' ); + ?> + <div id="jp-search-configure" class="jp-search-configure-dashboard" style="height: calc(100vh - 100px);"> + <div class="hide-if-no-js" style="height: 100%;"> + <img class="jp-search-loader" width="32" height="32" alt="<?php esc_attr_e( 'Loading…', 'jetpack-search-pkg' ); ?>" src="<?php echo esc_url( $static_url ); ?>" style=" + position: absolute; + left: 50%; + top: 50%; + "/> + </div> + <div class="hide-if-js"><?php esc_html_e( 'Your Search customization page requires JavaScript to function properly.', 'jetpack-search-pkg' ); ?></div> + </div> + <?php + } + + /** + * Loads assets for the customization experience. + */ + public function load_assets() { + $this->load_assets_with_parameters( Package::get_installed_path() ); + } + + /** + * Loads script and style assets according to parameters provided. + * + * @param string $package_base_path - Base path for the search package. + */ + public function load_assets_with_parameters( $package_base_path ) { + Tracking::register_tracks_functions_scripts( true ); + + Assets::register_script( + 'jp-search-configure', + 'build/customberg/jp-search-configure.js', + $package_base_path . '/src', // A full path to a file or a directory inside a plugin. + array( + 'css_dependencies' => array( + 'wp-components', + 'wp-block-editor', + ), + 'in_footer' => true, + 'textdomain' => 'jetpack-search-pkg', + ) + ); + Assets::enqueue_script( 'jp-search-configure' ); + + // Use wp_add_inline_script instead of wp_localize_script, see https://core.trac.wordpress.org/ticket/25280. + wp_add_inline_script( 'jp-search-configure', 'var JetpackInstantSearchOptions=JSON.parse(decodeURIComponent("' . rawurlencode( wp_json_encode( Helper::generate_initial_javascript_state() ) ) . '"));', 'before' ); + wp_add_inline_script( + 'jp-search-configure', + "window.jetpackSearchConfigureInit( 'jp-search-configure' )" + ); + } + + /** + * Determine if the requisite page should be added to wp-admin. + * + * @return boolean + */ + protected function should_add_page() { + $is_offline_mode = ( new Status() )->is_offline_mode(); + $is_connected = ( new Connection_Manager( Package::SLUG ) )->is_connected(); + $supports_search = ( new Plan() )->supports_instant_search(); + + return ( + ! $is_offline_mode && // Must be online. + $is_connected && // Must be connected. + $supports_search // Must have plan supporting Jetpack (Instant) Search. + ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/class-customizer.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/class-customizer.php new file mode 100644 index 00000000..c7f3d855 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/class-customizer.php @@ -0,0 +1,273 @@ +<?php +/** + * Jetpack Search Customizer Integration + * + * @package @automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search; + +use Automattic\Jetpack\Assets; +use WP_Customize_Color_Control; + +/** + * Class to customize search on the site. + */ +class Customizer { + + /** + * Class initialization. + */ + public function __construct() { + add_action( 'customize_register', array( $this, 'customize_register' ) ); + add_action( 'customize_controls_enqueue_scripts', array( $this, 'customize_controls_enqueue_scripts' ) ); + } + + /** + * Initialize Customizer controls. + * + * @param WP_Customize_Manager $wp_customize Customizer instance. + */ + public function customize_register( $wp_customize ) { + $section_id = 'jetpack_search'; + $setting_prefix = Options::OPTION_PREFIX; + + $wp_customize->add_section( + $section_id, + array( + 'title' => esc_html__( 'Jetpack Search', 'jetpack-search-pkg' ), + 'capability' => 'edit_theme_options', + 'priority' => 200, + ) + ); + + $id = $setting_prefix . 'color_theme'; + $wp_customize->add_setting( + $id, + array( + 'default' => 'light', + 'transport' => 'postMessage', + 'type' => 'option', + ) + ); + $wp_customize->add_control( + $id, + array( + 'label' => __( 'Theme', 'jetpack-search-pkg' ), + 'description' => __( 'Select a theme for your search overlay.', 'jetpack-search-pkg' ), + 'section' => $section_id, + 'type' => 'radio', + 'choices' => array( + 'light' => __( 'Light', 'jetpack-search-pkg' ), + 'dark' => __( 'Dark', 'jetpack-search-pkg' ), + ), + ) + ); + + $id = $setting_prefix . 'result_format'; + $wp_customize->add_setting( + $id, + array( + 'default' => 'minimal', + 'transport' => 'postMessage', + 'type' => 'option', + ) + ); + $wp_customize->add_control( + $id, + array( + 'label' => __( 'Result Format', 'jetpack-search-pkg' ), + 'description' => __( 'Choose how the search results look.', 'jetpack-search-pkg' ), + 'section' => $section_id, + 'type' => 'select', + 'choices' => array( + 'minimal' => __( 'Minimal', 'jetpack-search-pkg' ), + 'expanded' => __( 'Expanded (shows images)', 'jetpack-search-pkg' ), + 'product' => __( 'Product (for WooCommerce stores)', 'jetpack-search-pkg' ), + ), + ) + ); + + $id = $setting_prefix . 'default_sort'; + $wp_customize->add_setting( + $id, + array( + 'default' => 'relevance', + 'type' => 'option', + ) + ); + $wp_customize->add_control( + $id, + array( + 'choices' => array( + 'relevance' => __( 'Relevance (recommended)', 'jetpack-search-pkg' ), + 'newest' => __( 'Newest first', 'jetpack-search-pkg' ), + 'oldest' => __( 'Oldest first', 'jetpack-search-pkg' ), + ), + 'description' => __( 'Pick the initial sort for your search results.', 'jetpack-search-pkg' ), + 'label' => __( 'Default Sort', 'jetpack-search-pkg' ), + 'section' => $section_id, + 'type' => 'select', + ) + ); + + $id = $setting_prefix . 'overlay_trigger'; + $wp_customize->add_setting( + $id, + array( + 'default' => Options::OVERLAY_TRIGGER_IMMEDIATE, + 'transport' => 'postMessage', + 'type' => 'option', + ) + ); + $wp_customize->add_control( + $id, + array( + 'label' => __( 'Search Input Overlay Trigger', 'jetpack-search-pkg' ), + 'description' => __( 'Select when your overlay should appear.', 'jetpack-search-pkg' ), + 'section' => $section_id, + 'type' => 'select', + 'choices' => array( + Options::OVERLAY_TRIGGER_IMMEDIATE => __( 'Open when user starts typing', 'jetpack-search-pkg' ), + Options::OVERLAY_TRIGGER_RESULTS => __( 'Open when results are available', 'jetpack-search-pkg' ), + Options::OVERLAY_TRIGGER_SUBMIT => __( 'Open when user submits the form', 'jetpack-search-pkg' ), + ), + ) + ); + + $id = $setting_prefix . 'excluded_post_types'; + $wp_customize->add_setting( + $id, + array( + 'default' => '', + 'type' => 'option', + ) + ); + $wp_customize->add_control( + new Excluded_Post_Types_Control( + $wp_customize, + $id, + array( + 'description' => __( 'Choose post types to exclude from search results. You must leave at least one post type unchecked.', 'jetpack-search-pkg' ), + 'label' => __( 'Excluded Post Types', 'jetpack-search-pkg' ), + 'section' => $section_id, + ) + ) + ); + + $id = $setting_prefix . 'highlight_color'; + $wp_customize->add_setting( + $id, + array( + 'default' => '#FFC', + 'transport' => 'postMessage', + 'type' => 'option', + ) + ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + $id, + array( + 'label' => __( 'Highlight Search Terms', 'jetpack-search-pkg' ), + 'description' => __( 'Choose a color to highlight matching search terms.', 'jetpack-search-pkg' ), + 'section' => $section_id, + ) + ) + ); + + $id = $setting_prefix . 'additional_settings_placeholder'; + $wp_customize->add_setting( + $id, + array( 'type' => 'option' ) + ); + $wp_customize->add_control( + new Label_Control( + $wp_customize, + $id, + array( + 'label' => __( 'Additional Jetpack Search Settings', 'jetpack-search-pkg' ), + 'section' => $section_id, + ) + ) + ); + + $id = $setting_prefix . 'enable_sort'; + $wp_customize->add_setting( + $id, + array( + 'default' => '1', + 'sanitize_callback' => array( 'Automattic\Jetpack\Search\Helper', 'sanitize_checkbox_value' ), + 'sanitize_js_callback' => array( 'Automattic\Jetpack\Search\Helper', 'sanitize_checkbox_value_for_js' ), + 'transport' => 'postMessage', + 'type' => 'option', + ) + ); + $wp_customize->add_control( + $id, + array( + 'label' => __( 'Show sort selector', 'jetpack-search-pkg' ), + 'section' => $section_id, + 'type' => 'checkbox', + ) + ); + + $id = $setting_prefix . 'inf_scroll'; + $wp_customize->add_setting( + $id, + array( + 'default' => '1', + 'sanitize_callback' => array( 'Automattic\Jetpack\Search\Helper', 'sanitize_checkbox_value' ), + 'sanitize_js_callback' => array( 'Automattic\Jetpack\Search\Helper', 'sanitize_checkbox_value_for_js' ), + 'transport' => 'postMessage', + 'type' => 'option', + ) + ); + $wp_customize->add_control( + $id, + array( + 'type' => 'checkbox', + 'section' => $section_id, + 'label' => __( 'Enable infinite scrolling', 'jetpack-search-pkg' ), + ) + ); + + $id = $setting_prefix . 'show_powered_by'; + $wp_customize->add_setting( + $id, + array( + 'default' => '1', + 'sanitize_callback' => array( 'Automattic\Jetpack\Search\Helper', 'sanitize_checkbox_value' ), + 'sanitize_js_callback' => array( 'Automattic\Jetpack\Search\Helper', 'sanitize_checkbox_value_for_js' ), + 'transport' => 'postMessage', + 'type' => 'option', + ) + ); + $wp_customize->add_control( + $id, + array( + 'type' => 'checkbox', + 'section' => $section_id, + 'label' => __( 'Display "Powered by Jetpack"', 'jetpack-search-pkg' ), + ) + ); + } + + /** + * Enqueue assets for Customizer controls. + */ + public function customize_controls_enqueue_scripts() { + Assets::register_script( + 'jetpack-instant-search-customizer', + 'customize-controls/customize-controls.js', + __FILE__, + array( + 'css_path' => 'customize-controls/customize-controls.css', + 'dependencies' => array( 'customize-controls' ), + 'in_footer' => true, + 'textdomain' => 'jetpack-search-pkg', + ) + ); + Assets::enqueue_script( 'jetpack-instant-search-customizer' ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-excluded-post-types-control.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-excluded-post-types-control.css new file mode 100644 index 00000000..561f8e37 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-excluded-post-types-control.css @@ -0,0 +1,5 @@ +.customize-control-excluded-post-type-checkbox-container { + line-height: 1.6; + padding-top: 6px; + padding-bottom: 6px; +}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-excluded-post-types-control.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-excluded-post-types-control.js new file mode 100644 index 00000000..d3c48c7a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-excluded-post-types-control.js @@ -0,0 +1,23 @@ +/* eslint-disable no-var */ + +jQuery( document ).ready( function ( $ ) { + // Refresh our hidden field value if any checkboxes change + $( '.customize-control-excluded-post-type-checkbox' ).on( 'change', function () { + var $parent = $( this ).parent().parent(); + var newValue = $parent + .find( '.customize-control-excluded-post-type-checkbox:checked' ) + .map( function () { + return $( this ).val(); + } ) + .toArray(); + $parent.find( '.customize-control-excluded-post-types' ).val( newValue ).trigger( 'change' ); + + // Set the last unchecked checkbox disabled to prvevent user from excluding all post types + var excludedPostTypesCount = $parent.find( + '.customize-control-excluded-post-type-checkbox:not(:checked)' + ).length; + $parent + .find( '.customize-control-excluded-post-type-checkbox:not(:checked)' ) + .prop( 'disabled', excludedPostTypesCount <= 1 ); + } ); +} ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-excluded-post-types-control.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-excluded-post-types-control.php new file mode 100644 index 00000000..54f27a3a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-excluded-post-types-control.php @@ -0,0 +1,137 @@ +<?php +/** + * A multi-checkbox Customizer control for use with Jetpack Search configuration + * + * @package @automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search; + +use Automattic\Jetpack\Assets; +use WP_Customize_Control; + +if ( ! class_exists( 'WP_Customize_Control' ) ) { + return; +} + +/** + * Label Control class. + */ +class Excluded_Post_Types_Control extends WP_Customize_Control { + /** + * Control type. + * + * @since 8.8.0 + * @var string + */ + public $type = 'excluded-post-types'; + + /** + * Enqueue styles related to this control. + */ + public function enqueue() { + Assets::register_script( + 'jetpack-instant-search-customizer-excluded-post-types', + 'class-excluded-post-types-control.js', + __FILE__, + array( + 'css_path' => 'class-excluded-post-types-control.css', + 'dependencies' => array( 'customize-controls' ), + 'in_footer' => true, + 'textdomain' => 'jetpack-search-pkg', + ) + ); + Assets::enqueue_script( 'jetpack-instant-search-customizer-excluded-post-types' ); + } + + /** + * Checks if the post type has been selected. + * + * @since 8.8.0 + * @return array $post_types An array of strings representing post type names. + */ + public function get_arrayed_value() { + return explode( ',', $this->value() ); + } + + /** + * Generates a customizer settings ID for a given post type. + * + * @since 8.8.0 + * @param object $post_type Post type object returned from get_post_types. + * @return string $customizer_id Customizer setting ID. + */ + public function generate_post_type_customizer_id( $post_type ) { + return '_customize-post-type-input-' . $post_type->name; + } + + /** + * Checks if the post type has been selected. + * + * @since 8.8.0 + * @param object $post_type Post type object returned from get_post_types. + * @return array $ids Post type => post type customizer ID object. + */ + public function is_checked( $post_type ) { + return in_array( $post_type->name, $this->get_arrayed_value(), true ); + } + + /** + * Override rendering for custom class name; omit element ID. + */ + protected function render() { + $id = 'customize-control-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id ); + $class = 'customize-control customize-control-excluded-post-types'; + + printf( '<li id="%s" class="%s">', esc_attr( $id ), esc_attr( $class ) ); + $this->render_content(); + echo '</li>'; + } + + /** + * Override content rendering. + */ + protected function render_content() { + $post_types = get_post_types( array( 'exclude_from_search' => false ), 'objects' ); + if ( count( $post_types ) === 0 ) { + return; + } + ?> + <label class="customize-control-title"> + <?php echo esc_html( $this->label ); ?> + </label> + <?php if ( ! empty( $this->description ) ) : ?> + <span class="description customize-control-description"> + <?php echo esc_html( $this->description ); ?> + </span> + <?php endif ?> + <input + class="customize-control-excluded-post-types" + id="<?php echo esc_attr( $this->id ); ?>" + name="<?php echo esc_attr( $this->id ); ?>" + type="hidden" + value="<?php echo esc_attr( $this->value() ); ?>" + <?php $this->link(); ?> + /> + <?php + + $is_only_one_unchecked = ( count( $post_types ) - 1 ) === count( $this->get_arrayed_value() ); + + foreach ( $post_types as $post_type ) { + $input_id = Helper::generate_post_type_customizer_id( $post_type ); + ?> + <div class="customize-control-excluded-post-type-checkbox-container"> + <input + class="customize-control-excluded-post-type-checkbox" + id="<?php echo esc_attr( $input_id ); ?>" + type="checkbox" + value="<?php echo esc_attr( $post_type->name ); ?>" + <?php checked( $this->is_checked( $post_type ) ); ?> + <?php disabled( ! $this->is_checked( $post_type ) && $is_only_one_unchecked ); ?> + /> + <label for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_html( $post_type->label ); ?></label> + </div> + <?php + } + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-label-control.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-label-control.php new file mode 100644 index 00000000..c6b67775 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-label-control.php @@ -0,0 +1,45 @@ +<?php +/** + * A label-only Customizer control for use with Jetpack Search configuration + * + * @package automattic/jetpack + * @since 8.6.0 + */ + +namespace Automattic\Jetpack\Search; + +use WP_Customize_Control; + +if ( ! class_exists( 'WP_Customize_Control' ) ) { + return; +} +/** + * Label Control class. + */ +class Label_Control extends WP_Customize_Control { + /** + * Override rendering for custom class name; omit element ID. + */ + protected function render() { + echo '<li class="customize-control customize-label-control">'; + $this->render_content(); + echo '</li>'; + } + + /** + * Override content rendering. + */ + protected function render_content() { + if ( ! empty( $this->label ) ) : ?> + <label class="customize-control-title"> + <?php echo esc_html( $this->label ); ?> + </label> + <?php endif; ?> + <?php if ( ! empty( $this->description ) ) : ?> + <span class="description customize-control-description"> + <?php echo esc_html( $this->description ); ?> + </span> + <?php + endif; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/customize-controls.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/customize-controls.css new file mode 100644 index 00000000..ed2d42ad --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/customize-controls.css @@ -0,0 +1,19 @@ +/* For styling Label_Control */ +#sub-accordion-section-jetpack_search .customize-control { + margin-bottom: 14px; +} + +#sub-accordion-section-jetpack_search .customize-label-control, +#sub-accordion-section-jetpack_search .customize-control-checkbox { + margin-bottom: 0; +} + +#sub-accordion-section-jetpack_search .customize-control-checkbox ~ .customize-label-control { + margin-top: 12px; +} + +#sub-accordion-section-jetpack_search .customize-control-radio { + margin-bottom: 6px; + padding-bottom: 0; + padding-top: 0; +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/customize-controls.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/customize-controls.js new file mode 100644 index 00000000..69927727 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/customize-controls.js @@ -0,0 +1,46 @@ +/** + * Binds iframe messages from the Customizer to SearchApp. + * + * @param {boolean} expanded - whether jetpack_search section is expanded and visible. + */ +function postSectionMessage( expanded ) { + // window.wp.customize.previewer.preview is not available until both customize and customize.previewer are ready. + window.wp.customize.previewer.preview + .targetWindow() + .postMessage( { key: 'jetpackSearchSectionOpen', expanded: expanded }, '*' ); // Assume ES5 envorinment. +} + +/** + * Adds functionality for Jetpack Search section detection in the Customizer. + */ +function init() { + window.wp.customize.bind( 'ready', function () { + // window.wp.customize.previewer will emit 'ready' multiple times, not just during initialization. + window.wp.customize.previewer.bind( 'ready', function () { + // window.wp.customize.previewer.loading is deinstanced after initial load. + if ( window.wp.customize.previewer.loading ) { + window.wp.customize.previewer.loading.done( function () { + postSectionMessage( window.wp.customize.section( 'jetpack_search' ).expanded() ); + } ); + } + + // If the Jetpack Search section is opened/closed, emit a message to open/close the modal. + window.wp.customize.section( 'jetpack_search' ).expanded.bind( function () { + postSectionMessage( window.wp.customize.section( 'jetpack_search' ).expanded() ); + } ); + + // If Customizer values have changed while Jetpack Search section is open, emit a message to open the modal. + window.wp.customize.bind( 'change', function () { + if ( window.wp.customize.section( 'jetpack_search' ).expanded() ) { + postSectionMessage( true ); + } + } ); + } ); + } ); +} + +if ( document.readyState !== 'loading' ) { + init(); +} else { + document.addEventListener( 'DOMContentLoaded', init ); +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/class-dashboard.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/class-dashboard.php new file mode 100644 index 00000000..72797f84 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/class-dashboard.php @@ -0,0 +1,200 @@ +<?php +/** + * A class that adds a search dashboard to wp-admin. + * + * @package automattic/jetpack + */ + +namespace Automattic\Jetpack\Search; + +use Automattic\Jetpack\Admin_UI\Admin_Menu; +use Automattic\Jetpack\Assets; +use Automattic\Jetpack\Connection\Initial_State as Connection_Initial_State; +use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Status; +use Automattic\Jetpack\Tracking; +/** + * Responsible for adding a search dashboard to wp-admin. + * + * @package Automattic\Jetpack\Search + */ +class Dashboard { + /** + * Whether the class has been initialized + * + * @var boolean + */ + private static $initialized = false; + /** + * Plan instance + * + * @var Automattic\Jetpack\Search\Plan + */ + protected $plan; + + /** + * Connection manager instance + * + * @var Automattic\Jetpack\Connection\Manager + */ + protected $connection_manager; + + /** + * Module_Control instance + * + * @var Automattic\Jetpack\Search\Module_Control + */ + protected $module_control; + + /** + * Contructor + * + * @param Automattic\Jetpack\Search\Plan $plan - Plan instance. + * @param Automattic\Jetpack\Connection\Manager $connection_manager - Connection Manager instance. + * @param Automattic\Jetpack\Search\Module_Control $module_control - Module_Control instance. + */ + public function __construct( $plan = null, $connection_manager = null, $module_control = null ) { + $this->plan = $plan ? $plan : new Plan(); + $this->connection_manager = $connection_manager ? $connection_manager : new Connection_Manager( Package::SLUG ); + $this->module_control = $module_control ? $module_control : new Module_Control( $this->plan ); + $this->plan->init_hooks(); + } + + /** + * Initialise hooks. + * + * We use the `config` package to initialize the search package, which ensures the package is + * only initialized once. However earlier versions of Jetpack would still forcely initialize the + * dashboard. As a result, there would be two `Search` submenus if we don't ensure the dashboard + * is initialized only once. So we use `$initialized` to ensure the class is only initialized once. + * + * Ref: https://github.com/Automattic/jetpack/pull/21888/files#diff-aae7d66951585fc55053a4d53b68552a41864d2c69aee900574ef4404b7ad5f7L42 + */ + public function init_hooks() { + if ( ! self::$initialized ) { + self::$initialized = true; + // Jetpack uses 998 and 'Admin_Menu' uses 1000. + add_action( 'admin_menu', array( $this, 'add_wp_admin_submenu' ), 999 ); + // Check if the site plan changed and deactivate module accordingly. + add_action( 'current_screen', array( $this, 'check_plan_deactivate_search_module' ) ); + } + } + + /** + * The page to be added to submenu + */ + public function add_wp_admin_submenu() { + if ( ! $this->should_add_search_submenu() ) { + return; + } + + // Jetpack of version <= 10.5 would register `jetpack-search` submenu with its built-in search module. + $this->remove_search_submenu_if_exists(); + + $page_suffix = Admin_Menu::add_menu( + __( 'Search Settings', 'jetpack-search-pkg' ), + _x( 'Search', 'product name shown in menu', 'jetpack-search-pkg' ), + 'manage_options', + 'jetpack-search', + array( $this, 'render' ), + 100 + ); + + add_action( 'load-' . $page_suffix, array( $this, 'admin_init' ) ); + } + + /** + * Override render funtion + */ + public function render() { + ?> + <div id="jp-search-dashboard" class="jp-search-dashboard"> + <div class="hide-if-js"><?php esc_html_e( 'Your Search dashboard requires JavaScript to function properly.', 'jetpack-search-pkg' ); ?></div> + </div> + <?php + } + + /** + * Test whether we should show Search menu. + * + * @return {boolean} Show search sub menu or not. + */ + protected function should_add_search_submenu() { + /** + * The filter allows to ommit adding a submenu item for Jetpack Search. + * + * @since 0.11.2 + * + * @param boolean $should_add_search_submenu Default value is true. + */ + return apply_filters( 'jetpack_search_should_add_search_submenu', current_user_can( 'manage_options' ) ); + } + + /** + * Remove `jetpack-search` submenu page + */ + protected function remove_search_submenu_if_exists() { + remove_submenu_page( 'jetpack', 'jetpack-search' ); + } + + /** + * Initialize the admin resources. + */ + public function admin_init() { + add_action( 'admin_enqueue_scripts', array( $this, 'load_admin_scripts' ) ); + } + + /** + * Enqueue admin scripts. + */ + public function load_admin_scripts() { + if ( ! ( new Status() )->is_offline_mode() && $this->connection_manager->is_connected() ) { + // Required for Analytics. + Tracking::register_tracks_functions_scripts( true ); + } + + Assets::register_script( + 'jp-search-dashboard', + '../../build/dashboard/jp-search-dashboard.js', + __FILE__, + array( + 'in_footer' => true, + 'textdomain' => 'jetpack-search-pkg', + ) + ); + Assets::enqueue_script( 'jp-search-dashboard' ); + + // Add objects to be passed to the initial state of the app. + // Use wp_add_inline_script instead of wp_localize_script, see https://core.trac.wordpress.org/ticket/25280. + wp_add_inline_script( + 'jp-search-dashboard', + ( new Initial_State() )->render(), + 'before' + ); + + // Connection initial state. + wp_add_inline_script( + 'jp-search-dashboard', + Connection_Initial_State::render(), + 'before' + ); + } + + /** + * Deactivate search module if plan doesn't support search. + * + * @param WP_Screen $current_screen Creent screen object. + */ + public function check_plan_deactivate_search_module( $current_screen ) { + // Only run on Jetpack admin pages. + // The first two checks for current screen are cheap to run on every page. + if ( + property_exists( $current_screen, 'base' ) && + strpos( $current_screen->base, 'jetpack_page_' ) !== false && + ! $this->plan->supports_search() + ) { + $this->module_control->deactivate(); + } + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/class-initial-state.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/class-initial-state.php new file mode 100644 index 00000000..3f7f9e33 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/class-initial-state.php @@ -0,0 +1,164 @@ +<?php +/** + * The React initial state. + * + * @package automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search; + +use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Status; +use Jetpack_Options; + +/** + * The React initial state. + */ +class Initial_State { + /** + * Connection Manager + * + * @var Connection_Manager + */ + protected $connection_manager; + + /** + * Search Module Control + * + * @var Module_Control + */ + protected $module_control; + + /** + * Constructor + * + * @param Connection_Manager $connection_manager - Connection mananger instance. + * @param Module_Control $module_control - Module control instance. + */ + public function __construct( $connection_manager = null, $module_control = null ) { + $this->connection_manager = $connection_manager ? $connection_manager : new Connection_Manager( Package::SLUG ); + $this->module_control = $module_control ? $module_control : new Module_Control(); + } + + /** + * Render JS for the initial state + * + * @return string - JS string. + */ + public function render() { + return 'var JETPACK_SEARCH_DASHBOARD_INITIAL_STATE=JSON.parse(decodeURIComponent("' . rawurlencode( wp_json_encode( $this->get_initial_state() ) ) . '"));'; + } + + /** + * Get the initial state data. + * + * @return array + */ + public function get_initial_state() { + return array( + 'siteData' => array( + 'WP_API_root' => esc_url_raw( rest_url() ), + 'WP_API_nonce' => wp_create_nonce( 'wp_rest' ), + 'registrationNonce' => wp_create_nonce( 'jetpack-registration-nonce' ), + 'purchaseToken' => $this->get_purchase_token(), + /** + * Whether promotions are visible or not. + * + * @param bool $are_promotions_active Status of promotions visibility. True by default. + */ + 'showPromotions' => apply_filters( 'jetpack_show_promotions', true ), + 'adminUrl' => esc_url( admin_url() ), + 'blogId' => Jetpack_Options::get_option( 'id', 0 ), + 'version' => Package::VERSION, + 'calypsoSlug' => ( new Status() )->get_site_suffix(), + ), + 'userData' => array( + 'currentUser' => $this->current_user_data(), + ), + 'jetpackSettings' => array( + 'search' => $this->module_control->is_active(), + 'instant_search_enabled' => $this->module_control->is_instant_search_enabled(), + ), + 'features' => array_map( + 'sanitize_text_field', + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + isset( $_GET['features'] ) ? explode( ',', wp_unslash( $_GET['features'] ) ) : array() + ), + ); + } + + /** + * Gather data about the current user. + * + * @return array + */ + protected function current_user_data() { + $current_user = wp_get_current_user(); + $is_user_connected = $this->connection_manager->is_user_connected( $current_user->ID ); + $is_master_user = $is_user_connected && (int) $current_user->ID && (int) Jetpack_Options::get_option( 'master_user' ) === (int) $current_user->ID; + $dotcom_data = $this->connection_manager->get_connected_user_data(); + + $current_user_data = array( + 'isConnected' => $is_user_connected, + 'isMaster' => $is_master_user, + 'username' => $current_user->user_login, + 'id' => $current_user->ID, + 'wpcomUser' => $dotcom_data, + 'permissions' => array( + 'manage_options' => current_user_can( 'manage_options' ), + ), + ); + + return $current_user_data; + } + + /** + * Gets a purchase token that is used for Jetpack logged out visitor checkout. + * The purchase token should be appended to all CTA url's that lead to checkout. + * + * @return string|boolean + */ + protected function get_purchase_token() { + if ( ! $this->current_user_can_purchase() ) { + return false; + } + + $purchase_token = Jetpack_Options::get_option( 'purchase_token', false ); + + if ( $purchase_token ) { + return $purchase_token; + } + // If the purchase token is not saved in the options table yet, then add it. + Jetpack_Options::update_option( 'purchase_token', $this->generate_purchase_token(), true ); + return Jetpack_Options::get_option( 'purchase_token', false ); + } + + /** + * Generates a purchase token that is used for Jetpack logged out visitor checkout. + * + * @return string + */ + protected function generate_purchase_token() { + return wp_generate_password( 12, false ); + } + + /** + * Determine if the current user is allowed to make Jetpack purchases without + * a WordPress.com account + * + * @return boolean True if the user can make purchases, false if not + */ + public function current_user_can_purchase() { + // The site must be site-connected to Jetpack (no users connected). + if ( ! $this->connection_manager->is_site_connection() ) { + return false; + } + + // Make sure only administrators can make purchases. + if ( ! current_user_can( 'manage_options' ) ) { + return false; + } + + return true; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/actions/site-plan.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/actions/site-plan.js deleted file mode 100644 index b59c630e..00000000 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/actions/site-plan.js +++ /dev/null @@ -1,16 +0,0 @@ -export const SET_SEARCH_PLAN_INFO = 'SET_SEARCH_PLAN_INFO'; - -/** - * Action to set plan info - * - * @param {*} options - plan info. - * @returns {object} - an action object. - */ -export function setSearchPlanInfo( options ) { - return { - type: 'SET_SEARCH_PLAN_INFO', - options, - }; -} - -export default { setSearchPlanInfo }; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/controls.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/controls.js deleted file mode 100644 index 055f975c..00000000 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/controls.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Internal dependencies - */ -import restApi from '@automattic/jetpack-api'; - -export const FETCH_JETPACK_SETTINGS = 'FETCH_JETPACK_SETTINGS'; -export const UPDATE_JETPACK_SETTINGS = 'UPDATE_JETPACK_SETTINGS'; -export const FETCH_SEARCH_PLAN_INFO = 'FETCH_SEARCH_PLAN_INFO'; - -/** - * fetchJetpackSettings action - * - * @returns {object} - an action object. - */ -export const fetchJetpackSettings = () => { - return { - type: FETCH_JETPACK_SETTINGS, - }; -}; - -/** - * updateJetpackSettings action - * - * @param {*} settings - Jetpack settings object. - * @returns {object} - an action object. - */ -export const updateJetpackSettings = settings => { - return { - type: UPDATE_JETPACK_SETTINGS, - settings, - }; -}; - -/** - * fetchSearchPlanInfo action - * - * @returns {object} - an action object. - */ -export const fetchSearchPlanInfo = () => { - return { - type: FETCH_SEARCH_PLAN_INFO, - }; -}; - -export default { - [ FETCH_JETPACK_SETTINGS ]: function () { - return restApi.fetchSearchSettings(); - }, - [ UPDATE_JETPACK_SETTINGS ]: function ( action ) { - return restApi.updateSearchSettings( action.settings ); - }, - [ FETCH_SEARCH_PLAN_INFO ]: function () { - return restApi.fetchSearchPlanInfo(); - }, -}; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/reducer/site-plan.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/reducer/site-plan.js deleted file mode 100644 index 9fff3d43..00000000 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/reducer/site-plan.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Internal dependencies - */ -import { SET_SEARCH_PLAN_INFO } from '../actions/site-plan'; - -const sitePlan = ( state = {}, action ) => { - switch ( action.type ) { - case SET_SEARCH_PLAN_INFO: - return { - ...state, - ...action.options, - }; - } - - return state; -}; - -export default sitePlan; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/resolvers.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/resolvers.js deleted file mode 100644 index 3c5272bc..00000000 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/resolvers.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * External dependencies - */ -import { __ } from '@wordpress/i18n'; - -/** - * Internal dependencies - */ -import { fetchJetpackSettings, fetchSearchPlanInfo } from './controls'; -import { setJetpackSettings } from './actions/jetpack-settings'; -import { setSearchPlanInfo } from './actions/site-plan'; -import { errorNotice } from '../components/global-notices/store/actions'; - -/** - * Yield actions to get Search Module Status - * - * @yields {object} - an action object. - * @returns {object} - an action object. - */ -export function* getSearchModuleStatus() { - try { - const settings = yield fetchJetpackSettings(); - if ( settings ) { - return setJetpackSettings( settings ); - } - } catch ( e ) { - return errorNotice( __( 'Error fetching settings…', 'jetpack-search-pkg' ) ); - } -} - -/** - * Yield actions to get search plan info - * - * @yields {object} - an action object. - * @returns {object} - an action object. - */ -export function* getSearchPlanInfo() { - try { - const planInfo = yield fetchSearchPlanInfo(); - if ( planInfo ) { - return setSearchPlanInfo( planInfo ); - } - } catch ( e ) { - return errorNotice( __( 'Error fetching search plan…', 'jetpack-search-pkg' ) ); - } -} - -export default { getSearchModuleStatus, getSearchPlanInfo }; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/selectors/site-plan.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/selectors/site-plan.js deleted file mode 100644 index 32d24989..00000000 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/selectors/site-plan.js +++ /dev/null @@ -1,12 +0,0 @@ -const sitePlanSelectors = { - getSearchPlanInfo: state => state.sitePlan, - hasBusinessPlan: state => state.sitePlan.supports_only_classic_search, - hasActiveSearchPurchase: state => state.sitePlan.supports_instant_search, - supportsInstantSearch: state => state.sitePlan.supports_instant_search, - supportsOnlyClassicSearch: state => state.sitePlan.supports_only_classic_search, - getUpgradeBillPeriod: state => state.sitePlan?.default_upgrade_bill_period, - supportsSearch: state => - state.sitePlan.supports_instant_search || state.sitePlan.supports_only_classic_search, -}; - -export default sitePlanSelectors; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/initializers/class-initializer.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/initializers/class-initializer.php new file mode 100644 index 00000000..077d7be2 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/initializers/class-initializer.php @@ -0,0 +1,224 @@ +<?php +/** + * Initializer base class. + * + * @package @automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search; + +use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use WP_Error; +/** + * Base class for the initializer pattern. + */ +class Initializer { + + /** + * Initialize the search package. + * + * The method is called from the `Config` class. + */ + public static function init() { + // Load compatibility files - at this point all plugins are already loaded. + static::include_compatibility_files(); + + // Set up package version hook. + add_filter( 'jetpack_package_versions', __NAMESPACE__ . '\Package::send_version_to_tracker' ); + + /** + * The filter allows abortion of the Jetpack Search package initialization. + * + * @since 0.11.2 + * + * @param boolean $init_search_package Default value is true. + */ + if ( ! apply_filters( 'jetpack_search_init_search_package', true ) ) { + /** + * Fires when the Jetpack Search fails and would fallback to MySQL. + * + * @since Jetpack 7.9.0 + * @param string $reason Reason for Search fallback. + * @param mixed $data Data associated with the request, such as attempted search parameters. + */ + do_action( 'jetpack_search_abort', 'jetpack_search_init_search_package_filter', null ); + return; + } + + static::init_before_connection(); + + // Check whether Jetpack Search should be initialized in the first place . + if ( ! static::is_connected() || ! static::is_search_supported() ) { + /** This filter is documented in search/src/initalizers/class-initalizer.php */ + do_action( 'jetpack_search_abort', 'inactive', null ); + return; + } + + $blog_id = Helper::get_wpcom_site_id(); + if ( ! $blog_id ) { + /** This filter is documented in search/src/initalizers/class-initalizer.php */ + do_action( 'jetpack_search_abort', 'no_blog_id', null ); + return; + } + + if ( ! ( new Module_Control() )->is_active() ) { + /** This filter is documented in search/src/initalizers/class-initalizer.php */ + do_action( 'jetpack_search_abort', 'module_inactive', null ); + return; + } + + // Initialize search package. + if ( ! static::init_search( $blog_id ) ) { + /** This filter is documented in search/src/initalizers/class-initalizer.php */ + do_action( 'jetpack_search_abort', 'jetpack_search_init_search', null ); + return; + } + + /** + * Fires when the Jetpack Search package has been initialized. + * + * @since 0.11.2 + */ + do_action( 'jetpack_search_loaded' ); + } + + /** + * Extra tweaks to make Jetpack Search play well with others. + */ + public static function include_compatibility_files() { + if ( class_exists( 'Jetpack' ) ) { + require_once Package::get_installed_path() . 'compatibility/jetpack.php'; + } + } + + /** + * Init functionality required for connection. + */ + protected static function init_before_connection() { + // Set up Search API endpoints. + add_action( 'rest_api_init', array( new REST_Controller(), 'register_rest_routes' ) ); + // The dashboard has to be initialized before connection. + ( new Dashboard() )->init_hooks(); + } + + /** + * Init the search package. + * + * @param int $blog_id WPCOM blog ID. + */ + protected static function init_search( $blog_id ) { + // We could provide CLI to enable search/instant search, so init them regardless of whether the module is active or not. + static::init_cli(); + + $success = false; + if ( ( new Module_Control() )->is_instant_search_enabled() ) { + // Enable Instant search experience. + $success = static::init_instant_search( $blog_id ); + } else { + // Enable the classic search experience. + $success = static::init_classic_search( $blog_id ); + } + + if ( $success ) { + // registers Jetpack Search widget. + add_action( 'widgets_init', array( static::class, 'jetpack_search_widget_init' ) ); + } + + return $success; + } + + /** + * Init Instant Search and its dependencies. + * + * @param int $blog_id WPCOM blog ID. + */ + protected static function init_instant_search( $blog_id ) { + /** + * The filter allows abortion of the Instant Search initialization. + * + * @since 0.11.2 + * + * @param boolean $init_instant_search Default value is true. + */ + if ( ! apply_filters( 'jetpack_search_init_instant_search', true ) ) { + return; + } + + // Enable the instant search experience. + Instant_Search::initialize( $blog_id ); + // Register instant search configurables as WordPress settings. + new Settings(); + // Instantiate "Customberg", the live search configuration interface. + Customberg::instance(); + // Enable configuring instant search within the Customizer. + // Not need to check existence of `WP_Customize_Manager`, because which is not loaded all the time. + new Customizer(); + return true; + } + + /** + * Init Classic Search. + * + * @param int $blog_id WPCOM blog ID. + */ + protected static function init_classic_search( $blog_id ) { + /** + * The filter allows abortion of the Classic Search initialization. + * + * @since 0.11.2 + * + * @param boolean $init_instant_search Default value is true. + */ + if ( ! apply_filters( 'jetpack_search_init_classic_search', true ) ) { + return; + } + Classic_Search::initialize( $blog_id ); + return true; + } + + /** + * Register jetpack-search CLI if `\CLI` exists. + * + * @return void + */ + protected static function init_cli() { + if ( defined( 'WP_CLI' ) && \WP_CLI ) { + \WP_CLI::add_command( 'jetpack-search', __NAMESPACE__ . '\CLI' ); + } + } + + /** + * Register the widget if Jetpack Search is available and enabled. + */ + public static function jetpack_search_widget_init() { + register_widget( 'Automattic\Jetpack\Search\Search_Widget' ); + } + + /** + * Check if site has been connected. + */ + protected static function is_connected() { + return ( new Connection_Manager( Package::SLUG ) )->is_connected(); + } + + /** + * Check if search is supported by current plan. + */ + protected static function is_search_supported() { + return ( new Plan() )->supports_search(); + } + + /** + * Perform necessary initialization steps for classic and instant search in the constructor. + * + * @deprecated + */ + public static function initialize() { + return new WP_Error( + 'invalid-method', + /* translators: %s: Method name. */ + sprintf( __( "Method '%s' not implemented. Must be overridden in subclass.", 'jetpack-search-pkg' ), __METHOD__ ), + array( 'status' => 405 ) + ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/instant-search/class-instant-search.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/instant-search/class-instant-search.php new file mode 100644 index 00000000..a3cae73d --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/instant-search/class-instant-search.php @@ -0,0 +1,843 @@ +<?php +/** + * Instant Search: Our modern and customizable search experience. + * + * @package automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search; + +use Automattic\Jetpack\Assets; +use WP_Block_Parser; +use WP_Block_Patterns_Registry; +use WP_Error; +use WP_REST_Templates_Controller; + +/** + * Class responsible for enabling the Instant Search experience on the site. + */ +class Instant_Search extends Classic_Search { + /** + * The name of instant search sidebar + * + * @since 9.8.0 + * @var string + */ + const INSTANT_SEARCH_SIDEBAR = 'jetpack-instant-search-sidebar'; + + const AUTO_CONFIG_SIDEBAR = 'sidebar-1'; + + /** + * The singleton instance of this class. + * Instant_Search shouldn't share the variable with its parent. + * + * @var Instant_Search + */ + private static $instance; + + /** + * Variable to save old sidebars_widgets value. + * + * The value is set when action `after_switch_theme` is applied and cleared on filter `pre_update_option_sidebars_widgets`. + * The filters mentioned above run on /wp-admin/themes.php?activated=true, a request closely following switching theme. + * + * @since 9.8.0 + * + * @var array + */ + protected $old_sidebars_widgets; + + /** + * Returns a class singleton. Initializes with first-time setup if given a blog ID parameter. + * + * @param string $blog_id Blog id. + * @return static The class singleton. + */ + public static function instance( $blog_id = null ) { + if ( ! isset( self::$instance ) ) { + if ( null === $blog_id ) { + $blog_id = Helper::get_wpcom_site_id(); + } + self::$instance = new static(); + self::$instance->setup( $blog_id ); + } + return self::$instance; + } + + /** + * Setup the various hooks needed for the plugin to take over search duties. + * + * @since 5.0.0 + */ + public function init_hooks() { + if ( ! is_admin() ) { + add_filter( 'posts_pre_query', array( $this, 'filter__posts_pre_query' ), 10, 2 ); + + add_action( 'init', array( $this, 'set_filters_from_widgets' ) ); + + add_action( 'wp_enqueue_scripts', array( $this, 'load_assets' ) ); + add_action( 'wp_footer', array( 'Automattic\Jetpack\Search\Helper', 'print_instant_search_sidebar' ) ); + add_filter( 'body_class', array( $this, 'add_body_class' ), 10 ); + } else { + add_action( 'update_option', array( $this, 'track_widget_updates' ), 10, 3 ); + } + + /** + * Note: + * 1. The priority has to be lower than 10 to run before _wp_sidebars_changed. + * Which migrates widgets from old theme to the new one. + * 2. WP.com runs after_switch_theme hook from the frontend, so we'll need to hook it. + * No matter it's admin or frontend. + */ + add_action( 'after_switch_theme', array( $this, 'save_old_sidebars_widgets' ), 5, 0 ); + add_action( 'pre_update_option_sidebars_widgets', array( $this, 'remove_wp_migrated_widgets' ) ); + + add_action( 'widgets_init', array( $this, 'register_jetpack_instant_sidebar' ) ); + add_action( 'jetpack_deactivate_module_search', array( $this, 'move_search_widgets_to_inactive' ) ); + } + + /** + * Loads assets for Jetpack Instant Search Prototype featuring Search As You Type experience. + */ + public function load_assets() { + $this->load_assets_with_parameters( Package::get_installed_path() ); + } + + /** + * Loads assets according to parameters provided. + * + * @param string $package_base_path - Base path for the search package. + */ + public function load_assets_with_parameters( $package_base_path ) { + Assets::register_script( + 'jetpack-instant-search', + 'build/instant-search/jp-search.js', + $package_base_path . '/src', // A full path to a file or a directory inside a plugin. + array( + 'dependencies' => array( 'wp-i18n' ), + 'in_footer' => true, + 'textdomain' => 'jetpack-search-pkg', + ) + ); + Assets::enqueue_script( 'jetpack-instant-search' ); + $this->load_and_initialize_tracks(); + $this->inject_javascript_options(); + } + + /** + * Passes all options to the JS app. + */ + protected function inject_javascript_options() { + $options = Helper::generate_initial_javascript_state(); + // Use wp_add_inline_script instead of wp_localize_script, see https://core.trac.wordpress.org/ticket/25280. + wp_add_inline_script( 'jetpack-instant-search', 'var JetpackInstantSearchOptions=JSON.parse(decodeURIComponent("' . rawurlencode( wp_json_encode( $options ) ) . '"));', 'before' ); + } + + /** + * Registers a widget sidebar for Instant Search. + */ + public function register_jetpack_instant_sidebar() { + $args = array( + 'name' => __( 'Jetpack Search Sidebar', 'jetpack-search-pkg' ), + 'id' => self::INSTANT_SEARCH_SIDEBAR, + 'description' => __( 'Customize the sidebar inside the Jetpack Search overlay', 'jetpack-search-pkg' ), + 'class' => '', + 'before_widget' => '<div id="%1$s" class="widget %2$s">', + 'after_widget' => '</div>', + 'before_title' => '<h2 class="widgettitle">', + 'after_title' => '</h2>', + ); + register_sidebar( $args ); + } + + /** + * Loads scripts for Tracks analytics library + */ + public function load_and_initialize_tracks() { + wp_enqueue_script( 'jp-tracks', '//stats.wp.com/w.js', array(), gmdate( 'YW' ), true ); + } + + /** + * Bypass the normal Search query since we will run it with instant search. + * + * @since 8.3.0 + * + * @param array $posts Current array of posts (still pre-query). + * @param WP_Query $query The WP_Query being filtered. + * + * @return array Array of matching posts. + */ + public function filter__posts_pre_query( $posts, $query ) { + if ( ! $this->should_handle_query( $query ) ) { + // Intentionally not adding the 'jetpack_search_abort' action since this should fire for every request except for search. + return $posts; + } + + /** + * Bypass the main query and return dummy data + * WP Core doesn't call the set_found_posts and its filters when filtering + * posts_pre_query like we do, so need to do these manually. + */ + $query->found_posts = 1; + $query->max_num_pages = 1; + + return array(); + } + + /** + * Run the aggregations API query for any filtering + * + * @since 8.3.0 + */ + public function fetch_search_result_if_empty() { + if ( ! empty( $this->search_result ) ) { + return; + } + + if ( is_admin() ) { + return; + } + + if ( empty( $this->aggregations ) ) { + return; + } + + $builder = new WPES\Query_Builder(); + $this->add_aggregations_to_es_query_builder( $this->aggregations, $builder ); + $this->search_result = $this->instant_api( + array( + 'aggregations' => $builder->build_aggregation(), + 'size' => 0, + 'from' => 0, + ) + ); + } + + /** + * Run an instant search on the WordPress.com public API. + * + * @since 8.3.0 + * + * @param array $args Args conforming to the WP.com v1.3/sites/<blog_id>/search endpoint. + * + * @return object|WP_Error The response from the public API, or a WP_Error. + */ + public function instant_api( array $args ) { + global $wp_version; + $start_time = microtime( true ); + + // Cache locally to avoid remote request slowing the page. + $transient_name = 'jetpack_instant_search_cache_' . md5( wp_json_encode( $args ) ); + $cache = get_transient( $transient_name ); + if ( false !== $cache ) { + return $cache; + } + + $service_url = add_query_arg( + $args, + sprintf( + 'https://public-api.wordpress.com/rest/v1.3/sites/%d/search', + $this->jetpack_blog_id + ) + ); + + $request_args = array( + 'timeout' => 10, + 'user-agent' => "WordPress/{$wp_version} | Jetpack-Search/" . Package::VERSION, + ); + + $request = wp_remote_get( esc_url_raw( $service_url ), $request_args ); + $end_time = microtime( true ); + + if ( is_wp_error( $request ) ) { + return $request; + } + + $response_code = wp_remote_retrieve_response_code( $request ); + $response = json_decode( wp_remote_retrieve_body( $request ), true ); + + if ( ! $response_code || $response_code < 200 || $response_code >= 300 ) { + /** + * Fires after a search query request has failed + * + * @module search + * + * @since 5.6.0 + * + * @param array Array containing the response code and response from the failed search query + */ + do_action( + 'failed_jetpack_search_query', + array( + 'response_code' => $response_code, + 'json' => $response, + ) + ); + + return new WP_Error( 'invalid_search_api_response', 'Invalid response from API - ' . $response_code ); + } + + $took = is_array( $response ) && ! empty( $response['took'] ) + ? $response['took'] + : null; + + $query = array( + 'args' => $args, + 'response' => $response, + 'response_code' => $response_code, + 'elapsed_time' => ( $end_time - $start_time ) * 1000, // Convert from float seconds to ms. + 'es_time' => $took, + 'url' => $service_url, + ); + + /** + * Fires after a search request has been performed. + * + * Includes the following info in the $query parameter: + * + * array args Array of Elasticsearch arguments for the search + * array response Raw API response, JSON decoded + * int response_code HTTP response code of the request + * float elapsed_time Roundtrip time of the search request, in milliseconds + * float es_time Amount of time Elasticsearch spent running the request, in milliseconds + * string url API url that was queried + * + * @module search + * + * @since 5.0.0 + * @since 5.8.0 This action now fires on all queries instead of just successful queries. + * + * @param array $query Array of information about the query performed + */ + do_action( 'did_jetpack_search_query', $query ); + + // Update local cache. + set_transient( $transient_name, $response, 1 * HOUR_IN_SECONDS ); + + return $response; + } + + /** + * Get the raw Aggregation results from the Elasticsearch response. + * + * @since 8.4.0 + * + * @return array Array of Aggregations performed on the search. + */ + public function get_search_aggregations_results() { + $this->fetch_search_result_if_empty(); + if ( empty( $this->search_result ) || is_wp_error( $this->search_result ) || ! isset( $this->search_result['aggregations'] ) ) { + return array(); + } + + return $this->search_result['aggregations']; + } + + /** + * Automatically configure necessary settings for instant search + * + * @since 8.3.0 + */ + public function auto_config_search() { + $this->auto_config_excluded_post_types(); + $this->auto_config_overlay_sidebar_widgets(); + $this->auto_config_theme_sidebar_search_widget(); + $this->auto_config_result_format(); + } + + /** + * Auto config search widget or block for current theme. + */ + public function auto_config_theme_sidebar_search_widget() { + if ( \current_theme_supports( 'block-templates' ) ) { + $this->auto_config_fse_theme_footer_search_block(); + } else { + $this->auto_config_non_fse_theme_sidebar_search_widget(); + } + } + + /** + * Automatically copy configured search widgets from theme sidebar to the overlay sidebar. + * If there's nothing to copy, we create one. + * + * @since 8.8.0 + */ + public function auto_config_overlay_sidebar_widgets() { + $sidebars = get_option( 'sidebars_widgets', array() ); + list(,$sidebar_jp_searchbox_wiget_id ) = $this->get_search_widget_indices( $sidebars, self::INSTANT_SEARCH_SIDEBAR ); + // If there's JP search widget in overly sidebar, abort. + if ( false !== $sidebar_jp_searchbox_wiget_id ) { + return; + } + + // Init overlay sidebar if it doesn't exists. + if ( ! isset( $sidebars[ self::INSTANT_SEARCH_SIDEBAR ] ) ) { + $sidebars[ self::INSTANT_SEARCH_SIDEBAR ] = array(); + } + + $widget_opt_name = Helper::get_widget_option_name(); + $widget_options = get_option( $widget_opt_name, array() ); + + $next_id = $this->get_next_jp_search_widget_id( $widget_options ); + + list(,$sidebar_jp_searchbox_wiget_id ) = $this->get_search_widget_indices( $sidebars, self::AUTO_CONFIG_SIDEBAR ); + if ( false !== $sidebar_jp_searchbox_wiget_id && isset( $widget_options[ $sidebar_jp_searchbox_wiget_id ] ) ) { + // If there is a JP search widget in the theme sidebar, copy it over to the search overlay sidebar. + $widget_options[ $next_id ] = $widget_options[ $sidebar_jp_searchbox_wiget_id ]; + } else { + // If JP Search widget doesn't exist in the theme sidebar, we have nothing to copy from, so we create a new one within the overlay sidebar. + $widget_options[ $next_id ] = $this->get_preconfig_widget_options(); + } + array_unshift( $sidebars[ self::INSTANT_SEARCH_SIDEBAR ], Helper::build_widget_id( $next_id ) ); + update_option( $widget_opt_name, $widget_options ); + update_option( 'sidebars_widgets', $sidebars ); + return true; + } + + /** + * Add JP Search widget on top of theme sidebar. + * Or Replace core search widget in theme sidebar if exists. + */ + public function auto_config_non_fse_theme_sidebar_search_widget() { + $sidebars = get_option( 'sidebars_widgets', array() ); + if ( ! isset( $sidebars[ self::AUTO_CONFIG_SIDEBAR ] ) ) { + return; + } + + list( $sidebar_searchbox_idx,$sidebar_jp_searchbox_wiget_id ) = $this->get_search_widget_indices( $sidebars ); + // If there's JP search widget in theme sidebar, abort. + if ( false !== $sidebar_jp_searchbox_wiget_id ) { + return; + } + + $widget_opt_name = Helper::get_widget_option_name(); + $widget_options = get_option( $widget_opt_name, array() ); + + list($sidebar_searchbox_idx, ) = $this->get_search_widget_indices( $sidebars ); + $next_id = $this->get_next_jp_search_widget_id( $widget_options ); + $preconfig_opts = $this->get_preconfig_widget_options(); + + $widget_options[ $next_id ] = $preconfig_opts; + if ( false !== $sidebar_searchbox_idx ) { + // Replace core search widget with JP search widget. + $sidebars[ self::AUTO_CONFIG_SIDEBAR ][ $sidebar_searchbox_idx ] = Helper::build_widget_id( $next_id ); + } else { + // Add JP Search widget to top. + array_unshift( $sidebars[ self::AUTO_CONFIG_SIDEBAR ], Helper::build_widget_id( $next_id ) ); + } + + update_option( $widget_opt_name, $widget_options ); + update_option( 'sidebars_widgets', $sidebars ); + return true; + } + + /** + * Get the next ID for the Jetpack Search widget, which is equivalent to the last JP Search widget ID + 1. + * + * @param array $widget_options - jetpack widget option value. + * + * @return int + */ + public function get_next_jp_search_widget_id( $widget_options ) { + return ! empty( $widget_options ) ? max( + array_map( + function ( $val ) { + return intval( $val ); + }, + array_keys( $widget_options ) + ) + ) + 1 : 1; + } + + /** + * Get search and JP Search widget indices in theme sidebar. + * + * @param array $sidebars - theme `sidebars_widgets` option value. + * @param string $sidebar_id - the sidebar id to search on. + * + * @return array - core search widget index and JP search widget id. + */ + protected function get_search_widget_indices( $sidebars, $sidebar_id = 'sidebar-1' ) { + $sidebar_searchbox_idx = false; + $sidebar_jp_searchbox_id = false; + if ( isset( $sidebars[ $sidebar_id ] ) ) { + foreach ( (array) $sidebars[ $sidebar_id ] as $idx => $widget_id ) { + if ( $this->widget_has_search_block( $widget_id ) ) { + // The array index of wp search widget. + $sidebar_searchbox_idx = $idx; + } + if ( 0 === strpos( $widget_id, Helper::FILTER_WIDGET_BASE ) ) { + // The id of Jetpack Search widget. + $sidebar_jp_searchbox_id = str_replace( Helper::FILTER_WIDGET_BASE . '-', '', $widget_id ); + } + } + } + return array( $sidebar_searchbox_idx, $sidebar_jp_searchbox_id ); + } + + /** + * Returns true if search widget or block exists in widgets + * + * @param string $widget_id - widget ID. + */ + protected function widget_has_search_block( $widget_id ) { + // test search widget. + if ( 0 === strpos( $widget_id, 'search-' ) ) { + return true; + } + // test search block widget. + if ( 0 === strpos( $widget_id, 'block-' ) ) { + $widget_blocks = get_option( 'widget_block', array() ); + $widget_index = str_replace( 'block-', '', $widget_id ); + // A single block could be of type string or array. + if ( isset( $widget_blocks[ $widget_index ]['content'] ) && false !== strpos( (string) $widget_blocks[ $widget_index ]['content'], 'wp:search' ) ) { + return true; + } + if ( isset( $widget_blocks[ $widget_index ] ) && is_string( $widget_blocks[ $widget_index ] ) && false !== strpos( $widget_blocks[ $widget_index ], 'wp:search' ) ) { + return true; + } + } + return false; + } + + /** + * Returns true if $block_content has core search block + * + * @param string $block_content - Block content. + * + * @return boolean + */ + public static function content_has_search_block( $block_content ) { + return preg_match( '/(<!--\swp:search\s[^>]*-->)/i', $block_content ) > 0; + } + + /** + * Add a search widget above footer for block templates. + */ + public function auto_config_fse_theme_footer_search_block() { + if ( ! class_exists( 'WP_REST_Templates_Controller' ) ) { + return; + } + // We currently check only for a core search block. + // In the future, we will need to check for a Jetpack Search block once it's available. + if ( $this->template_parts_have_search_block() ) { + return; + } + + $footer = $this->get_template_part( 'footer' ); + if ( ! $footer instanceof \WP_Block_Template ) { + return; + } + + $content = $this->replace_block_patterns( $footer->content ); + $template_part_id = $footer->id; + $request = new \WP_REST_Request( 'PUT', "/wp/v2/template-parts/{$template_part_id}" ); + $request->set_header( 'content-type', 'application/json' ); + $request->set_param( 'content', static::inject_search_widget_to_block( $content ) ); + $request->set_param( 'id', $template_part_id ); + $controller = new WP_REST_Templates_Controller( 'wp_template_part' ); + return $controller->update_item( $request ); + } + + /** + * Replace pattern blocks with their content. + * We don't want to replace recursively for the sake of simplicity. + * + * @param string $block_content - Content of template part. + */ + protected function replace_block_patterns( $block_content ) { + $matches = array(); + if ( preg_match( '/<!--\s*wp:pattern\s+{.*}\s*\/-->/', $block_content, $matches ) > 0 ) { + foreach ( $matches as $match ) { + $pattern_content = $this->get_block_pattern_content( $match ); + $block_content = str_replace( $match, $pattern_content, $block_content ); + } + } + return $block_content; + } + + /** + * Extracts block content only if it consists of a single pattern block. + * + * @param string $block_pattern - Block content. + */ + protected function get_block_pattern_content( $block_pattern ) { + if ( ! class_exists( 'WP_Block_Parser' ) || ! class_exists( 'WP_Block_Patterns_Registry' ) ) { + return $block_pattern; + } + $blocks = ( new WP_Block_Parser() )->parse( $block_pattern ); + if ( 1 === count( $blocks ) && 'core/pattern' === $blocks[0]['blockName'] ) { + $slug = $blocks[0]['attrs']['slug']; + $registry = WP_Block_Patterns_Registry::get_instance(); + if ( $registry->is_registered( $slug ) ) { + $pattern = $registry->get_registered( $slug ); + return $pattern['content']; + } + } + return $block_pattern; + } + + /** + * Get template part for current theme. + * + * @param string $template_part_name - header, footer, home etc. + * + * @return \WP_Block_Template + */ + protected function get_template_part( $template_part_name ) { + // Check whether block theme functions exist. + if ( ! function_exists( 'get_block_template' ) ) { + return null; + } + $active_theme = \wp_get_theme()->get_stylesheet(); + $template_part_id = "{$active_theme}//{$template_part_name}"; + $template_part = \get_block_template( $template_part_id, 'wp_template_part' ); + if ( is_wp_error( $template_part ) || empty( $template_part ) ) { + return null; + } + return $template_part; + } + + /** + * Returns true if 'header', 'footer' or 'home' has core search block + * + * @return boolean + */ + protected function template_parts_have_search_block() { + $template_part_names = array( 'header', 'footer', 'home' ); + foreach ( $template_part_names as $part_name ) { + $part = $this->get_template_part( $part_name ); + if ( $part instanceof \WP_Block_Template && static::content_has_search_block( $part->content ) ) { + return true; + } + } + return false; + } + + /** + * Append Search block to block if no 'wp:search' exists already. + * + * @param {string} $block_content - the content to append the search block. + */ + public static function inject_search_widget_to_block( $block_content ) { + $search_block = sprintf( + '<!-- wp:search {"label":"","buttonText":"%s"} /-->', + __( 'Search', 'jetpack-search-pkg' ) + ); + + // Place the search block on bottom of the first column if there's any. + $column_end_pattern = '/(<\s*\/div[^>]*>\s*<!--\s*\/wp:column\s+[^>]*-->)/'; + if ( preg_match( $column_end_pattern, $block_content ) ) { + return preg_replace( $column_end_pattern, "\n" . $search_block . "\n$1", $block_content, 1 ); + } + + // Place the search block on top of footer contents in the most inner group. + $group_start_pattern = '/((<!--\s*wp:group\s[^>]*-->[.\s]*<\s*div[^>]*>\s*)+)/'; + if ( preg_match( $group_start_pattern, $block_content, $matches ) ) { + return preg_replace( $group_start_pattern, "$1\n" . $search_block . "\n", $block_content, 1 ); + } + + return $block_content; + } + + /** + * Autoconfig search by adding filter widgets + * + * @since 8.4.0 + * + * @return array Array of config settings for search widget. + */ + protected function get_preconfig_widget_options() { + $settings = array( + 'title' => '', + 'filters' => array(), + ); + + $post_types = get_post_types( + array( + 'public' => true, + '_builtin' => false, + ) + ); + + if ( ! empty( $post_types ) ) { + $settings['filters'][] = array( + 'name' => '', + 'type' => 'post_type', + 'count' => 5, + ); + } + + // Grab a maximum of 3 taxonomies. + $taxonomies = array_slice( + get_taxonomies( + array( + 'public' => true, + '_builtin' => false, + ) + ), + 0, + 3 + ); + + foreach ( $taxonomies as $t ) { + $settings['filters'][] = array( + 'name' => '', + 'type' => 'taxonomy', + 'taxonomy' => $t, + 'count' => 5, + ); + } + + $settings['filters'][] = array( + 'name' => '', + 'type' => 'taxonomy', + 'taxonomy' => 'category', + 'count' => 5, + ); + + $settings['filters'][] = array( + 'name' => '', + 'type' => 'taxonomy', + 'taxonomy' => 'post_tag', + 'count' => 5, + ); + + $settings['filters'][] = array( + 'name' => '', + 'type' => 'date_histogram', + 'count' => 5, + 'field' => 'post_date', + 'interval' => 'year', + ); + + return $settings; + } + + /** + * Automatically configure post types to exclude from one of the search widgets. + * Used primarily for backward compatibility with older Jetpack plugins, which used to store excluded post type configuration within the Jetpack Search plugin instead of as an option. + * + * @since 8.8.0 + */ + public function auto_config_excluded_post_types() { + // if `excluded_post_types` exists, then we do nothing. + if ( false !== get_option( Options::OPTION_PREFIX . 'excluded_post_types', false ) ) { + return; + } + $post_types = get_post_types( + array( + 'exclude_from_search' => false, + 'public' => true, + ) + ); + $enabled_post_types = array(); + $widget_options = get_option( Helper::get_widget_option_name(), array() ); + + // Prior to Jetpack 8.8, post types were enabled via Jetpack Search widgets rather than disabled via the Customizer. + // To continue supporting post types set up in the old way, we iterate through each Jetpack Search + // widget configuration and append each enabled post type to $enabled_post_types. + foreach ( $widget_options as $widget_option ) { + if ( isset( $widget_option['post_types'] ) && is_array( $widget_option['post_types'] ) ) { + foreach ( $widget_option['post_types'] as $enabled_post_type ) { + $enabled_post_types[ $enabled_post_type ] = $enabled_post_type; + } + } + } + + if ( ! empty( $enabled_post_types ) ) { + $post_types_to_disable = array_diff( $post_types, $enabled_post_types ); + // better to use `add_option` which wouldn't override option value if exists. + add_option( Options::OPTION_PREFIX . 'excluded_post_types', join( ',', $post_types_to_disable ) ); + } + } + + /** + * Automatically set result format. + * + * @since 9.6.0 + */ + public function auto_config_result_format() { + $result_format_option_name = Options::OPTION_PREFIX . 'result_format'; + // Default format `expanded`. + $result_format_option_value = Options::RESULT_FORMAT_EXPANDED; + + // Result format already set, skip. + if ( get_option( $result_format_option_name, false ) ) { + return; + } + + // Check if WooCommerce plugin is active (based on https://docs.woocommerce.com/document/create-a-plugin/). + if ( in_array( + 'woocommerce/woocommerce.php', + apply_filters( 'active_plugins', Helper::get_active_plugins() ), + true + ) ) { + $result_format_option_value = Options::RESULT_FORMAT_PRODUCT; + } + + update_option( $result_format_option_name, $result_format_option_value ); + return true; + } + + /** + * Save sidebars_widgets option before it's migrated by WordPress + * + * @since 9.8.0 + * + * @param array $old_sidebars_widgets The sidebars_widgets option value to be saved. + */ + public function save_old_sidebars_widgets( $old_sidebars_widgets = null ) { + // The function should only run before _wp_sidebars_changed which migrates the sidebars. + // So when _wp_sidebars_changed doesn't exist, we should skip the logic. + if ( has_filter( 'after_switch_theme', '_wp_sidebars_changed' ) !== false ) { + $this->old_sidebars_widgets = $old_sidebars_widgets !== null ? $old_sidebars_widgets : wp_get_sidebars_widgets(); + } + } + + /** + * Clean WordPress auto-migrated sidebar widgets from instant search sidebar before saving option sidebars_widgets + * + * @since 9.8.0 + * + * @param array $sidebars_widgets The sidebars_widgets option value to be filtered. + * @return array The sidebars_widgets option value to be saved + */ + public function remove_wp_migrated_widgets( $sidebars_widgets ) { + // Hook the action only when it is a theme switch i.e. $this->old_sidebars_widgets is not empty. + // Ensure that the hook only runs when necessary. + if ( + empty( $this->old_sidebars_widgets ) + || ! is_array( $this->old_sidebars_widgets ) + || ! is_array( $sidebars_widgets ) + || ! array_key_exists( static::INSTANT_SEARCH_SIDEBAR, $sidebars_widgets ) + || ! array_key_exists( static::INSTANT_SEARCH_SIDEBAR, $this->old_sidebars_widgets ) + // If the new Jetpack sidebar already has fewer widgets, skip execution. + // Uses less than comparison for defensive programming. + || count( $sidebars_widgets[ static::INSTANT_SEARCH_SIDEBAR ] ) <= count( $this->old_sidebars_widgets[ static::INSTANT_SEARCH_SIDEBAR ] ) + ) { + return $sidebars_widgets; + } + + $lost_widgets = array_diff( $sidebars_widgets[ static::INSTANT_SEARCH_SIDEBAR ], $this->old_sidebars_widgets[ static::INSTANT_SEARCH_SIDEBAR ] ); + $sidebars_widgets['wp_inactive_widgets'] = array_merge( $lost_widgets, (array) $sidebars_widgets['wp_inactive_widgets'] ); + $sidebars_widgets[ static::INSTANT_SEARCH_SIDEBAR ] = $this->old_sidebars_widgets[ static::INSTANT_SEARCH_SIDEBAR ]; + + // Reset $this->old_sidebars_widgets because we want to run the function only once after theme switch. + $this->old_sidebars_widgets = null; + + return $sidebars_widgets; + } + + /** + * Add current theme name as a body class for easier override + * + * @param string[] $classes An array of body class names. + * + * @return string[] The array of classes after filtering + */ + public function add_body_class( $classes ) { + $classes[] = 'jps-theme-' . get_stylesheet(); + return $classes; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/class-search-widget.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/class-search-widget.php new file mode 100644 index 00000000..814cd7b2 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/class-search-widget.php @@ -0,0 +1,1057 @@ +<?php +/** + * Jetpack Search widget. + * + * @package automattic/jetpack-search + */ + +namespace Automattic\Jetpack\Search; + +use Automattic\Jetpack\Assets; +use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Redirect; +use Automattic\Jetpack\Status; +use Automattic\Jetpack\Tracking; + +/** + * Provides a widget to show available/selected filters on searches. + * + * @since 5.0.0 + * + * @see WP_Widget + */ +class Search_Widget extends \WP_Widget { + + /** + * Number of aggregations (filters) to show by default. + * + * @since 5.8.0 + * @var int + */ + const DEFAULT_FILTER_COUNT = 5; + /** + * Default sort order for search results. + * + * @since 5.8.0 + * @var string + */ + const DEFAULT_SORT = 'relevance_desc'; + /** + * The Jetpack_Search instance. + * + * @since 5.7.0 + * @var Jetpack_Search + */ + protected $jetpack_search; + /** + * Module_Control instance + * + * @var Module_Control + */ + protected $module_control; + + /** + * Search_Widget constructor. + * + * @param string $name Widget name. + * @since 5.0.0 + */ + public function __construct( $name = null ) { + if ( empty( $name ) ) { + $name = esc_html__( 'Search', 'jetpack-search-pkg' ); + } + $this->module_control = new Module_Control(); + parent::__construct( + Helper::FILTER_WIDGET_BASE, + /** This filter is documented in modules/widgets/facebook-likebox.php */ + apply_filters( 'jetpack_widget_name', $name ), + array( + 'classname' => 'jetpack-filters widget_search', + 'description' => __( 'Instant search and filtering to help visitors quickly find relevant answers and explore your site.', 'jetpack-search-pkg' ), + ) + ); + + if ( + Helper::is_active_widget( $this->id ) && + ! $this->is_search_active() + ) { + $this->activate_search(); + } + + if ( is_admin() ) { + add_action( 'sidebar_admin_setup', array( $this, 'widget_admin_setup' ) ); + } else { + add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend_scripts' ) ); + } + + add_action( 'jetpack_search_render_filters_widget_title', array( 'Automattic\Jetpack\Search\Template_Tags', 'render_widget_title' ), 10, 3 ); + if ( Options::is_instant_enabled() ) { + add_action( 'jetpack_search_render_filters', array( 'Automattic\Jetpack\Search\Template_Tags', 'render_instant_filters' ), 10, 2 ); + } else { + add_action( 'jetpack_search_render_filters', array( 'Automattic\Jetpack\Search\Template_Tags', 'render_available_filters' ), 10, 2 ); + } + } + + /** + * Check whether search is currently active + * + * @since 6.3 + */ + public function is_search_active() { + return $this->module_control->is_active(); + } + + /** + * Activate search + * + * @since 6.3 + */ + public function activate_search() { + return $this->module_control->activate(); + } + + /** + * Enqueues the scripts and styles needed for the customizer. + * + * @since 5.7.0 + */ + public function widget_admin_setup() { + // Register jp-tracks and jp-tracks-functions. + Tracking::register_tracks_functions_scripts(); + + Assets::register_script( + 'jetpack-search-widget-admin', + 'js/search-widget-admin.js', + __FILE__, + array( + 'in_footer' => true, + 'textdomain' => 'jetpack-search-pkg', + 'css_path' => 'css/search-widget-admin-ui.css', + 'dependencies' => array( 'jquery', 'jquery-ui-sortable', 'jp-tracks-functions' ), + ) + ); + + $dotcom_data = ( new Connection_Manager( Package::SLUG ) )->get_connected_user_data(); + + wp_localize_script( + 'jetpack-search-widget-admin', + 'jetpack_search_filter_admin', + array( + 'defaultFilterCount' => self::DEFAULT_FILTER_COUNT, + 'tracksUserData' => ! empty( $dotcom_data ) ? array( + 'userid' => $dotcom_data['ID'], + 'username' => $dotcom_data['login'], + ) : false, + 'tracksEventData' => array( + 'is_customizer' => (int) is_customize_preview(), + ), + 'i18n' => array( + 'month' => Helper::get_date_filter_type_name( 'month', false ), + 'year' => Helper::get_date_filter_type_name( 'year', false ), + 'monthUpdated' => Helper::get_date_filter_type_name( 'month', true ), + 'yearUpdated' => Helper::get_date_filter_type_name( 'year', true ), + ), + ) + ); + + Assets::enqueue_script( 'jetpack-search-widget-admin' ); + } + + /** + * Enqueue scripts and styles for the frontend. + * + * @since 5.8.0 + */ + public function enqueue_frontend_scripts() { + if ( ! is_active_widget( false, false, $this->id_base, true ) || Options::is_instant_enabled() ) { + return; + } + Assets::register_script( + 'jetpack-search-widget', + 'js/search-widget.js', + __FILE__, + array( + 'in_footer' => true, + 'textdomain' => 'jetpack-search-pkg', + // Jetpack the plugin would concatenated the style with other styles and minimize. And the style would be dequeued from WP. + // @see https://github.com/Automattic/jetpack/blob/b3de78dce3d88b0d9b283282a5b04515245c8057/projects/plugins/jetpack/tools/builder/frontend-css.js#L52. + // @see https://github.com/Automattic/jetpack/blob/bb1b6a9a9cfa98600441f8fa31c9f9c4ef9a04a5/projects/plugins/jetpack/class.jetpack.php#L106. + 'css_path' => 'css/search-widget-frontend.css', + ) + ); + Assets::enqueue_script( 'jetpack-search-widget' ); + } + + /** + * Get the list of valid sort types/orders. + * + * @return array The sort orders. + * @since 5.8.0 + */ + private function get_sort_types() { + return array( + 'relevance|DESC' => is_admin() ? esc_html__( 'Relevance (recommended)', 'jetpack-search-pkg' ) : esc_html__( 'Relevance', 'jetpack-search-pkg' ), + 'date|DESC' => esc_html__( 'Newest first', 'jetpack-search-pkg' ), + 'date|ASC' => esc_html__( 'Oldest first', 'jetpack-search-pkg' ), + ); + } + + /** + * Callback for an array_filter() call in order to only get filters for the current widget. + * + * @param array $item Filter item. + * + * @return bool Whether the current filter item is for the current widget. + * @see Search_Widget::widget() + * + * @since 5.7.0 + */ + public function is_for_current_widget( $item ) { + return isset( $item['widget_id'] ) && $this->id == $item['widget_id']; // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual + } + + /** + * This method returns a boolean for whether the widget should show site-wide filters for the site. + * + * This is meant to provide backwards-compatibility for VIP, and other professional plan users, that manually + * configured filters via `Automattic\Jetpack\Search\Classic_Search::set_filters()`. + * + * @return bool Whether the widget should display site-wide filters or not. + * @since 5.7.0 + */ + public function should_display_sitewide_filters() { + $filter_widgets = get_option( 'widget_jetpack-search-filters' ); + + // This shouldn't be empty, but just for sanity. + if ( empty( $filter_widgets ) ) { + return false; + } + + // If any widget has any filters, return false. + foreach ( $filter_widgets as $number => $widget ) { + $widget_id = sprintf( '%s-%d', $this->id_base, $number ); + if ( ! empty( $widget['filters'] ) && is_active_widget( false, $widget_id, $this->id_base ) ) { + return false; + } + } + + return true; + } + + /** + * Widget defaults. + * + * @param array $instance Previously saved values from database. + */ + public function jetpack_search_populate_defaults( $instance ) { + $instance = wp_parse_args( + (array) $instance, + array( + 'title' => '', + 'search_box_enabled' => true, + 'user_sort_enabled' => true, + 'sort' => self::DEFAULT_SORT, + 'filters' => array( array() ), + 'post_types' => array(), + ) + ); + + return $instance; + } + + /** + * Populates the instance array with appropriate default values. + * + * @param array $instance Previously saved values from database. + * @return array Instance array with default values approprate for instant search + * @since 8.6.0 + */ + public function populate_defaults_for_instant_search( $instance ) { + return wp_parse_args( + (array) $instance, + array( + 'title' => '', + 'filters' => array(), + ) + ); + } + + /** + * Responsible for rendering the widget on the frontend. + * + * @param array $args Widgets args supplied by the theme. + * @param array $instance The current widget instance. + * @since 5.0.0 + */ + public function widget( $args, $instance ) { + $instance = $this->jetpack_search_populate_defaults( $instance ); + + if ( ( new Status() )->is_offline_mode() ) { + echo $args['before_widget']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ?><div id="<?php echo esc_attr( $this->id ); ?>-wrapper"> + <div class="jetpack-search-sort-wrapper"> + <label> + <?php esc_html_e( 'Jetpack Search not supported in Offline Mode', 'jetpack-search-pkg' ); ?> + </label> + </div> + </div> + <?php + echo $args['after_widget']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + return; + } + + if ( Options::is_instant_enabled() ) { + if ( array_key_exists( 'id', $args ) && 'jetpack-instant-search-sidebar' === $args['id'] ) { + $this->widget_empty_instant( $args, $instance ); + } else { + $this->widget_instant( $args, $instance ); + } + } else { + $this->widget_non_instant( $args, $instance ); + } + } + + /** + * Render the non-instant frontend widget. + * + * @param array $args Widgets args supplied by the theme. + * @param array $instance The current widget instance. + * @since 8.3.0 + */ + public function widget_non_instant( $args, $instance ) { + $display_filters = false; + + // Search instance must have been initialized before widget render. + if ( is_search() && Classic_Search::instance() ) { + if ( Helper::should_rerun_search_in_customizer_preview() ) { + Classic_Search::instance()->update_search_results_aggregations(); + } + + $filters = Classic_Search::instance()->get_filters(); + + if ( ! Helper::are_filters_by_widget_disabled() && ! $this->should_display_sitewide_filters() ) { + $filters = array_filter( $filters, array( $this, 'is_for_current_widget' ) ); + } + + if ( ! empty( $filters ) ) { + $display_filters = true; + } + } + + if ( ! $display_filters && empty( $instance['search_box_enabled'] ) && empty( $instance['user_sort_enabled'] ) ) { + return; + } + + $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; + + /** This filter is documented in core/src/wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); + + echo $args['before_widget']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ?> + <div id="<?php echo esc_attr( $this->id ); ?>-wrapper" > + <?php + + if ( ! empty( $title ) ) { + /** + * Responsible for displaying the title of the Jetpack Search filters widget. + * + * @module search + * + * @param string $title The widget's title + * @param string $args['before_title'] The HTML tag to display before the title + * @param string $args['after_title'] The HTML tag to display after the title + *@since 5.7.0 + */ + do_action( 'jetpack_search_render_filters_widget_title', $title, $args['before_title'], $args['after_title'] ); + } + + $default_sort = isset( $instance['sort'] ) ? $instance['sort'] : self::DEFAULT_SORT; + list( $orderby, $order ) = $this->sorting_to_wp_query_param( $default_sort ); + $current_sort = "{$orderby}|{$order}"; + + // we need to dynamically inject the sort field into the search box when the search box is enabled, and display + // it separately when it's not. + if ( ! empty( $instance['search_box_enabled'] ) ) { + Template_Tags::render_widget_search_form( $instance['post_types'], $orderby, $order ); + } + + if ( ! empty( $instance['search_box_enabled'] ) && ! empty( $instance['user_sort_enabled'] ) ) : + ?> + <div class="jetpack-search-sort-wrapper"> + <label> + <?php esc_html_e( 'Sort by', 'jetpack-search-pkg' ); ?> + <select class="jetpack-search-sort"> + <?php foreach ( $this->get_sort_types() as $sort => $label ) { ?> + <option value="<?php echo esc_attr( $sort ); ?>" <?php selected( $current_sort, $sort ); ?>> + <?php echo esc_html( $label ); ?> + </option> + <?php } ?> + </select> + </label> + </div> + <?php + endif; + + if ( $display_filters ) { + /** + * Responsible for rendering filters to narrow down search results. + * + * @module search + * + * @param array $filters The possible filters for the current query. + * @param array $post_types An array of post types to limit filtering to. + *@since 5.8.0 + */ + do_action( + 'jetpack_search_render_filters', + $filters, + isset( $instance['post_types'] ) ? $instance['post_types'] : null + ); + } + + $this->maybe_render_sort_javascript( $instance, $order, $orderby ); + + echo '</div>'; + echo $args['after_widget']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } + + /** + * Render the instant frontend widget. + * + * @param array $args Widgets args supplied by the theme. + * @param array $instance The current widget instance. + * @since 8.3.0 + */ + public function widget_instant( $args, $instance ) { + // Exit early if search instance has not been initialized. + if ( ! Instant_Search::instance() ) { + return false; + } + + if ( Helper::should_rerun_search_in_customizer_preview() ) { + Instant_Search::instance()->update_search_results_aggregations(); + } + + $filters = Instant_Search::instance()->get_filters(); + if ( ! Helper::are_filters_by_widget_disabled() && ! $this->should_display_sitewide_filters() ) { + $filters = array_filter( $filters, array( $this, 'is_for_current_widget' ) ); + } + + $display_filters = ! empty( $filters ); + + $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; + + /** This filter is documented in core/src/wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); + + echo $args['before_widget']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ?> + <div id="<?php echo esc_attr( $this->id ); ?>-wrapper" class="jetpack-instant-search-wrapper"> + <?php + + if ( ! empty( $title ) ) { + /** + * Responsible for displaying the title of the Jetpack Search filters widget. + * + * @module search + * + * @param string $title The widget's title + * @param string $args['before_title'] The HTML tag to display before the title + * @param string $args['after_title'] The HTML tag to display after the title + *@since 5.7.0 + */ + do_action( 'jetpack_search_render_filters_widget_title', $title, $args['before_title'], $args['after_title'] ); + } + + Template_Tags::render_widget_search_form( array(), '', '' ); + + if ( $display_filters ) { + /** + * Responsible for rendering filters to narrow down search results. + * + * @module search + * + * @param array $filters The possible filters for the current query. + * @param array $post_types An array of post types to limit filtering to. + *@since 5.8.0 + */ + do_action( + 'jetpack_search_render_filters', + $filters, + null + ); + } + + echo '</div>'; + echo $args['after_widget']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } + + /** + * Render the instant widget for the overlay. + * + * @param array $args Widgets args supplied by the theme. + * @param array $instance The current widget instance. + * @since 8.3.0 + */ + public function widget_empty_instant( $args, $instance ) { + $title = isset( $instance['title'] ) ? $instance['title'] : ''; + + if ( empty( $title ) ) { + $title = ''; + } + + /** This filter is documented in core/src/wp-includes/default-widgets.php */ + $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); + + echo $args['before_widget']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ?> + <div id="<?php echo esc_attr( $this->id ); ?>-wrapper" class="jetpack-instant-search-wrapper"> + <?php + + if ( ! empty( $title ) ) { + /** + * Responsible for displaying the title of the Jetpack Search filters widget. + * + * @module search + * + * @param string $title The widget's title + * @param string $args['before_title'] The HTML tag to display before the title + * @param string $args['after_title'] The HTML tag to display after the title + *@since 5.7.0 + */ + do_action( 'jetpack_search_render_filters_widget_title', $title, $args['before_title'], $args['after_title'] ); + } + + echo '</div>'; + echo $args['after_widget']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } + + /** + * Renders JavaScript for the sorting controls on the frontend. + * + * This JS is a bit complicated, but here's what it's trying to do: + * - find the search form + * - find the orderby/order fields and set default values + * - detect changes to the sort field, if it exists, and use it to set the order field values + * + * @param array $instance The current widget instance. + * @param string $order The order to initialize the select with. + * @param string $orderby The orderby to initialize the select with. + * @since 5.8.0 + */ + private function maybe_render_sort_javascript( $instance, $order, $orderby ) { + if ( Options::is_instant_enabled() ) { + return; + } + + if ( ! empty( $instance['user_sort_enabled'] ) ) : + ?> + <script type="text/javascript"> + var jetpackSearchModuleSorting = function() { + var orderByDefault = '<?php echo 'date' === $orderby ? 'date' : 'relevance'; ?>', + orderDefault = '<?php echo 'ASC' === $order ? 'ASC' : 'DESC'; ?>', + widgetId = decodeURIComponent( '<?php echo rawurlencode( $this->id ); ?>' ), + searchQuery = decodeURIComponent( '<?php echo rawurlencode( get_query_var( 's', '' ) ); ?>' ), + isSearch = <?php echo (int) is_search(); ?>; + + var container = document.getElementById( widgetId + '-wrapper' ), + form = container.querySelector( '.jetpack-search-form form' ), + orderBy = form.querySelector( 'input[name=orderby]' ), + order = form.querySelector( 'input[name=order]' ), + searchInput = form.querySelector( 'input[name="s"]' ), + sortSelectInput = container.querySelector( '.jetpack-search-sort' ); + + orderBy.value = orderByDefault; + order.value = orderDefault; + + // Some themes don't set the search query, which results in the query being lost + // when doing a sort selection. So, if the query isn't set, let's set it now. This approach + // is chosen over running a regex over HTML for every search query performed. + if ( isSearch && ! searchInput.value ) { + searchInput.value = searchQuery; + } + + searchInput.classList.add( 'show-placeholder' ); + + sortSelectInput.addEventListener( 'change', function( event ) { + var values = event.target.value.split( '|' ); + orderBy.value = values[0]; + order.value = values[1]; + + form.submit(); + } ); + } + + if ( document.readyState === 'interactive' || document.readyState === 'complete' ) { + jetpackSearchModuleSorting(); + } else { + document.addEventListener( 'DOMContentLoaded', jetpackSearchModuleSorting ); + } + </script> + <?php + endif; + } + + /** + * Convert a sort string into the separate order by and order parts. + * + * @param string $sort A sort string. + * + * @return array Order by and order. + * @since 5.8.0 + */ + private function sorting_to_wp_query_param( $sort ) { + // phpcs:disable WordPress.Security.NonceVerification.Recommended + $parts = explode( '|', $sort ); + $orderby = isset( $_GET['orderby'] ) + ? sanitize_sql_orderby( wp_unslash( $_GET['orderby'] ) ) + : $parts[0]; + + $order = isset( $_GET['order'] ) + ? ( strtoupper( $_GET['order'] ) === 'ASC' ? 'ASC' : 'DESC' ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating. + : ( ( isset( $parts[1] ) && 'ASC' === strtoupper( $parts[1] ) ) ? 'ASC' : 'DESC' ); + + // phpcs:enable WordPress.Security.NonceVerification.Recommended + + return array( $orderby, $order ); + } + + /** + * Updates a particular instance of the widget. Validates and sanitizes the options. + * + * @param array $new_instance New settings for this instance as input by the user via Search_Widget::form(). + * @param array $old_instance Old settings for this instance. + * + * @return array Settings to save. + * @since 5.0.0 + */ + public function update( $new_instance, $old_instance ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable + $new_instance = $this->maybe_reformat_widget( $new_instance ); + $instance = array(); + + $instance['title'] = sanitize_text_field( $new_instance['title'] ); + $instance['search_box_enabled'] = empty( $new_instance['search_box_enabled'] ) ? '0' : '1'; + $instance['user_sort_enabled'] = empty( $new_instance['user_sort_enabled'] ) ? '0' : '1'; + $instance['sort'] = empty( $new_instance['sort'] ) ? self::DEFAULT_SORT : $new_instance['sort']; + $instance['post_types'] = empty( $new_instance['post_types'] ) || empty( $instance['search_box_enabled'] ) + ? array() + : array_map( 'sanitize_key', $new_instance['post_types'] ); + + $filters = array(); + if ( isset( $new_instance['filter_type'] ) ) { + foreach ( (array) $new_instance['filter_type'] as $index => $type ) { + $count = (int) $new_instance['num_filters'][ $index ]; + $count = min( 50, $count ); // Set max boundary at 50. + $count = max( 1, $count ); // Set min boundary at 1. + + switch ( $type ) { + case 'taxonomy': + $filters[] = array( + 'name' => sanitize_text_field( $new_instance['filter_name'][ $index ] ), + 'type' => 'taxonomy', + 'taxonomy' => sanitize_key( $new_instance['taxonomy_type'][ $index ] ), + 'count' => $count, + ); + break; + case 'post_type': + $filters[] = array( + 'name' => sanitize_text_field( $new_instance['filter_name'][ $index ] ), + 'type' => 'post_type', + 'count' => $count, + ); + break; + case 'date_histogram': + $filters[] = array( + 'name' => sanitize_text_field( $new_instance['filter_name'][ $index ] ), + 'type' => 'date_histogram', + 'count' => $count, + 'field' => sanitize_key( $new_instance['date_histogram_field'][ $index ] ), + 'interval' => sanitize_key( $new_instance['date_histogram_interval'][ $index ] ), + ); + break; + } + } + } + + if ( ! empty( $filters ) ) { + $instance['filters'] = $filters; + } + + return $instance; + } + + /** + * Reformats the widget instance array to one that is recognized by the `update` function. + * This is only necessary when handling changes from the block-based widget editor. + * + * @param array $widget_instance - Jetpack Search widget instance. + * + * @return array - Potentially reformatted instance compatible with the save function. + */ + protected function maybe_reformat_widget( $widget_instance ) { + if ( isset( $widget_instance['filter_type'] ) || ! isset( $widget_instance['filters'] ) || ! is_array( $widget_instance['filters'] ) ) { + return $widget_instance; + } + + $instance = $widget_instance; + foreach ( $widget_instance['filters'] as $filter ) { + $instance['filter_type'][] = isset( $filter['type'] ) ? $filter['type'] : ''; + $instance['taxonomy_type'][] = isset( $filter['taxonomy'] ) ? $filter['taxonomy'] : ''; + $instance['filter_name'][] = isset( $filter['name'] ) ? $filter['name'] : ''; + $instance['num_filters'][] = isset( $filter['count'] ) ? $filter['count'] : 5; + $instance['date_histogram_field'][] = isset( $filter['field'] ) ? $filter['field'] : ''; + $instance['date_histogram_interval'][] = isset( $filter['interval'] ) ? $filter['interval'] : ''; + } + unset( $instance['filters'] ); + return $instance; + } + + /** + * Outputs the settings update form. + * + * @param array $instance Previously saved values from database. + * @since 5.0.0 + */ + public function form( $instance ) { + if ( Options::is_instant_enabled() ) { + return $this->form_for_instant_search( $instance ); + } + + $instance = $this->jetpack_search_populate_defaults( $instance ); + + $title = wp_strip_all_tags( $instance['title'] ); + + $hide_filters = Helper::are_filters_by_widget_disabled(); + + $classes = sprintf( + 'jetpack-search-filters-widget %s %s %s', + $hide_filters ? 'hide-filters' : '', + $instance['search_box_enabled'] ? '' : 'hide-post-types', + $this->id + ); + ?> + <div class="<?php echo esc_attr( $classes ); ?>"> + <p> + <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"> + <?php esc_html_e( 'Title (optional):', 'jetpack-search-pkg' ); ?> + </label> + <input + class="widefat" + id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" + name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" + type="text" + value="<?php echo esc_attr( $title ); ?>" + /> + </p> + + <p> + <label> + <input + type="checkbox" + class="jetpack-search-filters-widget__search-box-enabled" + name="<?php echo esc_attr( $this->get_field_name( 'search_box_enabled' ) ); ?>" + <?php checked( $instance['search_box_enabled'] ); ?> + /> + <?php esc_html_e( 'Show search box', 'jetpack-search-pkg' ); ?> + </label> + </p> + + <p> + <label> + <input + type="checkbox" + class="jetpack-search-filters-widget__sort-controls-enabled" + name="<?php echo esc_attr( $this->get_field_name( 'user_sort_enabled' ) ); ?>" + <?php checked( $instance['user_sort_enabled'] ); ?> + <?php disabled( ! $instance['search_box_enabled'] ); ?> + /> + <?php esc_html_e( 'Show sort selection dropdown', 'jetpack-search-pkg' ); ?> + </label> + </p> + + <p class="jetpack-search-filters-widget__post-types-select"> + <label><?php esc_html_e( 'Post types to search (minimum of 1):', 'jetpack-search-pkg' ); ?></label> + <?php foreach ( get_post_types( array( 'exclude_from_search' => false ), 'objects' ) as $post_type ) : ?> + <label> + <input + type="checkbox" + value="<?php echo esc_attr( $post_type->name ); ?>" + name="<?php echo esc_attr( $this->get_field_name( 'post_types' ) ); ?>[]" + <?php checked( empty( $instance['post_types'] ) || in_array( $post_type->name, $instance['post_types'], true ) ); ?> + /> + <?php echo esc_html( $post_type->label ); ?> + </label> + <?php endforeach; ?> + </p> + + <p> + <label> + <?php esc_html_e( 'Default sort order:', 'jetpack-search-pkg' ); ?> + <select + name="<?php echo esc_attr( $this->get_field_name( 'sort' ) ); ?>" + class="widefat jetpack-search-filters-widget__sort-order"> + <?php foreach ( $this->get_sort_types() as $sort_type => $label ) { ?> + <option value="<?php echo esc_attr( $sort_type ); ?>" <?php selected( $instance['sort'], $sort_type ); ?>> + <?php echo esc_html( $label ); ?> + </option> + <?php } ?> + </select> + </label> + </p> + + <?php if ( ! $hide_filters ) : ?> + <script class="jetpack-search-filters-widget__filter-template" type="text/template"> + <?php + echo $this->render_widget_edit_filter( array(), true ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ?> + </script> + <div class="jetpack-search-filters-widget__filters"> + <?php foreach ( (array) $instance['filters'] as $filter ) : ?> + <?php $this->render_widget_edit_filter( $filter ); ?> + <?php endforeach; ?> + </div> + <p class="jetpack-search-filters-widget__add-filter-wrapper"> + <a class="button jetpack-search-filters-widget__add-filter" href="#"> + <?php esc_html_e( 'Add a filter', 'jetpack-search-pkg' ); ?> + </a> + </p> + <noscript> + <p class="jetpack-search-filters-help"> + <?php echo esc_html_e( 'Adding filters requires JavaScript!', 'jetpack-search-pkg' ); ?> + </p> + </noscript> + <?php if ( is_customize_preview() ) : ?> + <p class="jetpack-search-filters-help"> + <a href="<?php echo esc_url( Redirect::get_url( 'jetpack-support-search', array( 'anchor' => 'filters-not-showing-up' ) ) ); ?>" target="_blank"> + <?php esc_html_e( "Why aren't my filters appearing?", 'jetpack-search-pkg' ); ?> + </a> + </p> + <?php endif; ?> + <?php endif; ?> + </div> + <?php + } + + /** + * Outputs the widget update form to be used in the Customizer for Instant Search. + * + * @param array $instance Previously saved values from database. + * @since 8.6.0 + */ + private function form_for_instant_search( $instance ) { + $instance = $this->populate_defaults_for_instant_search( $instance ); + $classes = sprintf( 'jetpack-search-filters-widget %s', $this->id ); + + ?> + <div class="<?php echo esc_attr( $classes ); ?>"> + <!-- Title control --> + <p> + <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"> + <?php esc_html_e( 'Title (optional):', 'jetpack-search-pkg' ); ?> + </label> + <input + class="widefat" + id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" + name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" + type="text" + value="<?php echo esc_attr( wp_strip_all_tags( $instance['title'] ) ); ?>" + /> + </p> + + <!-- Filters control --> + <?php if ( ! Helper::are_filters_by_widget_disabled() ) : ?> + <div class="jetpack-search-filters-widget__filters"> + <?php foreach ( (array) $instance['filters'] as $filter ) : ?> + <?php $this->render_widget_edit_filter( $filter ); ?> + <?php endforeach; ?> + </div> + <p class="jetpack-search-filters-widget__add-filter-wrapper"> + <a class="button jetpack-search-filters-widget__add-filter" href="#"> + <?php esc_html_e( 'Add a filter', 'jetpack-search-pkg' ); ?> + </a> + </p> + <script class="jetpack-search-filters-widget__filter-template" type="text/template"> + <?php $this->render_widget_edit_filter( array(), true ); ?> + </script> + <noscript> + <p class="jetpack-search-filters-help"> + <?php echo esc_html_e( 'Adding filters requires JavaScript!', 'jetpack-search-pkg' ); ?> + </p> + </noscript> + <?php endif; ?> + </div> + <?php + } + + /** + * We need to render HTML in two formats: an Underscore template (client-side) + * and native PHP (server-side). This helper function allows for easy rendering + * of attributes in both formats. + * + * @param string $name Attribute name. + * @param string $value Attribute value. + * @param bool $is_template Whether this is for an Underscore template or not. + * @since 5.8.0 + */ + private function render_widget_attr( $name, $value, $is_template ) { + echo $is_template ? "<%= $name %>" : esc_attr( $value ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } + + /** + * We need to render HTML in two formats: an Underscore template (client-size) + * and native PHP (server-side). This helper function allows for easy rendering + * of the "selected" attribute in both formats. + * + * @param string $name Attribute name. + * @param string $value Attribute value. + * @param string $compare Value to compare to the attribute value to decide if it should be selected. + * @param bool $is_template Whether this is for an Underscore template or not. + * @since 5.8.0 + */ + private function render_widget_option_selected( $name, $value, $compare, $is_template ) { + $compare_js = rawurlencode( $compare ); + echo $is_template ? "<%= decodeURIComponent( '$compare_js' ) === $name ? 'selected=\"selected\"' : '' %>" : selected( $value, $compare ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } + + /** + * Responsible for rendering a single filter in the customizer or the widget administration screen in wp-admin. + * + * We use this method for two purposes - rendering the fields server-side, and also rendering a script template for Underscore. + * + * @param array $filter The filter to render. + * @param bool $is_template Whether this is for an Underscore template or not. + * @since 5.7.0 + */ + public function render_widget_edit_filter( $filter, $is_template = false ) { + $args = wp_parse_args( + $filter, + array( + 'name' => '', + 'type' => 'taxonomy', + 'taxonomy' => '', + 'post_type' => '', + 'field' => '', + 'interval' => '', + 'count' => self::DEFAULT_FILTER_COUNT, + ) + ); + + $args['name_placeholder'] = Helper::generate_widget_filter_name( $args ); + + ?> + <div class="jetpack-search-filters-widget__filter is-<?php $this->render_widget_attr( 'type', $args['type'], $is_template ); ?>"> + <p class="jetpack-search-filters-widget__type-select"> + <label> + <?php esc_html_e( 'Filter Type:', 'jetpack-search-pkg' ); ?> + <select name="<?php echo esc_attr( $this->get_field_name( 'filter_type' ) ); ?>[]" class="widefat filter-select"> + <option value="taxonomy" <?php $this->render_widget_option_selected( 'type', $args['type'], 'taxonomy', $is_template ); ?>> + <?php esc_html_e( 'Taxonomy', 'jetpack-search-pkg' ); ?> + </option> + <option value="post_type" <?php $this->render_widget_option_selected( 'type', $args['type'], 'post_type', $is_template ); ?>> + <?php esc_html_e( 'Post Type', 'jetpack-search-pkg' ); ?> + </option> + <option value="date_histogram" <?php $this->render_widget_option_selected( 'type', $args['type'], 'date_histogram', $is_template ); ?>> + <?php esc_html_e( 'Date', 'jetpack-search-pkg' ); ?> + </option> + </select> + </label> + </p> + + <p class="jetpack-search-filters-widget__taxonomy-select"> + <label> + <?php + esc_html_e( 'Choose a taxonomy:', 'jetpack-search-pkg' ); + $seen_taxonomy_labels = array(); + ?> + <select name="<?php echo esc_attr( $this->get_field_name( 'taxonomy_type' ) ); ?>[]" class="widefat taxonomy-select"> + <?php foreach ( get_taxonomies( array( 'public' => true ), 'objects' ) as $taxonomy ) : ?> + <option value="<?php echo esc_attr( $taxonomy->name ); ?>" <?php $this->render_widget_option_selected( 'taxonomy', $args['taxonomy'], $taxonomy->name, $is_template ); ?>> + <?php + $label = in_array( $taxonomy->label, $seen_taxonomy_labels, true ) + ? sprintf( + /* translators: %1$s is the taxonomy name, %2s is the name of its type to help distinguish between several taxonomies with the same name, e.g. category and tag. */ + _x( '%1$s (%2$s)', 'A label for a taxonomy selector option', 'jetpack-search-pkg' ), + $taxonomy->label, + $taxonomy->name + ) + : $taxonomy->label; + echo esc_html( $label ); + $seen_taxonomy_labels[] = $taxonomy->label; + ?> + </option> + <?php endforeach; ?> + </select> + </label> + </p> + + <p class="jetpack-search-filters-widget__date-histogram-select"> + <label> + <?php esc_html_e( 'Choose a field:', 'jetpack-search-pkg' ); ?> + <select name="<?php echo esc_attr( $this->get_field_name( 'date_histogram_field' ) ); ?>[]" class="widefat date-field-select"> + <option value="post_date" <?php $this->render_widget_option_selected( 'field', $args['field'], 'post_date', $is_template ); ?>> + <?php esc_html_e( 'Date', 'jetpack-search-pkg' ); ?> + </option> + <option value="post_date_gmt" <?php $this->render_widget_option_selected( 'field', $args['field'], 'post_date_gmt', $is_template ); ?>> + <?php esc_html_e( 'Date GMT', 'jetpack-search-pkg' ); ?> + </option> + <option value="post_modified" <?php $this->render_widget_option_selected( 'field', $args['field'], 'post_modified', $is_template ); ?>> + <?php esc_html_e( 'Modified', 'jetpack-search-pkg' ); ?> + </option> + <option value="post_modified_gmt" <?php $this->render_widget_option_selected( 'field', $args['field'], 'post_modified_gmt', $is_template ); ?>> + <?php esc_html_e( 'Modified GMT', 'jetpack-search-pkg' ); ?> + </option> + </select> + </label> + </p> + + <p class="jetpack-search-filters-widget__date-histogram-select"> + <label> + <?php esc_html_e( 'Choose an interval:', 'jetpack-search-pkg' ); ?> + <select name="<?php echo esc_attr( $this->get_field_name( 'date_histogram_interval' ) ); ?>[]" class="widefat date-interval-select"> + <option value="month" <?php $this->render_widget_option_selected( 'interval', $args['interval'], 'month', $is_template ); ?>> + <?php esc_html_e( 'Month', 'jetpack-search-pkg' ); ?> + </option> + <option value="year" <?php $this->render_widget_option_selected( 'interval', $args['interval'], 'year', $is_template ); ?>> + <?php esc_html_e( 'Year', 'jetpack-search-pkg' ); ?> + </option> + </select> + </label> + </p> + + <p class="jetpack-search-filters-widget__title"> + <label> + <?php esc_html_e( 'Title:', 'jetpack-search-pkg' ); ?> + <input + class="widefat" + type="text" + name="<?php echo esc_attr( $this->get_field_name( 'filter_name' ) ); ?>[]" + value="<?php $this->render_widget_attr( 'name', $args['name'], $is_template ); ?>" + placeholder="<?php $this->render_widget_attr( 'name_placeholder', $args['name_placeholder'], $is_template ); ?>" + /> + </label> + </p> + + <p> + <label> + <?php esc_html_e( 'Maximum number of filters (1-50):', 'jetpack-search-pkg' ); ?> + <input + class="widefat filter-count" + name="<?php echo esc_attr( $this->get_field_name( 'num_filters' ) ); ?>[]" + type="number" + value="<?php $this->render_widget_attr( 'count', $args['count'], $is_template ); ?>" + min="1" + max="50" + step="1" + required + /> + </label> + </p> + + <p class="jetpack-search-filters-widget__controls"> + <a href="#" class="delete"><?php esc_html_e( 'Remove', 'jetpack-search-pkg' ); ?></a> + </p> + </div> + <?php + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/css/search-widget-admin-ui.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/css/search-widget-admin-ui.css new file mode 100644 index 00000000..b5f4544a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/css/search-widget-admin-ui.css @@ -0,0 +1,87 @@ +.jetpack-search-filters-widget__filter { + background: #f6f7f7; + border: 1px solid #dcdcde; + padding: 0 12px; + margin-bottom: 12px; + cursor: move; +} + +.jetpack-search-filters-widget__controls { + text-align: right; +} + +.jetpack-search-filters-widget .jetpack-search-filters-widget__sort-controls-enabled { + margin-left: 24px; +} + +.jetpack-search-filters-widget__controls .delete { + color: #d63638; +} + +.jetpack-search-filters-widget.hide-filters .jetpack-search-filters-widget__filter { + display: none; +} + +.button.jetpack-search-filters-widget__add-filter { + margin-bottom: 10px; +} + +/* Assume that taxonomy select is the default selected. Other controls should be hidden here. */ +.jetpack-search-filters-widget__post-type-select { + display: none; +} + +.jetpack-search-filters-widget__date-histogram-select { + display: none; +} + +.jetpack-search-filters-widget__filter-placeholder { + border: 1px #555 dashed; + background-color: #f0f0f1; + height: 286px; + margin-bottom: 12px; +} + +/* When post type is selected, remove the other controls */ +.jetpack-search-filters-widget__filter.is-post_type .jetpack-search-filters-widget__taxonomy-select { + display: none; +} + +/* When date is selected, remove the other controls */ +.jetpack-search-filters-widget__filter.is-date_histogram .jetpack-search-filters-widget__date-histogram-select { + display: inline; +} + +.jetpack-search-filters-widget__filter.is-date_histogram .jetpack-search-filters-widget__taxonomy-select { + display: none; +} + +.jetpack-search-filters-widget.hide-post-types .jetpack-search-filters-widget__post-types-select { + display: none; +} + +.jetpack-search-filters-help:before { + display: inline-block; + position: relative; + font-family: dashicons; + font-size: 20px; + top: 5px; + line-height: 1px; + content:"\f223"; +} +.jetpack-search-filters-help { + padding: 5px 5px 15px 0; +} + +.jetpack-search-filters-widget__post-types-select label { + display: block; + margin-bottom: 4px; +} + +.jetpack-search-filters-widget__post-types-select input[type="checkbox"] { + margin-left: 24px; +} + +body.no-js .jetpack-search-filters-widget__add-filter-wrapper { + display: none; +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/css/search-widget-frontend.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/css/search-widget-frontend.css new file mode 100644 index 00000000..58c7cf3e --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/css/search-widget-frontend.css @@ -0,0 +1,66 @@ +.jetpack-search-filters-widget__sub-heading { + font-size: inherit; + font-weight: bold; + margin: 0 0 .5em; + padding: 0; +} + +/* The first heading after the form */ +.jetpack-search-form + .jetpack-search-filters-widget__sub-heading { + margin-top: 1.5em; + margin-bottom: 0.5em !important; +} + +.jetpack-search-filters-widget__clear { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +.jetpack-search-sort-wrapper { + margin-top: 1em; + margin-bottom: 1.5em; +} + +.jetpack-search-sort-wrapper label { + display: inherit; +} + +.widget_search .jetpack-search-filters-widget__filter-list input[type="checkbox"] { + width: auto; + height: auto; +} + +ul.jetpack-search-filters-widget__filter-list li { + border: none; + padding: 0; + list-style: none; +} + +ul.jetpack-search-filters-widget__filter-list li a { + text-decoration: none; +} + +ul.jetpack-search-filters-widget__filter-list li a:hover { + box-shadow: none; +} + +ul.jetpack-search-filters-widget__filter-list li label { + font-weight: inherit; + display: inherit; +} + +.jetpack-search-filters-widget__filter-list { + list-style: none; +} + +ul.jetpack-search-filters-widget__filter-list { + margin-bottom: 1.5em; +} + +body.search .jetpack-search-form input[name="s"]::placeholder { + color: transparent; +} + +body.search .jetpack-search-form input[name="s"].show-placeholder::placeholder { + color: inherit; +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/js/search-widget-admin.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/js/search-widget-admin.js new file mode 100644 index 00000000..d4ae235f --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/js/search-widget-admin.js @@ -0,0 +1,358 @@ +/* globals jetpack_search_filter_admin, jQuery, analytics */ + +( function( $, args ) { + var defaultFilterCount = ( 'undefined' !== typeof args && args.defaultFilterCount ) ? + args.defaultFilterCount : + 5; // Just in case we couldn't find the defaultFiltercount arg + + $( document ).ready( function() { + setListeners(); + + window.JetpackSearch = window.JetpackSearch || {}; + window.JetpackSearch.addFilter = addFilter; + + // Initialize Tracks + if ( 'undefined' !== typeof analytics && args.tracksUserData ) { + analytics.initialize( args.tracksUserData.userid, args.tracksUserData.username ); + } + } ); + + function generateFilterTitlePlaceholder( container ) { + var placeholder = null, + isModified = null, + isMonth = null, + type = container.find( '.filter-select' ).val(); + + if ( 'taxonomy' === type ) { + placeholder = container.find('.taxonomy-select option:selected').text().trim(); + } else if ( 'date_histogram' === type && args && args.i18n ) { + isModified = ( -1 !== container.find( '.date-field-select' ).val().indexOf( 'modified' ) ); + isMonth = ( 'month' === container.find( '.date-interval-select' ).val() ); + + if ( isMonth ) { + placeholder = isModified ? + args.i18n.monthUpdated : + args.i18n.month; + } else { + placeholder = isModified ? + args.i18n.yearUpdated : + args.i18n.year; + } + } else { + placeholder = container.find('.filter-select option:selected').text().trim(); + } + + $( container ).find('.jetpack-search-filters-widget__title input').prop( 'placeholder', placeholder ); + } + + var addFilter = function( filtersContainer, args ) { + var template = _.template( + filtersContainer + .closest( '.jetpack-search-filters-widget' ) + .find( '.jetpack-search-filters-widget__filter-template' ) + .html() + ); + generateFilterTitlePlaceholder( filtersContainer.append( template( args ) ) ); + }; + + var setListeners = function( widget ) { + widget = ( 'undefined' === typeof widget ) ? + $( '.jetpack-search-filters-widget' ): + widget; + + var getContainer = function( el ) { + return $( el ).closest('.jetpack-search-filters-widget__filter'); + }; + + widget.on( 'change', '.filter-select', function() { + var select = $( this ), + selectVal = select.val(), + eventArgs = { + is_customizer: args.tracksEventData.is_customizer + }; + + eventArgs.type = selectVal; + + select + .closest( '.jetpack-search-filters-widget__filter' ) + .attr( 'class', 'jetpack-search-filters-widget__filter' ) + .addClass( 'is-' + selectVal ); + + generateFilterTitlePlaceholder( getContainer( this ) ); + + trackAndBumpMCStats( 'changed_filter_type', eventArgs ); + } ); + + // enable showing sort controls only if showing search box is enabled + widget.on( 'change', '.jetpack-search-filters-widget__search-box-enabled', function() { + var checkbox = $( this ), + checkboxVal = checkbox.is(':checked'), + filterParent = checkbox.closest( '.jetpack-search-filters-widget' ), + sortControl = filterParent.find( '.jetpack-search-filters-widget__sort-controls-enabled' ); + + filterParent.toggleClass( 'hide-post-types' ); + + if ( checkboxVal ) { + sortControl.removeAttr( 'disabled' ); + trackAndBumpMCStats( 'enabled_search_box', args.tracksEventData ); + } else { + sortControl.prop( 'checked', false ); + sortControl.prop( 'disabled', true ); + trackAndBumpMCStats( 'disabled_search_box', args.tracksEventData ); + } + } ); + + widget.on( 'change', '.jetpack-search-filters-widget__sort-controls-enabled', function() { + if ( $( this ).is( ':checked' ) ) { + trackAndBumpMCStats( 'enabled_sort_controls', args.tracksEventData ); + } else { + trackAndBumpMCStats( 'disabled_sort_controls', args.tracksEventData ); + } + } ); + + widget.on( 'click', '.jetpack-search-filters-widget__post-types-select input[type="checkbox"]', function( e ) { + var t = $( this ); + var siblingsChecked = t.closest( '.jetpack-search-filters-widget' ) + .find( '.jetpack-search-filters-widget__post-types-select input[type="checkbox"]:checked' ); + + if ( 0 === siblingsChecked.length ) { + e.preventDefault(); + e.stopPropagation(); + + trackAndBumpMCStats( 'attempted_no_post_types', args.tracksEventData ); + } + } ); + + widget.on( 'change', '.jetpack-search-filters-widget__post-types-select input[type="checkbox"]', function() { + var t = $( this ); + var eventArgs = { + is_customizer: args.tracksEventData.is_customizer, + post_type: t.val() + }; + + if ( wp && wp.customize ) { + wp.customize.state( 'saved' ).set( false ); + } + + if ( t.is( ':checked' ) ) { + trackAndBumpMCStats( 'added_post_type', eventArgs ); + } else { + trackAndBumpMCStats( 'removed_post_type', eventArgs ); + } + } ); + + widget.on( 'change', '.jetpack-search-filters-widget__sort-order', function() { + var eventArgs = { + is_customizer: args.tracksEventData.is_customizer + }; + + eventArgs.order = $( this ).val(); + + if ( wp && wp.customize ) { + wp.customize.state( 'saved' ).set( false ); + } + + trackAndBumpMCStats( 'changed_sort_order', eventArgs ); + } ); + + widget.on( 'change', '.jetpack-search-filters-widget__taxonomy-select select', function() { + var eventArgs = { + is_customizer: args.tracksEventData.is_customizer + }; + + eventArgs.taxonomy = $( this ).val(); + + generateFilterTitlePlaceholder( getContainer( this ) ); + + if ( wp && wp.customize ) { + wp.customize.state( 'saved' ).set( false ); + } + + trackAndBumpMCStats( 'changed_taxonomy', eventArgs ); + } ); + + widget.on( 'change', 'select.date-field-select', function() { + var eventArgs = { + is_customizer: args.tracksEventData.is_customizer + }; + + eventArgs.field = $( this ).val(); + + generateFilterTitlePlaceholder( getContainer( this ) ); + + if ( wp && wp.customize ) { + wp.customize.state( 'saved' ).set( false ); + } + + trackAndBumpMCStats( 'changed_date_field', eventArgs ); + } ); + + widget.on( 'change', 'select.date-interval-select', function() { + var eventArgs = { + is_customizer: args.tracksEventData.is_customizer + }; + + eventArgs.interval = $( this ).val(); + + generateFilterTitlePlaceholder( getContainer( this ) ); + + if ( wp && wp.customize ) { + wp.customize.state( 'saved' ).set( false ); + } + + trackAndBumpMCStats( 'changed_date_interval', eventArgs ); + } ); + + widget.on( 'change', 'input.filter-count', function() { + var eventArgs = { + is_customizer: args.tracksEventData.is_customizer + }; + + eventArgs.count = $( this ).val(); + + if ( wp && wp.customize ) { + wp.customize.state( 'saved' ).set( false ); + } + + trackAndBumpMCStats( 'changed_filter_count', eventArgs ); + } ); + + // add filter button + widget.on( 'click', '.jetpack-search-filters-widget__add-filter', function( e ) { + e.preventDefault(); + + var filtersContainer = $( this ) + .closest( '.jetpack-search-filters-widget' ) + .find( '.jetpack-search-filters-widget__filters' ); + + addFilter( filtersContainer, { + type: 'taxonomy', + taxonomy: '', + post_type: '', + field: '', + interval: '', + count: defaultFilterCount, + name_placeholder: '', + name: '' + } ); + + if ( wp && wp.customize ) { + wp.customize.state( 'saved' ).set( false ); + } + + // Trigger change event to let legacy widget admin know the widget state is "dirty" + filtersContainer + .find( '.jetpack-search-filters-widget__filter' ) + .find( 'input, textarea, select' ) + .change(); + + trackAndBumpMCStats( 'added_filter', args.tracksEventData ); + } ); + + widget.on( 'click', '.jetpack-search-filters-widget__controls .delete', function( e ) { + e.preventDefault(); + var filter = $( this ).closest( '.jetpack-search-filters-widget__filter' ), + eventArgs = { + is_customizer: args.tracksEventData.is_customizer + }; + + eventArgs.type = filter.find( '.filter-select' ).val(); + + switch ( eventArgs.type ) { + case 'taxonomy': + eventArgs.taxonomy = filter.find( '.jetpack-search-filters-widget__taxonomy-select select' ).val(); + break; + case 'date_histogram': + eventArgs.dateField = filter.find( '.jetpack-search-filters-widget__date-histogram-select:first select' ).val(); + eventArgs.dateInterval = filter.find( '.jetpack-search-filters-widget__date-histogram-select:nth-child( 2 ) select' ).val(); + break; + } + + eventArgs.filterCount = filter.find( '.filter-count' ).val(); + + trackAndBumpMCStats( 'deleted_filter', eventArgs ); + + filter.find( 'input, textarea, select' ).change(); + filter.remove(); + + if ( wp && wp.customize ) { + wp.customize.state( 'saved' ).set( false ); + } + } ); + + // make the filters sortable + $( '.jetpack-search-filters-widget__filters' ).sortable( { + placeholder: 'jetpack-search-filters-widget__filter-placeholder', + axis: 'y', + revert: true, + cancel: 'input,textarea,button,select,option,.jetpack-search-filters-widget__controls a', + change: function() { + if ( wp && wp.customize ) { + wp.customize.state( 'saved' ).set( false ); + } + }, + update: function( e, ui ) { + $( ui.item ).find( 'input, textarea, select' ).change(); + } + } ) + .disableSelection(); + }; + + // When widgets are updated, remove and re-add listeners + $( document ).on( 'widget-updated widget-added', function( e, widget ) { + var idBase = $( widget ).find('.id_base').val(), + isJetpackSearch = ( idBase && ( 'jetpack-search-filters' === idBase ) ); + + if ( ! isJetpackSearch ) { + return; + } + + // Intentionally not tracking widget additions and updates here as these events + // seem noisy in the customizer. We'll track those via PHP. + + widget.off( 'change', '.filter-select' ); + widget.off( 'click', '.jetpack-search-filters-widget__controls .delete' ); + widget.off( 'change', '.jetpack-search-filters-widget__use-filters' ); + widget.off( 'change', '.jetpack-search-filters-widget__search-box-enabled' ); + widget.off( 'change', '.jetpack-search-filters-widget__sort-controls-enabled' ); + widget.off( 'change', '.jetpack-search-filters-widget__sort-controls-enabled' ); + widget.off( 'change', '.jetpack-search-filters-widget__post-type-selector' ); + widget.off( 'change', '.jetpack-search-filters-widget__sort-order' ); + widget.off( 'change', '.jetpack-search-filters-widget__taxonomy-select' ); + widget.off( 'change', '.jetpack-search-filters-widget__date-histogram-select:first select' ); + widget.off( 'change', '.jetpack-search-filters-widget__date-histogram-select:eq(1) select' ); + widget.off( 'click', '.jetpack-search-filters-widget__post-types-select input[type="checkbox"]' ); + widget.off( 'click', '.jetpack-search-filters-widget__add-filter'); + + setListeners( widget ); + } ); + + /** + * This function will fire both a Tracks and MC stat. + * + * Tracks: Will be prefixed by 'jetpack_widget_search_' and use underscores. + * MC: Will not be prefixed, and will use dashes. + * + * Logic borrowed from `idc-notice.js`. + * + * @param eventName string + * @param extraProps object + */ + function trackAndBumpMCStats( eventName, extraProps ) { + if ( 'undefined' === typeof extraProps || 'object' !== typeof extraProps ) { + extraProps = {}; + } + + if ( eventName && eventName.length && 'undefined' !== typeof analytics && analytics.tracks && analytics.mc ) { + // Format for Tracks + eventName = eventName.replace( /-/g, '_' ); + eventName = eventName.indexOf( 'jetpack_widget_search_' ) !== 0 ? 'jetpack_widget_search_' + eventName : eventName; + analytics.tracks.recordEvent( eventName, extraProps ); + + // Now format for MC stats + eventName = eventName.replace( 'jetpack_widget_search_', '' ); + eventName = eventName.replace( /_/g, '-' ); + analytics.mc.bumpStat( 'jetpack-search-widget', eventName ); + } + } +} )( jQuery, jetpack_search_filter_admin ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/js/search-widget.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/js/search-widget.js new file mode 100644 index 00000000..0f47e8e8 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/widgets/js/search-widget.js @@ -0,0 +1,47 @@ +var jetpackSearchModule = function () { + var i, + j, + checkboxes, + filter_list = document.querySelectorAll( '.jetpack-search-filters-widget__filter-list' ); + + for ( i = 0; i < filter_list.length; i++ ) { + filter_list[ i ].addEventListener( 'click', function ( event ) { + var target = event.target; + var precedingCheckbox; + var nextAnchor; + + // If the target is an anchor, we want to toggle the checkbox. + if ( target.nodeName && 'a' === target.nodeName.toLowerCase() ) { + precedingCheckbox = target.previousElementSibling; + if ( + precedingCheckbox && + precedingCheckbox.type && + 'checkbox' === precedingCheckbox.type + ) { + precedingCheckbox.checked = ! precedingCheckbox.checked; + } + } + + // If the target is a checkbox, we want to navigate. + if ( target.type && 'checkbox' === target.type ) { + nextAnchor = target.nextElementSibling; + if ( nextAnchor && 'a' === nextAnchor.nodeName.toLowerCase() ) { + window.location.href = nextAnchor.getAttribute( 'href' ); + } + } + } ); + + // Enable checkboxes now that we're setup. + checkboxes = filter_list[ i ].querySelectorAll( 'input[type="checkbox"]' ); + for ( j = 0; j < checkboxes.length; j++ ) { + checkboxes[ j ].disabled = false; + checkboxes[ j ].style.cursor = 'inherit'; + } + } +}; + +if ( document.readyState === 'interactive' || document.readyState === 'complete' ) { + jetpackSearchModule(); +} else { + document.addEventListener( 'DOMContentLoaded', jetpackSearchModule ); +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/wpes/class-query-builder.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/wpes/class-query-builder.php index faa405ad..62b4f892 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/wpes/class-query-builder.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/wpes/class-query-builder.php @@ -310,7 +310,7 @@ class Query_Builder { ); } - if ( ! is_null( $this->query_bool_boost ) && isset( $query['bool'] ) ) { + if ( $this->query_bool_boost !== null && isset( $query['bool'] ) ) { $query['bool']['boost'] = $this->query_bool_boost; } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/CHANGELOG.md index b05aac40..fe3bc8ee 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/CHANGELOG.md @@ -5,6 +5,52 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.13.6] - 2022-05-24 +### Added +- Allow plugins to filter the list of available modules. Only activate and consider active modules that are available [#24454] + +## [1.13.5] - 2022-05-20 +### Changed +- Modules: Make activate() method Jetpack plugin agnostic. Allowing standalone plugins to use it without Jetpack. + +## [1.13.4] - 2022-05-19 +### Added +- PHPCS updates. [#24418] + +## [1.13.3] - 2022-05-10 + +## [1.13.2] - 2022-04-26 +### Changed +- Updated package dependencies. + +## [1.13.1] - 2022-04-19 +### Changed +- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` + +## [1.13.0] - 2022-04-05 +### Added +- Created Modules and File modules for managing those resources + +## [1.12.0] - 2022-03-02 +### Added +- Cache return values (per blog) from various status methods. + +## [1.11.2] - 2022-02-28 +### Fixed +- Re-doing 1.11.1 to fixup a bad release. + +## [1.11.1] - 2022-02-28 +### Fixed +- Remove trailing semicolor form site suffix. + +## [1.11.0] - 2022-02-22 +### Added +- Add methods to distinguish Newspack and VIP sites. + +## [1.10.0] - 2022-01-25 +### Added +- Added Visitor class for status regarding the site visitor. + ## [1.9.5] - 2022-01-04 ### Changed - Switch to pcov for code coverage. @@ -146,6 +192,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Packages: Introduce a status package +[1.13.6]: https://github.com/Automattic/jetpack-status/compare/v1.13.5...v1.13.6 +[1.13.5]: https://github.com/Automattic/jetpack-status/compare/v1.13.4...v1.13.5 +[1.13.4]: https://github.com/Automattic/jetpack-status/compare/v1.13.3...v1.13.4 +[1.13.3]: https://github.com/Automattic/jetpack-status/compare/v1.13.2...v1.13.3 +[1.13.2]: https://github.com/Automattic/jetpack-status/compare/v1.13.1...v1.13.2 +[1.13.1]: https://github.com/Automattic/jetpack-status/compare/v1.13.0...v1.13.1 +[1.13.0]: https://github.com/Automattic/jetpack-status/compare/v1.12.0...v1.13.0 +[1.12.0]: https://github.com/Automattic/jetpack-status/compare/v1.11.2...v1.12.0 +[1.11.2]: https://github.com/Automattic/jetpack-status/compare/v1.11.1...v1.11.2 +[1.11.1]: https://github.com/Automattic/jetpack-status/compare/v1.11.0...v1.11.1 +[1.11.0]: https://github.com/Automattic/jetpack-status/compare/v1.10.0...v1.11.0 +[1.10.0]: https://github.com/Automattic/jetpack-status/compare/v1.9.5...v1.10.0 [1.9.5]: https://github.com/Automattic/jetpack-status/compare/v1.9.4...v1.9.5 [1.9.4]: https://github.com/Automattic/jetpack-status/compare/v1.9.3...v1.9.4 [1.9.3]: https://github.com/Automattic/jetpack-status/compare/v1.9.2...v1.9.3 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-cache.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-cache.php new file mode 100644 index 00000000..9ca54593 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-cache.php @@ -0,0 +1,55 @@ +<?php +/** + * A static in-process cache for blog data. + * + * @package automattic/jetpack-status + */ + +namespace Automattic\Jetpack\Status; + +/** + * A static in-process cache for blog data. + * + * For internal use only. Do not use this externally. + */ +class Cache { + /** + * Cached data; + * + * @var array[] + */ + private static $cache = array(); + + /** + * Get a value from the cache. + * + * @param string $key Key to fetch. + * @param mixed $default Default value to return if the key is not set. + * @returns mixed Data. + */ + public static function get( $key, $default = null ) { + $blog_id = get_current_blog_id(); + return isset( self::$cache[ $blog_id ] ) && array_key_exists( $key, self::$cache[ $blog_id ] ) ? self::$cache[ $blog_id ][ $key ] : $default; + } + + /** + * Set a value in the cache. + * + * @param string $key Key to set. + * @param mixed $value Value to store. + */ + public static function set( $key, $value ) { + $blog_id = get_current_blog_id(); + self::$cache[ $blog_id ][ $key ] = $value; + } + + /** + * Clear the cache. + * + * This is intended for use in unit tests. + */ + public static function clear() { + self::$cache = array(); + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-cookiestate.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-cookiestate.php new file mode 100644 index 00000000..7256a51f --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-cookiestate.php @@ -0,0 +1,103 @@ +<?php +/** + * Pass state to subsequent requests via cookies. + * + * @package automattic/jetpack-status + */ + +namespace Automattic\Jetpack; + +/** + * Class Automattic\Jetpack\Status + * + * Used to retrieve information about the current status of Jetpack and the site overall. + */ +class CookieState { + + /** + * State is passed via cookies from one request to the next, but never to subsequent requests. + * SET: state( $key, $value ); + * GET: $value = state( $key ); + * + * @param string $key State key. + * @param string $value Value. + * @param bool $restate Reset the cookie (private). + */ + public function state( $key = null, $value = null, $restate = false ) { + static $state = array(); + static $path, $domain; + if ( ! isset( $path ) ) { + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + $admin_url = ( new Paths() )->admin_url(); + $bits = wp_parse_url( $admin_url ); + + if ( is_array( $bits ) ) { + $path = ( isset( $bits['path'] ) ) ? dirname( $bits['path'] ) : null; + $domain = ( isset( $bits['host'] ) ) ? $bits['host'] : null; + } else { + $path = null; + $domain = null; + } + } + + // Extract state from cookies and delete cookies. + if ( isset( $_COOKIE['jetpackState'] ) && is_array( $_COOKIE['jetpackState'] ) ) { + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- User should sanitize if necessary. + $yum = wp_unslash( $_COOKIE['jetpackState'] ); + unset( $_COOKIE['jetpackState'] ); + foreach ( $yum as $k => $v ) { + if ( strlen( $v ) ) { + $state[ $k ] = $v; + } + setcookie( "jetpackState[$k]", false, 0, $path, $domain, is_ssl(), true ); + } + } + + if ( $restate ) { + foreach ( $state as $k => $v ) { + setcookie( "jetpackState[$k]", $v, 0, $path, $domain, is_ssl(), true ); + } + return; + } + + // Get a state variable. + if ( isset( $key ) && ! isset( $value ) ) { + if ( array_key_exists( $key, $state ) ) { + return $state[ $key ]; + } + return null; + } + + // Set a state variable. + if ( isset( $key ) && isset( $value ) ) { + if ( is_array( $value ) && isset( $value[0] ) ) { + $value = $value[0]; + } + $state[ $key ] = $value; + if ( ! headers_sent() ) { + if ( $this->should_set_cookie( $key ) ) { + setcookie( "jetpackState[$key]", $value, 0, $path, $domain, is_ssl(), true ); + } + } + } + } + + /** + * Determines whether the jetpackState[$key] value should be added to the + * cookie. + * + * @param string $key The state key. + * + * @return boolean Whether the value should be added to the cookie. + */ + public function should_set_cookie( $key ) { + global $current_screen; + $page = isset( $current_screen->base ) ? $current_screen->base : null; + + if ( 'toplevel_page_jetpack' === $page && 'display_update_modal' === $key ) { + return false; + } + + return true; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-errors.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-errors.php new file mode 100644 index 00000000..99751fd1 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-errors.php @@ -0,0 +1,43 @@ +<?php +/** + * An errors utility class for Jetpack. + * + * @package automattic/jetpack-status + */ + +// phpcs:disable WordPress.PHP.IniSet.display_errors_Blacklisted +// phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged +// phpcs:disable WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure_error_reporting +// phpcs:disable WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_error_reporting + +namespace Automattic\Jetpack; + +/** + * Erros class. + */ +class Errors { + /** + * Catches PHP errors. Must be used in conjunction with output buffering. + * + * @param bool $catch True to start catching, False to stop. + * + * @static + */ + public function catch_errors( $catch ) { + static $display_errors, $error_reporting; + + if ( $catch ) { + $display_errors = @ini_set( 'display_errors', 1 ); + $error_reporting = @error_reporting( E_ALL ); + if ( class_exists( 'Jetpack' ) ) { + add_action( 'shutdown', array( 'Jetpack', 'catch_errors_on_shutdown' ), 0 ); + } + } else { + @ini_set( 'display_errors', $display_errors ); + @error_reporting( $error_reporting ); + if ( class_exists( 'Jetpack' ) ) { + remove_action( 'shutdown', array( 'Jetpack', 'catch_errors_on_shutdown' ), 0 ); + } + } + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-files.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-files.php new file mode 100644 index 00000000..5f5e4129 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-files.php @@ -0,0 +1,54 @@ +<?php +/** + * A modules class for Jetpack. + * + * @package automattic/jetpack-status + */ + +namespace Automattic\Jetpack; + +/** + * Class Automattic\Jetpack\Files + * + * Used to retrieve information about files. + */ +class Files { + /** + * Returns an array of all PHP files in the specified absolute path. + * Equivalent to glob( "$absolute_path/*.php" ). + * + * @param string $absolute_path The absolute path of the directory to search. + * @return array Array of absolute paths to the PHP files. + */ + public function glob_php( $absolute_path ) { + if ( function_exists( 'glob' ) ) { + return glob( "$absolute_path/*.php" ); + } + + $absolute_path = untrailingslashit( $absolute_path ); + $files = array(); + $dir = @opendir( $absolute_path ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged + if ( ! $dir ) { + return $files; + } + + // phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition + while ( false !== $file = readdir( $dir ) ) { + if ( '.' === substr( $file, 0, 1 ) || '.php' !== substr( $file, -4 ) ) { + continue; + } + + $file = "$absolute_path/$file"; + + if ( ! is_file( $file ) ) { + continue; + } + + $files[] = $file; + } + + closedir( $dir ); + + return $files; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php index a0765f6d..dfe1e6ec 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-host.php @@ -17,19 +17,24 @@ class Host { * Determine if this site is an WordPress.com on Atomic site or not looking first at the 'at_options' option. * As a fallback, check for presence of wpcomsh plugin to determine if a current site has undergone AT. * - * @since $$next_version$$ + * @since 1.9.0 * * @return bool */ public function is_woa_site() { - $at_options = get_option( 'at_options', array() ); - return $this->is_atomic_platform() && ( ! empty( $at_options ) || Constants::is_true( 'WPCOMSH__PLUGIN_FILE' ) ); + $ret = Cache::get( 'is_woa_site' ); + if ( null === $ret ) { + $at_options = get_option( 'at_options', array() ); + $ret = $this->is_atomic_platform() && ( ! empty( $at_options ) || Constants::is_true( 'WPCOMSH__PLUGIN_FILE' ) ); + Cache::set( 'is_woa_site', $ret ); + } + return $ret; } /** - * Determine if site is hosted on the Atomic hosting platform. + * Determine if the site is hosted on the Atomic hosting platform. * - * @since $$next_version$$ + * @since 1.9.0 * * @return bool; */ @@ -37,4 +42,21 @@ class Host { return Constants::is_true( 'ATOMIC_SITE_ID' ) && Constants::is_true( 'ATOMIC_CLIENT_ID' ); } + /** + * Determine if this is a Newspack site. + * + * @return bool + */ + public function is_newspack_site() { + return Constants::is_defined( 'NEWSPACK_PLUGIN_FILE' ); + } + + /** + * Determine if this is a VIP-hosted site. + * + * @return bool + */ + public function is_vip_site() { + return Constants::is_defined( 'WPCOM_IS_VIP_ENV' ) && true === Constants::get_constant( 'WPCOM_IS_VIP_ENV' ); + } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-modules.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-modules.php new file mode 100644 index 00000000..2fd398b0 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-modules.php @@ -0,0 +1,591 @@ +<?php +/** + * A modules class for Jetpack. + * + * @package automattic/jetpack-status + */ + +namespace Automattic\Jetpack; + +use Automattic\Jetpack\Constants as Constants; + +/** + * Class Automattic\Jetpack\Modules + * + * Used to retrieve information about the current status of Jetpack modules. + */ +class Modules { + + /** + * Check whether or not a Jetpack module is active. + * + * @param string $module The slug of a Jetpack module. + * @return bool + */ + public function is_active( $module ) { + return in_array( $module, self::get_active(), true ); + } + + /** + * Load module data from module file. Headers differ from WordPress + * plugin headers to avoid them being identified as standalone + * plugins on the WordPress plugins page. + * + * @param string $module The module slug. + */ + public function get( $module ) { + static $modules_details; + + // This method relies heavy on auto-generated file found in Jetpack only: module-headings.php + // If it doesn't exist, it's safe to assume none of this will be helpful. + if ( ! function_exists( 'jetpack_has_no_module_info' ) ) { + return false; + } + + if ( jetpack_has_no_module_info( $module ) ) { + return false; + } + + $file = $this->get_path( $this->get_slug( $module ) ); + + if ( isset( $modules_details[ $module ] ) ) { + $mod = $modules_details[ $module ]; + } else { + $mod = jetpack_get_module_info( $module ); + + if ( null === $mod ) { + // Try to get the module info from the file as a fallback. + $mod = $this->get_file_data( $file, jetpack_get_all_module_header_names() ); + + if ( empty( $mod['name'] ) ) { + // No info for this module. + return false; + } + } + + $mod['sort'] = empty( $mod['sort'] ) ? 10 : (int) $mod['sort']; + $mod['recommendation_order'] = empty( $mod['recommendation_order'] ) ? 20 : (int) $mod['recommendation_order']; + $mod['deactivate'] = empty( $mod['deactivate'] ); + $mod['free'] = empty( $mod['free'] ); + $mod['requires_connection'] = ( ! empty( $mod['requires_connection'] ) && 'No' === $mod['requires_connection'] ) ? false : true; + $mod['requires_user_connection'] = ( empty( $mod['requires_user_connection'] ) || 'No' === $mod['requires_user_connection'] ) ? false : true; + + if ( empty( $mod['auto_activate'] ) || ! in_array( strtolower( $mod['auto_activate'] ), array( 'yes', 'no', 'public' ), true ) ) { + $mod['auto_activate'] = 'No'; + } else { + $mod['auto_activate'] = (string) $mod['auto_activate']; + } + + if ( $mod['module_tags'] ) { + $mod['module_tags'] = explode( ',', $mod['module_tags'] ); + $mod['module_tags'] = array_map( 'trim', $mod['module_tags'] ); + $mod['module_tags'] = array_map( 'jetpack_get_module_i18n_tag', $mod['module_tags'] ); + } else { + $mod['module_tags'] = array( jetpack_get_module_i18n_tag( 'Other' ) ); + } + + if ( $mod['plan_classes'] ) { + $mod['plan_classes'] = explode( ',', $mod['plan_classes'] ); + $mod['plan_classes'] = array_map( 'strtolower', array_map( 'trim', $mod['plan_classes'] ) ); + } else { + $mod['plan_classes'] = array( 'free' ); + } + + if ( $mod['feature'] ) { + $mod['feature'] = explode( ',', $mod['feature'] ); + $mod['feature'] = array_map( 'trim', $mod['feature'] ); + } else { + $mod['feature'] = array( jetpack_get_module_i18n_tag( 'Other' ) ); + } + + $modules_details[ $module ] = $mod; + + } + + /** + * Filters the feature array on a module. + * + * This filter allows you to control where each module is filtered: Recommended, + * and the default "Other" listing. + * + * @since-jetpack 3.5.0 + * + * @param array $mod['feature'] The areas to feature this module: + * 'Recommended' shows on the main Jetpack admin screen. + * 'Other' should be the default if no other value is in the array. + * @param string $module The slug of the module, e.g. sharedaddy. + * @param array $mod All the currently assembled module data. + */ + $mod['feature'] = apply_filters( 'jetpack_module_feature', $mod['feature'], $module, $mod ); + + /** + * Filter the returned data about a module. + * + * This filter allows overriding any info about Jetpack modules. It is dangerous, + * so please be careful. + * + * @since-jetpack 3.6.0 + * + * @param array $mod The details of the requested module. + * @param string $module The slug of the module, e.g. sharedaddy + * @param string $file The path to the module source file. + */ + return apply_filters( 'jetpack_get_module', $mod, $module, $file ); + } + + /** + * Like core's get_file_data implementation, but caches the result. + * + * @param string $file Absolute path to the file. + * @param array $headers List of headers, in the format array( 'HeaderKey' => 'Header Name' ). + */ + public function get_file_data( $file, $headers ) { + // Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated. + $file_name = basename( $file ); + + if ( ! Constants::is_defined( 'JETPACK__VERSION' ) ) { + return get_file_data( $file, $headers ); + } + + $cache_key = 'jetpack_file_data_' . JETPACK__VERSION; + + $file_data_option = get_transient( $cache_key ); + + if ( ! is_array( $file_data_option ) ) { + delete_transient( $cache_key ); + $file_data_option = false; + } + + if ( false === $file_data_option ) { + $file_data_option = array(); + } + + $key = md5( $file_name . maybe_serialize( $headers ) ); + $refresh_cache = is_admin() && isset( $_GET['page'] ) && 'jetpack' === substr( $_GET['page'], 0, 7 ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput + + // If we don't need to refresh the cache, and already have the value, short-circuit! + if ( ! $refresh_cache && isset( $file_data_option[ $key ] ) ) { + return $file_data_option[ $key ]; + } + + $data = get_file_data( $file, $headers ); + + $file_data_option[ $key ] = $data; + + set_transient( $cache_key, $file_data_option, 29 * DAY_IN_SECONDS ); + + return $data; + } + + /** + * Get a list of activated modules as an array of module slugs. + */ + public function get_active() { + $active = \Jetpack_Options::get_option( 'active_modules' ); + + if ( ! is_array( $active ) ) { + $active = array(); + } + + if ( class_exists( 'VaultPress' ) || function_exists( 'vaultpress_contact_service' ) ) { + $active[] = 'vaultpress'; + } else { + $active = array_diff( $active, array( 'vaultpress' ) ); + } + + // If protect is active on the main site of a multisite, it should be active on all sites. + if ( ! in_array( 'protect', $active, true ) && is_multisite() && get_site_option( 'jetpack_protect_active' ) ) { + $active[] = 'protect'; + } + + // If it's not available, it shouldn't be active. + // We don't delete it from the options though, as it will be active again when a plugin gets reactivated. + $active = array_intersect( $active, $this->get_available() ); + + /** + * Allow filtering of the active modules. + * + * Gives theme and plugin developers the power to alter the modules that + * are activated on the fly. + * + * @since-jetpack 5.8.0 + * + * @param array $active Array of active module slugs. + */ + $active = apply_filters( 'jetpack_active_modules', $active ); + + return array_unique( $active ); + } + + /** + * Extract a module's slug from its full path. + * + * @param string $file Full path to a file. + * + * @return string Module slug. + */ + public function get_slug( $file ) { + return str_replace( '.php', '', basename( $file ) ); + } + + /** + * List available Jetpack modules. Simply lists .php files in /modules/. + * Make sure to tuck away module "library" files in a sub-directory. + * + * @param bool|string $min_version Only return modules introduced in this version or later. Default is false, do not filter. + * @param bool|string $max_version Only return modules introduced before this version. Default is false, do not filter. + * @param bool|null $requires_connection Pass a boolean value to only return modules that require (or do not require) a connection. + * @param bool|null $requires_user_connection Pass a boolean value to only return modules that require (or do not require) a user connection. + * + * @return array $modules Array of module slugs + */ + public function get_available( $min_version = false, $max_version = false, $requires_connection = null, $requires_user_connection = null ) { + static $modules = null; + + if ( ! class_exists( 'Jetpack' ) || ! Constants::is_defined( 'JETPACK__VERSION' ) || ! Constants::is_defined( 'JETPACK__PLUGIN_DIR' ) ) { + return array_unique( + /** + * Stand alone plugins need to use this filter to register the modules they interact with. + * This will allow them to activate and deactivate these modules even when Jetpack is not present. + * Note: Standalone plugins can only interact with modules that also exist in the Jetpack plugin, otherwise they'll lose the ability to control it if Jetpack is activated. + * + * @since 1.13.6 + * + * @param array $modules The list of available modules as an array of slugs. + * @param bool $requires_connection Whether to list only modules that require a connection to work. + * @param bool $requires_user_connection Whether to list only modules that require a user connection to work. + */ + apply_filters( 'jetpack_get_available_standalone_modules', array(), $requires_connection, $requires_user_connection ) + ); + } + + if ( ! isset( $modules ) ) { + $available_modules_option = \Jetpack_Options::get_option( 'available_modules', array() ); + // Use the cache if we're on the front-end and it's available... + if ( ! is_admin() && ! empty( $available_modules_option[ JETPACK__VERSION ] ) ) { + $modules = $available_modules_option[ JETPACK__VERSION ]; + } else { + $files = ( new Files() )->glob_php( JETPACK__PLUGIN_DIR . 'modules' ); + + $modules = array(); + + foreach ( $files as $file ) { + $slug = $this->get_slug( $file ); + $headers = $this->get( $slug ); + + if ( ! $headers ) { + continue; + } + + $modules[ $slug ] = $headers['introduced']; + } + + \Jetpack_Options::update_option( + 'available_modules', + array( + JETPACK__VERSION => $modules, + ) + ); + } + } + + /** + * Filters the array of modules available to be activated. + * + * @since 2.4.0 + * + * @param array $modules Array of available modules. + * @param string $min_version Minimum version number required to use modules. + * @param string $max_version Maximum version number required to use modules. + * @param bool|null $requires_connection Value of the Requires Connection filter. + * @param bool|null $requires_user_connection Value of the Requires User Connection filter. + */ + $mods = apply_filters( 'jetpack_get_available_modules', $modules, $min_version, $max_version, $requires_connection, $requires_user_connection ); + + if ( ! $min_version && ! $max_version && $requires_connection === null && $requires_user_connection === null ) { + return array_keys( $mods ); + } + + $r = array(); + foreach ( $mods as $slug => $introduced ) { + if ( $min_version && version_compare( $min_version, $introduced, '>=' ) ) { + continue; + } + + if ( $max_version && version_compare( $max_version, $introduced, '<' ) ) { + continue; + } + + $mod_details = $this->get( $slug ); + + if ( null !== $requires_connection && (bool) $requires_connection !== $mod_details['requires_connection'] ) { + continue; + } + + if ( null !== $requires_user_connection && (bool) $requires_user_connection !== $mod_details['requires_user_connection'] ) { + continue; + } + + $r[] = $slug; + } + + return $r; + } + + /** + * Is slug a valid module. + * + * @param string $module Module slug. + * + * @return bool + */ + public function is_module( $module ) { + return ! empty( $module ) && ! validate_file( $module, $this->get_available() ); + } + + /** + * Update module status. + * + * @param string $module - module slug. + * @param boolean $active - true to activate, false to deactivate. + * @param bool $exit Should exit be called after deactivation. + * @param bool $redirect Should there be a redirection after activation. + */ + public function update_status( $module, $active, $exit = true, $redirect = true ) { + return $active ? $this->activate( $module, $exit, $redirect ) : $this->deactivate( $module ); + } + + /** + * Activate a module. + * + * @param string $module Module slug. + * @param bool $exit Should exit be called after deactivation. + * @param bool $redirect Should there be a redirection after activation. + * + * @return bool|void + */ + public function activate( $module, $exit = true, $redirect = true ) { + /** + * Fires before a module is activated. + * + * @since 2.6.0 + * + * @param string $module Module slug. + * @param bool $exit Should we exit after the module has been activated. Default to true. + * @param bool $redirect Should the user be redirected after module activation? Default to true. + */ + do_action( 'jetpack_pre_activate_module', $module, $exit, $redirect ); + + if ( ! strlen( $module ) ) { + return false; + } + + // If it's already active, then don't do it again. + $active = $this->get_active(); + foreach ( $active as $act ) { + if ( $act === $module ) { + return true; + } + } + + if ( ! $this->is_module( $module ) ) { + return false; + } + + // Jetpack plugin only + if ( class_exists( 'Jetpack' ) ) { + + $module_data = $this->get( $module ); + + $status = new Status(); + $state = new CookieState(); + + if ( ! \Jetpack::is_connection_ready() ) { + if ( ! $status->is_offline_mode() && ! $status->is_onboarding() ) { + return false; + } + + // If we're not connected but in offline mode, make sure the module doesn't require a connection. + if ( $status->is_offline_mode() && $module_data['requires_connection'] ) { + return false; + } + } + + if ( class_exists( 'Jetpack_Client_Server' ) ) { + $jetpack = \Jetpack::init(); + + // Check and see if the old plugin is active. + if ( isset( $jetpack->plugins_to_deactivate[ $module ] ) ) { + // Deactivate the old plugin. + if ( \Jetpack_Client_Server::deactivate_plugin( $jetpack->plugins_to_deactivate[ $module ][0], $jetpack->plugins_to_deactivate[ $module ][1] ) ) { + // If we deactivated the old plugin, remembere that with ::state() and redirect back to this page to activate the module + // We can't activate the module on this page load since the newly deactivated old plugin is still loaded on this page load. + $state->state( 'deactivated_plugins', $module ); + wp_safe_redirect( add_query_arg( 'jetpack_restate', 1 ) ); + exit; + } + } + } + + // Protect won't work with mis-configured IPs. + if ( 'protect' === $module && Constants::is_defined( 'JETPACK__PLUGIN_DIR' ) ) { + include_once JETPACK__PLUGIN_DIR . 'modules/protect/shared-functions.php'; + if ( ! jetpack_protect_get_ip() ) { + $state->state( 'message', 'protect_misconfigured_ip' ); + return false; + } + } + + if ( class_exists( 'Jetpack_Plan' ) && ! \Jetpack_Plan::supports( $module ) ) { + return false; + } + + // Check the file for fatal errors, a la wp-admin/plugins.php::activate. + $errors = new Errors(); + $state->state( 'module', $module ); + $state->state( 'error', 'module_activation_failed' ); // we'll override this later if the plugin can be included without fatal error. + $errors->catch_errors( true ); + + ob_start(); + $module_path = $this->get_path( $module ); + if ( file_exists( $module_path ) ) { + require $this->get_path( $module ); // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.NotAbsolutePath + } + + $active[] = $module; + $this->update_active( $active ); + + $state->state( 'error', false ); // the override. + ob_end_clean(); + $errors->catch_errors( false ); + } else { // Not a Jetpack plugin. + $active[] = $module; + $this->update_active( $active ); + } + + if ( $redirect ) { + wp_safe_redirect( ( new Paths() )->admin_url( 'page=jetpack' ) ); + } + if ( $exit ) { + exit; + } + return true; + } + + /** + * Deactivate module. + * + * @param string $module Module slug. + * + * @return bool + */ + public function deactivate( $module ) { + /** + * Fires when a module is deactivated. + * + * @since 1.9.0 + * + * @param string $module Module slug. + */ + do_action( 'jetpack_pre_deactivate_module', $module ); + + $active = $this->get_active(); + $new = array_filter( array_diff( $active, (array) $module ) ); + + return $this->update_active( $new ); + } + + /** + * Generate a module's path from its slug. + * + * @param string $slug Module slug. + */ + public function get_path( $slug ) { + if ( ! Constants::is_defined( 'JETPACK__PLUGIN_DIR' ) ) { + return ''; + } + /** + * Filters the path of a modules. + * + * @since 7.4.0 + * + * @param array $return The absolute path to a module's root php file + * @param string $slug The module slug + */ + return apply_filters( 'jetpack_get_module_path', JETPACK__PLUGIN_DIR . "modules/$slug.php", $slug ); + } + + /** + * Saves all the currently active modules to options. + * Also fires Action hooks for each newly activated and deactivated module. + * + * @param array $modules Array of active modules to be saved in options. + * + * @return $success bool true for success, false for failure. + */ + public function update_active( $modules ) { + $current_modules = \Jetpack_Options::get_option( 'active_modules', array() ); + $active_modules = $this->get_active(); + $new_active_modules = array_diff( $modules, $current_modules ); + $new_inactive_modules = array_diff( $active_modules, $modules ); + $new_current_modules = array_diff( array_merge( $current_modules, $new_active_modules ), $new_inactive_modules ); + $reindexed_modules = array_values( $new_current_modules ); + $success = \Jetpack_Options::update_option( 'active_modules', array_unique( $reindexed_modules ) ); + // Let's take `pre_update_option_jetpack_active_modules` filter into account + // and actually decide for which modules we need to fire hooks by comparing + // the 'active_modules' option before and after the update. + $current_modules_post_update = \Jetpack_Options::get_option( 'active_modules', array() ); + + $new_inactive_modules = array_diff( $current_modules, $current_modules_post_update ); + $new_inactive_modules = array_unique( $new_inactive_modules ); + $new_inactive_modules = array_values( $new_inactive_modules ); + + $new_active_modules = array_diff( $current_modules_post_update, $current_modules ); + $new_active_modules = array_unique( $new_active_modules ); + $new_active_modules = array_values( $new_active_modules ); + + foreach ( $new_active_modules as $module ) { + /** + * Fires when a specific module is activated. + * + * @since 1.9.0 + * + * @param string $module Module slug. + * @param boolean $success whether the module was activated. @since 4.2 + */ + do_action( 'jetpack_activate_module', $module, $success ); + /** + * Fires when a module is activated. + * The dynamic part of the filter, $module, is the module slug. + * + * @since 1.9.0 + * + * @param string $module Module slug. + */ + do_action( "jetpack_activate_module_$module", $module ); + } + + foreach ( $new_inactive_modules as $module ) { + /** + * Fired after a module has been deactivated. + * + * @since 4.2.0 + * + * @param string $module Module slug. + * @param boolean $success whether the module was deactivated. + */ + do_action( 'jetpack_deactivate_module', $module, $success ); + /** + * Fires when a module is deactivated. + * The dynamic part of the filter, $module, is the module slug. + * + * @since 1.9.0 + * + * @param string $module Module slug. + */ + do_action( "jetpack_deactivate_module_$module", $module ); + } + + return $success; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-paths.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-paths.php new file mode 100644 index 00000000..a3313c66 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-paths.php @@ -0,0 +1,28 @@ +<?php +/** + * A Path & URL utility class for Jetpack. + * + * @package automattic/jetpack-status + */ + +namespace Automattic\Jetpack; + +/** + * Class Automattic\Jetpack\Paths + * + * Used to retrieve information about files. + */ +class Paths { + /** + * Jetpack Admin URL. + * + * @param array $args Query string args. + * + * @return string Jetpack admin URL. + */ + public function admin_url( $args = null ) { + $args = wp_parse_args( $args, array( 'page' => 'jetpack' ) ); + $url = add_query_arg( $args, admin_url( 'admin.php' ) ); + return $url; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-status.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-status.php index ea161122..91c446c4 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-status.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-status.php @@ -7,6 +7,8 @@ namespace Automattic\Jetpack; +use Automattic\Jetpack\Status\Cache; +use Automattic\Jetpack\Status\Host; use WPCOM_Masterbar; /** @@ -37,6 +39,11 @@ class Status { * @return bool Whether Jetpack's offline mode is active. */ public function is_offline_mode() { + $cached = Cache::get( 'is_offline_mode' ); + if ( null !== $cached ) { + return $cached; + } + $offline_mode = false; if ( defined( '\\JETPACK_DEV_DEBUG' ) ) { @@ -73,6 +80,7 @@ class Status { */ $offline_mode = (bool) apply_filters( 'jetpack_offline_mode', $offline_mode ); + Cache::set( 'is_offline_mode', $offline_mode ); return $offline_mode; } @@ -101,16 +109,24 @@ class Status { public function is_multi_network() { global $wpdb; + $cached = Cache::get( 'is_multi_network' ); + if ( null !== $cached ) { + return $cached; + } + // If we don't have a multi site setup no need to do any more. if ( ! is_multisite() ) { + Cache::set( 'is_multi_network', false ); return false; } $num_sites = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->site}" ); if ( $num_sites > 1 ) { + Cache::set( 'is_multi_network', true ); return true; } + Cache::set( 'is_multi_network', false ); return false; } @@ -122,12 +138,17 @@ class Status { public function is_single_user_site() { global $wpdb; - $some_users = get_transient( 'jetpack_is_single_user' ); - if ( false === $some_users ) { - $some_users = $wpdb->get_var( "SELECT COUNT(*) FROM (SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities' LIMIT 2) AS someusers" ); - set_transient( 'jetpack_is_single_user', (int) $some_users, 12 * HOUR_IN_SECONDS ); + $ret = Cache::get( 'is_single_user_site' ); + if ( null === $ret ) { + $some_users = get_transient( 'jetpack_is_single_user' ); + if ( false === $some_users ) { + $some_users = $wpdb->get_var( "SELECT COUNT(*) FROM (SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities' LIMIT 2) AS someusers" ); + set_transient( 'jetpack_is_single_user', (int) $some_users, 12 * HOUR_IN_SECONDS ); + } + $ret = 1 === (int) $some_users; + Cache::set( 'is_single_user_site', $ret ); } - return 1 === (int) $some_users; + return $ret; } /** @@ -138,8 +159,15 @@ class Status { * @return bool */ public function is_local_site() { + $cached = Cache::get( 'is_local_site' ); + if ( null !== $cached ) { + return $cached; + } + + $site_url = site_url(); + // Check for localhost and sites using an IP only first. - $is_local = site_url() && false === strpos( site_url(), '.' ); + $is_local = $site_url && false === strpos( $site_url, '.' ); // @todo Remove function_exists when the package has a documented minimum WP version. // Use Core's environment check, if available. Added in 5.5.0 / 5.5.1 (for `local` return value). @@ -160,7 +188,7 @@ class Status { if ( ! $is_local ) { foreach ( $known_local as $url ) { - if ( preg_match( $url, site_url() ) ) { + if ( preg_match( $url, $site_url ) ) { $is_local = true; break; } @@ -174,7 +202,10 @@ class Status { * * @param bool $is_local If the current site is a local site. */ - return apply_filters( 'jetpack_is_local_site', $is_local ); + $is_local = apply_filters( 'jetpack_is_local_site', $is_local ); + + Cache::set( 'is_local_site', $is_local ); + return $is_local; } /** @@ -185,13 +216,18 @@ class Status { * @return bool */ public function is_staging_site() { + $cached = Cache::get( 'is_staging_site' ); + if ( null !== $cached ) { + return $cached; + } + // @todo Remove function_exists when the package has a documented minimum WP version. // Core's wp_get_environment_type allows for a few specific options. We should default to bowing out gracefully for anything other than production or local. $is_staging = function_exists( 'wp_get_environment_type' ) && ! in_array( wp_get_environment_type(), array( 'production', 'local' ), true ); $known_staging = array( 'urls' => array( - '#\.staging\.wpengine\.com$#i', // WP Engine. + '#\.staging\.wpengine\.com$#i', // WP Engine. This is their legacy staging URL structure. Their new platform does not have a common URL. https://github.com/Automattic/jetpack/issues/21504 '#\.staging\.kinsta\.com$#i', // Kinsta.com. '#\.kinsta\.cloud$#i', // Kinsta.com. '#\.stage\.site$#i', // DreamPress. @@ -205,7 +241,7 @@ class Status { '#\-liquidwebsites\.com$#i', // Liquidweb. ), 'constants' => array( - 'IS_WPE_SNAPSHOT', // WP Engine. + 'IS_WPE_SNAPSHOT', // WP Engine. This is used on their legacy staging environment. Their new platform does not have a constant. https://github.com/Automattic/jetpack/issues/21504 'KINSTA_DEV_ENV', // Kinsta.com. 'WPSTAGECOACH_STAGING', // WP Stagecoach. 'JETPACK_STAGING_MODE', // Generic. @@ -227,8 +263,9 @@ class Status { $known_staging = apply_filters( 'jetpack_known_staging', $known_staging ); if ( isset( $known_staging['urls'] ) ) { + $site_url = site_url(); foreach ( $known_staging['urls'] as $url ) { - if ( preg_match( $url, wp_parse_url( site_url(), PHP_URL_HOST ) ) ) { + if ( preg_match( $url, wp_parse_url( $site_url, PHP_URL_HOST ) ) ) { $is_staging = true; break; } @@ -256,7 +293,25 @@ class Status { * * @param bool $is_staging If the current site is a staging site. */ - return apply_filters( 'jetpack_is_staging_site', $is_staging ); + $is_staging = apply_filters( 'jetpack_is_staging_site', $is_staging ); + + Cache::set( 'is_staging_site', $is_staging ); + return $is_staging; + } + + /** + * Whether the site is currently onboarding or not. + * A site is considered as being onboarded if it currently has an onboarding token. + * + * @since-jetpack 5.8 + * + * @access public + * @static + * + * @return bool True if the site is currently onboarding, false otherwise + */ + public function is_onboarding() { + return \Jetpack_Options::get_option( 'onboarding' ) !== false; } /** @@ -276,13 +331,25 @@ class Status { return WPCOM_Masterbar::get_calypso_site_slug( get_current_blog_id() ); } + // Grab the 'site_url' option for WoA sites to avoid plugins to interfere with the site + // identifier (e.g. i18n plugins may change the main url to '<DOMAIN>/<LOCALE>', but we + // want to exclude the locale since it's not part of the site suffix). + if ( ( new Host() )->is_woa_site() ) { + $url = \site_url(); + } + if ( empty( $url ) ) { + // WordPress can be installed in subdirectories (e.g. make.wordpress.org/plugins) + // where the 'site_url' option points to the root domain (e.g. make.wordpress.org) + // which could collide with another site in the same domain but with WordPress + // installed in a different subdirectory (e.g. make.wordpress.org/core). To avoid + // such collision, we identify the site with the 'home_url' option. $url = \home_url(); } $url = preg_replace( '#^.*?://#', '', $url ); $url = str_replace( '/', '::', $url ); - return $url; + return rtrim( $url, ':' ); } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php new file mode 100644 index 00000000..d80d891d --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php @@ -0,0 +1,44 @@ +<?php +/** + * Status and information regarding the site visitor. + * + * @package automattic/jetpack-status + */ + +namespace Automattic\Jetpack\Status; + +/** + * Visitor class. + */ +class Visitor { + + /** + * Gets current user IP address. + * + * @param bool $check_all_headers Check all headers? Default is `false`. + * + * @return string Current user IP address. + */ + public function get_ip( $check_all_headers = false ) { + if ( $check_all_headers ) { + foreach ( array( + 'HTTP_CF_CONNECTING_IP', + 'HTTP_CLIENT_IP', + 'HTTP_X_FORWARDED_FOR', + 'HTTP_X_FORWARDED', + 'HTTP_X_CLUSTER_CLIENT_IP', + 'HTTP_FORWARDED_FOR', + 'HTTP_FORWARDED', + 'HTTP_VIA', + ) as $key ) { + if ( ! empty( $_SERVER[ $key ] ) ) { + // @todo Some of these might actually be lists of IPs (e.g. HTTP_X_FORWARDED_FOR) or something else entirely (HTTP_VIA). + return filter_var( wp_unslash( $_SERVER[ $key ] ) ); + } + } + } + + return ! empty( $_SERVER['REMOTE_ADDR'] ) ? filter_var( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : ''; + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/CHANGELOG.md index aca0a702..531c86f0 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/CHANGELOG.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/CHANGELOG.md @@ -5,6 +5,115 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.35.0] - 2022-05-30 +### Changed +- Sync: Add '_jetpack_blogging_prompt_key' to default post meta whitelist + +## [1.34.0] - 2022-05-24 +### Changed +- Dedicated Sync - Introduce custom endpoint for spawning Sync requests [#24468] +- Sync: Add 'active_modules' to default whitelisted callables. [#24453] + +## [1.33.1] - 2022-05-19 +### Removed +- Removed dedicated sync custom endpoints pending error investigation [#24419] + +## [1.33.0] - 2022-05-18 +### Changed +- Dedicated Sync: Introduce custom endpoint for spawning Sync requests [#24344] + +## [1.32.0] - 2022-05-10 +### Added +- Search: add search options to option whitelist [#24167] + +## [1.31.1] - 2022-05-04 +### Changed +- Updated package dependencies. [#24095] +- WordPress 6.1 Compatibilty [#24083] + +### Deprecated +- Moved the options class into Connection. [#24095] + +## [1.31.0] - 2022-04-26 +### Added +- Adds filter to get_themes callable + +### Deprecated +- Removed Heartbeat by hoisting it into Connection. + +## [1.30.8] - 2022-04-19 +### Added +- Added get_themes Callable to sync the list of installed themes on a site +- Added get_themes to Sync defaults + +### Changed +- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` +- Updated package dependencies. + +## [1.30.7] - 2022-04-12 +### Added +- Adding new site option to be synced. + +## [1.30.6] - 2022-04-06 +### Changed +- Updated package dependencies. + +### Fixed +- Dedicated Sync: Only try to run the sender once if Dedicated Sync is enabled as it has its own requeueing mechanism. + +## [1.30.5] - 2022-03-29 +### Changed +- Microperformance: Use === null instead of is_null + +## [1.30.4] - 2022-03-23 +### Changed +- Enable syncing of dedicated_sync_enabled Sync setting + +### Fixed +- Dedicated Sync: Allow spawning request with expired Retry-After + +## [1.30.3] - 2022-03-15 +### Changed +- Search Sync Settings :: Add ETB taxonomy to allow list. + +## [1.30.2] - 2022-03-08 +### Changed +- Disallow syncing of _term_meta post_type + +## [1.30.1] - 2022-03-02 +### Added +- Dedicated Sync flow: Allow enabling or disabling via WPCOM response header + +## [1.30.0] - 2022-02-22 +### Added +- Add Sync dedicated request flow. + +### Changed +- Updated package dependencies. + +## [1.29.2] - 2022-02-09 +### Added +- Allow sync package consumers to provide custom data settings. + +### Fixed +- Fixed some new PHPCS warnings. + +## [1.29.1] - 2022-02-02 +### Changed +- Updated package dependencies. + +## [1.29.0] - 2022-01-25 +### Added +- Jetpack Search: update the allowed post meta when search is active to include all indexable meta. + +## [1.28.2] - 2022-01-18 +### Changed +- Updated package dependencies. + +## [1.28.1] - 2022-01-13 +### Changed +- Updated package dependencies. + ## [1.28.0] - 2022-01-04 ### Changed - Listener: Do not enqueue actions when the site is disconnected @@ -550,6 +659,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Packages: Move sync to a classmapped package +[1.35.0]: https://github.com/Automattic/jetpack-sync/compare/v1.34.0...v1.35.0 +[1.34.0]: https://github.com/Automattic/jetpack-sync/compare/v1.33.1...v1.34.0 +[1.33.1]: https://github.com/Automattic/jetpack-sync/compare/v1.33.0...v1.33.1 +[1.33.0]: https://github.com/Automattic/jetpack-sync/compare/v1.32.0...v1.33.0 +[1.32.0]: https://github.com/Automattic/jetpack-sync/compare/v1.31.1...v1.32.0 +[1.31.1]: https://github.com/Automattic/jetpack-sync/compare/v1.31.0...v1.31.1 +[1.31.0]: https://github.com/Automattic/jetpack-sync/compare/v1.30.8...v1.31.0 +[1.30.8]: https://github.com/Automattic/jetpack-sync/compare/v1.30.7...v1.30.8 +[1.30.7]: https://github.com/Automattic/jetpack-sync/compare/v1.30.6...v1.30.7 +[1.30.6]: https://github.com/Automattic/jetpack-sync/compare/v1.30.5...v1.30.6 +[1.30.5]: https://github.com/Automattic/jetpack-sync/compare/v1.30.4...v1.30.5 +[1.30.4]: https://github.com/Automattic/jetpack-sync/compare/v1.30.3...v1.30.4 +[1.30.3]: https://github.com/Automattic/jetpack-sync/compare/v1.30.2...v1.30.3 +[1.30.2]: https://github.com/Automattic/jetpack-sync/compare/v1.30.1...v1.30.2 +[1.30.1]: https://github.com/Automattic/jetpack-sync/compare/v1.30.0...v1.30.1 +[1.30.0]: https://github.com/Automattic/jetpack-sync/compare/v1.29.2...v1.30.0 +[1.29.2]: https://github.com/Automattic/jetpack-sync/compare/v1.29.1...v1.29.2 +[1.29.1]: https://github.com/Automattic/jetpack-sync/compare/v1.29.0...v1.29.1 +[1.29.0]: https://github.com/Automattic/jetpack-sync/compare/v1.28.2...v1.29.0 +[1.28.2]: https://github.com/Automattic/jetpack-sync/compare/v1.28.1...v1.28.2 +[1.28.1]: https://github.com/Automattic/jetpack-sync/compare/v1.28.0...v1.28.1 [1.28.0]: https://github.com/Automattic/jetpack-sync/compare/v1.27.6...v1.28.0 [1.27.6]: https://github.com/Automattic/jetpack-sync/compare/v1.27.5...v1.27.6 [1.27.5]: https://github.com/Automattic/jetpack-sync/compare/v1.27.4...v1.27.5 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php index e2f05c98..768ade58 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php @@ -89,6 +89,8 @@ class Actions { /** * Initialize Sync for cron jobs, set up listeners for WordPress Actions, * and set up a shut-down action for sending actions to WordPress.com + * If dedicated Sync is enabled and this is a dedicated Sync request + * up an init action for sending actions to WordPress.com instead. * * @access public * @static @@ -99,6 +101,15 @@ class Actions { return; } + // If dedicated Sync is enabled and this is a dedicated Sync request, no need to + // initialize Sync for cron jobs, set up listeners or set up a shut-down action + // for sending actions to WordPress.com. + // We only need to set up an init action for sending actions to WordPress.com and exit early. + if ( Settings::is_dedicated_sync_enabled() && Dedicated_Sender::is_dedicated_sync_request() ) { + add_action( 'init', array( __CLASS__, 'add_dedicated_sync_sender_init' ), 90 ); + return; + } + if ( self::sync_via_cron_allowed() ) { self::init_sync_cron_jobs(); } elseif ( wp_next_scheduled( 'jetpack_sync_cron' ) ) { @@ -164,6 +175,22 @@ class Actions { } /** + * Immediately sends actions on init for the current dedicated Sync request. + * + * @access public + * @static + */ + public static function add_dedicated_sync_sender_init() { + if ( apply_filters( + 'jetpack_sync_sender_should_load', + true + ) ) { + self::initialize_sender(); + self::$sender->do_dedicated_sync_and_exit(); + } + } + + /** * Define JETPACK_SYNC_READ_ONLY constant if not defined. * This notifies sync to not run in shutdown if it was initialized during init. * @@ -194,6 +221,13 @@ class Actions { return self::sync_via_cron_allowed(); } + /** + * For now, if dedicated Sync is enabled we will always initialize send, even for GET and unauthenticated requests. + */ + if ( Settings::is_dedicated_sync_enabled() ) { + return true; + } + if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] ) { return true; } @@ -379,14 +413,16 @@ class Actions { public static function send_data( $data, $codec_name, $sent_timestamp, $queue_id, $checkout_duration, $preprocess_duration, $queue_size = null, $buffer_id = null ) { $query_args = array( - 'sync' => '1', // Add an extra parameter to the URL so we can tell it's a sync action. - 'codec' => $codec_name, - 'timestamp' => $sent_timestamp, - 'queue' => $queue_id, - 'cd' => sprintf( '%.4f', $checkout_duration ), - 'pd' => sprintf( '%.4f', $preprocess_duration ), - 'queue_size' => $queue_size, - 'buffer_id' => $buffer_id, + 'sync' => '1', // Add an extra parameter to the URL so we can tell it's a sync action. + 'codec' => $codec_name, + 'timestamp' => $sent_timestamp, + 'queue' => $queue_id, + 'cd' => sprintf( '%.4f', $checkout_duration ), + 'pd' => sprintf( '%.4f', $preprocess_duration ), + 'queue_size' => $queue_size, + 'buffer_id' => $buffer_id, + // TODO this will be extended in the future. Might be good to extract in a separate method to support future entries too. + 'sync_flow_type' => Settings::is_dedicated_sync_enabled() ? 'dedicated' : 'default', ); $query_args['timeout'] = Settings::is_doing_cron() ? 30 : 20; @@ -437,6 +473,17 @@ class Actions { } } + // Enable/Disable Dedicated Sync flow via response headers. + $dedicated_sync_header = $rpc->get_response_header( 'Jetpack-Dedicated-Sync' ); + if ( false !== $dedicated_sync_header ) { + $dedicated_sync_enabled = 'on' === $dedicated_sync_header ? 1 : 0; + Settings::update_settings( + array( + 'dedicated_sync_enabled' => $dedicated_sync_enabled, + ) + ); + } + if ( ! $result ) { if ( false === $retry_after ) { // We received a non standard response from WP.com, lets backoff from sending requests for 1 minute. @@ -631,6 +678,14 @@ class Actions { break; } + /** + * Only try to sync once if Dedicated Sync is enabled. Dedicated Sync has its own requeueing mechanism + * that will re-run it if there are items in the queue at the end. + */ + if ( 'sync' === $type && $executions >= 1 && Settings::is_dedicated_sync_enabled() ) { + break; + } + $result = 'full_sync' === $type ? self::$sender->do_full_sync() : self::$sender->do_sync(); // # of send actions performed. @@ -676,6 +731,36 @@ class Actions { } /** + * Initializes sync for Instant Search. + * + * @access public + * @static + */ + public static function initialize_search() { + if ( false === class_exists( 'Automattic\\Jetpack\\Search\\Module_Control' ) ) { + return; + } + $search_module = new \Automattic\Jetpack\Search\Module_Control(); + if ( $search_module->is_instant_search_enabled() ) { + add_filter( 'jetpack_sync_modules', array( __CLASS__, 'add_search_sync_module' ) ); + } + } + + /** + * Add Search updates to Sync Filters. + * + * @access public + * @static + * + * @param array $sync_modules The list of sync modules declared prior to this filter. + * @return array A list of sync modules that now includes Search's modules. + */ + public static function add_search_sync_module( $sync_modules ) { + $sync_modules[] = 'Automattic\\Jetpack\\Sync\\Modules\\Search'; + return $sync_modules; + } + + /** * Adds Woo's sync modules to existing modules for sending. * * @access public diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php new file mode 100644 index 00000000..fa2adae4 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php @@ -0,0 +1,355 @@ +<?php +/** + * The Data Settings class. + * + * @package automattic/jetpack-sync + */ + +namespace Automattic\Jetpack\Sync; + +/** + * The Data_Settings class + */ +class Data_Settings { + + /** + * The data that must be synced for every synced site. + */ + const MUST_SYNC_DATA_SETTINGS = array( + 'jetpack_sync_modules' => array( + 'Automattic\\Jetpack\\Sync\\Modules\\Callables', + 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately', // enable Initial Sync on Site Connection. + ), + 'jetpack_sync_callable_whitelist' => array( + 'site_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'site_url' ), + 'home_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'home_url' ), + 'paused_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_plugins' ), + 'paused_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_themes' ), + ), + ); + + const MODULE_FILTER_MAPPING = array( + 'Automattic\\Jetpack\\Sync\\Modules\\Options' => array( + 'jetpack_sync_options_whitelist', + 'jetpack_sync_options_contentless', + ), + 'Automattic\\Jetpack\\Sync\\Modules\\Constants' => array( + 'jetpack_sync_constants_whitelist', + ), + 'Automattic\\Jetpack\\Sync\\Modules\\Callables' => array( + 'jetpack_sync_callable_whitelist', + 'jetpack_sync_multisite_callable_whitelist', + ), + 'Automattic\\Jetpack\\Sync\\Modules\\Posts' => array( + 'jetpack_sync_post_meta_whitelist', + ), + 'Automattic\\Jetpack\\Sync\\Modules\\Comments' => array( + 'jetpack_sync_comment_meta_whitelist', + ), + 'Automattic\\Jetpack\\Sync\\Modules\\Users' => array( + 'jetpack_sync_capabilities_whitelist', + ), + 'Automattic\\Jetpack\\Sync\\Modules\\Import' => array( + 'jetpack_sync_known_importers', + ), + ); + + const MODULES_FILTER_NAME = 'jetpack_sync_modules'; + + /** + * The static data settings array which contains the aggregated data settings for + * each sync filter. + * + * @var array + */ + private static $data_settings = array(); + + /** + * The static array which contains the list of filter hooks that have already been set up. + * + * @var array + */ + private static $set_filter_hooks = array(); + + /** + * Adds the data settings provided by a plugin to the Sync data settings. + * + * @param array $plugin_settings The array provided by the plugin. The array must use filters + * from the DATA_FILTER_DEFAULTS list as keys. + */ + public function add_settings_list( $plugin_settings = array() ) { + if ( empty( $plugin_settings[ self::MODULES_FILTER_NAME ] ) + || ! is_array( $plugin_settings[ self::MODULES_FILTER_NAME ] ) ) { + /* + * No modules have been set, so use defaults for everything and bail early. + */ + $this->set_all_defaults(); + return; + } + + $this->add_filters_custom_settings_and_hooks( $plugin_settings ); + + if ( ! did_action( 'jetpack_sync_add_required_data_settings' ) ) { + $this->add_required_settings(); + /** + * Fires when the required settings have been adding to the static + * data_settings array. + * + * @since 1.29.2 + * + * @module sync + */ + do_action( 'jetpack_sync_add_required_data_settings' ); + } + } + + /** + * Sets the default values for sync modules and all sync data filters. + */ + private function set_all_defaults() { + $this->add_sync_filter_setting( self::MODULES_FILTER_NAME, Modules::DEFAULT_SYNC_MODULES ); + + foreach ( array_keys( Default_Filter_Settings::DATA_FILTER_DEFAULTS ) as $filter ) { + $this->add_sync_filter_setting( $filter, $this->get_default_setting_for_filter( $filter ) ); + } + } + + /** + * Returns the default settings for the given filter. + * + * @param string $filter The filter name. + * + * @return array The filter's default settings array. + */ + private function get_default_setting_for_filter( $filter ) { + if ( self::MODULES_FILTER_NAME === $filter ) { + return Modules::DEFAULT_SYNC_MODULES; + } + + return ( new Default_Filter_Settings() )->get_default_settings( $filter ); + } + + /** + * Adds the custom settings and sets up the necessary filter hooks. + * + * @param array $filters_settings The custom settings. + */ + private function add_filters_custom_settings_and_hooks( $filters_settings ) { + if ( ! isset( $filters_settings[ self::MODULES_FILTER_NAME ] ) ) { + // This shouldn't happen. + return; + } + + $this->add_custom_filter_setting( self::MODULES_FILTER_NAME, $filters_settings[ self::MODULES_FILTER_NAME ] ); + + $enabled_modules = $filters_settings[ self::MODULES_FILTER_NAME ]; + $all_modules = Modules::DEFAULT_SYNC_MODULES; + + foreach ( $all_modules as $module ) { + if ( in_array( $module, $enabled_modules, true ) ) { + $this->add_filters_for_enabled_module( $module, $filters_settings ); + } else { + $this->add_filters_for_disabled_module( $module ); + } + } + } + + /** + * Adds the filters for the provided enabled module. If the settings provided custom filter settings + * for the module's filters, those are used. Otherwise, the filter's default settings are used. + * + * @param string $module The module name. + * @param array $filters_settings The settings for the filters. + */ + private function add_filters_for_enabled_module( $module, $filters_settings ) { + $module_mapping = self::MODULE_FILTER_MAPPING; + $filters_for_module = isset( $module_mapping[ $module ] ) ? $module_mapping[ $module ] : array(); + + foreach ( $filters_for_module as $filter ) { + if ( isset( $filters_settings[ $filter ] ) ) { + $this->add_custom_filter_setting( $filter, $filters_settings[ $filter ] ); + } else { + $this->add_sync_filter_setting( $filter, $this->get_default_setting_for_filter( $filter ) ); + } + } + } + + /** + * Adds the filters for the provided disabled module. The disabled module's associated filter settings are + * set to an empty array. + * + * @param string $module The module name. + */ + private function add_filters_for_disabled_module( $module ) { + $module_mapping = self::MODULE_FILTER_MAPPING; + $filters_for_module = isset( $module_mapping[ $module ] ) ? $module_mapping[ $module ] : array(); + + foreach ( $filters_for_module as $filter ) { + $this->add_custom_filter_setting( $filter, array() ); + } + } + + /** + * Adds the provided custom setting for a filter. If the filter setting isn't valid, the default + * value is used. + * + * If the filter's hook hasn't already been set up, it gets set up. + * + * @param string $filter The filter. + * @param array $setting The filter setting. + */ + private function add_custom_filter_setting( $filter, $setting ) { + if ( ! $this->is_valid_filter_setting( $filter, $setting ) ) { + /* + * The provided setting isn't valid, so use the default for this filter. + * We're using the default values so there's no need to set the filter hook. + */ + $this->add_sync_filter_setting( $filter, $this->get_default_setting_for_filter( $filter ) ); + return; + } + + if ( ! isset( static::$set_filter_hooks[ $filter ] ) ) { + // First time a custom modules setting is provided, so set the filter hook. + add_filter( $filter, array( $this, 'sync_data_filter_hook' ) ); + static::$set_filter_hooks[ $filter ] = 1; + } + + $this->add_sync_filter_setting( $filter, $setting ); + } + + /** + * Determines whether the filter setting is valid. The setting array is in the correct format (associative or indexed). + * + * @param string $filter The filter to check. + * @param array $filter_settings The filter settings. + * + * @return bool Whether the filter settings can be used. + */ + private function is_valid_filter_setting( $filter, $filter_settings ) { + if ( ! is_array( $filter_settings ) ) { + // The settings for each filter must be an array. + return false; + } + + if ( empty( $filter_settings ) ) { + // Empty settings are allowed. + return true; + } + + $indexed_array = isset( $filter_settings[0] ); + if ( in_array( $filter, Default_Filter_Settings::ASSOCIATIVE_FILTERS, true ) && ! $indexed_array ) { + return true; + } elseif ( ! in_array( $filter, Default_Filter_Settings::ASSOCIATIVE_FILTERS, true ) && $indexed_array ) { + return true; + } + + return false; + } + + /** + * Adds the data settings that are always required for every plugin that uses Sync. + */ + private function add_required_settings() { + foreach ( self::MUST_SYNC_DATA_SETTINGS as $filter => $setting ) { + $this->add_custom_filter_setting( $filter, $setting ); + } + } + + /** + * Adds the provided data setting for the provided filter. + * + * @param string $filter The filter name. + * @param array $value The data setting. + */ + private function add_sync_filter_setting( $filter, $value ) { + if ( ! isset( static::$data_settings[ $filter ] ) ) { + static::$data_settings[ $filter ] = $value; + return; + } + + if ( in_array( $filter, Default_Filter_Settings::ASSOCIATIVE_FILTERS, true ) ) { + $this->add_associative_filter_setting( $filter, $value ); + } else { + $this->add_indexed_filter_setting( $filter, $value ); + } + } + + /** + * Adds the provided data setting for the provided filter. This method handles + * adding settings to data that is stored as an associative array. + * + * @param string $filter The filter name. + * @param array $settings The data settings. + */ + private function add_associative_filter_setting( $filter, $settings ) { + foreach ( $settings as $key => $item ) { + if ( ! array_key_exists( $key, static::$data_settings[ $filter ] ) ) { + static::$data_settings[ $filter ][ $key ] = $item; + } + } + } + + /** + * Adds the provided data setting for the provided filter. This method handles + * adding settings to data that is stored as an indexed array. + * + * @param string $filter The filter name. + * @param array $settings The data settings. + */ + private function add_indexed_filter_setting( $filter, $settings ) { + static::$data_settings[ $filter ] = array_unique( + array_merge( + static::$data_settings[ $filter ], + $settings + ) + ); + } + + /** + * The callback function added to the sync data filters. Combines the list in the $data_settings property + * with any non-default values from the received array. + * + * @param array $filtered_values The data revieved from the filter. + * + * @return array The data settings for the filter. + */ + public function sync_data_filter_hook( $filtered_values ) { + if ( ! is_array( $filtered_values ) ) { + // Something is wrong with the input, so set it to an empty array. + $filtered_values = array(); + } + + $current_filter = current_filter(); + + if ( ! isset( static::$data_settings[ $current_filter ] ) ) { + return $filtered_values; + } + + if ( in_array( $current_filter, Default_Filter_Settings::ASSOCIATIVE_FILTERS, true ) ) { + $extra_filters = array_diff_key( $filtered_values, $this->get_default_setting_for_filter( $current_filter ) ); + $this->add_associative_filter_setting( $current_filter, $extra_filters ); + return static::$data_settings[ $current_filter ]; + } + + $extra_filters = array_diff( $filtered_values, $this->get_default_setting_for_filter( $current_filter ) ); + $this->add_indexed_filter_setting( $current_filter, $extra_filters ); + return static::$data_settings[ $current_filter ]; + } + + /** + * Sets the $data_settings property to an empty array. This is useful for testing. + */ + public function empty_data_settings_and_hooks() { + static::$data_settings = array(); + static::$set_filter_hooks = array(); + } + + /** + * Returns the $data_settings property. + * + * @return array The data_settings property. + */ + public function get_data_settings() { + return static::$data_settings; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php new file mode 100644 index 00000000..0d068766 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php @@ -0,0 +1,204 @@ +<?php +/** + * Dedicated Sender. + * + * The class is responsible for spawning dedicated Sync requests. + * + * @package automattic/jetpack-sync + */ + +namespace Automattic\Jetpack\Sync; + +use WP_Error; +/** + * Class to manage Sync spawning. + * The purpose of this class is to provide the means to unblock Sync + * from running in the shutdown hook of regular requests by spawning a + * dedicated Sync request instead which will trigger Sync to run. + */ +class Dedicated_Sender { + + /** + * The transient name for storing the response code + * after spawning a dedicated sync test request. + */ + const DEDICATED_SYNC_CHECK_TRANSIENT = 'jetpack_sync_dedicated_sync_spawn_check'; + + /** + * Validation string to check if the endpoint is working correctly. + * + * This is extracted and not hardcoded, as we might want to change it in the future. + */ + const DEDICATED_SYNC_VALIDATION_STRING = 'DEDICATED SYNC OK'; + + /** + * Filter a URL to check if Dedicated Sync is enabled. + * We need to remove slashes and then run it through `urldecode` as sometimes the + * URL is in an encoded form, depending on server configuration. + * + * @param string $url The URL to filter. + * + * @return string + */ + public static function prepare_url_for_dedicated_request_check( $url ) { + return urldecode( $url ); + } + /** + * Check if this request should trigger Sync to run. + * + * @access public + * + * @return boolean True if this is a 'jetpack/v4/sync/spawn-sync', false otherwise. + */ + public static function is_dedicated_sync_request() { + /** + * Check $_SERVER['REQUEST_URI'] first, to see if we're in the right context. + * This is done to make sure we can hook in very early in the initialization of WordPress to + * be able to send sync requests to the backend as fast as possible, without needing to continue + * loading things for the request. + */ + if ( ! isset( $_SERVER['REQUEST_URI'] ) ) { + return false; + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.NonceVerification.Recommended + $check_url = self::prepare_url_for_dedicated_request_check( wp_unslash( $_SERVER['REQUEST_URI'] ) ); + if ( strpos( $check_url, 'jetpack/v4/sync/spawn-sync' ) !== false ) { + return true; + } + + /** + * If the above check failed, we might have an issue with detecting calls to the REST endpoint early on. + * Sometimes, like when permalinks are disabled, the REST path is sent via the `rest_route` GET parameter. + * We want to check it too, to make sure we managed to cover more cases and be more certain we actually + * catch calls to the endpoint. + */ + if ( ! isset( $_GET['rest_route'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended + return false; + } + + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.NonceVerification.Recommended + $check_url = self::prepare_url_for_dedicated_request_check( wp_unslash( $_GET['rest_route'] ) ); + if ( strpos( $check_url, 'jetpack/v4/sync/spawn-sync' ) !== false ) { + return true; + } + + return false; + } + + /** + * Send a request to run Sync for a certain sync queue + * through HTTP request that doesn't halt page loading. + * + * @access public + * + * @param Automattic\Jetpack\Sync\Queue $queue Queue object. + * + * @return boolean|WP_Error True if spawned, WP_Error otherwise. + */ + public static function spawn_sync( $queue ) { + if ( ! Settings::is_dedicated_sync_enabled() ) { + return new WP_Error( 'dedicated_sync_disabled', 'Dedicated Sync flow is disabled.' ); + } + + if ( $queue->is_locked() ) { + return new WP_Error( 'locked_queue_' . $queue->id ); + } + + if ( $queue->size() === 0 ) { + return new WP_Error( 'empty_queue_' . $queue->id ); + } + + // Return early if we've gotten a retry-after header response that is not expired. + $retry_time = get_option( Actions::RETRY_AFTER_PREFIX . $queue->id ); + if ( $retry_time && $retry_time >= microtime( true ) ) { + return new WP_Error( 'retry_after_' . $queue->id ); + } + + // Don't sync if we are throttled. + $sync_next_time = Sender::get_instance()->get_next_sync_time( $queue->id ); + if ( $sync_next_time > microtime( true ) ) { + return new WP_Error( 'sync_throttled_' . $queue->id ); + } + + $url = rest_url( 'jetpack/v4/sync/spawn-sync' ); + $url = add_query_arg( 'time', time(), $url ); // Enforce Cache busting. + $args = array( + 'cookies' => $_COOKIE, + 'blocking' => false, + 'timeout' => 0.01, + /** This filter is documented in wp-includes/class-wp-http-streams.php */ + 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), + ); + + $result = wp_remote_get( $url, $args ); + if ( is_wp_error( $result ) ) { + return $result; + } + + return true; + } + + /** + * Test Sync spawning functionality by making a request to the + * Sync spawning endpoint and storing the result (status code) in a transient. + * + * @since $$next_version$$ + * + * @return bool True if we got a successful response, false otherwise. + */ + public static function can_spawn_dedicated_sync_request() { + $dedicated_sync_check_transient = self::DEDICATED_SYNC_CHECK_TRANSIENT; + + $dedicated_sync_response_body = get_transient( $dedicated_sync_check_transient ); + + if ( false === $dedicated_sync_response_body ) { + $url = rest_url( 'jetpack/v4/sync/spawn-sync' ); + $url = add_query_arg( 'time', time(), $url ); // Enforce Cache busting. + $args = array( + 'cookies' => $_COOKIE, + 'timeout' => 30, + /** This filter is documented in wp-includes/class-wp-http-streams.php */ + 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), + ); + + $response = wp_remote_get( $url, $args ); + $dedicated_sync_response_code = wp_remote_retrieve_response_code( $response ); + $dedicated_sync_response_body = trim( wp_remote_retrieve_body( $response ) ); + + /** + * Limit the size of the body that we save in the transient to avoid cases where an error + * occurs and a whole generated HTML page is returned. We don't need to store the whole thing. + * + * The regexp check is done to make sure we can detect the string even if the body returns some additional + * output, like some caching plugins do when they try to pad the request. + */ + $regexp = '!' . preg_quote( self::DEDICATED_SYNC_VALIDATION_STRING, '!' ) . '!uis'; + if ( preg_match( $regexp, $dedicated_sync_response_body ) ) { + $saved_response_body = self::DEDICATED_SYNC_VALIDATION_STRING; + } else { + $saved_response_body = time(); + } + + set_transient( $dedicated_sync_check_transient, $saved_response_body, HOUR_IN_SECONDS ); + + // Send a bit more information to WordPress.com to help debugging issues. + if ( $saved_response_body !== self::DEDICATED_SYNC_VALIDATION_STRING ) { + $data = array( + 'timestamp' => microtime( true ), + 'response_code' => $dedicated_sync_response_code, + 'response_body' => $dedicated_sync_response_body, + + // Send the flow type that was attempted. + 'sync_flow_type' => 'dedicated', + ); + + $sender = Sender::get_instance(); + + $sender->send_action( 'jetpack_sync_flow_error_enable', $data ); + } + } + + return self::DEDICATED_SYNC_VALIDATION_STRING === $dedicated_sync_response_body; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php new file mode 100644 index 00000000..81946fe8 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php @@ -0,0 +1,80 @@ +<?php +/** + * The Default Filter Settings class. + * + * This class provides the default whitelist values for the Sync data filters. + * See the DATA_FILTER_DEFAULTS constant for the list of filters. + * + * @package automattic/jetpack-sync + */ + +namespace Automattic\Jetpack\Sync; + +/** + * The Default_Filter_Settings class + */ +class Default_Filter_Settings { + + /** + * The class that contains the default values of the filters. + */ + const DEFAULT_FILTER_CLASS = 'Automattic\Jetpack\Sync\Defaults'; + + /** + * A map of each Sync filter name to the associated property name in the Defaults class. + */ + const DATA_FILTER_DEFAULTS = array( + 'jetpack_sync_options_whitelist' => 'default_options_whitelist', + 'jetpack_sync_options_contentless' => 'default_options_contentless', + 'jetpack_sync_constants_whitelist' => 'default_constants_whitelist', + 'jetpack_sync_callable_whitelist' => 'default_callable_whitelist', + 'jetpack_sync_multisite_callable_whitelist' => 'default_multisite_callable_whitelist', + 'jetpack_sync_post_meta_whitelist' => 'post_meta_whitelist', + 'jetpack_sync_comment_meta_whitelist' => 'comment_meta_whitelist', + 'jetpack_sync_capabilities_whitelist' => 'default_capabilities_whitelist', + 'jetpack_sync_known_importers' => 'default_known_importers', + ); + + /** + * The data associated with these filters are stored as associative arrays. + * (All other filters store data as indexed arrays.) + */ + const ASSOCIATIVE_FILTERS = array( + 'jetpack_sync_callable_whitelist', + 'jetpack_sync_multisite_callable_whitelist', + 'jetpack_sync_known_importers', + ); + + /** + * Returns the default data settings list for the provided filter. + * + * @param string $filter The filter name. + * + * @return array|false The default list of data settings. Returns false if the provided + * filter doesn't not have an array of default settings. + */ + public function get_default_settings( $filter ) { + if ( ! is_string( $filter ) || ! array_key_exists( $filter, self::DATA_FILTER_DEFAULTS ) ) { + return false; + } + + $property = self::DATA_FILTER_DEFAULTS[ $filter ]; + $class = self::DEFAULT_FILTER_CLASS; + return $class::$$property; + } + + /** + * Returns an array containing the default values for all of the filters shown + * in DATA_FILTER_DEFAULTS. + * + * @return array The array containing all sync data filters and their default values. + */ + public function get_all_filters_default_settings() { + $defaults = array(); + + foreach ( self::DATA_FILTER_DEFAULTS as $filter => $default_location ) { + $defaults[ $filter ] = $this->get_default_settings( $filter ); + } + return $defaults; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php index c8c43501..4386c88f 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php @@ -95,6 +95,7 @@ class Defaults { 'jetpack_sync_settings_post_meta_whitelist', 'jetpack_sync_settings_post_types_blacklist', 'jetpack_sync_settings_taxonomies_blacklist', + 'jetpack_sync_settings_dedicated_sync_enabled', // is Dedicated Sync flow enabled. 'jetpack_testimonial', 'jetpack_testimonial_posts_per_page', 'jetpack_wga', @@ -171,6 +172,7 @@ class Defaults { 'wpcom_is_fse_activated', 'wpcom_publish_comments_with_markdown', 'wpcom_publish_posts_with_markdown', + 'videopress_private_enabled_for_site', ); /** @@ -282,6 +284,7 @@ class Defaults { */ public static $default_callable_whitelist = array( 'get_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins' ), + 'get_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_themes' ), 'get_plugins_action_links' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins_action_links' ), 'has_file_system_write_access' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'file_system_write_access' ), 'home_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'home_url' ), @@ -309,6 +312,7 @@ class Defaults { 'wp_get_environment_type' => 'wp_get_environment_type', 'wp_max_upload_size' => 'wp_max_upload_size', 'wp_version' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'wp_version' ), + 'active_modules' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_active_modules' ), ); /** @@ -375,6 +379,7 @@ class Defaults { * @var array Blacklisted post types. */ public static $blacklisted_post_types = array( + '_term_meta', 'ai1ec_event', 'ai_log', // Logger - https://github.com/alleyinteractive/logger. 'amp_validated_url', // AMP Validation Errors. @@ -728,6 +733,7 @@ class Defaults { 'switch_like_status', 'videopress_guid', 'vimeo_poster_image', + '_jetpack_blogging_prompt_key', ); /** @@ -1269,4 +1275,11 @@ class Defaults { ), ); + /** + * Default for enabling dedicated Sync flow. + * + * @var int Bool-ish. Default 0. + */ + public static $default_dedicated_sync_enabled = 0; + } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php index 02de16cd..b007c695 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php @@ -9,6 +9,7 @@ namespace Automattic\Jetpack\Sync; use Automattic\Jetpack\Connection\Urls; use Automattic\Jetpack\Constants; +use Automattic\Jetpack\Modules as Jetpack_Modules; /** * Utility functions to generate data synced to wpcom @@ -72,7 +73,7 @@ class Functions { $cloned_taxonomy = json_decode( wp_json_encode( $taxonomy ) ); // recursive taxonomies are no fun. - if ( is_null( $cloned_taxonomy ) ) { + if ( $cloned_taxonomy === null ) { return null; } // Remove any meta_box_cb if they are not the default wp ones. @@ -82,7 +83,7 @@ class Functions { } // Remove update call back. if ( isset( $cloned_taxonomy->update_count_callback ) && - ! is_null( $cloned_taxonomy->update_count_callback ) ) { + $cloned_taxonomy->update_count_callback !== null ) { $cloned_taxonomy->update_count_callback = null; } // Remove rest_controller_class if it something other then the default. @@ -466,7 +467,7 @@ class Functions { } $plugins_action_links = get_option( 'jetpack_plugin_api_action_links', array() ); if ( ! empty( $plugins_action_links ) ) { - if ( is_null( $plugin_file_singular ) ) { + if ( $plugin_file_singular === null ) { return $plugins_action_links; } return ( isset( $plugins_action_links[ $plugin_file_singular ] ) ? $plugins_action_links[ $plugin_file_singular ] : null ); @@ -628,4 +629,47 @@ class Functions { return $any; } + + /** + * Return the list of installed themes + * + * @since 1.31.0 + * + * @return array + */ + public static function get_themes() { + $current_stylesheet = get_stylesheet(); + $installed_themes = wp_get_themes(); + $synced_headers = array( 'Name', 'ThemeURI', 'Author', 'Version', 'Template', 'Status', 'TextDomain', 'RequiresWP', 'RequiresPHP' ); + $themes = array(); + foreach ( $installed_themes as $stylesheet => $theme ) { + $themes[ $stylesheet ] = array(); + foreach ( $synced_headers as $header ) { + $themes[ $stylesheet ][ $header ] = $theme->get( $header ); + } + $themes[ $stylesheet ]['active'] = $stylesheet === $current_stylesheet; + if ( method_exists( $theme, 'is_block_theme' ) ) { + $themes[ $stylesheet ]['is_block_theme'] = $theme->is_block_theme(); + } + } + /** + * Filters the output of Sync's get_theme callable + * + * @since 1.31.0 + * + * @param array $themes The list of installed themes formatted in an array with a collection of information extracted from the Theme's headers + */ + return apply_filters( 'jetpack_sync_get_themes_callable', $themes ); + } + + /** + * Return the list of active Jetpack modules. + * + * @since $$next_version$$ + * + * @return array + */ + public static function get_active_modules() { + return ( new Jetpack_Modules() )->get_active(); + } } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php index ce2862a4..37040d00 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php @@ -240,7 +240,7 @@ class Listener { */ $args = apply_filters( "jetpack_sync_before_enqueue_$action_name", $args ); $action_data = array( $args ); - if ( ! is_null( $previous_end ) ) { + if ( $previous_end !== null ) { $action_data[] = $previous_end; } // allow listeners to abort. @@ -426,7 +426,7 @@ class Listener { ); if ( $this->should_send_user_data_with_actor( $current_filter ) ) { - $ip = isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : ''; + $ip = isset( $_SERVER['REMOTE_ADDR'] ) ? filter_var( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : ''; if ( defined( 'JETPACK__PLUGIN_DIR' ) ) { if ( ! function_exists( 'jetpack_protect_get_ip' ) ) { require_once JETPACK__PLUGIN_DIR . 'modules/protect/shared-functions.php'; @@ -435,7 +435,7 @@ class Listener { } $actor['ip'] = $ip; - $actor['user_agent'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : 'unknown'; + $actor['user_agent'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? filter_var( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : 'unknown'; } return $actor; @@ -480,7 +480,8 @@ class Listener { */ public function get_request_url() { if ( isset( $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI'] ) ) { - return 'http' . ( isset( $_SERVER['HTTPS'] ) ? 's' : '' ) . '://' . "{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- False positive, sniff misses the call to esc_url_raw. + return esc_url_raw( 'http' . ( isset( $_SERVER['HTTPS'] ) ? 's' : '' ) . '://' . wp_unslash( "{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}" ) ); } return is_admin() ? get_admin_url( get_current_blog_id() ) : home_url(); } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-main.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-main.php index b7e590a9..b3998c90 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-main.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-main.php @@ -46,6 +46,16 @@ class Main { } /** + * Sets the Sync data settings. + * + * @param array $data_settings An array containing the Sync data options. An empty array indicates that the default + * values will be used for all Sync data. + */ + public static function set_sync_data_options( $data_settings = array() ) { + ( new Data_Settings() )->add_settings_list( $data_settings ); + } + + /** * Initialize the main sync actions. * * @action plugins_loaded @@ -58,6 +68,7 @@ class Main { * For now additional modules are enabled based on whether the third party plugin * class exists or not. */ + Sync_Actions::initialize_search(); Sync_Actions::initialize_woocommerce(); Sync_Actions::initialize_wp_super_cache(); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php index 69a9faf3..55383a00 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php @@ -12,7 +12,7 @@ namespace Automattic\Jetpack\Sync; */ class Package_Version { - const PACKAGE_VERSION = '1.28.0'; + const PACKAGE_VERSION = '1.35.0'; const PACKAGE_SLUG = 'sync'; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php index fe80cf90..bf8cf812 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php @@ -411,7 +411,7 @@ class Queue { if ( is_wp_error( $is_valid ) ) { // Always delete ids_to_remove even when buffer is no longer checked-out. // They were processed by WP.com so safe to remove from queue. - if ( ! is_null( $ids_to_remove ) ) { + if ( $ids_to_remove !== null ) { $this->delete( $ids_to_remove ); } return $is_valid; @@ -420,7 +420,7 @@ class Queue { $this->delete_checkout_id(); // By default clear all items in the buffer. - if ( is_null( $ids_to_remove ) ) { + if ( $ids_to_remove === null ) { $ids_to_remove = $buffer->get_item_ids(); } @@ -478,6 +478,15 @@ class Queue { } /** + * Checks if the queue is locked. + * + * @return bool + */ + public function is_locked() { + return (bool) $this->get_checkout_id(); + } + + /** * Locks checkouts from the queue * tries to wait up to $timeout seconds for the queue to be empty. * @@ -735,7 +744,7 @@ class Queue { } // TODO: change to strict comparison. - if ( $checkout_id != $buffer->id ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison + if ( $checkout_id != $buffer->id ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseNotEqual return new WP_Error( 'buffer_mismatch', 'The buffer you checked in was not checked out' ); } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php index 6687fec5..ae947009 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php @@ -1319,7 +1319,7 @@ class Replicastore implements Replicastore_Interface { } // Validate / Determine Buckets. - if ( is_null( $buckets ) || $buckets < 1 ) { + if ( $buckets === null || $buckets < 1 ) { $buckets = $this->calculate_buckets( $table, $start_id, $end_id ); } if ( is_wp_error( $buckets ) ) { diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php index ae12ff32..6e4cb8c9 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php @@ -306,6 +306,17 @@ class REST_Endpoints { ) ); + // Trigger Dedicated Sync request. + register_rest_route( + 'jetpack/v4', + '/sync/spawn-sync', + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::spawn_sync', + 'permission_callback' => '__return_true', + ) + ); + } /** @@ -726,6 +737,38 @@ class REST_Endpoints { } /** + * This endpoint is used by Sync to spawn a + * dedicated Sync request which will trigger Sync to run. + * + * If Dedicated Sync is enabled, this callback should never run as + * processing of Sync actions will occur earlier and exit. + * + * @see Actions::init + * @see Sender::do_dedicated_sync_and_exit + * + * @since $$next_version$$ + * + * @return \WP_REST_Response + */ + public static function spawn_sync() { + nocache_headers(); + + if ( ! Settings::is_dedicated_sync_enabled() ) { + return new WP_Error( + 'dedicated_sync_disabled', + 'Dedicated Sync flow is disabled.', + array( 'status' => 422 ) + ); + } + + return new WP_Error( + 'dedicated_sync_failed', + 'Failed to process Dedicated Sync request', + array( 'status' => 500 ) + ); + } + + /** * Verify that request has default permissions to perform sync actions. * * @since 1.23.1 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php index 6699dd61..757ce490 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php @@ -321,7 +321,59 @@ class Sender { * @return boolean|WP_Error True if this sync sending was successful, error object otherwise. */ public function do_sync() { - return $this->do_sync_and_set_delays( $this->sync_queue ); + if ( ! Settings::is_dedicated_sync_enabled() ) { + $result = $this->do_sync_and_set_delays( $this->sync_queue ); + } else { + $result = Dedicated_Sender::spawn_sync( $this->sync_queue ); + } + + return $result; + } + + /** + * Trigger incremental sync and early exit on Dedicated Sync request. + * + * @access public + * + * @param bool $do_real_exit If we should exit at the end of the request. We should by default. + * In the context of running this in the REST API, we actually want to return an error. + * + * @return void|WP_Error + */ + public function do_dedicated_sync_and_exit( $do_real_exit = true ) { + nocache_headers(); + + if ( ! Settings::is_dedicated_sync_enabled() ) { + return new WP_Error( 'dedicated_sync_disabled', 'Dedicated Sync flow is disabled.' ); + } + + if ( ! Dedicated_Sender::is_dedicated_sync_request() ) { + return new WP_Error( 'non_dedicated_sync_request', 'Not a Dedicated Sync request.' ); + } + + /** + * Output an `OK` to show that Dedicated Sync is enabled and we can process events. + * This is used to test the feature is working. + * + * @see \Automattic\Jetpack\Sync\Dedicated_Sender::can_spawn_dedicated_sync_request + */ + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + echo Dedicated_Sender::DEDICATED_SYNC_VALIDATION_STRING; + + // Try to disconnect the request as quickly as possible and process things in the background. + $this->fastcgi_finish_request(); + + // Actually try to send Sync events. + $result = $this->do_sync_and_set_delays( $this->sync_queue ); + + // If no errors occurred, re-spawn a dedicated Sync request. + if ( true === $result ) { + Dedicated_Sender::spawn_sync( $this->sync_queue ); + } + + if ( $do_real_exit ) { + exit; + } } /** diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php index a923fbf3..31cee3b2 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php @@ -56,6 +56,7 @@ class Settings { 'full_sync_send_duration' => true, 'full_sync_limits' => true, 'checksum_disable' => true, + 'dedicated_sync_enabled' => true, ); /** @@ -198,10 +199,10 @@ class Settings { if ( self::is_network_setting( $setting ) ) { if ( is_multisite() && is_main_site() ) { - update_site_option( self::SETTINGS_OPTION_PREFIX . $setting, $value ); + $updated = update_site_option( self::SETTINGS_OPTION_PREFIX . $setting, $value ); } } else { - update_option( self::SETTINGS_OPTION_PREFIX . $setting, $value, true ); + $updated = update_option( self::SETTINGS_OPTION_PREFIX . $setting, $value, true ); } // If we set the disabled option to true, clear the queues. @@ -210,6 +211,13 @@ class Settings { $listener->get_sync_queue()->reset(); $listener->get_full_sync_queue()->reset(); } + + // Do not enable Dedicated Sync if we cannot spawn a Dedicated Sync request. + if ( 'dedicated_sync_enabled' === $setting && $updated && (bool) $value ) { + if ( ! Dedicated_Sender::can_spawn_dedicated_sync_request() ) { + update_option( self::SETTINGS_OPTION_PREFIX . $setting, 0, true ); + } + } } } @@ -443,7 +451,7 @@ class Settings { * @return boolean Whether WordPress is currently importing. */ public static function is_importing() { - if ( ! is_null( self::$is_importing ) ) { + if ( self::$is_importing !== null ) { return self::$is_importing; } @@ -484,7 +492,7 @@ class Settings { * @return boolean Whether WordPress is currently doing WP cron. */ public static function is_doing_cron() { - if ( ! is_null( self::$is_doing_cron ) ) { + if ( self::$is_doing_cron !== null ) { return self::$is_doing_cron; } @@ -565,4 +573,16 @@ class Settings { return ! (bool) self::get_setting( 'checksum_disable' ); } + /** + * Whether dedicated Sync flow is enabled. + * + * @access public + * @static + * + * @return boolean Whether dedicated Sync flow is enabled. + */ + public static function is_dedicated_sync_enabled() { + return (bool) self::get_setting( 'dedicated_sync_enabled' ); + } + } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-users.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-users.php index 8a8c83f8..316df9ce 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-users.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-users.php @@ -127,16 +127,16 @@ class Users { if ( $user_id === $master_user_id && 'administrator' !== $role ) { $query = new \WP_User_Query( array( - 'fields' => array( 'id' ), + 'fields' => array( 'ID' ), 'role' => 'administrator', - 'orderby' => 'id', + 'orderby' => 'ID', 'exclude' => array( $master_user_id ), ) ); $new_master = false; $connection = new Jetpack_Connection(); foreach ( $query->results as $result ) { - $found_user_id = absint( $result->id ); + $found_user_id = absint( $result->ID ); if ( $found_user_id && $connection->is_user_connected( $found_user_id ) ) { $new_master = $found_user_id; break; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php index 436554c9..4240744e 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php @@ -77,8 +77,9 @@ class Callables extends Module { */ const OPTION_NAMES_TO_CALLABLE_NAMES = array( // @TODO: Audit the other option names for differences between the option names and callable names. - 'home' => 'home_url', - 'siteurl' => 'site_url', + 'home' => 'home_url', + 'siteurl' => 'site_url', + 'jetpack_active_modules' => 'active_modules', ); /** @@ -484,7 +485,7 @@ class Callables extends Module { $checksum = $this->get_check_sum( $value ); // Explicitly not using Identical comparison as get_option returns a string. - if ( ! is_null( $value ) && $this->should_send_callable( $callable_checksums, $name, $checksum ) ) { + if ( $value !== null && $this->should_send_callable( $callable_checksums, $name, $checksum ) ) { // Only send callable if the non sorted checksum also does not match. if ( $this->should_send_callable( $callable_checksums, $name, $this->get_check_sum( $value, false ) ) ) { diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php index d71a0fe1..db0d9ff4 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php @@ -198,7 +198,7 @@ class Constants extends Module { foreach ( $constants as $name => $value ) { $checksum = $this->get_check_sum( $value ); // Explicitly not using Identical comparison as get_option returns a string. - if ( ! $this->still_valid_checksum( $constants_checksums, $name, $checksum ) && ! is_null( $value ) ) { + if ( ! $this->still_valid_checksum( $constants_checksums, $name, $checksum ) && $value !== null ) { /** * Tells the client to sync a constant to the server * diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php index 4017df16..bee3e889 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php @@ -246,7 +246,10 @@ class Full_Sync_Immediately extends Module { // Set default configuration, calculate totals, and save configuration if totals > 0. $status = array(); foreach ( $full_sync_config as $name => $config ) { - $module = Modules::get_module( $name ); + $module = Modules::get_module( $name ); + if ( ! $module ) { + continue; + } $status[ $name ] = array( 'total' => $module->total( $config ), 'sent' => 0, diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php index 0fe9245c..90121e88 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php @@ -133,7 +133,7 @@ class Full_Sync extends Module { $total_items = $module->estimate_full_sync_actions( $module_config ); // If there's information to process, configure this module. - if ( ! is_null( $total_items ) && $total_items > 0 ) { + if ( $total_items !== null && $total_items > 0 ) { $full_sync_config[ $module_name ] = $module_config; $enqueue_status[ $module_name ] = array( $total_items, // Total. @@ -266,7 +266,7 @@ class Full_Sync extends Module { $enqueue_status[ $module->name() ][2] = $next_enqueue_state; // If items were processed, subtract them from the limit. - if ( ! is_null( $items_enqueued ) && $items_enqueued > 0 ) { + if ( $items_enqueued !== null && $items_enqueued > 0 ) { $enqueue_status[ $module->name() ][1] += $items_enqueued; $remaining_items_to_enqueue -= $items_enqueued; } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php index b244834f..06c06ab0 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php @@ -205,7 +205,7 @@ class Plugins extends Module { $plugins = get_plugins(); // Get the most up to date info. if ( isset( $plugins[ $slug ] ) ) { return array_merge( array( 'slug' => $slug ), $plugins[ $slug ] ); - }; + } // Try grabbing the info from before the update. return isset( $this->plugins[ $slug ] ) ? array_merge( array( 'slug' => $slug ), $this->plugins[ $slug ] ) : array( 'slug' => $slug ); } @@ -263,8 +263,8 @@ class Plugins extends Module { return; } - // phpcs:ignore WordPress.Security.NonceVerification.Missing - $plugin = $_POST['plugin']; + // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated manually just after. + $plugin = wp_unslash( $_POST['plugin'] ); $plugins = get_plugins(); if ( ! isset( $plugins[ $plugin ] ) ) { return; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php index b9ea21d1..5623cc2b 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php @@ -589,7 +589,7 @@ class Posts extends Module { * @param boolean $update Whether this is an existing post being updated or not. */ public function wp_insert_post( $post_ID, $post = null, $update = null ) { - if ( ! is_numeric( $post_ID ) || is_null( $post ) ) { + if ( ! is_numeric( $post_ID ) || $post === null ) { return; } @@ -633,7 +633,7 @@ class Posts extends Module { * @param \WP_Post $post Post object. **/ public function wp_after_insert_post( $post_ID, $post ) { - if ( ! is_numeric( $post_ID ) || is_null( $post ) ) { + if ( ! is_numeric( $post_ID ) || $post === null ) { return; } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php new file mode 100644 index 00000000..e6472c54 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php @@ -0,0 +1,1846 @@ +<?php +/** + * Configuration lists for Jetpack Search Fields + * + * Post Meta: list of post meta keys that are available in the index + * and how they are configured. + * + * Custom Taxonomy: list of custom taxonomies that are indexed. + * + * The reason we need an allowed list is that Elasticsearch runs into scaling problems + * with more than 200k-ish total fields. The barrier to adding new fields is low, + * just open a PR. + * + * Although the comments indicate specific plugins, you don't need to be running + * that plugin for the indexing to work. The metakey just has to match. + * + * If you need a new meta key or taxonomy also consider using: + * jetpack-search-meta0 - jetpack-search-meta9 + * jetpack-search-tag0 - jetpack-search-tag9 + * + * @package automattic/jetpack-sync + */ + +namespace Automattic\Jetpack\Sync\Modules; + +/** + * Class to handle sync for Jetpack Search. + */ +class Search extends Module { + + /** + * Sync module name. + * + * @access public + * + * @return string + */ + public function name() { + return 'search'; + } + + /** + * Constructor. + */ + public function __construct() { + // Post meta whitelists. + add_filter( 'jetpack_sync_post_meta_whitelist', array( $this, 'add_search_post_meta_whitelist' ), 10 ); + // Add options + add_filter( 'jetpack_sync_options_whitelist', array( $this, 'add_search_options_whitelist' ), 10 ); + } + + /** + * Post meta search specification. + * + * We sync and index all meta keys in this list. Additionally there are a few + * options. + * + * 'metakey' => [ 'searchable_in_all_content' => true ], + * Field will be included in the all_content fields + * + * 'metakey' => [ 'available' => false, 'alternatives' => [ 'metakey_processed' ] ], + * Field not in meta.* but has data in an alternative field(s) name that + * should work similarly. For instance, woocommerce total_sales does not go into + * the index, but the percentage of sales does. + * + * @static + * @access private + * @var array + */ + private static $postmeta_to_sync = array( + // jetpack. + 'jetpack-search-meta0' => array( 'searchable_in_all_content' => true ), + 'jetpack-search-meta1' => array( 'searchable_in_all_content' => true ), + 'jetpack-search-meta2' => array( 'searchable_in_all_content' => true ), + 'jetpack-search-meta3' => array( 'searchable_in_all_content' => true ), + 'jetpack-search-meta4' => array( 'searchable_in_all_content' => true ), + 'jetpack-search-meta5' => array( 'searchable_in_all_content' => true ), + 'jetpack-search-meta6' => array( 'searchable_in_all_content' => true ), + 'jetpack-search-meta7' => array( 'searchable_in_all_content' => true ), + 'jetpack-search-meta8' => array( 'searchable_in_all_content' => true ), + 'jetpack-search-meta9' => array( 'searchable_in_all_content' => true ), + + // woocommerce. + 'entity_types' => array(), + 'exclude_product_categories' => array(), + 'exclude_product_ids' => array(), + 'free_shipping' => array(), + 'id_field' => array(), + 'individual_use' => array(), + 'limit_usage_to_x_items' => array(), + 'maximum_amount' => array(), + 'minimum_amount' => array(), + 'post_id' => array(), + 'product_categories' => array( 'searchable_in_all_content' => true ), + 'product_ids' => array(), + 'total_sales' => array( + 'available' => false, + 'alternatives' => array( + 'wc.percent_of_sales', + ), + ), + 'usage_limit' => array(), + 'usage_limit_per_user' => array(), + '_crosssell_ids' => array(), + '_downloadable' => array(), + '_featured' => array(), + '_height' => array(), + '_length' => array(), + '_price' => array( + 'alternatives' => array( + 'wc.price', + 'wc.min_price', + 'wc.max_price', + ), + ), + '_prices_include_tax' => array(), + '_product_attributes' => array(), + '_product_version' => array(), + '_regular_price' => array( + 'alternatives' => array( + 'wc.regular_price', + ), + ), + '_sale_price' => array( + 'alternatives' => array( + 'wc.sale_price', + ), + ), + '_sale_price_dates_from' => array(), + '_sale_price_dates_to' => array(), + '_sku' => array( 'searchable_in_all_content' => true ), + '_stock_status' => array(), + '_wc_average_rating' => array( + 'alternatives' => array( + 'wc.ave_rating_score', + ), + ), + '_wc_rating_count' => array( + 'alternatives' => array( + 'wc.rating', // wc.rating.count_1, wc.rating.count_2, ... + ), + ), + '_wc_review_count' => array(), + '_weight' => array(), + '_width' => array(), + + // co-authors plus. + 'cap-description' => array( 'searchable_in_all_content' => true ), + 'cap-user_login' => array( 'searchable_in_all_content' => true ), + 'cap-user_email' => array(), + 'cap-last_name' => array( 'searchable_in_all_content' => true ), + 'cap-first_name' => array( 'searchable_in_all_content' => true ), + 'cap-display_name' => array( 'searchable_in_all_content' => true ), + 'cap-website' => array(), + 'cap-jabber' => array(), + 'cap-aim' => array(), + 'cap-twitter' => array(), + 'cap-facebook' => array(), + 'cap-google_plus' => array(), + 'cap-job_title' => array( 'searchable_in_all_content' => true ), + + // bbpress. + 'bbpl_like' => array(), + 'bbpress_discussion_comments_copied' => array(), + 'bbpress_discussion_tags_copied' => array(), + 'bbpress_discussion_topic_id' => array(), + 'bbpress_discussion_use_defaults' => array(), + 'bbpress_page_header_bg' => array(), + 'bbpress_title_bg' => array(), + 'use_bbpress_discussion_topic' => array(), + + // wpml. + 'tm_meta_wpml' => array(), + 'wpml_language' => array(), + 'wpml_media_lang' => array(), + 'wpml_media_processed' => array(), + + // blogger import. + 'blogger_author' => array( 'searchable_in_all_content' => true ), + 'blogger_blog' => array( 'searchable_in_all_content' => true ), + 'blogger_permalink' => array( 'searchable_in_all_content' => true ), + + // geo. + 'geo_address' => array( 'searchable_in_all_content' => true ), + 'geo_latitude' => array(), + 'geo_longitude' => array(), + 'geo_public' => array(), + 'geolocated' => array(), + 'geolocation_city' => array( 'searchable_in_all_content' => true ), + 'geolocation_country_long' => array( 'searchable_in_all_content' => true ), + 'geolocation_country_short' => array( 'searchable_in_all_content' => true ), + 'geolocation_formatted_address' => array( 'searchable_in_all_content' => true ), + 'geolocation_lat' => array(), + 'geolocation_long' => array(), + 'geolocation_postcode' => array( 'searchable_in_all_content' => true ), + 'geolocation_state_long' => array( 'searchable_in_all_content' => true ), + 'geolocation_state_short' => array( 'searchable_in_all_content' => true ), + + // wp-ultimate-recipe. + 'recipe_alternate_image' => array(), + 'recipe_cook_time' => array(), + 'recipe_cook_time_text' => array(), + 'recipe_description' => array( 'searchable_in_all_content' => true ), + 'recipe_ingredients' => array( 'searchable_in_all_content' => true ), + 'recipe_instructions' => array( 'searchable_in_all_content' => true ), + 'recipe_notes' => array( 'searchable_in_all_content' => true ), + 'recipe_nutritional' => array( 'searchable_in_all_content' => true ), + 'recipe_passive_time' => array(), + 'recipe_passive_time_text' => array(), + 'recipe_prep_time' => array(), + 'recipe_prep_time_text' => array(), + 'recipe_rating' => array(), + 'recipe_servings' => array(), + 'recipe_servings_normalized' => array(), + 'recipe_servings_type' => array(), + 'recipe_terms' => array( 'searchable_in_all_content' => true ), + 'recipe_terms_with_parents' => array(), + 'recipe_title' => array( 'searchable_in_all_content' => true ), + 'recipe_user_ratings' => array(), + 'recipe_user_ratings_rating' => array(), + + // generic fields. + // from advanced-custom-fields and metabox.io . + 'Link' => array(), + 'Location' => array(), + 'Title' => array( 'searchable_in_all_content' => true ), + 'ad_code' => array(), + 'address' => array(), + 'admin_mail' => array(), + 'admin_only' => array(), + 'advertisers' => array( 'searchable_in_all_content' => true ), + 'age' => array(), + 'aliases' => array(), + 'alternate_title' => array(), + 'amazon' => array(), + 'answer' => array( 'searchable_in_all_content' => true ), + 'area' => array(), + 'attention' => array(), + 'attr' => array(), + 'author' => array( 'searchable_in_all_content' => true ), + 'author_name' => array( 'searchable_in_all_content' => true ), + 'blog' => array(), + 'blog_id' => array(), + 'call_to_action' => array(), + 'campaign_preview' => array(), + 'canonical_url' => array(), + 'catch_text' => array(), + 'category' => array( 'searchable_in_all_content' => true ), + 'classificacao' => array(), + 'classification' => array(), + 'code' => array(), + 'codigo' => array(), + 'company' => array( 'searchable_in_all_content' => true ), + 'company_website' => array(), + 'config' => array(), + 'construction' => array(), + 'container_ids' => array(), + 'content' => array( 'searchable_in_all_content' => true ), + 'content_body-full_content' => array( 'searchable_in_all_content' => true ), + 'copyright' => array(), + 'custom_page_title' => array( 'searchable_in_all_content' => true ), + 'custom_permalink' => array(), + 'customize' => array(), + 'data' => array(), + 'date' => array(), + 'day' => array(), + 'descripcion' => array( 'searchable_in_all_content' => true ), + 'description' => array( 'searchable_in_all_content' => true ), + 'display_settings' => array(), + 'display_type' => array(), + 'duration' => array(), + 'embed' => array(), + 'entity_ids' => array(), + 'entity_types' => array(), + 'event_subtitle' => array( 'searchable_in_all_content' => true ), + 'excluded_container_ids' => array(), + 'exclusions' => array(), + 'experience' => array(), + 'external_url' => array(), + 'featured' => array(), + 'featured_image' => array(), + 'featured_post' => array(), + 'featured_story' => array(), + 'fee' => array(), + 'filter' => array(), + 'follow' => array(), + 'footer_text' => array(), + 'from_header' => array(), + 'fullscreen_view' => array(), + 'gallery' => array(), + 'genre' => array( 'searchable_in_all_content' => true ), + 'guests' => array( 'searchable_in_all_content' => true ), + 'has_variations' => array(), + 'hashtag' => array(), + 'header_image' => array(), + 'hidden_from_ui' => array(), + 'hide_on_screen' => array(), + 'homepage_order' => array(), + 'hours' => array(), + 'i18n' => array(), + 'id' => array(), + 'image' => array(), + 'image_size' => array(), + 'image_source' => array(), + 'index' => array(), + 'intro_text' => array( 'searchable_in_all_content' => true ), + 'job_mention' => array( 'searchable_in_all_content' => true ), + 'keywords' => array( 'searchable_in_all_content' => true ), + 'latest_news' => array(), + 'layout' => array(), + 'link' => array(), + 'link_dump' => array( 'searchable_in_all_content' => true ), + 'link_url' => array(), + 'location' => array(), + 'logo' => array(), + 'main_title' => array( 'searchable_in_all_content' => true ), + 'maximum_entity_count' => array(), + 'media' => array(), + 'mentions' => array(), + 'messages' => array(), + 'meta_description' => array( 'searchable_in_all_content' => true ), + 'meta_id' => array(), + 'meta_index' => array(), + 'meta_key' => array(), + 'meta_value' => array(), + 'modal-dialog-id' => array(), + 'name' => array( 'searchable_in_all_content' => true ), + 'nombre' => array( 'searchable_in_all_content' => true ), + 'notes' => array( 'searchable_in_all_content' => true ), + 'options' => array(), + 'order_by' => array(), + 'order_direction' => array(), + 'original_cats' => array(), + 'original_headers' => array(), + 'original_link' => array(), + 'original_message' => array(), + 'original_subject' => array(), + 'original_title' => array(), + 'original_to' => array(), + 'other_setting' => array(), + 'page_canonical' => array(), + 'page_layout' => array(), + 'page_sidebar' => array(), + 'page_tags' => array(), + 'panels_data' => array(), + 'parking' => array(), + 'pdf_upload' => array(), + 'photo' => array(), + 'play_time' => array(), + 'position' => array(), + 'post-rating' => array(), + 'post_background' => array(), + 'post_color' => array(), + 'post_sidebar' => array(), + 'post_subtitle' => array( 'searchable_in_all_content' => true ), + 'price' => array(), + 'publication' => array(), + 'rating' => array(), + 'ratings_average' => array(), + 'ratings_score' => array(), + 'ratings_users' => array(), + 'relation' => array(), + 'reply_to_header' => array(), + 'required' => array(), + 'returns' => array(), + 'review_post' => array(), + 'rule' => array(), + 'section' => array( 'searchable_in_all_content' => true ), + 'session_transcript' => array(), + 'settings' => array(), + 'sex' => array(), + 'shares_count' => array(), + 'show_description' => array( 'searchable_in_all_content' => true ), + 'show_page_title' => array(), + 'side' => array(), + 'sidebar' => array(), + 'site' => array(), + 'situation' => array(), + 'slide_template' => array(), + 'slug' => array(), + 'sortorder' => array(), + 'source' => array(), + 'start_date' => array(), + 'status' => array(), + 'styles' => array(), + 'subtitle' => array( 'searchable_in_all_content' => true ), + 'subtitulo' => array(), + 'success' => array(), + 'summary' => array( 'searchable_in_all_content' => true ), + 'synopsis' => array( 'searchable_in_all_content' => true ), + 'tel' => array(), + 'tema' => array(), + 'testimonial' => array(), + 'testimonial_author' => array(), + 'text_already_subscribed' => array(), + 'text_error' => array(), + 'text_invalid_email' => array(), + 'text_not_subscribed' => array(), + 'text_required_field_missing' => array(), + 'text_subscribed' => array(), + 'text_unsubscribed' => array(), + 'thumbnail' => array(), + 'time' => array(), + 'time_jump_list' => array( 'searchable_in_all_content' => true ), + 'title' => array( 'searchable_in_all_content' => true ), + 'title_view' => array(), + 'titre' => array( 'searchable_in_all_content' => true ), + 'titulo' => array( 'searchable_in_all_content' => true ), + 'to_header' => array(), + 'toc' => array(), + 'transcript' => array( 'searchable_in_all_content' => true ), + 'transport_uri' => array(), + 'type' => array(), + 'url' => array(), + 'validation' => array(), + 'value' => array(), + 'values' => array(), + 'variation' => array(), + 'video' => array(), + 'video_type' => array(), + 'video_url' => array(), + 'videopress_guid' => array(), + 'website' => array(), + 'weight' => array(), + 'year' => array(), + + ); // end indexed post meta. + + /** + * Postmeta being considered for indexing + * but currently not in the index + * this list is really only for documentation. + * + * @static + * @access private + * @var array + */ + private static $unindexed_postmeta = array( + + // Core. + '_wp_attached_file' => array(), + '_wp_attachment_context' => array(), + '_wp_attachment_image_alt' => array(), + '_wp_attachment_is_custom_header' => array(), + '_wp_attachment_metadata' => array(), + '_wp_desired_post_slug' => array(), + '_wp_old_date' => array(), + '_wp_old_slug' => array(), + '_wp_page_template' => array(), + + // WooCommerce products. + // See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-product-data-store-cpt.php#L21 . + '_backorders' => array(), + '_default_attributes' => array(), + '_download_expiry' => array(), + '_download_limit' => array(), + '_download_permissions_granted' => array(), + '_downloadable_files' => array(), + '_file_paths' => array(), + '_manage_stock' => array(), + '_product_image_gallery' => array(), + '_purchase_note' => array(), + '_recorded_coupon_usage_counts' => array(), + '_recorded_sales' => array(), + '_sold_individually' => array(), + '_stock' => array(), + '_tax_class' => array(), + '_tax_status' => array(), + '_thumbnail_id' => array(), + '_upsell_ids' => array(), + '_variation_description' => array(), + '_virtual' => array(), + '_visibility' => array(), + 'coupon_amount' => array(), + 'default_source' => array(), + 'discount_type' => array(), + 'exclude_sale_items' => array(), + 'expiry_date' => array(), + + // Woocommerce orders and refunds. + // See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-order-data-store-cpt.php#L27 . + // See https://github.com/woocommerce/woocommerce/blob/b8a2815ae546c836467008739e7ff5150cb08e93/includes/data-stores/class-wc-order-refund-data-store-cpt.php#L20 . + '_billing_address_1' => array(), + '_billing_address_2' => array(), + '_billing_address_index' => array(), + '_billing_city' => array(), + '_billing_company' => array(), + '_billing_country' => array(), + '_billing_email' => array(), + '_billing_first_name' => array(), + '_billing_last_name' => array(), + '_billing_phone' => array(), + '_billing_postcode' => array(), + '_billing_state' => array(), + '_cart_discount' => array(), + '_cart_discount_tax' => array(), + '_completed_date' => array(), + '_created_via' => array(), + '_customer_ip_address' => array(), + '_customer_user_agent' => array(), + '_date_completed' => array(), + '_date_paid' => array(), + '_order_currency' => array(), + '_order_key' => array(), + '_order_shipping' => array(), + '_order_shipping_tax' => array(), + '_order_stock_reduced' => array(), + '_order_tax' => array(), + '_order_total' => array(), + '_order_version' => array(), + '_paid_date' => array(), + '_payment_method' => array(), + '_payment_method_title' => array(), + '_payment_tokens' => array(), + '_recorded_coupon_usage_counts' => array(), + '_refund_amount' => array(), + '_refund_reason' => array(), + '_refunded_by' => array(), + '_shipping_address_1' => array(), + '_shipping_address_2' => array(), + '_shipping_address_index' => array(), + '_shipping_city' => array(), + '_shipping_company' => array(), + '_shipping_country' => array(), + '_shipping_first_name' => array(), + '_shipping_last_name' => array(), + '_shipping_postcode' => array(), + '_shipping_state' => array(), + '_transaction_id' => array(), + + // aioseop. + '_aioseop_description' => array(), + '_aioseop_keywords' => array(), + '_aioseop_title' => array(), + + // yoast. + '_yoast_wpseo_authorship' => array(), + '_yoast_wpseo_bctitle' => array(), + '_yoast_wpseo_canonical' => array(), + '_yoast_wpseo_content_score' => array(), + '_yoast_wpseo_focuskw' => array(), + '_yoast_wpseo_focuskw_text_input' => array(), + '_yoast_wpseo_google-plus-description' => array(), + '_yoast_wpseo_google-plus-image' => array(), + '_yoast_wpseo_linkdex' => array(), + '_yoast_wpseo_meta-robots-adv' => array(), + '_yoast_wpseo_meta-robots-nofollow' => array(), + '_yoast_wpseo_meta-robots-noindex' => array(), + '_yoast_wpseo_metadesc' => array(), + '_yoast_wpseo_metakeywords' => array(), + '_yoast_wpseo_opengraph-description' => array(), + '_yoast_wpseo_opengraph-image' => array(), + '_yoast_wpseo_opengraph-title' => array(), + '_yoast_wpseo_primary_byline' => array(), + '_yoast_wpseo_primary_category' => array(), + '_yoast_wpseo_primary_product_cat' => array(), + '_yoast_wpseo_primary_sponsor-type' => array(), + '_yoast_wpseo_primary_tema_category' => array(), + '_yoast_wpseo_primary_wpdmcategory' => array(), + '_yoast_wpseo_primary_wt_portfolio_category' => array(), + '_yoast_wpseo_redirect' => array(), + '_yoast_wpseo_sitemap-include' => array(), + '_yoast_wpseo_sitemap-prio' => array(), + '_yoast_wpseo_title' => array(), + '_yoast_wpseo_twitter-description' => array(), + '_yoast_wpseo_twitter-image' => array(), + + // bbpress. + 'bbppu_read_by' => array(), + '_bbp_activity_id' => array(), + '_bbp_attachment' => array(), + '_bbp_attachment_upload_error' => array(), + '_bbp_forum_id' => array(), + '_bbp_forum_parent_id' => array(), + '_bbp_forum_subforum_count' => array(), + '_bbp_forum_type' => array(), + '_bbp_group_ids' => array(), + '_bbp_last_active_id' => array(), + '_bbp_last_active_time' => array(), + '_bbp_last_reply_id' => array(), + '_bbp_last_topic_id' => array(), + '_bbp_old_forum_id' => array(), + '_bbp_old_sticky_status' => array(), + '_bbp_old_topic_id' => array(), + '_bbp_post_id' => array(), + '_bbp_reply_count' => array(), + '_bbp_reply_is_private' => array(), + '_bbp_reply_to' => array(), + '_bbp_revision_log' => array(), + '_bbp_status' => array(), + '_bbp_sticky_topics' => array(), + '_bbp_topic_count' => array(), + '_bbp_topic_id' => array(), + '_bbp_total_reply_count' => array(), + '_bbp_total_topic_count' => array(), + '_bbp_voice_count' => array(), + + // ??? + '_locale' => array(), + + // wp-job-manager. + '_job_title' => array(), + '_job_description' => array(), + + // wpml. + '_wpml_media_duplicate' => array(), + '_wpml_media_featured' => array(), + + // generic fields. + 'ad_clicks_count' => array(), + 'email' => array(), + 'usage_count' => array(), + 'user_mail' => array(), + 'views' => array(), + '_EventAllDay' => array(), + '_EventCost' => array(), + '_EventCurrencyPosition' => array(), + '_EventCurrencySymbol' => array(), + '_EventDuration' => array(), + '_EventEndDate' => array(), + '_EventEndDateUTC' => array(), + '_EventOrganizerID' => array(), + '_EventOrigin' => array(), + '_EventShowMap' => array(), + '_EventShowMapLink' => array(), + '_EventStartDate' => array(), + '_EventStartDateUTC' => array(), + '_EventTimezone' => array(), + '_EventTimezoneAbbr' => array(), + '_EventURL' => array(), + '_EventVenueID' => array(), + '_OrganizerEmail' => array(), + '_OrganizerOrganizer' => array(), + '_OrganizerOrigin' => array(), + '_OrganizerPhone' => array(), + '_OrganizerWebsite' => array(), + '_VenueAddress' => array(), + '_VenueCity' => array(), + '_VenueCountry' => array(), + '_VenueOrigin' => array(), + '_VenuePhone' => array(), + '_VenueProvince' => array(), + '_VenueShowMap' => array(), + '_VenueShowMapLink' => array(), + '_VenueState' => array(), + '_VenueStateProvince' => array(), + '_VenueURL' => array(), + '_VenueVenue' => array(), + '_VenueVenueID' => array(), + '_VenueZip' => array(), + '_default_attributes' => array(), + '_description' => array(), + '_edit_last' => array(), + '_feedback_all_fields' => array(), + '_feedback_author' => array(), + '_feedback_author_email' => array(), + '_feedback_author_url' => array(), + '_feedback_contact_form_url' => array(), + '_feedback_ip' => array(), + '_feedback_subject' => array(), + '_file_paths' => array(), + '_layout' => array(), + '_links_to' => array(), + '_links_to_target' => array(), + '_mail' => array(), + '_mail_2' => array(), + '_messages' => array(), + '_numero' => array(), + '_post_restored_from' => array(), + '_video_url' => array(), + '_website' => array(), + + ); // end unindexed post meta. + + /** + * List of indexed taxonomy slugs - VARCHAR(32) + * + * @access private + * @static + * + * @var array + */ + private static $taxonomies_to_sync = array( + + // Core. + 'link_category', + 'nav_menu', + 'post_format', // Special, limited to certain values. + + // bbpress. + 'topic', + 'topic-tag', + 'topics', + + // buddypress. + 'bp-email-type', + 'bp-email-type', + 'bp_docs_access', + 'bp_docs_associated_item', + 'bp_docs_comment_access', + 'bp_docs_doc_in_folder', + 'bp_docs_folder_in_group', + 'bp_docs_tag', + 'bp_member_type', + + // co-authors plus. + 'author', + + // events calendar plus. + // the events calendar. + 'event-categories', + 'event-category', + 'event-tag', + 'event-tags', + 'event-type', + 'event-venue', + 'event_category', + 'event_location', + 'event_organizer', + 'event_tag', + 'event_type', + 'event_type_2', + 'event_users', + 'events_categories', + 'events_category', + 'events_feeds', + 'events_tags', + 'tribe_events_cat', + + // jetpack. + 'jetpack-portfolio-tag', + 'jetpack-portfolio-type', + 'jetpack-search-tag0', + 'jetpack-search-tag1', + 'jetpack-search-tag2', + 'jetpack-search-tag3', + 'jetpack-search-tag4', + 'jetpack-search-tag5', + 'jetpack-search-tag6', + 'jetpack-search-tag7', + 'jetpack-search-tag8', + 'jetpack-search-tag9', + + // nextgen gallery. + 'ngg_tag', + + // polylang. + // wpml. + 'language', + 'post_translations', + 'term_language', + 'term_translations', + 'translation_priority', + + // woocommerce. + 'pa_accessory-type', + 'pa_actor', + 'pa_age', + 'pa_ambulance', + 'pa_amount', + 'pa_arm-roll', + 'pa_aspectratio', + 'pa_audiencerating', + 'pa_author', + 'pa_axle', + 'pa_battery', + 'pa_belakang', + 'pa_binding', + 'pa_body-type', + 'pa_bore-x-stroke-mm', + 'pa_box-cargo', + 'pa_brakes', + 'pa_brand', + 'pa_brands', + 'pa_bus', + 'pa_c', + 'pa_cabin-to-end', + 'pa_capacity', + 'pa_catalognumberlist', + 'pa_ce-keurmerk', + 'pa_chassis-front', + 'pa_chassis-rear', + 'pa_chassis-weight-kg', + 'pa_chip-log', + 'pa_clothing-size', + 'pa_clutch', + 'pa_clutch-type', + 'pa_collection', + 'pa_color', + 'pa_colors', + 'pa_colour', + 'pa_compactor', + 'pa_condition', + 'pa_cor', + 'pa_couleur', + 'pa_country', + 'pa_countryregion-of-manufacture', + 'pa_crane', + 'pa_creator', + 'pa_culoare', + 'pa_customerpackagetype', + 'pa_depan', + 'pa_depan-belakang', + 'pa_department', + 'pa_design', + 'pa_diameter', + 'pa_diameter-cakram', + 'pa_dimension-mm', + 'pa_dimensions', + 'pa_director', + 'pa_disc-diameter', + 'pa_drive-system', + 'pa_dump', + 'pa_ean', + 'pa_eanlist', + 'pa_edition', + 'pa_electric-battery', + 'pa_engine-model', + 'pa_engine-size', + 'pa_ethnicity', + 'pa_exhaust-brake', + 'pa_fabric', + 'pa_farbe', + 'pa_farg', + 'pa_farge', + 'pa_features', + 'pa_final-gear-ratio', + 'pa_finish', + 'pa_fire-fighting', + 'pa_fits', + 'pa_flat-bed', + 'pa_flavour', + 'pa_format', + 'pa_fragrance', + 'pa_frame', + 'pa_front', + 'pa_front-overhang', + 'pa_front-rear', + 'pa_front-tread', + 'pa_fuel-tank', + 'pa_fuel-type', + 'pa_garantie', + 'pa_geadviseerd-accu-type', + 'pa_gear-ratio', + 'pa_gender', + 'pa_genre', + 'pa_gewicht-exclusief-accu', + 'pa_gift-card-amount', + 'pa_grade-ability-tan-o', + 'pa_groesse', + 'pa_gtin', + 'pa_gvwr-gcwr', + 'pa_hardwareplatform', + 'pa_hazardousmaterialtype', + 'pa_height', + 'pa_hekmotor-of-boegmotor', + 'pa_helmet-size', + 'pa_hersteller', + 'pa_high-blow-tank', + 'pa_hoehe', + 'pa_inhoud', + 'pa_isadultproduct', + 'pa_isbn', + 'pa_iseligiblefortradein', + 'pa_itemdimensions', + 'pa_itempartnumber', + 'pa_kemudi-tipe', + 'pa_kleur', + 'pa_kopling-tipe', + 'pa_label', + 'pa_languages', + 'pa_lbs', + 'pa_legaldisclaimer', + 'pa_lengte-aansluitkabel', + 'pa_length', + 'pa_liquid-tank', + 'pa_location', + 'pa_losse-motor-complete-set', + 'pa_maat', + 'pa_main-brake', + 'pa_make', + 'pa_manufacturer', + 'pa_manufacturer-part-number', + 'pa_manufacturermaximumage', + 'pa_manufacturerminimumage', + 'pa_manufacturerpartswarrantydesc', + 'pa_masseinheit', + 'pa_material', + 'pa_mau-sac', + 'pa_maximum-power-ps-rpm', + 'pa_maximum-speed', + 'pa_maximum-torque-kgm-rpm', + 'pa_mediatype', + 'pa_megethos', + 'pa_merk', + 'pa_metal-type', + 'pa_min-turning-circle', + 'pa_mixer', + 'pa_model', + 'pa_model-tipe', + 'pa_model-type', + 'pa_modelo', + 'pa_mount', + 'pa_mpn', + 'pa_nicotine-strength', + 'pa_nos-of-cylinder', + 'pa_nos-of-tire', + 'pa_numberofdiscs', + 'pa_numberofitems', + 'pa_numberofpages', + 'pa_offset', + 'pa_open-cargo', + 'pa_operatingsystem', + 'pa_options', + 'pa_other-part-number', + 'pa_overall-height', + 'pa_overall-length', + 'pa_overall-width', + 'pa_overview', + 'pa_packagedimensions', + 'pa_packagequantity', + 'pa_pages', + 'pa_parking-brake', + 'pa_part-number', + 'pa_partnumber', + 'pa_pattern', + 'pa_pattern2', + 'pa_performa', + 'pa_pictureformat', + 'pa_pin-size', + 'pa_piston-displacement-cc', + 'pa_ploshhad', + 'pa_plug-type', + 'pa_power', + 'pa_product', + 'pa_productgroup', + 'pa_producttypename', + 'pa_publicationdate', + 'pa_publisher', + 'pa_quantity', + 'pa_rear', + 'pa_rear-overhang', + 'pa_rear-tread', + 'pa_refrigerated-box', + 'pa_region', + 'pa_regioncode', + 'pa_releasedate', + 'pa_rem-parkir', + 'pa_rem-pelambat', + 'pa_rem-utama', + 'pa_reverse', + 'pa_runningtime', + 'pa_scent', + 'pa_schachtlengte', + 'pa_seeds', + 'pa_series', + 'pa_setting', + 'pa_sex', + 'pa_shape', + 'pa_shirt-size', + 'pa_size', + 'pa_sizes', + 'pa_sku', + 'pa_sky-lift', + 'pa_sleeve-length', + 'pa_snelheidsregeling', + 'pa_staart', + 'pa_steering', + 'pa_steering-type', + 'pa_storlek', + 'pa_studio', + 'pa_stuwkracht-lbs', + 'pa_style', + 'pa_suspensions', + 'pa_taille', + 'pa_talla', + 'pa_tamanho', + 'pa_tamano', + 'pa_taxi', + 'pa_ticket-type', + 'pa_tire-size', + 'pa_total-chassis-weight', + 'pa_towing-truck', + 'pa_tradeinvalue', + 'pa_trailer-t-head', + 'pa_transmisi-tipe', + 'pa_transmission', + 'pa_transmission-type', + 'pa_types', + 'pa_ukuran', + 'pa_upc', + 'pa_upclist', + 'pa_variation', + 'pa_vehicle-carrier', + 'pa_vergelijkbaar-stuwkracht', + 'pa_vermogen', + 'pa_voltage', + 'pa_volume', + 'pa_warranty', + 'pa_weight', + 'pa_wheel-base', + 'pa_wheel-configuration', + 'pa_wheel-disc-size', + 'pa_width', + 'pa_zout-water-geschikt', + 'product', + 'product-category', + 'product_brand', + 'product_delivery_time', + 'product_delivery_times', + 'product_price_label', + 'product_sale_labels', + 'product_shipping_class', + 'product_tag', + 'product_type', + 'product_unit', + 'product_visibility', + 'products', + + // wp-job-manager. + 'job-category', + 'job-location', + 'job-type', + 'job_cat', + 'job_category', + 'job_listing_category', + 'job_listing_label', + 'job_listing_region', + 'job_listing_tag', + 'job_listing_type', + 'job_salary', + 'job_tag', + 'job_type', + 'jobman_category', + 'jobpost_category', + 'jobpost_job_type', + 'jobpost_location', + 'resume_category', + 'resume_groups', + 'resume_job_type', + 'resume_job_type', + 'resume_languages', + 'resume_region', + 'resume_skill', + 'resume_specialities', + + // generic. + '_resource', + 'acadp_categories', + 'acadp_locations', + 'action-group', + 'activity', + 'actor', + 'actors', + 'ad-group', + 'adace-ad-group', + 'adace-sponsor', + 'additional_features', + 'adv_location', + 'advanced_ads_groups', + 'advert_category', + 'affcoups_coupon_category', + 'affcoups_coupon_type', + 'ai_log_context', + 'ai_log_level', + 'al_product-cat', + 'aol_ad_category', + 'aol_ad_location', + 'aol_ad_type', + 'aol_application_status', + 'area', + 'article-slug', + 'asgarosforum-category', + 'asgarosforum-usergroup', + 'attachment_category', + 'attachment_tag', + 'atum_location', + 'avhec_catgroup', + 'bartype', + 'baths', + 'beds', + 'bepro_listing_types', + 'blog_category', + 'booked_custom_calendars', + 'brand', + 'brands', + 'business_category', + 'bwg_tag', + 'byline', + 'calendar_category', + 'calendar_feed', + 'calendar_type', + 'campaign_category', + 'campaign_tag', + 'carousel_cat', + 'carousels_category', + 'case27_job_listing_tags', + 'categories', + 'category_media', + 'category_portfolio', + 'celebrity_cat', + 'chapters', + 'chronosly_category', + 'city', + 'classified_listing_type', + 'client-types', + 'clients_groups', + 'cm-business-category', + 'cmdm_category', + 'cn_log_type', + 'coderevolution_post_source', + 'collection', + 'community', + 'companies', + 'company', + 'cont_category', + 'content_audit', + 'country', + 'course', + 'course-cat', + 'course-category', + 'course_cat', + 'course_category', + 'course_difficulty', + 'course_tag', + 'courses_type', + 'cp_campaign', + 'cp_recipe_category', + 'csco_post_featured', + 'ct_status', + 'ctl-stories', + 'cuisine', + 'dc_vendor_shop', + 'ddownload_category', + 'ddownload_tag', + 'dealstore', + 'department', + 'departments', + 'department-company', + 'developed-by', + 'dfads_group', + 'dgfw_gift_categories', + 'director', + 'district', + 'dlm_download_category', + 'dlm_download_tag', + 'doc_tag', + 'document-category', + 'download_artist', + 'download_category', + 'download_tag', + 'downloads_filter', + 'dps_book', + 'dt_gallery_category', + 'dt_logos_category', + 'dt_portfolio_category', + 'dt_team_category', + 'dt_testimonials_category', + 'dtcast', + 'dtcreator', + 'dtdirector', + 'dtnetworks', + 'dtstudio', + 'dtyear', + 'dvteamtaxonomy', + 'dwqa-question_category', + 'dwqa-question_tag', + 'eafl_category', + 'easy-testimonial-category', + 'ecwd_event_category', + 'edd_log_type', + 'edition', + 'ef_editorial_meta', + 'ef_usergroup', + 'element_category', + 'elementor_library_type', + 'employees_category', + 'encyclopedia-tag', + 'envira-tag', + 'epkb_post_type_1_category', + 'espresso_event_categories', + 'espresso_event_type', + 'essential_grid_category', + 'et_post_format', + 'faq-group', + 'faq-tags', + 'faq-topic', + 'faq_cat', + 'faq_categories', + 'faq_category', + 'faqs-category', + 'fdm-menu-section', + 'feature', + 'featured_item_category', + 'featured_item_tag', + 'feedback_type', + 'feeds', + 'fl-builder-template-type', + 'flamingo_inbound_channel', + 'follow_up_email_campaign', + 'follow_up_email_type', + 'following_users', + 'football-team-taxo', + 'fpd_design_category', + 'gallery-category', + 'gallery_cat', + 'gallery_categories', + 'gallery_category', + 'gallery_entries', + 'gallerycat', + 'gd_event_tags', + 'gd_eventcategory', + 'gd_place_tags', + 'gd_placecategory', + 'genre', + 'genres', + 'gg_connect_hub', + 'give_log_type', + 'gn-genre', + 'gn-location-1', + 'gn-location-2', + 'gn-location-3', + 'gp_hubs', + 'gp_portfolios', + 'gp_videos', + 'group', + 'group-documents-category', + 'groups', + 'hashtags', + 'hotel_facility', + 'ia_invited_groups', + 'ia_invitees', + 'incsub_wiki_category', + 'industry', + 'ingredient', + 'issue', + 'issuem_issue', + 'issuem_issue_tags', + 'jbp_category', + 'karma-slider-category', + 'klaviyo_shop_cart_status', + 'kwlogos-carousel', + 'layout_category', + 'layout_type', + 'ld_course_category', + 'ld_course_tag', + 'ld_lesson_category', + 'ld_lesson_tag', + 'ld_topic_tag', + 'lesson-tag', + 'level', + 'lingotek_hash', + 'lingotek_profile', + 'link_library_category', + 'linkage', + 'list-tags', + 'listing-category', + 'listing_amenities', + 'listing_category', + 'liveblog', + 'llms_access_plan_visibility', + 'llms_product_visibility', + 'localisation', + 'location', + 'location-tag', + 'locations', + 'magazine', + 'map_location_categories', + 'masonry_gallery_category', + 'mc-event-category', + 'mec_category', + 'mec_location', + 'mec_organizer', + 'media-category', + 'media-tags', + 'media_category', + 'media_folder', + 'member_cat', + 'mentions', + 'mesh_template_types', + 'ml-slider', + 'module', + 'module-tag', + 'module_width', + 'movie_cat', + 'mpp-component', + 'mpp-status', + 'mpp-type', + 'muvicast', + 'muvicountry', + 'muvidirector', + 'muviindex', + 'muviquality', + 'muviyear', + 'news-category', + 'news-tag', + 'news_category', + 'nova_menu', + 'nova_menu_item_label', + 'offer-types', + 'organization', + 'our_team_category', + 'page_category', + 'parisrestaurant', + 'parissauna', + 'partner_category', + 'partners', + 'paswdestinatari', + 'paypal_ipn_type', + 'pdf_lv_tag', + 'pec_events_category', + 'people', + 'people-expertise', + 'people-location', + 'perfect_quotes_category', + 'performer', + 'person', + 'personnal-category', + 'pexcontentslider_category', + 'pexfullslider_category', + 'pexnivoslider_category', + 'pexpricing_category', + 'pexservice_category', + 'pextestimonial_category', + 'pf_feed_item_tag', + 'pg_sas_type', + 'photo_tag', + 'phototype', + 'pj-categs', + 'pj-tags', + 'pl-categs', + 'placement', + 'plan_status', + 'platform', + 'player', + 'plugins_categories', + 'podcast', + 'pojo_sidebars', + 'popup_category', + 'pornstars', + 'portada', + 'portcat', + 'portfolio-category', + 'portfolio-gallery', + 'portfolio-skills', + 'portfolio-tag', + 'portfolio-tags', + 'portfolio-type', + 'portfolio-types', + 'portfolio_cat', + 'portfolio_categories', + 'portfolio_category', + 'portfolio_cats', + 'portfolio_client', + 'portfolio_entries', + 'portfolio_filter', + 'portfolio_in', + 'portfolio_label', + 'portfolio_skills', + 'portfolio_tag', + 'portfolio_tags', + 'portfolio_type', + 'posicao', + 'post-type', + 'post_format', + 'post_series', + 'pp_editorial_meta', + 'pp_notify_role', + 'pp_usergroup', + 'pricingcats', + 'print_section', + 'print_status', + 'programs', + 'project-attributes', + 'project-cat', + 'project-category', + 'project-type', + 'project_category', + 'project_tag', + 'projects_category', + 'projects_tag', + 'prominence', + 'promotion-categories', + 'property-city', + 'property-feature', + 'property-status', + 'property-type', + 'property-types', + 'property_action_category', + 'property_area', + 'property_category', + 'property_city', + 'property_feature', + 'property_status', + 'property_type', + 'province', + 'provinces', + 'publisher', + 'pwb-brand', + 'qmn_log_type', + 'qualification', + 'quality', + 'question-category', + 'question-tag', + 'question-type', + 'question_cat', + 'question_category', + 'question_tag', + 'quiz', + 'quiz-type', + 'quote_status', + 'rating', + 'reaction', + 'recipe-category', + 'recipe_category', + 'recipe_type', + 'region', + 'registrant-event', + 'related_keywords', + 'release-date', + 'resource-type', + 'resource_category', + 'resource_type', + 'resourcetype', + 'review-type', + 'review_category', + 'rodzaj', + 'role', + 'room_category', + 'room_tag', + 'roomtype', + 'rubriek_categorie', + 'savedreply', + 'schools', + 'scope', + 'scores_cat', + 'sdm_categories', + 'sdm_tags', + 'season', + 'secondary_html_features', + 'section', + 'sector', + 'series', + 'series_of_posts', + 'services_group', + 'serving', + 'shop_cart_status', + 'shop_cat', + 'shop_order_status', + 'shop_vendor', + 'shop_warranty_status', + 'shopp_category', + 'shopr_category', + 'show', + 'simple_link_category', + 'site-review-category', + 'sizes', + 'skill', + 'skill_level', + 'skills', + 'sld_cat', + 'slide-page', + 'slide-types', + 'slide_categories', + 'slide_type', + 'slider', + 'slider-locations', + 'slider_category', + 'slides_category', + 'slideshow', + 'sm-category', + 'snax_format', + 'sngg_media_tags', + 'solution_channel', + 'source_domain', + 'source_id', + 'sp_league', + 'sp_position', + 'sp_role', + 'sp_season', + 'sp_venue', + 'speaker', + 'speakers', + 'special-feature', + 'specialty', + 'spnl_log_type', + 'sponsor_categories', + 'sponsor_category', + 'sponsor_type', + 'spot_tag', + 'st_af_category', + 'st_af_tags', + 'staff', + 'staff-member-category', + 'staff-member-group', + 'staff_category', + 'staffgroups', + 'state', + 'status', + 'store', + 'stores', + 'studio', + 'study_level', + 'style', + 'style_category', + 'sub_transaction_action', + 'sub_transaction_result', + 'subcategory', + 'subject', + 'subscription_status', + 'swift-slider-category', + 'syn_sitegroup', + 'szbl-content-tag', + 'task-queue', + 'tax_feature', + 'tcb_symbols_tax', + 'tcp_product_category', + 'team', + 'team-category', + 'team_cat', + 'team_categories', + 'team_category', + 'team_cats', + 'team_department', + 'team_designation', + 'team_group', + 'team_member_position', + 'team_mfcategory', + 'teams', + 'tenant_categories', + 'tenant_location', + 'tender-category', + 'test-type', + 'testimonial-category', + 'testimonial-group', + 'testimonial-types', + 'testimonial_categories', + 'testimonial_category', + 'testimonials-category', + 'testimonials_category', + 'th_events_cat', + 'th_galleries_cat', + 'thegem_clients_sets', + 'thegem_news_sets', + 'thegem_portfolios', + 'thegem_quickfinders', + 'thegem_teams', + 'thegem_testimonials_sets', + 'theme', + 'themefusion_es_groups', + 'themes_categories', + 'themo_cpt_group', + 'themo_project_type', + 'themo_room_type', + 'thirstylink-category', + 'ticket_channel', + 'ticket_priority', + 'timeline_post_tag', + 'tipo', + 'tipologie', + 'tips', + 'tm-testimonials_category', + 'tm_testimonial_group', + 'tooltips_categories', + 'tour_category', + 'tour_destination', + 'tour_facility', + 'tour_phys', + 'tour_type', + 'tp_event_category', + 'transmission', + 'treatment-type', + 'tribe_events_cat', + 'truethemes-gallery-category', + 'tsas-category', + 'tshowcase-categories', + 'tsml_region', + 'ttshowcase_groups', + 'tvo_tags', + 'type', + 'types', + 'u_course_cat', + 'u_department', + 'u_event_cat', + 'ufaq-category', + 'ufaq-tag', + 'um_hashtag', + 'um_user_tag', + 'uncodeblock_category', + 'upg_cate', + 'urp-review-category', + 'us_portfolio_category', + 'us_testimonial_category', + 'user-group', + 'user_category', + 'user_status', + 'vendor', + 'venue', + 'video-category', + 'video-series', + 'video-tag', + 'video_category', + 'video_tag', + 'videos', + 'videos_categories', + 'voice_category', + 'vtmin_rule_category', + 'vtprd_rule_category', + 'w2dc-category', + 'w2dc-location', + 'w2dc-tag', + 'wcb_sponsor_level', + 'wcb_track', + 'wccf_checkout_field_field_type', + 'wccf_checkout_field_status', + 'wccf_order_field_field_type', + 'wccf_order_field_status', + 'wccf_product_field_field_type', + 'wccf_product_field_status', + 'wccf_product_prop_field_type', + 'wccf_product_prop_status', + 'wccf_user_field_field_type', + 'wccf_user_field_status', + 'wcfm_knowledgebase_category', + 'wcm_task_category', + 'wcpv_product_vendors', + 'wcs-instructor', + 'wcs-room', + 'wcs-type', + 'wdca_ad_categories', + 'where', + 'who', + 'wiki-category', + 'wiki_cats', + 'wl_entity_type', + 'workout_entries', + 'works-category', + 'wp-rest-api-log-method', + 'wp-rest-api-log-source', + 'wp-rest-api-log-status', + 'wp-type-activity-types', + 'wp-type-contacts-subtype', + 'wp-type-group', + 'wp_bannerize_tax', + 'wp_log_type', + 'wp_super_faq_category', + 'wpbdm-region', + 'wpbdp_category', + 'wpbdp_tag', + 'wpcm_make_model', + 'wpdmcategory', + 'wpfb_file_category', + 'wpfcas-category', + 'wpfd-category', + 'wplead_list_category', + 'wplss_logo_showcase_cat', + 'wpm-testimonial-category', + 'wpmf-category', + 'wpostahs-slider-category', + 'wprm_course', + 'wprm_cuisine', + 'wprm_ingredient', + 'wprm_keyword', + 'wprss_category', + 'wps_forum', + 'wpsc-variation', + 'wpsc_log_type', + 'wpsc_product_category', + 'wpseo_locations_category', + 'wpsisac_slider-category', + 'wpsl_store_category', + 'wpt_category', + 'wpt_result', + 'wpt_scale', + 'wpv_sermons_category', + 'wpvqgr_tag', + 'writer', + 'wyz_business_category', + 'wyz_business_rating_category', + 'wyz_business_tag', + 'wzkb_category', + 'year', + 'years', + 'yith_product_brand', + 'yith_shop_vendor', + 'yst_prominent_words', + 'zipcode', + 'zoninator_zones', + 'zrf_field_group', + + // End The Backlog @see https://wp.me/p9MPsk-X0. + 'bill-status', + 'etb-audience', + 'etb-state', + 'etb-target', + 'etb-topic', + 'etb-year', + 'foia-response-status', + 'target-type', + 'timeline-pillar', + 'timeline-type', + + ); // end taxonomies. + + /** + * List of options to sync + * + * @access private + * @static + * + * @var array + */ + private static $options_to_sync = array( + 'jetpack_search_color_theme', + 'jetpack_search_result_format', + 'jetpack_search_default_sort', + 'jetpack_search_overlay_trigger', + 'jetpack_search_excluded_post_types', + 'jetpack_search_highlight_color', + 'jetpack_search_enable_sort', + 'jetpack_search_inf_scroll', + 'jetpack_search_show_powered_by', + 'instant_search_enabled', + ); // end options. + + /* + * Taxonomies we know don't sync. + * See also sync/src/class-defaults.php + * + * 'network' + * 'post_status' + * 'product_cat' + * 'tags' + * + */ + + // + // Hooks into sync. + + /** + * Add Search post meta to the post meta whitelist. + * + * @param array $list Existing post meta whitelist. + * @return array Updated post meta whitelist. + */ + public function add_search_post_meta_whitelist( $list ) { + return array_merge( $list, $this->get_all_postmeta_keys() ); + } + + /** + * Add Search options to the options whitelist. + * + * @param array $list Existing options whitelist. + * @return array Updated options whitelist. + */ + public function add_search_options_whitelist( $list ) { + return array_merge( $list, $this->get_all_option_keys() ); + } + + // + // Indexing functions for wp.com. + + /** + * + * Check whether a postmeta or taxonomy 'key' is in the indexable + * list. This is called by the indexing code on wp.com to decide + * whether to include something in the index. + * + * @static + * @access public + * + * @param string $type Either 'postmeta' or 'taxonomy'. + * @param string $key The postmeta key or taxonomy name. + * @return boolean + */ + public static function is_indexable( $type, $key ) { + switch ( $type ) { + case 'postmeta': + return isset( self::$postmeta_to_sync[ $key ] ); + case 'taxonomy': + return in_array( $key, self::$taxonomies_to_sync, true ); + } + return false; + } + + /** + * + * Get the indexing spec for a postmeta key. + * + * @static + * @access public + * + * @param string $key The postmeta key. + * @return array The spec. + */ + public static function get_postmeta_spec( $key ) { + return self::$postmeta_to_sync[ $key ]; + } + + /** + * Get all post meta keys that get synced. + * + * @access public + * + * @return array List of post meta keys that get synced. + */ + public static function get_all_postmeta_keys() { + return array_keys( self::$postmeta_to_sync ); + } + + /** + * Get all option keys that get synced. + * + * @access public + * + * @return array List of option keys that get synced. + */ + public static function get_all_option_keys() { + return self::$options_to_sync; + } + + /** + * Get all unindexed postmeta. + * This is mostly for testing. + * + * @access public + * + * @return array List of postmeta that are not synced. + */ + public static function get_all_unindexed_postmeta_keys() { + return array_keys( self::$unindexed_postmeta ); + } + + /** + * Get all taxonomies that get synced. + * This is mostly for testing. + * + * @access public + * + * @return array List of taxonomies that get synced. + */ + public static function get_all_taxonomies() { + return self::$taxonomies_to_sync; + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-terms-of-service/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-terms-of-service/CHANGELOG.md deleted file mode 100644 index f9b91333..00000000 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-terms-of-service/CHANGELOG.md +++ /dev/null @@ -1,223 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [1.9.18] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies. - -## [1.9.17] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.9.16] - 2021-11-30 -### Changed -- Updated package dependencies. - -## [1.9.15] - 2021-11-22 -### Changed -- Updated package dependencies - -## [1.9.14] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [1.9.13] - 2021-10-26 -### Changed -- Updated package dependencies. - -## [1.9.12] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [1.9.11] - 2021-10-12 -### Changed -- Updated package dependencies - -## [1.9.10] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.9.9] - 2021-08-30 -### Changed -- Run composer update on test-php command instead of phpunit -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). -- update annotations versions - -## [1.9.8] - 2021-06-15 - -- Updated package dependencies. - -## [1.9.7] - 2021-05-25 -### Changed -- Updated package dependencies. - -## [1.9.6] - 2021-04-27 -### Changed -- Updated package dependencies. - -## [1.9.5] - 2021-04-08 -### Changed -- Packaging and build changes, no change to the package itself. - -## [1.9.4] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies - -### Changed -- Update package dependencies. - -### Fixed -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -## [1.9.3] - 2021-02-23 - -- CI: Make tests more generic - -## [1.9.2] - 2021-01-28 - -- Update dependencies to latest stable - -## [1.9.1] - 2021-01-26 - -- Add mirror-repo information to all current composer packages -- Monorepo: Reorganize all projects - -## [1.9.0] - 2021-01-05 - -- Update dependency brain/monkey to v2.6.0 -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.8.2] - 2020-11-24 - -- Version packages for release - -## [1.8.1] - 2020-11-24 - -- Updated PHPCS: Packages and Debugger - -## [1.8.0] - 2020-10-27 - -- Updated dependencies to latest stable - -## [1.7.0] - 2020-09-29 - -- Update dependencies to latest stable - -## [1.6.1] - 2020-09-22 - -- Packages: update list of files distributed in production packages - -## [1.6.0] - 2020-08-26 - -- ToS: Remove dependency to Jetpack Connection -- CI: Try collect js coverage -- Docker: Add package testing shortcut - -## [1.5.2] - 2020-08-10 - -- Update dependencies to latest stable - -## [1.5.1] - 2020-08-10 - -- Update dependencies to latest stable - -## [1.5.0] - 2020-07-28 - -- Core Compat: Site Environment -- Package Unit tests: update test file names to make sure they runs in Travis - -## [1.4.2] - 2020-07-06 - -- Update dependencies to latest stable - -## [1.4.1] - 2020-07-01 - -- Update dependencies to latest stable - -## [1.4.0] - 2020-06-30 - -- PHPCS: Clean up the packages -- PHPCS Updates after WPCS 2.3 - -## [1.3.1] - 2020-06-01 - -- Update dependencies to latest stable - -## [1.3.0] - 2020-05-26 - -- Update dependencies to latest stable - -## [1.2.0] - 2020-04-28 - -- Update dependencies to latest stable - -## [1.1.1] - 2020-03-31 - -- Update dependencies to latest stable - -## [1.1.0] - 2020-03-31 - -- Update dependencies to latest stable - -## [1.0.4] - 2019-11-15 - -- Allow TOS agreement before Jetpack is fully active so we track… - -## [1.0.3] - 2019-11-08 - -- Packages: Use classmap instead of PSR-4 - -## [1.0.1] - 2019-11-08 - -- Deprecate Jetpack::is_development_mode() in favor of the packaged Status()->is_development_mode() - -## 1.0.0 - 2019-10-22 - -- Package: Create new TOS package - -[1.9.18]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.17...v1.9.18 -[1.9.17]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.16...v1.9.17 -[1.9.16]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.15...v1.9.16 -[1.9.15]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.14...v1.9.15 -[1.9.14]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.13...v1.9.14 -[1.9.13]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.12...v1.9.13 -[1.9.12]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.11...v1.9.12 -[1.9.11]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.10...v1.9.11 -[1.9.10]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.9...v1.9.10 -[1.9.9]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.8...v1.9.9 -[1.9.8]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.7...v1.9.8 -[1.9.7]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.6...v1.9.7 -[1.9.6]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.5...v1.9.6 -[1.9.5]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.4...v1.9.5 -[1.9.4]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.3...v1.9.4 -[1.9.3]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.2...v1.9.3 -[1.9.2]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.1...v1.9.2 -[1.9.1]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.9.0...v1.9.1 -[1.9.0]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.8.2...v1.9.0 -[1.8.2]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.8.1...v1.8.2 -[1.8.1]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.8.0...v1.8.1 -[1.8.0]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.7.0...v1.8.0 -[1.7.0]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.6.1...v1.7.0 -[1.6.1]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.6.0...v1.6.1 -[1.6.0]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.5.2...v1.6.0 -[1.5.2]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.5.1...v1.5.2 -[1.5.1]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.5.0...v1.5.1 -[1.5.0]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.4.2...v1.5.0 -[1.4.2]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.4.1...v1.4.2 -[1.4.1]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.4.0...v1.4.1 -[1.4.0]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.3.1...v1.4.0 -[1.3.1]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.3.0...v1.3.1 -[1.3.0]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/Automattic/jetpack-terms-of-service/compare/1.1.1...v1.2.0 -[1.1.1]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.1.0...1.1.1 -[1.1.0]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.0.4...v1.1.0 -[1.0.4]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.0.3...v1.0.4 -[1.0.3]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.0.1...v1.0.3 -[1.0.1]: https://github.com/Automattic/jetpack-terms-of-service/compare/v1.0.0...v1.0.1 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/CHANGELOG.md deleted file mode 100644 index 970ab757..00000000 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/CHANGELOG.md +++ /dev/null @@ -1,253 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [1.14.0] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies -- Updated package textdomain from `jetpack` to `jetpack-tracking`. - -## [1.13.19] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.13.18] - 2021-11-30 -### Changed -- Updated package dependencies. - -## [1.13.17] - 2021-11-22 -### Changed -- Updated package dependencies - -## [1.13.16] - 2021-11-16 -### Changed -- Updated package dependencies. - -## [1.13.15] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [1.13.14] - 2021-10-26 -### Changed -- Updated package dependencies. - -## [1.13.13] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [1.13.12] - 2021-10-12 -### Changed -- Updated package dependencies - -## [1.13.11] - 2021-09-30 -### Added -- Set up the ajax hook in the Tracking class. - -## [1.13.10] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.13.9] - 2021-08-30 -### Changed -- Run composer update on test-php command instead of phpunit -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). -- update annotations versions - -## [1.13.8] - 2021-08-10 -### Added -- adding Readme to the tracking package - -## [1.13.7] - 2021-06-15 -### Changed -- Updated package dependencies. - -## [1.13.6] - 2021-05-25 -### Added -- Adding the tracks-callables.js file to the Tracking package. - -## [1.13.5] - 2021-04-27 -### Changed -- Updated package dependencies. - -## [1.13.4] - 2021-04-08 -### Changed -- Packaging and build changes, no change to the package itself. - -## [1.13.3] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies - -### Changed -- Update package dependencies. - -### Fixed -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -## [1.13.2] - 2021-02-23 - -- CI: Make tests more generic -- Jetpack: Normalize package names - -## [1.13.1] - 2021-01-28 - -- Update dependencies to latest stable - -## [1.13.0] - 2021-01-26 - -- Tracking: remove dependency to the Jetpack plugin -- Add mirror-repo information to all current composer packages -- Tracking: get connected user data from Connection package -- Monorepo: Reorganize all projects - -## [1.12.0] - 2021-01-05 - -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.11.1] - 2020-11-24 - -- Version packages for release - -## [1.11.0] - 2020-10-27 - -- Updated dependencies to latest stable - -## [1.10.0] - 2020-09-29 - -- Packages: update list of files distributed in production packages -- Tracking: fix the logic for determining when to enable tracking. - -## [1.9.1] - 2020-09-09 - -- Tracking: fix the logic for determining when to enable tracking. - -## [1.9.0] - 2020-08-26 - -- Tracking: Add the connection check. - -## [1.8.2] - 2020-08-10 - -- Update dependencies to latest stable - -## [1.8.1] - 2020-08-10 - -- Update dependencies to latest stable - -## [1.8.0] - 2020-07-28 - -- Update dependencies to latest stable - -## [1.7.2] - 2020-07-06 - -- Update dependencies to latest stable - -## [1.7.1] - 2020-07-01 - -- Update dependencies to latest stable - -## [1.7.0] - 2020-06-30 - -- Various: Update use of whitelist/blacklist - -## [1.6.1] - 2020-06-01 - -- Update dependencies to latest stable - -## [1.6.0] - 2020-05-26 - -- Update dependencies to latest stable - -## [1.5.0] - 2020-04-28 - -- Update dependencies to latest stable - -## [1.4.0] - 2020-03-31 - -- Update dependencies to latest stable - -## [1.3.0] - 2020-03-31 - -- Update dependencies to latest stable - -## [1.2.2] - 2019-11-08 - -- Packages: Use classmap instead of PSR-4 - -## [1.2.1] - 2019-10-29 - -- PHPCS: Rest of the packages - -## [1.2.0] - 2019-10-25 - -- Update/Use the new Terms of Service package in Jetpack - -## [1.1.1] - 2019-10-16 - -- Tracks: use filter instead of relying on Jetpack class - -## [1.1.0] - 2019-10-11 - -- Tracks: Don't track users in dev mode or when opted out - -## [1.0.2] - 2019-10-07 - -- Update dependency phpcompatibility/phpcompatibility-wp to v2.1.0 - -## [1.0.1] - 2019-09-20 - -- Docs: Unify usage of @package phpdoc tags - -## 1.0.0 - 2019-09-14 - -- Create package for Jetpack Tracking - -[1.14.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.19...v1.14.0 -[1.13.19]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.18...v1.13.19 -[1.13.18]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.17...v1.13.18 -[1.13.17]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.16...v1.13.17 -[1.13.16]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.15...v1.13.16 -[1.13.15]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.14...v1.13.15 -[1.13.14]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.13...v1.13.14 -[1.13.13]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.12...v1.13.13 -[1.13.12]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.11...v1.13.12 -[1.13.11]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.10...v1.13.11 -[1.13.10]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.9...v1.13.10 -[1.13.9]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.8...v1.13.9 -[1.13.8]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.7...v1.13.8 -[1.13.7]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.6...v1.13.7 -[1.13.6]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.5...v1.13.6 -[1.13.5]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.4...v1.13.5 -[1.13.4]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.3...v1.13.4 -[1.13.3]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.2...v1.13.3 -[1.13.2]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.1...v1.13.2 -[1.13.1]: https://github.com/Automattic/jetpack-tracking/compare/v1.13.0...v1.13.1 -[1.13.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.12.0...v1.13.0 -[1.12.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.11.1...v1.12.0 -[1.11.1]: https://github.com/Automattic/jetpack-tracking/compare/v1.11.0...v1.11.1 -[1.11.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.10.0...v1.11.0 -[1.10.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.9.1...v1.10.0 -[1.9.1]: https://github.com/Automattic/jetpack-tracking/compare/v1.9.0...v1.9.1 -[1.9.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.8.2...v1.9.0 -[1.8.2]: https://github.com/Automattic/jetpack-tracking/compare/v1.8.1...v1.8.2 -[1.8.1]: https://github.com/Automattic/jetpack-tracking/compare/v1.8.0...v1.8.1 -[1.8.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.7.2...v1.8.0 -[1.7.2]: https://github.com/Automattic/jetpack-tracking/compare/v1.7.1...v1.7.2 -[1.7.1]: https://github.com/Automattic/jetpack-tracking/compare/v1.7.0...v1.7.1 -[1.7.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.6.1...v1.7.0 -[1.6.1]: https://github.com/Automattic/jetpack-tracking/compare/v1.6.0...v1.6.1 -[1.6.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.5.0...v1.6.0 -[1.5.0]: https://github.com/Automattic/jetpack-tracking/compare/1.4.0...v1.5.0 -[1.4.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.3.0...1.4.0 -[1.3.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.2.2...v1.3.0 -[1.2.2]: https://github.com/Automattic/jetpack-tracking/compare/v1.2.1...v1.2.2 -[1.2.1]: https://github.com/Automattic/jetpack-tracking/compare/v1.2.0...v1.2.1 -[1.2.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.1.1...v1.2.0 -[1.1.1]: https://github.com/Automattic/jetpack-tracking/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/Automattic/jetpack-tracking/compare/v1.0.2...v1.1.0 -[1.0.2]: https://github.com/Automattic/jetpack-tracking/compare/v1.0.1...v1.0.2 -[1.0.1]: https://github.com/Automattic/jetpack-tracking/compare/v1.0.0...v1.0.1 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/.phpcsignore b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/.phpcsignore new file mode 100644 index 00000000..9f4f5a0b --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/.phpcsignore @@ -0,0 +1 @@ +rules/ diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/CHANGELOG.md new file mode 100644 index 00000000..6d8c3a73 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/CHANGELOG.md @@ -0,0 +1,83 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.6.2] - 2022-06-06 +### Fixed +- Fix the hook we're using for run.php. + +## [0.6.1] - 2022-06-02 +### Removed +- Disable the WAF module on Atomic + +## [0.6.0] - 2022-05-18 +### Added +- Add checks for a killswitch define [#24247] +- Added endpoint to update rules on demand [#24327] +- handle share data option to decide if we should write to log file [#24218] + +### Fixed +- Allow the rules API to return 401 responses without throwing an exception. [#24153] +- fix bootstrap generation in cases file.php is not required yet [#24153] + +## [0.5.1] - 2022-05-04 +### Added +- Added a check to only run the firewall when the Jetpack module is enabled, a method to provide the bootstrap.php path, and a REST API endpoint to provide the firewall settings. [#23769] +- Connected the WAF UI to actually updating the IP block and allow lists when saving the settings. [#24124] + +### Fixed +- Fixed database logging [#24070] +- Fixed issue where code for the waf package was executed if the module was disabled [#24217] +- Fixed writing rules php files if the API request for getting up-to-date rules failes so that the internal functionality is kept in tact. [#24181] +- We now sanitize the output generated by blocked requests, and only report the rule ID in the header response. [#24058] + +## [0.5.0] - 2022-04-26 +### Added +- added cron to update rules +- Added WAF IP allow list and block list functionality. + +### Changed +- Added comment to ignore failing phpcs check +- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` +- Updated package dependencies. + +## [0.4.0] - 2022-04-19 +### Added +- added logs when a request is blocked +- Generating rules now fetches them from the API. Also adds a few CLI commands. + +## [0.3.0] - 2022-04-12 +### Added +- Added hooks for generating the rules.php file, and improved functionality and class names. + +## [0.2.0] - 2022-04-06 +### Added +- Added Jetpack WAF standalone mode. + +### Fixed +- Fix normalizing nested array targets, like with query strings. + +## [0.1.1] - 2022-03-29 +### Fixed +- Fixed instance of normalizeHeaderName that wasn't renamed; fixed header parsing; removed unused compiler file. + +## 0.1.0 - 2022-02-16 +### Added +- Added executing the WAF as part of the Jetpack plugin. +- Added Initial version + +### Changed +- Core: do not ship .phpcs.dir.xml in production builds. + +[0.6.2]: https://github.com/Automattic/jetpack-waf/compare/v0.6.1...v0.6.2 +[0.6.1]: https://github.com/Automattic/jetpack-waf/compare/v0.6.0...v0.6.1 +[0.6.0]: https://github.com/Automattic/jetpack-waf/compare/v0.5.1...v0.6.0 +[0.5.1]: https://github.com/Automattic/jetpack-waf/compare/v0.5.0...v0.5.1 +[0.5.0]: https://github.com/Automattic/jetpack-waf/compare/v0.4.0...v0.5.0 +[0.4.0]: https://github.com/Automattic/jetpack-waf/compare/v0.3.0...v0.4.0 +[0.3.0]: https://github.com/Automattic/jetpack-waf/compare/v0.2.0...v0.3.0 +[0.2.0]: https://github.com/Automattic/jetpack-waf/compare/v0.1.1...v0.2.0 +[0.1.1]: https://github.com/Automattic/jetpack-waf/compare/v0.1.0...v0.1.1 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/LICENSE.txt b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/LICENSE.txt index e82774c1..e82774c1 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/LICENSE.txt +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/LICENSE.txt diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/SECURITY.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/SECURITY.md index b4b46c0e..b4b46c0e 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-tracking/SECURITY.md +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/SECURITY.md diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/actions.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/actions.php new file mode 100644 index 00000000..7d50a514 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/actions.php @@ -0,0 +1,85 @@ +<?php +/** + * Action Hooks for Jetpack WAF module. + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +use Automattic\Jetpack\Status\Host; + +// We don't want to be anything in here outside WP context. +if ( ! function_exists( 'add_action' ) ) { + return; +} + +/** + * Check if killswitch is defined as true + */ +if ( defined( 'DISABLE_JETPACK_WAF' ) && DISABLE_JETPACK_WAF ) { + return; +} + +if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { + return; +} + +if ( ( new Host() )->is_atomic_platform() ) { + add_filter( + 'jetpack_get_available_modules', + function ( $modules ) { + unset( $modules['waf'] ); + + return $modules; + } + ); +} + +/** + * Triggers when the Jetpack plugin is updated + */ +add_action( + 'upgrader_process_complete', + array( __NAMESPACE__ . '\Waf_Runner', 'update_rules_if_changed' ) +); + +/** + * Cron to update the rules periodically. + */ +if ( Waf_Runner::is_enabled() ) { + add_action( 'jetpack_waf_rules_update_cron', array( __NAMESPACE__ . '\Waf_Runner', 'update_rules_cron' ) ); + + if ( ! wp_next_scheduled( 'jetpack_waf_rules_update_cron' ) ) { + wp_schedule_event( time(), 'twicedaily', 'jetpack_waf_rules_update_cron' ); + } +} + +/** + * Runs the WAF in the WP context. + * + * @return void + */ +add_action( + 'plugins_loaded', + function () { + require_once __DIR__ . '/run.php'; + } +); + +/** + * Adds the REST API endpoints used by the WAF in the WP context. + * + * @return void + */ +add_action( + 'rest_api_init', + function () { + require_once __DIR__ . '/src/class-waf-endpoints.php'; + Waf_Endpoints::register_endpoints(); + } +); + +add_action( 'update_option_' . Waf_Runner::IP_ALLOW_LIST_OPTION_NAME, array( Waf_Runner::class, 'activate' ), 10, 0 ); +add_action( 'update_option_' . Waf_Runner::IP_BLOCK_LIST_OPTION_NAME, array( Waf_Runner::class, 'activate' ), 10, 0 ); +add_action( 'update_option_' . Waf_Runner::IP_LISTS_ENABLED_OPTION_NAME, array( Waf_Runner::class, 'activate' ), 10, 0 ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/cli.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/cli.php new file mode 100644 index 00000000..c62c43f9 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/cli.php @@ -0,0 +1,12 @@ +<?php +/** + * Registers the CLI functionality. + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +if ( defined( 'WP_CLI' ) && \WP_CLI ) { + \WP_CLI::add_command( 'jetpack-waf', CLI::class ); +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/run.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/run.php new file mode 100644 index 00000000..06aa184f --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/run.php @@ -0,0 +1,24 @@ +<?php +/** + * This file is to be included where the Jetpack Waf is to be run. Note that it will potentially stop the whole + * request as this is the point of a functioning firewall. + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +if ( ! Waf_Runner::is_enabled() ) { + return; +} + +Waf_Runner::define_mode(); +Waf_Runner::define_share_data(); + +if ( ! Waf_Runner::is_allowed_mode( JETPACK_WAF_MODE ) ) { + return; +} + +if ( ! Waf_Runner::did_run() ) { + Waf_Runner::run(); +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-cli.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-cli.php new file mode 100644 index 00000000..5ce887dc --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-cli.php @@ -0,0 +1,165 @@ +<?php +/** + * CLI handler for Jetpack Waf. + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +use \WP_CLI; +use \WP_CLI_Command; + +/** + * Just a few sample commands to learn how WP-CLI works + */ +class CLI extends WP_CLI_Command { + /** + * View or set the current mode of the WAF. + * ## OPTIONS + * + * [<mode>] + * : The new mode to be set. + * --- + * options: + * - silent + * - normal + * --- + * + * @param array $args Arguments passed to CLI. + * @return void|null + * @throws WP_CLI\ExitException If there is an error switching the mode. + */ + public function mode( $args ) { + if ( count( $args ) > 1 ) { + + return WP_CLI::error( __( 'Only one mode may be specified.', 'jetpack-waf' ) ); + } + if ( count( $args ) === 1 ) { + if ( ! Waf_Runner::is_allowed_mode( $args[0] ) ) { + + return WP_CLI::error( + sprintf( + /* translators: %1$s is the mode that was actually found. Also note that the expected "silent" and "normal" are hard-coded strings and must therefore stay the same in any translation. */ + __( 'Invalid mode: %1$s. Expected "silent" or "normal".', 'jetpack-waf' ), + $args[0] + ) + ); + } + + update_option( Waf_Runner::MODE_OPTION_NAME, $args[0] ); + + try { + ( new Waf_Standalone_Bootstrap() )->generate(); + } catch ( \Exception $e ) { + WP_CLI::warning( + sprintf( + /* translators: %1$s is the unexpected error message. */ + __( 'Unable to generate waf bootstrap - standalone mode may not work properly: %1$s', 'jetpack-waf' ), + $e->getMessage() + ) + ); + } + + return WP_CLI::success( + sprintf( + /* translators: %1$s is the name of the mode that was just switched to. */ + __( 'Jetpack WAF mode switched to "%1$s".', 'jetpack-waf' ), + get_option( Waf_Runner::MODE_OPTION_NAME ) + ) + ); + } + WP_CLI::line( + sprintf( + /* translators: %1$s is the name of the mode that the waf is currently running in. */ + __( 'Jetpack WAF is running in "%1$s" mode.', 'jetpack-waf' ), + get_option( Waf_Runner::MODE_OPTION_NAME ) + ) + ); + } + + /** + * Setup the WAF to run. + * ## OPTIONS + * + * [<mode>] + * : The new mode to be set. + * --- + * options: + * - silent + * - normal + * --- + * + * @param array $args Arguments passed to CLI. + * @return void|null + * @throws WP_CLI\ExitException If there is an error switching the mode. + */ + public function setup( $args ) { + // Let is_allowed_mode know we are running from the CLI + define( 'WAF_CLI_MODE', $args[0] ); + + // Set the mode and generate the bootstrap + $this->mode( array( $args[0] ) ); + + try { + // Add relevant options and generate the rules.php file + Waf_Runner::activate(); + } catch ( \Exception $e ) { + + return WP_CLI::error( + sprintf( + /* translators: %1$s is the unexpected error message. */ + __( 'Jetpack WAF rules file failed to generate: %1$s', 'jetpack-waf' ), + $e->getMessage() + ) + ); + } + + return WP_CLI::success( __( 'Jetpack WAF has successfully been setup.', 'jetpack-waf' ) ); + } + + /** + * Delete the WAF options. + * + * @return void|null + * @throws WP_CLI\ExitException If deactivating has failures. + */ + public function teardown() { + try { + Waf_Runner::deactivate(); + } catch ( \Exception $e ) { + WP_CLI::error( __( 'Jetpack WAF failed to fully deactivate.', 'jetpack-waf' ) ); + } + + return WP_CLI::success( __( 'Jetpack WAF has been deactivated.', 'jetpack-waf' ) ); + } + + /** + * Generate the rules.php file with latest rules for the WAF. + * + * @return void|null + * @throws WP_CLI\ExitException If there is an error switching the mode. + */ + public function generate_rules() { + try { + Waf_Runner::generate_rules(); + } catch ( \Exception $e ) { + + return WP_CLI::error( + sprintf( + /* translators: %1$s is the unexpected error message. */ + __( 'Jetpack WAF rules file failed to generate: %1$s', 'jetpack-waf' ), + $e->getMessage() + ) + ); + } + + return WP_CLI::success( + sprintf( + /* translators: %1$s is the name of the mode that was just switched to. */ + __( 'Jetpack WAF rules successfully created to: "%1$s".', 'jetpack-waf' ), + Waf_Runner::RULES_FILE + ) + ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-constants.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-constants.php new file mode 100644 index 00000000..0cfa3446 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-constants.php @@ -0,0 +1,27 @@ +<?php +/** + * Class use to define the constants used by the WAF + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +/** + * Defines our constants. + */ +class Waf_Constants { + /** + * Initializes the constants required for generating the bootstrap, if they have not been initialized yet. + * + * @return void + */ + public static function initialize_constants() { + if ( ! defined( 'JETPACK_WAF_DIR' ) ) { + define( 'JETPACK_WAF_DIR', trailingslashit( WP_CONTENT_DIR ) . 'jetpack-waf' ); + } + if ( ! defined( 'JETPACK_WAF_WPCONFIG' ) ) { + define( 'JETPACK_WAF_WPCONFIG', trailingslashit( WP_CONTENT_DIR ) . '../wp-config.php' ); + } + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-endpoints.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-endpoints.php new file mode 100644 index 00000000..2aff96a5 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-endpoints.php @@ -0,0 +1,111 @@ +<?php +/** + * Class use to register REST API endpoints used by the WAF + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +use Automattic\Jetpack\Connection\REST_Connector; +use WP_REST_Server; + +/** + * Defines our endponts. + */ +class Waf_Endpoints { + /** + * Get Bootstrap File Path + * + * @return string The path to the Jetpack Firewall's bootstrap.php file. + */ + private static function get_bootstrap_file_path() { + $bootstrap = new Waf_Standalone_Bootstrap(); + return $bootstrap->get_bootstrap_file_path(); + } + + /** + * Has Rules Access + * + * @return bool True when the current site has access to latest firewall rules. + */ + private static function has_rules_access() { + // any site with Jetpack Scan can download new WAF rules + return \Jetpack_Plan::supports( 'scan' ); + } + + /** + * Register REST API endpoints. + */ + public static function register_endpoints() { + register_rest_route( + 'jetpack/v4', + '/waf', + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::waf', + 'permission_callback' => __CLASS__ . '::waf_permissions_callback', + ) + ); + register_rest_route( + 'jetpack/v4', + '/waf/update-rules', + array( + 'methods' => WP_REST_Server::EDITABLE, + 'callback' => __CLASS__ . '::update_rules', + 'permission_callback' => __CLASS__ . '::waf_permissions_callback', + ) + ); + } + + /** + * Update rules endpoint + */ + public static function update_rules() { + $success = true; + $message = 'Rules updated succesfully'; + + try { + Waf_Runner::generate_rules(); + } catch ( Exception $e ) { + $success = false; + $message = $e->getMessage(); + } + + return rest_ensure_response( + array( + 'success' => $success, + 'message' => $message, + ) + ); + } + + /** + * WAF Endpoint + */ + public static function waf() { + return rest_ensure_response( + array( + 'bootstrapPath' => self::get_bootstrap_file_path(), + 'hasRulesAccess' => self::has_rules_access(), + ) + ); + } + + /** + * WAF Endpoint Permissions Callback + * + * @return bool|WP_Error True if user can view the Jetpack admin page. + */ + public static function waf_permissions_callback() { + if ( current_user_can( 'jetpack_manage_modules' ) ) { + return true; + } + + return new WP_Error( + 'invalid_user_permission_manage_modules', + REST_Connector::get_user_permissions_error_msg(), + array( 'status' => rest_authorization_required_code() ) + ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php new file mode 100644 index 00000000..662a2ca2 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php @@ -0,0 +1,39 @@ +<?php +/** + * Class use to initialize the WAF module. + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +/** + * Initializes the module + */ +class Waf_Initializer { + /** + * Initializes the configurations needed for the waf module. + * + * @return void + */ + public static function init() { + add_action( 'jetpack_activate_module_waf', __CLASS__ . '::on_activation' ); + add_action( 'jetpack_deactivate_module_waf', __CLASS__ . '::on_deactivation' ); + } + + /** + * On module activation set up waf mode + */ + public static function on_activation() { + update_option( Waf_Runner::MODE_OPTION_NAME, 'normal' ); + Waf_Runner::activate(); + ( new Waf_Standalone_Bootstrap() )->generate(); + } + + /** + * On module deactivation, unset waf mode + */ + public static function on_deactivation() { + Waf_Runner::deactivate(); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-operators.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-operators.php new file mode 100644 index 00000000..503fe797 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-operators.php @@ -0,0 +1,286 @@ +<?php +/** + * Rule compiler for Jetpack Waf. + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +/** + * Waf_Operators class + */ +class Waf_Operators { + /** + * Returns true if the test string is found at the beginning of the input. + * + * @param string $input Input. + * @param string $test Test. + * @return string|false + */ + public function begins_with( $input, $test ) { + if ( '' === $input && '' === $test ) { + return ''; + } + + return substr( $input, 0, strlen( $test ) ) === $test + ? $test + : false; + } + + /** + * Returns true if the test string is found anywhere in the input. + * + * @param string $input Input. + * @param string $test Test. + * @return string|false + */ + public function contains( $input, $test ) { + if ( empty( $input ) || empty( $test ) ) { + return false; + } + + return strpos( $input, $test ) !== false + ? $test + : false; + } + + /** + * Returns true if the test string with word boundaries is found anywhere in the input. + * + * @param string $input Input. + * @param string $test Test. + * @return string|false + */ + public function contains_word( $input, $test ) { + return ( $input === $test || 1 === preg_match( '/\b' . preg_quote( $test, '/' ) . '\b/Ds', $input ) ) + ? $test + : false; + } + + /** + * Returns true if the test string is found at the end of the input. + * + * @param string $input Input. + * @param string $test Test. + * @return string|false + */ + public function ends_with( $input, $test ) { + return ( '' === $test || substr( $input, -1 * strlen( $test ) ) === $test ) + ? $test + : false; + } + + /** + * Returns true if the input value is equal to the test value. + * If either value cannot be converted to an int it will be treated as 0. + * + * @param mixed $input Input. + * @param mixed $test Test. + * @return int|false + */ + public function eq( $input, $test ) { + return intval( $input ) === intval( $test ) + ? $input + : false; + } + + /** + * Returns true if the input value is greater than or equal to the test value. + * If either value cannot be converted to an int it will be treated as 0. + * + * @param mixed $input Input. + * @param mixed $test Test. + * @return int|false + */ + public function ge( $input, $test ) { + return intval( $input ) >= intval( $test ) + ? $input + : false; + } + + /** + * Returns true if the input value is greater than the test value. + * If either value cannot be converted to an int it will be treated as 0. + * + * @param mixed $input Input. + * @param mixed $test Test. + * @return int|false + */ + public function gt( $input, $test ) { + return intval( $input ) > intval( $test ) + ? $input + : false; + } + + /** + * Returns true if the input value is less than or equal to the test value. + * If either value cannot be converted to an int it will be treated as 0. + * + * @param mixed $input Input. + * @param mixed $test Test. + * @return int|false + */ + public function le( $input, $test ) { + return intval( $input ) <= intval( $test ) + ? $input + : false; + } + + /** + * Returns true if the input value is less than the test value. + * If either value cannot be converted to an int it will be treated as 0. + * + * @param mixed $input Input. + * @param mixed $test Test. + * @return int|false + */ + public function lt( $input, $test ) { + return intval( $input ) < intval( $test ) + ? $input + : false; + } + + /** + * Returns false. + * + * @return false + */ + public function no_match() { + return false; + } + + /** + * Uses a multi-string matching algorithm to search through $input for a number of given $words. + * + * @param string $input Input. + * @param string[] $words \AhoCorasick\MultiStringMatcher $matcher. + * @return string[]|false Returns the words that were found in $input, or FALSE if no words were found. + */ + public function pm( $input, $words ) { + $results = $this->get_multi_string_matcher( $words )->searchIn( $input ); + + return isset( $results[0] ) + ? array_map( + function ( $r ) { + return $r[1]; }, + $results + ) + : false; + } + + /** + * The last-used pattern-matching algorithm. + * + * @var array + */ + private $last_multi_string_matcher = array( null, null ); + + /** + * Creates a matcher that uses the Aho-Corasick algorithm to efficiently find a number of words in an input string. + * Caches the last-used matcher so that the same word list doesn't have to be compiled multiple times. + * + * @param string[] $words Words. + * @return \AhoCorasick\MultiStringMatcher + */ + private function get_multi_string_matcher( $words ) { + // only create a new matcher entity if we don't have one already for this word list. + if ( $this->last_multi_string_matcher[0] !== $words ) { + $this->last_multi_string_matcher = array( $words, new \AhoCorasick\MultiStringMatcher( $words ) ); + } + + return $this->last_multi_string_matcher[1]; + } + + /** + * Performs a regular expression match on the input subject using the given pattern. + * Returns false if the pattern does not match, or the substring(s) of the input + * that were matched by the pattern. + * + * @param string $subject Subject. + * @param string $pattern Pattern. + * @return string[]|false + */ + public function rx( $subject, $pattern ) { + $matched = preg_match( $pattern, $subject, $matches ); + return 1 === $matched + ? $matches + : false; + } + + /** + * Returns true if the given input string matches the test string. + * + * @param string $input Input. + * @param string $test Test. + * @return string|false + */ + public function streq( $input, $test ) { + return $input === $test + ? $test + : false; + } + + /** + * Returns true. + * + * @param string $input Input. + * @return bool + */ + public function unconditional_match( $input ) { + return $input; + } + + /** + * Checks to see if the input string only contains characters within the given byte range + * + * @param string $input Input. + * @param array $valid_range Valid range. + * @return string + */ + public function validate_byte_range( $input, $valid_range ) { + if ( '' === $input ) { + // an empty string is considered "valid". + return false; + } + $i = 0; + while ( isset( $input[ $i ] ) ) { + $n = ord( $input[ $i ] ); + if ( $n < $valid_range['min'] || $n > $valid_range['max'] ) { + return $input[ $i ]; + } + $valid = false; + foreach ( $valid_range['range'] as $b ) { + if ( $n === $b || is_array( $b ) && $n >= $b[0] && $n <= $b[1] ) { + $valid = true; + break; + } + } + if ( ! $valid ) { + return $input[ $i ]; + } + $i++; + } + + // if there weren't any invalid bytes, return false. + return false; + } + + /** + * Returns true if the input value is found anywhere inside the test value + * (i.e. the inverse of @contains) + * + * @param mixed $input Input. + * @param mixed $test Test. + * @return string|false + */ + public function within( $input, $test ) { + if ( '' === $input || '' === $test ) { + return false; + } + + return stripos( $test, $input ) !== false + ? $input + : false; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-request.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-request.php new file mode 100644 index 00000000..279fd84e --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-request.php @@ -0,0 +1,106 @@ +<?php +/** + * HTTP request representation specific for the WAF. + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +require_once __DIR__ . '/functions.php'; + +/** + * Request representation. + */ +class Waf_Request { + + /** + * Trusted proxies. + * + * @var array List of trusted proxy IP addresses. + */ + private $trusted_proxies = array(); + + /** + * Trusted headers. + * + * @var array List of headers to trust from the trusted proxies. + */ + private $trusted_headers = array(); + + /** + * Sets the list of IP addresses for the proxies to trust. Trusted headers will only be accepted as the + * user IP address from these IP adresses. + * + * Popular choices include: + * - 192.168.0.1 + * - 10.0.0.1 + * + * @param array $proxies List of proxy IP addresses. + * @return void + */ + public function set_trusted_proxies( $proxies ) { + $this->trusted_proxies = (array) $proxies; + } + + /** + * Sets the list of headers to be trusted from the proxies. These headers will only be taken into account + * if the request comes from a trusted proxy as configured with set_trusted_proxies(). + * + * Popular choices include: + * - HTTP_CLIENT_IP + * - HTTP_X_FORWARDED_FOR + * - HTTP_X_FORWARDED + * - HTTP_X_CLUSTER_CLIENT_IP + * - HTTP_FORWARDED_FOR + * - HTTP_FORWARDED + * + * @param array $headers List of HTTP header strings. + * @return void + */ + public function set_trusted_headers( $headers ) { + $this->trusted_headers = (array) $headers; + } + + /** + * Determines the users real IP address based on the settings passed to set_trusted_proxies() and + * set_trusted_headers() before. On CLI, this will be null. + * + * @return string|null + */ + public function get_real_user_ip_address() { + $remote_addr = ! empty( $_SERVER['REMOTE_ADDR'] ) ? wp_unslash( $_SERVER['REMOTE_ADDR'] ) : null; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + + if ( in_array( $remote_addr, $this->trusted_proxies, true ) ) { + $ip_by_header = $this->get_ip_by_header( array_merge( $this->trusted_headers, array( 'REMOTE_ADDR' ) ) ); + if ( ! empty( $ip_by_header ) ) { + return $ip_by_header; + } + } + + return $remote_addr; + } + + /** + * Iterates through a given list of HTTP headers and attempts to get the IP address from the header that + * a proxy sends along. Make sure you trust the IP address before calling this method. + * + * @param array $headers The list of headers to check. + * @return string|null + */ + private function get_ip_by_header( $headers ) { + foreach ( $headers as $key ) { + if ( isset( $_SERVER[ $key ] ) ) { + foreach ( explode( ',', wp_unslash( $_SERVER[ $key ] ) ) as $ip ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- filter_var is applied below. + $ip = trim( $ip ); + + if ( filter_var( $ip, FILTER_VALIDATE_IP ) !== false ) { + return $ip; + } + } + } + } + + return null; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-runner.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-runner.php new file mode 100644 index 00000000..389f8b2a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-runner.php @@ -0,0 +1,469 @@ +<?php +/** + * Entrypoint for actually executing the WAF. + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +use Automattic\Jetpack\Connection\Client; +use Automattic\Jetpack\Modules; +use Jetpack_Options; + +/** + * Executes the WAF. + */ +class Waf_Runner { + + const WAF_RULES_VERSION = '1.0.0'; + const MODE_OPTION_NAME = 'jetpack_waf_mode'; + const IP_LISTS_ENABLED_OPTION_NAME = 'jetpack_waf_ip_list'; + const IP_ALLOW_LIST_OPTION_NAME = 'jetpack_waf_ip_allow_list'; + const IP_BLOCK_LIST_OPTION_NAME = 'jetpack_waf_ip_block_list'; + const RULES_FILE = __DIR__ . '/../rules/rules.php'; + const ALLOW_IP_FILE = __DIR__ . '/../rules/allow-ip.php'; + const BLOCK_IP_FILE = __DIR__ . '/../rules/block-ip.php'; + const VERSION_OPTION_NAME = 'jetpack_waf_rules_version'; + const RULE_LAST_UPDATED_OPTION_NAME = 'jetpack_waf_last_updated_timestamp'; + const SHARE_DATA_OPTION_NAME = 'jetpack_waf_share_data'; + + /** + * Set the mode definition if it has not been set. + * + * @return void + */ + public static function define_mode() { + if ( ! defined( 'JETPACK_WAF_MODE' ) ) { + $mode_option = get_option( self::MODE_OPTION_NAME ); + define( 'JETPACK_WAF_MODE', $mode_option ); + } + } + + /** + * Set the mode definition if it has not been set. + * + * @return void + */ + public static function define_share_data() { + if ( ! defined( 'JETPACK_WAF_SHARE_DATA' ) ) { + $share_data_option = get_option( self::SHARE_DATA_OPTION_NAME, false ); + define( 'JETPACK_WAF_SHARE_DATA', $share_data_option ); + } + } + + /** + * Did the WAF run yet or not? + * + * @return bool + */ + public static function did_run() { + return defined( 'JETPACK_WAF_RUN' ); + } + + /** + * Determines if the passed $option is one of the allowed WAF operation modes. + * + * @param string $option The mode option. + * @return bool + */ + public static function is_allowed_mode( $option ) { + // Normal constants are defined prior to WP_CLI running causing problems for activation + if ( defined( 'WAF_CLI_MODE' ) ) { + $option = WAF_CLI_MODE; + } + + $allowed_modes = array( + 'normal', + 'silent', + ); + + return in_array( $option, $allowed_modes, true ); + } + + /** + * Determines if the WAF module is enabled on the site. + * + * @return bool + */ + public static function is_enabled() { + // if ABSPATH is defined, then WordPress has already been instantiated, + // so we can check to see if the waf module is activated. + if ( defined( 'ABSPATH' ) ) { + return ( new Modules() )->is_active( 'waf' ); + } + + return true; + } + + /** + * Runs the WAF and potentially stops the request if a problem is found. + * + * @return void + */ + public static function run() { + // Make double-sure we are only running once. + if ( self::did_run() ) { + return; + } + + Waf_Constants::initialize_constants(); + + // if ABSPATH is defined, then WordPress has already been instantiated, + // and we're running as a plugin (meh). Otherwise, we're running via something + // like PHP's prepend_file setting (yay!). + define( 'JETPACK_WAF_RUN', defined( 'ABSPATH' ) ? 'plugin' : 'preload' ); + + // if the WAF is being run before a command line script, don't try to execute rules (there's no request). + if ( PHP_SAPI === 'cli' ) { + return; + } + + // if something terrible happens during the WAF running, we don't want to interfere with the rest of the site, + // so we intercept errors ONLY while the WAF is running, then we remove our handler after the WAF finishes. + $display_errors = ini_get( 'display_errors' ); + // phpcs:ignore + ini_set( 'display_errors', 'Off' ); + // phpcs:ignore + set_error_handler( array( self::class, 'errorHandler' ) ); + + try { + + // phpcs:ignore + $waf = new Waf_Runtime( new Waf_Transforms(), new Waf_Operators() ); + + // execute waf rules. + // phpcs:ignore + include self::RULES_FILE; + } catch ( \Exception $err ) { // phpcs:ignore + // Intentionally doing nothing. + } + + // remove the custom error handler, so we don't interfere with the site. + restore_error_handler(); + // phpcs:ignore + ini_set( 'display_errors', $display_errors ); + } + + /** + * Error handler to be used while the WAF is being executed. + * + * @param int $code The error code. + * @param string $message The error message. + * @param string $file File with the error. + * @param string $line Line of the error. + * @return void + */ + public static function errorHandler( $code, $message, $file, $line ) { // phpcs:ignore + // Intentionally doing nothing for now. + } + + /** + * Initializes the WP filesystem. + * + * @return void + * @throws \Exception If filesystem is unavailable. + */ + public static function initialize_filesystem() { + if ( ! function_exists( '\\WP_Filesystem' ) ) { + require_once ABSPATH . 'wp-admin/includes/file.php'; + } + + if ( ! \WP_Filesystem() ) { + throw new \Exception( 'No filesystem available.' ); + } + } + + /** + * Activates the WAF by generating the rules script and setting the version + * + * @return void + */ + public static function activate() { + self::define_mode(); + if ( ! self::is_allowed_mode( JETPACK_WAF_MODE ) ) { + return; + } + $version = get_option( self::VERSION_OPTION_NAME ); + if ( ! $version ) { + add_option( self::VERSION_OPTION_NAME, self::WAF_RULES_VERSION ); + } + + add_option( self::SHARE_DATA_OPTION_NAME, true ); + + self::initialize_filesystem(); + self::create_waf_directory(); + self::generate_ip_rules(); + self::create_blocklog_table(); + self::generate_rules(); + } + + /** + * Created the waf directory on activation. + * + * @return void + * @throws \Exception In case there's a problem when creating the directory. + */ + public static function create_waf_directory() { + WP_Filesystem(); + Waf_Constants::initialize_constants(); + + global $wp_filesystem; + if ( ! $wp_filesystem ) { + throw new \Exception( 'Can not work without the file system being initialized.' ); + } + + if ( ! $wp_filesystem->is_dir( JETPACK_WAF_DIR ) ) { + if ( ! $wp_filesystem->mkdir( JETPACK_WAF_DIR ) ) { + throw new \Exception( 'Failed creating WAF standalone bootstrap file directory: ' . JETPACK_WAF_DIR ); + } + } + } + + /** + * Create the log table when plugin is activated. + * + * @return void + */ + public static function create_blocklog_table() { + global $wpdb; + + require_once ABSPATH . 'wp-admin/includes/upgrade.php'; + + $sql = " + CREATE TABLE {$wpdb->prefix}jetpack_waf_blocklog ( + log_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + timestamp datetime NOT NULL, + rule_id BIGINT NOT NULL, + reason longtext NOT NULL, + PRIMARY KEY (log_id), + KEY timestamp (timestamp) + ) + "; + + dbDelta( $sql ); + } + + /** + * Deactivates the WAF by deleting the relevant options and emptying rules file. + * + * @return void + * @throws \Exception If file writing fails. + */ + public static function deactivate() { + delete_option( self::MODE_OPTION_NAME ); + delete_option( self::VERSION_OPTION_NAME ); + + global $wp_filesystem; + + self::initialize_filesystem(); + + if ( ! $wp_filesystem->put_contents( self::RULES_FILE, "<?php\n" ) ) { + throw new \Exception( 'Failed to empty rules.php file.' ); + } + } + + /** + * Tries periodically to update the rules using our API. + * + * @return void + */ + public static function update_rules_cron() { + self::define_mode(); + if ( ! self::is_allowed_mode( JETPACK_WAF_MODE ) ) { + return; + } + + self::generate_rules(); + update_option( self::RULE_LAST_UPDATED_OPTION_NAME, time() ); + } + + /** + * Updates the rule set if rules version has changed + * + * @return void + */ + public static function update_rules_if_changed() { + self::define_mode(); + if ( ! self::is_allowed_mode( JETPACK_WAF_MODE ) ) { + return; + } + $version = get_option( self::VERSION_OPTION_NAME ); + if ( self::WAF_RULES_VERSION !== $version ) { + update_option( self::VERSION_OPTION_NAME, self::WAF_RULES_VERSION ); + self::generate_rules(); + } + } + + /** + * Retrieve rules from the API + * + * @throws \Exception If site is not registered. + * @throws \Exception If API did not respond 200. + * @throws \Exception If data is missing from response. + * @return array + */ + public static function get_rules_from_api() { + $blog_id = Jetpack_Options::get_option( 'id' ); + if ( ! $blog_id ) { + throw new \Exception( 'Site is not registered' ); + } + + $response = Client::wpcom_json_api_request_as_blog( + sprintf( '/sites/%s/waf-rules', $blog_id ), + '2', + array(), + null, + 'wpcom' + ); + + $response_code = wp_remote_retrieve_response_code( $response ); + + if ( 200 !== $response_code ) { + throw new \Exception( 'API connection failed.', $response_code ); + } + + $rules_json = wp_remote_retrieve_body( $response ); + $rules = json_decode( $rules_json, true ); + + if ( empty( $rules['data'] ) ) { + throw new \Exception( 'Data missing from response.' ); + } + + return $rules['data']; + } + + /** + * Generates the rules.php script + * + * @throws \Exception If file writing fails. + * @return void + */ + public static function generate_rules() { + /** + * WordPress filesystem abstraction. + * + * @var \WP_Filesystem_Base $wp_filesystem + */ + global $wp_filesystem; + + self::initialize_filesystem(); + + $api_exception = null; + $throw_api_exception = true; + try { + $rules = self::get_rules_from_api(); + } catch ( \Exception $e ) { + if ( 401 === $e->getCode() ) { + // do not throw API exceptions for users who do not have access + $throw_api_exception = false; + } + + if ( $wp_filesystem->exists( self::RULES_FILE ) && $throw_api_exception ) { + throw $e; + } + + $rules = "<?php\n"; + $api_exception = $e; + } + + // Ensure that the folder exists. + if ( ! $wp_filesystem->is_dir( dirname( self::RULES_FILE ) ) ) { + $wp_filesystem->mkdir( dirname( self::RULES_FILE ) ); + } + + $ip_allow_rules = self::ALLOW_IP_FILE; + $ip_block_rules = self::BLOCK_IP_FILE; + + $ip_list_code = "if ( require('$ip_allow_rules') ) { return; }\n" . + "if ( require('$ip_block_rules') ) { return \$waf->block('block', -1, 'ip block list'); }\n"; + + $rules_divided_by_line = explode( "\n", $rules ); + array_splice( $rules_divided_by_line, 1, 0, $ip_list_code ); + + $rules = implode( "\n", $rules_divided_by_line ); + + if ( ! $wp_filesystem->put_contents( self::RULES_FILE, $rules ) ) { + throw new \Exception( 'Failed writing rules file to: ' . self::RULES_FILE ); + } + + if ( null !== $api_exception && $throw_api_exception ) { + throw $api_exception; + } + } + + /** + * We allow for both, one IP per line or comma-; semicolon; or whitespace-separated lists. This also validates the IP addresses + * and only returns the ones that look valid. + * + * @param string $ips List of ips - example: "8.8.8.8\n4.4.4.4,2.2.2.2;1.1.1.1 9.9.9.9,5555.5555.5555.5555". + * @return array List of valid IP addresses. - example based on input example: array('8.8.8.8', '4.4.4.4', '2.2.2.2', '1.1.1.1', '9.9.9.9') + */ + private static function ip_option_to_array( $ips ) { + $ips = (string) $ips; + $ips = preg_split( '/[\s,;]/', $ips ); + + $result = array(); + + foreach ( $ips as $ip ) { + if ( filter_var( $ip, FILTER_VALIDATE_IP ) !== false ) { + $result[] = $ip; + } + } + + return $result; + } + + /** + * Generates the rules.php script + * + * @throws \Exception If filesystem is not available. + * @throws \Exception If file writing fails. + * @return void + */ + public static function generate_ip_rules() { + /** + * WordPress filesystem abstraction. + * + * @var \WP_Filesystem_Base $wp_filesystem + */ + global $wp_filesystem; + + self::initialize_filesystem(); + + // Ensure that the folder exists. + if ( ! $wp_filesystem->is_dir( dirname( self::RULES_FILE ) ) ) { + $wp_filesystem->mkdir( dirname( self::RULES_FILE ) ); + } + + $allow_list = self::ip_option_to_array( get_option( self::IP_ALLOW_LIST_OPTION_NAME ) ); + $block_list = self::ip_option_to_array( get_option( self::IP_BLOCK_LIST_OPTION_NAME ) ); + + $lists_enabled = (bool) get_option( self::IP_LISTS_ENABLED_OPTION_NAME ); + if ( false === $lists_enabled ) { + // Making the lists empty effectively disabled the feature while still keeping the other WAF rules evaluation active. + $allow_list = array(); + $block_list = array(); + } + + $allow_rules_content = ''; + // phpcs:disable WordPress.PHP.DevelopmentFunctions + $allow_rules_content .= '$waf_allow_list = ' . var_export( $allow_list, true ) . ";\n"; + // phpcs:enable + $allow_rules_content .= 'return $waf->is_ip_in_array( $waf_allow_list );' . "\n"; + + if ( ! $wp_filesystem->put_contents( self::ALLOW_IP_FILE, "<?php\n$allow_rules_content" ) ) { + throw new \Exception( 'Failed writing allow list file to: ' . self::ALLOW_IP_FILE ); + } + + $block_rules_content = ''; + // phpcs:disable WordPress.PHP.DevelopmentFunctions + $block_rules_content .= '$waf_block_list = ' . var_export( $block_list, true ) . ";\n"; + // phpcs:enable + $block_rules_content .= 'return $waf->is_ip_in_array( $waf_block_list );' . "\n"; + + if ( ! $wp_filesystem->put_contents( self::BLOCK_IP_FILE, "<?php\n$block_rules_content" ) ) { + throw new \Exception( 'Failed writing block list file to: ' . self::BLOCK_IP_FILE ); + } + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-runtime.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-runtime.php new file mode 100644 index 00000000..19206821 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-runtime.php @@ -0,0 +1,794 @@ +<?php +/** + * Runtime for Jetpack Waf + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +require_once __DIR__ . '/functions.php'; + +// phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This class is all about sanitizing input. + +/** + * The environment variable that defined the WAF running mode. + * + * @var string JETPACK_WAF_MODE + */ + +/** + * Waf_Runtime class + */ +class Waf_Runtime { + + /** + * Last rule. + * + * @var string + */ + public $last_rule = ''; + /** + * Matched vars. + * + * @var array + */ + public $matched_vars = array(); + /** + * Matched var. + * + * @var string + */ + public $matched_var = ''; + /** + * Matched var names. + * + * @var array + */ + public $matched_var_names = array(); + /** + * Matched var name. + * + * @var string + */ + public $matched_var_name = ''; + + /** + * State. + * + * @var array + */ + private $state = array(); + /** + * Metadata. + * + * @var array + */ + private $metadata = array(); + + /** + * Transforms. + * + * @var Waf_Transforms[] + */ + private $transforms; + /** + * Operators. + * + * @var Waf_Operators[] + */ + private $operators; + + /** + * Rules to remove. + * + * @var array[] + */ + private $rules_to_remove = array( + 'id' => array(), + 'tag' => array(), + ); + + /** + * Targets to remove. + * + * @var array[] + */ + private $targets_to_remove = array( + 'id' => array(), + 'tag' => array(), + ); + + /** + * Constructor method. + * + * @param Waf_Transforms $transforms Transforms. + * @param Waf_Operators $operators Operators. + */ + public function __construct( $transforms, $operators ) { + $this->transforms = $transforms; + $this->operators = $operators; + } + + /** + * Rule removed method. + * + * @param string $id Ids. + * @param string[] $tags Tags. + */ + public function rule_removed( $id, $tags ) { + if ( isset( $this->rules_to_remove['id'][ $id ] ) ) { + return true; + } + foreach ( $tags as $tag ) { + if ( isset( $this->rules_to_remove['tag'][ $tag ] ) ) { + return true; + } + } + return false; + } + + /** + * Update Targets. + * + * @param array $targets Targets. + * @param string $rule_id Rule id. + * @param string[] $rule_tags Rule tags. + */ + public function update_targets( $targets, $rule_id, $rule_tags ) { + $updates = array(); + // look for target updates based on the rule's ID. + if ( isset( $this->targets_to_remove['id'][ $rule_id ] ) ) { + foreach ( $this->targets_to_remove['id'][ $rule_id ] as $name => $props ) { + $updates[] = array( $name, $props ); + } + } + // look for target updates based on the rule's tags. + foreach ( $rule_tags as $tag ) { + if ( isset( $this->targets_to_remove['tag'][ $tag ] ) ) { + foreach ( $this->targets_to_remove['tag'][ $tag ] as $name => $props ) { + $updates[] = array( $name, $props ); + } + } + } + // apply any found target updates. + + foreach ( $updates as list( $name, $props ) ) { + if ( isset( $targets[ $name ] ) ) { + // we only need to remove targets that exist. + if ( true === $props ) { + // if the entire target is being removed, remove it. + unset( $targets[ $name ] ); + } else { + // otherwise just mark single props to ignore. + $targets[ $name ]['except'] = array_merge( + isset( $targets[ $name ]['except'] ) ? $targets[ $name ]['except'] : array(), + $props + ); + } + } + } + return $targets; + } + + /** + * Return TRUE if at least one of the targets matches the rule. + * + * @param string[] $transforms One of the transform methods defined in the Jetpack Waf_Transforms class. + * @param mixed $targets Targets. + * @param string $match_operator Match operator. + * @param mixed $match_value Match value. + * @param bool $match_not Match not. + * @param bool $capture Capture. + * @return bool + */ + public function match_targets( $transforms, $targets, $match_operator, $match_value, $match_not, $capture = false ) { + $this->matched_vars = array(); + $this->matched_var_names = array(); + $this->matched_var = ''; + $this->matched_var_name = ''; + $match_found = false; + + // get values. + $values = $this->normalize_targets( $targets ); + + // apply transforms. + foreach ( $transforms as $t ) { + foreach ( $values as &$v ) { + $v['value'] = $this->transforms->$t( $v['value'] ); + } + } + + // pass each target value to the operator to find any that match. + $matched = array(); + $captures = array(); + foreach ( $values as $v ) { + $match = $this->operators->{$match_operator}( $v['value'], $match_value ); + $did_match = false !== $match; + if ( $match_not !== $did_match ) { + // If either: + // - rule is negated ("not" flag set) and the target was not matched + // - rule not negated and the target was matched + // then this is considered a match. + $match_found = true; + $this->matched_var_names[] = $v['source']; + $this->matched_vars[] = $v['value']; + $this->matched_var_name = end( $this->matched_var_names ); + $this->matched_var = end( $this->matched_vars ); + $matched[] = array( $v, $match ); + // Set any captured matches into state if the rule has the "capture" flag. + if ( $capture ) { + $captures = is_array( $match ) ? $match : array( $match ); + foreach ( array_slice( $captures, 0, 10 ) as $i => $c ) { + $this->set_var( "tx.$i", $c ); + } + } + } + } + + return $match_found; + } + + /** + * Block. + * + * @param string $action Action. + * @param string $rule_id Rule id. + * @param string $reason Block reason. + * @param int $status_code Http status code. + */ + public function block( $action, $rule_id, $reason, $status_code = 403 ) { + if ( ! $reason ) { + $reason = "rule $rule_id"; + } else { + $reason = $this->sanitize_output( $reason ); + } + + $this->write_blocklog( $rule_id, $reason ); + error_log( "Jetpack WAF Blocked Request\t$action\t$rule_id\t$status_code\t$reason" ); + header( "X-JetpackWAF-Blocked: $status_code - rule $rule_id" ); + if ( defined( 'JETPACK_WAF_MODE' ) && 'normal' === JETPACK_WAF_MODE ) { + $protocol = isset( $_SERVER['SERVER_PROTOCOL'] ) ? wp_unslash( $_SERVER['SERVER_PROTOCOL'] ) : 'HTTP'; + header( $protocol . ' 403 Forbidden', true, $status_code ); + die( "rule $rule_id - reason $reason" ); + } + } + + /** + * Write block logs. We won't write to the file if it exceeds 100 mb. + * + * @param string $rule_id Rule id. + * @param string $reason Block reason. + */ + public function write_blocklog( $rule_id, $reason ) { + $log_data = array(); + $log_data['rule_id'] = $rule_id; + $log_data['reason'] = $reason; + $log_data['timestamp'] = gmdate( 'Y-m-d H:i:s' ); + + if ( defined( 'JETPACK_WAF_SHARE_DATA' ) && JETPACK_WAF_SHARE_DATA ) { + $file_path = JETPACK_WAF_DIR . '/waf-blocklog'; + $file_exists = file_exists( $file_path ); + + if ( ! $file_exists || filesize( $file_path ) < ( 100 * 1024 * 1024 ) ) { + $fp = fopen( $file_path, 'a+' ); + + if ( $fp ) { + try { + fwrite( $fp, json_encode( $log_data ) . "\n" ); + } finally { + fclose( $fp ); + } + } + } + } + + $this->write_blocklog_row( $log_data ); + } + + /** + * Write block logs to database. + * + * @param array $log_data Log data. + */ + private function write_blocklog_row( $log_data ) { + $conn = $this->connect_to_wordpress_db(); + + if ( ! $conn ) { + return; + } + + global $table_prefix; + + $statement = $conn->prepare( "INSERT INTO {$table_prefix}jetpack_waf_blocklog(reason,rule_id, timestamp) VALUES (?, ?, ?)" ); + if ( false !== $statement ) { + $statement->bind_param( 'sis', $log_data['reason'], $log_data['rule_id'], $log_data['timestamp'] ); + $statement->execute(); + + if ( $conn->insert_id > 100 ) { + $conn->query( "DELETE FROM {$table_prefix}jetpack_waf_blocklog ORDER BY log_id LIMIT 1" ); + } + } + } + + /** + * Connect to WordPress database. + */ + private function connect_to_wordpress_db() { + if ( ! file_exists( JETPACK_WAF_WPCONFIG ) ) { + return; + } + + require_once JETPACK_WAF_WPCONFIG; + $conn = new \mysqli( DB_HOST, DB_USER, DB_PASSWORD, DB_NAME ); // phpcs:ignore WordPress.DB.RestrictedClasses.mysql__mysqli + + if ( $conn->connect_error ) { + error_log( 'Could not connect to the database:' . $conn->connect_error ); + return null; + } + + return $conn; + } + + /** + * Redirect. + * + * @param string $rule_id Rule id. + * @param string $url Url. + */ + public function redirect( $rule_id, $url ) { + error_log( "Jetpack WAF Redirected Request.\tRule:$rule_id\t$url" ); + header( "Location: $url" ); + exit; + } + + /** + * Flag rule for removal. + * + * @param string $prop Prop. + * @param string $value Value. + */ + public function flag_rule_for_removal( $prop, $value ) { + if ( 'id' === $prop ) { + $this->rules_to_remove['id'][ $value ] = true; + } else { + $this->rules_to_remove['tag'][ $value ] = true; + } + } + + /** + * Flag target for removal. + * + * @param string $id_or_tag Id or tag. + * @param string $id_or_tag_value Id or tag value. + * @param string $name Name. + * @param string $prop Prop. + */ + public function flag_target_for_removal( $id_or_tag, $id_or_tag_value, $name, $prop = null ) { + if ( null === $prop ) { + $this->targets_to_remove[ $id_or_tag ][ $id_or_tag_value ][ $name ] = true; + } else { + if ( + ! isset( $this->targets_to_remove[ $id_or_tag ][ $id_or_tag_value ][ $name ] ) + // if the entire target is already being removed then it would be redundant to remove a single property. + || true !== $this->targets_to_remove[ $id_or_tag ][ $id_or_tag_value ][ $name ] + ) { + $this->targets_to_remove[ $id_or_tag ][ $id_or_tag_value ][ $name ][] = $prop; + } + } + } + + /** + * Get variable value. + * + * @param string $key Key. + */ + public function get_var( $key ) { + return isset( $this->state[ $key ] ) + ? $this->state[ $key ] + : ''; + } + + /** + * Set variable value. + * + * @param string $key Key. + * @param string $value Value. + */ + public function set_var( $key, $value ) { + $this->state[ $key ] = $value; + } + + /** + * Increment variable. + * + * @param string $key Key. + * @param mixed $value Value. + */ + public function inc_var( $key, $value ) { + if ( ! isset( $this->state[ $key ] ) ) { + $this->state[ $key ] = 0; + } + $this->state[ $key ] += floatval( $value ); + } + + /** + * Decrement variable. + * + * @param string $key Key. + * @param mixed $value Value. + */ + public function dec_var( $key, $value ) { + if ( ! isset( $this->state[ $key ] ) ) { + $this->state[ $key ] = 0; + } + $this->state[ $key ] -= floatval( $value ); + } + + /** + * Unset variable. + * + * @param string $key Key. + */ + public function unset_var( $key ) { + unset( $this->state[ $key ] ); + } + + /** + * Meta. + * + * @param string $key Key. + * @param string $prop Prop. + */ + public function meta( $key, $prop = false ) { + if ( ! isset( $this->metadata[ $key ] ) ) { + $value = null; + switch ( $key ) { + case 'headers': + $value = array(); + foreach ( $_SERVER as $k => $v ) { + $k = strtolower( $k ); + if ( 'http_' === substr( $k, 0, 5 ) ) { + $value[ $this->normalize_header_name( substr( $k, 5 ) ) ] = $v; + } elseif ( 'content_type' === $k ) { + $value['content-type'] = $v; + } elseif ( 'content_length' === $k ) { + $value['content-length'] = $v; + } + } + $value['content-type'] = ( ! isset( $value['content-type'] ) || '' === $value['content-type'] ) + // default Content-Type per RFC 7231 section 3.1.5.5. + ? 'application/octet-stream' + : $value['content-type']; + $value['content-length'] = ( isset( $value['content-length'] ) && '' !== $value['content-length'] ) + ? $value['content-length'] + // if the content-length header is missing, default it to zero. + : '0'; + break; + case 'remote_addr': + $value = ''; + if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { + $value = wp_unslash( $_SERVER['HTTP_CLIENT_IP'] ); + } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { + $value = wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ); + } elseif ( ! empty( $_SERVER['REMOTE_ADDR'] ) ) { + $value = wp_unslash( $_SERVER['REMOTE_ADDR'] ); + } + break; + case 'request_method': + $value = empty( $_SERVER['REQUEST_METHOD'] ) + ? 'GET' + : wp_unslash( $_SERVER['REQUEST_METHOD'] ); + break; + case 'request_protocol': + $value = empty( $_SERVER['SERVER_PROTOCOL'] ) + ? ( empty( $_SERVER['HTTPS'] ) ? 'HTTP' : 'HTTPS' ) + : wp_unslash( $_SERVER['SERVER_PROTOCOL'] ); + break; + case 'request_uri': + $value = isset( $_SERVER['REQUEST_URI'] ) + ? wp_unslash( $_SERVER['REQUEST_URI'] ) + : ''; + break; + case 'request_uri_raw': + $value = ( isset( $_SERVER['https'] ) ? 'https://' : 'http://' ) . ( isset( $_SERVER['SERVER_NAME'] ) ? wp_unslash( $_SERVER['SERVER_NAME'] ) : '' ) . $this->meta( 'request_uri' ); + break; + case 'request_filename': + $value = strtok( + isset( $_SERVER['REQUEST_URI'] ) + ? wp_unslash( $_SERVER['REQUEST_URI'] ) + : '', + '?' + ); + break; + case 'request_line': + $value = sprintf( + '%s %s %s', + $this->meta( 'request_method' ), + $this->meta( 'request_uri' ), + $this->meta( 'request_protocol' ) + ); + break; + case 'request_basename': + $value = basename( $this->meta( 'request_filename' ) ); + break; + case 'request_body': + $value = file_get_contents( 'php://input' ); + break; + case 'query_string': + $value = isset( $_SERVER['QUERY_STRING'] ) ? wp_unslash( $_SERVER['QUERY_STRING'] ) : ''; + } + $this->metadata[ $key ] = $value; + } + + return false === $prop + ? $this->metadata[ $key ] + : ( isset( $this->metadata[ $key ][ $prop ] ) ? $this->metadata[ $key ][ $prop ] : '' ); + } + + /** + * State values. + * + * @param string $prefix Prefix. + */ + private function state_values( $prefix ) { + $output = array(); + $len = strlen( $prefix ); + foreach ( $this->state as $k => $v ) { + if ( 0 === stripos( $k, $prefix ) ) { + $output[ substr( $k, $len ) ] = $v; + } + } + + return $output; + } + + /** + * Change a string to all lowercase and replace spaces and underscores with dashes. + * + * @param string $name Name. + * @return string + */ + public function normalize_header_name( $name ) { + return str_replace( array( ' ', '_' ), '-', strtolower( $name ) ); + } + + /** + * Normalize targets. + * + * @param array $targets Targets. + */ + public function normalize_targets( $targets ) { + $return = array(); + foreach ( $targets as $k => $v ) { + $count_only = isset( $v['count'] ); + $only = isset( $v['only'] ) ? $v['only'] : array(); + $except = isset( $v['except'] ) ? $v['except'] : array(); + $_k = strtolower( $k ); + switch ( $_k ) { + case 'request_headers': + $only = array_map( + function ( $t ) { + return '/' === $t[0] ? $t : $this->normalize_header_name( $t ); + }, + $only + ); + $except = array_map( + function ( $t ) { + return '/' === $t[0] ? $t : $this->normalize_header_name( $t ); + }, + $except + ); + $this->normalize_array_target( $this->meta( 'headers' ), $only, $except, $k, $return, $count_only ); + continue 2; + case 'request_headers_names': + $this->normalize_array_target( array_keys( $this->meta( 'headers' ) ), array(), array(), $k, $return, $count_only ); + continue 2; + case 'request_method': + case 'request_protocol': + case 'request_uri': + case 'request_uri_raw': + case 'request_filename': + case 'remote_addr': + case 'request_basename': + case 'request_body': + case 'query_string': + case 'request_line': + $v = $this->meta( $_k ); + break; + case 'tx': + case 'ip': + $this->normalize_array_target( $this->state_values( "$k." ), $only, $except, $k, $return, $count_only ); + continue 2; + case 'request_cookies': + $this->normalize_array_target( $_COOKIE, $only, $except, $k, $return, $count_only ); + continue 2; + case 'request_cookies_names': + $this->normalize_array_target( array_keys( $_COOKIE ), array(), array(), $k, $return, $count_only ); + continue 2; + case 'args': + $this->normalize_array_target( $_REQUEST, $only, $except, $k, $return, $count_only ); + continue 2; + case 'args_names': + $this->normalize_array_target( array_keys( $_REQUEST ), array(), array(), $k, $return, $count_only ); + continue 2; + case 'args_get': + $this->normalize_array_target( $_GET, $only, $except, $k, $return, $count_only ); + continue 2; + case 'args_get_names': + $this->normalize_array_target( array_keys( $_GET ), array(), array(), $k, $return, $count_only ); + continue 2; + case 'args_post': + $this->normalize_array_target( $_POST, $only, $except, $k, $return, $count_only ); + continue 2; + case 'args_post_names': + $this->normalize_array_target( array_keys( $_POST ), array(), array(), $k, $return, $count_only ); + continue 2; + case 'files': + $names = array_map( + function ( $f ) { + return $f['name']; + }, + $_FILES + ); + $this->normalize_array_target( $names, $only, $except, $k, $return, $count_only ); + continue 2; + case 'files_names': + $this->normalize_array_target( array_keys( $_FILES ), $only, $except, $k, $return, $count_only ); + continue 2; + default: + var_dump( 'Unknown target', $k, $v ); + exit; + } + $return[] = array( + 'name' => $k, + 'value' => $v, + 'source' => $k, + ); + } + + return $return; + } + + /** + * Verifies is ip from request is in an array. + * + * @param array $array Array to verify ip against. + */ + public function is_ip_in_array( $array ) { + $request = new Waf_Request(); + + $real_ip = $request->get_real_user_ip_address(); + + return in_array( $real_ip, $array, true ); + } + + /** + * Normalize array target. + * + * @param array $source Source. + * @param array $only Only. + * @param array $excl Excl. + * @param string $name Name. + * @param array $results Results. + * @param bool $count_only Count only. + */ + private function normalize_array_target( $source, $only, $excl, $name, &$results, $count_only ) { + $output = array(); + $has_only = isset( $only[0] ); + $has_excl = isset( $excl[0] ); + + if ( $has_only ) { + foreach ( $only as $prop ) { + if ( isset( $source[ $prop ] ) && $this->key_matches( $prop, $only ) ) { + $output[ $prop ] = $source[ $prop ]; + } + } + } else { + $output = $source; + } + + if ( $has_excl ) { + foreach ( array_keys( $output ) as $k ) { + if ( $this->key_matches( $k, $excl ) ) { + unset( $output[ $k ] ); + } + } + } + + if ( $count_only ) { + $results[] = array( + 'name' => $name, + 'value' => count( $output ), + 'source' => '&' . $name, + ); + } else { + foreach ( $output as $tk => $tv ) { + if ( is_array( $tv ) ) { + // flatten it so we get all the values considered + $flat_values = $this->array_flatten( $tv ); + foreach ( $flat_values as $fv ) { + $results[] = array( + // force names to strings + // we don't care about the nested keys here, just the overall variable name + 'name' => '' . $tk, + 'value' => $fv, + 'source' => "$name:$tk", + ); + } + } else { + $results[] = array( + // force names to strings + 'name' => '' . $tk, + 'value' => $tv, + 'source' => "$name:$tk", + ); + } + } + } + + return $results; + } + + /** + * Basic array flatten with array_merge; no-op on non-array targets. + * + * @param array $source Array to flatten. + * @return array The flattened array. + */ + private function array_flatten( $source ) { + if ( ! is_array( $source ) ) { + return $source; + } + + $return = array(); + + foreach ( $source as $v ) { + if ( is_array( $v ) ) { + $return = array_merge( $return, $this->array_flatten( $v ) ); + } else { + $return[] = $v; + } + } + + return $return; + } + + /** + * Key matches. + * + * @param string $input Input. + * @param array $patterns Patterns. + */ + private function key_matches( $input, $patterns ) { + foreach ( $patterns as $p ) { + if ( '/' === $p[0] ) { + if ( 1 === preg_match( $p, $input ) ) { + return true; + } + } else { + if ( 0 === strcasecmp( $p, $input ) ) { + return true; + } + } + } + + return false; + } + + /** + * Sanitize output generated from the request that was blocked. + * + * @param string $output Output to sanitize. + */ + public function sanitize_output( $output ) { + $url_decoded_output = rawurldecode( $output ); + $html_entities_output = htmlentities( $url_decoded_output, ENT_QUOTES, 'UTF-8' ); + // @phpcs:disable Squiz.Strings.DoubleQuoteUsage.NotRequired + $escapers = array( "\\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c" ); + $replacements = array( "\\\\", "\\/", "\\\"", "\\n", "\\r", "\\t", "\\f", "\\b" ); + // @phpcs:enable Squiz.Strings.DoubleQuoteUsage.NotRequired + + return( str_replace( $escapers, $replacements, $html_entities_output ) ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-standalone-bootstrap.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-standalone-bootstrap.php new file mode 100644 index 00000000..26e8f053 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-standalone-bootstrap.php @@ -0,0 +1,160 @@ +<?php +/** + * Handles generation and deletion of the bootstrap for the standalone WAF mode. + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +use Composer\InstalledVersions; +use Exception; + +/** + * Handles the bootstrap. + */ +class Waf_Standalone_Bootstrap { + + /** + * Ensures that constants are initialized if this class is used. + */ + public function __construct() { + $this->guard_against_missing_abspath(); + $this->initialize_constants(); + } + + /** + * Ensures that this class is not used unless we are in the right context. + * + * @return void + * @throws Exception If we are outside of WordPress. + */ + private function guard_against_missing_abspath() { + + if ( ! defined( 'ABSPATH' ) ) { + throw new Exception( 'Cannot generate the WAF bootstrap if we are not running in WordPress context.' ); + } + } + + /** + * Initializes the constants required for generating the bootstrap, if they have not been initialized yet. + * + * @return void + */ + private function initialize_constants() { + Waf_Constants::initialize_constants(); + } + + /** + * Initialized the WP filesystem and serves as a mocking hook for tests. + * + * @return void + */ + protected function initialize_filesystem() { + if ( ! function_exists( '\\WP_Filesystem' ) ) { + require_once ABSPATH . 'wp-admin/includes/file.php'; + } + + WP_Filesystem(); + } + + /** + * Finds the path to the autoloader, which can then be used to require the autoloader in the generated boostrap file. + * + * @return string|null + * @throws Exception In case the autoloader file can not be found. + */ + private function locate_autoloader_file() { + global $jetpack_autoloader_loader; + + $autoload_file = null; + + // Try the Jetpack autoloader. + if ( isset( $jetpack_autoloader_loader ) ) { + $class_file = $jetpack_autoloader_loader->find_class_file( Waf_Runner::class ); + if ( $class_file ) { + $autoload_file = dirname( dirname( dirname( dirname( dirname( $class_file ) ) ) ) ) . '/vendor/autoload.php'; + } + } + + // Try Composer's autoloader. + if ( null === $autoload_file + && is_callable( array( InstalledVersions::class, 'getInstallPath' ) ) + && InstalledVersions::isInstalled( 'automattic/jetpack-waf' ) + ) { + $package_file = InstalledVersions::getInstallPath( 'automattic/jetpack-waf' ); + if ( substr( $package_file, -23 ) === '/automattic/jetpack-waf' ) { + $autoload_file = dirname( dirname( dirname( $package_file ) ) ) . '/vendor/autoload.php'; + } + } + + // Guess. First look for being in a `vendor/automattic/jetpack-waf/src/', then see if we're standalone with our own vendor dir. + if ( null === $autoload_file ) { + $autoload_file = dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) . '/vendor/autoload.php'; + if ( ! file_exists( $autoload_file ) ) { + $autoload_file = dirname( __DIR__ ) . '/vendor/autoload.php'; + } + } + + // Check that the determined file actually exists. + if ( ! file_exists( $autoload_file ) ) { + throw new Exception( 'Can not find autoloader, and the WAF standalone boostrap will not work without it.' ); + } + + return $autoload_file; + } + + /** + * Gets the path to the bootstrap.php file. + * + * @return string The bootstrap.php file path. + */ + public function get_bootstrap_file_path() { + return trailingslashit( JETPACK_WAF_DIR ) . 'bootstrap.php'; + } + + /** + * Generates the bootstrap file. + * + * @return string Absolute path to the bootstrap file. + * @throws Exception In case the file can not be written. + */ + public function generate() { + + $this->initialize_filesystem(); + + global $wp_filesystem; + if ( ! $wp_filesystem ) { + throw new Exception( 'Can not work without the file system being initialized.' ); + } + + $bootstrap_file = $this->get_bootstrap_file_path(); + $mode_option = get_option( Waf_Runner::MODE_OPTION_NAME, false ); + $share_data_option = get_option( Waf_Runner::SHARE_DATA_OPTION_NAME, false ); + + // phpcs:disable WordPress.PHP.DevelopmentFunctions + $code = "<?php\n" + . sprintf( "define( 'DISABLE_JETPACK_WAF', %s );\n", var_export( defined( 'DISABLE_JETPACK_WAF' ) && DISABLE_JETPACK_WAF, true ) ) + . "if ( defined( 'DISABLE_JETPACK_WAF' ) && DISABLE_JETPACK_WAF ) return;\n" + . sprintf( "define( 'JETPACK_WAF_MODE', %s );\n", var_export( $mode_option ? $mode_option : 'silent', true ) ) + . sprintf( "define( 'JETPACK_WAF_SHARE_DATA', %s );\n", var_export( $share_data_option, true ) ) + . sprintf( "define( 'JETPACK_WAF_DIR', %s );\n", var_export( JETPACK_WAF_DIR, true ) ) + . sprintf( "define( 'JETPACK_WAF_WPCONFIG', %s );\n", var_export( JETPACK_WAF_WPCONFIG, true ) ) + . 'require_once ' . var_export( $this->locate_autoloader_file(), true ) . ";\n" + . 'include ' . var_export( dirname( __DIR__ ) . '/run.php', true ) . ";\n"; + // phpcs:enable + + if ( ! $wp_filesystem->is_dir( JETPACK_WAF_DIR ) ) { + if ( ! $wp_filesystem->mkdir( JETPACK_WAF_DIR ) ) { + throw new Exception( 'Failed creating WAF standalone bootstrap file directory: ' . JETPACK_WAF_DIR ); + } + } + + if ( ! $wp_filesystem->put_contents( $bootstrap_file, $code ) ) { + throw new Exception( 'Failed writing WAF standalone bootstrap file to: ' . $bootstrap_file ); + } + + return $bootstrap_file; + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-transforms.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-transforms.php new file mode 100644 index 00000000..a559394f --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-transforms.php @@ -0,0 +1,342 @@ +<?php +/** + * Transforms for Jetpack Waf + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +/** + * Waf_Transforms class + */ +class Waf_Transforms { + /** + * Decode a Base64-encoded string. + * + * @param string $value value to be decoded. + * @return string + */ + public function base64_decode( $value ) { + return base64_decode( $value ); + } + + /** + * Remove all characters that might escape a command line command + * + * @see https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual-%28v2.x%29#cmdLine + * @param string $value value to be escaped. + * @return string + */ + public function cmd_line( $value ) { + return strtolower( + preg_replace( + '/\s+/', + ' ', + str_replace( + array( ',', ';' ), + ' ', + preg_replace( + '/\s+(?=[\/\(])/', + '', + str_replace( + array( '^', "'", '"', '\\' ), + '', + $value + ) + ) + ) + ) + ); + } + + /** + * Decode a SQL hex string. + * + * @example 414243 decodes to "ABC" + * @param string $value value to be decoded. + * @return string + */ + public function sql_hex_decode( $value ) { + return preg_replace_callback( + '/0x[a-f0-9]+/i', + function ( $matches ) { + $str = substr( $matches[0], 2 ); + if ( 0 !== strlen( $str ) % 2 ) { + $str = '0' . $str; + } + return hex2bin( $str ); + }, + $value + ); + } + + /** + * Encode a string using Base64 encoding. + * + * @param string $value value to be decoded. + * @return string + */ + public function base64_encode( $value ) { + return base64_encode( $value ); + } + + /** + * Convert all whitespace characters to a space and remove any repeated spaces. + * + * @param string $value value to be converted. + * @return string + */ + public function compress_whitespace( $value ) { + return preg_replace( '/\s+/', ' ', $value ); + } + + /** + * Encode string (possibly containing binary characters) by replacing each input byte with two hexadecimal characters. + * + * @param string $value value to be encoded. + * @return string + */ + public function hex_encode( $value ) { + return bin2hex( $value ); + } + + /** + * Decode string that was previously encoded by hexEncode() + * + * @param string $value value to be decoded. + * @return string + */ + public function hex_decode( $value ) { + return pack( 'H*', $value ); + } + + /** + * Decode the characters encoded as HTML entities. + * + * @param mixed $value value do be decoded. + * @return string + */ + public function html_entity_decode( $value ) { + return html_entity_decode( $value ); + } + + /** + * Return the length of the input string. + * + * @param string $value input string. + * @return int + */ + public function length( $value ) { + return strlen( $value ); + } + + /** + * Convert all characters to lowercase. + * + * @param string $value string to be converted. + * @return string + */ + public function lowercase( $value ) { + return strtolower( $value ); + } + + /** + * Calculate an md5 hash for the given data + * + * @param mixed $value value to be hashed. + * @return string + */ + public function md5( $value ) { + return md5( $value, true ); + } + + /** + * Removes multiple slashes, directory self-references, and directory back-references (except when at the beginning of the input) from input string. + * + * @param string $value value to be normalized. + * @return string + */ + public function normalize_path( $value ) { + $parts = explode( + '/', + // replace any duplicate slashes with a single one. + preg_replace( '~/{2,}~', '/', $value ) + ); + + $i = 0; + while ( isset( $parts[ $i ] ) ) { + switch ( $parts[ $i ] ) { + // If this folder is a self-reference, remove it. + case '..': + // If this folder is a backreference, remove it unless we're already at the root. + if ( isset( $parts[ $i - 1 ] ) && ! in_array( $parts[ $i - 1 ], array( '', '..' ), true ) ) { + array_splice( $parts, $i - 1, 2 ); + $i--; + continue 2; + } + break; + case '.': + array_splice( $parts, $i, 1 ); + continue 2; + } + $i++; + } + + return implode( '/', $parts ); + } + + /** + * Convert backslash characters to forward slashes, and then normalize using `normalizePath` + * + * @param string $value to be normalized. + * @return string + */ + public function normalize_path_win( $value ) { + return $this->normalize_path( str_replace( '\\', '/', $value ) ); + } + + /** + * Removes all NUL bytes from input. + * + * @param string $value value to be filtered. + * @return string + */ + public function remove_nulls( $value ) { + return str_replace( "\x0", '', $value ); + } + + /** + * Remove all whitespace characters from input. + * + * @param string $value value to be filtered. + * @return string + */ + public function remove_whitespace( $value ) { + return preg_replace( '/\s/', '', $value ); + } + + /** + * Replaces each occurrence of a C-style comment (/ * ... * /) with a single space. + * Unterminated comments will also be replaced with a space. However, a standalone termination of a comment (* /) will not be acted upon. + * + * @param string $value value to be filtered. + * @return string + */ + public function replace_comments( $value ) { + $value = preg_replace( '~/\*.*?\*/|/\*.*?$~Ds', ' ', $value ); + return explode( '/*', $value, 2 )[0]; + } + + /** + * Removes common comments chars (/ *, * /, --, #). + * + * @param string $value value to be filtered. + * @return string + */ + public function remove_comments_char( $value ) { + return preg_replace( '~/*|*/|--|#|//~', '', $value ); + } + + /** + * Replaces each NUL byte in input with a space. + * + * @param string $value value to be filtered. + * @return string + */ + public function replace_nulls( $value ) { + return str_replace( "\x0", ' ', $value ); + } + + /** + * Decode a URL-encoded input string. + * + * @param string $value value to be decoded. + * @return string + */ + public function url_decode( $value ) { + return urldecode( $value ); + } + + /** + * Decode a URL-encoded input string. + * + * @param string $value value to be decoded. + * @return string + */ + public function url_decode_uni( $value ) { + error_log( 'JETPACKWAF TRANSFORM NOT IMPLEMENTED: urlDecodeUni' ); + return $value; + } + + /** + * Decode a json encoded input string. + * + * @param string $value value to be decoded. + * @return string + */ + public function js_decode( $value ) { + error_log( 'JETPACKWAF TRANSFORM NOT IMPLEMENTED: jsDecode' ); + return $value; + } + + /** + * Convert all characters to uppercase. + * + * @param string $value value to be encoded. + * @return string + */ + public function uppercase( $value ) { + return strtoupper( $value ); + } + + /** + * Calculate a SHA1 hash from the input string. + * + * @param mixed $value value to be hashed. + * @return string + */ + public function sha1( $value ) { + return sha1( $value, true ); + } + + /** + * Remove whitespace from the left side of the input string. + * + * @param string $value value to be trimmed. + * @return string + */ + public function trim_left( $value ) { + return ltrim( $value ); + } + + /** + * Remove whitespace from the right side of the input string. + * + * @param string $value value to be trimmed. + * @return string + */ + public function trim_right( $value ) { + return rtrim( $value ); + } + + /** + * Remove whitespace from both sides of the input string. + * + * @param string $value value to be trimmed. + * @return string + */ + public function trim( $value ) { + return trim( $value ); + } + + /** + * Convert utf-8 characters to unicode characters + * + * @param string $value value to be encoded. + * @return string + */ + public function utf8_to_unicode( $value ) { + return preg_replace( '/\\\u(?=[a-f0-9]{4})/', '%u', substr( json_encode( $value ), 1, -1 ) ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/functions.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/functions.php new file mode 100644 index 00000000..a8112fd9 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/functions.php @@ -0,0 +1,27 @@ +<?php +/** + * Utility functions for WAF. + * + * @package automattic/jetpack-waf + */ + +namespace Automattic\Jetpack\Waf; + +/** + * A wrapper for WordPress's `wp_unslash()`. + * + * Even though PHP itself dropped the option to add slashes to superglobals a decade ago, + * WordPress still does it through some misguided extreme backwards compatibility. 🙄 + * + * If WordPress's function exists, assume it needs to be called. If not, assume it doesn't. + * + * @param string|array $value String or array of data to unslash. + * @return string|array Possibly unslashed $value. + */ +function wp_unslash( $value ) { + if ( function_exists( '\\wp_unslash' ) ) { + return \wp_unslash( $value ); + } else { + return $value; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/CHANGELOG.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/CHANGELOG.md new file mode 100644 index 00000000..085c9a1b --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/CHANGELOG.md @@ -0,0 +1,56 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.2.4] - 2022-05-31 +### Changed +- Updated package dependencies. [#24475] [#24573] + +## [0.2.3] - 2022-05-24 +### Changed +- Updated package dependencies. [#24449] + +## [0.2.2] - 2022-05-18 +### Changed +- Updated package dependencies. [#23795] [#24153] [#24306] [#24372] + +## [0.2.1] - 2022-05-10 +### Added +- Add missing JS dep on `core-js`. [#24288] + +### Changed +- Updated package dependencies. [#24204] + +## [0.2.0] - 2022-05-04 +### Added +- Add missing JavaScript dependencies. [#24096] + +### Changed +- Moving from raw HTML tags to Jetpack components with ThemeProvider. [#24109] +- Remove use of `pnpx` in preparation for pnpm 7.0. [#24210] +- Updated package dependencies. [#24095] [#24198] [#24199] [#24200] [#24200] [#24230] + +### Deprecated +- Moved the options class into Connection. [#24095] + +## [0.1.1] - 2022-04-26 +### Changed +- Update package.json metadata. + +## 0.1.0 - 2022-04-19 +### Added +- Added WordAds package for new UI work + +### Changed +- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` +- Updated package dependencies. + +[0.2.4]: https://github.com/Automattic/jetpack-wordads/compare/v0.2.3...v0.2.4 +[0.2.3]: https://github.com/Automattic/jetpack-wordads/compare/v0.2.2...v0.2.3 +[0.2.2]: https://github.com/Automattic/jetpack-wordads/compare/v0.2.1...v0.2.2 +[0.2.1]: https://github.com/Automattic/jetpack-wordads/compare/v0.2.0...v0.2.1 +[0.2.0]: https://github.com/Automattic/jetpack-wordads/compare/v0.1.1...v0.2.0 +[0.1.1]: https://github.com/Automattic/jetpack-wordads/compare/v0.1.0...v0.1.1 diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/LICENSE.txt b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/LICENSE.txt new file mode 100644 index 00000000..e82774c1 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/LICENSE.txt @@ -0,0 +1,357 @@ +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 2 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, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +=================================== + + +GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + + Preamble + +The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) 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 +this service 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 make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. 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. + +We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + +Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and +modification follow. + +GNU GENERAL PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + +1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + +a) You must cause the modified files to carry prominent notices +stating that you changed the files and the date of any change. + +b) You must cause any work that you distribute or publish, that in +whole or in part contains or is derived from the Program or any +part thereof, to be licensed as a whole at no charge to all third +parties under the terms of this License. + +c) If the modified program normally reads commands interactively +when run, you must cause it, when started running for such +interactive use in the most ordinary way, to print or display an +announcement including an appropriate copyright notice and a +notice that there is no warranty (or else, saying that you provide +a warranty) and that users may redistribute the program under +these conditions, and telling the user how to view a copy of this +License. (Exception: if the Program itself is interactive but +does not normally print such an announcement, your work based on +the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + +a) Accompany it with the complete corresponding machine-readable +source code, which must be distributed under the terms of Sections +1 and 2 above on a medium customarily used for software interchange; or, + +b) Accompany it with a written offer, valid for at least three +years, to give any third party, for a charge no more than your +cost of physically performing source distribution, a complete +machine-readable copy of the corresponding source code, to be +distributed under the terms of Sections 1 and 2 above on a medium +customarily used for software interchange; or, + +c) Accompany it with the information you received as to the offer +to distribute corresponding source code. (This alternative is +allowed only for noncommercial distribution and only if you +received the program in object code or executable form with such +an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + +5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions +of the 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 a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + +10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE 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. + + 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 +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + +<one line to give the program's name and a brief idea of what it does.> +Copyright (C) <year> <name of author> + +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 2 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, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + +Gnomovision version 69, Copyright (C) year name of author +Gnomovision 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, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in the program +`Gnomovision' (which makes passes at compilers) written by James Hacker. + +<signature of Ty Coon>, 1 April 1989 +Ty Coon, President of Vice + +This 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. diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/SECURITY.md b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/SECURITY.md new file mode 100644 index 00000000..b4b46c0e --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/SECURITY.md @@ -0,0 +1,38 @@ +# Security Policy + +Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). + +## Supported Versions + +Generally, only the latest version of Jetpack has continued support. If a critical vulnerability is found in the current version of Jetpack, we may opt to backport any patches to previous versions. + +## Reporting a Vulnerability + +[Jetpack](https://jetpack.com/) is an open-source plugin for WordPress. Our HackerOne program covers the plugin software, as well as a variety of related projects and infrastructure. + +**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** + +Our most critical targets are: + +* Jetpack and the Jetpack composer packages (all within this repo) +* Jetpack.com -- the primary marketing site. +* cloud.jetpack.com -- a management site. +* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. + +For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). + +_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ + +## Guidelines + +We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: + +* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). +* Pen-testing Production: + * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). + * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. + * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. + * To be eligible for a bounty, all of these guidelines must be followed. +* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. + +We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/babel.config.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/babel.config.js new file mode 100644 index 00000000..0f0c1a89 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/babel.config.js @@ -0,0 +1 @@ +module.exports = require( './tools/babel.config' ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.asset.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.asset.php new file mode 100644 index 00000000..8f930200 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.asset.php @@ -0,0 +1 @@ +<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-data', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '412aa8cdab3ae61782d3'); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.css new file mode 100644 index 00000000..59fc6eba --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.css @@ -0,0 +1 @@ +.dops-card{background:#fff;box-shadow:0 0 0 1px #c3c4c7,0 1px 1px 1px rgba(0,0,0,.04);box-sizing:border-box;display:block;margin:0 auto 10px;padding:16px;position:relative}.dops-card:after{clear:both;content:".";display:block;height:0;visibility:hidden}@media(min-width:481px){.dops-card{margin-bottom:16px;padding:24px}}.dops-card.is-compact{margin-bottom:1px}@media(min-width:481px){.dops-card.is-compact{margin-bottom:1px;padding:16px 24px}}.dops-card.is-card-link{padding-right:48px}h2.dops-card-title{font-size:rem(20px)}.dops-card__link-indicator{color:#d5d5d5;display:block;height:100%;position:absolute;right:16px;top:0}a.dops-card:hover .dops-card__link-indicator{color:#bbb}a.dops-card:focus{outline:0}a.dops-card:focus .dops-card__link-indicator{color:tint(#3582c4,20%)}.gridicon{fill:currentColor;display:inline-block}.gridicon.needs-offset g{transform:translate(1px,1px)}.gridicon.needs-offset-x g{transform:translate(1px)}.gridicon.needs-offset-y g{transform:translateY(1px)}.form-toggle[type=checkbox]{display:none}.form-toggle__switch{border-radius:12px;box-sizing:border-box;cursor:pointer;display:inline-block;flex:none;height:24px;outline:0;padding:2px;position:relative;transition:all .4s ease,box-shadow 0s;vertical-align:middle;width:40px}.form-toggle__switch:after,.form-toggle__switch:before{content:"";display:block;height:20px;position:relative;width:20px}.form-toggle__switch:after{background:#fff;border-radius:50%;left:0;transition:all .2s ease}.form-toggle__switch:before{display:none}.dops-accessible-focus .form-toggle__switch:focus{box-shadow:0 0 0 2px #3582c4}.form-toggle__label{cursor:pointer;display:flex}.is-disabled .form-toggle__label{cursor:default}.dops-accessible-focus .form-toggle:focus+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #3582c4}.dops-accessible-focus .form-toggle:focus:checked+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #78dcfa}.form-toggle+.form-toggle__label .form-toggle__switch{background:#bbb}.form-toggle:not(:disabled)+.form-toggle__switch:hover{background:#d5d5d5}.form-toggle:checked+.form-toggle__label .form-toggle__switch{background:#3582c4}.form-toggle:checked+.form-toggle__label .form-toggle__switch:after{left:16px}.form-toggle:checked:not(:disabled)+.form-toggle__switch:hover{background:#78dcfa}.form-toggle:disabled+span.form-toggle__switch{cursor:default;opacity:.25}.form-toggle.is-toggling+.form-toggle__switch{background:#3582c4}.form-toggle.is-toggling:checked+.form-toggle__switch{background:#d5d5d5}.form-toggle.is-compact+.form-toggle__switch{border-radius:8px;height:16px;width:24px}.form-toggle.is-compact+.form-toggle__switch:after,.form-toggle.is-compact+.form-toggle__switch:before{height:12px;width:12px}.form-toggle.is-compact:checked+.form-toggle__switch:after{left:8px}.jp-wordads-dashboard-wrap{align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;margin:0 auto;width:100%}.jp-wordads-dashboard-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:calc(100% - 32px)}@media(min-width:600px){.jp-wordads-dashboard-row{grid-template-columns:repeat(8,1fr);margin:0 18px;width:calc(100% - 36px)}}@media(min-width:960px){.jp-wordads-dashboard-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px;width:calc(100% - 48px)}}.jp-wordads-dashboard-row .sm-col-span-1{grid-column-end:span 1}.jp-wordads-dashboard-row .sm-col-span-2{grid-column-end:span 2}.jp-wordads-dashboard-row .sm-col-span-3{grid-column-end:span 3}.jp-wordads-dashboard-row .sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.jp-wordads-dashboard-row .md-col-span-1{grid-column-end:span 1}.jp-wordads-dashboard-row .md-col-span-2{grid-column-end:span 2}.jp-wordads-dashboard-row .md-col-span-3{grid-column-end:span 3}.jp-wordads-dashboard-row .md-col-span-4{grid-column-end:span 4}.jp-wordads-dashboard-row .md-col-span-5{grid-column-end:span 5}.jp-wordads-dashboard-row .md-col-span-6{grid-column-end:span 6}.jp-wordads-dashboard-row .md-col-span-7{grid-column-end:span 7}.jp-wordads-dashboard-row .md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.jp-wordads-dashboard-row .lg-col-span-1{grid-column-end:span 1}.jp-wordads-dashboard-row .lg-col-span-2{grid-column-end:span 2}.jp-wordads-dashboard-row .lg-col-span-3{grid-column-end:span 3}.jp-wordads-dashboard-row .lg-col-span-4{grid-column-end:span 4}.jp-wordads-dashboard-row .lg-col-span-5{grid-column-end:span 5}.jp-wordads-dashboard-row .lg-col-span-6{grid-column-end:span 6}.jp-wordads-dashboard-row .lg-col-span-7{grid-column-end:span 7}.jp-wordads-dashboard-row .lg-col-span-8{grid-column-end:span 8}.jp-wordads-dashboard-row .lg-col-span-9{grid-column-end:span 9}.jp-wordads-dashboard-row .lg-col-span-10{grid-column-end:span 10}.jp-wordads-dashboard-row .lg-col-span-11{grid-column-end:span 11}.jp-wordads-dashboard-row .lg-col-span-12{grid-column-end:span 12}.jp-wordads-dashboard-row .lg-col-span-0{display:none}}@media(max-width:960px){.jp-wordads-dashboard-row .md-col-span-0{display:none}}@media(max-width:600px){.jp-wordads-dashboard-row .sm-col-span-0{display:none}.jp-wordads-dashboard-row .sm-col-span-1{display:block}}.jp-form-wordads-settings-group{width:100%}.jp-form-wordads-settings-group .dops-card{box-shadow:none;padding:4em 0 0}.jp-form-wordads-settings-group .form-toggle__label{margin:0}.jp-form-wordads-settings-group__toggle.is-instant-search{margin-top:4em}.jp-form-wordads-settings-group__toggle .jp-form-wordads-settings-group__toggle-container{display:flex}@media(max-width:960px){.jp-form-wordads-settings-group__toggle .jp-form-wordads-settings-group__toggle-container{justify-content:center}}.form-toggle__label-content{font-size:1.5em;font-weight:600;line-height:1.167}.form-toggle__label-content span{font-weight:400}.jp-form-wordads-settings-group__toggle-description{margin-top:1em}p.jp-form-wordads-settings-group__toggle-explanation{font-size:1em;font-weight:400;line-height:1.5;margin-bottom:0;margin-top:0}.jp-form-wordads-settings-group-buttons{margin-top:1.5em}.jp-form-wordads-settings-group-buttons__button{align-items:center;border-color:#000;display:flex;font-size:1em;justify-content:center;min-height:2.5em;padding:.5em 1.5em;text-align:center}.jp-form-wordads-settings-group-buttons__button.is-customize-search{background-color:#000;color:#fff}.jp-form-wordads-settings-group-buttons__button:disabled,.jp-form-wordads-settings-group-buttons__button[disabled]{background-color:#dcdcde;border-color:#dcdcde;color:#a7aaad;cursor:not-allowed}.jp-form-wordads-settings-group-buttons__button.is-widgets-editor{background:transparent;color:#000}.jp-form-wordads-settings-group-buttons__button.is-widgets-editor:disabled,.jp-form-wordads-settings-group-buttons__button.is-widgets-editor[disabled]{background:transparent;color:#a7aaad}.form-toggle.is-wordads-admin.is-compact+.form-toggle__switch{background:#fff;border:2px solid #000;border-radius:.75em;height:1.5em;width:3em}.form-toggle.is-wordads-admin.is-compact+.form-toggle__switch:after,.form-toggle.is-wordads-admin.is-compact+.form-toggle__switch:before{background-color:#000;height:.9375em;width:.9375em}.form-toggle.is-wordads-admin.is-compact+.form-toggle__switch:focus{box-shadow:0 0 0 2px #3582c4}.form-toggle.is-wordads-admin.is-compact:checked+.form-toggle__switch{background:#069e08;border-color:#069e08}.form-toggle.is-wordads-admin.is-compact:checked+.form-toggle__switch:after{background-color:#fff;left:1.5em}.form-toggle.is-wordads-admin.is-compact.is-toggling+.form-toggle__switch:after,.form-toggle.is-wordads-admin.is-compact.is-toggling+.form-toggle__switch:before{left:1.5em}.form-toggle.is-wordads-admin.is-compact.is-toggling:checked+.form-toggle__switch:after,.form-toggle.is-wordads-admin.is-compact.is-toggling:checked+.form-toggle__switch:before{left:0}.jp-wordads-dashboard-cut{border:2px solid #069e08;border-radius:4px;display:block;margin:2em 0;padding:1em 4em 1em 1.5em;position:relative;text-decoration:none}.jp-wordads-dashboard-cut span{display:block}.jp-wordads-dashboard-cut span:last-of-type{font-weight:600}.jp-wordads-dashboard-cut:focus span:last-of-type,.jp-wordads-dashboard-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:2px}.jp-wordads-dashboard-cut:focus:after,.jp-wordads-dashboard-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-wordads-dashboard-cut:after{color:#069e08;content:"→";font-size:1.5em;font-weight:600;position:absolute;right:1.5em;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-wordads-dashboard-row .form-toggle__switch-container.sm-col-span-1{display:flex;justify-content:center;padding-top:4px}#jp-plugin-container{min-height:100vh}.dops-notice{animation:appear .3s ease-in-out;background:#414141;border-radius:3px;box-sizing:border-box;color:#fff;display:flex;line-height:1.5;margin-bottom:24px;position:relative;width:100%}.dops-notice.is-success .dops-notice__icon-wrapper{background:#4ab866}.dops-notice.is-warning .dops-notice__icon-wrapper{background:#f0b849}.dops-notice.is-error .dops-notice__icon-wrapper{background:#d94f4f}.dops-notice.is-info .dops-notice__icon-wrapper{background:#3582c4}.dops-notice .dops-notice__dismiss,.dops-notice.is-error .dops-notice__dismiss,.dops-notice.is-info .dops-notice__dismiss,.dops-notice.is-success .dops-notice__dismiss,.dops-notice.is-warning .dops-notice__dismiss{overflow:hidden}.dops-notice__icon-wrapper{align-items:baseline;align-self:stretch;background:#747474;border-radius:3px 0 0 3px;color:#fff;display:flex;flex-shrink:0;justify-content:center;width:47px}.dops-notice__icon-wrapper .gridicon{margin-top:10px}@media(min-width:481px){.dops-notice__icon-wrapper .gridicon{margin-top:12px}}.dops-notice__content.dops-notice__content{flex-grow:1;font-size:12px;padding:13px}@media(min-width:481px){.dops-notice__content.dops-notice__content{font-size:14px}}.dops-notice__content.dops-notice__content a{color:#fff;text-decoration:underline}.dops-notice__content.dops-notice__content a:hover,.dops-notice__text a.dops-notice__text-no-underline{text-decoration:none}.dops-notice__text a,.dops-notice__text a:visited{color:#fff;text-decoration:underline}.dops-notice__text a:hover,.dops-notice__text a:visited:hover{color:#fff;text-decoration:none}.dops-notice__text ul{margin-bottom:0;margin-left:0}.dops-notice__text li{margin-left:2em;margin-top:.5em}.dops-notice__text p{margin-bottom:0;margin-top:.5em}.dops-notice__text p:first-child{margin-top:0}.dops-notice__button{cursor:pointer;margin-left:.428em}.dops-notice__dismiss{cursor:pointer;flex-shrink:0;padding:12px 12px 0}.dops-notice__dismiss .gridicon{height:18px;width:18px}@media(min-width:481px){.dops-notice__dismiss{padding:11px 11px 0}.dops-notice__dismiss .gridicon{height:24px;width:24px}}.dops-notice .dops-notice__dismiss{color:#bbb}.dops-notice .dops-notice__dismiss:focus,.dops-notice .dops-notice__dismiss:hover{color:#fff}a.dops-notice__action{align-items:center;color:#bbb;cursor:pointer;display:flex;font-size:12px;font-weight:400;padding:13px;text-decoration:none;white-space:nowrap}@media(min-width:481px){a.dops-notice__action{align-items:center;border-radius:0;flex-grow:0;flex-shrink:1;font-size:14px;margin:0 0 0 auto;padding:13px 16px}a.dops-notice__action .gridicon{height:24px;width:24px}}a.dops-notice__action:visited{color:#bbb}a.dops-notice__action:hover{color:#fff}a.dops-notice__action .gridicon{height:18px;margin-left:8px;opacity:.7;width:18px}.dops-notice.is-compact{border-radius:3px;display:inline-flex;flex-direction:row;flex-wrap:nowrap;line-height:1.5;margin:0;min-height:20px;padding:0;text-decoration:none;text-transform:none;vertical-align:middle;width:auto}.dops-notice.is-compact .dops-notice__content{font-size:12px;padding:6px 10px}.dops-notice.is-compact .dops-notice__icon-wrapper{width:28px}.dops-notice.is-compact .dops-notice__icon-wrapper .dops-notice__icon{height:18px;margin:0;width:18px}.dops-notice.is-compact .dops-notice__icon-wrapper .gridicon{margin-top:6px}.dops-notice.is-compact .dops-notice__dismiss{align-self:center;flex:none;margin:0 8px 0 0;padding:0;position:relative}.dops-notice.is-compact .dops-notice__dismiss .gridicon{height:18px;width:18px}.dops-notice.is-compact a.dops-notice__action{align-self:center;background:transparent;display:inline-block;font-size:12px;margin:0 0 0 16px;padding:0 10px}.dops-notice.is-compact a.dops-notice__action:active,.dops-notice.is-compact a.dops-notice__action:focus,.dops-notice.is-compact a.dops-notice__action:hover{background:transparent}.dops-notice.is-compact a.dops-notice__action .gridicon{height:14px;margin-left:8px;opacity:1;vertical-align:sub;width:14px}@keyframes appear{0%{opacity:0}to{opacity:1}}.global-notices{bottom:0;left:0;pointer-events:none;position:fixed;right:0;text-align:right;top:auto;z-index:179}@media(min-width:661px){.global-notices{bottom:auto;left:auto;max-width:calc(100% - 68px);right:16px;top:63px}}@media(min-width:961px){.global-notices{max-width:calc(100% - 208px);right:24px;top:71px}}@media(min-width:1041px){.global-notices{max-width:calc(100% - 224px);right:32px}}.global-notices .dops-notice{border-radius:0;box-shadow:0 2px 5px rgba(0,0,0,.2),0 0 56px rgba(0,0,0,.15);flex-wrap:nowrap;margin-bottom:0;pointer-events:auto;text-align:left}.global-notices .dops-notice .dops-notice__icon-wrapper{border-radius:0}@media(min-width:661px){.global-notices .dops-notice{border-radius:3px;display:flex;margin-bottom:24px;overflow:hidden}.global-notices .dops-notice .dops-notice__icon-wrapper{border-radius:3px 0 0 3px}.global-notices .dops-notice a.dops-notice__action{font-size:14px;padding:13px 16px}}.global-notices .dops-notice__dismiss{flex-shrink:0}@media(min-width:661px){.global-notices .dops-notice__dismiss{padding:13px 16px 0}}#jp-wordads-dashboard{color:#000;font-size:16px}#jp-wordads-dashboard *{box-sizing:border-box}#jp-wordads-dashboard .jp-wordads-dashboard-page-loading-spinner{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}@media(max-width:600px){#jp-wordads-dashboard{font-size:14px}}@keyframes rotate-spinner{to{transform:rotate(1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-right-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}.sexr0jUxC1jVixdKiDnC{margin-left:-20px}@media(max-width:782px){.sexr0jUxC1jVixdKiDnC{margin-left:-10px}}.sexr0jUxC1jVixdKiDnC.vKQ11sLeAM45M04P1ccj{background-color:var(--jp-white)}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1128px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;max-width:var(--max-container-width);width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));padding:0 24px}}.SqdhUZkXCRuIpErj1B3z.OZC_9a1LhpWF9dv15Gdh{max-width:none;padding:unset}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.jp-dashboard-footer{align-items:center;color:#000;display:flex;flex-flow:row wrap;justify-content:space-between;max-width:1128px;width:100%}.jp-dashboard-footer a,.jp-dashboard-footer a:hover,.jp-dashboard-footer a:visited{color:#000;text-decoration:none}.jp-dashboard-footer__jetpack-symbol,.jp-dashboard-footer__module-name{display:inline-block;vertical-align:middle}.jp-dashboard-footer__module-name{font-size:12px;font-weight:600;margin-left:5px}.cAbGtJDGgLubucBnz7vM{background-color:var(--jp-white)}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.js new file mode 100644 index 00000000..9e338888 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.js @@ -0,0 +1,2 @@ +/*! For license information please see jp-wordads-dashboard.js.LICENSE.txt */ +!function(){var t={8294:function(t){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},2402:function(t){function e(){return t.exports=e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(this,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},5235:function(t,e){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var i=typeof n;if("string"===i||"number"===i)t.push(n);else if(Array.isArray(n)){if(n.length){var c=o.apply(null,n);c&&t.push(c)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&t.push(s);else t.push(n.toString())}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(n=function(){return o}.apply(e,[]))||(t.exports=n)}()},6198:function(t,e,n){var r=n(1210),o=n(5006),i=n(7232),c=r.TypeError;t.exports=function(t){if(o(t))return t;throw c(i(t)+" is not a function")}},1938:function(t,e,n){var r=n(1210),o=n(5006),i=r.String,c=r.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw c("Can't set "+i(t)+" as a prototype")}},8987:function(t,e,n){var r=n(8875),o=n(42),i=n(2016),c=r("unscopables"),s=Array.prototype;null==s[c]&&i.f(s,c,{configurable:!0,value:o(null)}),t.exports=function(t){s[c][t]=!0}},3794:function(t,e,n){var r=n(1210),o=n(2702),i=r.String,c=r.TypeError;t.exports=function(t){if(o(t))return t;throw c(i(t)+" is not an object")}},8845:function(t,e,n){var r=n(4929),o=n(645),i=n(5570),c=function(t){return function(e,n,c){var s,a=r(e),u=i(a),l=o(c,u);if(t&&n!=n){for(;u>l;)if((s=a[l++])!=s)return!0}else for(;u>l;l++)if((t||l in a)&&a[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:c(!0),indexOf:c(!1)}},237:function(t,e,n){var r=n(3715),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},5996:function(t,e,n){var r=n(1210),o=n(5165),i=n(5006),c=n(237),s=n(8875)("toStringTag"),a=r.Object,u="Arguments"==c(function(){return arguments}());t.exports=o?c:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),s))?n:u?c(e):"Object"==(r=c(e))&&i(e.callee)?"Arguments":r}},7398:function(t,e,n){var r=n(3715),o=Error,i=r("".replace),c=String(o("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,a=s.test(c);t.exports=function(t,e){if(a&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=i(t,s,"");return t}},1184:function(t,e,n){var r=n(4242),o=n(3496),i=n(4225),c=n(2016);t.exports=function(t,e,n){for(var s=o(e),a=c.f,u=i.f,l=0;l<s.length;l++){var p=s[l];r(t,p)||n&&r(n,p)||a(t,p,u(e,p))}}},5506:function(t,e,n){var r=n(7778),o=n(2016),i=n(9487);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9487:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},1568:function(t,e,n){var r=n(1210),o=n(5006),i=n(5506),c=n(6717),s=n(3071);t.exports=function(t,e,n,a){var u=!!a&&!!a.unsafe,l=!!a&&!!a.enumerable,p=!!a&&!!a.noTargetGet,d=a&&void 0!==a.name?a.name:e;return o(n)&&c(n,d,a),t===r?(l?t[e]=n:s(e,n),t):(u?!p&&t[e]&&(l=!0):delete t[e],l?t[e]=n:i(t,e,n),t)}},7778:function(t,e,n){var r=n(4258);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4716:function(t,e,n){var r=n(1210),o=n(2702),i=r.document,c=o(i)&&o(i.createElement);t.exports=function(t){return c?i.createElement(t):{}}},1455:function(t,e,n){var r=n(2265);t.exports=r("navigator","userAgent")||""},6475:function(t,e,n){var r,o,i=n(1210),c=n(1455),s=i.process,a=i.Deno,u=s&&s.versions||a&&a.version,l=u&&u.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&c&&(!(r=c.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=c.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},9864:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1500:function(t,e,n){var r=n(4258),o=n(9487);t.exports=!r((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},8657:function(t,e,n){var r=n(1210),o=n(4225).f,i=n(5506),c=n(1568),s=n(3071),a=n(1184),u=n(9656);t.exports=function(t,e){var n,l,p,d,f,h=t.target,g=t.global,m=t.stat;if(n=g?r:m?r[h]||s(h,{}):(r[h]||{}).prototype)for(l in e){if(d=e[l],p=t.noTargetGet?(f=o(n,l))&&f.value:n[l],!u(g?l:h+(m?".":"#")+l,t.forced)&&void 0!==p){if(typeof d==typeof p)continue;a(d,p)}(t.sham||p&&p.sham)&&i(d,"sham",!0),c(n,l,d,t)}}},4258:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},9115:function(t,e,n){var r=n(5200),o=Function.prototype,i=o.apply,c=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?c.bind(i):function(){return c.apply(i,arguments)})},5200:function(t,e,n){var r=n(4258);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},4264:function(t,e,n){var r=n(5200),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},232:function(t,e,n){var r=n(7778),o=n(4242),i=Function.prototype,c=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),a=s&&"something"===function(){}.name,u=s&&(!r||r&&c(i,"name").configurable);t.exports={EXISTS:s,PROPER:a,CONFIGURABLE:u}},3715:function(t,e,n){var r=n(5200),o=Function.prototype,i=o.bind,c=o.call,s=r&&i.bind(c,c);t.exports=r?function(t){return t&&s(t)}:function(t){return t&&function(){return c.apply(t,arguments)}}},2265:function(t,e,n){var r=n(1210),o=n(5006),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},9722:function(t,e,n){var r=n(6198);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},1210:function(t){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof window&&window)||function(){return this}()||Function("return this")()},4242:function(t,e,n){var r=n(3715),o=n(2103),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3953:function(t){t.exports={}},2872:function(t,e,n){var r=n(2265);t.exports=r("document","documentElement")},4165:function(t,e,n){var r=n(7778),o=n(4258),i=n(4716);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},600:function(t,e,n){var r=n(1210),o=n(3715),i=n(4258),c=n(237),s=r.Object,a=o("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==c(t)?a(t,""):s(t)}:s},8088:function(t,e,n){var r=n(5006),o=n(2702),i=n(2025);t.exports=function(t,e,n){var c,s;return i&&r(c=e.constructor)&&c!==n&&o(s=c.prototype)&&s!==n.prototype&&i(t,s),t}},3667:function(t,e,n){var r=n(3715),o=n(5006),i=n(4434),c=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return c(t)}),t.exports=i.inspectSource},7793:function(t,e,n){var r=n(2702),o=n(5506);t.exports=function(t,e){r(e)&&"cause"in e&&o(t,"cause",e.cause)}},2406:function(t,e,n){var r,o,i,c=n(4564),s=n(1210),a=n(3715),u=n(2702),l=n(5506),p=n(4242),d=n(4434),f=n(9116),h=n(3953),g="Object already initialized",m=s.TypeError,v=s.WeakMap;if(c||d.state){var y=d.state||(d.state=new v),b=a(y.get),j=a(y.has),w=a(y.set);r=function(t,e){if(j(y,t))throw new m(g);return e.facade=t,w(y,t,e),e},o=function(t){return b(y,t)||{}},i=function(t){return j(y,t)}}else{var x=f("state");h[x]=!0,r=function(t,e){if(p(t,x))throw new m(g);return e.facade=t,l(t,x,e),e},o=function(t){return p(t,x)?t[x]:{}},i=function(t){return p(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw m("Incompatible receiver, "+t+" required");return n}}}},5006:function(t){t.exports=function(t){return"function"==typeof t}},9656:function(t,e,n){var r=n(4258),o=n(5006),i=/#|\.prototype\./,c=function(t,e){var n=a[s(t)];return n==l||n!=u&&(o(e)?r(e):!!e)},s=c.normalize=function(t){return String(t).replace(i,".").toLowerCase()},a=c.data={},u=c.NATIVE="N",l=c.POLYFILL="P";t.exports=c},2702:function(t,e,n){var r=n(5006);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},4832:function(t){t.exports=!1},664:function(t,e,n){var r=n(1210),o=n(2265),i=n(5006),c=n(3387),s=n(8264),a=r.Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&c(e.prototype,a(t))}},5570:function(t,e,n){var r=n(8464);t.exports=function(t){return r(t.length)}},6717:function(t,e,n){var r=n(4258),o=n(5006),i=n(4242),c=n(2016).f,s=n(232).CONFIGURABLE,a=n(3667),u=n(2406),l=u.enforce,p=u.get,d=!r((function(){return 8!==c((function(){}),"length",{value:8}).length})),f=String(String).split("String"),h=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!i(t,"name")||s&&t.name!==e)&&c(t,"name",{value:e,configurable:!0}),d&&n&&i(n,"arity")&&t.length!==n.arity&&c(t,"length",{value:n.arity});var r=l(t);return i(r,"source")||(r.source=f.join("string"==typeof e?e:"")),t};Function.prototype.toString=h((function(){return o(this)&&p(this).source||a(this)}),"toString")},9868:function(t,e,n){var r=n(6475),o=n(4258);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},4564:function(t,e,n){var r=n(1210),o=n(5006),i=n(3667),c=r.WeakMap;t.exports=o(c)&&/native code/.test(i(c))},1377:function(t,e,n){var r=n(2910);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},42:function(t,e,n){var r,o=n(3794),i=n(3238),c=n(9864),s=n(3953),a=n(2872),u=n(4716),l=n(9116),p=l("IE_PROTO"),d=function(){},f=function(t){return"<script>"+t+"</"+"script>"},h=function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;g="undefined"!=typeof document?document.domain&&r?h(r):((e=u("iframe")).style.display="none",a.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):h(r);for(var n=c.length;n--;)delete g.prototype[c[n]];return g()};s[p]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=o(t),n=new d,d.prototype=null,n[p]=t):n=g(),void 0===e?n:i.f(n,e)}},3238:function(t,e,n){var r=n(7778),o=n(2879),i=n(2016),c=n(3794),s=n(4929),a=n(5321);e.f=r&&!o?Object.defineProperties:function(t,e){c(t);for(var n,r=s(e),o=a(e),u=o.length,l=0;u>l;)i.f(t,n=o[l++],r[n]);return t}},2016:function(t,e,n){var r=n(1210),o=n(7778),i=n(4165),c=n(2879),s=n(3794),a=n(8901),u=r.TypeError,l=Object.defineProperty,p=Object.getOwnPropertyDescriptor,d="enumerable",f="configurable",h="writable";e.f=o?c?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&h in n&&!n.writable){var r=p(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:f in n?n.configurable:r.configurable,enumerable:d in n?n.enumerable:r.enumerable,writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return l(t,e,n)}catch(t){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},4225:function(t,e,n){var r=n(7778),o=n(4264),i=n(9532),c=n(9487),s=n(4929),a=n(8901),u=n(4242),l=n(4165),p=Object.getOwnPropertyDescriptor;e.f=r?p:function(t,e){if(t=s(t),e=a(e),l)try{return p(t,e)}catch(t){}if(u(t,e))return c(!o(i.f,t,e),t[e])}},6112:function(t,e,n){var r=n(6166),o=n(9864).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},5603:function(t,e){e.f=Object.getOwnPropertySymbols},3387:function(t,e,n){var r=n(3715);t.exports=r({}.isPrototypeOf)},6166:function(t,e,n){var r=n(3715),o=n(4242),i=n(4929),c=n(8845).indexOf,s=n(3953),a=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,l=[];for(n in r)!o(s,n)&&o(r,n)&&a(l,n);for(;e.length>u;)o(r,n=e[u++])&&(~c(l,n)||a(l,n));return l}},5321:function(t,e,n){var r=n(6166),o=n(9864);t.exports=Object.keys||function(t){return r(t,o)}},9532:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2025:function(t,e,n){var r=n(3715),o=n(3794),i=n(1938);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},896:function(t,e,n){var r=n(1210),o=n(4264),i=n(5006),c=n(2702),s=r.TypeError;t.exports=function(t,e){var n,r;if("string"===e&&i(n=t.toString)&&!c(r=o(n,t)))return r;if(i(n=t.valueOf)&&!c(r=o(n,t)))return r;if("string"!==e&&i(n=t.toString)&&!c(r=o(n,t)))return r;throw s("Can't convert object to primitive value")}},3496:function(t,e,n){var r=n(2265),o=n(3715),i=n(6112),c=n(5603),s=n(3794),a=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(s(t)),n=c.f;return n?a(e,n(t)):e}},9780:function(t,e,n){var r=n(2016).f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},5262:function(t,e,n){var r=n(1210).TypeError;t.exports=function(t){if(null==t)throw r("Can't call method on "+t);return t}},3071:function(t,e,n){var r=n(1210),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},9116:function(t,e,n){var r=n(1843),o=n(3705),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},4434:function(t,e,n){var r=n(1210),o=n(3071),i="__core-js_shared__",c=r[i]||o(i,{});t.exports=c},1843:function(t,e,n){var r=n(4832),o=n(4434);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.22.4",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE",source:"https://github.com/zloirock/core-js"})},645:function(t,e,n){var r=n(8249),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},4929:function(t,e,n){var r=n(600),o=n(5262);t.exports=function(t){return r(o(t))}},8249:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){var r=+t;return r!=r||0===r?0:(r>0?n:e)(r)}},8464:function(t,e,n){var r=n(8249),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},2103:function(t,e,n){var r=n(1210),o=n(5262),i=r.Object;t.exports=function(t){return i(o(t))}},357:function(t,e,n){var r=n(1210),o=n(4264),i=n(2702),c=n(664),s=n(9722),a=n(896),u=n(8875),l=r.TypeError,p=u("toPrimitive");t.exports=function(t,e){if(!i(t)||c(t))return t;var n,r=s(t,p);if(r){if(void 0===e&&(e="default"),n=o(r,t,e),!i(n)||c(n))return n;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},8901:function(t,e,n){var r=n(357),o=n(664);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},5165:function(t,e,n){var r={};r[n(8875)("toStringTag")]="z",t.exports="[object z]"===String(r)},2910:function(t,e,n){var r=n(1210),o=n(5996),i=r.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},7232:function(t,e,n){var r=n(1210).String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},3705:function(t,e,n){var r=n(3715),o=0,i=Math.random(),c=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+c(++o+i,36)}},8264:function(t,e,n){var r=n(9868);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},2879:function(t,e,n){var r=n(7778),o=n(4258);t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8875:function(t,e,n){var r=n(1210),o=n(1843),i=n(4242),c=n(3705),s=n(9868),a=n(8264),u=o("wks"),l=r.Symbol,p=l&&l.for,d=a?l:l&&l.withoutSetter||c;t.exports=function(t){if(!i(u,t)||!s&&"string"!=typeof u[t]){var e="Symbol."+t;s&&i(l,t)?u[t]=l[t]:u[t]=a&&p?p(e):d(e)}return u[t]}},6266:function(t,e,n){"use strict";var r=n(2265),o=n(4242),i=n(5506),c=n(3387),s=n(2025),a=n(1184),u=n(9780),l=n(8088),p=n(1377),d=n(7793),f=n(7398),h=n(1500),g=n(7778),m=n(4832);t.exports=function(t,e,n,v){var y="stackTraceLimit",b=v?2:1,j=t.split("."),w=j[j.length-1],x=r.apply(null,j);if(x){var k=x.prototype;if(!m&&o(k,"cause")&&delete k.cause,!n)return x;var _=r("Error"),C=e((function(t,e){var n=p(v?e:t,void 0),r=v?new x(t):new x;return void 0!==n&&i(r,"message",n),h&&i(r,"stack",f(r.stack,2)),this&&c(k,this)&&l(r,this,C),arguments.length>b&&d(r,arguments[b]),r}));if(C.prototype=k,"Error"!==w?s?s(C,_):a(C,_,{name:!0}):g&&y in x&&(u(C,x,y),u(C,x,"prepareStackTrace")),a(C,x),!m)try{k.name!==w&&i(k,"name",w),k.constructor=C}catch(t){}return C}}},3679:function(t,e,n){"use strict";var r=n(8657),o=n(8845).includes,i=n(4258),c=n(8987);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),c("includes")},875:function(t,e,n){var r=n(8657),o=n(1210),i=n(9115),c=n(6266),s="WebAssembly",a=o.WebAssembly,u=7!==Error("e",{cause:7}).cause,l=function(t,e){var n={};n[t]=c(t,e,u),r({global:!0,arity:1,forced:u},n)},p=function(t,e){if(a&&a[t]){var n={};n[t]=c("WebAssembly."+t,e,u),r({target:s,stat:!0,arity:1,forced:u},n)}};l("Error",(function(t){return function(e){return i(t,this,arguments)}})),l("EvalError",(function(t){return function(e){return i(t,this,arguments)}})),l("RangeError",(function(t){return function(e){return i(t,this,arguments)}})),l("ReferenceError",(function(t){return function(e){return i(t,this,arguments)}})),l("SyntaxError",(function(t){return function(e){return i(t,this,arguments)}})),l("TypeError",(function(t){return function(e){return i(t,this,arguments)}})),l("URIError",(function(t){return function(e){return i(t,this,arguments)}})),p("CompileError",(function(t){return function(e){return i(t,this,arguments)}})),p("LinkError",(function(t){return function(e){return i(t,this,arguments)}})),p("RuntimeError",(function(t){return function(e){return i(t,this,arguments)}}))},951:function(t,e,n){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(o=r))})),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(1741)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},1741:function(t,e,n){t.exports=function(t){function e(t){let n,o,i,c=null;function s(...t){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let c=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";c++;const i=e.formatters[o];if("function"==typeof i){const e=t[c];n=i.call(r,e),t.splice(c,1),c--}return n})),e.formatArgs.call(r,t);(r.log||e.log).apply(r,t)}return s.namespace=t,s.useColors=e.useColors(),s.color=e.selectColor(t),s.extend=r,s.destroy=e.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==c?c:(o!==e.namespaces&&(o=e.namespaces,i=e.enabled(t)),i),set:t=>{c=t}}),"function"==typeof e.init&&e.init(s),s}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function o(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(o),...e.skips.map(o).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(3171),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},4299:function(t,e,n){var r=n(9738)(n(9159),"DataView");t.exports=r},9504:function(t,e,n){var r=n(52),o=n(9224),i=n(5417),c=n(7488),s=n(3236);function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=c,a.prototype.set=s,t.exports=a},3646:function(t,e,n){var r=n(2047),o=n(2348),i=n(5082),c=n(7671),s=n(4148);function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=c,a.prototype.set=s,t.exports=a},7406:function(t,e,n){var r=n(9738)(n(9159),"Map");t.exports=r},4474:function(t,e,n){var r=n(1873),o=n(603),i=n(8339),c=n(5213),s=n(1052);function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=c,a.prototype.set=s,t.exports=a},8911:function(t,e,n){var r=n(9738)(n(9159),"Promise");t.exports=r},4508:function(t,e,n){var r=n(9738)(n(9159),"Set");t.exports=r},8918:function(t,e,n){var r=n(3646),o=n(580),i=n(473),c=n(6991),s=n(388),a=n(6786);function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=o,u.prototype.delete=i,u.prototype.get=c,u.prototype.has=s,u.prototype.set=a,t.exports=u},4924:function(t,e,n){var r=n(9159).Symbol;t.exports=r},9651:function(t,e,n){var r=n(9159).Uint8Array;t.exports=r},7769:function(t,e,n){var r=n(9738)(n(9159),"WeakMap");t.exports=r},2665:function(t){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},9270:function(t){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},5922:function(t){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var c=t[n];e(c,n,t)&&(i[o++]=c)}return i}},8407:function(t,e,n){var r=n(2536),o=n(4968),i=n(6259),c=n(9410),s=n(2979),a=n(9960),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),l=!n&&o(t),p=!n&&!l&&c(t),d=!n&&!l&&!p&&a(t),f=n||l||p||d,h=f?r(t.length,String):[],g=h.length;for(var m in t)!e&&!u.call(t,m)||f&&("length"==m||p&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,g))||h.push(m);return h}},4729:function(t){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},8615:function(t){t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},80:function(t,e,n){var r=n(4316),o=n(31),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var c=t[e];i.call(t,e)&&o(c,n)&&(void 0!==n||e in t)||r(t,e,n)}},9702:function(t,e,n){var r=n(31);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},3724:function(t,e,n){var r=n(4222),o=n(6703);t.exports=function(t,e){return t&&r(e,o(e),t)}},8805:function(t,e,n){var r=n(4222),o=n(6067);t.exports=function(t,e){return t&&r(e,o(e),t)}},4316:function(t,e,n){var r=n(1153);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},8871:function(t,e,n){var r=n(8918),o=n(9270),i=n(80),c=n(3724),s=n(8805),a=n(9162),u=n(3920),l=n(2378),p=n(2321),d=n(9852),f=n(2454),h=n(5947),g=n(8197),m=n(6041),v=n(9435),y=n(6259),b=n(9410),j=n(6579),w=n(731),x=n(4634),k=n(6703),_=n(6067),C="[object Arguments]",E="[object Function]",S="[object Object]",O={};O[C]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[S]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[E]=O["[object WeakMap]"]=!1,t.exports=function t(e,n,N,z,A,M){var P,F=1&n,T=2&n,Z=4&n;if(N&&(P=A?N(e,z,A,M):N(e)),void 0!==P)return P;if(!w(e))return e;var I=y(e);if(I){if(P=g(e),!F)return u(e,P)}else{var D=h(e),V=D==E||"[object GeneratorFunction]"==D;if(b(e))return a(e,F);if(D==S||D==C||V&&!A){if(P=T||V?{}:v(e),!F)return T?p(e,s(P,e)):l(e,c(P,e))}else{if(!O[D])return A?e:{};P=m(e,D,F)}}M||(M=new r);var L=M.get(e);if(L)return L;M.set(e,P),x(e)?e.forEach((function(r){P.add(t(r,n,N,r,e,M))})):j(e)&&e.forEach((function(r,o){P.set(o,t(r,n,N,o,e,M))}));var $=I?void 0:(Z?T?f:d:T?_:k)(e);return o($||e,(function(r,o){$&&(r=e[o=r]),i(P,o,t(r,n,N,o,e,M))})),P}},6205:function(t,e,n){var r=n(731),o=Object.create,i=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},8248:function(t,e,n){var r=n(8615),o=n(8574);t.exports=function t(e,n,i,c,s){var a=-1,u=e.length;for(i||(i=o),s||(s=[]);++a<u;){var l=e[a];n>0&&i(l)?n>1?t(l,n-1,i,c,s):r(s,l):c||(s[s.length]=l)}return s}},3691:function(t,e,n){var r=n(608),o=n(5446);t.exports=function(t,e){for(var n=0,i=(e=r(e,t)).length;null!=t&&n<i;)t=t[o(e[n++])];return n&&n==i?t:void 0}},9223:function(t,e,n){var r=n(8615),o=n(6259);t.exports=function(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}},530:function(t,e,n){var r=n(4924),o=n(8792),i=n(8004),c=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":c&&c in Object(t)?o(t):i(t)}},8017:function(t){t.exports=function(t,e){return null!=t&&e in Object(t)}},5189:function(t,e,n){var r=n(530),o=n(1642);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},1794:function(t,e,n){var r=n(5947),o=n(1642);t.exports=function(t){return o(t)&&"[object Map]"==r(t)}},9190:function(t,e,n){var r=n(5095),o=n(5164),i=n(731),c=n(3178),s=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,l=a.toString,p=u.hasOwnProperty,d=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?d:s).test(c(t))}},4145:function(t,e,n){var r=n(5947),o=n(1642);t.exports=function(t){return o(t)&&"[object Set]"==r(t)}},5783:function(t,e,n){var r=n(530),o=n(65),i=n(1642),c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c["[object Arguments]"]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c["[object Map]"]=c["[object Number]"]=c["[object Object]"]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!c[r(t)]}},7798:function(t,e,n){var r=n(7238),o=n(3104),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},6008:function(t,e,n){var r=n(731),o=n(7238),i=n(5722),c=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=o(t),n=[];for(var s in t)("constructor"!=s||!e&&c.call(t,s))&&n.push(s);return n}},1802:function(t,e,n){var r=n(8213),o=n(5790);t.exports=function(t,e){return r(t,e,(function(e,n){return o(t,n)}))}},8213:function(t,e,n){var r=n(3691),o=n(7419),i=n(608);t.exports=function(t,e,n){for(var c=-1,s=e.length,a={};++c<s;){var u=e[c],l=r(t,u);n(l,u)&&o(a,i(u,t),l)}return a}},4113:function(t,e,n){var r=n(5885),o=n(1838),i=n(5490);t.exports=function(t,e){return i(o(t,e,r),t+"")}},7419:function(t,e,n){var r=n(80),o=n(608),i=n(2979),c=n(731),s=n(5446);t.exports=function(t,e,n,a){if(!c(t))return t;for(var u=-1,l=(e=o(e,t)).length,p=l-1,d=t;null!=d&&++u<l;){var f=s(e[u]),h=n;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(u!=p){var g=d[f];void 0===(h=a?a(g,f,d):void 0)&&(h=c(g)?g:i(e[u+1])?[]:{})}r(d,f,h),d=d[f]}return t}},2552:function(t,e,n){var r=n(6636),o=n(1153),i=n(5885),c=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=c},6658:function(t){t.exports=function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(o);++r<o;)i[r]=t[r+e];return i}},2536:function(t){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},3042:function(t,e,n){var r=n(4924),o=n(4729),i=n(6259),c=n(6260),s=r?r.prototype:void 0,a=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(c(e))return a?a.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n}},718:function(t){t.exports=function(t){return function(e){return t(e)}}},1086:function(t,e,n){var r=n(608),o=n(1892),i=n(4025),c=n(5446);t.exports=function(t,e){return e=r(e,t),null==(t=i(t,e))||delete t[c(o(e))]}},608:function(t,e,n){var r=n(6259),o=n(4703),i=n(9091),c=n(6700);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:i(c(t))}},2367:function(t,e,n){var r=n(9651);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},9162:function(t,e,n){t=n.nmd(t);var r=n(9159),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,c=i&&i.exports===o?r.Buffer:void 0,s=c?c.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}},3868:function(t,e,n){var r=n(2367);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},6860:function(t){var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},5508:function(t,e,n){var r=n(4924),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;t.exports=function(t){return i?Object(i.call(t)):{}}},7259:function(t,e,n){var r=n(2367);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},3920:function(t){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},4222:function(t,e,n){var r=n(80),o=n(4316);t.exports=function(t,e,n,i){var c=!n;n||(n={});for(var s=-1,a=e.length;++s<a;){var u=e[s],l=i?i(n[u],t[u],u,n,t):void 0;void 0===l&&(l=t[u]),c?o(n,u,l):r(n,u,l)}return n}},2378:function(t,e,n){var r=n(4222),o=n(2864);t.exports=function(t,e){return r(t,o(t),e)}},2321:function(t,e,n){var r=n(4222),o=n(2759);t.exports=function(t,e){return r(t,o(t),e)}},5126:function(t,e,n){var r=n(9159)["__core-js_shared__"];t.exports=r},7236:function(t,e,n){var r=n(4113),o=n(1550);t.exports=function(t){return r((function(e,n){var r=-1,i=n.length,c=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(c=t.length>3&&"function"==typeof c?(i--,c):void 0,s&&o(n[0],n[1],s)&&(c=i<3?void 0:c,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,c)}return e}))}},4951:function(t,e,n){var r=n(8566);t.exports=function(t){return r(t)?void 0:t}},1153:function(t,e,n){var r=n(9738),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},61:function(t,e,n){var r=n(6263),o=n(1838),i=n(5490);t.exports=function(t){return i(o(t,void 0,r),t+"")}},6150:function(t){var e="object"==typeof window&&window&&window.Object===Object&&window;t.exports=e},9852:function(t,e,n){var r=n(9223),o=n(2864),i=n(6703);t.exports=function(t){return r(t,i,o)}},2454:function(t,e,n){var r=n(9223),o=n(2759),i=n(6067);t.exports=function(t){return r(t,i,o)}},8914:function(t,e,n){var r=n(999);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},9738:function(t,e,n){var r=n(9190),o=n(6029);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},7181:function(t,e,n){var r=n(6756)(Object.getPrototypeOf,Object);t.exports=r},8792:function(t,e,n){var r=n(4924),o=Object.prototype,i=o.hasOwnProperty,c=o.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var o=c.call(t);return r&&(e?t[s]=n:delete t[s]),o}},2864:function(t,e,n){var r=n(5922),o=n(3095),i=Object.prototype.propertyIsEnumerable,c=Object.getOwnPropertySymbols,s=c?function(t){return null==t?[]:(t=Object(t),r(c(t),(function(e){return i.call(t,e)})))}:o;t.exports=s},2759:function(t,e,n){var r=n(8615),o=n(7181),i=n(2864),c=n(3095),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,i(t)),t=o(t);return e}:c;t.exports=s},5947:function(t,e,n){var r=n(4299),o=n(7406),i=n(8911),c=n(4508),s=n(7769),a=n(530),u=n(3178),l="[object Map]",p="[object Promise]",d="[object Set]",f="[object WeakMap]",h="[object DataView]",g=u(r),m=u(o),v=u(i),y=u(c),b=u(s),j=a;(r&&j(new r(new ArrayBuffer(1)))!=h||o&&j(new o)!=l||i&&j(i.resolve())!=p||c&&j(new c)!=d||s&&j(new s)!=f)&&(j=function(t){var e=a(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case g:return h;case m:return l;case v:return p;case y:return d;case b:return f}return e}),t.exports=j},6029:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},6467:function(t,e,n){var r=n(608),o=n(4968),i=n(6259),c=n(2979),s=n(65),a=n(5446);t.exports=function(t,e,n){for(var u=-1,l=(e=r(e,t)).length,p=!1;++u<l;){var d=a(e[u]);if(!(p=null!=t&&n(t,d)))break;t=t[d]}return p||++u!=l?p:!!(l=null==t?0:t.length)&&s(l)&&c(d,l)&&(i(t)||o(t))}},52:function(t,e,n){var r=n(6772);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},9224:function(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},5417:function(t,e,n){var r=n(6772),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},7488:function(t,e,n){var r=n(6772),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},3236:function(t,e,n){var r=n(6772);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},8197:function(t){var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},6041:function(t,e,n){var r=n(2367),o=n(3868),i=n(6860),c=n(5508),s=n(7259);t.exports=function(t,e,n){var a=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return o(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return i(t);case"[object Symbol]":return c(t)}}},9435:function(t,e,n){var r=n(6205),o=n(7181),i=n(7238);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:r(o(t))}},8574:function(t,e,n){var r=n(4924),o=n(4968),i=n(6259),c=r?r.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(c&&t&&t[c])}},2979:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},1550:function(t,e,n){var r=n(31),o=n(5847),i=n(2979),c=n(731);t.exports=function(t,e,n){if(!c(n))return!1;var s=typeof e;return!!("number"==s?o(n)&&i(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},4703:function(t,e,n){var r=n(6259),o=n(6260),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||(c.test(t)||!i.test(t)||null!=e&&t in Object(e))}},999:function(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5164:function(t,e,n){var r,o=n(5126),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},7238:function(t){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},2047:function(t){t.exports=function(){this.__data__=[],this.size=0}},2348:function(t,e,n){var r=n(9702),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}},5082:function(t,e,n){var r=n(9702);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},7671:function(t,e,n){var r=n(9702);t.exports=function(t){return r(this.__data__,t)>-1}},4148:function(t,e,n){var r=n(9702);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},1873:function(t,e,n){var r=n(9504),o=n(3646),i=n(7406);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},603:function(t,e,n){var r=n(8914);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},8339:function(t,e,n){var r=n(8914);t.exports=function(t){return r(this,t).get(t)}},5213:function(t,e,n){var r=n(8914);t.exports=function(t){return r(this,t).has(t)}},1052:function(t,e,n){var r=n(8914);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},9370:function(t,e,n){var r=n(6650);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},6772:function(t,e,n){var r=n(9738)(Object,"create");t.exports=r},3104:function(t,e,n){var r=n(6756)(Object.keys,Object);t.exports=r},5722:function(t){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},3098:function(t,e,n){t=n.nmd(t);var r=n(6150),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,c=i&&i.exports===o&&r.process,s=function(){try{var t=i&&i.require&&i.require("util").types;return t||c&&c.binding&&c.binding("util")}catch(t){}}();t.exports=s},8004:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},6756:function(t){t.exports=function(t,e){return function(n){return t(e(n))}}},1838:function(t,e,n){var r=n(2665),o=Math.max;t.exports=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,c=-1,s=o(i.length-e,0),a=Array(s);++c<s;)a[c]=i[e+c];c=-1;for(var u=Array(e+1);++c<e;)u[c]=i[c];return u[e]=n(a),r(t,this,u)}}},4025:function(t,e,n){var r=n(3691),o=n(6658);t.exports=function(t,e){return e.length<2?t:r(t,o(e,0,-1))}},9159:function(t,e,n){var r=n(6150),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},5490:function(t,e,n){var r=n(2552),o=n(121)(r);t.exports=o},121:function(t){var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},580:function(t,e,n){var r=n(3646);t.exports=function(){this.__data__=new r,this.size=0}},473:function(t){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},6991:function(t){t.exports=function(t){return this.__data__.get(t)}},388:function(t){t.exports=function(t){return this.__data__.has(t)}},6786:function(t,e,n){var r=n(3646),o=n(7406),i=n(4474);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var c=n.__data__;if(!o||c.length<199)return c.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(c)}return n.set(t,e),this.size=n.size,this}},9091:function(t,e,n){var r=n(9370),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,c=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)})),e}));t.exports=c},5446:function(t,e,n){var r=n(6260);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}},3178:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},2515:function(t,e,n){var r=n(80),o=n(4222),i=n(7236),c=n(5847),s=n(7238),a=n(6703),u=Object.prototype.hasOwnProperty,l=i((function(t,e){if(s(e)||c(e))o(e,a(e),t);else for(var n in e)u.call(e,n)&&r(t,n,e[n])}));t.exports=l},6636:function(t){t.exports=function(t){return function(){return t}}},31:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},6263:function(t,e,n){var r=n(8248);t.exports=function(t){return(null==t?0:t.length)?r(t,1):[]}},5790:function(t,e,n){var r=n(8017),o=n(6467);t.exports=function(t,e){return null!=t&&o(t,e,r)}},5885:function(t){t.exports=function(t){return t}},4968:function(t,e,n){var r=n(5189),o=n(1642),i=Object.prototype,c=i.hasOwnProperty,s=i.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(t){return o(t)&&c.call(t,"callee")&&!s.call(t,"callee")};t.exports=a},6259:function(t){var e=Array.isArray;t.exports=e},5847:function(t,e,n){var r=n(5095),o=n(65);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},9410:function(t,e,n){t=n.nmd(t);var r=n(9159),o=n(2773),i=e&&!e.nodeType&&e,c=i&&t&&!t.nodeType&&t,s=c&&c.exports===i?r.Buffer:void 0,a=(s?s.isBuffer:void 0)||o;t.exports=a},5095:function(t,e,n){var r=n(530),o=n(731);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},65:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},6579:function(t,e,n){var r=n(1794),o=n(718),i=n(3098),c=i&&i.isMap,s=c?o(c):r;t.exports=s},731:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},1642:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},8566:function(t,e,n){var r=n(530),o=n(7181),i=n(1642),c=Function.prototype,s=Object.prototype,a=c.toString,u=s.hasOwnProperty,l=a.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&a.call(n)==l}},4634:function(t,e,n){var r=n(4145),o=n(718),i=n(3098),c=i&&i.isSet,s=c?o(c):r;t.exports=s},6260:function(t,e,n){var r=n(530),o=n(1642);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},9960:function(t,e,n){var r=n(5783),o=n(718),i=n(3098),c=i&&i.isTypedArray,s=c?o(c):r;t.exports=s},6703:function(t,e,n){var r=n(8407),o=n(7798),i=n(5847);t.exports=function(t){return i(t)?r(t):o(t)}},6067:function(t,e,n){var r=n(8407),o=n(6008),i=n(5847);t.exports=function(t){return i(t)?r(t,!0):o(t)}},1892:function(t){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},6650:function(t,e,n){var r=n(4474);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var c=t.apply(this,r);return n.cache=i.set(o,c)||i,c};return n.cache=new(o.Cache||r),n}o.Cache=r,t.exports=o},6697:function(t){t.exports=function(){}},8520:function(t,e,n){var r=n(4729),o=n(8871),i=n(1086),c=n(608),s=n(4222),a=n(4951),u=n(61),l=n(2454),p=u((function(t,e){var n={};if(null==t)return n;var u=!1;e=r(e,(function(e){return e=c(e,t),u||(u=e.length>1),e})),s(t,l(t),n),u&&(n=o(n,7,a));for(var p=e.length;p--;)i(n,e[p]);return n}));t.exports=p},1962:function(t,e,n){var r=n(1802),o=n(61)((function(t,e){return null==t?{}:r(t,e)}));t.exports=o},3095:function(t){t.exports=function(){return[]}},2773:function(t){t.exports=function(){return!1}},6700:function(t,e,n){var r=n(3042);t.exports=function(t){return null==t?"":r(t)}},5348:function(t,e,n){var r=n(6700),o=0;t.exports=function(t){var e=++o;return r(t)+e}},1494:function(t,e){"use strict";e.Z={"admin-page":"sexr0jUxC1jVixdKiDnC",background:"vKQ11sLeAM45M04P1ccj"}},511:function(t,e){"use strict";e.Z={section:"cAbGtJDGgLubucBnz7vM"}},5785:function(){},9054:function(){},3080:function(t,e){"use strict";e.Z={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",smCols:"4",mdCols:"8",lgCols:"12","col-sm-1":"RuVLl3q4lxTQa3wbhBJB","col-sm-1-start":"f9LZTRG4MMK42rS89afW","col-sm-1-end":"bHe_zKxjjpUwHw_MdYE1","col-sm-2":"QZbNrOqE2aNSn50xVhpU","col-sm-2-start":"ev7W3z7zVYPeHAlYqZjf","col-sm-2-end":"NJWd1m_e7lOiPYru2ZMP","col-sm-3":"Xc6nt1Qc1DI0Z2A3gt1r","col-sm-3-start":"UIcN_GXiPRoIsin8Kohg","col-sm-3-end":"GRKCyqb5LufCSCgykKFc","col-sm-4":"i_qTq8gqhhC3vIUepVRB","col-sm-4-start":"G3qaZ3Jpbvam_1XvGxgc","col-sm-4-end":"VRCNYKZtO9zukEwmgP1y","col-md-1":"tRm008K_WJL79WoNZTNL","col-md-1-start":"l5T2P_bgKts4tdaRkS1d","col-md-1-end":"zOCxfLZpF6BlgC7a_Yq1","col-md-2":"F80DdgVn0m5OpvtSQWka","col-md-2-start":"oI1c7JYfiJtMQHbhngtU","col-md-2-end":"pMQtA_4jh1_1lVknqEP5","col-md-3":"VenqMpdgyKQVUNNQcfqd","col-md-3-start":"seNYL99uoczf9V4MxBxT","col-md-3-end":"YKfF1HFhI9KygA5l3b2J","col-md-4":"yAi0Cv1xDWkoqsaUhvhR","col-md-4-start":"ubhnyZOnkgxNhh6XtVWv","col-md-4-end":"RGOPGQbWMJ9Ei5oFxS7X","col-md-5":"Sz1E2aWbX483ijdi6yge","col-md-5-start":"tku6_bRYrX9tMbgYGmIl","col-md-5-end":"b5JHttOhSEcI1WBlqAjk","col-md-6":"FboSx5MoKTAWbxXyYlCw","col-md-6-start":"Jhs8yEEmodG30edbJvag","col-md-6-end":"IpzbbKVqEqPcfIGkXkwt","col-md-7":"mhCPwfAZ4Kmm_empzJAq","col-md-7-start":"x034ilrJF7rO9UJB2rI1","col-md-7-end":"Wt8t2e16viRrOJ1lLA5v","col-md-8":"S6pIrEy9AMLKx9bgh_Ae","col-md-8-start":"kEfI4tGyuWfHTlRnvIab","col-md-8-end":"PUzX4RRsKq1dnsz3gebS","col-lg-1":"X_pdcLJikd8LS_YAdJlB","col-lg-1-start":"tl936d14Huby4khYp05X","col-lg-1-end":"hnge0LnR69d3NXEtEE1t","col-lg-2":"fj0NUMuyZQcPNgKcjp5Z","col-lg-2-start":"R2ncBX7a2NigdYCcV1OX","col-lg-2-end":"t8vMSDVYno9k9itRwnXb","col-lg-3":"wsDuEN2GqHx6qzo8dUdk","col-lg-3-start":"cIEVPUweWtLBy3xaXnMx","col-lg-3-end":"fajUWBwu1m2B479j3jmz","col-lg-4":"YR0c7fQTgMkDdWzwSyLp","col-lg-4-start":"xlwp8BmplxkKNMI7gamo","col-lg-4-end":"_C4O1w9DUqx1m3gPf8aA","col-lg-5":"Z54F1hAErckAIrKlxnXW","col-lg-5-start":"ezSDWkRHmKSxDJXxuiOH","col-lg-5-end":"T0ChoeAjGJjkkNrYhD4g","col-lg-6":"qtMoMPF6yHvGJnWHSsde","col-lg-6-start":"gdoywN5VPiWERfIBqkph","col-lg-6-end":"wUev_VH5uf_pwFFlbnAU","col-lg-7":"egIPDFJsOpownTClq9XP","col-lg-7-start":"yGhp9yoAW7k0kQik9AB7","col-lg-7-end":"SJ43U9mR5wUg5V2qBeQA","col-lg-8":"cTuyHfMwSUJxN_HdIEgd","col-lg-8-start":"smCr8DaIagcumdvdldiK","col-lg-8-end":"T03NHzQJvzwL6wAfIiTL","col-lg-9":"pMvxM3RJGjqyNdf9qg1Y","col-lg-9-start":"iIVpNRwEnQ_JI5gpp9EN","col-lg-9-end":"ZbQ4u4vGSX5rJOje4uGL","col-lg-10":"gKb5wuIDAlKGbrjK2vxy","col-lg-10-start":"Z7pINdImE2WJiYnZBTqm","col-lg-10-end":"ZTxp6qpvwurMdOnLLSz1","col-lg-11":"NnQTlbfnxPDR6cQ7rygg","col-lg-11-start":"O137wZd6Yl0olSA9PsXR","col-lg-11-end":"zf2OJtQ2MPz6SDoh6CB0","col-lg-12":"U3H6UHW6HqRt9hdzVg3O","col-lg-12-start":"zynnNeS_ZBTxABcVpUQH","col-lg-12-end":"vI8tltFZtFUNAy9Iag9s"}},8730:function(t,e){"use strict";e.Z={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",container:"SqdhUZkXCRuIpErj1B3z",fluid:"OZC_9a1LhpWF9dv15Gdh"}},1683:function(){},3171:function(t){var e=1e3,n=60*e,r=60*n,o=24*r,i=7*o,c=365.25*o;function s(t,e,n,r){var o=e>=1.5*n;return Math.round(t/n)+" "+r+(o?"s":"")}t.exports=function(t,a){a=a||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!s)return;var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*c;case"weeks":case"week":case"w":return a*i;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===u&&isFinite(t))return a.long?function(t){var i=Math.abs(t);if(i>=o)return s(t,i,o,"day");if(i>=r)return s(t,i,r,"hour");if(i>=n)return s(t,i,n,"minute");if(i>=e)return s(t,i,e,"second");return t+" ms"}(t):function(t){var i=Math.abs(t);if(i>=o)return Math.round(t/o)+"d";if(i>=r)return Math.round(t/r)+"h";if(i>=n)return Math.round(t/n)+"m";if(i>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},469:function(t,e,n){"use strict";var r=n(758);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,c){if(c!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5162:function(t,e,n){t.exports=n(469)()},758:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7556:function(t,e,n){"use strict";var r=n(3713);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,c){if(c!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5844:function(t,e,n){t.exports=n(7556)()},3713:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6975:function(t,e,n){"use strict";var r=n(951),o=n.n(r),i=n(2819);const c=o()("dops:analytics");let s,a;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const u={initialize:function(t,e,n){u.setUser(t,e),u.setSuperProps(n),u.identifyUser()},setGoogleAnalyticsEnabled:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=t,this.googleAnalyticsKey=e},setMcAnalyticsEnabled:function(t){this.mcAnalyticsEnabled=t},setUser:function(t,e){a={ID:t,username:e}},setSuperProps:function(t){s=t},assignSuperProps:function(t){s=(0,i.assign)(s,t)},mc:{bumpStat:function(t,e){const n=function(t,e){let n="";if("object"==typeof t){for(const e in t)n+="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]);c("Bumping stats %o",t)}else n="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e),c('Bumping stat "%s" in group "%s"',e,t);return n}(t,e);u.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(t,e){const n=function(t,e){let n="";if("object"==typeof t){for(const e in t)n+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]);c("Built stats %o",t)}else n="&"+encodeURIComponent(t)+"="+encodeURIComponent(e),c('Built stat "%s" in group "%s"',e,t);return n}(t,e);u.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(t,e){u.tracks.recordPageView(t),u.ga.recordPageView(t,e)}},purchase:{record:function(t,e,n,r,o,i,c){u.ga.recordPurchase(t,e,n,r,o,i,c)}},tracks:{recordEvent:function(t,e){e=e||{},0===t.indexOf("akismet_")||0===t.indexOf("jetpack_")?(s&&(c("- Super Props: %o",s),e=(0,i.assign)(e,s)),c('Record event "%s" called with props %s',t,JSON.stringify(e)),window._tkq.push(["recordEvent",t,e])):c('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(t){const e="object"==typeof t?t:{target:t};u.tracks.recordEvent("jetpack_wpa_click",e)},recordPageView:function(t){u.tracks.recordEvent("akismet_page_view",{path:t})},setOptOut:function(t){c("Pushing setOptOut: %o",t),window._tkq.push(["setOptOut",t])}},ga:{initialized:!1,initialize:function(){let t={};u.ga.initialized||(a&&(t={userId:"u-"+a.ID}),window.ga("create",this.googleAnalyticsKey,"auto",t),u.ga.initialized=!0)},recordPageView:function(t,e){u.ga.initialize(),c("Recording Page View ~ [URL: "+t+"] [Title: "+e+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",t),window.ga("send",{hitType:"pageview",page:t,title:e}))},recordEvent:function(t,e,n,r){u.ga.initialize();let o="Recording Event ~ [Category: "+t+"] [Action: "+e+"]";void 0!==n&&(o+=" [Option Label: "+n+"]"),void 0!==r&&(o+=" [Option Value: "+r+"]"),c(o),this.googleAnalyticsEnabled&&window.ga("send","event",t,e,n,r)},recordPurchase:function(t,e,n,r,o,i,c){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:t,revenue:r,currency:c}),window.ga("ecommerce:addItem",{id:t,name:e,sku:n,price:o,quantity:i}),window.ga("ecommerce:send")}},identifyUser:function(){a&&window._tkq.push(["identifyUser",a.ID,a.username])},setProperties:function(t){window._tkq.push(["setProperties",t])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};e.Z=u},4743:function(t,e,n){"use strict";n(875);var r=n(2819),o=n(6483),i=n(1132);function c(t){class e extends Error{constructor(){super(...arguments),this.name=t}}return e}const s=c("JsonParseError"),a=c("JsonParseAfterRedirectError"),u=c("Api404Error"),l=c("Api404AfterRedirectError"),p=c("FetchNetworkError");const d=new function(t,e){let n=t,c={"X-WP-Nonce":e},s={credentials:"same-origin",headers:c},a={method:"post",credentials:"same-origin",headers:(0,r.assign)({},c,{"Content-type":"application/json"})},u=function(t){const e=t.split("?"),n=e.length>1?e[1]:"",r=n.length?n.split("&"):[];return r.push("_cacheBuster="+(new Date).getTime()),e[0]+"?"+r.join("&")};const l={setApiRoot(t){n=t},setApiNonce(t){c={"X-WP-Nonce":t},s={credentials:"same-origin",headers:c},a={method:"post",credentials:"same-origin",headers:(0,r.assign)({},c,{"Content-type":"application/json"})}},setCacheBusterCallback:t=>{u=t},registerSite:(t,e)=>{const r={registration_nonce:t,no_iframe:!0};return(0,i.jetpackConfigHas)("consumer_slug")&&(r.plugin_slug=(0,i.jetpackConfigGet)("consumer_slug")),null!==e&&(r.redirect_uri=e),d(`${n}jetpack/v4/connection/register`,a,{body:JSON.stringify(r)}).then(f).then(h)},fetchAuthorizationUrl:t=>p((0,o.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:t}),s).then(f).then(h),fetchSiteConnectionData:()=>p(`${n}jetpack/v4/connection/data`,s).then(h),fetchSiteConnectionStatus:()=>p(`${n}jetpack/v4/connection`,s).then(h),fetchSiteConnectionTest:()=>p(`${n}jetpack/v4/connection/test`,s).then(f).then(h),fetchUserConnectionData:()=>p(`${n}jetpack/v4/connection/data`,s).then(h),fetchUserTrackingSettings:()=>p(`${n}jetpack/v4/tracking/settings`,s).then(f).then(h),updateUserTrackingSettings:t=>d(`${n}jetpack/v4/tracking/settings`,a,{body:JSON.stringify(t)}).then(f).then(h),disconnectSite:()=>d(`${n}jetpack/v4/connection`,a,{body:JSON.stringify({isActive:!1})}).then(f).then(h),fetchConnectUrl:()=>p(`${n}jetpack/v4/connection/url`,s).then(f).then(h),unlinkUser:()=>d(`${n}jetpack/v4/connection/user`,a,{body:JSON.stringify({linked:!1})}).then(f).then(h),reconnect:()=>d(`${n}jetpack/v4/connection/reconnect`,a).then(f).then(h),fetchConnectedPlugins:()=>p(`${n}jetpack/v4/connection/plugins`,s).then(f).then(h),setHasSeenWCConnectionModal:()=>d(`${n}jetpack/v4/seen-wc-connection-modal`,a).then(f).then(h),fetchModules:()=>p(`${n}jetpack/v4/module/all`,s).then(f).then(h),fetchModule:t=>p(`${n}jetpack/v4/module/${t}`,s).then(f).then(h),activateModule:t=>d(`${n}jetpack/v4/module/${t}/active`,a,{body:JSON.stringify({active:!0})}).then(f).then(h),deactivateModule:t=>d(`${n}jetpack/v4/module/${t}/active`,a,{body:JSON.stringify({active:!1})}),updateModuleOptions:(t,e)=>d(`${n}jetpack/v4/module/${t}`,a,{body:JSON.stringify(e)}).then(f).then(h),updateSettings:t=>d(`${n}jetpack/v4/settings`,a,{body:JSON.stringify(t)}).then(f).then(h),getProtectCount:()=>p(`${n}jetpack/v4/module/protect/data`,s).then(f).then(h),resetOptions:t=>d(`${n}jetpack/v4/options/${t}`,a,{body:JSON.stringify({reset:!0})}).then(f).then(h),activateVaultPress:()=>d(`${n}jetpack/v4/plugins`,a,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(f).then(h),getVaultPressData:()=>p(`${n}jetpack/v4/module/vaultpress/data`,s).then(f).then(h),installPlugin:(t,e)=>{const r={slug:t,status:"active"};return e&&(r.source=e),d(`${n}jetpack/v4/plugins`,a,{body:JSON.stringify(r)}).then(f).then(h)},activateAkismet:()=>d(`${n}jetpack/v4/plugins`,a,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(f).then(h),getAkismetData:()=>p(`${n}jetpack/v4/module/akismet/data`,s).then(f).then(h),checkAkismetKey:()=>p(`${n}jetpack/v4/module/akismet/key/check`,s).then(f).then(h),checkAkismetKeyTyped:t=>d(`${n}jetpack/v4/module/akismet/key/check`,a,{body:JSON.stringify({api_key:t})}).then(f).then(h),fetchStatsData:t=>p(function(t){let e=`${n}jetpack/v4/module/stats/data`;-1!==e.indexOf("?")?e+=`&range=${encodeURIComponent(t)}`:e+=`?range=${encodeURIComponent(t)}`;return e}(t),s).then(f).then(h).then(g),getPluginUpdates:()=>p(`${n}jetpack/v4/updates/plugins`,s).then(f).then(h),getPlans:()=>p(`${n}jetpack/v4/plans`,s).then(f).then(h),fetchSettings:()=>p(`${n}jetpack/v4/settings`,s).then(f).then(h),updateSetting:t=>d(`${n}jetpack/v4/settings`,a,{body:JSON.stringify(t)}).then(f).then(h),fetchSiteData:()=>p(`${n}jetpack/v4/site`,s).then(f).then(h).then((t=>JSON.parse(t.data))),fetchSiteFeatures:()=>p(`${n}jetpack/v4/site/features`,s).then(f).then(h).then((t=>JSON.parse(t.data))),fetchSiteProducts:()=>p(`${n}jetpack/v4/site/products`,s).then(f).then(h),fetchSitePurchases:()=>p(`${n}jetpack/v4/site/purchases`,s).then(f).then(h).then((t=>JSON.parse(t.data))),fetchSiteBenefits:()=>p(`${n}jetpack/v4/site/benefits`,s).then(f).then(h).then((t=>JSON.parse(t.data))),fetchSiteDiscount:()=>p(`${n}jetpack/v4/site/discount`,s).then(f).then(h).then((t=>t.data)),fetchSetupQuestionnaire:()=>p(`${n}jetpack/v4/setup/questionnaire`,s).then(f).then(h),fetchRecommendationsData:()=>p(`${n}jetpack/v4/recommendations/data`,s).then(f).then(h),fetchRecommendationsProductSuggestions:()=>p(`${n}jetpack/v4/recommendations/product-suggestions`,s).then(f).then(h),fetchRecommendationsUpsell:()=>p(`${n}jetpack/v4/recommendations/upsell`,s).then(f).then(h),fetchRecommendationsConditional:()=>p(`${n}jetpack/v4/recommendations/conditional`,s).then(f).then(h),saveRecommendationsData:t=>d(`${n}jetpack/v4/recommendations/data`,a,{body:JSON.stringify({data:t})}).then(f),fetchProducts:()=>p(`${n}jetpack/v4/products`,s).then(f).then(h),fetchRewindStatus:()=>p(`${n}jetpack/v4/rewind`,s).then(f).then(h).then((t=>JSON.parse(t.data))),fetchScanStatus:()=>p(`${n}jetpack/v4/scan`,s).then(f).then(h).then((t=>JSON.parse(t.data))),dismissJetpackNotice:t=>d(`${n}jetpack/v4/notice/${t}`,a,{body:JSON.stringify({dismissed:!0})}).then(f).then(h),fetchPluginsData:()=>p(`${n}jetpack/v4/plugins`,s).then(f).then(h),fetchIntroOffers:()=>p(`${n}jetpack/v4/intro-offers`,s).then(f).then(h),fetchVerifySiteGoogleStatus:t=>p(null!==t?`${n}jetpack/v4/verify-site/google/${t}`:`${n}jetpack/v4/verify-site/google`,s).then(f).then(h),verifySiteGoogle:t=>d(`${n}jetpack/v4/verify-site/google`,a,{body:JSON.stringify({keyring_id:t})}).then(f).then(h),sendMobileLoginEmail:()=>d(`${n}jetpack/v4/mobile/send-login-email`,a).then(f).then(h),submitSurvey:t=>d(`${n}jetpack/v4/marketing/survey`,a,{body:JSON.stringify(t)}).then(f).then(h),saveSetupQuestionnaire:t=>d(`${n}jetpack/v4/setup/questionnaire`,a,{body:JSON.stringify(t)}).then(f).then(h),updateLicensingError:t=>d(`${n}jetpack/v4/licensing/error`,a,{body:JSON.stringify(t)}).then(f).then(h),updateLicenseKey:t=>d(`${n}jetpack/v4/licensing/set-license`,a,{body:JSON.stringify({license:t})}).then(f).then(h),getUserLicensesCounts:()=>p(`${n}jetpack/v4/licensing/user/counts`,s).then(f).then(h),getUserLicenses:()=>p(`${n}jetpack/v4/licensing/user/licenses`,s).then(f).then(h),updateLicensingActivationNoticeDismiss:t=>d(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,a,{body:JSON.stringify({last_detached_count:t})}).then(f).then(h),updateRecommendationsStep:t=>d(`${n}jetpack/v4/recommendations/step`,a,{body:JSON.stringify({step:t})}).then(f),confirmIDCSafeMode:()=>d(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,a).then(f),startIDCFresh:t=>d(`${n}jetpack/v4/identity-crisis/start-fresh`,a,{body:JSON.stringify({redirect_uri:t})}).then(f).then(h),migrateIDC:()=>d(`${n}jetpack/v4/identity-crisis/migrate`,a).then(f),attachLicenses:t=>d(`${n}jetpack/v4/licensing/attach-licenses`,a,{body:JSON.stringify({licenses:t})}).then(f).then(h),fetchSearchPlanInfo:()=>p(`${n}jetpack/v4/search/plan`,s).then(f).then(h),fetchSearchSettings:()=>p(`${n}jetpack/v4/search/settings`,s).then(f).then(h),updateSearchSettings:t=>d(`${n}jetpack/v4/search/settings`,a,{body:JSON.stringify(t)}).then(f).then(h),fetchSearchStats:()=>p(`${n}jetpack/v4/search/stats`,s).then(f).then(h),fetchWafSettings:()=>p(`${n}jetpack/v4/waf`,s).then(f).then(h),fetchWordAdsSettings:()=>p(`${n}jetpack/v4/wordads/settings`,s).then(f).then(h),updateWordAdsSettings:t=>d(`${n}jetpack/v4/wordads/settings`,a,{body:JSON.stringify(t)}),fetchSearchPricing:()=>p(`${n}jetpack/v4/search/pricing`,s).then(f).then(h)};function p(t,e){return fetch(u(t),e)}function d(t,e,n){return fetch(t,(0,r.assign)({},e,n)).catch(m)}function g(t){return t.general&&void 0===t.general.response||t.week&&void 0===t.week.response||t.month&&void 0===t.month.response?t:{}}(0,r.assign)(this,l)};function f(t){return t.status>=200&&t.status<300?t:404===t.status?new Promise((()=>{throw t.redirected?new l(t.redirected):new u})):t.json().catch((t=>g(t))).then((e=>{const n=new Error(`${e.message} (Status ${t.status})`);throw n.response=e,n.name="ApiError",n}))}function h(t){return t.json().catch((e=>g(e,t.redirected,t.url)))}function g(t,e,n){throw e?new a(n):new s}function m(){throw new p}e.ZP=d},1163:function(t,e,n){"use strict";var r=n(9196),o=n.n(r),i=n(5736),c=n(5844),s=n.n(c),a=n(5235),u=n.n(a),l=n(1494),p=n(2392),d=n(1202),f=n(8218),h=n(2939);const __=i.__,g=t=>{const{children:e,moduleName:n,moduleNameHref:r,a8cLogoHref:i,showHeader:c,showFooter:s,showBackground:a,header:g}=t,m=u()(l.Z["admin-page"],{[l.Z.background]:a});return o().createElement("div",{className:m},c&&o().createElement(f.Z,{horizontalSpacing:5},o().createElement(h.Z,null,g||o().createElement(d.Z,null))),o().createElement(f.Z,{fluid:!0,horizontalSpacing:0},o().createElement(h.Z,null,e)),s&&o().createElement(f.Z,{horizontalSpacing:5},o().createElement(h.Z,null,o().createElement(p.Z,{moduleName:n,a8cLogoHref:i,moduleNameHref:r}))))};g.defaultProps={moduleName:__("Jetpack","jetpack-wordads"),showHeader:!0,header:null,showFooter:!0,showBackground:!0},g.propTypes={a8cLogoHref:s().string,moduleName:s().string,showHeader:s().bool,header:s().node,showFooter:s().bool,moduleNameHref:s().string,showBackground:s().bool},e.Z=g},8038:function(t,e,n){"use strict";var r=n(9196),o=n.n(r),i=n(511);e.Z=t=>{const{children:e}=t;return o().createElement("div",{className:i.Z.section},e)}},207:function(t,e,n){"use strict";var r=n(2402),o=n.n(r),i=n(9196),c=n.n(i),s=n(5235),a=n.n(s),u=n(5736),l=n(5844),p=n.n(l);const __=u.__,d=t=>{const{title:e,height:n,className:r,...i}=t;return c().createElement("svg",o()({role:"img",x:"0",y:"0",viewBox:"0 0 935 38.2",enableBackground:"new 0 0 935 38.2","aria-labelledby":"jp-automattic-byline-logo-title",height:n,className:a()("jp-automattic-byline-logo",r)},i),c().createElement("title",{id:"jp-automattic-byline-logo-title"},e),c().createElement("path",{d:"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"}),c().createElement("path",{d:"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z"}),c().createElement("path",{d:"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7zM886.2 37l-23.4-24.1 -2.3-2.5V37h-6.8V1h6.5l22.7 24.1 2.3 2.6V1h6.8v36H886.2zM902.3 37V1H935v5.6h-26v9.2h20v5.5h-20v10.1h26V37H902.3z"}))};d.defaultProps={title:__("An Automattic Airline","jetpack-wordads"),height:7,className:""},d.propTypes={title:p().string,height:p().number,className:p().string},e.Z=d},900:function(t,e,n){"use strict";var r=n(8294),o=n.n(r),i=n(9196),c=n.n(i),s=n(5736);n(5785);const __=s.__;class a extends i.Component{needsOffset(t,e){return["gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-info","gridicons-info-outline","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(t)>=0&&e%18==0}getSVGTitle(t){if("title"in this.props)return this.props.title?c().createElement("title",null,this.props.title):null;switch(t){default:return null;case"gridicons-audio":return c().createElement("title",null,__("Has audio.","jetpack-wordads"));case"gridicons-calendar":return c().createElement("title",null,__("Is an event.","jetpack-wordads"));case"gridicons-cart":return c().createElement("title",null,__("Is a product.","jetpack-wordads"));case"chevron-down":return c().createElement("title",null,__("Show filters","jetpack-wordads"));case"gridicons-comment":return c().createElement("title",null,__("Matching comment.","jetpack-wordads"));case"gridicons-cross":return c().createElement("title",null,__("Close.","jetpack-wordads"));case"gridicons-filter":return c().createElement("title",null,__("Toggle search filters.","jetpack-wordads"));case"gridicons-folder":return c().createElement("title",null,__("Category","jetpack-wordads"));case"gridicons-info":case"gridicons-info-outline":return c().createElement("title",null,__("Information.","jetpack-wordads"));case"gridicons-image-multiple":return c().createElement("title",null,__("Has multiple images.","jetpack-wordads"));case"gridicons-image":return c().createElement("title",null,__("Has an image.","jetpack-wordads"));case"gridicons-page":return c().createElement("title",null,__("Page","jetpack-wordads"));case"gridicons-post":return c().createElement("title",null,__("Post","jetpack-wordads"));case"gridicons-jetpack-search":case"gridicons-search":return c().createElement("title",null,__("Magnifying Glass","jetpack-wordads"));case"gridicons-tag":return c().createElement("title",null,__("Tag","jetpack-wordads"));case"gridicons-video":return c().createElement("title",null,__("Has a video.","jetpack-wordads"))}}renderIcon(t){switch(t){default:return null;case"gridicons-audio":return c().createElement("g",null,c().createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"}));case"gridicons-block":return c().createElement("g",null,c().createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"}));case"gridicons-calendar":return c().createElement("g",null,c().createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"}));case"gridicons-cart":return c().createElement("g",null,c().createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"}));case"gridicons-checkmark":return c().createElement("g",null,c().createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"}));case"gridicons-chevron-down":return c().createElement("g",null,c().createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"}));case"gridicons-comment":return c().createElement("g",null,c().createElement("path",{d:"M3 6v9c0 1.105.895 2 2 2h9v5l5.325-3.804c1.05-.75 1.675-1.963 1.675-3.254V6c0-1.105-.895-2-2-2H5c-1.105 0-2 .895-2 2z"}));case"gridicons-cross":return c().createElement("g",null,c().createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"}));case"gridicons-filter":return c().createElement("g",null,c().createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"}));case"gridicons-folder":return c().createElement("g",null,c().createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"}));case"gridicons-image":return c().createElement("g",null,c().createElement("path",{d:"M13 9.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5zM22 6v12c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2zm-2 0H4v7.444L8 9l5.895 6.55 1.587-1.85c.798-.932 2.24-.932 3.037 0L20 15.426V6z"}));case"gridicons-image-multiple":return c().createElement("g",null,c().createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"}));case"gridicons-info":return c().createElement("g",null,c().createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}));case"gridicons-info-outline":return c().createElement("g",null,c().createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"}));case"gridicons-jetpack-search":return c().createElement("g",null,c().createElement("path",{d:"M0 9.257C0 4.15 4.151 0 9.257 0c5.105 0 9.256 4.151 9.256 9.257a9.218 9.218 0 01-2.251 6.045l.034.033h1.053L24 22.01l-1.986 1.989-6.664-6.662v-1.055l-.033-.033a9.218 9.218 0 01-6.06 2.264C4.15 18.513 0 14.362 0 9.257zm4.169 1.537h4.61V1.82l-4.61 8.973zm5.547-3.092v8.974l4.61-8.974h-4.61z"}));case"gridicons-pages":return c().createElement("g",null,c().createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"}));case"gridicons-posts":return c().createElement("g",null,c().createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"}));case"gridicons-search":return c().createElement("g",null,c().createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"}));case"gridicons-star-outline":return c().createElement("g",null,c().createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"}));case"gridicons-star":return c().createElement("g",null,c().createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}));case"gridicons-tag":return c().createElement("g",null,c().createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"}));case"gridicons-video":return c().createElement("g",null,c().createElement("path",{d:"M20 4v2h-2V4H6v2H4V4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2v-2h2v2h12v-2h2v2c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 16H4v-3h2v3zm0-5H4V8h2v3zm4 4V9l4.5 3-4.5 3zm10 1h-2v-3h2v3zm0-5h-2V8h2v3z"}))}}render(){const{size:t=24,className:e=""}=this.props,n=this.props.height||t,r=this.props.width||t,o=this.props.style||{height:n,width:r},i="gridicons-"+this.props.icon;let s=["gridicon",i,e];return this.needsOffset(i,t)&&s.push("needs-offset"),s=s.join(" "),c().createElement("svg",{className:s,focusable:this.props.focusable,height:n,onClick:this.props.onClick,style:o,viewBox:"0 0 24 24",width:r,xmlns:"http://www.w3.org/2000/svg","aria-hidden":this.props["aria-hidden"]},this.getSVGTitle(i),this.renderIcon(i))}}o()(a,"defaultProps",{"aria-hidden":"false",focusable:"true"}),e.Z=a},2392:function(t,e,n){"use strict";var r=n(2402),o=n.n(r),i=n(9196),c=n.n(i),s=n(5736),a=n(5235),u=n.n(a),l=n(5844),p=n.n(l),d=n(207),f=(n(9054),n(1202));const __=s.__,h=t=>{const{a8cLogoHref:e,moduleName:n,className:r,moduleNameHref:i,...s}=t;return c().createElement("div",o()({className:u()("jp-dashboard-footer",r)},s),c().createElement("div",{className:"jp-dashboard-footer__footer-left"},c().createElement(f.Z,{logoColor:"#000",showText:!1,height:16,className:"jp-dashboard-footer__jetpack-symbol","aria-label":__("Jetpack logo","jetpack-wordads")}),c().createElement("span",{className:"jp-dashboard-footer__module-name"},i?c().createElement("a",{href:i,"aria-label":n},n):n)),c().createElement("div",{className:"jp-dashboard-footer__footer-right"},c().createElement("a",{href:e,"aria-label":__("An Automattic Airline","jetpack-wordads")},c().createElement(d.Z,null))))};h.defaultProps={a8cLogoHref:"https://automattic.com",moduleName:__("Jetpack","jetpack-wordads"),className:"",moduleNameHref:"https://jetpack.com"},h.propTypes={a8cLogoHref:p().string,moduleName:p().string,className:p().string,moduleNameHref:p().string},e.Z=h},1202:function(t,e,n){"use strict";var r=n(2402),o=n.n(r),i=n(8294),c=n.n(i),s=n(5844),a=n.n(s),u=n(9196),l=n.n(u),p=n(5235),d=n.n(p),f=n(5736);const __=f.__;class h extends l().Component{render(){const{logoColor:t,showText:e,className:n,...r}=this.props,i=e?"0 0 118 32":"0 0 32 32";return l().createElement("svg",o()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:i,className:d()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title"},r),l().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-wordads")),l().createElement("path",{fill:t,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),e&&l().createElement(u.Fragment,null,l().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),l().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),l().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),l().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),l().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),l().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),l().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}c()(h,"propTypes",{className:a().string,width:a().number,height:a().number,showText:a().bool,logoColor:a().string}),c()(h,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"}),e.Z=h},2939:function(t,e,n){"use strict";var r=n(9196),o=n.n(r),i=n(5235),c=n.n(i),s=n(5844),a=n.n(s),u=n(3080);const l=Number(u.Z.smCols),p=Number(u.Z.mdCols),d=Number(u.Z.lgCols),f=t=>{var e,n,r,i,s,a,f,h,g,m,v,y,b,j,w;const{children:x,className:k}=t,_=Math.min(l,null!==(e=null==t?void 0:t.sm)&&void 0!==e?e:l),C=Math.min(l,null!==(n=null==t||null===(r=t.sm)||void 0===r?void 0:r.start)&&void 0!==n?n:0),E=Math.min(l,null!==(i=null==t||null===(s=t.sm)||void 0===s?void 0:s.end)&&void 0!==i?i:0),S=Math.min(p,null!==(a=null==t?void 0:t.md)&&void 0!==a?a:p),O=Math.min(p,null!==(f=null==t||null===(h=t.md)||void 0===h?void 0:h.start)&&void 0!==f?f:0),N=Math.min(p,null!==(g=null==t||null===(m=t.md)||void 0===m?void 0:m.end)&&void 0!==g?g:0),z=Math.min(d,null!==(v=null==t?void 0:t.lg)&&void 0!==v?v:d),A=Math.min(d,null!==(y=null==t||null===(b=t.lg)||void 0===b?void 0:b.start)&&void 0!==y?y:0),M=Math.min(d,null!==(j=null==t||null===(w=t.lg)||void 0===w?void 0:w.end)&&void 0!==j?j:0),P=c()(k,{[u.Z[`col-sm-${_}`]]:!(C&&E),[u.Z[`col-sm-${C}-start`]]:C>0,[u.Z[`col-sm-${E}-end`]]:E>0,[u.Z[`col-md-${S}`]]:!(O&&N),[u.Z[`col-md-${O}-start`]]:O>0,[u.Z[`col-md-${N}-end`]]:N>0,[u.Z[`col-lg-${z}`]]:!(A&&M),[u.Z[`col-lg-${A}-start`]]:A>0,[u.Z[`col-lg-${M}-end`]]:M>0});return o().createElement("div",{className:P},x)};f.proptypes={className:a().string,sm:a().oneOfType([a().number,a().shape({start:a().number,end:a().number})]),md:a().oneOfType([a().number,a().shape({start:a().number,end:a().number})]),lg:a().oneOfType([a().number,a().shape({start:a().number,end:a().number})]),children:a().node},e.Z=f},8218:function(t,e,n){"use strict";var r=n(9196),o=n.n(r),i=n(5235),c=n.n(i),s=n(5844),a=n.n(s),u=n(8730);const l=t=>{const{children:e,fluid:n,className:r}=t,i=`calc( var(--horizontal-spacing) * ${t.horizontalSpacing} )`,s={paddingTop:i,paddingBottom:i,rowGap:`calc( var(--horizontal-spacing) * ${t.horizontalGap} )`},a=c()(r,u.Z.container,{[u.Z.fluid]:n});return o().createElement("div",{className:a,style:s},e)};l.propTypes={fluid:a().bool,className:a().string,horizontalSpacing:a().number,horizontalGap:a().number,children:a().node},l.defaultProps={fluid:!1,horizontalGap:1,horizontalSpacing:1},e.Z=l},5033:function(t,e,n){"use strict";var r=n(9196),o=n.n(r),i=n(5844),c=n.n(i);n(1683);const s=t=>{const e=t.className+" jp-components-spinner",n={width:t.size,height:t.size,fontSize:t.size,borderTopColor:t.color},r={borderTopColor:t.color,borderRightColor:t.color};return o().createElement("div",{className:e},o().createElement("div",{className:"jp-components-spinner__outer",style:n},o().createElement("div",{className:"jp-components-spinner__inner",style:r})))};s.propTypes={color:c().string,className:c().string,size:c().number},s.defaultProps={color:"#FFFFFF",className:"",size:20},e.Z=s},6016:function(t,e,n){"use strict";var r=n(9196),o=n.n(r);const i={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},c={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-80":"#2C3338","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-20":"#F0C930","--jp-yellow-40":"#C08C00","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},s={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},a={"--spacing-base":"8px"},u={},l=(t,e)=>{const n={...i,...c,...s,...a};for(const e in n)t.style.setProperty(e,n[e]);e&&(u[e]={provided:!0,root:t})};e.ZP=t=>{var e;let{children:n=null,targetDom:i,id:c}=t;const s=(0,r.useRef)(),a=null==u||null===(e=u[c])||void 0===e?void 0:e.provided;return(0,r.useLayoutEffect)((()=>{if(!a)return i?l(i,c):void(null!=s&&s.current&&l(s.current,c))}),[i,s,a,c]),i?n:o().createElement("div",{ref:s},n)}},1132:function(t,e,n){let r={};try{r=n(9257)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),r={missingConfig:!0}}const o=t=>r.hasOwnProperty(t);t.exports={jetpackConfigHas:o,jetpackConfigGet:t=>{if(!o(t))throw'This app requires the "'+t+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return r[t]}}},8195:function(t,e,n){"use strict";var r=n(8294),o=n.n(r),i=n(5162),c=n.n(i),s=n(9196),a=n.n(s),u=n(5235),l=n.n(u),p=n(2515),d=n.n(p),f=n(8520),h=n.n(f),g=n(900);class m extends a().Component{constructor(){super(...arguments),o()(this,"_renderWithTitle",(()=>{const t="dops-card-section-orient-"+(this.props.vertical?"vertical":"horizontal");return a().createElement("div",{className:t},a().createElement("h4",{ref:"label",className:"dops-card-section-label"},this.props.title),a().createElement("div",{ref:"content",className:"dops-card-section-content"},this.props.children))}))}render(){return a().createElement("div",{className:l()("dops-card-section",this.props.className),style:this.props.style},this.props.title?this._renderWithTitle():this.props.children)}}o()(m,"propTypes",{title:c().any,vertical:c().any,style:c().object,className:c().string,device:c().oneOf(["desktop","tablet","phone"])}),o()(m,"defaultProps",{vertical:null});class v extends a().Component{render(){return a().createElement("div",{className:"dops-card-footer"},this.props.children)}}class y extends a().Component{constructor(){super(...arguments),o()(this,"_renderIcon",(()=>a().createElement("span",{className:"dops-card-icon",style:{color:this.props.iconColor}},this.props.icon&&a().createElement(g.Z,{icon:this.props.icon,style:{backgroundColor:this.props.iconColor}}),this.props.iconLabel)))}render(){const t=l()("dops-card",this.props.className,{"is-card-link":!!this.props.href,"is-compact":this.props.compact}),e=["compact","tagName","meta","iconColor"];let n,r;return this.props.href?n=a().createElement(g.Z,{className:"dops-card__link-indicator",icon:this.props.target?"external":"chevron-right"}):e.push("href","target"),this.props.title&&(r=a().createElement("h2",{className:"dops-card-title"},this.props.title,this.props.meta&&a().createElement("span",{className:"dops-card-meta"},this.props.meta),(this.props.icon||this.props.iconLabel)&&this._renderIcon())),a().createElement(this.props.href?"a":this.props.tagName,d()(h()(this.props,e),{className:t}),n,r,this.props.children)}}o()(y,"propTypes",{meta:c().any,icon:c().string,iconLabel:c().any,iconColor:c().string,style:c().object,className:c().string,href:c().string,onClick:c().func,title:c().string,tagName:c().string,target:c().string,compact:c().bool,children:c().node}),o()(y,"defaultProps",{iconColor:"#787878",className:"",tagName:"div",onClick:()=>{}}),y.Section=m,y.Footer=v,e.Z=y},6211:function(t,e,n){"use strict";n.d(e,{Z:function(){return v}});var r=n(9196),o=n.n(r),i=n(9818),c=n(5736),s=n(6975),a=n(4743),u=n(5033),l=n(1163),p=n(8038),d=n(8218),f=n(2939),h=n(2794),g=n(2897),m=n(9268);const __=c.__;function v(){(0,i.useSelect)((t=>t(g.t).getWordAdsModuleStatus()),[]);const t=(0,i.useSelect)((t=>t(g.t).getSiteAdminUrl()))+"admin.php?page=jetpack_about",e=(0,i.useDispatch)(g.t).updateJetpackSettings,n=(0,i.useSelect)((t=>t(g.t).isModuleEnabled())),c=(0,i.useSelect)((t=>t(g.t).isUpdatingJetpackSettings())),v=(0,i.useSelect)((t=>t(g.t).isTogglingModule())),y=(0,i.useSelect)((t=>t(g.t).isResolving("getWordAdsModuleStatus")||!t(g.t).hasStartedResolution("getWordAdsModuleStatus"))),b=(0,i.useDispatch)(g.t).removeNotice,j=(0,i.useSelect)((t=>t(g.t).getNotices()),[]);return(0,r.useMemo)((()=>{const t=(0,i.select)(g.t).getAPIRootUrl(),e=(0,i.select)(g.t).getAPINonce();t&&a.ZP.setApiRoot(t),e&&a.ZP.setApiNonce(e),(()=>{const t=(0,i.select)(g.t).getWpcomUser(),e=(0,i.select)(g.t).getBlogId();t&&s.Z.initialize(t.ID,t.login,{blog_id:e})})(),s.Z.tracks.recordEvent("jetpack_wordads_admin_page_view",{current_version:(0,i.select)(g.t).getVersion()})}),[]),o().createElement(r.Fragment,null,y&&o().createElement(u.Z,{className:"jp-wordads-dashboard-page-loading-spinner",color:"#000",size:32}),!y&&o().createElement(l.Z,{a8cLogoHref:t,moduleName:__("WordAds","jetpack-wordads")},o().createElement(p.Z,null,o().createElement(d.Z,{horizontalSpacing:5},o().createElement(f.Z,{sm:4},o().createElement(h.Z,{updateOptions:e,isModuleEnabled:n,isSavingOptions:c,isTogglingModule:v}))))),o().createElement(m.Z,{notices:j,handleLocalNoticeDismissClick:b}))}},2668:function(t,e,n){"use strict";n.d(e,{Z:function(){return h}});var r=n(2402),o=n.n(r),i=n(8294),c=n.n(i),s=n(9196),a=n.n(s),u=n(5235),l=n.n(u),p=n(8520),d=n.n(p),f=n(6450);class h extends a().Component{render(){return a().createElement(f.Z,o()({},d()(this.props,"className"),{className:l()(this.props.className,"is-compact")}),this.props.children)}}c()(h,"displayName","CompactFormToggle")},6450:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});var r=n(8294),o=n.n(r),i=n(5162),c=n.n(i),s=n(9196),a=n.n(s),u=n(5235),l=n.n(u);class p extends s.Component{constructor(){super(...arguments),o()(this,"state",{}),this.onKeyDown=this.onKeyDown.bind(this),this.onClick=this.onClick.bind(this),this.onLabelClick=this.onLabelClick.bind(this)}UNSAFE_componentWillMount(){this.id=this.constructor.idNum++}onKeyDown(t){this.props.disabled||("Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.props.onChange()),this.props.onKeyDown(t))}onClick(){this.props.disabled||this.props.onChange()}onLabelClick(t){if(this.props.disabled)return;const e=t.target.nodeName.toLowerCase();"a"!==e&&"input"!==e&&"select"!==e&&(t.preventDefault(),this.props.onChange())}render(){const t=this.props.id||"toggle-"+this.id,e=l()("form-toggle",this.props.className,{"is-toggling":this.props.toggling});return a().createElement(s.Fragment,null,a().createElement("div",{className:l()("form-toggle__switch-container",this.props.switchClassNames)},a().createElement("input",{className:e,type:"checkbox",checked:this.props.checked,readOnly:!0,disabled:this.props.disabled}),a().createElement("span",{className:l()("form-toggle__switch",this.props.switchClassNames),disabled:this.props.disabled,id:t,onClick:this.onClick,onKeyDown:this.onKeyDown,role:"checkbox","aria-checked":this.props.checked,"aria-label":this.props["aria-label"],tabIndex:this.props.disabled?-1:0,ref:"toggleSwitch"})),a().createElement("label",{className:l()("form-toggle__label",this.props.labelClassNames),htmlFor:t},a().createElement("span",{className:l()("form-toggle__label-content",this.props.labelClassNames),onClick:this.onLabelClick},this.props.children)))}}o()(p,"propTypes",{onChange:c().func,onKeyDown:c().func,checked:c().bool,disabled:c().bool,id:c().string,className:c().string,toggling:c().bool,"aria-label":c().string,children:c().node,disabledReason:c().node,switchClassNames:c().string,labelClassNames:c().string}),o()(p,"defaultProps",{checked:!1,disabled:!1,onKeyDown:()=>{},onChange:()=>{},disabledReason:""}),o()(p,"idNum",0)},9268:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(9196),o=n.n(r),i=n(4034),c=n(8448);function s(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{handleLocalNoticeDismissClick:null,notices:Object.freeze([])};const e=t.notices.map((function(e){const n=e=>()=>{e&&t.handleLocalNoticeDismissClick(e.id)};return o().createElement(i.Z,{key:"notice-"+e.id,status:e.status,duration:e.duration||null,text:e.text,isCompact:e.isCompact,onDismissClick:n(e),showDismiss:e.showDismiss},e.button&&o().createElement(c.Z,{href:e.href,onClick:n(e)},e.button))}));return e.length?o().createElement("div",{id:t.id,className:"global-notices"},e):null}},3459:function(t,e,n){"use strict";n.d(e,{Iz:function(){return f},MQ:function(){return h},RT:function(){return l},b3:function(){return c},mF:function(){return s},tF:function(){return p}});var r=n(5348),o=n.n(r),i=n(5736);const __=i.__,c="CREATE_NOTICE",s="REMOVE_NOTICE";function a(t,e){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={id:r.id||o()(),duration:null!==(n=r.duration)&&void 0!==n?n:2e3,showDismiss:"boolean"!=typeof r.showDismiss||r.showDismiss,isPersistent:r.isPersistent||!1,displayOnNextPage:r.displayOnNextPage||!1,status:t,text:e};return{type:c,notice:i}}function u(t){return{type:s,notice:{id:t}}}const l=a.bind(null,"is-success"),p=a.bind(null,"is-error"),d=(a.bind(null,"is-info"),a.bind(null,"is-warning")),f=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:__("Updating settings…","jetpack-wordads");return a("is-info",t,{duration:3e4,id:"search-updating-settings"})},h=()=>u("search-updating-settings");e.ZP={createNotice:a,removeNotice:u,successNotice:l,errorNotice:p,warningNotice:d,updatingNotice:f,removeUpdatingNotice:h}},2963:function(t,e,n){"use strict";var r=n(3459);e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{notices:[]},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case r.b3:return{...t,notices:[...t.notices,e.notice]};case r.mF:return{...t,notices:t.notices.filter((t=>t.id!==e.notice.id))}}return t}},5260:function(t,e){"use strict";e.Z={getNotices:t=>{var e;return null!==(e=t.notices.notices)&&void 0!==e?e:[]}}},2794:function(t,e,n){"use strict";n.d(e,{Z:function(){return d}});var r=n(9196),o=n.n(r),i=n(5235),c=n.n(i),s=n(5736),a=n(6975),u=n(8195),l=n(2668);const __=s.__,p=__("Earn income by allowing Jetpack to display high quality ads.","jetpack-wordads");function d(t){let{updateOptions:e,isSavingOptions:n,isModuleEnabled:i,isTogglingModule:s}=t;const d=(0,r.useCallback)((()=>{const t={module_active:!i};e(t),a.Z.tracks.recordEvent("jetpack_wordads_module_toggle",t)}),[i,e]);return o().createElement("div",{className:"jp-form-settings-group jp-form-wordads-settings-group"},o().createElement(u.Z,{className:c()({"jp-form-has-child":!0,"jp-form-settings-disable":!1})},o().createElement("div",{className:"jp-form-wordads-settings-group-inside"},o().createElement("div",{className:"jp-form-wordads-settings-group__toggle is-search jp-wordads-dashboard-wrap"},o().createElement("div",{className:"jp-wordads-dashboard-row"},o().createElement("div",{className:"lg-col-span-2 md-col-span-1 sm-col-span-0"}),o().createElement(l.Z,{checked:i,disabled:n,onChange:d,toggling:s,className:"is-wordads-admin",switchClassNames:"lg-col-span-1 md-col-span-1 sm-col-span-1",labelClassNames:" lg-col-span-7 md-col-span-5 sm-col-span-3","aria-label":__("Enable WordAds","jetpack-wordads")},__("Enable WordAds","jetpack-wordads")),o().createElement("div",{className:"lg-col-span-2 md-col-span-1 sm-col-span-0"})),o().createElement("div",{className:"jp-wordads-dashboard-row"},o().createElement("div",{className:"lg-col-span-3 md-col-span-2 sm-col-span-1"}),o().createElement("div",{className:"jp-form-wordads-settings-group__toggle-description lg-col-span-7 md-col-span-5 sm-col-span-3"},o().createElement("p",{className:"jp-form-wordads-settings-group__toggle-explanation"},p)),o().createElement("div",{className:"lg-col-span-2 md-col-span-1 sm-col-span-0"}))))))}},4034:function(t,e,n){"use strict";n.d(e,{Z:function(){return h}});var r=n(8294),o=n.n(r),i=n(5162),c=n.n(i),s=n(9196),a=n.n(s),u=n(5235),l=n.n(u),p=n(6697),d=n.n(p),f=n(900);class h extends a().Component{constructor(){super(...arguments),o()(this,"dismissTimeout",null),o()(this,"getIcon",(()=>{let t;switch(this.props.status){case"is-info":default:t="info";break;case"is-success":t="checkmark";break;case"is-error":case"is-warning":t="notice"}return t})),o()(this,"clearText",(t=>"string"==typeof t?t.replace(/(<([^>]+)>)/gi,""):t)),o()(this,"onKeyDownCallback",(t=>e=>{13!==e.which&&32!==e.which||t&&t(e)}))}componentDidMount(){this.props.duration>0&&(this.dismissTimeout=setTimeout(this.props.onDismissClick,this.props.duration))}componentWillUnmount(){this.dismissTimeout&&clearTimeout(this.dismissTimeout)}render(){const{children:t,className:e,icon:n,isCompact:r,onDismissClick:o,showDismiss:i=!r,status:c,text:s,dismissText:u}=this.props,p=l()("dops-notice",c,e,{"is-compact":r,"is-dismissable":i});return a().createElement("div",{className:p},a().createElement("span",{className:"dops-notice__icon-wrapper"},a().createElement(f.Z,{className:"dops-notice__icon",icon:n||this.getIcon(),size:24})),a().createElement("span",{className:"dops-notice__content"},a().createElement("span",{className:"dops-notice__text"},s?this.clearText(s):t)),s?t:null,i&&a().createElement("span",{role:"button",onKeyDown:this.onKeyDownCallback(o),tabIndex:"0",className:"dops-notice__dismiss",onClick:o},a().createElement(f.Z,{icon:"cross",size:24}),a().createElement("span",{className:"dops-notice__screen-reader-text screen-reader-text"},u)))}}o()(h,"displayName","SimpleNotice"),o()(h,"defaultProps",{duration:0,status:null,showDismiss:!0,className:"",onDismissClick:d()}),o()(h,"propTypes",{status:c().string,showDismiss:c().bool,isCompact:c().bool,duration:c().number,text:c().oneOfType([c().oneOfType([c().string,c().node]),c().arrayOf(c().oneOfType([c().string,c().node]))]),icon:c().string,onDismissClick:c().func,className:c().string})},8448:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(8294),o=n.n(r),i=n(5162),c=n.n(i),s=n(9196),a=n.n(s),u=n(900);class l extends a().Component{render(){const t={className:"dops-notice__action",href:this.props.href,onClick:this.props.onClick};return this.props.external&&(t.target="_blank"),a().createElement("a",t,a().createElement("span",null,this.props.children),this.props.icon&&a().createElement(u.Z,{icon:this.props.icon,size:24}),this.props.external&&a().createElement(u.Z,{icon:"external",size:24}))}}o()(l,"displayName","NoticeAction"),o()(l,"propTypes",{href:c().string,onClick:c().func,external:c().bool,icon:c().string}),o()(l,"defaultProps",{external:!1})},8210:function(t,e,n){"use strict";var r=n(1862),o=n(3459);const i={...r.ZP,...o.ZP};e.Z=i},1862:function(t,e,n){"use strict";n.d(e,{ff:function(){return p},yY:function(){return l}});var r=n(1962),o=n.n(r),i=n(9818),c=n(5736),s=n(7029),a=n(3459),u=n(2897);const __=c.__,l="SET_WORDADS_SETTINGS";function p(t){return{type:l,options:t}}e.ZP={updateJetpackSettings:function*(t){try{yield(0,a.Iz)(),yield p({is_updating:!0}),yield p(t),yield(0,s.Lk)(t);const e=yield(0,s.M6)();return yield p(e),(0,a.RT)(__("Updated settings.","jetpack-wordads"))}catch(t){const e=o()((0,i.select)(u.t).getWordAdsModuleStatus(),["module_active"]);return yield p(e),(0,a.tF)(__("Error Update settings…","jetpack-wordads"))}finally{yield(0,a.MQ)(),yield p({is_updating:!1})}},setJetpackSettings:p}},7029:function(t,e,n){"use strict";n.d(e,{Lk:function(){return s},M6:function(){return c}});var r=n(4743);const o="FETCH_WORDADS_SETTINGS",i="UPDATE_WORDADS_SETTINGS",c=()=>({type:o}),s=t=>({type:i,settings:t});e.ZP={[o]:function(){return r.ZP.fetchWordAdsSettings()},[i]:function(t){return r.ZP.updateWordAdsSettings(t.settings)}}},2897:function(t,e,n){"use strict";n.d(e,{i:function(){return u},t:function(){return a}});var r=n(7529),o=n(8210),i=n(8869),c=n(5440),s=n(7029);const a="jetpack-wordads-plugin",u={reducer:r.Z,actions:o.Z,selectors:i.Z,resolvers:c.Z,controls:s.ZP,initialState:window.WORDADS_DASHBOARD_INITIAL_STATE||{}}},3326:function(t,e){"use strict";e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t}},7529:function(t,e,n){"use strict";var r=n(9818),o=n(5934),i=n(6819),c=n(3784),s=n(3326),a=n(2963);const u=(0,r.combineReducers)({siteData:o.Z,jetpackSettings:c.Z,userData:i.Z,features:s.Z,notices:a.Z});e.Z=u},3784:function(t,e,n){"use strict";var r=n(1862);e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return e.type===r.yY?{...t,...e.options,is_toggling_module:t.module_active!==e.options.module_active&&!!e.options.is_updating,is_toggling_instant_search:t.instant_search_enabled!==e.options.instant_search_enabled&&!!e.options.is_updating}:t}},5934:function(t,e){"use strict";e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t}},6819:function(t,e){"use strict";e.Z=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t}},5440:function(t,e,n){"use strict";var r=n(5736),o=n(7029),i=n(1862),c=n(3459);const __=r.__;e.Z={getWordAdsModuleStatus:function*(){try{const t=yield(0,o.M6)();if(t)return(0,i.ff)(t)}catch(t){return(0,c.tF)(__("Error fetching settings…","jetpack-wordads"))}}}},6770:function(t,e,n){"use strict";n(3679);const r={isFeatureEnabled:(t,e)=>Array.isArray(t.features)&&t.features.includes(e)};e.Z=r},8869:function(t,e,n){"use strict";var r=n(5101),o=n(362),i=n(5614),c=n(5260),s=n(6770);const a={...r.Z,...o.Z,...i.Z,...c.Z,...s.Z};e.Z=a},362:function(t,e){"use strict";e.Z={getWordAdsModuleStatus:t=>t.jetpackSettings,isModuleEnabled:t=>t.jetpackSettings.module_active,isInstantSearchEnabled:t=>t.jetpackSettings.instant_search_enabled,isUpdatingJetpackSettings:t=>t.jetpackSettings.is_updating,isTogglingModule:t=>t.jetpackSettings.is_toggling_module,isTogglingInstantSearch:t=>t.jetpackSettings.is_toggling_instant_search}},5101:function(t,e){"use strict";e.Z={getAPIRootUrl:t=>{var e,n;return null!==(e=null===(n=t.siteData)||void 0===n?void 0:n.WP_API_root)&&void 0!==e?e:null},getAPINonce:t=>{var e,n;return null!==(e=null===(n=t.siteData)||void 0===n?void 0:n.WP_API_nonce)&&void 0!==e?e:null},getRegistrationNonce:t=>{var e,n;return null!==(e=null===(n=t.siteData)||void 0===n?void 0:n.registrationNonce)&&void 0!==e?e:null},getSiteAdminUrl:t=>{var e,n;return null!==(e=null===(n=t.siteData)||void 0===n?void 0:n.adminUrl)&&void 0!==e?e:null},getBlogId:t=>{var e,n;return null!==(e=null===(n=t.siteData)||void 0===n?void 0:n.blogId)&&void 0!==e?e:0},getVersion:t=>{var e,n;return null!==(e=null===(n=t.siteData)||void 0===n?void 0:n.version)&&void 0!==e?e:"development"},getCalypsoSlug:t=>{var e;return null===(e=t.siteData)||void 0===e?void 0:e.calypsoSlug}}},5614:function(t,e){"use strict";e.Z={getWpcomUser:t=>{var e,n;return null===(e=t.userData)||void 0===e||null===(n=e.currentUser)||void 0===n?void 0:n.wpcomUser}}},9257:function(t){"use strict";if(void 0==={consumer_slug:"jetpack-wordads-package"}){var e=new Error('Cannot find module \'{"consumer_slug":"jetpack-wordads-package"}\'');throw e.code="MODULE_NOT_FOUND",e}t.exports={consumer_slug:"jetpack-wordads-package"}},9196:function(t){"use strict";t.exports=window.React},1850:function(t){"use strict";t.exports=window.ReactDOM},2819:function(t){"use strict";t.exports=window.lodash},9818:function(t){"use strict";t.exports=window.wp.data},5736:function(t){"use strict";t.exports=window.wp.i18n},6483:function(t){"use strict";t.exports=window.wp.url}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r](i,i.exports,n),i.loaded=!0,i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){"use strict";var t=n(1850),e=n.n(t),r=n(9196),o=n.n(r),i=n(6016),c=n(9818),s=n(2897),a=n(6211);const u=(0,c.createReduxStore)(s.t,s.i);function l(){const t=document.getElementById("jp-wordads-dashboard");null!==t&&e().render(o().createElement(i.ZP,null,o().createElement(a.Z,null)),t)}(0,c.register)(u),"loading"!==document.readyState?l():document.addEventListener("DOMContentLoaded",l)}()}();
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.js.LICENSE.txt b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.js.LICENSE.txt new file mode 100644 index 00000000..0c20a875 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.js.LICENSE.txt @@ -0,0 +1,5 @@ +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.rtl.css b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.rtl.css new file mode 100644 index 00000000..c2c7605a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/build/dashboard/jp-wordads-dashboard.rtl.css @@ -0,0 +1 @@ +.dops-card{background:#fff;box-shadow:0 0 0 1px #c3c4c7,0 1px 1px 1px rgba(0,0,0,.04);box-sizing:border-box;display:block;margin:0 auto 10px;padding:16px;position:relative}.dops-card:after{clear:both;content:".";display:block;height:0;visibility:hidden}@media(min-width:481px){.dops-card{margin-bottom:16px;padding:24px}}.dops-card.is-compact{margin-bottom:1px}@media(min-width:481px){.dops-card.is-compact{margin-bottom:1px;padding:16px 24px}}.dops-card.is-card-link{padding-left:48px}h2.dops-card-title{font-size:rem(20px)}.dops-card__link-indicator{color:#d5d5d5;display:block;height:100%;left:16px;position:absolute;top:0}a.dops-card:hover .dops-card__link-indicator{color:#bbb}a.dops-card:focus{outline:0}a.dops-card:focus .dops-card__link-indicator{color:tint(#3582c4,20%)}.gridicon{fill:currentColor;display:inline-block}.gridicon.needs-offset g{transform:translate(-1px,1px)}.gridicon.needs-offset-x g{transform:translate(-1px)}.gridicon.needs-offset-y g{transform:translateY(1px)}.form-toggle[type=checkbox]{display:none}.form-toggle__switch{border-radius:12px;box-sizing:border-box;cursor:pointer;display:inline-block;flex:none;height:24px;outline:0;padding:2px;position:relative;transition:all .4s ease,box-shadow 0s;vertical-align:middle;width:40px}.form-toggle__switch:after,.form-toggle__switch:before{content:"";display:block;height:20px;position:relative;width:20px}.form-toggle__switch:after{background:#fff;border-radius:50%;right:0;transition:all .2s ease}.form-toggle__switch:before{display:none}.dops-accessible-focus .form-toggle__switch:focus{box-shadow:0 0 0 2px #3582c4}.form-toggle__label{cursor:pointer;display:flex}.is-disabled .form-toggle__label{cursor:default}.dops-accessible-focus .form-toggle:focus+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #3582c4}.dops-accessible-focus .form-toggle:focus:checked+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #78dcfa}.form-toggle+.form-toggle__label .form-toggle__switch{background:#bbb}.form-toggle:not(:disabled)+.form-toggle__switch:hover{background:#d5d5d5}.form-toggle:checked+.form-toggle__label .form-toggle__switch{background:#3582c4}.form-toggle:checked+.form-toggle__label .form-toggle__switch:after{right:16px}.form-toggle:checked:not(:disabled)+.form-toggle__switch:hover{background:#78dcfa}.form-toggle:disabled+span.form-toggle__switch{cursor:default;opacity:.25}.form-toggle.is-toggling+.form-toggle__switch{background:#3582c4}.form-toggle.is-toggling:checked+.form-toggle__switch{background:#d5d5d5}.form-toggle.is-compact+.form-toggle__switch{border-radius:8px;height:16px;width:24px}.form-toggle.is-compact+.form-toggle__switch:after,.form-toggle.is-compact+.form-toggle__switch:before{height:12px;width:12px}.form-toggle.is-compact:checked+.form-toggle__switch:after{right:8px}.jp-wordads-dashboard-wrap{align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;margin:0 auto;width:100%}.jp-wordads-dashboard-row{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:calc(100% - 32px)}@media(min-width:600px){.jp-wordads-dashboard-row{grid-template-columns:repeat(8,1fr);margin:0 18px;width:calc(100% - 36px)}}@media(min-width:960px){.jp-wordads-dashboard-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px;width:calc(100% - 48px)}}.jp-wordads-dashboard-row .sm-col-span-1{grid-column-end:span 1}.jp-wordads-dashboard-row .sm-col-span-2{grid-column-end:span 2}.jp-wordads-dashboard-row .sm-col-span-3{grid-column-end:span 3}.jp-wordads-dashboard-row .sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.jp-wordads-dashboard-row .md-col-span-1{grid-column-end:span 1}.jp-wordads-dashboard-row .md-col-span-2{grid-column-end:span 2}.jp-wordads-dashboard-row .md-col-span-3{grid-column-end:span 3}.jp-wordads-dashboard-row .md-col-span-4{grid-column-end:span 4}.jp-wordads-dashboard-row .md-col-span-5{grid-column-end:span 5}.jp-wordads-dashboard-row .md-col-span-6{grid-column-end:span 6}.jp-wordads-dashboard-row .md-col-span-7{grid-column-end:span 7}.jp-wordads-dashboard-row .md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.jp-wordads-dashboard-row .lg-col-span-1{grid-column-end:span 1}.jp-wordads-dashboard-row .lg-col-span-2{grid-column-end:span 2}.jp-wordads-dashboard-row .lg-col-span-3{grid-column-end:span 3}.jp-wordads-dashboard-row .lg-col-span-4{grid-column-end:span 4}.jp-wordads-dashboard-row .lg-col-span-5{grid-column-end:span 5}.jp-wordads-dashboard-row .lg-col-span-6{grid-column-end:span 6}.jp-wordads-dashboard-row .lg-col-span-7{grid-column-end:span 7}.jp-wordads-dashboard-row .lg-col-span-8{grid-column-end:span 8}.jp-wordads-dashboard-row .lg-col-span-9{grid-column-end:span 9}.jp-wordads-dashboard-row .lg-col-span-10{grid-column-end:span 10}.jp-wordads-dashboard-row .lg-col-span-11{grid-column-end:span 11}.jp-wordads-dashboard-row .lg-col-span-12{grid-column-end:span 12}.jp-wordads-dashboard-row .lg-col-span-0{display:none}}@media(max-width:960px){.jp-wordads-dashboard-row .md-col-span-0{display:none}}@media(max-width:600px){.jp-wordads-dashboard-row .sm-col-span-0{display:none}.jp-wordads-dashboard-row .sm-col-span-1{display:block}}.jp-form-wordads-settings-group{width:100%}.jp-form-wordads-settings-group .dops-card{box-shadow:none;padding:4em 0 0}.jp-form-wordads-settings-group .form-toggle__label{margin:0}.jp-form-wordads-settings-group__toggle.is-instant-search{margin-top:4em}.jp-form-wordads-settings-group__toggle .jp-form-wordads-settings-group__toggle-container{display:flex}@media(max-width:960px){.jp-form-wordads-settings-group__toggle .jp-form-wordads-settings-group__toggle-container{justify-content:center}}.form-toggle__label-content{font-size:1.5em;font-weight:600;line-height:1.167}.form-toggle__label-content span{font-weight:400}.jp-form-wordads-settings-group__toggle-description{margin-top:1em}p.jp-form-wordads-settings-group__toggle-explanation{font-size:1em;font-weight:400;line-height:1.5;margin-bottom:0;margin-top:0}.jp-form-wordads-settings-group-buttons{margin-top:1.5em}.jp-form-wordads-settings-group-buttons__button{align-items:center;border-color:#000;display:flex;font-size:1em;justify-content:center;min-height:2.5em;padding:.5em 1.5em;text-align:center}.jp-form-wordads-settings-group-buttons__button.is-customize-search{background-color:#000;color:#fff}.jp-form-wordads-settings-group-buttons__button:disabled,.jp-form-wordads-settings-group-buttons__button[disabled]{background-color:#dcdcde;border-color:#dcdcde;color:#a7aaad;cursor:not-allowed}.jp-form-wordads-settings-group-buttons__button.is-widgets-editor{background:transparent;color:#000}.jp-form-wordads-settings-group-buttons__button.is-widgets-editor:disabled,.jp-form-wordads-settings-group-buttons__button.is-widgets-editor[disabled]{background:transparent;color:#a7aaad}.form-toggle.is-wordads-admin.is-compact+.form-toggle__switch{background:#fff;border:2px solid #000;border-radius:.75em;height:1.5em;width:3em}.form-toggle.is-wordads-admin.is-compact+.form-toggle__switch:after,.form-toggle.is-wordads-admin.is-compact+.form-toggle__switch:before{background-color:#000;height:.9375em;width:.9375em}.form-toggle.is-wordads-admin.is-compact+.form-toggle__switch:focus{box-shadow:0 0 0 2px #3582c4}.form-toggle.is-wordads-admin.is-compact:checked+.form-toggle__switch{background:#069e08;border-color:#069e08}.form-toggle.is-wordads-admin.is-compact:checked+.form-toggle__switch:after{background-color:#fff;right:1.5em}.form-toggle.is-wordads-admin.is-compact.is-toggling+.form-toggle__switch:after,.form-toggle.is-wordads-admin.is-compact.is-toggling+.form-toggle__switch:before{right:1.5em}.form-toggle.is-wordads-admin.is-compact.is-toggling:checked+.form-toggle__switch:after,.form-toggle.is-wordads-admin.is-compact.is-toggling:checked+.form-toggle__switch:before{right:0}.jp-wordads-dashboard-cut{border:2px solid #069e08;border-radius:4px;display:block;margin:2em 0;padding:1em 1.5em 1em 4em;position:relative;text-decoration:none}.jp-wordads-dashboard-cut span{display:block}.jp-wordads-dashboard-cut span:last-of-type{font-weight:600}.jp-wordads-dashboard-cut:focus span:last-of-type,.jp-wordads-dashboard-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:2px}.jp-wordads-dashboard-cut:focus:after,.jp-wordads-dashboard-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-wordads-dashboard-cut:after{color:#069e08;content:"→";font-size:1.5em;font-weight:600;left:1.5em;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-wordads-dashboard-row .form-toggle__switch-container.sm-col-span-1{display:flex;justify-content:center;padding-top:4px}#jp-plugin-container{min-height:100vh}.dops-notice{animation:appear .3s ease-in-out;background:#414141;border-radius:3px;box-sizing:border-box;color:#fff;display:flex;line-height:1.5;margin-bottom:24px;position:relative;width:100%}.dops-notice.is-success .dops-notice__icon-wrapper{background:#4ab866}.dops-notice.is-warning .dops-notice__icon-wrapper{background:#f0b849}.dops-notice.is-error .dops-notice__icon-wrapper{background:#d94f4f}.dops-notice.is-info .dops-notice__icon-wrapper{background:#3582c4}.dops-notice .dops-notice__dismiss,.dops-notice.is-error .dops-notice__dismiss,.dops-notice.is-info .dops-notice__dismiss,.dops-notice.is-success .dops-notice__dismiss,.dops-notice.is-warning .dops-notice__dismiss{overflow:hidden}.dops-notice__icon-wrapper{align-items:baseline;align-self:stretch;background:#747474;border-radius:0 3px 3px 0;color:#fff;display:flex;flex-shrink:0;justify-content:center;width:47px}.dops-notice__icon-wrapper .gridicon{margin-top:10px}@media(min-width:481px){.dops-notice__icon-wrapper .gridicon{margin-top:12px}}.dops-notice__content.dops-notice__content{flex-grow:1;font-size:12px;padding:13px}@media(min-width:481px){.dops-notice__content.dops-notice__content{font-size:14px}}.dops-notice__content.dops-notice__content a{color:#fff;text-decoration:underline}.dops-notice__content.dops-notice__content a:hover,.dops-notice__text a.dops-notice__text-no-underline{text-decoration:none}.dops-notice__text a,.dops-notice__text a:visited{color:#fff;text-decoration:underline}.dops-notice__text a:hover,.dops-notice__text a:visited:hover{color:#fff;text-decoration:none}.dops-notice__text ul{margin-bottom:0;margin-right:0}.dops-notice__text li{margin-right:2em;margin-top:.5em}.dops-notice__text p{margin-bottom:0;margin-top:.5em}.dops-notice__text p:first-child{margin-top:0}.dops-notice__button{cursor:pointer;margin-right:.428em}.dops-notice__dismiss{cursor:pointer;flex-shrink:0;padding:12px 12px 0}.dops-notice__dismiss .gridicon{height:18px;width:18px}@media(min-width:481px){.dops-notice__dismiss{padding:11px 11px 0}.dops-notice__dismiss .gridicon{height:24px;width:24px}}.dops-notice .dops-notice__dismiss{color:#bbb}.dops-notice .dops-notice__dismiss:focus,.dops-notice .dops-notice__dismiss:hover{color:#fff}a.dops-notice__action{align-items:center;color:#bbb;cursor:pointer;display:flex;font-size:12px;font-weight:400;padding:13px;text-decoration:none;white-space:nowrap}@media(min-width:481px){a.dops-notice__action{align-items:center;border-radius:0;flex-grow:0;flex-shrink:1;font-size:14px;margin:0 auto 0 0;padding:13px 16px}a.dops-notice__action .gridicon{height:24px;width:24px}}a.dops-notice__action:visited{color:#bbb}a.dops-notice__action:hover{color:#fff}a.dops-notice__action .gridicon{height:18px;margin-right:8px;opacity:.7;width:18px}.dops-notice.is-compact{border-radius:3px;display:inline-flex;flex-direction:row;flex-wrap:nowrap;line-height:1.5;margin:0;min-height:20px;padding:0;text-decoration:none;text-transform:none;vertical-align:middle;width:auto}.dops-notice.is-compact .dops-notice__content{font-size:12px;padding:6px 10px}.dops-notice.is-compact .dops-notice__icon-wrapper{width:28px}.dops-notice.is-compact .dops-notice__icon-wrapper .dops-notice__icon{height:18px;margin:0;width:18px}.dops-notice.is-compact .dops-notice__icon-wrapper .gridicon{margin-top:6px}.dops-notice.is-compact .dops-notice__dismiss{align-self:center;flex:none;margin:0 0 0 8px;padding:0;position:relative}.dops-notice.is-compact .dops-notice__dismiss .gridicon{height:18px;width:18px}.dops-notice.is-compact a.dops-notice__action{align-self:center;background:transparent;display:inline-block;font-size:12px;margin:0 16px 0 0;padding:0 10px}.dops-notice.is-compact a.dops-notice__action:active,.dops-notice.is-compact a.dops-notice__action:focus,.dops-notice.is-compact a.dops-notice__action:hover{background:transparent}.dops-notice.is-compact a.dops-notice__action .gridicon{height:14px;margin-right:8px;opacity:1;vertical-align:sub;width:14px}@keyframes appear{0%{opacity:0}to{opacity:1}}.global-notices{bottom:0;left:0;pointer-events:none;position:fixed;right:0;text-align:left;top:auto;z-index:179}@media(min-width:661px){.global-notices{bottom:auto;left:16px;max-width:calc(100% - 68px);right:auto;top:63px}}@media(min-width:961px){.global-notices{left:24px;max-width:calc(100% - 208px);top:71px}}@media(min-width:1041px){.global-notices{left:32px;max-width:calc(100% - 224px)}}.global-notices .dops-notice{border-radius:0;box-shadow:0 2px 5px rgba(0,0,0,.2),0 0 56px rgba(0,0,0,.15);flex-wrap:nowrap;margin-bottom:0;pointer-events:auto;text-align:right}.global-notices .dops-notice .dops-notice__icon-wrapper{border-radius:0}@media(min-width:661px){.global-notices .dops-notice{border-radius:3px;display:flex;margin-bottom:24px;overflow:hidden}.global-notices .dops-notice .dops-notice__icon-wrapper{border-radius:0 3px 3px 0}.global-notices .dops-notice a.dops-notice__action{font-size:14px;padding:13px 16px}}.global-notices .dops-notice__dismiss{flex-shrink:0}@media(min-width:661px){.global-notices .dops-notice__dismiss{padding:13px 16px 0}}#jp-wordads-dashboard{color:#000;font-size:16px}#jp-wordads-dashboard *{box-sizing:border-box}#jp-wordads-dashboard .jp-wordads-dashboard-page-loading-spinner{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}@media(max-width:600px){#jp-wordads-dashboard{font-size:14px}}@keyframes rotate-spinner{to{transform:rotate(-1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-left-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}.sexr0jUxC1jVixdKiDnC{margin-right:-20px}@media(max-width:782px){.sexr0jUxC1jVixdKiDnC{margin-right:-10px}}.sexr0jUxC1jVixdKiDnC.vKQ11sLeAM45M04P1ccj{background-color:var(--jp-white)}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1128px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;max-width:var(--max-container-width);width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));padding:0 24px}}.SqdhUZkXCRuIpErj1B3z.OZC_9a1LhpWF9dv15Gdh{max-width:none;padding:unset}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.jp-dashboard-footer{align-items:center;color:#000;display:flex;flex-flow:row wrap;justify-content:space-between;max-width:1128px;width:100%}.jp-dashboard-footer a,.jp-dashboard-footer a:hover,.jp-dashboard-footer a:visited{color:#000;text-decoration:none}.jp-dashboard-footer__jetpack-symbol,.jp-dashboard-footer__module-name{display:inline-block;vertical-align:middle}.jp-dashboard-footer__module-name{font-size:12px;font-weight:600;margin-right:5px}.cAbGtJDGgLubucBnz7vM{background-color:var(--jp-white)}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/jest.config.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/jest.config.js new file mode 100644 index 00000000..88326709 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/jest.config.js @@ -0,0 +1,23 @@ +/** + * External dependencies + */ +const path = require( 'path' ); + +module.exports = { + testMatch: [ '<rootDir>/**/test/*.test.[jt]s?(x)', '!**/.eslintrc.*' ], + roots: [ '<rootDir>/src' ], + transform: { + '\\.[jt]sx?$': path.join( __dirname, 'tests/jest-extensions-babel-transform' ), + '\\.(gif|jpg|jpeg|png|svg|scss|sass|css|ttf|woff|woff2)$': require.resolve( + 'jetpack-js-tools/jest/jest-extensions-asset-stub.js' + ), + }, + moduleNameMapper: { + 'tiny-lru/lib/tiny-lru.esm$': '<rootDir>/src/instant-search/lib/test-helpers/tiny-lru.mock.js', + jetpackConfig: '<rootDir>/tests/jest-jetpack-config.js', + }, + moduleDirectories: [ 'node_modules', '<rootDir>/src/dashboard' ], + // Work around some packages that only provide module versions in jest's jsdom environment. + // https://github.com/microsoft/accessibility-insights-web/pull/5421#issuecomment-1109168149 + resolver: require.resolve( 'jetpack-js-tools/jest/jest-resolver.js' ), +}; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/postcss.config.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/postcss.config.js new file mode 100644 index 00000000..33b12570 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/postcss.config.js @@ -0,0 +1,12 @@ +// Uses Jetpack plugin's postcss config. +module.exports = () => ( { + plugins: { + 'postcss-custom-properties': { + importFrom: [ require.resolve( '@automattic/calypso-color-schemes' ) ], + // @TODO: Drop `preserve: false` workaround if possible + // See https://github.com/Automattic/jetpack/pull/13854#issuecomment-550898168 + preserve: false, + }, + autoprefixer: {}, + }, +} ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/class-helper.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/class-helper.php new file mode 100644 index 00000000..bcd86d81 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/class-helper.php @@ -0,0 +1,28 @@ +<?php +/** + * Helper class providing various static utility functions for use in Search. + * + * @package automattic/jetpack-wordads + */ + +namespace Automattic\Jetpack\WordAds; + +/** + * Various helper functions for reuse throughout the WordAds code. + */ +class Helper { + /** + * Get the current site's WordPress.com ID. + * + * @return int Blog ID. + */ + public static function get_wpcom_site_id() { + // Returns local blog ID for a multi-site network. + if ( defined( 'IS_WPCOM' ) && constant( 'IS_WPCOM' ) ) { + return \get_current_blog_id(); + } + + // Returns cache site ID. + return \Jetpack_Options::get_option( 'id' ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/class-package.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/class-package.php new file mode 100644 index 00000000..28386b5e --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/class-package.php @@ -0,0 +1,62 @@ +<?php +/** + * WordAds package information. + * + * @package automattic/jetpack-wordads + */ + +namespace Automattic\Jetpack\WordAds; + +/** + * WordAds package general information + */ +class Package { + const VERSION = '0.2.4'; + const SLUG = 'wordads'; + + /** + * The path where package is installed. + * + * @var string + */ + protected static $installed_path; + + /** + * Adds the package slug and version to the package version tracker's data. + * + * @param array $package_versions The package version array. + * + * @return array The package version array. + */ + public static function send_version_to_tracker( $package_versions ) { + // Multiple versions could co-exist, we want to send the version which is in use. + // `jetpack-autoloader` would load classes from the latest package, so we send the latest version here. + if ( empty( $package_versions[ self::SLUG ] ) || version_compare( $package_versions[ self::SLUG ], self::VERSION, '<' ) ) { + $package_versions[ self::SLUG ] = self::VERSION; + } + return $package_versions; + } + + /** + * Whether Jetpack WordAds Package's version maps to a public release, or a development version. + */ + public static function is_development_version() { + return (bool) apply_filters( + 'jetpack_wordads_is_development_version', + ! preg_match( '/^\d+(\.\d+)+$/', self::VERSION ) + ); + } + + /** + * Return the path where the package is installed with trailing slash. + * It's important not to use a constant, as there could be multiple versions of search package installed. + * + * @return string + */ + public static function get_installed_path() { + if ( static::$installed_path === null ) { + static::$installed_path = dirname( __DIR__ ) . DIRECTORY_SEPARATOR; + } + return apply_filters( 'jetpack_wordads_installed_path', static::$installed_path ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/class-rest-controller.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/class-rest-controller.php new file mode 100644 index 00000000..30a2c629 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/class-rest-controller.php @@ -0,0 +1,136 @@ +<?php +/** + * The WordAds Rest Controller class. + * Registers the REST routes for WordAds. + * + * @package automattic/jetpack-wordads + */ + +namespace Automattic\Jetpack\WordAds; + +use Automattic\Jetpack\Modules; +use Jetpack_Options; +use WP_Error; +use WP_REST_Request; +use WP_REST_Server; + +/** + * Registers the REST routes for WordAds. + */ +class REST_Controller { + /** + * Whether it's run on WPCOM. + * + * @var bool + */ + protected $is_wpcom; + + /** + * Constructor + * + * @param bool $is_wpcom - Whether it's run on WPCOM. + */ + public function __construct( $is_wpcom = false ) { + $this->is_wpcom = $is_wpcom; + } + + /** + * Registers the REST routes for WordAds. + * + * @access public + * @static + */ + public function register_rest_routes() { + register_rest_route( + 'jetpack/v4', + '/wordads/settings', + array( + 'methods' => WP_REST_Server::EDITABLE, + 'callback' => array( $this, 'update_settings' ), + 'permission_callback' => array( $this, 'require_admin_privilege_callback' ), + ) + ); + register_rest_route( + 'jetpack/v4', + '/wordads/settings', + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => array( $this, 'get_settings' ), + 'permission_callback' => array( $this, 'require_admin_privilege_callback' ), + ) + ); + } + + /** + * Only administrators can access the API. + * + * @return bool|WP_Error True if a blog token was used to sign the request, WP_Error otherwise. + */ + public function require_admin_privilege_callback() { + if ( current_user_can( 'manage_options' ) ) { + return true; + } + + $error_msg = esc_html__( + 'You are not allowed to perform this action.', + 'jetpack-wordads' + ); + + return new WP_Error( 'rest_forbidden', $error_msg, array( 'status' => rest_authorization_required_code() ) ); + } + + /** + * POST `jetpack/v4/wordads/settings` + * + * @param WP_REST_Request $request - REST request. + */ + public function update_settings( $request ) { + $request_body = $request->get_json_params(); + + $module_active = isset( $request_body['module_active'] ) ? (bool) $request_body['module_active'] : null; + + $errors = array(); + if ( $module_active !== null ) { + $module_active_updated = ( new Modules() )->update_status( Package::SLUG, $module_active, false, false ); + if ( is_wp_error( $module_active_updated ) ) { + $errors['module_active'] = $module_active_updated; + } + } + + if ( ! empty( $errors ) ) { + return new WP_Error( + 'some_updated', + sprintf( + /* translators: %s are the setting name that not updated. */ + __( 'Some settings ( %s ) not updated.', 'jetpack-wordads' ), + implode( + ',', + array_keys( $errors ) + ) + ), + array( 'status' => 400 ) + ); + } + + return rest_ensure_response( $this->get_settings() ); + } + + /** + * GET `jetpack/v4/wordads/settings` + */ + public function get_settings() { + return rest_ensure_response( + array( + 'module_active' => ( new Modules() )->is_active( Package::SLUG ), + ) + ); + } + + /** + * Get blog id + */ + protected function get_blog_id() { + return $this->is_wpcom ? get_current_blog_id() : Jetpack_Options::get_option( 'id' ); + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/class-dashboard.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/class-dashboard.php new file mode 100644 index 00000000..049b1557 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/class-dashboard.php @@ -0,0 +1,127 @@ +<?php +/** + * A class that adds a wordads dashboard to wp-admin. + * + * @package automattic/jetpack + */ + +namespace Automattic\Jetpack\WordAds; + +use Automattic\Jetpack\Admin_UI\Admin_Menu; +use Automattic\Jetpack\Assets; +use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Status; +use Automattic\Jetpack\Tracking; +/** + * Responsible for adding a WordAds dashboard to wp-admin. + * + * @package Automattic\Jetpack\WordAds + */ +class Dashboard { + + /** + * Connection manager instance + * + * @var Automattic\Jetpack\Connection\Manager + */ + protected $connection_manager; + + /** + * Contructor + * + * @param Automattic\Jetpack\Connection\Manager $connection_manager - Connection Manager instance. + */ + public function __construct( $connection_manager = null ) { + $this->connection_manager = $connection_manager ? $connection_manager : new Connection_Manager( Package::SLUG ); + } + + /** + * Initialise hooks + */ + public function init_hooks() { + add_action( 'admin_menu', array( $this, 'add_wp_admin_submenu' ), 999 ); + } + + /** + * The page to be added to submenu + */ + public function add_wp_admin_submenu() { + if ( ! $this->should_add_wordads_submenu() ) { + return; + } + + $page_suffix = Admin_Menu::add_menu( + __( 'WordAds Settings', 'jetpack-wordads' ), + _x( 'WordAds', 'product name shown in menu', 'jetpack-wordads' ), + 'manage_options', + 'jetpack-wordads', + array( $this, 'render' ), + 100 + ); + + add_action( 'load-' . $page_suffix, array( $this, 'admin_init' ) ); + } + + /** + * Override render funtion + */ + public function render() { + ?> + <div id="jp-wordads-dashboard" class="jp-wordads-dashboard"> + <div class="hide-if-js"><?php esc_html_e( 'Your WordAds dashboard requires JavaScript to function properly.', 'jetpack-wordads' ); ?></div> + </div> + <?php + } + + /** + * Test whether we should show Search menu. + * + * @return {boolean} Show search sub menu or not. + */ + protected function should_add_wordads_submenu() { + /** + * The filter allows to ommit adding a submenu item for WordAds. + * + * @since 0.1.0 + * + * @param boolean $should_add_wordads_submenu Default value is true. + */ + return apply_filters( 'jetpack_wordads_should_add_wordads_submenu', current_user_can( 'manage_options' ) ); + } + + /** + * Initialize the admin resources. + */ + public function admin_init() { + add_action( 'admin_enqueue_scripts', array( $this, 'load_admin_scripts' ) ); + } + + /** + * Enqueue admin scripts. + */ + public function load_admin_scripts() { + if ( ! ( new Status() )->is_offline_mode() && $this->connection_manager->is_connected() ) { + // Required for Analytics. + Tracking::register_tracks_functions_scripts( true ); + } + + Assets::register_script( + 'jp-wordads-dashboard', + '../../build/dashboard/jp-wordads-dashboard.js', + __FILE__, + array( + 'in_footer' => true, + 'textdomain' => 'jetpack-wordads', + ) + ); + Assets::enqueue_script( 'jp-wordads-dashboard' ); + + // Add objects to be passed to the initial state of the app. + // Use wp_add_inline_script instead of wp_localize_script, see https://core.trac.wordpress.org/ticket/25280. + wp_add_inline_script( + 'jp-wordads-dashboard', + ( new Initial_State() )->render(), + 'before' + ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/class-initial-state.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/class-initial-state.php new file mode 100644 index 00000000..cbbbecaa --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/class-initial-state.php @@ -0,0 +1,99 @@ +<?php +/** + * The React initial state. + * + * @package automattic/jetpack-wordads + */ + +namespace Automattic\Jetpack\WordAds; + +use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Modules; +use Automattic\Jetpack\Status; +use Jetpack_Options; + +/** + * The React initial state. + */ +class Initial_State { + /** + * Connection Manager + * + * @var Connection_Manager + */ + protected $connection_manager; + + /** + * Constructor + * + * @param Connection_Manager $connection_manager - Connection mananger instance. + */ + public function __construct( $connection_manager = null ) { + $this->connection_manager = $connection_manager ? $connection_manager : new Connection_Manager( Package::SLUG ); + } + + /** + * Render JS for the initial state + * + * @return string - JS string. + */ + public function render() { + return 'var WORDADS_DASHBOARD_INITIAL_STATE=JSON.parse(decodeURIComponent("' . rawurlencode( wp_json_encode( $this->get_initial_state() ) ) . '"));'; + } + + /** + * Get the initial state data. + * + * @return array + */ + public function get_initial_state() { + return array( + 'siteData' => array( + 'WP_API_root' => esc_url_raw( rest_url() ), + 'WP_API_nonce' => wp_create_nonce( 'wp_rest' ), + 'registrationNonce' => wp_create_nonce( 'jetpack-registration-nonce' ), + 'adminUrl' => esc_url( admin_url() ), + 'blogId' => Jetpack_Options::get_option( 'id', 0 ), + // TODO: add WORDADS_PACKAGE_VERSION to a proper place after major PRs merged. + 'version' => defined( 'WORDADS_PACKAGE_VERSION' ) ? WORDADS_PACKAGE_VERSION : 'dev', + 'calypsoSlug' => ( new Status() )->get_site_suffix(), + ), + 'userData' => array( + 'currentUser' => $this->current_user_data(), + ), + 'jetpackSettings' => array( + 'wordads' => ( new Modules() )->is_active( Package::SLUG ), + ), + 'features' => array_map( + 'sanitize_text_field', + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + isset( $_GET['features'] ) ? explode( ',', wp_unslash( $_GET['features'] ) ) : array() + ), + ); + } + + /** + * Gather data about the current user. + * + * @return array + */ + protected function current_user_data() { + $current_user = wp_get_current_user(); + $is_user_connected = $this->connection_manager->is_user_connected( $current_user->ID ); + $is_master_user = $is_user_connected && (int) $current_user->ID && (int) Jetpack_Options::get_option( 'master_user' ) === (int) $current_user->ID; + $dotcom_data = $this->connection_manager->get_connected_user_data(); + + $current_user_data = array( + 'isConnected' => $is_user_connected, + 'isMaster' => $is_master_user, + 'username' => $current_user->user_login, + 'id' => $current_user->ID, + 'wpcomUser' => $dotcom_data, + 'permissions' => array( + 'manage_options' => current_user_can( 'manage_options' ), + ), + ); + + return $current_user_data; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/button/index.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/button/index.jsx index d945554f..c6867a00 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/button/index.jsx +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/button/index.jsx @@ -4,7 +4,8 @@ import PropTypes from 'prop-types'; import React from 'react'; import classNames from 'classnames'; -import { noop } from 'lodash'; +/*eslint lodash/import-scope: [2, "method"]*/ +import noop from 'lodash/noop'; /** * Internal dependencies diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/button/style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/button/style.scss new file mode 100644 index 00000000..ef95b33a --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/button/style.scss @@ -0,0 +1,206 @@ +@import "scss/calypso-colors"; +@import "scss/color-functions"; +@import "scss/functions/rem"; +@import "scss/typography"; + +// ========================================================================== +// Buttons +// ========================================================================== + +.dops-button { + background: $blue-grey-light; + border-color: $blue-medium-dark; + border-style: solid; + border-width: 1px; + color: $blue-medium-dark; + cursor: pointer; + display: inline-block; + margin: 0; + outline: 0; + overflow: hidden; + font-size: $font-body-small; + text-overflow: ellipsis; + text-decoration: none; + vertical-align: top; + box-sizing: border-box; + border-radius: 3px; + padding: 7px 14px 9px; + -webkit-appearance: none; + appearance: none; + + &:hover { + background: #f0f0f1; + border-color: $blue-grey-dark; + color: $blue-grey-dark; + } + &[disabled], + &:disabled { + color: lighten( $gray, 30% ); + background: $white; + border-color: lighten( $gray, 30% ); + cursor: default; + } + &:focus { + background: $white; + border-color: $blue-medium-dark; + box-shadow: 0 0 0 1px $blue-medium-dark; + } + &.is-compact { + padding: 0 10px; + line-height: 2; + + &:disabled { + color: lighten( $gray, 30% ); + } + .gridicon { + top: 4px; + margin-top: -8px; + } + // Make the left margin of the small plus icon visually less huge + .gridicons-plus-small { + margin-left: -4px; + } + // Reset the left margin if the button contains only the plus icon + .gridicons-plus-small:last-of-type { + margin-left: 0; + } + // Make plus icon nudged closer to adjacent icons for add-people and add-plugin type buttons + .gridicons-plus-small + .gridicon { + margin-left: -4px; + } + } + &.hidden { + display: none; + } + .gridicon { + position: relative; + top: 4px; + margin-top: -2px; + width: 18px; + height: 18px; + } +} + +// Primary buttons +.dops-button.is-primary { + background: $blue-medium; + border-color: $blue-medium; + color: $white; + + &:hover, + &:focus { + border-color: $blue-medium-dark; + background: $blue-medium-dark; + color: $white; + } + &:focus { + box-shadow: + 0 0 0 1px $white, + 0 0 0 3px $blue-medium-dark; + } + &[disabled], + &:disabled { + color: #66c6e4 !important; + background-color: #008ec2 !important; + border-color: #008ec2 !important; + box-shadow: none !important; + text-shadow: none !important; + cursor: default; + } + &.is-compact { + color: $white; + white-space: nowrap; + } +} + +// Scary buttons +.dops-button.is-scary { + color: $alert-red; + + &:hover, + &:focus { + border-color: $alert-red; + } + &:focus { + box-shadow: 0 0 0 2px lighten( $alert-red, 20% ); + } + &[disabled], + &:disabled { + color: lighten( $alert-red, 30% ); + border-color: lighten( $gray, 30% ); + } +} + +.dops-button.is-primary.is-scary { + background: $alert-red; + border-color: darken( $alert-red, 20% ); + color: $white; + + &:hover, + &:focus { + border-color: darken( $alert-red, 40% ); + } + &[disabled], + &:disabled { + background: lighten( $alert-red, 20% ); + border-color: tint( $alert-red, 30% ); + } +} + +.dops-button.is-borderless { + border: none; + color: darken( $gray, 10% ); + padding-left: 0; + padding-right: 0; + + &:hover { + color: $gray-dark; + } + + &:focus { + box-shadow: none; + } + + .dops-accessible-focus &:focus { + outline: thin dotted; + } + + .gridicon { + width: 24px; + height: 24px; + top: 6px; + } + + &[disabled], + &:disabled { + color: lighten( $gray, 30% ); + background: $white; + cursor: default; + + &:active { + border-width: 0; + } + } + &.is-scary { + color: $alert-red; + + &:hover, + &:focus { + color: darken( $alert-red, 20% ); + } + + &[disabled] { + color: lighten( $alert-red, 30% ); + } + } + + &.is-compact { + background: transparent; + border-radius: 0; + .gridicon { + width: 18px; + height: 18px; + top: 5px; + } + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/button/test/index.test.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/button/test/index.test.jsx new file mode 100644 index 00000000..86c8c310 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/button/test/index.test.jsx @@ -0,0 +1,33 @@ +/** + * @jest-environment jsdom + */ + +/** + * External dependencies + */ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import '@testing-library/jest-dom'; + +/** + * Internal dependencies + */ +import Button from 'components/button'; + +describe( 'Button', function () { + const testProps = { + className: 'test-class', + }; + it( 'can render', () => { + render( <Button /> ); + expect( screen.queryByRole( 'button' ) ).toBeInTheDocument(); + } ); + it( 'can render compact button', () => { + render( <Button compact={ true } /> ); + expect( screen.queryByRole( 'button' ).className ).toContain( 'is-compact' ); + } ); + it( 'can render with class name passed in', () => { + render( <Button { ...testProps } /> ); + expect( screen.queryByRole( 'button' ).className ).toContain( 'test-class' ); + } ); +} ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/card/compact.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/card/compact.jsx index 7bfacab4..5db9a251 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/card/compact.jsx +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/card/compact.jsx @@ -2,7 +2,8 @@ * External dependencies */ import React from 'react'; -import { assign } from 'lodash'; +/*eslint lodash/import-scope: [2, "method"]*/ +import assign from 'lodash/assign'; import classnames from 'classnames'; /** diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/card/index.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/card/index.jsx index e8dbf9e1..1e959dc3 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/card/index.jsx +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/card/index.jsx @@ -4,13 +4,15 @@ import PropTypes from 'prop-types'; import React from 'react'; import classnames from 'classnames'; -import { assign, omit } from 'lodash'; +/*eslint lodash/import-scope: [2, "method"]*/ +import assign from 'lodash/assign'; +/*eslint lodash/import-scope: [2, "method"]*/ +import omit from 'lodash/omit'; /** * Internal dependencies */ -// TODO change to our own gridicon component, when instant search is migrated. -import Gridicon from 'gridicons'; +import { Gridicon } from '@automattic/jetpack-components'; import './style.scss'; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/card/style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/card/style.scss new file mode 100644 index 00000000..efde8ca1 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/card/style.scss @@ -0,0 +1,72 @@ +@import 'scss/layout'; +@import 'scss/typography'; +@import 'scss/calypso-colors'; +@import 'scss/functions/rem'; + +$title: #f6f7f7; +$meta: #a7aaad; +$border: #dcdcde; +$section-border: #dcdcde; + +/* Card */ + +.dops-card { + display: block; + position: relative; + margin: 0 auto 10px auto; + padding: 16px; + box-sizing: border-box; + background: $white; + box-shadow: + 0 0 0 1px $light-gray-700, + 0 1px 1px 1px rgba(0,0,0,.04); + + @include clear-fix; + + @include breakpoint( ">480px" ) { + margin-bottom: 16px; + padding: 24px; + } + + // Compact Card + &.is-compact { + margin-bottom: 1px; + + @include breakpoint( ">480px" ) { + margin-bottom: 1px; + padding: 16px 24px; + } + } + + &.is-card-link { + padding-right: 48px; + } +} + +h2.dops-card-title { + font-size: $font-title-small; +} + +// Clickable Card +.dops-card__link-indicator { + color: lighten( $gray, 20% ); + display: block; + height: 100%; + position: absolute; + top: 0; + right: 16px; +} + +a.dops-card:hover { + .dops-card__link-indicator { + color: lighten( $gray, 10% ); + } +} + +a.dops-card:focus { + outline: 0; + + .dops-card__link-indicator { + color: $link-highlight; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/card/test/index.test.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/card/test/index.test.jsx new file mode 100644 index 00000000..2365be17 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/card/test/index.test.jsx @@ -0,0 +1,22 @@ +/** + * @jest-environment jsdom + */ + +/** + * External dependencies + */ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import '@testing-library/jest-dom'; + +/** + * Internal dependencies + */ +import Card from 'components/card'; + +describe( 'Card', function () { + it( 'can render', () => { + render( <Card title="Title" /> ); + expect( screen.queryByRole( 'heading' ) ).toBeInTheDocument(); + } ); +} ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/dashboard/index.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/dashboard/index.jsx new file mode 100644 index 00000000..ab617c14 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/dashboard/index.jsx @@ -0,0 +1,99 @@ +/** + * External dependencies + */ +import React, { Fragment, useMemo } from 'react'; + +/** + * WordPress dependencies + */ +import { useSelect, useDispatch, select as syncSelect } from '@wordpress/data'; +import { __ } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +import analytics from '@automattic/jetpack-analytics'; +import restApi from '@automattic/jetpack-api'; +import { Spinner, AdminSection, AdminPage, Container, Col } from '@automattic/jetpack-components'; +import ModuleControl from 'components/module-control'; +import { STORE_ID } from 'store'; +import NoticesList from 'components/global-notices'; + +import 'scss/rna-styles.scss'; +import './style.scss'; + +/** + * WordAdsDashboard component definition. + * + * @returns {React.Component} Search dashboard component. + */ +export default function WordAdsDashboard() { + useSelect( select => select( STORE_ID ).getWordAdsModuleStatus(), [] ); + + const siteAdminUrl = useSelect( select => select( STORE_ID ).getSiteAdminUrl() ); + const aboutPageUrl = siteAdminUrl + 'admin.php?page=jetpack_about'; + + const updateOptions = useDispatch( STORE_ID ).updateJetpackSettings; + const isModuleEnabled = useSelect( select => select( STORE_ID ).isModuleEnabled() ); + const isSavingOptions = useSelect( select => select( STORE_ID ).isUpdatingJetpackSettings() ); + const isTogglingModule = useSelect( select => select( STORE_ID ).isTogglingModule() ); + + const isLoading = useSelect( + select => + select( STORE_ID ).isResolving( 'getWordAdsModuleStatus' ) || + ! select( STORE_ID ).hasStartedResolution( 'getWordAdsModuleStatus' ) + ); + + const handleLocalNoticeDismissClick = useDispatch( STORE_ID ).removeNotice; + const notices = useSelect( select => select( STORE_ID ).getNotices(), [] ); + + const initializeAnalytics = () => { + const tracksUser = syncSelect( STORE_ID ).getWpcomUser(); + const blogId = syncSelect( STORE_ID ).getBlogId(); + + if ( tracksUser ) { + analytics.initialize( tracksUser.ID, tracksUser.login, { + blog_id: blogId, + } ); + } + }; + + useMemo( () => { + const apiRootUrl = syncSelect( STORE_ID ).getAPIRootUrl(); + const apiNonce = syncSelect( STORE_ID ).getAPINonce(); + apiRootUrl && restApi.setApiRoot( apiRootUrl ); + apiNonce && restApi.setApiNonce( apiNonce ); + initializeAnalytics(); + analytics.tracks.recordEvent( 'jetpack_wordads_admin_page_view', { + current_version: syncSelect( STORE_ID ).getVersion(), + } ); + }, [] ); + + return ( + <Fragment> + { isLoading && ( + <Spinner className="jp-wordads-dashboard-page-loading-spinner" color="#000" size={ 32 } /> + ) } + { ! isLoading && ( + <AdminPage a8cLogoHref={ aboutPageUrl } moduleName={ __( 'WordAds', 'jetpack-wordads' ) }> + <AdminSection> + <Container horizontalSpacing={ 5 }> + <Col sm={ 4 }> + <ModuleControl + updateOptions={ updateOptions } + isModuleEnabled={ isModuleEnabled } + isSavingOptions={ isSavingOptions } + isTogglingModule={ isTogglingModule } + /> + </Col> + </Container> + </AdminSection> + </AdminPage> + ) } + <NoticesList + notices={ notices } + handleLocalNoticeDismissClick={ handleLocalNoticeDismissClick } + /> + </Fragment> + ); +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/dashboard/style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/dashboard/style.scss new file mode 100644 index 00000000..92d3cec8 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/dashboard/style.scss @@ -0,0 +1,22 @@ +@import 'scss/_variables'; + +#jp-wordads-dashboard { + color: $black; + font-size: 16px; + + * { + box-sizing: border-box; + } + + .jp-wordads-dashboard-page-loading-spinner { + position: absolute; + left: 50%; + top: 50%; + transform: translate( -50%, -50% ); + } + + @include for-phone-down { + font-size: 14px; + } + +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/form-toggle/compact.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/form-toggle/compact.jsx index 72341c8e..b51fc1ce 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/form-toggle/compact.jsx +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/form-toggle/compact.jsx @@ -3,7 +3,8 @@ */ import React from 'react'; import classNames from 'classnames'; -import { omit } from 'lodash'; +/*eslint lodash/import-scope: [2, "method"]*/ +import omit from 'lodash/omit'; /** * Internal dependencies diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/form-toggle/index.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/form-toggle/index.jsx index 31739fc8..1dce27dd 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/form-toggle/index.jsx +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/form-toggle/index.jsx @@ -89,26 +89,29 @@ export default class FormToggle extends Component { return ( <Fragment> - <input - className={ toggleClasses } - type="checkbox" - checked={ this.props.checked } - readOnly={ true } - disabled={ this.props.disabled } - /> - - <span - className={ classNames( 'form-toggle__switch', this.props.switchClassNames ) } - disabled={ this.props.disabled } - id={ id } - onClick={ this.onClick } - onKeyDown={ this.onKeyDown } - role="checkbox" - aria-checked={ this.props.checked } - aria-label={ this.props[ 'aria-label' ] } - tabIndex={ this.props.disabled ? -1 : 0 } - ref="toggleSwitch" - /> + <div + className={ classNames( 'form-toggle__switch-container', this.props.switchClassNames ) } + > + <input + className={ toggleClasses } + type="checkbox" + checked={ this.props.checked } + readOnly={ true } + disabled={ this.props.disabled } + /> + <span + className={ classNames( 'form-toggle__switch', this.props.switchClassNames ) } + disabled={ this.props.disabled } + id={ id } + onClick={ this.onClick } + onKeyDown={ this.onKeyDown } + role="checkbox" + aria-checked={ this.props.checked } + aria-label={ this.props[ 'aria-label' ] } + tabIndex={ this.props.disabled ? -1 : 0 } + ref="toggleSwitch" + /> + </div> <label className={ classNames( 'form-toggle__label', this.props.labelClassNames ) } htmlFor={ id } diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/form-toggle/style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/form-toggle/style.scss new file mode 100644 index 00000000..4ffaa354 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/form-toggle/style.scss @@ -0,0 +1,130 @@ +@import 'scss/calypso-colors'; +// ========================================================================== +// FormToggle +// ========================================================================== + +.form-toggle[type="checkbox"] { + display: none; +} + +.form-toggle__switch { + flex: none; + position: relative; + display: inline-block; + border-radius: 12px; + box-sizing: border-box; + padding: 2px; + width: 40px; + height: 24px; + vertical-align: middle; + outline: 0; + cursor: pointer; + transition: all .4s ease, box-shadow 0s; + + &:before, + &:after { + position: relative; + display: block; + content: ""; + width: 20px; + height: 20px; + } + &:after { + left: 0; + border-radius: 50%; + background: $white; + transition: all .2s ease; + } + &:before { + display: none; + } + .dops-accessible-focus &:focus{ + box-shadow: 0 0 0 2px $blue-medium; + } +} + +.form-toggle__label { + display: flex; + cursor: pointer; + + .is-disabled & { + cursor: default; + } +} + +.form-toggle { + .dops-accessible-focus &:focus { + + .form-toggle__label .form-toggle__switch { + box-shadow: 0 0 0 2px $blue-medium; + } + &:checked + .form-toggle__label .form-toggle__switch { + box-shadow: 0 0 0 2px $blue-light; + } + } + + & + .form-toggle__label .form-toggle__switch { + background: lighten( $gray, 10% ); + } + + &:not( :disabled ) { + + .form-toggle__switch:hover { + background: lighten( $gray, 20% ); + } + } + + &:checked{ + + .form-toggle__label .form-toggle__switch { + background: $blue-medium; + + &:after { + left: 16px; + } + } + } + + &:checked:not( :disabled ) { + + .form-toggle__switch:hover { + background: $blue-light; + } + } + + &:disabled { + + span.form-toggle__switch { + opacity: 0.25; + cursor: default; + } + } +} + +// Classes for toggle state before action is complete (updating plugin or something) +.form-toggle.is-toggling { + + .form-toggle__switch { + background: $blue-medium; + } + &:checked { + + .form-toggle__switch { + background: lighten( $gray, 20% ); + } + } +} + +.form-toggle.is-compact { + + .form-toggle__switch { + border-radius: 8px; + width: 24px; + height: 16px; + + &:before, + &:after { + width: 12px; + height: 12px; + } + } + &:checked { + + .form-toggle__switch { + &:after { + left: 8px; + } + } + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/form-toggle/test/index.test.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/form-toggle/test/index.test.jsx new file mode 100644 index 00000000..0f862a82 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/form-toggle/test/index.test.jsx @@ -0,0 +1,33 @@ +/** + * @jest-environment jsdom + */ + +/** + * External dependencies + */ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import '@testing-library/jest-dom'; + +/** + * Internal dependencies + */ +import CompactFormToggle from 'components/form-toggle/compact'; + +describe( 'CompactFormToggle', function () { + const testProps = { + className: 'test-class', + }; + describe( 'rendering', function () { + it( 'can render', () => { + render( <CompactFormToggle>Toggle Label</CompactFormToggle> ); + expect( screen.queryByText( 'Toggle Label' ) ).toBeInTheDocument(); + expect( screen.getAllByRole( 'checkbox' )[ 0 ].className ).toContain( 'is-compact' ); + } ); + + it( 'can render with class name passed in', () => { + render( <CompactFormToggle { ...testProps }>Toggle Label</CompactFormToggle> ); + expect( screen.getAllByRole( 'checkbox' )[ 0 ].className ).toContain( 'test-class' ); + } ); + } ); +} ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/global-notices/index.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/index.jsx index c0df631a..c0df631a 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/global-notices/index.jsx +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/index.jsx diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/global-notices/store/actions.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/store/actions.js index 09c739d0..f90c3712 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/global-notices/store/actions.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/store/actions.js @@ -1,7 +1,8 @@ /** * External dependencies */ -import { uniqueId } from 'lodash'; +/*eslint lodash/import-scope: [2, "method"]*/ +import uniqueId from 'lodash/uniqueId'; import { __ } from '@wordpress/i18n'; export const CREATE_NOTICE = 'CREATE_NOTICE'; @@ -46,7 +47,7 @@ export const successNotice = createNotice.bind( null, 'is-success' ); export const errorNotice = createNotice.bind( null, 'is-error' ); export const infoNotice = createNotice.bind( null, 'is-info' ); export const warningNotice = createNotice.bind( null, 'is-warning' ); -export const updatingNotice = ( text = __( 'Updating settings…', 'jetpack-search-pkg' ) ) => +export const updatingNotice = ( text = __( 'Updating settings…', 'jetpack-wordads' ) ) => createNotice( 'is-info', text, { duration: 30000, id: 'search-updating-settings' } ); export const removeUpdatingNotice = () => removeNotice( 'search-updating-settings' ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/global-notices/store/reducer.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/store/reducer.js index e0749197..e0749197 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/global-notices/store/reducer.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/store/reducer.js diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/global-notices/store/selectors.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/store/selectors.js index da2d9829..da2d9829 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/global-notices/store/selectors.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/store/selectors.js diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/style.scss new file mode 100644 index 00000000..0e9ca237 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/style.scss @@ -0,0 +1,81 @@ +@import "scss/calypso-colors"; +@import "scss/calypso-mixins"; +@import 'scss/z-index'; + +.global-notices { + text-align: right; + pointer-events: none; + + z-index: z-index( 'root', '.global-notices' ); + position: fixed; + top: auto; + right: 0; + bottom: 0; + left: 0; + + @include breakpoint( ">660px" ) { + top: 47px + 16px; + right: 16px; + bottom: auto; + left: auto; + + /* `36px` being the width of the collapsed WP-admin sidebar */ + max-width: calc( 100% - 32px - 36px ); + } + + @include breakpoint( ">960px" ) { + top: 47px + 24px; + right: 24px; + + /* `160px` being the width of the WP-admin sidebar */ + max-width: calc( 100% - 48px - 160px ); + } + + @include breakpoint( ">1040px" ) { + right: 32px; + + /* `160px` being the width of the WP-admin sidebar */ + max-width: calc( 100% - 64px - 160px ); + } +} + +.global-notices .dops-notice { + flex-wrap: nowrap; + margin-bottom: 0; + text-align: left; + pointer-events: auto; + border-radius: 0; + box-shadow: 0 2px 5px rgba( 0, 0, 0, 0.2 ), + 0 0 56px rgba( 0, 0, 0, 0.15 ); + + .dops-notice__icon-wrapper { + border-radius: 0; + } + + @include breakpoint( ">660px" ) { + display: flex; + overflow: hidden; + margin-bottom: 24px; + border-radius: 3px; + + .dops-notice__icon-wrapper { + border-radius: 3px 0 0 3px; + } + } +} + +.global-notices .dops-notice a.dops-notice__action { + + @include breakpoint( ">660px" ) { + font-size: 14px; + padding: 13px 16px; + } +} + +.global-notices .dops-notice__dismiss { + flex-shrink: 0; + + @include breakpoint( ">660px" ) { + padding: 13px 16px 0; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/test/index.test.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/test/index.test.jsx new file mode 100644 index 00000000..85ff9a9d --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/global-notices/test/index.test.jsx @@ -0,0 +1,26 @@ +/** + * @jest-environment jsdom + */ + +/** + * External dependencies + */ +import React from 'react'; +import { render } from '@testing-library/react'; +import '@testing-library/jest-dom'; + +/** + * Internal dependencies + */ +import GlobalNotices from 'components/global-notices'; + +describe( 'GlobalNotices', function () { + describe( 'rendering', function () { + it( 'can render', () => { + const { container } = render( + <GlobalNotices notices={ [ { id: 1, status: 'success' } ] } /> + ); + expect( container.firstChild.className ).toContain( 'global-notices' ); + } ); + } ); +} ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/module-control/index.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/module-control/index.jsx new file mode 100644 index 00000000..f63aa0ee --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/module-control/index.jsx @@ -0,0 +1,95 @@ +/** + * External dependencies + */ +import React, { useCallback } from 'react'; +import classNames from 'classnames'; + +/** + * WordPress dependencies + */ +import { __ } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +import analytics from '@automattic/jetpack-analytics'; +import Card from 'components/card'; +import CompactFormToggle from 'components/form-toggle/compact'; + +import 'scss/rna-styles.scss'; +import './style.scss'; + +const SEARCH_DESCRIPTION = __( + 'Earn income by allowing Jetpack to display high quality ads.', + 'jetpack-wordads' +); + +/** + * Search settings component to be used within the Performance section. + * + * @param {object} props - Component properties. + * @param {Function} props.updateOptions - function to update settings. + * @param {boolean} props.isSavingOptions - true if Saving options. + * @param {boolean} props.isModuleEnabled - true if WordAds module is enabled. + * @param {boolean} props.isTogglingModule - true if toggling WordAds module. + * @returns {React.Component} Search settings component. + */ +export default function WordAdsModuleControl( { + updateOptions, + isSavingOptions, + isModuleEnabled, + isTogglingModule, +} ) { + const toggleSearchModule = useCallback( () => { + const newOption = { + module_active: ! isModuleEnabled, + }; + updateOptions( newOption ); + analytics.tracks.recordEvent( 'jetpack_wordads_module_toggle', newOption ); + }, [ isModuleEnabled, updateOptions ] ); + + const renderSearchToggle = () => { + return ( + <div className="jp-form-wordads-settings-group__toggle is-search jp-wordads-dashboard-wrap"> + <div className="jp-wordads-dashboard-row"> + <div className="lg-col-span-2 md-col-span-1 sm-col-span-0"></div> + <CompactFormToggle + checked={ isModuleEnabled } + disabled={ isSavingOptions } + onChange={ toggleSearchModule } + toggling={ isTogglingModule } + className="is-wordads-admin" + switchClassNames="lg-col-span-1 md-col-span-1 sm-col-span-1" + labelClassNames=" lg-col-span-7 md-col-span-5 sm-col-span-3" + aria-label={ __( 'Enable WordAds', 'jetpack-wordads' ) } + > + { __( 'Enable WordAds', 'jetpack-wordads' ) } + </CompactFormToggle> + <div className="lg-col-span-2 md-col-span-1 sm-col-span-0"></div> + </div> + <div className="jp-wordads-dashboard-row"> + <div className="lg-col-span-3 md-col-span-2 sm-col-span-1"></div> + <div className="jp-form-wordads-settings-group__toggle-description lg-col-span-7 md-col-span-5 sm-col-span-3"> + <p className="jp-form-wordads-settings-group__toggle-explanation"> + { SEARCH_DESCRIPTION } + </p> + </div> + <div className="lg-col-span-2 md-col-span-1 sm-col-span-0"></div> + </div> + </div> + ); + }; + + return ( + <div className="jp-form-settings-group jp-form-wordads-settings-group"> + <Card + className={ classNames( { + 'jp-form-has-child': true, + 'jp-form-settings-disable': false, + } ) } + > + <div className="jp-form-wordads-settings-group-inside">{ renderSearchToggle() }</div> + </Card> + </div> + ); +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/module-control/style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/module-control/style.scss new file mode 100644 index 00000000..26ff9d43 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/module-control/style.scss @@ -0,0 +1,185 @@ +@import 'scss/_variables.scss'; + +$color-button-background: $black; +$color-button-text: $white; +$color-button-background-disabled: #dcdcde; +$color-button-text-disabled: #a7aaad; +$toggle-dot-radius: 0.9375em; +$toggle-dot-padding: 0.1875em; +$toggle-height: 1.5em; +$toggle-width: 3em; + +.jp-form-wordads-settings-group { + width: 100%; + .dops-card { + box-shadow: none; + padding: 0; + padding-top: 4em; + } + .form-toggle__label { + margin: 0; + } +} + +.jp-form-wordads-settings-group__toggle { + &.is-instant-search { + margin-top: 4em; + } + .jp-form-wordads-settings-group__toggle-container { + display: flex; + @include for-tablet-down { + justify-content: center; + } + } +} + +.form-toggle__label-content { + font-size: 1.5em; + line-height: 1.167; + font-weight: 600; + span { + font-weight: 400; + } +} + +.jp-form-wordads-settings-group__toggle-description { + margin-top: 1em; +} + +p.jp-form-wordads-settings-group__toggle-explanation { + line-height: 1.5; + font-size: 1em; + font-weight: 400; + margin-bottom: 0; + margin-top: 0; +} + +.jp-form-wordads-settings-group-buttons { + margin-top: 1.5em; +} + +.jp-form-wordads-settings-group-buttons__button { + display: flex; + justify-content: center; + align-items: center; + min-height: 2.5em; + padding: 0.5em 1.5em; + text-align: center; + + border-color: $color-button-background; + font-size: 1em; + + &.is-customize-search { + color: $color-button-text; + background-color: $color-button-background; + } + + &:disabled, + &[disabled] { + background-color: $color-button-background-disabled; + border-color: $color-button-background-disabled; + color: $color-button-text-disabled; + cursor: not-allowed; + } + + &.is-widgets-editor { + color: $color-button-background; + background: transparent; + &:disabled, + &[disabled] { + color: $color-button-text-disabled; + background: transparent; + } + } +} +.form-toggle.is-wordads-admin.is-compact { + + .form-toggle__switch { + border-radius: calc( #{$toggle-height}/ 2 ); + width: $toggle-width; + height: $toggle-height; + + &:before, + &:after { + width: $toggle-dot-radius; + height: $toggle-dot-radius; + background-color: $black; + } + background: $white; + border: 2px solid $black; + + &:focus { + box-shadow: 0 0 0 2px $blue-medium; + } + } + + &:checked { + + .form-toggle__switch { + background: $color-plan; + border-color: $color-plan; + + &:after { + left: $toggle-height; + background-color: $white; + } + } + } + + &.is-toggling + .form-toggle__switch:before, + &.is-toggling + .form-toggle__switch:after { + left: $toggle-height; + } + + &.is-toggling:checked + .form-toggle__switch:before, + &.is-toggling:checked + .form-toggle__switch:after { + left: 0; + } +} + +.jp-wordads-dashboard-cut { + position: relative; + display: block; + margin: 2em 0; + padding: 1em 4em 1em 1.5em; + border: 2px solid $jp-green-primary; + border-radius: $jp-border-radius; + text-decoration: none; + + span { + display: block; + + &:last-of-type { + font-weight: 600; + } + } + + &:hover, + &:focus { + span:last-of-type { + text-decoration: underline; + text-decoration-thickness: $jp-underline-thickness; + } + + &:after { + transform: translateY( -50% ) translateX( 8px ); + } + } + + &:after { + content: '→'; + position: absolute; + top: 50%; + right: 1.5em; + font-size: 1.5em; + font-weight: 600; + color: $jp-green-primary; + transform: translateY( -50% ); + transition: transform 0.15s ease-out; + } +} + +.jp-wordads-dashboard-row .form-toggle__switch-container.sm-col-span-1 { + display: flex; + justify-content: center; + + padding-top: 4px; +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/notice/index.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/notice/index.jsx index 9c1b2e88..a8c0121f 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/notice/index.jsx +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/notice/index.jsx @@ -4,13 +4,13 @@ import PropTypes from 'prop-types'; import React from 'react'; import classnames from 'classnames'; -import { noop } from 'lodash'; +/*eslint lodash/import-scope: [2, "method"]*/ +import noop from 'lodash/noop'; /** * Internal dependencies */ -// TODO change to our own gridicon component, when instant search is migrated. -import Gridicon from 'gridicons'; +import { Gridicon } from '@automattic/jetpack-components'; import './style.scss'; export default class SimpleNotice extends React.Component { diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/notice/notice-action.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/notice/notice-action.jsx index 5a3e8ebb..518857b6 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/components/notice/notice-action.jsx +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/notice/notice-action.jsx @@ -7,8 +7,7 @@ import React from 'react'; /** * Internal dependencies */ -// TODO change to our own gridicon component, when instant search is migrated. -import Gridicon from 'gridicons'; +import { Gridicon } from '@automattic/jetpack-components'; import './style.scss'; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/notice/style.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/notice/style.scss new file mode 100644 index 00000000..ba51000c --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/notice/style.scss @@ -0,0 +1,283 @@ +@import 'scss/calypso-colors'; +@import 'scss/layout'; +@import 'scss/calypso-mixins'; +@import 'scss/mixin_icons'; + +.dops-notice { + display: flex; + position: relative; + width: 100%; + margin-bottom: 24px; + box-sizing: border-box; + animation: appear .3s ease-in-out; + background: $gray-dark; + color: $white; + border-radius: 3px; + line-height: 1.5; + + // Success! + &.is-success { + .dops-notice__icon-wrapper { + background: $alert-green; + } + } + + // Warning + &.is-warning { + .dops-notice__icon-wrapper { + background: $alert-yellow; + } + } + + // Error! OHNO! + &.is-error { + .dops-notice__icon-wrapper { + background: $alert-red; + } + } + + // General notice + &.is-info { + .dops-notice__icon-wrapper { + background: $blue-medium; + } + } + + .dops-notice__dismiss { + overflow: hidden; + } + + &.is-success, + &.is-error, + &.is-warning, + &.is-info { + .dops-notice__dismiss { + overflow: hidden; + } + } +} + +.dops-notice__icon-wrapper { + background: $gray-text-min; + color: $white; + display: flex; + align-items: baseline; + width: 47px; + justify-content: center; + border-radius: 3px 0 0 3px; + flex-shrink: 0; + align-self: stretch; + + .gridicon { + margin-top: 10px; + + @include breakpoint( ">480px" ) { + margin-top: 12px; + } + } +} + +.dops-notice__content.dops-notice__content { + padding: 13px; + font-size: 12px; + flex-grow: 1; + + @include breakpoint( ">480px" ) { + font-size: 14px; + } + a { + text-decoration: underline; + color: $white; + } + a:hover { + text-decoration: none; + } +} + +.dops-notice__text { + a.dops-notice__text-no-underline { + text-decoration: none; + } + + a, + a:visited { + text-decoration: underline; + color: $white; + + &:hover { + color: $white; + text-decoration: none; + } + } + + ul { + margin-bottom: 0; + margin-left: 0; + } + + li { + margin-left: 2em; + margin-top: 0.5em; + } + + p { + margin-bottom: 0; + margin-top: 0.5em; + + &:first-child { + margin-top: 0; + } + } +} + +.dops-notice__button { + cursor: pointer; + margin-left: 0.428em; +} + +// "X" for dismissing a notice +.dops-notice__dismiss { + flex-shrink: 0; + padding: 12px; + cursor: pointer; + padding-bottom: 0; + + .gridicon { + width: 18px; + height: 18px; + } + + @include breakpoint( ">480px" ) { + padding: 11px; + padding-bottom: 0; + + .gridicon { + width: 24px; + height: 24px; + } + } + + .dops-notice & { + color: $gray-lighten-10; + + &:hover, + &:focus { + color: $white; + } + } +} + +// specificity for general `a` elements within notice is too great +a.dops-notice__action { + cursor: pointer; + font-size: 12px; + font-weight: 400; + text-decoration: none; + white-space: nowrap; + color: $gray-lighten-10; + padding: 13px; + display: flex; + align-items: center; + + @include breakpoint( ">480px" ) { + flex-shrink: 1; + flex-grow: 0; + align-items: center; + border-radius: 0; + font-size: 14px; + margin: 0 0 0 auto; // forces the element to the right; + padding: 13px 16px; + + .gridicon { + width: 24px; + height: 24px; + } + } + + &:visited { + color: $gray-lighten-10; + } + + &:hover { + color: $white; + } + + .gridicon { + margin-left: 8px; + opacity: 0.7; + width: 18px; + height: 18px; + } +} + +// Compact notices +.dops-notice.is-compact { + display: inline-flex; + flex-wrap: nowrap; + flex-direction: row; + width: auto; + border-radius: 3px; + min-height: 20px; + margin: 0; + padding: 0; + text-decoration: none; + text-transform: none; + vertical-align: middle; + line-height: 1.5; + + .dops-notice__content { + font-size: 12px; + padding: 6px 10px; + } + + .dops-notice__icon-wrapper { + width: 28px; + + .dops-notice__icon { + width: 18px; + height: 18px; + margin: 0; + } + + .gridicon { + margin-top: 6px; + } + } + + .dops-notice__dismiss { + position: relative; + align-self: center; + flex: none; + margin: 0 8px 0 0; + padding: 0; + + .gridicon { + width: 18px; + height: 18px; + } + } + + a.dops-notice__action { + background: transparent; + display: inline-block; + margin: 0; + font-size: 12px; + align-self: center; + margin-left: 16px; + padding: 0 10px; + + &:hover, + &:active, + &:focus { + background: transparent; + } + + .gridicon { + margin-left: 8px; + width: 14px; + height: 14px; + vertical-align: sub; + opacity: 1; + } + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/notice/test/index.test.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/notice/test/index.test.jsx new file mode 100644 index 00000000..10ca1386 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/components/notice/test/index.test.jsx @@ -0,0 +1,34 @@ +/** + * @jest-environment jsdom + */ + +/** + * External dependencies + */ +import React from 'react'; +import { render } from '@testing-library/react'; +import '@testing-library/jest-dom'; + +/** + * Internal dependencies + */ +import SimpleNotice from 'components/notice'; + +describe( 'SimpleNotice', function () { + const testProps = { + className: 'test-class', + }; + describe( 'rendering', function () { + it( 'can render', () => { + const { container } = render( <SimpleNotice id="1" status="success" /> ); + expect( + container.getElementsByClassName( 'dops-notice__icon-wrapper' ).length + ).toBeGreaterThan( 0 ); + } ); + + it( 'can render with class name passed in', () => { + const { container } = render( <SimpleNotice { ...testProps }>Toggle Label</SimpleNotice> ); + expect( container.firstChild.className ).toContain( 'test-class' ); + } ); + } ); +} ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/index.jsx b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/index.jsx new file mode 100644 index 00000000..a1335bb6 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/index.jsx @@ -0,0 +1,45 @@ +/** + * External dependencies + */ +import ReactDOM from 'react-dom'; +import React from 'react'; +import { ThemeProvider } from '@automattic/jetpack-components'; + +/** + * WordPress dependencies + */ +import { createReduxStore, register } from '@wordpress/data'; + +/** + * Internal dependencies + */ +import { STORE_ID, storeConfig } from './store'; +import WordAdsDashboard from './components/dashboard'; + +const store = createReduxStore( STORE_ID, storeConfig ); +register( store ); + +/** + * Mounts the Search Dashboard to #jp-wordads-dashboard if available. + */ +function init() { + const container = document.getElementById( 'jp-wordads-dashboard' ); + + if ( container === null ) { + return; + } + + ReactDOM.render( + <ThemeProvider> + <WordAdsDashboard /> + </ThemeProvider>, + container + ); +} + +// Initialize the dashboard when DOMContentLoaded is fired, or immediately if it already has been. +if ( document.readyState !== 'loading' ) { + init(); +} else { + document.addEventListener( 'DOMContentLoaded', init ); +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/_variables.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/_variables.scss new file mode 100644 index 00000000..2b189915 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/_variables.scss @@ -0,0 +1,55 @@ +// +// Variables +// +@import 'node_modules/@automattic/color-studio/dist/color-variables.scss'; + +/********* RNA styles *********/ +// Copied from plugins/backup/src/js/components + +$font-title-large: 36px; +$font-title-small: 24px; +$font-body: 16px; +$font-label: 12px; + +$jp-black: #000000; +$jp-black-80: #2c3338; +$jp-white: #ffffff; +$jp-white-off: #f9f9f6; +$jp-gray: #dcdcde; +$jp-gray-off: #e2e2df; + +$jp-green-primary: #069e08; +$jp-green-secondary: #2fb41f; + +$jp-border-radius: 4px; +$jp-menu-border-height: 1px; +$jp-underline-thickness: 2px; +/********* Generic styles *********/ +$wp-gray-dark: #23282d; +$black: #000; +$white: #fff; +$blue-medium: #3582c4; +$color-plan: #069e08; // $studio-jetpack-green-40 + +/********* Mixins *********/ +@mixin for-phone-up { + @media ( min-width: 600px ) { + @content; + } +} +@mixin for-tablet-up { + @media ( min-width: 960px ) { + @content; + } +} + +@mixin for-phone-down { + @media ( max-width: 600px ) { + @content; + } +} +@mixin for-tablet-down { + @media ( max-width: 960px ) { + @content; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/calypso-colors.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/calypso-colors.scss new file mode 100644 index 00000000..63e23fcc --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/calypso-colors.scss @@ -0,0 +1,60 @@ +// Blues +$blue-wordpress: #0087be; +$blue-light: #78dcfa; +$blue-medium: #3582c4; +$blue-dark: #005082; +$blue-medium-dark: #2271b1; +$blue-grey-light: #f6f7f7; +$blue-grey-dark: #0a4b78; +$light-gray-700: #c3c4c7; + + +// Grays +$gray-original: #87a6bc; +$gray: desaturate( $gray-original, 100% ); // Intermediary transform to match dotcom's colors + +// $gray color functions: +// +// lighten( $gray, 10% ) +// lighten( $gray, 20% ) +// lighten( $gray, 30% ) +// darken( $gray, 10% ) +// darken( $gray, 20% ) +// darken( $gray, 30% ) +// +// See wordpress.com/design-handbook/colors/ for more info. + +$gray-light: lighten( $gray, 33% ); //#f6f6f6 +$gray-dark: darken( $gray, 38% ); //#404040 + +// $gray-text: ideal for standard, non placeholder text +// $gray-text-min: minimum contrast needed for WCAG 2.0 AA on white background +$gray-text: $gray-dark; +$gray-text-min: darken( $gray, 18% ); //#537994 + +// Shades of gray +$gray-lighten-10: lighten( $gray, 10% ); // #a8bece +$gray-lighten-20: lighten( $gray, 20% ); // #c8d7e1 +$gray-lighten-30: lighten( $gray, 30% ); // #e9eff3 +$gray-darken-10: darken( $gray, 10% ); // #668eaa +$gray-darken-20: darken( $gray, 20% ); // #4f748e +$gray-darken-30: darken( $gray, 30% ); // #3d596d + +// Oranges +$orange-jazzy: #f0821e; +$orange-fire: #d63638; + +// Alerts +$alert-yellow: #f0b849; +$alert-red: #d94f4f; +$alert-green: #4ab866; +$alert-purple: #855DA6; + +// Link hovers +$link-highlight: tint($blue-medium, 20%); + +// Essentials +$white: rgba(255,255,255,1); +$transparent: rgba(255,255,255,0); + +$border-ultra-light-gray: #e8f0f5; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/calypso-mixins.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/calypso-mixins.scss new file mode 100644 index 00000000..7db8b157 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/calypso-mixins.scss @@ -0,0 +1,351 @@ +@use "sass:math"; + +$full-width: 960px; +$one-col: 660px; +$mobile: 480px; + +$sidebar-width: 269px; + +@mixin responsive($width) { + @if $width == full-width { + @media only screen and (max-width: $full-width) { @content; } + } + @else if $width == one-col { + @media only screen and (max-width: $one-col) { @content; } + } + @else if $width == mobile { + @media only screen and (max-width: $mobile) { @content; } + } +} + +@mixin mobile-first-responsive($width) { + @if $width == full-width { + @media only screen and (min-width: $one-col) { @content; } + } + @else if $width == full-width-really { + @media only screen and (min-width: $full-width) { @content; } + } + @else if $width == one-col { + @media only screen and (min-width: $mobile) { @content; } + } +} + +// ========================================================================== +// Breakpoint Mixin +// See https://wpcalypso.wordpress.com/devdocs/docs/coding-guidelines/css.md#media-queries +// ========================================================================== + +$breakpoints: 480px, 660px, 960px, 1040px; // Think very carefully before adding a new breakpoint + +@mixin breakpoint( $size ){ + @if type-of($size) == string { + $approved-value: 0; + @each $breakpoint in $breakpoints { + $and-larger: ">" + $breakpoint; + $and-smaller: "<" + $breakpoint; + + @if $size == $and-smaller { + $approved-value: 1; + @media ( max-width: $breakpoint ) { + @content; + } + } + @else { + @if $size == $and-larger { + $approved-value: 2; + @media ( min-width: $breakpoint + 1 ) { + @content; + } + } + @else { + @each $breakpoint-end in $breakpoints { + $range: $breakpoint + "-" + $breakpoint-end; + @if $size == $range { + $approved-value: 3; + @media ( min-width: $breakpoint + 1 ) and ( max-width: $breakpoint-end ) { + @content; + } + } + } + } + } + } + @if $approved-value == 0 { + $sizes: ""; + @each $breakpoint in $breakpoints { + $sizes: $sizes + " " + $breakpoint; + } + // TODO - change this to use @error, when it is supported by node-sass + @warn "ERROR in breakpoint( #{ $size } ): You can only use these sizes[ #{$sizes} ] using the following syntax [ <#{ nth( $breakpoints, 1 ) } >#{ nth( $breakpoints, 1 ) } #{ nth( $breakpoints, 1 ) }-#{ nth( $breakpoints, 2 ) } ]"; + } + } + @else { + $sizes: ""; + @each $breakpoint in $breakpoints { + $sizes: $sizes + " " + $breakpoint; + } + // TODO - change this to use @error, when it is supported by node-sass + @warn "ERROR in breakpoint( #{ $size } ): Please wrap the breakpoint $size in parenthesis. You can use these sizes[ #{$sizes} ] using the following syntax [ <#{ nth( $breakpoints, 1 ) } >#{ nth( $breakpoints, 1 ) } #{ nth( $breakpoints, 1 ) }-#{ nth( $breakpoints, 2 ) } ]"; + } +} + + +@mixin calc($property, $expression) { + #{$property}: -moz-calc(#{$expression}); + #{$property}: -o-calc(#{$expression}); + #{$property}: -webkit-calc(#{$expression}); + #{$property}: calc(#{$expression}); +} + +@mixin clear-fix { + &:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } +} + +@mixin noticon($char, $size: null) { + // This isn't very clean, but... we'll see ;) + @if $size != 0 { + font-size: $size; + } + content: $char; + + // Copied verbatim + vertical-align: top; + text-align: center; + display: inline-block; + font-family: "Noticons"; + font-style: normal; + font-weight: normal; + font-variant: normal; + line-height: 1; + text-decoration: inherit; + text-transform: none; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + speak: none; +} + +@mixin border-box { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +// Turn a list into a dropdown menu +@mixin dropdown-menu { + display: none; + background: $white; + float: none; + line-height: 46px; + min-width: 220px; + overflow: visible; + padding: 0; + position: absolute; + width: auto; + z-index: 1; + box-sizing: border-box; + box-shadow: 0 0 2px rgba(0,0,0,0.15), 0 3px 8px rgba(0,0,0,0.1); + + &:after { + border: 6px solid transparent; + border-bottom-color: $white; + content: ' '; + height: 0; + position: absolute; + top: -12px; + left: 73px; + width: 0; + } + + li { + display: block; + float: none; + + a, + a.selected { + border-bottom: 1px solid rgba(0,0,0,0.1); + color: $blue-wordpress; + display: block; + float: none; + height: auto; + margin: 0; + padding: 0 14px; + text-align: left; + + &:hover { + border-bottom: 1px solid rgba(0,0,0,0.1); + background: none; // Remove inherited background color + color: $link-highlight; + box-shadow: none; // Remove inherited box shadow + } + } + + a.selected { + color: $gray-dark; + } + + &:last-child a { + border-bottom: none; // Last child in the dropdown doesn't need a bottom border + } + } +} + +// Can't use the @extend in a media query, use this instead +@mixin clear-text { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +// courtesy: http://codeboxers.com/sass-mixin-for-transitions/ +@mixin transition($transition-property, $transition-time, $method) { + -webkit-transition: $transition-property $transition-time $method; + -moz-transition: $transition-property $transition-time $method; + -ms-transition: $transition-property $transition-time $method; + -o-transition: $transition-property $transition-time $method; + transition: $transition-property $transition-time $method; +} + +@mixin box-shadow($shadows...) { + -webkit-box-shadow: $shadows; + -moz-box-shadow: $shadows; + -ms-box-shadow: $shadows; + -o-box-shadow: $shadows; + box-shadow: $shadows; +} + +@mixin site-icon($size, $icon-size) { + position: relative; + display: inline-block; + width: $size; + height: $size; + overflow: hidden; + background: lighten( $gray, 20% ); + + &::before { + content: '\f475'; + display: inline-block; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font: normal math.div($icon-size, 1) 'Noticons'; + color: $white; + position: absolute; + top: 0; + left: 0; + height: $size; + width: $size; + line-height: $size; + text-align: center; + z-index: 0; + } + + img { + background: $white; + position: relative; + } +} + +@mixin debug(){ + box-shadow: 0px 0px 10px $alert-red inset; +} + +@mixin stats-fade-text($toColor) { + background-image: linear-gradient(to right, $transparent 0%, $toColor 90%); + position: absolute; + z-index: 1; + left: -48px; + top: 0; + bottom: 0; + content: ""; + display: block; + width: 48px; +} + +@mixin hide-content-accessibly { + clip: rect( 1px, 1px, 1px, 1px ); + height: 1px; + overflow: hidden; + position: absolute; + width: 1px; +} + +// Creates a fading overlay to signify that the content is longer +// than the space allows. +@mixin long-content-fade( $direction: right, $size: 20%, $color: #fff, $edge: 0px, $z-index: false) { + content: ''; + display: block; + position: absolute; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + + @if $z-index { + z-index: $z-index; + } + + @if $direction == 'bottom' { + background: linear-gradient( to top, rgba( $color, 0 ), $color 90% ); + left: $edge; + right: $edge; + top: $edge; + bottom: calc(100% - $size); + width: auto; + } + + @if $direction == 'top' { + background: linear-gradient( to bottom, rgba( $color, 0 ), $color 90% ); + top: calc(100% - $size); + left: $edge; + right: $edge; + bottom: $edge; + width: auto; + } + + @if $direction == 'left'{ + background: linear-gradient( to left, rgba( $color, 0 ), $color 90% ); + top: $edge; + left: $edge; + bottom: $edge; + right: auto; + width: $size; + height: auto; + } + + @if $direction == 'right' { + background: linear-gradient( to right, rgba( $color, 0 ), $color 90% ); + top: $edge; + bottom: $edge; + right: $edge; + left: auto; + width: $size; + height: auto; + } +} + +@mixin placeholder( $lighten-percentage: 30% ) { + animation: loading-fade 1.6s ease-in-out infinite; + background-color: lighten( $gray, $lighten-percentage ); + color: transparent; + + &:after { + content: '\00a0'; + } +} + +// Simple animation to make elements appear +@keyframes appear { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/color-functions.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/color-functions.scss new file mode 100644 index 00000000..32dddb92 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/color-functions.scss @@ -0,0 +1,11 @@ +// Add percentage of white to a color +// Copyright © 2011–2015 thoughtbot. See CREDITS.md#L3 +@function tint($color, $percent){ + @return mix(white, $color, $percent); +} + +// Add percentage of black to a color +// Copyright © 2011–2015 thoughtbot. See CREDITS.md#L3 +@function shade($color, $percent){ + @return mix(black, $color, $percent); +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/functions/colors.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/functions/colors.scss new file mode 100644 index 00000000..ca475116 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/functions/colors.scss @@ -0,0 +1,32 @@ +/* +The MIT License (MIT) + +Copyright © 2011–2015 thoughtbot, inc. + +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. + +https://github.com/thoughtbot/bourbon +*/ + +// Add percentage of white to a color +// Copyright © 2011–2015 thoughtbot. See CREDITS.md#L3 +@function tint($color, $percent){ + @return mix(white, $color, $percent); +} + +// Add percentage of black to a color +// Copyright © 2011–2015 thoughtbot. See CREDITS.md#L3 +@function shade($color, $percent){ + @return mix(black, $color, $percent); +}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/functions/rem.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/functions/rem.scss new file mode 100644 index 00000000..e44a5956 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/functions/rem.scss @@ -0,0 +1,16 @@ + +// ====================================================================== +// Rem function +// +// Convert px to rem in a readable fashion. +// +// Example: font-size: rem( 21px ); +// ====================================================================== + +@use "sass:math"; + +$root-font-size: 16px; + +@function rem( $pixels, $context: $root-font-size ) { + @return math.div($pixels, $context) * 1rem; +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/layout.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/layout.scss new file mode 100644 index 00000000..369210b2 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/layout.scss @@ -0,0 +1,95 @@ +@mixin clear-fix { + &:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } +} + +@mixin noticon($char, $size: null) { + // This isn't very clean, but... we'll see ;) + @if $size != 0 { + font-size: $size; + } + content: $char; + + // Copied verbatim + vertical-align: top; + text-align: center; + display: inline-block; + font-family: "Noticons"; + font-style: normal; + font-weight: normal; + font-variant: normal; + line-height: 1; + text-decoration: inherit; + text-transform: none; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + speak: none; +} + +// ========================================================================== +// Breakpoint Mixin +// See https://wpcalypso.wordpress.com/devdocs/docs/coding-guidelines/css.md#media-queries +// ========================================================================== + +$breakpoints: 480px, 660px, 960px, 1040px; // Think very carefully before adding a new breakpoint + +@mixin breakpoint( $size ){ + @if type-of($size) == string { + $approved-value: 0; + @each $breakpoint in $breakpoints { + $and-larger: ">" + $breakpoint; + $and-smaller: "<" + $breakpoint; + + @if $size == $and-smaller { + $approved-value: 1; + @media ( max-width: $breakpoint ) { + @content; + } + } + @else { + @if $size == $and-larger { + $approved-value: 2; + @media ( min-width: $breakpoint + 1 ) { + @content; + } + } + @else { + @each $breakpoint-end in $breakpoints { + $range: $breakpoint + "-" + $breakpoint-end; + @if $size == $range { + $approved-value: 3; + @media ( min-width: $breakpoint + 1 ) and ( max-width: $breakpoint-end ) { + @content; + } + } + } + } + } + } + @if $approved-value == 0 { + $sizes: ""; + @each $breakpoint in $breakpoints { + $sizes: $sizes + " " + $breakpoint; + } + // TODO - change this to use @error, when it is supported by node-sass + @warn "ERROR in breakpoint( #{ $size } ): You can only use these sizes[ #{$sizes} ] using the following syntax [ <#{ nth( $breakpoints, 1 ) } >#{ nth( $breakpoints, 1 ) } #{ nth( $breakpoints, 1 ) }-#{ nth( $breakpoints, 2 ) } ]"; + } + } + @else { + $sizes: ""; + @each $breakpoint in $breakpoints { + $sizes: $sizes + " " + $breakpoint; + } + // TODO - change this to use @error, when it is supported by node-sass + @warn "ERROR in breakpoint( #{ $size } ): Please wrap the breakpoint $size in parenthesis. You can use these sizes[ #{$sizes} ] using the following syntax [ <#{ nth( $breakpoints, 1 ) } >#{ nth( $breakpoints, 1 ) } #{ nth( $breakpoints, 1 ) }-#{ nth( $breakpoints, 2 ) } ]"; + } +} + +#jp-plugin-container { + min-height: 100vh; +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/mixin_breakpoint.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/mixin_breakpoint.scss new file mode 100644 index 00000000..035bf650 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/mixin_breakpoint.scss @@ -0,0 +1,58 @@ +// ========================================================================== +// Breakpoint Mixin +// See https://wpcalypso.wordpress.com/devdocs/docs/coding-guidelines/css.md#media-queries +// ========================================================================== + +$breakpoints: 480px, 660px, 960px, 1040px; // Think very carefully before adding a new breakpoint + +@mixin breakpoint( $size ){ + @if type-of($size) == string { + $approved-value: 0; + @each $breakpoint in $breakpoints { + $and-larger: ">" + $breakpoint; + $and-smaller: "<" + $breakpoint; + + @if $size == $and-smaller { + $approved-value: 1; + @media ( max-width: $breakpoint ) { + @content; + } + } + @else { + @if $size == $and-larger { + $approved-value: 2; + @media ( min-width: $breakpoint + 1 ) { + @content; + } + } + @else { + @each $breakpoint-end in $breakpoints { + $range: $breakpoint + "-" + $breakpoint-end; + @if $size == $range { + $approved-value: 3; + @media ( min-width: $breakpoint + 1 ) and ( max-width: $breakpoint-end ) { + @content; + } + } + } + } + } + } + @if $approved-value == 0 { + $sizes: ""; + @each $breakpoint in $breakpoints { + $sizes: $sizes + " " + $breakpoint; + } + // TODO - change this to use @error, when it is supported by node-sass + @warn "ERROR in breakpoint( #{ $size } ): You can only use these sizes[ #{$sizes} ] using the following syntax [ <#{ nth( $breakpoints, 1 ) } >#{ nth( $breakpoints, 1 ) } #{ nth( $breakpoints, 1 ) }-#{ nth( $breakpoints, 2 ) } ]"; + } + } + @else { + $sizes: ""; + @each $breakpoint in $breakpoints { + $sizes: $sizes + " " + $breakpoint; + } + // TODO - change this to use @error, when it is supported by node-sass + @warn "ERROR in breakpoint( #{ $size } ): Please wrap the breakpoint $size in parenthesis. You can use these sizes[ #{$sizes} ] using the following syntax [ <#{ nth( $breakpoints, 1 ) } >#{ nth( $breakpoints, 1 ) } #{ nth( $breakpoints, 1 ) }-#{ nth( $breakpoints, 2 ) } ]"; + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/mixin_icons.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/mixin_icons.scss new file mode 100644 index 00000000..d99666e8 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/mixin_icons.scss @@ -0,0 +1,16 @@ +@mixin clear-text-icon { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + display: inline-block; + vertical-align: middle; +} + +@mixin dashicons { + @include clear-text-icon; + font: normal 16px/1 'Dashicons'; +} + +@mixin noticons { + @include clear-text-icon; + font: normal 16px/1 'Noticons'; +}
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/rna-styles.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/rna-styles.scss new file mode 100644 index 00000000..16147093 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/rna-styles.scss @@ -0,0 +1,74 @@ +@import './_variables.scss'; + +.jp-wordads-dashboard-wrap { + display: flex; + align-items: center; + justify-content: center; + flex-flow: column nowrap; + width: 100%; + margin: 0 auto; +} + +.jp-wordads-dashboard-row { + display: grid; + grid-gap: 24px; + grid-template-columns: repeat( 4, 1fr ); + width: calc( 100% - 32px ); + margin: 0 16px; + + @include for-phone-up { + grid-template-columns: repeat( 8, 1fr ); + width: calc( 100% - 36px ); + margin: 0 18px; + } + + @include for-tablet-up { + grid-template-columns: repeat( 12, 1fr ); + max-width: 1128px; + width: calc( 100% - 48px ); + margin: 0 24px; + } + + @for $i from 1 through 4 { + .sm-col-span-#{$i} { + grid-column-end: span #{$i}; + } + } + + @include for-phone-up { + @for $i from 1 through 8 { + .md-col-span-#{$i} { + grid-column-end: span #{$i}; + } + } + } + + @include for-tablet-up { + @for $i from 1 through 12 { + .lg-col-span-#{$i} { + grid-column-end: span #{$i}; + } + } + } + + @include for-tablet-up { + .lg-col-span-0 { + display: none; + } + } + + @include for-tablet-down { + .md-col-span-0 { + display: none; + } + } + + @include for-phone-down { + .sm-col-span-0 { + display: none; + } + .sm-col-span-1 { + display: block; + } + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/typography.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/typography.scss new file mode 100644 index 00000000..631b1067 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/typography.scss @@ -0,0 +1,43 @@ +// ========================================================================== +// TYPOGRAPHY +// ========================================================================== + +$normal: 400; // Change these values when using custom fonts +$bold: 700; // For example, bold could change to 400; + +// Typefaces +$monospace: Monaco, Consolas, 'courier new', "Andale Mono", monospace; +$serif: Georgia, "Times New Roman", Times, serif; +$sans: Helvetica, Arial, sans-serif; +$open-sans: 'Open Sans', $sans; // 300 400 400i 600 700 700i 800 +$merriweather: 'Merriweather', $serif; // 900 700 +$calluna: "calluna-1","calluna-2", Georgia, "Times New Roman", Times, serif; +$helvetica: "Helvetica Neue", $sans; +$helvetica-ultralight: HelveticaNeue-UltraLight, 'Helvetica Neue UltraLight', 'Helvetica Neue', $sans; +$helvetica-light: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', $sans; +$arial: Arial, Helvetica, Sans-serif; +$gill-sans: "Gill Sans", "Gill Sans MT", "Trebuchet MS", $sans; + +// Icons +$genericons: 'Genericons', Arial, sans-serif; +$dashicons: 'Dashicons', Arial, sans-serif; +$noticons: 'Noticons', Arial, sans-serif; +$automatticons: 'automatticons', Arial, sans-serif; + +// NOTE: +// If there are exceptions to these stacks, +// please mark them with a //typography-exception comment +// so we can easily search for them later. + +// Typography size variables + +$font-headline-large: rem( 54px ); +$font-headline-medium: rem( 48px ); +$font-headline-small: rem( 36px ); +$font-title-large: rem( 32px ); +$font-title-medium: rem( 24px ); +$font-title-small: rem( 20px ); +$font-body: rem( 16px ); +$font-body-small: rem( 14px ); +$font-body-extra-small: rem( 12px ); +$font-code: rem( 15px );
\ No newline at end of file diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/z-index.scss b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/z-index.scss new file mode 100644 index 00000000..d07d0fb6 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/scss/z-index.scss @@ -0,0 +1,233 @@ +// ========================================================================== +// A nested map of all of our z-index values. +// +// Please add new values relative to their parent stacking context. For +// example the values of 'root' are elements with a stacking context that have no +// parents with a stacking context, other than the default html root. +// +// A Stacking Context is created when: +// 1. It's the root element (HTML) +// 2. Has a position other than static, with a z-index value +// 3. position:fixed +// 4. Has one of the following css properties: (transform, opacity<1, mix-blend-mode, filter) +// 5. isolation:isolate +// 6: -webkit-overflow-scrolling: touch +// +// So before adding a new z-index: +// 1. You'll want to make sure the element actually creates a stacking context +// 2. Look up what its parent stacking context is +// You can run this handy gist: https://gist.github.com/gwwar/2f661deec7b99a1a418b in the console to find both. +// +// For readability please sort values from lowest to highest. +// +// Usage: +// .environment-badge { +// z-index: z-index( 'root' '.environment-badge' ); +// } +// +// For a refresher on stacking contexts see: +// https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context +// ========================================================================== + +$z-layers: ( + 'root': ( + '.translator-invitation:before': -1, + '.NuxWelcome:before': -1, + '.infinite-scroll-end:before': -1, + '.is-group-editor::before': -1, + '.site-icon.is-blank .gridicon': 0, + '.dops-chart__bar-section.is-spacer': 0, + '.gear-dropdown:after': 0, + '.plan-compare-card__ribbon': 1, + '.reader__featured-post-title': 1, + '.reader-list-gap__button': 1, + '.post-trends__title': 1, + '.plugin-item__label': 1, + '.wp-editor-tools': 1, + '.plan .gridicons-checkmark-circle': 1, + '.plan-discount-message': 1, + '.editor__switch-mode': 1, + '.auth__form .form-fieldset input': 1, + '.dops-chart__empty': 1, + '.dops-chart__bar-marker': 1, + '.dops-chart__bar-section.is-ghost::after': 1, + '.billing-history-page .filter-popover-content': 1, + '.module-content-table::after': 1, + '.stats-popular__empty': 1, + '.menus__menu-item.is-lander': 1, + '.people-list-item__label': 1, + '.is-actionable .theme__active-focus': 1, + '.dops-accessible-focus .current-theme__button:focus': 1, + '.signup-processing-screen__processing-step.is-processing:before': 1, + '.dops-accessible-focus .theme__more-button button:focus': 1, + '.reader-update-notice': 2, + '.people-list-item .card__link-indicator': 2, + '.updated-confirmation': 2, + '.auth__form .form-fieldset input:focus': 2, + '.toolbar-bulk': 2, + '.menus__menu-item': 2, + '.menus__menu-item-open:before': 2, + '.dops-chart__bar-section': 2, + '.module-content-table tbody th:first-child': 2, + 'ul.module-header-actions .module-header-action-link': 2, + '.stats-module.is-loading .module-header-title::after': 2, + 'ul.module-content-list-item-action-submenu': 2, + 'ul.module-content-list-item-actions': 2, + '.site-indicator__button': 3, + 'ul.module-content-list-item-actions.collapsed': 3, + '.auth__input-wrapper .gridicon': 3, + '.auth__self-hosted-instructions': 4, + '.auth__form .form-password-input__toggle-visibility': 4, + '.site-selector': 10, + '.editor-featured-image__preview.is-transient::after': 10, + '.wp-secondary .site-selector': 10, + '.range__label': 10, + '.sticky-panel.is-sticky .sticky-panel__content': 20, + '.editor-featured-image .editor-drawer-well__remove': 20, + '.main': 20, //TODO: this doesn't always have a stacking context + //'tinymce-toolbar': 20, client/components/tinymce/index.jsx + '.dops-search': 22, + '#translator-launcher': 99, + '.author-selector__popover.popover': 100, + '.dops-search.is-pinned': 170, + '.dops-select-dropdown.is-open .dops-select-dropdown__container': 170, + '.dops-accessible-focus .dops-select-dropdown.is-open .dops-select-dropdown__container': 170, + '.sites-dropdown.is-open .sites-dropdown__wrapper' : 170, + '.popover.editor-visibility__popover': 179, + '.feature-example__gradient': 179, + '.global-notices': 179, + '.notices-list.is-pinned': 180, + '.notices-list.is-pinned .notice': 180, + '.masterbar': 180, + '.detail-page__backdrop': 190, + '.layout__loader': 200, + '.offline-status': 200, + '.reader-post-images__full-list': 200, + '.environment-badge': 999, + '.customizer-loading-panel__muse-status': 999, + '.customizer-loading-panel__placeholder-change-theme': 999, + '.module-overlay': 1000, + '.drop-zone': 1000, + '.dops-popover': 1000, + '.sharing-buttons-preview-buttons__more': 1000, + '.sortable-list__item.is-draggable.is-active': 1000, + '.dops-chart__tooltip': 1000, + '.drop-zone__content': 1010, + '.wp-overlay': 9999, + '.dropdown-menu': 9999, + '.main.customize.is-iframe': 9999, + '.fullscreen-overlay': 100005, + '#wp_editbtns': 100020, + '#wp-fullscreen-body': 100010, + '.wp-fullscreen-wrap': 100015, + '#wp-fullscreen-statusbar': 100020, + '#fullscreen-topbar': 100020, + '.wp-fullscreen-active #TB_overlay': 100050, + '.wp-fullscreen-active #TB_window': 100051, + 'div.mce-inline-toolbar-grp': 100100, + '.dialog__backdrop': 100200, + '.wplink__dialog.dialog.card': 100200, + '.web-preview': 100200, + '.category-selector__add-category-info': 100201, + '.dops-popover.is-dialog-visible': 100300, + 'body .webui-popover': 100300, + '.fullscreen-fader': 200000, + '.guided-tours__overlay': 200050, + '.guided-tours__step': 201000, + '#habla_window_div.habla_window_div_base': 99999999 //olark + ), + '.plan-compare-card__ribbon': ( + '.plan-compare-card__ribbon-title::before': -1, + '.plan-compare-card__ribbon-title::after': -1 + ), + '.environment-badge': ( + '.environment-badge .environment::before': -1, + '.environment-badge .bug-report': 1000 + ), + '.masterbar': ( + '.masterbar__notifications-bubble': 99999 + ), + '.detail-page__backdrop': ( + '.detail-page__action-buttons': 200 + ), + '.toolbar-bulk': ( + '.toolbar-bulk__check-all': 1, + '.toolbar-bulk__selection-options': 1, + '.toolbar-bulk__more-actions': 1, + '.plugins .toolbar-bulk__toggle': 21, + '.toolbar-bulk__toggle': 30 + ), + '.dops-popover': ( + '.input-chrono__container .gridicons-calendar': 0, + 'input.input-chrono': 1, + '.dops-popover .dops-popover__arrow': 1, + '.post-schedule__header': 1 + ), + '.dops-search': ( + '.dops-search__input': 10, + '.dops-search.is-searching .dops-spinner': 20, + '.dops-search .dops-search__open-icon': 20, + '.dops-search .dops-search__close-icon': 20 + ), + '.profile-gravatar__edit-label-wrap': ( + '.profile-gravatar__edit-label-wrap:after': 0, + '.profile-gravatar__edit-label': 1000 + ), + '.media-library__list-item': ( + '.media-library__list-item.is-selected::after': 10, + '.media-library__list-item.is-transient .media-library__list-item-figure::after': 10, + '.media-library__list-item-selected-icon .gridicon': 20, + '.media-library__list-item-spinner': 20, + '.media-library__list-item-edit': 20 + ), + '.dialog__backdrop': ( + '.editor-media-modal .section-nav': 10, + '.editor-media-modal .notice': 10, + '.editor-media-modal-gallery__preview-toggle': 100, + '.editor-contact-form-modal .section-nav': 10 + ), + '.following-edit': ( //aka 'main' + '.following-edit__subscribe-form .gridicons-add-outline': 23, + '.following-edit__subscribe-form .card.is-search-result': 35 + ), + + // The following may be inserted into different areas. + // The parent stacking context may be root, or something else depending on where it is inserted. + 'icon-parent': ( + '.sidebar__menu .gridicon.gridicons-external': 1, + '.sidebar__menu .noticon-external': 1 + ), + 'screen-reader-text-parent': ( + '.screen-reader-text:focus': 100000 + ), + 'button-group-parent': ( + '.button-group .button:focus': 1 + ), + 'progress-indicator-parent': ( + '.progress-indicator__cancel.noticon:before': 1, + '.progress-indicator .is-success': 2 + ), + 'dops-section-nav-tabs__dropdown-parent': ( + '.dops-section-nav-tabs__dropdown': 3, + '.dops-section-nav-tabs__dropdown.is-open': 4 + ), + 'reader-card-follow-button-parent': ( + '.reader__card.card .follow-button': 1 + ) +); + +// allows us to do a nested fetch +@function map-deep-get( $map, $keys... ) { + @each $key in $keys { + @if not map-has-key( $map, $key) { + @warn "No layer found for `#{$key}` of `[#{ $keys }]` in $z-layers map. Property omitted."; + @return map-get( $map, $key ); + } + $map: map-get( $map, $key ); + } + @return $map; +} + +@function z-index( $keys... ) { + @return map-deep-get( $z-layers, $keys... ); +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/actions/index.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/actions/index.js index 3b831225..51cfcd8b 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/actions/index.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/actions/index.js @@ -2,12 +2,10 @@ * Internal dependencies */ import siteSettingActions from './jetpack-settings'; -import sitePlanActions from './site-plan'; import noticeActions from 'components/global-notices/store/actions'; const actions = { ...siteSettingActions, - ...sitePlanActions, ...noticeActions, }; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/actions/jetpack-settings.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/actions/jetpack-settings.js index acf807a9..35b07ac5 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/actions/jetpack-settings.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/actions/jetpack-settings.js @@ -1,9 +1,17 @@ /** + * External dependencies + */ +/*eslint lodash/import-scope: [2, "method"]*/ +import pick from 'lodash/pick'; +import { select } from '@wordpress/data'; +import { __ } from '@wordpress/i18n'; + +/** * Internal dependencies */ import { - fetchJetpackSettings, - updateJetpackSettings as updateJetpackSettingsControl, + fetchWordAdsSettings, + updateWordAdsSettings as updateJetpackSettingsControl, } from '../controls'; import { removeUpdatingNotice, @@ -11,31 +19,31 @@ import { errorNotice, successNotice, } from 'components/global-notices/store/actions'; -import { __ } from '@wordpress/i18n'; +import { STORE_ID } from '../../store'; -export const SET_JETPACK_SETTINGS = 'SET_JETPACK_SETTINGS'; -export const TOGGLE_SEARCH_MODULE = 'TOGGLE_SEARCH_MODULE'; +export const SET_WORDADS_SETTINGS = 'SET_WORDADS_SETTINGS'; +export const TOGGLE_WORDADS_MODULE = 'TOGGLE_WORDADS_MODULE'; /** - * Yield actions to update Search Settings + * Yield actions to update WordAds Settings * * @param {object} settings - settings to apply. - * @param {object} oldSettings - Old settings. * @yields {object} - an action object. * @returns {object} - an action object. */ -export function* updateJetpackSettings( settings, oldSettings ) { +export function* updateJetpackSettings( settings ) { try { yield updatingNotice(); - yield setJetpackSettings( settings ); yield setUpdatingJetpackSettings(); + yield setJetpackSettings( settings ); yield updateJetpackSettingsControl( settings ); - const updatedSettings = yield fetchJetpackSettings(); + const updatedSettings = yield fetchWordAdsSettings(); yield setJetpackSettings( updatedSettings ); - return successNotice( __( 'Updated settings.', 'jetpack-search-pkg' ) ); + return successNotice( __( 'Updated settings.', 'jetpack-wordads' ) ); } catch ( e ) { + const oldSettings = pick( select( STORE_ID ).getWordAdsModuleStatus(), [ 'module_active' ] ); yield setJetpackSettings( oldSettings ); - return errorNotice( __( 'Error Update settings…', 'jetpack-search-pkg' ) ); + return errorNotice( __( 'Error Update settings…', 'jetpack-wordads' ) ); } finally { yield removeUpdatingNotice(); yield setUpdatingJetpackSettingsDone(); @@ -67,7 +75,7 @@ export function setUpdatingJetpackSettingsDone() { * @returns {object} - an action object. */ export function setJetpackSettings( options ) { - return { type: SET_JETPACK_SETTINGS, options }; + return { type: SET_WORDADS_SETTINGS, options }; } export default { updateJetpackSettings, setJetpackSettings }; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/actions/test/jetpack-settings.test.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/actions/test/jetpack-settings.test.js new file mode 100644 index 00000000..b0f3e302 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/actions/test/jetpack-settings.test.js @@ -0,0 +1,31 @@ +/** + * @jest-environment jsdom + */ +/** + * Internal dependencies + */ +import { updateJetpackSettings } from '../jetpack-settings'; + +describe( 'Jetpack Settings updateJetpackSettings action', () => { + const action = updateJetpackSettings( undefined, undefined ); + test( 'yield setJetpackSettings state to new one', () => { + // Create notice 'Updating'. + expect( action.next().value.type ).toEqual( 'CREATE_NOTICE' ); + // Set state updating flag. + expect( action.next().value.type ).toEqual( 'SET_WORDADS_SETTINGS' ); + // Set state to the target state. + expect( action.next().value.type ).toEqual( 'SET_WORDADS_SETTINGS' ); + // Post new settings to API. + expect( action.next().value.type ).toEqual( 'UPDATE_WORDADS_SETTINGS' ); + // Fetch settings from API. + expect( action.next().value.type ).toEqual( 'FETCH_WORDADS_SETTINGS' ); + // Set fetched setting from above step. + expect( action.next().value.type ).toEqual( 'SET_WORDADS_SETTINGS' ); + // Remove 'Updating' notice. + expect( action.next().value.type ).toEqual( 'REMOVE_NOTICE' ); + // Remove state updating flag. + expect( action.next().value.type ).toEqual( 'SET_WORDADS_SETTINGS' ); + // Create success notice. + expect( action.next().value.type ).toEqual( 'CREATE_NOTICE' ); + } ); +} ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/controls.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/controls.js new file mode 100644 index 00000000..a74f0a79 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/controls.js @@ -0,0 +1,40 @@ +/** + * Internal dependencies + */ +import restApi from '@automattic/jetpack-api'; + +export const FETCH_WORDADS_SETTINGS = 'FETCH_WORDADS_SETTINGS'; +export const UPDATE_WORDADS_SETTINGS = 'UPDATE_WORDADS_SETTINGS'; + +/** + * fetchJetpackSettings action + * + * @returns {object} - an action object. + */ +export const fetchWordAdsSettings = () => { + return { + type: FETCH_WORDADS_SETTINGS, + }; +}; + +/** + * updateJetpackSettings action + * + * @param {*} settings - Jetpack settings object. + * @returns {object} - an action object. + */ +export const updateWordAdsSettings = settings => { + return { + type: UPDATE_WORDADS_SETTINGS, + settings, + }; +}; + +export default { + [ FETCH_WORDADS_SETTINGS ]: function () { + return restApi.fetchWordAdsSettings(); + }, + [ UPDATE_WORDADS_SETTINGS ]: function ( action ) { + return restApi.updateWordAdsSettings( action.settings ); + }, +}; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/index.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/index.js index 56b96527..bc2f5bd8 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/index.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/index.js @@ -7,12 +7,12 @@ import selectors from './selectors'; import resolvers from './resolvers'; import controls from './controls'; -export const STORE_ID = 'jetpack-search-plugin'; +export const STORE_ID = 'jetpack-wordads-plugin'; export const storeConfig = { reducer, actions, selectors, resolvers, controls, - initialState: window.JETPACK_SEARCH_DASHBOARD_INITIAL_STATE || {}, + initialState: window.WORDADS_DASHBOARD_INITIAL_STATE || {}, }; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/feature.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/feature.js new file mode 100644 index 00000000..f48b1801 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/feature.js @@ -0,0 +1,5 @@ +const features = ( state = [] ) => { + return state; +}; + +export default features; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/reducer/index.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/index.js index cf734005..0c4f50a1 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/reducer/index.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/index.js @@ -9,14 +9,14 @@ import { combineReducers } from '@wordpress/data'; import siteData from './site-data'; import userData from './user-data'; import jetpackSettings from './jetpack-settings'; -import sitePlan from './site-plan'; +import features from './feature'; import notices from 'components/global-notices/store/reducer'; const reducer = combineReducers( { siteData, jetpackSettings, - sitePlan, userData, + features, notices, } ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/reducer/jetpack-settings.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/jetpack-settings.js index 1a1fc138..407d5e5b 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/reducer/jetpack-settings.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/jetpack-settings.js @@ -1,11 +1,11 @@ /** * Internal dependencies */ -import { SET_JETPACK_SETTINGS } from '../actions/jetpack-settings'; +import { SET_WORDADS_SETTINGS } from '../actions/jetpack-settings'; const jetpackSettings = ( state = {}, action ) => { switch ( action.type ) { - case SET_JETPACK_SETTINGS: + case SET_WORDADS_SETTINGS: return { ...state, ...action.options, diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/site-data.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/site-data.js new file mode 100644 index 00000000..8e1a578d --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/site-data.js @@ -0,0 +1,5 @@ +const siteData = ( state = {} ) => { + return state; +}; + +export default siteData; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/test/jetpack-settings.test.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/test/jetpack-settings.test.js new file mode 100644 index 00000000..61472997 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/test/jetpack-settings.test.js @@ -0,0 +1,66 @@ +/** + * @jest-environment jsdom + */ +/** + * Internal dependencies + */ +import { setJetpackSettings } from '../../actions/jetpack-settings'; +import reducer from '../jetpack-settings'; + +describe( 'Jetpack Settings Reducer', () => { + const initState = { + module_active: true, + instant_search_enabled: false, + is_updating: false, + }; + test( 'defaults to empty', () => { + const state = reducer( undefined, {} ); + expect( state ).toEqual( {} ); + } ); + test( 'init set jetpackSettings', () => { + const expected = { + module_active: true, + instant_search_enabled: false, + is_toggling_instant_search: false, + is_toggling_module: false, + }; + const newSettings = { + module_active: true, + instant_search_enabled: false, + }; + const state = reducer( undefined, setJetpackSettings( newSettings ) ); + expect( state ).toEqual( expected ); + } ); + test( 'toggle instant search', () => { + const newSettings = { + module_active: true, + instant_search_enabled: true, + is_updating: true, + }; + const expected = { + module_active: true, + instant_search_enabled: true, + is_toggling_instant_search: true, + is_toggling_module: false, + is_updating: true, + }; + const state = reducer( initState, setJetpackSettings( newSettings ) ); + expect( state ).toEqual( expected ); + } ); + test( 'toggle search', () => { + const newSettings = { + module_active: false, + instant_search_enabled: false, + is_updating: true, + }; + const expected = { + module_active: false, + instant_search_enabled: false, + is_toggling_instant_search: false, + is_toggling_module: true, + is_updating: true, + }; + const state = reducer( initState, setJetpackSettings( newSettings ) ); + expect( state ).toEqual( expected ); + } ); +} ); diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/reducer/user-data.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/user-data.js index 17af1898..17af1898 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/reducer/user-data.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/reducer/user-data.js diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/resolvers.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/resolvers.js new file mode 100644 index 00000000..ed7fefdd --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/resolvers.js @@ -0,0 +1,30 @@ +/** + * External dependencies + */ +import { __ } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +import { fetchWordAdsSettings } from './controls'; +import { setJetpackSettings } from './actions/jetpack-settings'; +import { errorNotice } from '../components/global-notices/store/actions'; + +/** + * Yield actions to get Search Module Status + * + * @yields {object} - an action object. + * @returns {object} - an action object. + */ +export function* getWordAdsModuleStatus() { + try { + const settings = yield fetchWordAdsSettings(); + if ( settings ) { + return setJetpackSettings( settings ); + } + } catch ( e ) { + return errorNotice( __( 'Error fetching settings…', 'jetpack-wordads' ) ); + } +} + +export default { getWordAdsModuleStatus }; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/selectors/feature.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/selectors/feature.js new file mode 100644 index 00000000..b9beed07 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/selectors/feature.js @@ -0,0 +1,7 @@ +const featureSelectors = { + isFeatureEnabled: ( state, feature ) => { + return Array.isArray( state.features ) && state.features.includes( feature ); + }, +}; + +export default featureSelectors; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/selectors/index.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/selectors/index.js index 8020ea19..6c0b30e1 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/selectors/index.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/selectors/index.js @@ -3,16 +3,16 @@ */ import siteDataSelectors from './site-data'; import jetpackSettingSelectors from './jetpack-settings'; -import sitePlanSelectors from './site-plan'; import userDataSelectors from './user-data'; import noticeSelectors from 'components/global-notices/store/selectors'; +import featureSelectors from './feature'; const selectors = { ...siteDataSelectors, ...jetpackSettingSelectors, - ...sitePlanSelectors, ...userDataSelectors, ...noticeSelectors, + ...featureSelectors, }; export default selectors; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/selectors/jetpack-settings.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/selectors/jetpack-settings.js index 6cd876c4..546a5c67 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/selectors/jetpack-settings.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/selectors/jetpack-settings.js @@ -1,5 +1,5 @@ const jetpackSettingSelectors = { - getSearchModuleStatus: state => state.jetpackSettings, + getWordAdsModuleStatus: state => state.jetpackSettings, isModuleEnabled: state => state.jetpackSettings.module_active, isInstantSearchEnabled: state => state.jetpackSettings.instant_search_enabled, isUpdatingJetpackSettings: state => state.jetpackSettings.is_updating, diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/selectors/site-data.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/selectors/site-data.js index 5669e52d..6bd46a8a 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/selectors/site-data.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/selectors/site-data.js @@ -3,7 +3,6 @@ const siteDataSelectors = { getAPINonce: state => state.siteData?.WP_API_nonce ?? null, getRegistrationNonce: state => state.siteData?.registrationNonce ?? null, getSiteAdminUrl: state => state.siteData?.adminUrl ?? null, - isInstantSearchPromotionActive: state => state.siteData?.showPromotions ?? true, getBlogId: state => state.siteData?.blogId ?? 0, getVersion: state => state.siteData?.version ?? 'development', getCalypsoSlug: state => state.siteData?.calypsoSlug, diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/selectors/user-data.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/selectors/user-data.js index 6e5ac9d3..6e5ac9d3 100644 --- a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/dashboard/store/selectors/user-data.js +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/dashboard/store/selectors/user-data.js diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/initializers/class-initializer.php b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/initializers/class-initializer.php new file mode 100644 index 00000000..b08ee6c2 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/src/initializers/class-initializer.php @@ -0,0 +1,123 @@ +<?php +/** + * Initializer base class. + * + * @package @automattic/jetpack-wordads + */ + +namespace Automattic\Jetpack\WordAds; + +use Automattic\Jetpack\Connection\Manager as Connection_Manager; +use Automattic\Jetpack\Modules; +use WP_Error; +/** + * Base class for the initializer pattern. + */ +class Initializer { + + /** + * Initialize the WordAds package. + */ + public static function init() { + // Set up package version hook. + add_filter( 'jetpack_package_versions', __NAMESPACE__ . '\Package::send_version_to_tracker' ); + + /** + * The filter allows abortion of the WordAds package initialization. + * + * @since 0.1.0 + * + * @param boolean $init_wordads_package Default value is true. + */ + if ( ! apply_filters( 'jetpack_wordads_init_wordads_package', true ) ) { + /** + * Fires when the WordAds fails and would fallback to MySQL. + * + * @since Jetpack 7.9.0 + * @param string $reason Reason for WordAds fallback. + * @param mixed $data Data associated with the request, such as attempted search parameters. + */ + do_action( 'jetpack_wordads_abort', 'jetpack_wordads_init_wordads_package_filter', null ); + return; + } + + static::init_before_connection(); + + // Check whether WordAds should be initialized in the first place . + if ( ! static::is_connected() || ! static::is_wordads_supported() ) { + /** This filter is documented in search/src/initalizers/class-initalizer.php */ + do_action( 'jetpack_wordads_abort', 'inactive', null ); + return; + } + + $blog_id = Helper::get_wpcom_site_id(); + if ( ! $blog_id ) { + /** This filter is documented in search/src/initalizers/class-initalizer.php */ + do_action( 'jetpack_wordads_abort', 'no_blog_id', null ); + return; + } + + if ( ! ( new Modules() )->is_active( Package::SLUG ) ) { + /** This filter is documented in search/src/initalizers/class-initalizer.php */ + do_action( 'jetpack_wordads_abort', 'module_inactive', null ); + return; + } + + /** + * Fires when the WordAds package has been initialized. + * + * @since 0.1.0 + */ + do_action( 'jetpack_wordads_loaded' ); + } + + /** + * Init functionality required for connection. + */ + protected static function init_before_connection() { + // Set up WordAds API endpoints. + add_action( 'rest_api_init', array( new REST_Controller(), 'register_rest_routes' ) ); + // The dashboard has to be initialized before connection. + ( new Dashboard() )->init_hooks(); + } + + /** + * Register jetpack-wordads CLI if `\CLI` exists. + * + * @return void + */ + protected static function init_cli() { + if ( defined( 'WP_CLI' ) && \WP_CLI ) { + \WP_CLI::add_command( 'wordads', __NAMESPACE__ . '\CLI' ); + } + } + + /** + * Check if site has been connected. + */ + protected static function is_connected() { + return ( new Connection_Manager( Package::SLUG ) )->is_connected(); + } + + /** + * Check if wordads is supported by current plan. + * TODO. + */ + protected static function is_wordads_supported() { + return true; + } + + /** + * Perform necessary initialization steps + * + * @deprecated + */ + public static function initialize() { + return new WP_Error( + 'invalid-method', + /* translators: %s: Method name. */ + sprintf( __( "Method '%s' not implemented. Must be overridden in subclass.", 'jetpack-wordads' ), __METHOD__ ), + array( 'status' => 405 ) + ); + } +} diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/tools/babel.config.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/tools/babel.config.js new file mode 100644 index 00000000..e0e45aa7 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/tools/babel.config.js @@ -0,0 +1,19 @@ +module.exports = api => { + api.cache( true ); + return { + presets: [ + [ + '@automattic/jetpack-webpack-config/babel/preset', + { + presetEnv: { + corejs: require( 'core-js/package.json' ).version, + modules: false, + useBuiltIns: 'usage', + }, + pluginReplaceTextdomain: { textdomain: 'jetpack-wordads' }, + }, + ], + ], + plugins: [ '@babel/plugin-proposal-nullish-coalescing-operator' ], + }; +}; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/tools/define-palette-colors-as-static-variables.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/tools/define-palette-colors-as-static-variables.js new file mode 100644 index 00000000..b83a4921 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/tools/define-palette-colors-as-static-variables.js @@ -0,0 +1,31 @@ +/** + * External dependencies + */ +const webpack = require( 'webpack' ); + +// TODO: Migrate this to a common package in the monorepo to avoid code duplication. + +/** + * Returns an instance of the DefinePlugin that adds color-studio colors as literals. + * + * @returns {object} DefinePlugin instance. + */ +function definePaletteColorsAsStaticVariables() { + return new webpack.DefinePlugin( { + // Replace palette colors as individual literals in the bundle. + PALETTE: ( () => { + const colors = require( '@automattic/color-studio' ).colors; + const stringifiedColors = {}; + + // DefinePlugin replaces the values as unescaped text. + // We therefore need to double-quote each value, to ensure it ends up as a string. + for ( const color in colors ) { + stringifiedColors[ color ] = `"${ colors[ color ] }"`; + } + + return stringifiedColors; + } )(), + } ); +} + +module.exports = definePaletteColorsAsStaticVariables; diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/tools/webpack.dashboard.config.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/tools/webpack.dashboard.config.js new file mode 100644 index 00000000..2c67a890 --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-wordads/tools/webpack.dashboard.config.js @@ -0,0 +1,72 @@ +/** + * External dependencies + */ +const jetpackWebpackConfig = require( '@automattic/jetpack-webpack-config/webpack' ); +const path = require( 'path' ); + +module.exports = { + mode: jetpackWebpackConfig.mode, + devtool: jetpackWebpackConfig.isDevelopment ? 'source-map' : false, + entry: { + 'jp-wordads-dashboard': path.join( __dirname, '../src/dashboard/index.jsx' ), + }, + output: { + ...jetpackWebpackConfig.output, + path: path.join( __dirname, '../build/dashboard' ), + }, + optimization: { + ...jetpackWebpackConfig.optimization, + splitChunks: { + cacheGroups: { + vendors: false, + }, + }, + }, + resolve: { + ...jetpackWebpackConfig.resolve, + alias: { + ...jetpackWebpackConfig.resolve.alias, + fs: false, + }, + modules: [ + path.resolve( __dirname, '../src/dashboard' ), + 'node_modules', + path.resolve( __dirname, '../node_modules' ), // for core-js + ], + }, + plugins: [ + ...jetpackWebpackConfig.StandardPlugins( { + DependencyExtractionPlugin: { + injectPolyfill: true, + }, + } ), + ], + externals: { + jetpackConfig: JSON.stringify( { + consumer_slug: 'jetpack-wordads-package', + } ), + }, + module: { + strictExportPresence: true, + rules: [ + // Transpile JavaScript + jetpackWebpackConfig.TranspileRule( { + exclude: /node_modules\//, + } ), + + // Transpile @automattic/jetpack-* in node_modules too. + jetpackWebpackConfig.TranspileRule( { + includeNodeModules: [ '@automattic/jetpack-' ], + } ), + + // Handle CSS. + jetpackWebpackConfig.CssRule( { + extensions: [ 'css', 'sass', 'scss' ], + extraLoaders: [ 'sass-loader' ], + } ), + + // Handle images. + jetpackWebpackConfig.FileRule(), + ], + }, +}; diff --git a/plugins/jetpack/jetpack_vendor/i18n-map.php b/plugins/jetpack/jetpack_vendor/i18n-map.php index 2a8139b6..a485e35e 100644 --- a/plugins/jetpack/jetpack_vendor/i18n-map.php +++ b/plugins/jetpack/jetpack_vendor/i18n-map.php @@ -4,20 +4,85 @@ return array( 'domain' => 'jetpack', 'type' => 'plugins', 'packages' => array( - 'jetpack-assets' => '0.0.0', - 'jetpack-tracking' => '0.0.0', - 'jetpack-heartbeat' => '0.0.0', - 'jetpack-password-checker' => '0.0.0', - 'jetpack-idc' => '0.0.0', - 'jetpack-sync' => '0.0.0', - 'jetpack-backup-pkg' => '0.0.0', - 'jetpack-connection' => '0.0.0', - 'jetpack-config' => '0.0.0', - 'jetpack-connection-ui' => '0.0.0', - 'jetpack-jitm' => '0.0.0', - 'jetpack-lazy-images' => '0.0.0', - 'jetpack-licensing' => '0.0.0', - 'jetpack-my-jetpack' => '0.0.0', - 'jetpack-search-pkg' => '0.0.0', + 'jetpack-admin-ui' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-admin-ui', + 'ver' => '0.2.7', + ), + 'jetpack-connection' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-connection', + 'ver' => '1.40.4', + ), + 'jetpack-password-checker' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-password-checker', + 'ver' => '0.2.4', + ), + 'jetpack-assets' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-assets', + 'ver' => '1.17.14', + ), + 'jetpack-idc' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-identity-crisis', + 'ver' => '0.8.12', + ), + 'jetpack-sync' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-sync', + 'ver' => '1.35.0', + ), + 'jetpack-plugins-installer' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-plugins-installer', + 'ver' => '0.1.2', + ), + 'jetpack-licensing' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-licensing', + 'ver' => '1.7.2', + ), + 'jetpack-my-jetpack' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-my-jetpack', + 'ver' => '1.6.0', + ), + 'jetpack-connection-ui' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-connection-ui', + 'ver' => '2.4.5', + ), + 'jetpack-config' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-config', + 'ver' => '1.9.0', + ), + 'jetpack-backup-pkg' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-backup', + 'ver' => '1.3.7', + ), + 'jetpack-compat' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-compat', + 'ver' => '1.7.2', + ), + 'jetpack-google-fonts-provider' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-google-fonts-provider', + 'ver' => '0.3.0', + ), + 'jetpack-jitm' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-jitm', + 'ver' => '2.2.17', + ), + 'jetpack-lazy-images' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-lazy-images', + 'ver' => '2.1.15', + ), + 'jetpack-publicize-pkg' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-publicize', + 'ver' => '0.5.0', + ), + 'jetpack-search-pkg' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-search', + 'ver' => '0.14.2', + ), + 'jetpack-waf' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-waf', + 'ver' => '0.6.2', + ), + 'jetpack-wordads' => array( + 'path' => 'jetpack_vendor/automattic/jetpack-wordads', + 'ver' => '0.2.4', + ), ), ); |