',
+ \esc_html__( 'You seem to use the System Task Scheduler to process WP_Cron tasks.', 'activitypub' )
+ ),
+ 'actions' => '',
+ 'test' => 'test_system_cron',
+ );
+
+ if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
+ return $result;
+ }
+
+ $result['status'] = 'recommended';
+ $result['label'] = \__( 'System Task Scheduler not configured', 'activitypub' );
+ $result['badge']['color'] = 'orange';
+ $result['description'] = \sprintf(
+ '
%s
',
+ \__( 'Enhance your WordPress site’s performance and mitigate potential heavy loads caused by plugins like ActivityPub by setting up a system cron job to run WP Cron. This ensures scheduled tasks are executed consistently and reduces the reliance on website traffic for trigger events.', 'activitypub' )
+ );
+ $result['actions'] .= sprintf(
+ '
' . \wp_kses( __( 'The post\'s content. With apply_filters you can decide if filters (apply_filters( \'the_content\', $content )) should be applied or not (default is yes). The values can be yes or no. apply_filters attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '
' .
+ '
[ap_excerpt length="400"]
' .
+ '
' . \wp_kses( __( 'The post\'s excerpt (uses the_excerpt if that is set). If no excerpt is provided, will truncate at length (optional, default = 400).', 'activitypub' ), array( 'code' => array() ) ) . '
' .
+ '
[ap_permalink type="url"]
' .
+ '
' . \wp_kses( __( 'The post\'s permalink. type can be either: url or html (an <a /> tag). type attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '
' .
+ '
[ap_shortlink type="url"]
' .
+ '
' . \wp_kses( __( 'The post\'s shortlink. type can be either url or html (an <a /> tag). I can recommend Hum, to prettify the Shortlinks. type attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '
' .
+ '
[ap_hashtags]
' .
+ '
' . \wp_kses( __( 'The post\'s tags as hashtags.', 'activitypub' ), array( 'code' => array() ) ) . '
' .
+ '
[ap_hashcats]
' .
+ '
' . \wp_kses( __( 'The post\'s categories as hashtags.', 'activitypub' ), array( 'code' => array() ) ) . '
' .
+ '
[ap_image type=full]
' .
+ '
' . \wp_kses( __( 'The URL for the post\'s featured image, defaults to full size. The type attribute can be any of the following: thumbnail, medium, large, full. type attribute is optional.', 'activitypub' ), array( 'code' => array() ) ) . '
' . \wp_kses( __( 'The URL to the site.', 'activitypub' ), array( 'code' => array() ) ) . '
' .
+ '
[ap_blogname]
' .
+ '
' . \wp_kses( __( 'The name of the site.', 'activitypub' ), array( 'code' => array() ) ) . '
' .
+ '
[ap_blogdesc]
' .
+ '
' . \wp_kses( __( 'The description of the site.', 'activitypub' ), array( 'code' => array() ) ) . '
' .
+ '
' .
+ '
' . __( 'You may also use any Shortcode normally available to you on your site, however be aware that Shortcodes may significantly increase the size of your content depending on what they do.', 'activitypub' ) . '
' .
+ '
' . __( 'Note: the old Template Tags are now deprecated and automatically converted to the new ones.', 'activitypub' ) . '
' .
+ '
' . \wp_kses( \__( 'Let me know if you miss a Template Tag.', 'activitypub' ), 'activitypub' ) . '
' . \__( 'The Fediverse is a new word made of two words: "federation" + "universe"', 'activitypub' ) . '
' .
+ '
' . \__( 'It is a federated social network running on free open software on a myriad of computers across the globe. Many independent servers are interconnected and allow people to interact with one another. There\'s no one central site: you choose a server to register. This ensures some decentralization and sovereignty of data. Fediverse (also called Fedi) has no built-in advertisements, no tricky algorithms, no one big corporation dictating the rules. Instead we have small cozy communities of like-minded people. Welcome!', 'activitypub' ) . '
' . \__( 'ActivityPub is a decentralized social networking protocol based on the ActivityStreams 2.0 data format. ActivityPub is an official W3C recommended standard published by the W3C Social Web Working Group. It provides a client to server API for creating, updating and deleting content, as well as a federated server to server API for delivering notifications and subscribing to content.', 'activitypub' ) . '
' .
+ '
' . \__( 'WebFinger', 'activitypub' ) . '
' .
+ '
' . \__( 'WebFinger is used to discover information about people or other entities on the Internet that are identified by a URI using standard Hypertext Transfer Protocol (HTTP) methods over a secure transport. A WebFinger resource returns a JavaScript Object Notation (JSON) object describing the entity that is queried. The JSON object is referred to as the JSON Resource Descriptor (JRD).', 'activitypub' ) . '
' .
+ '
' . \__( 'For a person, the type of information that might be discoverable via WebFinger includes a personal profile address, identity service, telephone number, or preferred avatar. For other entities on the Internet, a WebFinger resource might return JRDs containing link relations that enable a client to discover, for example, that a printer can print in color on A4 paper, the physical location of a server, or other static information.', 'activitypub' ) . '
' .
+ '
' . \__( 'On Mastodon [and other Plattforms], user profiles can be hosted either locally on the same website as yours, or remotely on a completely different website. The same username may be used on a different domain. Therefore, a Mastodon user\'s full mention consists of both the username and the domain, in the form @username@domain. In practical terms, @user@example.com is not the same as @user@example.org. If the domain is not included, Mastodon will try to find a local user named @username. However, in order to deliver to someone over ActivityPub, the @username@domain mention is not enough – mentions must be translated to an HTTPS URI first, so that the remote actor\'s inbox and outbox can be found. (This paragraph is copied from the Mastodon Documentation)', 'activitypub' ) . '
' . \__( 'NodeInfo is an effort to create a standardized way of exposing metadata about a server running one of the distributed social networks. The two key goals are being able to get better insights into the user base of distributed social networking and the ability to build tools that allow users to choose the best fitting software and server for their needs.', 'activitypub' ) . '
ActivityPub, broadcasting your blog to a wider audience. Attract followers, deliver updates, and receive comments from a diverse user base on Mastodon, Friendica, Pleroma, Pixelfed, and all ActivityPub-compliant platforms.', 'activitypub' ), array( 'strong' => array() ) ); ?>
+ Site Health page to ensure that your site is compatible and/or use the "Help" tab (in the top right of the settings pages).',
+ 'activitypub'
+ ),
+ \esc_url_raw( admin_url( 'site-health.php' ) )
+ ),
+ 'default'
+ );
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/.phive/phars.xml b/wp-content/upgrade-temp-backup/plugins/authldap/.phive/phars.xml
new file mode 100644
index 00000000..2825dbbc
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/authldap/.phive/phars.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/LICENSE.md b/wp-content/upgrade-temp-backup/plugins/authldap/LICENSE.md
new file mode 100644
index 00000000..00217dc5
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/authldap/LICENSE.md
@@ -0,0 +1,7 @@
+Copyright
+
+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.
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/README.md b/wp-content/upgrade-temp-backup/plugins/authldap/README.md
new file mode 100644
index 00000000..db54d089
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/authldap/README.md
@@ -0,0 +1,95 @@
+# authLDAP
+
+[![Join the chat at https://gitter.im/heiglandreas/authLdap](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/heiglandreas/authLdap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+Use your existing LDAP as authentication-backend for your wordpress!
+
+[![Build Status](https://github.com/heiglandreas/authLdap/actions/workflows/tests.yml/badge.svg)](https://github.com/heiglandreas/authLdap/actions/workflows/tests.yml)
+[![WordPress Stats](https://img.shields.io/wordpress/plugin/dt/authldap.svg)](https://wordpress.org/plugins/authldap/stats/)
+[![WordPress Version](https://img.shields.io/wordpress/plugin/v/authldap.svg)](https://wordpress.org/plugins/authldap/)
+[![WordPress testet](https://img.shields.io/wordpress/v/authldap.svg)](https://wordpress.org/plugins/authldap/)
+[![Code Climate](https://codeclimate.com/github/heiglandreas/authLdap/badges/gpa.svg)](https://codeclimate.com/github/heiglandreas/authLdap)
+[![codecov](https://codecov.io/gh/heiglandreas/authLdap/branch/master/graph/badge.svg?token=AYAhEeWtRQ)](https://codecov.io/gh/heiglandreas/authLdap)
+
+So what are the differences to other Wordpress-LDAP-Authentication-Plugins?
+
+* **Flexible**: You are totaly free in which LDAP-backend to use. Due to the extensive configuration you can
+freely decide how to do the authentication of your users. It simply depends on your
+filters
+* **Independent**: As soon as a user logs in, it is added/updated to the Wordpress' user-database
+to allow wordpress to always use the correct data. You only have to administer your users once.
+* **Failsafe**: Due to the users being created in Wordpress' User-database they can
+also log in when the LDAP-backend currently is gone.
+* **Role-Aware**: You can map Wordpress' roles to values of an existing LDAP-attribute.
+
+## How does the plugin work?
+
+Well, as a matter of fact it is rather simple. The plugin verifies, that the user
+seeking authentification can bind to the LDAP using the provided password.
+
+If that is so, the user is either created or updated in the wordpress-user-database.
+This update includes the provided password (so the wordpress can authenticate users
+even without the LDAP), the users name according to the authLDAP-preferences and
+the status of the user depending on the groups-settings of the authLDAP-preferences
+
+Writing this plugin would not have been as easy as it has been, without the
+wonderfull plugin of Alistair Young from http://www.weblogs.uhi.ac.uk/sm00ay/?p=45
+
+## Configuration
+
+### Usage Settings
+
+* **Enable Authentication via LDAP** Whether you want to enable authLdap for login or not
+* **debug authLdap** When you have problems with authentication via LDAP you can enable a debugging mode here.
+* **Save entered Password** Decide whether passwords will be cached in your wordpress-installation. **Attention:** Without the cache your users will not be able to log into your site when your LDAP is down!
+
+### Server Settings
+
+* **LDAP Uri** This is the URI where your ldap-backend can be reached. More information are actually on the Configuration page
+* **Filter** This is the real McCoy! The filter you define here specifies how a user will be found. Before applying the filter a %s will be replaced with the given username. This means, when a user logs in using ‘foobar’ as username the following happens:
+
+ * **uid=%1$s** check for any LDAP-Entry that has an attribute ‘uid’ with value ‘foobar’
+ * **(&(objectclass=posixAccount)(|(uid=%1$s)(mail=%1$s)))** check for any LDAP-Entry that has an attribute ‘objectclass’ with value ‘posixAccout’ and either a UID- or a mail-attribute with value ‘foobar’
+
+ This filter is rather powerfull if used wisely.
+
+### Creating Users
+
+* **Name-Attribute** Which Attribute from the LDAP contains the Full or the First name of the user trying to log in. This defaults to name
+* **Second Name Attribute** If the above Name-Attribute only contains the First Name of the user you can here specify an Attribute that contains the second name. This field is empty by default
+* **User-ID Attribute** This field will be used as login-name for wordpress. Please give the Attribute, that is used to identify the user. This should be the same as you used in the above Filter-Option. This field defaults to uid
+* **Mail Attribute** Which Attribute holds the eMail-Address of the user? If more than one eMail-Address are stored in the LDAP, only the first given is used. This field defaults to mail
+* **Web-Attribute** If your users have a personal page (URI) stored in the LDAP, it can be provided here. This field is empty by default
+
+### User-Groups for Roles
+
+* **Group-Attribute** This is the attribute that defines the Group-ID that can be matched against the Groups defined further down This field defaults to gidNumber.
+* **Group-Filter** Here you can add the filter for selecting groups for the currentlly logged in user The Filter should contain the string %s which will be replaced by the login-name of the currently logged in
+
+
+## FAQ
+
+
+
Can I change a users password with this plugin?
+
Short Answer: No! Long Answer: As the users credentials are not
+ only used for a wordpress-site when you authenticate against an LDAP but for
+ many other services also chances are great that there is a centralized place
+ where password-changes shall be made. We'll later allow inclusion of a link
+ to such a place but currently it's not available. And as password-hashing and
+ where to store it requires deeper insight into the LDAP-Server then most users
+ have and admins are willing to give, password changes are out of scope of this
+ plugin. If you know exactyl what you do, you might want to have a look at
+
+ issue 54
+ wherer a way of adding it is described!
+
+
Can I add a user to the LDAP when she creates a user-account on wordpress?
+
Short Answer: No! Long Answer: Even though that is technically possible
+ it's not in the scope of this plugin. As creating a user in an LDAP often involves
+ an administrative process that has already been implemented in your departments
+ administration it doesn't make sense to rebuild that - in most cases highly
+ individual - process in this plugin. If you know exactly what you do, have a look at
+ issue 65
+ where wtfiwtz shows how to implement that feature.
+
Caveat: The LDAP-extension is not loaded!
+ Without that extension it is not possible to query an LDAP-Server! Please have a look
+ at the PHP-Installation page
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pulvinar ligula augue, quis bibendum tellus scelerisque venenatis. Pellentesque porta nisi mi. In hac habitasse platea dictumst. Etiam risus elit, molestie non volutpat ac, pellentesque sed eros. Nunc leo odio, sodales non tortor at, porttitor posuere dui.
+ array(),
+ 'options' => array(),
+ );
+
+ foreach ( $theme_mods as $theme_mod ) {
+ if ( 'generate_copyright' === $theme_mod ) {
+ if ( in_array( 'copyright', $_POST['module_group'] ) ) {
+ remove_theme_mod( $theme_mod );
+ }
+ } else {
+ if ( in_array( 'generate_settings', $_POST['module_group'] ) ) {
+ remove_theme_mod( $theme_mod );
+ }
+ }
+ }
+
+ foreach ( $settings as $setting ) {
+ if ( in_array( $setting, $_POST['module_group'] ) ) {
+ delete_option( $setting );
+ }
+ }
+
+ // Delete our dynamic CSS option.
+ delete_option( 'generate_dynamic_css_output' );
+ delete_option( 'generate_dynamic_css_cached_version' );
+
+ // Reset our dynamic CSS file updated time so it regenerates.
+ $dynamic_css_data = get_option( 'generatepress_dynamic_css_data', array() );
+
+ if ( isset( $dynamic_css_data['updated_time'] ) ) {
+ unset( $dynamic_css_data['updated_time'] );
+ }
+
+ update_option( 'generatepress_dynamic_css_data', $dynamic_css_data );
+
+ // Delete any GeneratePress Site CSS in Additional CSS.
+ $additional_css = wp_get_custom_css_post();
+
+ if ( ! empty( $additional_css ) ) {
+ $additional_css->post_content = preg_replace( '#(/\\* GeneratePress Site CSS \\*/).*?(/\\* End GeneratePress Site CSS \\*/)#s', '', $additional_css->post_content );
+ wp_update_custom_css_post( $additional_css->post_content );
+ }
+
+ wp_safe_redirect( admin_url( 'themes.php?page=generate-options&status=reset' ) );
+ exit;
+}
+
+add_action( 'admin_head', 'generate_reset_options_css', 100 );
+/**
+ * Add CSS to the dashboard.
+ */
+function generate_reset_options_css() {
+ $screen = get_current_screen();
+
+ if ( ! is_object( $screen ) ) {
+ return;
+ }
+
+ if ( 'appearance_page_generate-options' !== $screen->base ) {
+ return;
+ }
+ ?>
+
+ base ) {
+ return;
+ }
+ ?>
+
+ 1;"},"Post author name":["Nom de l'auteur de la publication"],"Post date":["Date de la publication"],"Title":["Titre"],"Dynamic text type":["Type de texte dynamique"],"Published date before text":["Texte avant la date de publication"],"Term archives":["Archives des termes"],"Author meta":["M\u00e9tadonn\u00e9es des auteurs"],"Previous page of posts":["Pr\u00e9c\u00e9dente page des publications"],"Next page of posts":["Prochaine page des publications"],"Comments area":["Zone des commentaires"],"Author archives":["Archives des auteurs"],"Single post":["Publication unique"],"Taxonomy":["Taxonomie"],"In same term":["Dans le m\u00eame terme"],"No previous post":["Pas de publication pr\u00e9c\u00e9dente"],"This will remove the current sidebar widgets for the selected sidebar. Your layout must have a sidebar set for this Element to show.":["Cela supprimera les widgets en cours pour la colonne lat\u00e9rale s\u00e9lectionn\u00e9e. Votre mise en page doit avoir des colonnes lat\u00e9rales d\u00e9finies pour que cet \u00e9l\u00e9ment soit visible."],"Site Footer":["Pied de page du site"],"None":["Aucun"],"Type":["Type"],"Right Sidebar":["Colonne lat\u00e9rale de droite"],"Left Sidebar":["Colonne lat\u00e9rale gauche"],"Priority":["Priorit\u00e9"],"Custom Hook":["Hook personnalis\u00e9"],"Custom":["Personnaliser"],"Site Header":["Ent\u00eate du site"],"Page Hero":["Banni\u00e8re"],"Hook":["Hook"],"Right":["Droite"],"Left":["Gauche"],"Center":["Centre"],"Location":["Emplacement"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR-53e2a1d5945b8d2b1c35e81ae1e532f3.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR-53e2a1d5945b8d2b1c35e81ae1e532f3.json
new file mode 100644
index 00000000..a7b5560a
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR-53e2a1d5945b8d2b1c35e81ae1e532f3.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2021-03-10 11:23:17+0000","generator":"WP-CLI\/2.6.0","source":"dist\/editor.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr","plural-forms":"nplurals=2; plural=n > 1;"},"All Elements":["Tous les \u00e9l\u00e9ments"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR-92fa58377f1b6f7bef9c785c31ae29ff.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR-92fa58377f1b6f7bef9c785c31ae29ff.json
new file mode 100644
index 00000000..0c595687
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR-92fa58377f1b6f7bef9c785c31ae29ff.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2021-03-10 11:23:17+0000","generator":"WP-CLI\/2.6.0","source":"dist\/site-library.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr","plural-forms":"nplurals=2; plural=n > 1;"},"Why?":["Pourquoi?"],"This process restores your previous options, widgets and active plugins. It will also remove your imported content and CSS.":["Cette op\u00e9ration restaure vos r\u00e9glages pr\u00e9c\u00e9dents: options, widgets et extensions actives. Cela va aussi supprimer le contenu import\u00e9 est les CSS. "],"It is highly recommended that you remove the last site you imported before importing a new one.":["Il est vraiment recommand\u00e9 de supprimer le dernier site que vous avez import\u00e9 avant d'en importer un nouveau. "],"Existing Site Import Detected":["L'importation de ce site existe d\u00e9j\u00e0"],"Restoring theme options":["Restaurer les options du th\u00e8me"],"New URL":["Nouvelle URL"],"Old URL":["Ancienne URL"],"This site is using Elementor which means you will want to replace the imported image URLs.":["Ce site utilise Elementor ce qui veut dire que vous devrez remplacer les URLs des images import\u00e9es"],"Additional Cleanup":["Nettoyage suppl\u00e9mentaire"],"This site uses the following plugins.":["Ce site utilise les plugins suivants"],"Installing plugins":["Installation de plugins..."],"Activating plugins":["Activer les plugins"],"Importing widgets":["Importation des widgets"],"Importing site options":["Importation des options du site"],"Importing content":["Importation du contenu"],"None":["Aucun"],"Import":["Importer"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR.mo
new file mode 100644
index 00000000..09ab19f4
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-hr.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-hr.mo
new file mode 100644
index 00000000..aa6b8ca5
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-hr.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-hu_HU.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-hu_HU.mo
new file mode 100644
index 00000000..e0aa58e4
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-hu_HU.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-it_IT.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-it_IT.mo
new file mode 100644
index 00000000..f92a2b4a
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-it_IT.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nb_NO.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nb_NO.mo
new file mode 100644
index 00000000..792e21a2
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nb_NO.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-42da344ccb044413769d16ed3484307b.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-42da344ccb044413769d16ed3484307b.json
new file mode 100644
index 00000000..724ddb44
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-42da344ccb044413769d16ed3484307b.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2022-03-18 15:02:47+0000","generator":"WP-CLI\/2.6.0","source":"dist\/block-elements.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl","plural-forms":"nplurals=2; plural=n != 1;"},"Loop Template":[""],"The taxonomy to check if in the same term.":["De taxonomie om te controleren of het om dezelfde term gaat."],"Check for posts with the same term as the current post.":["Zoek naar berichten met dezelfde term als het huidige bericht."],"Remove container condition":["Verwijder container conditie"],"Display Order":["Weergavevolgorde"],"Parent Element":["Bovenliggend element"],"First post":["Eerste bericht"],"No post meta":["Geen bericht-meta"],"No featured image":["Geen uitgelichte afbeelding"],"Keep default archive navigation container":["Behoud standaard archief navigatie container"],"Disable default pagination":["Standaard paginering uitschakelen"],"Add default archive navigation container":["Voeg standaard archief navigatie container toe"],"Disable default post navigation":["Standaard berichtnavigatie uitschakelen"],"Use the above template tag to add the current year to your footer.":["Gebruik bovenstaande template tag om het huidige jaartal aan je footer toe te voegen."],"Current year template tag":["Huidig jaartal template tag"],"Disable primary post meta":["Uitzetten primaire bericht-meta"],"Disable featured image":["Uitzetten uitgelichte afbeelding"],"Disable title":["Uitzetten titel"],"Keep default post container":["Behoud standaard berichtcontainer"],"Post meta name":["Berichtmeta-naam"],"Term name":["Termnaam"],"Posts with custom field":["Berichten met aangepast veld"],"Posts with term":["Berichten met term"],"All posts":["Alle berichten"],"Apply to":["Toepassen op"],"Tag name":["Tag-naam"],"Replace default secondary post meta":["Vervang standaard secundaire bericht-meta"],"Replace default primary post meta":["Vervang standaard primaire bericht-meta"],"Custom hook name":["Aangepaste hook naam"],"Choose your hook":["Kies je hook"],"Hook name":["Hook naam"],"Quick hook select":["Snelle hook selectie"],"Before post title":["Voor berichttitel"],"After post title":["Na bericht titel"],"This Element will replace your site footer area that holds your copyright message. It will not replace footer widgets if they exist.":["Dit element vervangt het footer gebied van je site waar het copyright bericht staat. Het vervangt niet je footer widgets als deze bestaan."],"Templates":["Templates"],"Element type":["Element type"],"Editor width":["Breedte editor"],"Install GenerateBlocks":["Installeer GenerateBlocks"],"Activate GenerateBlocks":["Activeer GenerateBlocks"],"To take full advantage of Block Elements, we suggest using our GenerateBlocks plugin.":["Om volledig gebruikt te kunnen maken Block Elements, raden we het gebruik van onze GenerateBlocks plug-in aan."],"Block Element":["Block Element"],"After content container":["Na inhoud-container"],"After content":["Na inhoud"],"Before content":["Voor inhoud"],"Before content container":["Voor inhoud-container"],"After header":["Na header"],"label\u0004Single post hero with excerpt":["Enkel bericht-hero met uittreksel"],"label\u0004Basic single post page hero":["Eenvoudige enkel bericht-hero "],"label\u0004Rounded buttons with icon":["Afgeronde knoppen met icoon"],"label\u0004Default next and previous buttons":["Standaard volgende en vorige knoppen"],"label\u0004Landscape layout":["Liggende layout"],"label\u0004Layout with offset content":["Layout met offset inhoud"],"label\u0004Basic layout with term buttons":["Eenvoudige layout met term-knoppen"],"label\u0004Full footer 2":["Volledige footer 2"],"label\u0004Full footer 1":["Volledige footer 1"],"label\u0004Term buttons":["Term-knoppen"],"label\u0004Stacked with avatar":["Gestapeld met avatar"],"label\u0004Inline with avatar":["Inline met avatar"],"label\u0004Two columns with background overlays":["Twee kolommen met achtergrond bedekking"],"label\u0004Two columns with arrows":["Twee kolommen met pijlen"],"label\u0004Two columns with featured image":["Twee kolommen met uitgelichte afbeelding"],"%s Units":["%s eenheden"],"A size unit for CSS markup\u0004Degree":["Graden"],"A size unit for CSS markup\u0004Percentage":["Percentage"],"A size unit for CSS markup\u0004Em":["Em"],"A size unit for CSS markup\u0004Pixel":["Pixel"],"Select Units":["Selecteer eenheden"],"Displays a dynamic image from your chosen source.":["Geef een dynamische afbeelding weer van je gekozen bron"],"Dynamic Image":["Dynamische afbeelding"],"Dynamic image placeholder":["Dynamische afbeelding placeholder"],"Choose your dynamic image type.":["Kies type dynamische afbeelding"],"Dynamic image":["Dynamische afbeelding"],"Make image rounded":["Maak afbeelding afgerond"],"Custom field name":["Aangepast veld-naam"],"Custom field":["Aangepast veld"],"Link to":["Link naar"],"Image height":["Afbeeldingshoogte"],"Image width":["Afbeeldingsbreedte"],"Image size":["Afbeeldingsgrootte"],"Author avatar":["Auteur avatar"],"Displays dynamic content based on your chosen source.":["Toont dynamische inhoud gebaseerd op je gekozen bron."],"Dynamic Content":["Dynamische inhoud"],"This is a placeholder for your description.":["Dit is een plaatshouder voor je beschrijving."],"Choose your dynamic content type.":["Selecteer je dynamische inhoudstype"],"Dynamic content":["Dynamische inhoud"],"Custom more link":["Aangepaste meer link"],"Use theme more link":["Gebruik thema meer link"],"Excerpt length":["Lengte uittreksel"],"Author description":["Schrijver omschrijving"],"Term description":["Term omschrijving"],"Post excerpt":["Bericht uittreksel"],"Post content":["Bericht-inhoud"],"Dynamic link type":["Dynamische link-type"],"Updated date before text":["Bijgewerkt datum voor tekst"],"Use % in place of the number of comments":["Gebruik % in de plaats van het aantal reacties"],"Plural comments text":["Meervoud reacties tekst"],"Singular comments text":["Enkelvoudige reacties tekst"],"No comments text":["Geen reacties tekst"],"Term separator":["Term scheidingsteken"],"Replace with updated date":["Vervang door bijgewerkt datum"],"Updated date":["Bijgewerkt datum"],"Date type":["Datumtype"],"Terms":["Termen"],"Hello World":["Hallo wereld"],"Comments number":["Aantal reacties"],"List of terms":["Termenlijst"],"Post author name":["Bericht auteurnaam"],"Post date":["Berichtdatum"],"Title":["Titel"],"Dynamic text type":["Dynamische tekst type"],"Published date before text":["Gepubliceerd datum voor tekst"],"Term archives":["Term archief"],"Author meta":["Auteur meta"],"Previous page of posts":["Vorige pagina van berichten"],"Next page of posts":["Volgende pagina van berichten"],"Comments area":["Reacties gebied"],"Author archives":["Auteur archieven"],"Single post":["Enkel bericht"],"Taxonomy":["Taxonomie"],"In same term":["In dezelfde term"],"No previous post":["Geen vorig bericht"],"No next post":["Geen volgend bericht"],"Space between":["Spatie tussen"],"Inline alignment":["Inline uitlijning"],"Inline post meta items":["Inline bericht meta-termen"],"Previous post":["Vorig bericht"],"Next post":["Volgend bericht"],"Current post":["huidig bericht"],"Source":["Bron"],"Post":["Bericht"],"Choose\u2026":["Selecteer..."],"Dynamic Link":["Dynamische link"],"Use fallback image":["Gebruik terugval-afbeelding"],"Meta field name":["Metaveld naam"],"Add a background image to this Container to make it dynamic.":["Voeg een achtergrond toe aan deze Container om deze dynamisch te maken."],"User meta":["Gebruiker meta"],"Term meta":["Term meta"],"Post meta":["Bericht meta"],"Featured image":["Uitgelichte afbeelding"],"Dynamic Background Image":["Dynamische achtergrond afbeelding"],"Dynamic options":["Dynamische instellingen"],"Archive Navigation":["Archief navigatie"],"Post Navigation":["Berichtnavigatie"],"Post Meta Template":["Bericht meta template"],"Content Template":["Inhoud template"],"% Comments":["% reacties"],"1 Comment":["1 reactie"],"No Comments":["Geen reacties"],"This is a placeholder for your content.":["Dit is een plaatshouder voor je inhoud."],"This will remove the current sidebar widgets for the selected sidebar. Your layout must have a sidebar set for this Element to show.":["Dit verwijdert de huidige zijbalkwidgets voor de geselecteerde zijbalk. Je lay-out moet een zijbalk hebben om dit Element te laten zien."],"Site Footer":["Site footer"],"None":["Geen"],"Type":["Type"],"Right Sidebar":["Rechter zijbalk"],"Left Sidebar":["Linker zijbalk"],"Priority":["Prioriteit"],"Custom Hook":["Aangepaste hook"],"Custom":["Aangepast"],"Site Header":["Site header"],"Page Hero":["Page Hero"],"Hook":["Hook"],"Right":["Rechts"],"Left":["Links"],"Center":["Midden"],"Location":["Locatie"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-53e2a1d5945b8d2b1c35e81ae1e532f3.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-53e2a1d5945b8d2b1c35e81ae1e532f3.json
new file mode 100644
index 00000000..35533e46
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-53e2a1d5945b8d2b1c35e81ae1e532f3.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2022-03-18 15:02:47+0000","generator":"WP-CLI\/2.6.0","source":"dist\/editor.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl","plural-forms":"nplurals=2; plural=n != 1;"},"Active Elements":["Actieve elementen"],"All Elements":["Alle elementen"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-92fa58377f1b6f7bef9c785c31ae29ff.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-92fa58377f1b6f7bef9c785c31ae29ff.json
new file mode 100644
index 00000000..4fd94dc7
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-92fa58377f1b6f7bef9c785c31ae29ff.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2022-03-18 15:02:47+0000","generator":"WP-CLI\/2.6.0","source":"dist\/site-library.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl","plural-forms":"nplurals=2; plural=n != 1;"},"Requires GeneratePress %s.":[""],"Built by":["Gebouwd door"],"Note: We do our best to ensure all imported images are licensed for open use. However, image licenses can change, so we strongly advise that you replace all imported images with your own.":["Opmerking: we doen ons best om ervoor te zorgen dat alle ge\u00efmporteerde afbeeldingen vrij gebruikt mogen worden. Afbeeldingslicenties kunnen echter veranderen, dus we raden je ten zeerste aan om alle ge\u00efmporteerde afbeeldingen te vervangen door je eigen afbeeldingen."],"Check out your new site and start making it yours!":["Bekijk je nieuwe site en geef het jouw unieke stijl!"],"Learn more here":["Leer hier meer"],"To disable it, find WP_DEBUG in your wp-config.php file and set it to false like the below.":["Zoek - om het uit te schakelen - naar WP_DEBUG in je wp-config.php-bestand en stel het in op false zoals hieronder."],"WordPress debug mode is currently enabled. With this, any errors from third-party plugins might affect the import process.":["De foutopsporingsmodus van WordPress is momenteel ingeschakeld. Hierdoor kunnen eventuele fouten van plug-ins van derden het importproces be\u00efnvloeden."],"Debug Mode Enabled":["Foutopsporingsmodus ingeschakeld"],"Preview mobile":["Voorbeeld mobiel"],"Preview tablet":["Voorbeeld tablet"],"Preview desktop":["Voorbeeld desktop"],"Elementor Tools":["Elementor Tools"],"Take note of the old and new URLs below, then head over to the Elementor Tools area to replace them.":["Noteer de oude en nieuwe URL's hieronder en ga naar het Elementor Tools-gebied om ze te vervangen."],"Begin Import":["Begin importeren"],"I understand":["Ik begrijp het"],"Confirm Import":["Bevestig importeren"],"Import Demo Content":["Importeer demo inhoud"],"This will install and activate needed plugins, import demo content, and import site options.":["Dit installeert en activeert de benodigde plug-ins, importeert de demo-inhoud en importeert site-instellingen."],"Import Theme Options":["Importeer thema-instellingen"],"This will import the options from the Customizer.":["Dit importeert de instellingen van de Customizer."],"These plugins need to be installed manually.":["Deze plug-ins moeten handmatig worden ge\u00efnstalleerd."],"These plugins are already installed.":["Deze plug-ins zijn al ge\u00efnstalleerd."],"These plugins can be installed automatically.":["Deze plug-ins kunnen automatisch worden ge\u00efnstalleerd."],"Gathering information":["Informatie aan het verzamelen."],"Refresh sites":["Vernieuw sites"],"Requires GP Premium %s.":["Vereist GP Premium %s."],"Page Builder":["Pagina bouwer"],"Category":["Categorie"],"No thanks":["Nee bedankt"],"Remove imported site":["Verwijder ge\u00efmporteerde site"],"This process makes changes to your website. If it contains important data, we suggest backing it up before proceeding.":["Dit proces maakt veranderingen aan je website. Als deze belangrijke data bevat, raden we aan om deze te back-uppen."],"Try again":["Nogmaals proberen"],"No sites were found.":["Geen sites gevonden."],"Restoring content":["Terugzetten inhoud"],"Installing %s":["%s wordt ge\u00efnstalleerd"],"Import Complete":["Import compleet"],"Importing theme options":["Thema-instellingen worden ge\u00efmporteerd"],"Why?":["Waarom?"],"This process restores your previous options, widgets and active plugins. It will also remove your imported content and CSS.":["Deze procedure zet de vorige instellingen, widgets, en actieve plugins terug. Het verwijdert ook de ge\u00efmporteerde inhoud en CSS."],"It is highly recommended that you remove the last site you imported before importing a new one.":["Het is aanbevolen dat je de laatste site verwijdert die je hebt ge\u00efmporteerd voordat je een nieuwe importeert."],"Existing Site Import Detected":["Bestaande site import gevonden"],"Restoring theme options":["Terugzetten thema-instellingen"],"New URL":["Nieuwe URL"],"Old URL":["Oude URL"],"This site is using Elementor which means you will want to replace the imported image URLs.":["Deze site maakt gebruik van Elementor, wat betekent dat je de ge\u00efmporteerde afbeeldings-URLs moet aanpassen."],"Additional Cleanup":["Extra opruimen"],"This site uses the following plugins.":["Deze site maakt gebruik van de volgende plugins:"],"All":["Alles"],"View Site":["Bekijk site"],"Get Started":["Nu beginnen"],"Plugins":["Plugins"],"Installing plugins":["Plugins aan het installeren"],"Activating plugins":["Plugins aan het activeren"],"Importing widgets":["Widgets aan het importeren"],"Importing site options":["Site-instellingen aan het importeren"],"Importing content":["Inhoud aan het importeren"],"None":["Geen"],"Import":["Importeren"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-cbab080b0f20fd6c323029398be6c986.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-cbab080b0f20fd6c323029398be6c986.json
new file mode 100644
index 00000000..c67be4c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-cbab080b0f20fd6c323029398be6c986.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2022-03-18 15:02:47+0000","generator":"WP-CLI\/2.6.0","source":"dist\/dashboard.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl","plural-forms":"nplurals=2; plural=n != 1;"},"This will delete all of your customizer settings. It cannot be undone.":["Dit zal al je customizer instellingen verwijderen. Het kan niet ongedaan worden gemaakt."],"Reset your customizer settings.":["Reset je customizer instellingen."],"Options imported.":["Opties ge\u00efmporteerd."],"This can overwrite existing settings and cannot be undone.":["Dit kan bestaande instellingen overschrijven en kan niet ongedaan worden gemaakt."],"Import your customizer settings.":["Importeer je customizer instellingen."],"Global Colors":["Globale kleuren"],"Export your customizer settings.":["Exporteer je customizer instellingen."],"Import \/ Export":["Importeren \/ exporteren"],"License key deactivated.":["Licentiesleutel gedeactiveerd."],"License key activated.":["Licentiesleutel geactiveerd."],"Get alpha and beta updates directly to your Dashboard.":["Ontvang alpha en beta updates direct in je Dashboard."],"Enter your license key to activate updates.":["Voer je licentiesleutel in om updates te activeren."],"Not receiving premium updates.":["Geen premium updates ontvangen."],"Receiving premium updates.":["Premium-updates ontvangen."],"Options exported":["Opties ge\u00ebxporteerd"],"This will delete all settings for this module. It cannot be undone.":["Hiermee worden alle instellingen voor deze module verwijderd. Dit kan niet ongedaan worden gemaakt."],"Open tools for this module.":["Open gereedschap voor deze module."],"Open Elements":["Open elementen"],"Open Site Library":["Open site bibliotheek"],"Settings reset.":["Instellingen gereset."],"Typography":["Typografie"],"All":["Alles"],"Reset":["Terugzetten"],"Modules":["Modules"],"License Key":["Licentiecode"],"Deactivate":["Deactiveren"],"Activate":["Activeren"],"This module has been deprecated. Deactivating it will remove it from this list.":["Deze module is verouderd. Als u deze deactiveert, wordt deze uit deze lijst verwijderd."],"Import":["Importeren"],"Export":["Exporteren"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-ecf9f3c2af10c4f2dfbf4f42504922d1.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-ecf9f3c2af10c4f2dfbf4f42504922d1.json
new file mode 100644
index 00000000..4b227d35
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-ecf9f3c2af10c4f2dfbf4f42504922d1.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2022-03-18 15:02:47+0000","generator":"WP-CLI\/2.6.0","source":"dist\/customizer.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl","plural-forms":"nplurals=2; plural=n != 1;"},"Related\/Upsell Product Titles":["Gerelateerde\/opwaarderende producttitels"],"Catalog Product Titles":["Catalogus product titels"],"Off-Canvas Sub-Menu Items":["Off-canvas submenu items"],"Off-Canvas Menu Items":["Off-canvas menu items"],"Secondary Mobile Menu Toggle":["Secundair mobiel menu toggle"],"Secondary Sub-Menu Items":["Secundaire submenu items"],"Secondary Menu Items":["Secundaire menu-items"],"Off-Canvas Panel":["Off-canvas paneel"],"WooCommerce":["WooCommerce"],"Secondary Navigation":["Secundaire navigatie"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL.mo
new file mode 100644
index 00000000..1c22113f
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pl_PL.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pl_PL.mo
new file mode 100644
index 00000000..06c623d9
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pl_PL.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_BR.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_BR.mo
new file mode 100644
index 00000000..06ea6cae
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_BR.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-42da344ccb044413769d16ed3484307b.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-42da344ccb044413769d16ed3484307b.json
new file mode 100644
index 00000000..101c7110
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-42da344ccb044413769d16ed3484307b.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2020-08-08 21:16:06+0000","generator":"WP-CLI\/2.6.0","source":"dist\/block-elements.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt","plural-forms":"nplurals=2; plural=n != 1;"},"Site Footer":["Rodap\u00e9 do site"],"None":["Nenhuma"],"Type":["Tipo"],"Right Sidebar":["Barra lateral direita"],"Left Sidebar":["Barra lateral esquerda"],"Priority":["Prioridade"],"Custom Hook":["Hook personalizado"],"Custom":["Personalizado"],"Site Header":["Cabe\u00e7alho do site"],"Page Hero":["Hero de p\u00e1gina"],"Hook":["Hook"],"Right":["Direita"],"Left":["Esquerda"],"Center":["Centro"],"Location":["Localiza\u00e7\u00e3o"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-53e2a1d5945b8d2b1c35e81ae1e532f3.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-53e2a1d5945b8d2b1c35e81ae1e532f3.json
new file mode 100644
index 00000000..4fc6aaba
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-53e2a1d5945b8d2b1c35e81ae1e532f3.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2020-08-08 21:16:06+0000","generator":"WP-CLI\/2.6.0","source":"dist\/editor.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt","plural-forms":"nplurals=2; plural=n != 1;"},"All Elements":["Todos os elementos"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-92fa58377f1b6f7bef9c785c31ae29ff.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-92fa58377f1b6f7bef9c785c31ae29ff.json
new file mode 100644
index 00000000..d60c4950
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-92fa58377f1b6f7bef9c785c31ae29ff.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2020-08-08 21:16:06+0000","generator":"WP-CLI\/2.6.0","source":"dist\/site-library.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt","plural-forms":"nplurals=2; plural=n != 1;"},"Why?":["Porqu\u00ea?"],"This process restores your previous options, widgets and active plugins. It will also remove your imported content and CSS.":["Este processo recupera as suas op\u00e7\u00f5es, widgets e plugins activos anteriores. Tamb\u00e9m ir\u00e1 remover o seu conte\u00fado importado e CSS."],"It is highly recommended that you remove the last site you imported before importing a new one.":["\u00c9 altamente recomendado que remova o site importado anteriormente antes de importar um novo."],"Existing Site Import Detected":["Detectado um site importado existente"],"Restoring theme options":["A recuperar op\u00e7\u00f5es do tema"],"New URL":["URL novo"],"Old URL":["URL antigo"],"This site is using Elementor which means you will want to replace the imported image URLs.":["Este site utiliza o Elementor, isto significa que dever\u00e1 substituir os URL das imagens importadas."],"Additional Cleanup":["Limpeza adicional"],"This site uses the following plugins.":["Este site utiliza os seguintes plugins."],"All":["Todos"],"View Site":["Ver site"],"Get Started":["Come\u00e7ar"],"Plugins":["Plugins"],"Installing plugins":["A instalar plugins"],"Activating plugins":["A activar plugins"],"Importing widgets":["A importar widgets"],"Importing site options":["A importar op\u00e7\u00f5es do site"],"Importing content":["A importar conte\u00fados"],"None":["Nenhuma"],"Import":["Importar"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT.mo
new file mode 100644
index 00000000..53b4c446
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-42da344ccb044413769d16ed3484307b.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-42da344ccb044413769d16ed3484307b.json
new file mode 100644
index 00000000..a9c99495
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-42da344ccb044413769d16ed3484307b.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2020-04-26 23:48:38+0000","generator":"WP-CLI\/2.6.0","source":"dist\/block-elements.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"},"None":["\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442"],"Type":["\u0422\u0438\u043f"],"Right Sidebar":["\u0412 \u043f\u0440\u0430\u0432\u043e\u043c \u0431\u043e\u043a\u043e\u0432\u0438\u043a\u0435"],"Left Sidebar":["\u0412 \u043b\u0435\u0432\u043e\u043c \u0431\u043e\u043a\u043e\u0432\u0438\u043a\u0435"],"Priority":["\u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442"],"Custom Hook":["\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0445\u0443\u043a"],"Custom":["\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439"],"Site Header":["\u0428\u0430\u043f\u043a\u0430 \u0441\u0430\u0439\u0442\u0430"],"Page Hero":["Hero \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430"],"Hook":["\u0425\u0443\u043a"],"Right":["\u0421\u043f\u0440\u0430\u0432\u0430"],"Left":["\u0421\u043b\u0435\u0432\u0430"],"Center":["\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443"],"Location":["\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-53e2a1d5945b8d2b1c35e81ae1e532f3.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-53e2a1d5945b8d2b1c35e81ae1e532f3.json
new file mode 100644
index 00000000..8c151d93
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-53e2a1d5945b8d2b1c35e81ae1e532f3.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2020-04-26 23:48:38+0000","generator":"WP-CLI\/2.6.0","source":"dist\/editor.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"},"All Elements":["\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-92fa58377f1b6f7bef9c785c31ae29ff.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-92fa58377f1b6f7bef9c785c31ae29ff.json
new file mode 100644
index 00000000..dd014408
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-92fa58377f1b6f7bef9c785c31ae29ff.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2020-04-26 23:48:38+0000","generator":"WP-CLI\/2.6.0","source":"dist\/site-library.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"},"Why?":["\u041f\u043e\u0447\u0435\u043c\u0443?"],"This process restores your previous options, widgets and active plugins. It will also remove your imported content and CSS.":["\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u0430\u0448\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u0430\u043b\u0438\u0442 \u0432\u0430\u0448 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0438 CSS."],"It is highly recommended that you remove the last site you imported before importing a new one.":["\u041d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u043f\u0435\u0440\u0435\u0434 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u043c \u043d\u043e\u0432\u043e\u0433\u043e."],"Existing Site Import Detected":["\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u0438\u043c\u043f\u043e\u0440\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430"],"Restoring theme options":["\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0442\u0435\u043c\u044b"],"New URL":["\u041d\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 URL"],"Old URL":["\u0421\u0442\u0430\u0440\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 URL"],"This site is using Elementor which means you will want to replace the imported image URLs.":["\u042d\u0442\u043e\u0442 \u0441\u0430\u0439\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Elementor, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0412\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439."],"Additional Cleanup":["\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0430"],"This site uses the following plugins.":["\u042d\u0442\u043e\u0442 \u0441\u0430\u0439\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b."],"Installing plugins":["\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432"],"Activating plugins":["\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432"],"Importing widgets":["\u0418\u043c\u043f\u043e\u0440\u0442 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432"],"Importing site options":["\u0418\u043c\u043f\u043e\u0440\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0430\u0439\u0442\u0430"],"Importing content":["\u0418\u043c\u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430"],"None":["\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442"],"Import":["\u0418\u043c\u043f\u043e\u0440\u0442"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU.mo
new file mode 100644
index 00000000..fcf8bf5b
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-42da344ccb044413769d16ed3484307b.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-42da344ccb044413769d16ed3484307b.json
new file mode 100644
index 00000000..9304f6d7
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-42da344ccb044413769d16ed3484307b.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2022-09-11 13:55:08+0000","generator":"WP-CLI\/2.6.0","source":"dist\/block-elements.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"sv_SE","plural-forms":"nplurals=2; plural=n != 1;"},"Loop Template":[""],"The taxonomy to check if in the same term.":[""],"Check for posts with the same term as the current post.":["Kolla efter inl\u00e4gg med samma term som det nuvarande inl\u00e4gget."],"Remove container condition":["Ta bort beh\u00e5llarens villkor"],"Display Order":[""],"Parent Element":["\u00d6verordnat element"],"First post":["F\u00f6rsta inl\u00e4gg"],"No post meta":[""],"No featured image":["Ingen utvald bild"],"Keep default archive navigation container":[""],"Disable default pagination":[""],"Add default archive navigation container":[""],"Disable default post navigation":[""],"Use the above template tag to add the current year to your footer.":[""],"Current year template tag":[""],"Disable primary post meta":["Inaktivera prim\u00e4r metadata f\u00f6r inl\u00e4gg"],"Disable featured image":["Inaktivera utvald bild"],"Disable title":["Inaktivera rubrik"],"Keep default post container":[""],"Post meta name":["Namn f\u00f6r metadata f\u00f6r inl\u00e4gg"],"Term name":["Termnamn"],"Posts with custom field":["Inl\u00e4gg med anpassat f\u00e4lt"],"Posts with term":["Inl\u00e4gg med term"],"All posts":["Alla inl\u00e4gg"],"Apply to":["Till\u00e4mpa p\u00e5"],"Tag name":["Etikettnamn"],"Replace default secondary post meta":[""],"Replace default primary post meta":[""],"Custom hook name":["V\u00e4lj namn f\u00f6r \u00e5tg\u00e4rds-hook"],"Choose your hook":["V\u00e4lj din \u00e5tg\u00e4rds-hook"],"Hook name":["Namn p\u00e5 \u00e5tg\u00e4rds-hook"],"Quick hook select":[""],"Before post title":["F\u00f6re inl\u00e4ggsrubrik"],"After post title":["Efter inl\u00e4ggsrubrik"],"This Element will replace your site footer area that holds your copyright message. It will not replace footer widgets if they exist.":["Detta element kommer att ers\u00e4tta ditt sidfotomr\u00e5de som inneh\u00e5ller ditt upphovsr\u00e4ttsmeddelande. Det ers\u00e4tter inte sidfotens widgetar om det finns."],"Templates":["Mallar"],"Element type":["Elementtyp"],"Editor width":["Redigeringsbredd"],"Install GenerateBlocks":["Installera GenerateBlocks"],"Activate GenerateBlocks":["Aktivera GenerateBlocks"],"To take full advantage of Block Elements, we suggest using our GenerateBlocks plugin.":["F\u00f6r att dra full nytta av Block Elements f\u00f6resl\u00e5r vi att du anv\u00e4nder v\u00e5rt till\u00e4gg GenerateBlocks."],"Block Element":["Block Element"],"After content container":["Efter inneh\u00e5llsbeh\u00e5llare"],"After content":["Efter inneh\u00e5ll"],"Before content":["F\u00f6re inneh\u00e5ll"],"Before content container":["F\u00f6re inneh\u00e5llsbeh\u00e5llare"],"After header":[""],"label\u0004Single post hero with excerpt":[""],"label\u0004Basic single post page hero":[""],"label\u0004Rounded buttons with icon":["Rundade knappar med ikon"],"label\u0004Default next and previous buttons":["Standardknappar f\u00f6r n\u00e4sta och f\u00f6reg\u00e5ende"],"label\u0004Landscape layout":["Liggande layout"],"label\u0004Layout with offset content":["Layout med f\u00f6rskjutet inneh\u00e5ll"],"label\u0004Basic layout with term buttons":[""],"label\u0004Full footer 2":["Hel sidfot 2"],"label\u0004Full footer 1":["Hel sidfot 1"],"label\u0004Term buttons":[""],"label\u0004Stacked with avatar":["Staplad med profilbild"],"label\u0004Inline with avatar":[""],"label\u0004Two columns with background overlays":["2 kolumner med bakgrund\u00f6verl\u00e4gg"],"label\u0004Two columns with arrows":["Tv\u00e5 kolumner med pilar"],"label\u0004Two columns with featured image":["Tv\u00e5 kolumner med utvald bild"],"%s Units":[""],"A size unit for CSS markup\u0004Degree":["Grad"],"A size unit for CSS markup\u0004Percentage":["Procentsats"],"A size unit for CSS markup\u0004Em":["Em"],"A size unit for CSS markup\u0004Pixel":["Pixel"],"Select Units":["V\u00e4lj enheter"],"Displays a dynamic image from your chosen source.":["Visar en dynamisk bild fr\u00e5n din valda k\u00e4lla."],"Dynamic Image":["Dynamisk bild"],"Dynamic image placeholder":["Platsh\u00e5llare f\u00f6r dynamisk bild"],"Choose your dynamic image type.":["V\u00e4lj din dynamiska bildtyp."],"Dynamic image":["Dynamisk bild"],"Make image rounded":["G\u00f6r bild rundad"],"Custom field name":["Anpassat f\u00e4ltnamn"],"Custom field":["Anpassat f\u00e4lt"],"Link to":["L\u00e4nk till"],"Image height":["Bildh\u00f6jd"],"Image width":["Bildbredd"],"Image size":["Bildstorlek"],"Author avatar":["Profilbild f\u00f6r f\u00f6rfattare"],"Displays dynamic content based on your chosen source.":["Visar dynamiskt inneh\u00e5ll baserat p\u00e5 din valda k\u00e4lla."],"Dynamic Content":["Dynamiskt inneh\u00e5ll"],"This is a placeholder for your description.":["Detta \u00e4r en platsh\u00e5llare f\u00f6r din beskrivning."],"Choose your dynamic content type.":["V\u00e4lj din dynamiska inneh\u00e5llstyp."],"Dynamic content":["Dynamiskt inneh\u00e5ll"],"Custom more link":["Anpassad l\u00e4nk f\u00f6r \u201dMer\u201d"],"Use theme more link":["Anv\u00e4nd temats l\u00e4nk f\u00f6r \u201dMer\u201d"],"Excerpt length":["Utdragsl\u00e4ngd"],"Author description":["F\u00f6rfattarbeskrivning"],"Term description":["Termbeskrivning"],"Post excerpt":["Inl\u00e4ggsutdrag"],"Post content":["Inl\u00e4ggsinneh\u00e5ll"],"Dynamic link type":["Dynamisk l\u00e4nktyp"],"Updated date before text":["Uppdateringsdatum f\u00f6re text"],"Use % in place of the number of comments":["Anv\u00e4nd % i st\u00e4llet f\u00f6r antalet kommentarer"],"Plural comments text":["Kommentarstext i plural"],"Singular comments text":["Kommentarstext i singular"],"No comments text":["Text f\u00f6r \u201dInga kommentarer\u201d"],"Term separator":[""],"Replace with updated date":["Ers\u00e4tt med uppdateringsdatum"],"Updated date":["Uppdateringsdatum"],"Date type":["Datumtyp"],"Terms":["Termer"],"Hello World":["Hej v\u00e4rlden"],"Comments number":["Antal kommentarer"],"List of terms":["Lista \u00f6ver termer"],"Post author name":["Inl\u00e4ggsf\u00f6rfattarens namn"],"Post date":["Publiceringsdatum"],"Title":["Rubrik"],"Dynamic text type":["Dynamisk texttyp"],"Published date before text":["Publiceringsdatum f\u00f6re text"],"Term archives":["Termarkiv"],"Author meta":["Meta f\u00f6r f\u00f6rfattare"],"Previous page of posts":["F\u00f6reg\u00e5ende sida med inl\u00e4gg"],"Next page of posts":["N\u00e4sta sida med inl\u00e4gg"],"Comments area":["Kommentaromr\u00e5de"],"Author archives":["F\u00f6rfattararkiv"],"Single post":["Enskilt inl\u00e4gg"],"Taxonomy":["Taxonomi"],"In same term":["I samma term"],"No previous post":["Inget f\u00f6reg\u00e5ende inl\u00e4gg"],"No next post":["Inget n\u00e4sta inl\u00e4gg"],"Space between":["Avst\u00e5nd mellan"],"Inline alignment":[""],"Inline post meta items":[""],"Previous post":["F\u00f6reg\u00e5ende inl\u00e4gg"],"Next post":["N\u00e4sta inl\u00e4gg"],"Current post":["Nuvarande inl\u00e4gg"],"Source":["K\u00e4lla"],"Post":["Inl\u00e4gg"],"Choose\u2026":["V\u00e4lj \u2026"],"Dynamic Link":["Dynamisk l\u00e4nk"],"Use fallback image":["Anv\u00e4nd reservbild"],"Meta field name":[""],"Add a background image to this Container to make it dynamic.":["L\u00e4gg till en bakgrundsbild i denna beh\u00e5llare f\u00f6r att g\u00f6ra den dynamisk."],"User meta":["Anv\u00e4ndarmeta"],"Term meta":[""],"Post meta":["Metadata f\u00f6r inl\u00e4gg"],"Featured image":["Utvald bild"],"Dynamic Background Image":["Dynamisk bakgrundsbild"],"Dynamic options":["Dynamiska alternativ"],"Archive Navigation":["Arkivnavigering"],"Post Navigation":["Inl\u00e4ggsnavigering"],"Post Meta Template":[""],"Content Template":["Inneh\u00e5llsmall"],"% Comments":["% kommentarer"],"1 Comment":["1 kommentar"],"No Comments":["Inga kommentarer"],"This is a placeholder for your content.":["Detta \u00e4r en platsh\u00e5llare f\u00f6r ditt inneh\u00e5ll."],"This will remove the current sidebar widgets for the selected sidebar. Your layout must have a sidebar set for this Element to show.":[""],"Site Footer":["Webbplatsens sidfot"],"None":["Ingen"],"Type":["Typ"],"Right Sidebar":["H\u00f6ger sidopanel"],"Left Sidebar":["V\u00e4nster sidopanel"],"Priority":["Prioritet"],"Custom Hook":["Anpassad \u00e5tg\u00e4rds-hook"],"Custom":["Anpassad"],"Site Header":["Webbplatsens sidhuvud"],"Page Hero":[""],"Hook":["\u00c5tg\u00e4rds-hook"],"Right":["H\u00f6ger"],"Left":["V\u00e4nster"],"Center":["Centrerat"],"Location":["Plats"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-53e2a1d5945b8d2b1c35e81ae1e532f3.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-53e2a1d5945b8d2b1c35e81ae1e532f3.json
new file mode 100644
index 00000000..f12fea6b
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-53e2a1d5945b8d2b1c35e81ae1e532f3.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2022-09-11 13:55:08+0000","generator":"WP-CLI\/2.6.0","source":"dist\/editor.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"sv_SE","plural-forms":"nplurals=2; plural=n != 1;"},"Active Elements":["Aktiva element"],"All Elements":["Alla element"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-92fa58377f1b6f7bef9c785c31ae29ff.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-92fa58377f1b6f7bef9c785c31ae29ff.json
new file mode 100644
index 00000000..97d4a449
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-92fa58377f1b6f7bef9c785c31ae29ff.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2022-09-11 13:55:08+0000","generator":"WP-CLI\/2.6.0","source":"dist\/site-library.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"sv_SE","plural-forms":"nplurals=2; plural=n != 1;"},"Requires GeneratePress %s.":[""],"Built by":["Byggd med"],"Note: We do our best to ensure all imported images are licensed for open use. However, image licenses can change, so we strongly advise that you replace all imported images with your own.":[""],"Check out your new site and start making it yours!":["Kolla in din nya webbplats och b\u00f6rja g\u00f6ra den till din egen!"],"Learn more here":["L\u00e4r dig mer h\u00e4r"],"To disable it, find WP_DEBUG in your wp-config.php file and set it to false like the below.":["F\u00f6r att inaktivera den, hitta WP_DEBUG i din wp-config.php-fil och st\u00e4ll in den p\u00e5 falsk som nedan."],"WordPress debug mode is currently enabled. With this, any errors from third-party plugins might affect the import process.":["WordPress fels\u00f6kningsl\u00e4ge \u00e4r f\u00f6r n\u00e4rvarande aktiverat. Med detta kan eventuella fel fr\u00e5n till\u00e4gg fr\u00e5n tredje part p\u00e5verka importprocessen."],"Debug Mode Enabled":["Fels\u00f6kningsl\u00e4ge aktiverat"],"Preview mobile":["F\u00f6rhandsgranska mobil"],"Preview tablet":["F\u00f6rhandsgranska surfplatta"],"Preview desktop":["F\u00f6rhandsgranska station\u00e4r dator"],"Elementor Tools":["Elementor-verktyg"],"Take note of the old and new URLs below, then head over to the Elementor Tools area to replace them.":[""],"Begin Import":["Starta import"],"I understand":["Jag f\u00f6rst\u00e5r"],"Confirm Import":["Bekr\u00e4fta import"],"Import Demo Content":["Importera demoinneh\u00e5ll"],"This will install and activate needed plugins, import demo content, and import site options.":["Detta kommer att installera och aktivera n\u00f6dv\u00e4ndiga till\u00e4gg, importera demo-inneh\u00e5ll och importera webbplatsalternativ."],"Import Theme Options":["Importera temaalternativ"],"This will import the options from the Customizer.":["Detta importerar alternativen fr\u00e5n anpassaren."],"These plugins need to be installed manually.":["Dessa till\u00e4gg m\u00e5ste installeras manuellt."],"These plugins are already installed.":["Dessa till\u00e4gg \u00e4r redan installerade."],"These plugins can be installed automatically.":["Dessa till\u00e4gg kan installeras automatiskt."],"Gathering information":["Samlar information"],"Refresh sites":["Uppdatera webbplatser"],"Requires GP Premium %s.":["Kr\u00e4ver GP Premium %s."],"Page Builder":["Sidbyggare"],"Category":["Kategori"],"No thanks":["Nej tack"],"Remove imported site":["Ta bort importerad webbplats"],"This process makes changes to your website. If it contains important data, we suggest backing it up before proceeding.":["Denna process g\u00f6r \u00e4ndringar p\u00e5 din webbplats. Om den inneh\u00e5ller viktiga data f\u00f6resl\u00e5r vi att du s\u00e4kerhetskopierar den innan du forts\u00e4tter."],"Try again":["F\u00f6rs\u00f6k igen"],"No sites were found.":["Inga webbplatser hittades."],"Restoring content":["\u00c5terst\u00e4ller inneh\u00e5ll"],"Installing %s":["Installerar %s"],"Import Complete":["Import slutf\u00f6rd"],"Importing theme options":["Importerar temaalternativ"],"Why?":["Varf\u00f6r?"],"This process restores your previous options, widgets and active plugins. It will also remove your imported content and CSS.":["Denna process \u00e5terst\u00e4ller dina f\u00f6reg\u00e5ende alternativ, widgetar och aktiva till\u00e4gg. Det tar ocks\u00e5 bort ditt importerade inneh\u00e5ll och CSS."],"It is highly recommended that you remove the last site you imported before importing a new one.":["Det rekommenderas starkt att du tar bort den senaste webbplatsen du importerade innan du importerar en ny."],"Existing Site Import Detected":["Befintlig webbplatsimport uppt\u00e4ckt"],"Restoring theme options":["\u00c5terst\u00e4ller temalternativ"],"New URL":["Ny URL"],"Old URL":["Gammal URL"],"This site is using Elementor which means you will want to replace the imported image URLs.":["Denna webbplats anv\u00e4nder Elementor vilket inneb\u00e4r att du beh\u00f6ver ers\u00e4tta de importerade bild-URL:erna."],"Additional Cleanup":["Ytterligare upprensning"],"This site uses the following plugins.":["Denna webbplats anv\u00e4nder f\u00f6ljande till\u00e4gg."],"All":["Alla"],"View Site":["Visa webbplats"],"Get Started":["Komma ig\u00e5ng"],"Plugins":["Till\u00e4gg"],"Installing plugins":["Installerar till\u00e4gg"],"Activating plugins":["Aktiverar till\u00e4gg"],"Importing widgets":["Importerar widgetar"],"Importing site options":["Importerar webbplatsalternativ"],"Importing content":["Importerar inneh\u00e5ll"],"None":["Ingen"],"Import":["Importera"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-cbab080b0f20fd6c323029398be6c986.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-cbab080b0f20fd6c323029398be6c986.json
new file mode 100644
index 00000000..49ee4f2c
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-cbab080b0f20fd6c323029398be6c986.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2022-09-11 13:55:08+0000","generator":"WP-CLI\/2.6.0","source":"dist\/dashboard.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"sv_SE","plural-forms":"nplurals=2; plural=n != 1;"},"This will delete all of your customizer settings. It cannot be undone.":[""],"Reset your customizer settings.":["\u00c5terst\u00e4ll dina inst\u00e4llningar f\u00f6r anpassaren."],"Options imported.":["Alternativ importerade."],"This can overwrite existing settings and cannot be undone.":["Detta kan skriva \u00f6ver befintliga inst\u00e4llningar och kan inte \u00e5ngras."],"Import your customizer settings.":["Importera dina inst\u00e4llningar f\u00f6r anpassaren."],"Global Colors":["Globala f\u00e4rger"],"Export your customizer settings.":["Exportera dina inst\u00e4llningar f\u00f6r anpassaren."],"Import \/ Export":["Import\/export"],"License key deactivated.":["Licensnyckel inaktiverad."],"License key activated.":["Licensnyckel aktiverad."],"Get alpha and beta updates directly to your Dashboard.":[""],"Enter your license key to activate updates.":["Ange din licensnyckel f\u00f6r att aktivera uppdateringar."],"Not receiving premium updates.":["Tar inte emot premiumuppdateringar."],"Receiving premium updates.":["Tar emot premiumuppdateringar."],"Options exported":["Alternativ exporterad"],"This will delete all settings for this module. It cannot be undone.":["Detta kommer ta bort alla inst\u00e4llningar f\u00f6r denna modul. Det kan inte \u00e5ngras."],"Open tools for this module.":["\u00d6ppna verktyg f\u00f6r denna modul."],"Open Elements":["\u00d6ppna element"],"Open Site Library":["\u00d6ppna webbplatsbibliotek"],"Settings reset.":["Inst\u00e4llningar \u00e5terst\u00e4lls."],"Typography":["Typografi"],"All":["Alla"],"Reset":["\u00c5terst\u00e4ll"],"Modules":["Moduler"],"License Key":["Licensnyckel"],"Deactivate":["Inaktivera"],"Activate":["Aktivera"],"This module has been deprecated. Deactivating it will remove it from this list.":["Denna modul har tagits ur bruk. Vid inaktivering kommer den att tas bort fr\u00e5n denna lista."],"Import":["Importera"],"Export":["Exportera"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-ecf9f3c2af10c4f2dfbf4f42504922d1.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-ecf9f3c2af10c4f2dfbf4f42504922d1.json
new file mode 100644
index 00000000..5492d9ca
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-ecf9f3c2af10c4f2dfbf4f42504922d1.json
@@ -0,0 +1 @@
+{"translation-revision-date":"2022-09-11 13:55:08+0000","generator":"WP-CLI\/2.6.0","source":"dist\/customizer.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"sv_SE","plural-forms":"nplurals=2; plural=n != 1;"},"Related\/Upsell Product Titles":["Produktrubriker f\u00f6r relaterad\/merf\u00f6rs\u00e4ljning"],"Catalog Product Titles":[""],"Off-Canvas Sub-Menu Items":[""],"Off-Canvas Menu Items":[""],"Secondary Mobile Menu Toggle":[""],"Secondary Sub-Menu Items":[""],"Secondary Menu Items":["Sekund\u00e4ra menyalternativ"],"Off-Canvas Panel":[""],"WooCommerce":["WooCommerce"],"Secondary Navigation":["Sekund\u00e4r navigation"]}}}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE.mo
new file mode 100644
index 00000000..918f0090
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-uk.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-uk.mo
new file mode 100644
index 00000000..007659aa
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-uk.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-vi.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-vi.mo
new file mode 100644
index 00000000..1838e84d
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-vi.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-zh_CN.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-zh_CN.mo
new file mode 100644
index 00000000..e23bcac0
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-zh_CN.mo differ
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/alpha-color-picker/wp-color-picker-alpha.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/alpha-color-picker/wp-color-picker-alpha.js
new file mode 100644
index 00000000..bd407429
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/alpha-color-picker/wp-color-picker-alpha.js
@@ -0,0 +1,635 @@
+/**!
+ * wp-color-picker-alpha
+ *
+ * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
+ * Only run in input and is defined data alpha in true
+ *
+ * Version: 3.0.0
+ * https://github.com/kallookoo/wp-color-picker-alpha
+ * Licensed under the GPLv2 license or later.
+ */
+
+( function( $, undef ) {
+
+ var wpColorPickerAlpha = {
+ 'version' : 300
+ };
+
+ // Always try to use the last version of this script.
+ if ( 'wpColorPickerAlpha' in window && 'version' in window.wpColorPickerAlpha ) {
+ var version = parseInt( window.wpColorPickerAlpha.version, 10 );
+ if ( ! isNaN( version ) && version >= wpColorPickerAlpha.version ) {
+ return;
+ }
+ }
+
+ // Prevent multiple initiations
+ if ( Color.fn.hasOwnProperty( 'to_s' ) ) {
+ return;
+ }
+
+ // Create new method to replace the `Color.toString()` inside the scripts.
+ Color.fn.to_s = function( type ) {
+ type = ( type || 'hex' );
+ // Change hex to rgba to return the correct color.
+ if ( 'hex' === type && this._alpha < 1 ) {
+ type = 'rgba';
+ }
+
+ var color = '';
+ if ( 'hex' === type ) {
+ color = this.toString();
+ } else if ( ! this.error ) {
+ color = this.toCSS( type ).replace( /\(\s+/, '(' ).replace( /\s+\)/, ')' );
+ }
+ return color;
+ }
+
+ // Register the global variable.
+ window.wpColorPickerAlpha = wpColorPickerAlpha;
+
+ // Background image encoded
+ var backgroundImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==';
+
+ /**
+ * Iris
+ */
+ $.widget( 'a8c.iris', $.a8c.iris, {
+ /**
+ * Alpha options
+ *
+ * @since 3.0.0
+ *
+ * @type {Object}
+ */
+ alphaOptions: {
+ alphaEnabled: false,
+ },
+ /**
+ * Get the current color or the new color.
+ *
+ * @since 3.0.0
+ * @access private
+ *
+ * @param {Object|*} The color instance if not defined return the cuurent color.
+ *
+ * @return {string} The element's color.
+ */
+ _getColor: function( color ) {
+ if ( color === undef ) {
+ color = this._color;
+ }
+
+ if ( this.alphaOptions.alphaEnabled ) {
+ color = color.to_s( this.alphaOptions.alphaColorType );
+ if ( ! this.alphaOptions.alphaColorWithSpace ) {
+ color = color.replace( /\s+/g, '' );
+ }
+ return color;
+ }
+ return color.toString();
+ },
+ /**
+ * Create widget
+ *
+ * @since 3.0.0
+ * @access private
+ *
+ * @return {void}
+ */
+ _create: function() {
+ try {
+ // Try to get the wpColorPicker alpha options.
+ this.alphaOptions = this.element.wpColorPicker( 'instance' ).alphaOptions;
+ } catch( e ) {}
+
+ // We make sure there are all options
+ $.extend( {}, this.alphaOptions, {
+ alphaEnabled: false,
+ alphaCustomWidth: 130,
+ alphaReset: false,
+ alphaColorType: 'hex',
+ alphaColorWithSpace: false,
+ } );
+
+ this._super();
+ },
+ /**
+ * Binds event listeners to the Iris.
+ *
+ * @since 3.0.0
+ * @access private
+ *
+ * @return {void}
+ */
+ _addInputListeners: function( input ) {
+ var self = this,
+ debounceTimeout = 100,
+ callback = function( event ){
+ var val = input.val(),
+ color = new Color( val ),
+ val = val.replace( /^(#|(rgb|hsl)a?)/, '' ),
+ type = self.alphaOptions.alphaColorType;
+
+ input.removeClass( 'iris-error' );
+
+ if ( ! color.error ) {
+ // let's not do this on keyup for hex shortcodes
+ if ( 'hex' !== type || ! ( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) ) {
+ // Compare color ( #AARRGGBB )
+ if ( color.toIEOctoHex() !== self._color.toIEOctoHex() ) {
+ self._setOption( 'color', self._getColor( color ) );
+ }
+ }
+ } else if ( val !== '' ) {
+ input.addClass( 'iris-error' );
+ }
+ };
+
+ input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) );
+
+ // If we initialized hidden, show on first focus. The rest is up to you.
+ if ( self.options.hide ) {
+ input.one( 'focus', function() {
+ self.show();
+ });
+ }
+ },
+ /**
+ * Init Controls
+ *
+ * @since 3.0.0
+ * @access private
+ *
+ * @return {void}
+ */
+ _initControls: function() {
+ this._super();
+
+ if ( this.alphaOptions.alphaEnabled ) {
+ // Create Alpha controls
+ var self = this,
+ stripAlpha = self.controls.strip.clone(false, false),
+ stripAlphaSlider = stripAlpha.find( '.iris-slider-offset' ),
+ controls = {
+ stripAlpha : stripAlpha,
+ stripAlphaSlider : stripAlphaSlider
+ };
+
+ stripAlpha.addClass( 'iris-strip-alpha' );
+ stripAlphaSlider.addClass( 'iris-slider-offset-alpha' );
+ stripAlpha.appendTo( self.picker.find( '.iris-picker-inner' ) );
+
+ // Push new controls
+ $.each( controls, function( k, v ) {
+ self.controls[k] = v;
+ } );
+
+ // Create slider
+ self.controls.stripAlphaSlider.slider( {
+ orientation : 'vertical',
+ min : 0,
+ max : 100,
+ step : 1,
+ value : parseInt( self._color._alpha * 100 ),
+ slide : function( event, ui ) {
+ self.active = 'strip';
+ // Update alpha value
+ self._color._alpha = parseFloat( ui.value / 100 );
+ self._change.apply( self, arguments );
+ }
+ } );
+ }
+ },
+ /**
+ * Create the controls sizes
+ *
+ * @since 3.0.0
+ * @access private
+ *
+ * @param {bool} reset Set to True for recreate the controls sizes.
+ *
+ * @return {void}
+ */
+ _dimensions: function( reset ) {
+ this._super( reset );
+
+ if ( this.alphaOptions.alphaEnabled ) {
+ var self = this,
+ opts = self.options,
+ controls = self.controls,
+ square = controls.square,
+ strip = self.picker.find( '.iris-strip' ),
+ innerWidth, squareWidth, stripWidth, stripMargin, totalWidth;
+
+ /**
+ * I use Math.round() to avoid possible size errors,
+ * this function returns the value of a number rounded
+ * to the nearest integer.
+ *
+ * The width to append all widgets,
+ * if border is enabled, 22 is subtracted.
+ * 20 for css left and right property
+ * 2 for css border
+ */
+ innerWidth = Math.round( self.picker.outerWidth( true ) - ( opts.border ? 22 : 0 ) );
+ // The width of the draggable, aka square.
+ squareWidth = Math.round( square.outerWidth() );
+ // The width for the sliders
+ stripWidth = Math.round( ( innerWidth - squareWidth ) / 2 );
+ // The margin for the sliders
+ stripMargin = Math.round( stripWidth / 2 );
+ // The total width of the elements.
+ totalWidth = Math.round( squareWidth + ( stripWidth * 2 ) + ( stripMargin * 2 ) );
+
+ // Check and change if necessary.
+ while ( totalWidth > innerWidth ) {
+ stripWidth = Math.round( stripWidth - 2 );
+ stripMargin = Math.round( stripMargin - 1 );
+ totalWidth = Math.round( squareWidth + ( stripWidth * 2 ) + ( stripMargin * 2 ) );
+ }
+
+
+ square.css( 'margin', '0' );
+ strip.width( stripWidth ).css( 'margin-left', stripMargin + 'px' );
+ }
+ },
+ /**
+ * Callback to update the controls and the current color.
+ *
+ * @since 3.0.0
+ * @access private
+ *
+ * @return {void}
+ */
+ _change: function() {
+ var self = this,
+ active = self.active;
+
+ self._super();
+
+ if ( self.alphaOptions.alphaEnabled ) {
+ var controls = self.controls,
+ alpha = parseInt( self._color._alpha * 100 ),
+ color = self._color.toRgb(),
+ gradient = [
+ 'rgb(' + color.r + ',' + color.g + ',' + color.b + ') 0%',
+ 'rgba(' + color.r + ',' + color.g + ',' + color.b + ', 0) 100%'
+ ],
+ target = self.picker.closest( '.wp-picker-container' ).find( '.wp-color-result' );
+
+ self.options.color = self._getColor();
+ // Generate background slider alpha, only for CSS3.
+ controls.stripAlpha.css( { 'background' : 'linear-gradient(to bottom, ' + gradient.join( ', ' ) + '), url(' + backgroundImage + ')' } );
+ // Update alpha value
+ if ( active ) {
+ controls.stripAlphaSlider.slider( 'value', alpha );
+ }
+
+ if ( ! self._color.error ) {
+ self.element.removeClass( 'iris-error' ).val( self.options.color );
+ }
+
+ self.picker.find( '.iris-palette-container' ).on( 'click.palette', '.iris-palette', function() {
+ var color = $( this ).data( 'color' );
+ if ( self.alphaOptions.alphaReset ) {
+ self._color._alpha = 1;
+ color = self._getColor();
+ }
+ self._setOption( 'color', color );
+ } );
+ }
+ },
+ /**
+ * Paint dimensions.
+ *
+ * @since 3.0.0
+ * @access private
+ *
+ * @param {string} origin Origin (position).
+ * @param {string} control Type of the control,
+ *
+ * @return {void}
+ */
+ _paintDimension: function( origin, control ) {
+ var self = this,
+ color = false;
+
+ // Fix for slider hue opacity.
+ if ( self.alphaOptions.alphaEnabled && 'strip' === control ) {
+ color = self._color;
+ self._color = new Color( color.toString() );
+ self.hue = self._color.h();
+ }
+
+ self._super( origin, control );
+
+ // Restore the color after paint.
+ if ( color ) {
+ self._color = color;
+ }
+ },
+ /**
+ * To update the options, see original source to view the available options.
+ *
+ * @since 3.0.0
+ *
+ * @param {string} key The Option name.
+ * @param {mixed} value The Option value to update.
+ *
+ * @return {void}
+ */
+ _setOption: function( key, value ) {
+ var self = this;
+ if ( 'color' === key && self.alphaOptions.alphaEnabled ) {
+ // cast to string in case we have a number
+ value = '' + value;
+ newColor = new Color( value ).setHSpace( self.options.mode );
+ // Check if error && Check the color to prevent callbacks with the same color.
+ if ( ! newColor.error && self._getColor( newColor ) !== self._getColor() ) {
+ self._color = newColor;
+ self.options.color = self._getColor();
+ self.active = 'external';
+ self._change();
+ }
+ } else {
+ return self._super( key, value );
+ }
+ },
+ /**
+ * Returns the iris object if no new color is provided. If a new color is provided, it sets the new color.
+ *
+ * @param newColor {string|*} The new color to use. Can be undefined.
+ *
+ * @since 3.0.0
+ *
+ * @return {string} The element's color.
+ */
+ color: function( newColor ) {
+ if ( newColor === true ) {
+ return this._color.clone();
+ }
+ if ( newColor === undef ) {
+ return this._getColor();
+ }
+ this.option( 'color', newColor );
+ },
+ } );
+
+ /**
+ * wpColorPicker
+ */
+ $.widget( 'wp.wpColorPicker', $.wp.wpColorPicker, {
+ /**
+ * Alpha options
+ *
+ * @since 3.0.0
+ *
+ * @type {Object}
+ */
+ alphaOptions: {
+ alphaEnabled: false,
+ },
+ /**
+ * Get the alpha options.
+ *
+ * @since 3.0.0
+ * @access private
+ *
+ * @return {object} The current alpha options.
+ */
+ _getAlphaOptions: function() {
+ var el = this.element,
+ type = ( el.data( 'type' ) || this.options.type ),
+ color = ( el.data( 'defaultColor' ) || el.val() ),
+ options = {
+ alphaEnabled: ( el.data( 'alphaEnabled' ) || false ),
+ alphaCustomWidth: 130,
+ alphaReset: false,
+ alphaColorType: 'rgb',
+ alphaColorWithSpace: false,
+ };
+
+ if ( options.alphaEnabled ) {
+ options.alphaEnabled = ( el.is( 'input' ) && 'full' === type );
+ }
+
+ if ( ! options.alphaEnabled ) {
+ return options;
+ }
+
+ options.alphaColorWithSpace = ( color && color.match( /\s/ ) );
+
+ $.each( options, function( name, defaultValue ) {
+ var value = ( el.data( name ) || defaultValue );
+ switch ( name ) {
+ case 'alphaCustomWidth':
+ value = ( value ? parseInt( value, 10 ) : 0 );
+ value = ( isNaN( value ) ? defaultValue : value );
+ break;
+ case 'alphaColorType':
+ if ( ! value.match( /^(hex|(rgb|hsl)a?)$/ ) ) {
+ if ( color && color.match( /^#/ ) ) {
+ value = 'hex';
+ } else if ( color && color.match( /^hsla?/ ) ) {
+ value = 'hsl';
+ } else {
+ value = defaultValue;
+ }
+ }
+ break;
+ default:
+ value = !!value;
+ break;
+ }
+ options[name] = value;
+ } );
+
+ return options;
+ },
+ /**
+ * Create widget
+ *
+ * @since 3.0.0
+ * @access private
+ *
+ * @return {void}
+ */
+ _create: function() {
+ // Return early if Iris support is missing.
+ if ( ! $.support.iris ) {
+ return;
+ }
+
+ // Set the alpha options for the current instance.
+ this.alphaOptions = this._getAlphaOptions();
+
+ // Create widget.
+ this._super();
+ },
+ /**
+ * Binds event listeners to the color picker and create options, etc...
+ *
+ * @since 3.0.0
+ * @access private
+ *
+ * @return {void}
+ */
+ _addListeners: function() {
+ if ( ! this.alphaOptions.alphaEnabled ) {
+ return this._super();
+ }
+
+ var self = this,
+ el = self.element,
+ isDeprecated = self.toggler.is( 'a' );
+
+ this.alphaOptions.defaultWidth = el.width();
+ if ( this.alphaOptions.alphaCustomWidth ) {
+ el.width( parseInt( this.alphaOptions.defaultWidth + this.alphaOptions.alphaCustomWidth, 10 ) );
+ }
+
+ self.toggler.css( {
+ 'position': 'relative',
+ 'background-image' : 'url(' + backgroundImage + ')'
+ } );
+
+ if ( isDeprecated ) {
+ self.toggler.html( '' );
+ } else {
+ self.toggler.append( '' );
+ }
+
+ self.colorAlpha = self.toggler.find( 'span.color-alpha' ).css( {
+ 'width' : '30px',
+ 'height' : '100%',
+ 'position' : 'absolute',
+ 'top' : 0,
+ 'background-color' : el.val(),
+ } );
+
+ // Define the correct position for ltr or rtl direction.
+ if ( 'ltr' === self.colorAlpha.css( 'direction' ) ) {
+ self.colorAlpha.css( {
+ 'border-bottom-left-radius' : '2px',
+ 'border-top-left-radius' : '2px',
+ 'left' : 0
+ } );
+ } else {
+ self.colorAlpha.css( {
+ 'border-bottom-right-radius' : '2px',
+ 'border-top-right-radius' : '2px',
+ 'right' : 0
+ } );
+ }
+
+
+ el.iris( {
+ /**
+ * @summary Handles the onChange event if one has been defined in the options.
+ *
+ * Handles the onChange event if one has been defined in the options and additionally
+ * sets the background color for the toggler element.
+ *
+ * @since 3.0.0
+ *
+ * @param {Event} event The event that's being called.
+ * @param {HTMLElement} ui The HTMLElement containing the color picker.
+ *
+ * @returns {void}
+ */
+ change: function( event, ui ) {
+ self.colorAlpha.css( { 'background-color': ui.color.to_s( self.alphaOptions.alphaColorType ) } );
+
+ // fire change callback if we have one
+ if ( $.isFunction( self.options.change ) ) {
+ self.options.change.call( this, event, ui );
+ }
+ }
+ } );
+
+
+ /**
+ * Prevent any clicks inside this widget from leaking to the top and closing it.
+ *
+ * @since 3.0.0
+ *
+ * @param {Event} event The event that's being called.
+ *
+ * @return {void}
+ */
+ self.wrap.on( 'click.wpcolorpicker', function( event ) {
+ event.stopPropagation();
+ });
+
+ /**
+ * Open or close the color picker depending on the class.
+ *
+ * @since 3.0.0
+ */
+ self.toggler.click( function() {
+ if ( self.toggler.hasClass( 'wp-picker-open' ) ) {
+ self.close();
+ } else {
+ self.open();
+ }
+ });
+
+ /**
+ * Checks if value is empty when changing the color in the color picker.
+ * If so, the background color is cleared.
+ *
+ * @since 3.0.0
+ *
+ * @param {Event} event The event that's being called.
+ *
+ * @return {void}
+ */
+ el.change( function( event ) {
+ var val = $( this ).val();
+
+ if ( el.hasClass( 'iris-error' ) || val === '' || val.match( /^(#|(rgb|hsl)a?)$/ ) ) {
+ if ( isDeprecated ) {
+ self.toggler.removeAttr( 'style' );
+ }
+
+ self.colorAlpha.css( 'background-color', '' );
+
+ // fire clear callback if we have one
+ if ( $.isFunction( self.options.clear ) ) {
+ self.options.clear.call( this, event );
+ }
+ }
+ } );
+
+ /**
+ * Enables the user to either clear the color in the color picker or revert back to the default color.
+ *
+ * @since 3.0.0
+ *
+ * @param {Event} event The event that's being called.
+ *
+ * @return {void}
+ */
+ self.button.click( function( event ) {
+ if ( $( this ).hasClass( 'wp-picker-default' ) ) {
+ el.val( self.options.defaultColor ).change();
+ } else if ( $( this ).hasClass( 'wp-picker-clear' ) ) {
+ el.val( '' );
+ if ( isDeprecated ) {
+ self.toggler.removeAttr( 'style' );
+ }
+
+ self.colorAlpha.css( 'background-color', '' );
+
+ // fire clear callback if we have one
+ if ( $.isFunction( self.options.clear ) ) {
+ self.options.clear.call( this, event );
+ }
+
+ el.trigger( 'change' );
+ }
+ } );
+ },
+ } );
+} ( jQuery ) );
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/alpha-color-picker/wp-color-picker-alpha.min.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/alpha-color-picker/wp-color-picker-alpha.min.js
new file mode 100644
index 00000000..fde8c833
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/alpha-color-picker/wp-color-picker-alpha.min.js
@@ -0,0 +1,11 @@
+/**!
+ * wp-color-picker-alpha
+ *
+ * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
+ * Only run in input and is defined data alpha in true
+ *
+ * Version: 3.0.0
+ * https://github.com/kallookoo/wp-color-picker-alpha
+ * Licensed under the GPLv2 license or later.
+ */
+!function(e,a){var l,o={version:300};if("wpColorPickerAlpha"in window&&"version"in window.wpColorPickerAlpha){var t=parseInt(window.wpColorPickerAlpha.version,10);if(!isNaN(t)&&o.version<=t)return}Color.fn.hasOwnProperty("to_s")||(Color.fn.to_s=function(o){"hex"===(o=o||"hex")&&this._alpha<1&&(o="rgba");var a="";return"hex"===o?a=this.toString():this.error||(a=this.toCSS(o).replace(/\(\s+/,"(").replace(/\s+\)/,")")),a},window.wpColorPickerAlpha=o,l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",e.widget("a8c.iris",e.a8c.iris,{alphaOptions:{alphaEnabled:!1},_getColor:function(o){return o===a&&(o=this._color),this.alphaOptions.alphaEnabled?(o=o.to_s(this.alphaOptions.alphaColorType),this.alphaOptions.alphaColorWithSpace||(o=o.replace(/\s+/g,"")),o):o.toString()},_create:function(){try{this.alphaOptions=this.element.wpColorPicker("instance").alphaOptions}catch(o){}e.extend({},this.alphaOptions,{alphaEnabled:!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"hex",alphaColorWithSpace:!1}),this._super()},_addInputListeners:function(i){function o(o){var a=i.val(),t=new Color(a),a=a.replace(/^(#|(rgb|hsl)a?)/,""),r=l.alphaOptions.alphaColorType;i.removeClass("iris-error"),t.error?""!==a&&i.addClass("iris-error"):"hex"===r&&"keyup"===o.type&&a.match(/^[0-9a-fA-F]{3}$/)||t.toIEOctoHex()!==l._color.toIEOctoHex()&&l._setOption("color",l._getColor(t))}var l=this;i.on("change",o).on("keyup",l._debounce(o,100)),l.options.hide&&i.one("focus",function(){l.show()})},_initControls:function(){var t,o,a,r;this._super(),this.alphaOptions.alphaEnabled&&(a=(o=(t=this).controls.strip.clone(!1,!1)).find(".iris-slider-offset"),r={stripAlpha:o,stripAlphaSlider:a},o.addClass("iris-strip-alpha"),a.addClass("iris-slider-offset-alpha"),o.appendTo(t.picker.find(".iris-picker-inner")),e.each(r,function(o,a){t.controls[o]=a}),t.controls.stripAlphaSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,a){t.active="strip",t._color._alpha=parseFloat(a.value/100),t._change.apply(t,arguments)}}))},_dimensions:function(o){if(this._super(o),this.alphaOptions.alphaEnabled){for(var a=this,t=a.options,r=a.controls.square,o=a.picker.find(".iris-strip"),i=Math.round(a.picker.outerWidth(!0)-(t.border?22:0)),l=Math.round(r.outerWidth()),e=Math.round((i-l)/2),s=Math.round(e/2),n=Math.round(l+2*e+2*s);i'):t.toggler.append(''),t.colorAlpha=t.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,"background-color":r.val()}),"ltr"===t.colorAlpha.css("direction")?t.colorAlpha.css({"border-bottom-left-radius":"2px","border-top-left-radius":"2px",left:0}):t.colorAlpha.css({"border-bottom-right-radius":"2px","border-top-right-radius":"2px",right:0}),r.iris({change:function(o,a){t.colorAlpha.css({"background-color":a.color.to_s(t.alphaOptions.alphaColorType)}),e.isFunction(t.options.change)&&t.options.change.call(this,o,a)}}),t.wrap.on("click.wpcolorpicker",function(o){o.stopPropagation()}),t.toggler.click(function(){t.toggler.hasClass("wp-picker-open")?t.close():t.open()}),r.change(function(o){var a=e(this).val();(r.hasClass("iris-error")||""===a||a.match(/^(#|(rgb|hsl)a?)$/))&&(i&&t.toggler.removeAttr("style"),t.colorAlpha.css("background-color",""),e.isFunction(t.options.clear)&&t.options.clear.call(this,o))}),t.button.click(function(o){e(this).hasClass("wp-picker-default")?r.val(t.options.defaultColor).change():e(this).hasClass("wp-picker-clear")&&(r.val(""),i&&t.toggler.removeAttr("style"),t.colorAlpha.css("background-color",""),e.isFunction(t.options.clear)&&t.options.clear.call(this,o),r.trigger("change"))})}}))}(jQuery);
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/class-make-css.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/class-make-css.php
new file mode 100644
index 00000000..19876b27
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/class-make-css.php
@@ -0,0 +1,202 @@
+_selector !== '' ){
+ $this->add_selector_rules_to_output();
+ }
+ $this->_selector = $selector;
+ return $this;
+ }
+
+ /**
+ * Adds a css property with value to the css output
+ *
+ * @access public
+ * @since 1.0
+ *
+ * @param string $property - the css property
+ * @param string $value - the value to be placed with the property
+ * @param string $og_default - check to see if the value matches the default
+ * @param string $unit - the unit for the value (px)
+ * @return $this
+ */
+ public function add_property( $property, $value, $og_default = false, $unit = false ) {
+ // Add our unit to our value if it exists
+ if ( $unit && '' !== $unit ) {
+ $value = $value . $unit;
+ if ( '' !== $og_default ) {
+ $og_default = $og_default . $unit;
+ }
+ }
+
+ // If we don't have a value or our value is the same as our og default, bail
+ if ( empty( $value ) || $og_default == $value )
+ return false;
+
+ $this->_css .= $property . ':' . $value . ';';
+ return $this;
+ }
+
+ /**
+ * Sets a media query in the class
+ *
+ * @since 1.1
+ * @param string $value
+ * @return $this
+ */
+ public function start_media_query( $value ) {
+ // Add the current rules to the output
+ $this->add_selector_rules_to_output();
+
+ // Add any previous media queries to the output
+ if ( ! empty( $this->_media_query ) ) {
+ $this->add_media_query_rules_to_output();
+ }
+
+ // Set the new media query
+ $this->_media_query = $value;
+ return $this;
+ }
+
+ /**
+ * Stops using a media query.
+ *
+ * @see start_media_query()
+ *
+ * @since 1.1
+ * @return $this
+ */
+ public function stop_media_query() {
+ return $this->start_media_query( null );
+ }
+
+ /**
+ * Adds the current media query's rules to the class' output variable
+ *
+ * @since 1.1
+ * @return $this
+ */
+ private function add_media_query_rules_to_output() {
+ if( !empty( $this->_media_query_output ) ) {
+ $this->_output .= sprintf( '@media %1$s{%2$s}', $this->_media_query, $this->_media_query_output );
+
+ // Reset the media query output string
+ $this->_media_query_output = '';
+ }
+ return $this;
+ }
+
+ /**
+ * Adds the current selector rules to the output variable
+ *
+ * @access private
+ * @since 1.0
+ *
+ * @return $this
+ */
+ private function add_selector_rules_to_output() {
+ if( !empty( $this->_css ) ) {
+ $this->_selector_output = $this->_selector;
+ $selector_output = sprintf( '%1$s{%2$s}', $this->_selector_output, $this->_css );
+
+ // Add our CSS to the output
+ if ( ! empty( $this->_media_query ) ) {
+ $this->_media_query_output .= $selector_output;
+ $this->_css = '';
+ } else {
+ $this->_output .= $selector_output;
+ }
+
+ // Reset the css
+ $this->_css = '';
+ }
+
+ return $this;
+ }
+
+ /**
+ * Returns the minified css in the $_output variable
+ *
+ * @access public
+ * @since 1.0
+ *
+ * @return string
+ */
+ public function css_output()
+ {
+ // Add current selector's rules to output
+ $this->add_selector_rules_to_output();
+
+ // Output minified css
+ return $this->_output;
+ }
+
+}
+endif;
diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/class-plugin-updater.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/class-plugin-updater.php
new file mode 100644
index 00000000..42fb1e09
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/class-plugin-updater.php
@@ -0,0 +1,676 @@
+api_url = trailingslashit( $_api_url );
+ $this->api_data = $_api_data;
+ $this->plugin_file = $_plugin_file;
+ $this->name = plugin_basename( $_plugin_file );
+ $this->slug = basename( $_plugin_file, '.php' );
+ $this->version = $_api_data['version'];
+ $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
+ $this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
+ $this->failed_request_cache_key = 'edd_sl_failed_http_' . md5( $this->api_url );
+
+ $edd_plugin_data[ $this->slug ] = $this->api_data;
+
+ /**
+ * Fires after the $edd_plugin_data is setup.
+ *
+ * @since x.x.x
+ *
+ * @param array $edd_plugin_data Array of EDD SL plugin data.
+ */
+ do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data );
+
+ // Set up hooks.
+ $this->init();
+
+ }
+
+ /**
+ * Set up WordPress filters to hook into WP's update process.
+ *
+ * @uses add_filter()
+ *
+ * @return void
+ */
+ public function init() {
+
+ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
+ add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
+ add_action( 'after_plugin_row', array( $this, 'show_update_notification' ), 10, 2 );
+ add_action( 'admin_init', array( $this, 'show_changelog' ) );
+
+ }
+
+ /**
+ * Check for Updates at the defined API endpoint and modify the update array.
+ *
+ * This function dives into the update API just when WordPress creates its update array,
+ * then adds a custom API call and injects the custom plugin data retrieved from the API.
+ * It is reassembled from parts of the native WordPress plugin update code.
+ * See wp-includes/update.php line 121 for the original wp_update_plugins() function.
+ *
+ * @uses api_request()
+ *
+ * @param array $_transient_data Update array build by WordPress.
+ * @return array Modified update array with custom plugin data.
+ */
+ public function check_update( $_transient_data ) {
+
+ global $pagenow;
+
+ if ( ! is_object( $_transient_data ) ) {
+ $_transient_data = new stdClass();
+ }
+
+ if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
+ return $_transient_data;
+ }
+
+ $current = $this->get_repo_api_data();
+ if ( false !== $current && is_object( $current ) && isset( $current->new_version ) ) {
+ if ( version_compare( $this->version, $current->new_version, '<' ) ) {
+ $_transient_data->response[ $this->name ] = $current;
+ } else {
+ // Populating the no_update information is required to support auto-updates in WordPress 5.5.
+ $_transient_data->no_update[ $this->name ] = $current;
+ }
+ }
+ $_transient_data->last_checked = time();
+ $_transient_data->checked[ $this->name ] = $this->version;
+
+ return $_transient_data;
+ }
+
+ /**
+ * Get repo API data from store.
+ * Save to cache.
+ *
+ * @return \stdClass
+ */
+ public function get_repo_api_data() {
+ $version_info = $this->get_cached_version_info();
+
+ if ( false === $version_info ) {
+ $version_info = $this->api_request(
+ 'plugin_latest_version',
+ array(
+ 'slug' => $this->slug,
+ 'beta' => $this->beta,
+ )
+ );
+ if ( ! $version_info ) {
+ return false;
+ }
+
+ // This is required for your plugin to support auto-updates in WordPress 5.5.
+ $version_info->plugin = $this->name;
+ $version_info->id = $this->name;
+ $version_info->tested = $this->get_tested_version( $version_info );
+
+ $this->set_version_info_cache( $version_info );
+ }
+
+ return $version_info;
+ }
+
+ /**
+ * Gets the plugin's tested version.
+ *
+ * @since 1.9.2
+ * @param object $version_info
+ * @return null|string
+ */
+ private function get_tested_version( $version_info ) {
+
+ // There is no tested version.
+ if ( empty( $version_info->tested ) ) {
+ return null;
+ }
+
+ // Strip off extra version data so the result is x.y or x.y.z.
+ list( $current_wp_version ) = explode( '-', get_bloginfo( 'version' ) );
+
+ // The tested version is greater than or equal to the current WP version, no need to do anything.
+ if ( version_compare( $version_info->tested, $current_wp_version, '>=' ) ) {
+ return $version_info->tested;
+ }
+ $current_version_parts = explode( '.', $current_wp_version );
+ $tested_parts = explode( '.', $version_info->tested );
+
+ // The current WordPress version is x.y.z, so update the tested version to match it.
+ if ( isset( $current_version_parts[2] ) && $current_version_parts[0] === $tested_parts[0] && $current_version_parts[1] === $tested_parts[1] ) {
+ $tested_parts[2] = $current_version_parts[2];
+ }
+
+ return implode( '.', $tested_parts );
+ }
+
+ /**
+ * Show the update notification on multisite subsites.
+ *
+ * @param string $file
+ * @param array $plugin
+ */
+ public function show_update_notification( $file, $plugin ) {
+
+ // Return early if in the network admin, or if this is not a multisite install.
+ if ( is_network_admin() || ! is_multisite() ) {
+ return;
+ }
+
+ // Allow single site admins to see that an update is available.
+ if ( ! current_user_can( 'activate_plugins' ) ) {
+ return;
+ }
+
+ if ( $this->name !== $file ) {
+ return;
+ }
+
+ // Do not print any message if update does not exist.
+ $update_cache = get_site_transient( 'update_plugins' );
+
+ if ( ! isset( $update_cache->response[ $this->name ] ) ) {
+ if ( ! is_object( $update_cache ) ) {
+ $update_cache = new stdClass();
+ }
+ $update_cache->response[ $this->name ] = $this->get_repo_api_data();
+ }
+
+ // Return early if this plugin isn't in the transient->response or if the site is running the current or newer version of the plugin.
+ if ( empty( $update_cache->response[ $this->name ] ) || version_compare( $this->version, $update_cache->response[ $this->name ]->new_version, '>=' ) ) {
+ return;
+ }
+
+ printf(
+ '
')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n×');a.StoreData(i[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(i)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(i,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=i('');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),t.on("open",function(){i.$search.attr("aria-controls",r),i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(){i._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected(function(){e.call(i,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var i=this;this.current(function(e){var t=null!=e?e.length:0;0=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.attr("aria-controls",r),i.$search.trigger("focus"),window.setTimeout(function(){i.$search.trigger("focus")},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.val(""),i.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||i.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n(''),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f(""),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,r="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(i,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(i+" "+r+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ar.bottom+s,d={left:r.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(i="below"),u||!c||t?!c&&u&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.top=o.top-h.top-s),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("select2/compat/utils",["jquery"],function(s){return{syncCssClasses:function(e,t,n){var i,r,o=[];(i=s.trim(e.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&o.push(this)}),(i=s.trim(t.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(r=n(this))&&o.push(r)}),e.attr("class",o.join(" "))}}}),e.define("select2/compat/containerCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("containerCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptContainerCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var o=this.options.get("containerCss")||{};return s.isFunction(o)&&(o=o(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(o),t.addClass(n),t},e}),e.define("select2/compat/dropdownCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptDropdownCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var o=this.options.get("dropdownCss")||{};return s.isFunction(o)&&(o=o(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(o),t.addClass(n),t},e}),e.define("select2/compat/initSelection",["jquery"],function(i){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return e.prototype.current=function(e,t){var n=this;this._isInitialized?e.call(this,t):this.initSelection.call(null,this.$element,function(e){n._isInitialized=!0,i.isArray(e)||(e=[e]),t(e)})},e}),e.define("select2/compat/inputData",["jquery","../utils"],function(s,i){function e(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `
+ Safe mode because we noticed this is an exact copy of %3$s.', 'jetpack-idc' ),
+ esc_url( self::get_safe_mod_doc_url() ),
+ esc_url( self::$wpcom_home_url ),
+ self::prepare_url_for_display( esc_url_raw( self::$wpcom_home_url ) )
+ ),
+ array( 'a' => array( 'href' => array() ) )
+ );
+
+ /**
+ * Allows overriding of the default header text in the first step of the Safe Mode notice.
+ *
+ * @param string $html The HTML to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_first_step_header_lead', $html );
+ }
+
+ /**
+ * Returns the first step header explanation.
+ *
+ * @return string
+ */
+ public function get_first_step_header_explanation() {
+ $html = wp_kses(
+ sprintf(
+ /* translators: %s: Safe mode docs URL. */
+ __( 'Please confirm Safe Mode or fix the Jetpack connection. Select one of the options below or learn more about Safe Mode.', 'jetpack-idc' ),
+ esc_url( self::get_safe_mod_doc_url() )
+ ),
+ array( 'a' => array( 'href' => array() ) )
+ );
+
+ /**
+ * Allows overriding of the default header explanation text in the first step of the Safe Mode notice.
+ *
+ * @param string $html The HTML to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_first_step_header_explanation', $html );
+ }
+
+ /**
+ * Returns the confirm safe mode explanation.
+ *
+ * @return string
+ */
+ public function get_confirm_safe_mode_action_explanation() {
+ $html = wp_kses(
+ sprintf(
+ /* translators: %s: Site URL. */
+ __( 'Is this website a temporary duplicate of %2$s for the purposes of testing, staging or development? If so, we recommend keeping it in Safe Mode.', 'jetpack-idc' ),
+ esc_url( untrailingslashit( self::$wpcom_home_url ) ),
+ self::prepare_url_for_display( esc_url( self::$wpcom_home_url ) )
+ ),
+ array( 'a' => array( 'href' => array() ) )
+ );
+
+ /**
+ * Allows overriding of the default text used to explain the confirm safe mode action.
+ *
+ * @param string $html The HTML to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_confirm_safe_mode_explanation', $html );
+ }
+
+ /**
+ * Returns the confirm safe mode button text.
+ *
+ * @return string
+ */
+ public function get_confirm_safe_mode_button_text() {
+ $string = esc_html__( 'Confirm Safe Mode', 'jetpack-idc' );
+
+ /**
+ * Allows overriding of the default text used for the confirm safe mode action button.
+ *
+ * @param string $string The string to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_confirm_safe_mode_button_text', $string );
+ }
+
+ /**
+ * Returns the first step fix connection action explanation.
+ *
+ * @return string
+ */
+ public function get_first_step_fix_connection_action_explanation() {
+ $html = wp_kses(
+ sprintf(
+ /* translators: %s: Site URL. */
+ __( 'If this is a separate and new website, or the new home of %2$s, we recommend turning Safe Mode off, and re-establishing your connection to WordPress.com.', 'jetpack-idc' ),
+ esc_url( untrailingslashit( self::$wpcom_home_url ) ),
+ self::prepare_url_for_display( esc_url( self::$wpcom_home_url ) )
+ ),
+ array( 'a' => array( 'href' => array() ) )
+ );
+
+ /**
+ * Allows overriding of the default text used to explain the fix Jetpack connection action.
+ *
+ * @param string $html The HTML to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_first_fix_connection_explanation', $html );
+ }
+
+ /**
+ * Returns the first step fix connection button text.
+ *
+ * @return string
+ */
+ public function get_first_step_fix_connection_button_text() {
+ $string = esc_html__( "Fix Jetpack's Connection", 'jetpack-idc' );
+
+ /**
+ * Allows overriding of the default text used for the fix Jetpack connection action button.
+ *
+ * @param string $string The string to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_first_step_fix_connection_button_text', $string );
+ }
+
+ /**
+ * Returns the second step header lead.
+ *
+ * @return string
+ */
+ public function get_second_step_header_lead() {
+ $string = sprintf(
+ /* translators: %s: Site URL. */
+ esc_html__( 'Is %1$s the new home of %2$s?', 'jetpack-idc' ),
+ untrailingslashit( self::normalize_url_protocol_agnostic( get_home_url() ) ),
+ untrailingslashit( self::normalize_url_protocol_agnostic( esc_url_raw( self::$wpcom_home_url ) ) )
+ );
+
+ /**
+ * Allows overriding of the default header text in the second step of the Safe Mode notice.
+ *
+ * @param string $html The HTML to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_second_step_header_lead', $string );
+ }
+
+ /**
+ * Returns the site action explanation.
+ *
+ * @return string
+ */
+ public function get_migrate_site_action_explanation() {
+ $html = wp_kses(
+ sprintf(
+ /* translators: %s: Site URL. */
+ __( 'Yes. %2$s is replacing %4$s. I would like to migrate my stats and subscribers from %4$s to %2$s.', 'jetpack-idc' ),
+ esc_url( get_home_url() ),
+ self::prepare_url_for_display( get_home_url() ),
+ esc_url( self::$wpcom_home_url ),
+ untrailingslashit( self::normalize_url_protocol_agnostic( esc_url_raw( self::$wpcom_home_url ) ) )
+ ),
+ array( 'a' => array( 'href' => array() ) )
+ );
+
+ /**
+ * Allows overriding of the default text for explaining the migrate site action.
+ *
+ * @param string $html The HTML to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_migrate_site_explanation', $html );
+ }
+
+ /**
+ * Returns the migrate site button text.
+ *
+ * @return string
+ */
+ public function get_migrate_site_button_text() {
+ $string = esc_html__( 'Migrate Stats & Subscribers', 'jetpack-idc' );
+
+ /**
+ * Allows overriding of the default text used for the migrate site action button.
+ *
+ * @param string $string The string to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_migrate_site_button_text', $string );
+ }
+
+ /**
+ * Returns the start fresh explanation.
+ *
+ * @return string
+ */
+ public function get_start_fresh_action_explanation() {
+ $html = wp_kses(
+ sprintf(
+ /* translators: %s: Site URL. */
+ __( 'No. %2$s is a new and different website that\'s separate from %4$s. It requires a new connection to WordPress.com for new stats and subscribers.', 'jetpack-idc' ),
+ esc_url( get_home_url() ),
+ self::prepare_url_for_display( get_home_url() ),
+ esc_url( self::$wpcom_home_url ),
+ untrailingslashit( self::normalize_url_protocol_agnostic( esc_url_raw( self::$wpcom_home_url ) ) )
+ ),
+ array( 'a' => array( 'href' => array() ) )
+ );
+
+ /**
+ * Allows overriding of the default text for explaining the start fresh action.
+ *
+ * @param string $html The HTML to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_start_fresh_explanation', $html );
+ }
+
+ /**
+ * Returns the start fresh button text.
+ *
+ * @return string
+ */
+ public function get_start_fresh_button_text() {
+ $string = esc_html__( 'Start Fresh & Create New Connection', 'jetpack-idc' );
+
+ /**
+ * Allows overriding of the default text used for the start fresh action button.
+ *
+ * @param string $string The string to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_start_fresh_button_text', $string );
+ }
+
+ /**
+ * Returns the unsure prompt text.
+ *
+ * @return string
+ */
+ public function get_unsure_prompt() {
+ $html = wp_kses(
+ sprintf(
+ /* translators: %s: Safe mode docs URL. */
+ __( 'Unsure what to do? Read more about Jetpack Safe Mode', 'jetpack-idc' ),
+ esc_url( self::get_safe_mod_doc_url() )
+ ),
+ array( 'a' => array( 'href' => array() ) )
+ );
+
+ /**
+ * Allows overriding of the default text using in the "Unsure what to do?" prompt.
+ *
+ * @param string $html The HTML to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_unsure_prompt', $html );
+ }
+
+ /**
+ * Returns the non-admin notice text.
+ *
+ * @return string
+ * @deprecated 0.5.0 Use `@automattic/jetpack-idc` instead.
+ */
+ public function get_non_admin_notice_text() {
+ _deprecated_function( __METHOD__, '0.5.0' );
+
+ $html = wp_kses(
+ sprintf(
+ /* translators: %s: Safe mode docs URL. */
+ __( 'Jetpack has been placed into Safe Mode. Learn more about Safe Mode.', 'jetpack-idc' ),
+ esc_url( self::get_safe_mod_doc_url() )
+ ),
+ array( 'a' => array( 'href' => array() ) )
+ );
+
+ /**
+ * Allows overriding of the default text that is displayed to non-admin on the Jetpack admin page.
+ *
+ * @param string $html The HTML to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_non_admin_notice_text', $html );
+ }
+
+ /**
+ * Returns the non-admin contact admin text.
+ *
+ * @return string
+ * @deprecated 0.5.0 Use `@automattic/jetpack-idc` instead.
+ */
+ public function get_non_admin_contact_admin_text() {
+ _deprecated_function( __METHOD__, '0.5.0' );
+
+ $string = esc_html__( 'An administrator of this site can take Jetpack out of Safe Mode.', 'jetpack-idc' );
+
+ /**
+ * Allows overriding of the default text that is displayed to non-admins prompting them to contact an admin.
+ *
+ * @param string $string The string to be displayed.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ */
+ return apply_filters( 'jetpack_idc_non_admin_contact_admin_text', $string );
+ }
+
+ /**
+ * Whether the site is undergoing identity crisis.
+ *
+ * @return bool
+ */
+ public static function has_identity_crisis() {
+ return false !== static::check_identity_crisis() && ! static::$is_safe_mode_confirmed;
+ }
+
+ /**
+ * Whether an admin has confirmed safe mode.
+ * Unlike `static::$is_safe_mode_confirmed` this function always returns the actual flag value.
+ *
+ * @return bool
+ */
+ public static function safe_mode_is_confirmed() {
+ return Jetpack_Options::get_option( 'safe_mode_confirmed' );
+ }
+
+ /**
+ * Returns the mismatched URLs.
+ *
+ * @return array|bool The mismatched urls, or false if the site is not connected, offline, in safe mode, or the IDC error is not valid.
+ */
+ public static function get_mismatched_urls() {
+ if ( ! static::has_identity_crisis() ) {
+ return false;
+ }
+
+ $data = static::check_identity_crisis();
+
+ if ( ! $data ||
+ ! isset( $data['error_code'] ) ||
+ ! isset( $data['wpcom_home'] ) ||
+ ! isset( $data['home'] ) ||
+ ! isset( $data['wpcom_siteurl'] ) ||
+ ! isset( $data['siteurl'] )
+ ) {
+ // The jetpack_sync_error_idc option is missing a key.
+ return false;
+ }
+
+ if ( 'jetpack_site_url_mismatch' === $data['error_code'] ) {
+ return array(
+ 'wpcom_url' => $data['wpcom_siteurl'],
+ 'current_url' => $data['siteurl'],
+ );
+ }
+
+ return array(
+ 'wpcom_url' => $data['wpcom_home'],
+ '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;
+ }
+
+ /**
+ * Adds `url_secret` to the `jetpack.idcUrlValidation` URL validation endpoint.
+ * Adds `url_secret_error` in case of an error.
+ *
+ * @param array $response The endpoint response that we're modifying.
+ *
+ * @return array
+ * phpcs:ignore Squiz.Commenting.FunctionCommentThrowTag -- The exception is being caught, false positive.
+ */
+ public static function add_secret_to_url_validation_response( array $response ) {
+ try {
+ $secret = new URL_Secret();
+
+ $secret->create();
+
+ if ( $secret->exists() ) {
+ $response['url_secret'] = $secret->get_secret();
+ }
+ } catch ( Exception $e ) {
+ $response['url_secret_error'] = new WP_Error( 'unable_to_create_url_secret', $e->getMessage() );
+ }
+
+ return $response;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-rest-endpoints.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-rest-endpoints.php
new file mode 100644
index 00000000..d2c20bc3
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-rest-endpoints.php
@@ -0,0 +1,236 @@
+ WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::confirm_safe_mode',
+ 'permission_callback' => __CLASS__ . '::identity_crisis_mitigation_permission_check',
+ )
+ );
+
+ // Handles the request to migrate stats and subscribers during an identity crisis.
+ register_rest_route(
+ 'jetpack/v4',
+ 'identity-crisis/migrate',
+ array(
+ 'methods' => WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::migrate_stats_and_subscribers',
+ 'permission_callback' => __CLASS__ . '::identity_crisis_mitigation_permission_check',
+ )
+ );
+
+ // IDC resolve: create an entirely new shadow site for this URL.
+ register_rest_route(
+ 'jetpack/v4',
+ '/identity-crisis/start-fresh',
+ array(
+ 'methods' => WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::start_fresh_connection',
+ 'permission_callback' => __CLASS__ . '::identity_crisis_mitigation_permission_check',
+ 'args' => array(
+ 'redirect_uri' => array(
+ 'description' => __( 'URI of the admin page where the user should be redirected after connection flow', 'jetpack-idc' ),
+ 'type' => 'string',
+ ),
+ ),
+ )
+ );
+
+ // Fetch URL verification secret.
+ register_rest_route(
+ 'jetpack/v4',
+ '/identity-crisis/url-secret',
+ array(
+ 'methods' => WP_REST_Server::READABLE,
+ 'callback' => array( static::class, 'fetch_url_secret' ),
+ 'permission_callback' => array( static::class, 'url_secret_permission_check' ),
+ )
+ );
+ }
+
+ /**
+ * Handles identity crisis mitigation, confirming safe mode for this site.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ *
+ * @return bool | WP_Error True if option is properly set.
+ */
+ public static function confirm_safe_mode() {
+ $updated = Jetpack_Options::update_option( 'safe_mode_confirmed', true );
+ if ( $updated ) {
+ return rest_ensure_response(
+ array(
+ 'code' => 'success',
+ )
+ );
+ }
+
+ return new WP_Error(
+ 'error_setting_jetpack_safe_mode',
+ esc_html__( 'Could not confirm safe mode.', 'jetpack-idc' ),
+ array( 'status' => 500 )
+ );
+ }
+
+ /**
+ * Handles identity crisis mitigation, migrating stats and subscribers from old url to this, new url.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ *
+ * @return bool | WP_Error True if option is properly set.
+ */
+ public static function migrate_stats_and_subscribers() {
+ if ( Jetpack_Options::get_option( 'sync_error_idc' ) && ! Jetpack_Options::delete_option( 'sync_error_idc' ) ) {
+ return new WP_Error(
+ 'error_deleting_sync_error_idc',
+ esc_html__( 'Could not delete sync error option.', 'jetpack-idc' ),
+ array( 'status' => 500 )
+ );
+ }
+
+ if ( Jetpack_Options::get_option( 'migrate_for_idc' ) || Jetpack_Options::update_option( 'migrate_for_idc', true ) ) {
+ return rest_ensure_response(
+ array(
+ 'code' => 'success',
+ )
+ );
+ }
+ return new WP_Error(
+ 'error_setting_jetpack_migrate',
+ esc_html__( 'Could not confirm migration.', 'jetpack-idc' ),
+ array( 'status' => 500 )
+ );
+ }
+
+ /**
+ * This IDC resolution will disconnect the site and re-connect to a completely new
+ * and separate shadow site than the original.
+ *
+ * It will first will disconnect the site without phoning home as to not disturb the production site.
+ * It then builds a fresh connection URL and sends it back along with the response.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response|WP_Error
+ */
+ public static function start_fresh_connection( $request ) {
+ /**
+ * Fires when Users have requested through Identity Crisis for the connection to be reset.
+ * Should be used to disconnect any connections and reset options.
+ *
+ * @since 0.2.0
+ */
+ do_action( 'jetpack_idc_disconnect' );
+
+ $connection = new Connection_Manager();
+ $result = $connection->try_registration( true );
+
+ // early return if site registration fails.
+ if ( ! $result || is_wp_error( $result ) ) {
+ return rest_ensure_response( $result );
+ }
+
+ $redirect_uri = $request->get_param( 'redirect_uri' ) ? admin_url( $request->get_param( 'redirect_uri' ) ) : null;
+
+ /**
+ * Filters the connection url that users should be redirected to for re-establishing their connection.
+ *
+ * @since 0.2.0
+ *
+ * @param \WP_REST_Response|WP_Error $connection_url Connection URL user should be redirected to.
+ */
+ return apply_filters( 'jetpack_idc_authorization_url', rest_ensure_response( $connection->get_authorization_url( null, $redirect_uri ) ) );
+ }
+
+ /**
+ * Verify that user can mitigate an identity crisis.
+ *
+ * @since 0.2.0
+ * @since-jetpack 4.4.0
+ *
+ * @return true|WP_Error True if the user has capability 'jetpack_disconnect', an error object otherwise.
+ */
+ public static function identity_crisis_mitigation_permission_check() {
+ if ( current_user_can( 'jetpack_disconnect' ) ) {
+ return true;
+ }
+ $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-idc'
+ );
+
+ return new WP_Error( 'invalid_user_permission_identity_crisis', $error_msg, array( 'status' => rest_authorization_required_code() ) );
+ }
+
+ /**
+ * Endpoint for fetching the existing secret.
+ *
+ * @return WP_Error|\WP_REST_Response
+ */
+ public static function fetch_url_secret() {
+ $secret = new URL_Secret();
+
+ if ( ! $secret->exists() ) {
+ return new WP_Error( 'missing_url_secret', esc_html__( 'URL secret does not exist.', 'jetpack-idc' ) );
+ }
+
+ return rest_ensure_response(
+ array(
+ 'code' => 'success',
+ 'data' => array(
+ 'secret' => $secret->get_secret(),
+ 'expires_at' => $secret->get_expires_at(),
+ ),
+ )
+ );
+ }
+
+ /**
+ * Verify url_secret create/fetch permissions (valid blog token authentication).
+ *
+ * @return true|WP_Error
+ */
+ public static function url_secret_permission_check() {
+ return Rest_Authentication::is_signed_with_blog_token()
+ ? true
+ : new WP_Error(
+ 'invalid_user_permission_identity_crisis',
+ esc_html__( 'You do not have the correct user permissions to perform this action.', 'jetpack-idc' ),
+ array( 'status' => rest_authorization_required_code() )
+ );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php
new file mode 100644
index 00000000..92f30f29
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php
@@ -0,0 +1,201 @@
+ true,
+ 'textdomain' => 'jetpack-idc',
+ )
+ );
+ Assets::enqueue_script( 'jp_identity_crisis_banner' );
+ wp_add_inline_script( 'jp_identity_crisis_banner', static::get_initial_state(), 'before' );
+
+ add_action( 'admin_notices', array( static::class, 'render_container' ) );
+ }
+ }
+
+ /**
+ * Create the container element for the IDC banner.
+ */
+ public static function render_container() {
+ ?>
+
+ 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,
+ 'possibleDynamicSiteUrlDetected' => $possible_dynamic_site_url_detected,
+
+ /**
+ * Use the filter to provide custom HTML elecontainer ID.
+ *
+ * @since 0.10.0
+ *
+ * @param string|null $containerID The container ID.
+ */
+ 'containerID' => apply_filters( 'identity_crisis_container_id', null ),
+ );
+ }
+
+ /**
+ * Get the package consumer data.
+ *
+ * @return array
+ */
+ public static function get_consumer_data() {
+ if ( null !== static::$consumers ) {
+ return static::$consumers;
+ }
+
+ $consumers = apply_filters( 'jetpack_idc_consumers', array() );
+
+ if ( ! $consumers ) {
+ return array();
+ }
+
+ usort(
+ $consumers,
+ function ( $c1, $c2 ) {
+ $priority1 = ( array_key_exists( 'priority', $c1 ) && (int) $c1['priority'] ) ? (int) $c1['priority'] : 10;
+ $priority2 = ( array_key_exists( 'priority', $c2 ) && (int) $c2['priority'] ) ? (int) $c2['priority'] : 10;
+
+ return $priority1 > $priority2 ? 1 : -1;
+ }
+ );
+
+ $consumer_chosen = null;
+ $consumer_url_length = 0;
+
+ foreach ( $consumers as $consumer ) {
+ if ( empty( $consumer['admin_page'] ) || ! is_string( $consumer['admin_page'] ) ) {
+ continue;
+ }
+
+ 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'] );
+ }
+ }
+
+ 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-url-secret.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-url-secret.php
new file mode 100644
index 00000000..f7a9d209
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-url-secret.php
@@ -0,0 +1,134 @@
+fetch();
+
+ if ( $secret_data !== null ) {
+ $this->secret = $secret_data['secret'];
+ $this->expires_at = $secret_data['expires_at'];
+ }
+ }
+
+ /**
+ * Fetch the URL secret from the database.
+ *
+ * @return array|null
+ */
+ private function fetch() {
+ $data = Jetpack_Options::get_option( static::OPTION_KEY );
+
+ if ( $data === false || empty( $data['secret'] ) || empty( $data['expires_at'] ) ) {
+ return null;
+ }
+
+ if ( time() > $data['expires_at'] ) {
+ Jetpack_Options::delete_option( static::OPTION_KEY );
+ return null;
+ }
+
+ return $data;
+ }
+
+ /**
+ * Create new secret and save it in the options.
+ *
+ * @throws Exception Thrown if unable to save the new secret.
+ *
+ * @return bool
+ */
+ public function create() {
+ $secret_data = array(
+ 'secret' => $this->generate_secret(),
+ 'expires_at' => time() + static::LIFESPAN,
+ );
+
+ $result = Jetpack_Options::update_option( static::OPTION_KEY, $secret_data );
+
+ if ( ! $result ) {
+ throw new Exception( esc_html__( 'Unable to save new URL secret', 'jetpack-idc' ) );
+ }
+
+ $this->secret = $secret_data['secret'];
+ $this->expires_at = $secret_data['expires_at'];
+
+ return true;
+ }
+
+ /**
+ * Get the URL secret.
+ *
+ * @return string|null
+ */
+ public function get_secret() {
+ return $this->secret;
+ }
+
+ /**
+ * Get the URL secret expiration date.
+ *
+ * @return string|null
+ */
+ public function get_expires_at() {
+ return $this->expires_at;
+ }
+
+ /**
+ * Check if the secret exists.
+ *
+ * @return bool
+ */
+ public function exists() {
+ return $this->secret && $this->expires_at;
+ }
+
+ /**
+ * Generate the secret string.
+ *
+ * @return string
+ */
+ private function generate_secret() {
+ return wp_generate_password( 12, false );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/CHANGELOG.md
new file mode 100644
index 00000000..2bacd24c
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/CHANGELOG.md
@@ -0,0 +1,42 @@
+# 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.6] - 2023-09-19
+- Minor internal updates.
+
+## [0.1.5] - 2023-08-23
+### Changed
+- Updated package dependencies. [#32605]
+
+## [0.1.4] - 2023-05-29
+### Changed
+- Internal updates.
+
+## [0.1.3] - 2023-05-11
+
+- Updated package dependencies
+
+## [0.1.2] - 2023-04-10
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+
+## [0.1.1] - 2023-03-28
+### Changed
+- Update README.md [#28401]
+
+## 0.1.0 - 2023-02-28
+### Added
+- Added a utility function to extract an array of IP addresses from a given string. [#29131]
+- Add jetpack-ip package functionality [#28846]
+- Initialized the package. [#28765]
+
+[0.1.6]: https://github.com/automattic/jetpack-ip/compare/v0.1.5...v0.1.6
+[0.1.5]: https://github.com/automattic/jetpack-ip/compare/v0.1.4...v0.1.5
+[0.1.4]: https://github.com/automattic/jetpack-ip/compare/v0.1.3...v0.1.4
+[0.1.3]: https://github.com/automattic/jetpack-ip/compare/v0.1.2...v0.1.3
+[0.1.2]: https://github.com/automattic/jetpack-ip/compare/v0.1.1...v0.1.2
+[0.1.1]: https://github.com/automattic/jetpack-ip/compare/v0.1.0...v0.1.1
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/SECURITY.md
new file mode 100644
index 00000000..b4b46c0e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/composer.json
new file mode 100644
index 00000000..81030311
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/composer.json
@@ -0,0 +1,44 @@
+{
+ "name": "automattic/jetpack-ip",
+ "description": "Utilities for working with IP addresses.",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {},
+ "require-dev": {
+ "brain/monkey": "2.6.1",
+ "yoast/phpunit-polyfills": "1.1.0",
+ "automattic/jetpack-changelogger": "^3.3.9"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "test-php": [
+ "@composer phpunit"
+ ]
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-ip",
+ "changelogger": {
+ "link-template": "https://github.com/automattic/jetpack-ip/compare/v${old}...v${new}"
+ },
+ "branch-alias": {
+ "dev-trunk": "0.1.x-dev"
+ },
+ "textdomain": "jetpack-ip",
+ "version-constants": {
+ "::PACKAGE_VERSION": "src/class-utils.php"
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/src/class-utils.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/src/class-utils.php
new file mode 100644
index 00000000..37941971
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/src/class-utils.php
@@ -0,0 +1,245 @@
+trusted_header ) && isset( $_SERVER[ $trusted_header_data->trusted_header ] ) ) {
+ $ip = wp_unslash( $_SERVER[ $trusted_header_data->trusted_header ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- clean_ip does it below.
+ $segments = $trusted_header_data->segments;
+ $reverse_order = $trusted_header_data->reverse;
+ } else {
+ $ip = isset( $_SERVER['REMOTE_ADDR'] ) ? wp_unslash( $_SERVER['REMOTE_ADDR'] ) : null; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- clean_ip does it below.
+ }
+
+ if ( ! $ip ) {
+ return false;
+ }
+
+ $ips = explode( ',', $ip );
+ if ( ! isset( $segments ) || ! $segments ) {
+ $segments = 1;
+ }
+ if ( isset( $reverse_order ) && $reverse_order ) {
+ $ips = array_reverse( $ips );
+ }
+ $ip_count = count( $ips );
+ if ( 1 === $ip_count ) {
+ return self::clean_ip( $ips[0] );
+ } elseif ( $ip_count >= $segments ) {
+ $the_one = $ip_count - $segments;
+ return self::clean_ip( $ips[ $the_one ] );
+ } else {
+ return self::clean_ip( isset( $_SERVER['REMOTE_ADDR'] ) ? wp_unslash( $_SERVER['REMOTE_ADDR'] ) : null ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- clean_ip does it.
+ }
+ }
+
+ /**
+ * Clean IP address.
+ *
+ * @param string $ip The IP address to clean.
+ * @return string|false The cleaned IP address.
+ */
+ public static function clean_ip( $ip ) {
+
+ // Some misconfigured servers give back extra info, which comes after "unless".
+ $ips = explode( ' unless ', $ip );
+ $ip = $ips[0];
+
+ $ip = strtolower( trim( $ip ) );
+
+ // Check for IPv4 with port.
+ if ( preg_match( '/^(\d+\.\d+\.\d+\.\d+):\d+$/', $ip, $matches ) ) {
+ $ip = $matches[1];
+ }
+
+ // Check for IPv6 (or IPvFuture) with brackets and optional port.
+ if ( preg_match( '/^\[([a-z0-9\-._~!$&\'()*+,;=:]+)\](?::\d+)?$/', $ip, $matches ) ) {
+ $ip = $matches[1];
+ }
+
+ // Check for IPv4 IP cast as IPv6.
+ if ( preg_match( '/^::ffff:(\d+\.\d+\.\d+\.\d+)$/', $ip, $matches ) ) {
+ $ip = $matches[1];
+ }
+
+ // Validate and return.
+ return filter_var( $ip, FILTER_VALIDATE_IP ) ? $ip : false;
+ }
+
+ /**
+ * Checks an IP to see if it is within a private range.
+ *
+ * @param int $ip IP address.
+ * @return bool True if IP address is private, false otherwise.
+ */
+ public static function ip_is_private( $ip ) {
+ // We are dealing with ipv6, so we can simply rely on filter_var.
+ if ( false === strpos( $ip, '.' ) ) {
+ return ! filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE );
+ }
+ // We are dealing with ipv4.
+ $private_ip4_addresses = array(
+ '10.0.0.0|10.255.255.255', // Single class A network.
+ '172.16.0.0|172.31.255.255', // 16 contiguous class B network.
+ '192.168.0.0|192.168.255.255', // 256 contiguous class C network.
+ '169.254.0.0|169.254.255.255', // Link-local address also referred to as Automatic Private IP Addressing.
+ '127.0.0.0|127.255.255.255', // localhost.
+ );
+ $long_ip = ip2long( $ip );
+ if ( -1 !== $long_ip ) {
+ foreach ( $private_ip4_addresses as $pri_addr ) {
+ list ( $start, $end ) = explode( '|', $pri_addr );
+ if ( $long_ip >= ip2long( $start ) && $long_ip <= ip2long( $end ) ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Uses inet_pton if available to convert an IP address to a binary string.
+ * If inet_pton is not available, ip2long will convert the address to an integer.
+ * Returns false if an invalid IP address is given.
+ *
+ * NOTE: ip2long will return false for any ipv6 address. servers that do not support
+ * inet_pton will not support ipv6
+ *
+ * @param mixed $ip IP address.
+ * @return int|string|bool
+ */
+ public static function convert_ip_address( $ip ) {
+ if ( function_exists( 'inet_pton' ) ) {
+ return inet_pton( $ip );
+ }
+ return ip2long( $ip );
+ }
+
+ /**
+ * Checks that a given IP address is within a given low - high range.
+ * Servers that support inet_pton will use that function to convert the ip to number,
+ * while other servers will use ip2long.
+ *
+ * NOTE: servers that do not support inet_pton cannot support ipv6.
+ *
+ * @param mixed $ip IP.
+ * @param mixed $range_low Range Low.
+ * @param mixed $range_high Range High.
+ * @return Bool
+ */
+ public static function ip_address_is_in_range( $ip, $range_low, $range_high ) {
+ // The inet_pton will give us binary string of an ipv4 or ipv6.
+ // We can then use strcmp to see if the address is in range.
+ if ( function_exists( 'inet_pton' ) ) {
+ $ip_num = inet_pton( $ip );
+ $ip_low = inet_pton( $range_low );
+ $ip_high = inet_pton( $range_high );
+ if ( $ip_num && $ip_low && $ip_high && strcmp( $ip_num, $ip_low ) >= 0 && strcmp( $ip_num, $ip_high ) <= 0 ) {
+ return true;
+ }
+ // The ip2long will give us an integer of an ipv4 address only. it will produce FALSE for ipv6.
+ } else {
+ $ip_num = ip2long( $ip );
+ $ip_low = ip2long( $range_low );
+ $ip_high = ip2long( $range_high );
+ if ( $ip_num && $ip_low && $ip_high && $ip_num >= $ip_low && $ip_num <= $ip_high ) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Extracts IP addresses from a given string.
+ *
+ * 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. IP ranges using the "-" character are also supported.
+ *
+ * @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,1.1.1.10-1.1.1.20".
+ * @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', '1.1.1.10-1.1.1.20')
+ */
+ public static function get_ip_addresses_from_string( $ips ) {
+ $ips = (string) $ips;
+ $ips = preg_split( '/[\s,;]/', $ips );
+
+ $result = array();
+
+ foreach ( $ips as $ip ) {
+ // Validate both IP values from the range.
+ $range = explode( '-', $ip );
+ if ( count( $range ) === 2 ) {
+ if ( self::validate_ip_range( $range[0], $range[1] ) ) {
+ $result[] = $ip;
+ }
+ continue;
+ }
+
+ // Validate the single IP value.
+ if ( filter_var( $ip, FILTER_VALIDATE_IP ) !== false ) {
+ $result[] = $ip;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Validates the low and high IP addresses of a range.
+ *
+ * NOTE: servers that do not support inet_pton cannot support ipv6.
+ *
+ * @param string $range_low Low IP address.
+ * @param string $range_high High IP address.
+ * @return bool True if the range is valid, false otherwise.
+ */
+ public static function validate_ip_range( $range_low, $range_high ) {
+ // Validate that both IP addresses are valid.
+ if ( ! filter_var( $range_low, FILTER_VALIDATE_IP ) || ! filter_var( $range_high, FILTER_VALIDATE_IP ) ) {
+ return false;
+ }
+
+ // Validate that the $range_low is lower or equal to $range_high.
+ if ( function_exists( 'inet_pton' ) ) {
+ // The inet_pton will give us binary string of an ipv4 or ipv6.
+ // We can then use strcmp to see if the address is in range.
+ $ip_low = inet_pton( $range_low );
+ $ip_high = inet_pton( $range_high );
+ if ( false === $ip_low || false === $ip_high ) {
+ return false;
+ }
+ if ( strcmp( $ip_low, $ip_high ) > 0 ) {
+ return false;
+ }
+ } else {
+ // The ip2long will give us an integer of an ipv4 address only. it will produce FALSE for ipv6.
+ $ip_low = ip2long( $range_low );
+ $ip_high = ip2long( $range_high );
+ if ( false === $ip_low || false === $ip_high ) {
+ return false;
+ }
+ if ( $ip_low > $ip_high ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/CHANGELOG.md
new file mode 100644
index 00000000..0af7f2be
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/CHANGELOG.md
@@ -0,0 +1,776 @@
+# 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).
+
+## [2.5.1] - 2023-10-19
+### Changed
+- Updated package dependencies. [#33687]
+
+## [2.5.0] - 2023-10-10
+### Added
+- JITMs can now redirect to a specific Jetpack settings page. [#32826]
+
+### Changed
+- Update color of WooCommerce logo. [#33491]
+- Updated package dependencies. [#33428]
+
+## [2.4.0] - 2023-09-28
+### Changed
+- Moved tracking for JITM buttons into JITM script, added message_path property [#33252]
+
+## [2.3.19] - 2023-09-19
+
+- Minor internal updates.
+
+## [2.3.18] - 2023-09-04
+### Changed
+- Updated package dependencies. [#32803]
+
+## [2.3.17] - 2023-08-23
+### Changed
+- Updated package dependencies. [#32605]
+
+## [2.3.16] - 2023-08-21
+### Fixed
+- Update secondary button styling [#32503]
+
+## [2.3.15] - 2023-08-09
+### Changed
+- Updated package dependencies. [#32166]
+
+## [2.3.14] - 2023-07-25
+### Changed
+- Updated package dependencies. [#32040]
+
+## [2.3.13] - 2023-07-17
+### Changed
+- Generate query string when using the WPCOM API to fetch JITMs [#31809]
+
+## [2.3.12] - 2023-07-11
+### Changed
+- Updated package dependencies. [#31785]
+
+## [2.3.11] - 2023-07-05
+### Changed
+- Updated package dependencies. [#31659]
+
+## [2.3.10] - 2023-06-23
+### Changed
+- Updated package dependencies. [#31468]
+
+## [2.3.9] - 2023-06-06
+### Changed
+- Updated package dependencies. [#31129]
+
+## [2.3.8] - 2023-05-08
+### Added
+- JITM: Add jetpack-videopress to JITM refetch on hashchange list [#30465]
+
+## [2.3.7] - 2023-05-02
+### Changed
+- Updated package dependencies. [#30375]
+
+## [2.3.6] - 2023-04-10
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+
+## [2.3.5] - 2023-04-04
+### Added
+- Add external link icons in JITM [#29654]
+
+### Changed
+- Updated package dependencies. [#29854]
+
+## [2.3.4] - 2023-03-28
+### Fixed
+- JITM: Fix button overflow when text length is too big [#29749]
+
+## [2.3.3] - 2023-03-27
+### Changed
+- JITM: Update styles [#29709]
+
+## [2.3.2] - 2023-03-20
+### Changed
+- Updated package dependencies. [#29471]
+
+## [2.3.1] - 2023-03-08
+### Changed
+- Updated package dependencies. [#29216]
+
+## [2.3.0] - 2023-02-20
+### Changed
+- Moving deleting connection owner notice from JITM to Connection package. [#28516]
+
+## [2.2.42] - 2023-02-15
+### Changed
+- Update to React 18. [#28710]
+
+## [2.2.41] - 2023-02-06
+### Fixed
+- JITM: minor fix for styles on Safari browser.
+
+## [2.2.40] - 2023-01-30
+### Changed
+- Updated styles for Just in Time Messages (notices) [#27515]
+
+## [2.2.39] - 2023-01-25
+### Changed
+- Minor internal updates.
+
+## [2.2.38] - 2023-01-23
+### Fixed
+- Prevent the activation page from displaying the JP License Activation JITM. [#27959]
+
+## [2.2.37] - 2023-01-11
+### Changed
+- Updated package dependencies.
+
+## [2.2.36] - 2022-12-27
+### Removed
+- Remove src/js files from final bundle [#27930]
+
+## [2.2.35] - 2022-12-02
+### Changed
+- Updated package dependencies. [#27696]
+
+## [2.2.34] - 2022-11-22
+### Changed
+- Updated package dependencies. [#27043]
+
+## [2.2.33] - 2022-11-08
+### Changed
+- Updated package dependencies. [#27289]
+
+## [2.2.32] - 2022-11-07
+### Changed
+- Updated package dependencies. [#27278]
+
+## [2.2.31] - 2022-11-01
+### Changed
+- Updated package dependencies. [#27196]
+
+## [2.2.30] - 2022-10-25
+### Changed
+- Updated package dependencies. [#26705]
+
+## [2.2.29] - 2022-10-13
+### Changed
+- Updated package dependencies. [#26791]
+
+## [2.2.28] - 2022-10-05
+### Changed
+- Updated package dependencies. [#26568]
+
+## [2.2.27] - 2022-09-08
+### Changed
+- Updated package dependencies.
+
+## [2.2.26] - 2022-08-29
+### Changed
+- Updated package dependencies.
+
+## [2.2.25] - 2022-08-25
+### Changed
+- Updated package dependencies. [#25814]
+
+## [2.2.24] - 2022-08-23
+### Added
+- Add custom styling rules for the JITMs displayed in My Jetpack. [#22452]
+- Updated JITM readme. [#25739]
+
+### Changed
+- Updated package dependencies. [#25628]
+
+## [2.2.23] - 2022-08-03
+### Changed
+- Updated package dependencies. [#25300, #25315]
+
+## [2.2.22] - 2022-07-26
+### Changed
+- Updated package dependencies. [#25158]
+
+## [2.2.21] - 2022-07-12
+### Changed
+- Updated package dependencies.
+
+## [2.2.20] - 2022-06-21
+### Changed
+- Renaming master to trunk. [#24661]
+
+## [2.2.19] - 2022-06-14
+### Changed
+- Updated package dependencies. [#24529]
+
+## [2.2.18] - 2022-06-08
+### Changed
+- Reorder JS imports for `import/order` eslint rule. [#24601]
+
+## [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.
+- Updated package dependencies.
+- Updated package textdomain from `jetpack` to `jetpack-jitm`.
+
+## [2.1.1] - 2021-12-14
+### Changed
+- Updated package dependencies.
+
+## [2.1.0] - 2021-11-30
+### Added
+- Add proper JS and CSS builder.
+- Adds filters to allow sideloading of the Jetpack Backup plugin through JITMs.
+- JITM: Added ability to sideload Jetpack Boost plugin.
+
+### Changed
+- Add `output.filename` in Webpack config to override changed default.
+- Colors: update Jetpack Primary color to match latest brand book.
+
+### Fixed
+- JITM: wrap CTA below text on small viewports
+
+## [2.0.8] - 2021-11-23
+### Changed
+- Updated package dependencies.
+
+## [2.0.7] - 2021-11-16
+### Added
+- Use monorepo `validate-es` script to validate Webpack builds.
+
+### Changed
+- Updated package dependencies.
+
+## [2.0.6] - 2021-11-09
+### Changed
+- Update webpack build config.
+
+## [2.0.5] - 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.
+
+## [2.0.4] - 2021-10-26
+### Changed
+- Updated package dependencies.
+
+## [2.0.3] - 2021-10-19
+### Changed
+- Updated package dependencies.
+
+## [2.0.2] - 2021-10-12
+### Changed
+- Updated package dependencies
+
+## [2.0.1] - 2021-09-28
+### Changed
+- Allow Node ^14.17.6 to be used in this project. This shouldn't change the behavior of the code itself.
+- Updated package dependencies.
+
+## [2.0.0] - 2021-08-31
+### Changed
+- Run composer update on test-php command instead of phpunit.
+- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills).
+- Update annotations versions.
+- Updated package dependencies.
+- Update to latest webpack, webpack-cli and calypso-build.
+- Upgrade to Webpack 5.
+- Use Node 16.7.0 in tooling.
+
+### Removed
+- Removed IE11 support.
+
+## [1.16.2] - 2021-07-27
+### Changed
+- Updated package dependencies.
+
+## [1.16.1] - 2021-06-29
+### Changed
+- Update package dependencies.
+- Update node version requirement to 14.16.1
+- Update the usage of Redirect lib and passes the unlinked param as a query argument.
+
+## [1.16.0] - 2021-05-25
+### Added
+- JITM: allow the plugin to set the icon for pre-connection JITMs.
+- JITM: move sync updated option hook to the JITM package.
+
+### Changed
+- JITM: prevent JITMs from being registered more than once.
+- JITM: remove jetpack-constants dependency from composer.json
+- JITM: set the default values of the jetpack_just_in_time_msgs and jetpack_just_in_time_msg_cache filters to true.
+- JITM: Use an action instead of a property to prevent JITMs from being registered multiple times
+- JITM: Use the Device_Detection package to determine if the device is mobile.
+- Updated package dependencies
+- update jetpack-redirect dependency
+
+## [1.15.1] - 2021-05-03
+### Changed
+- JITM: Use manager::get_authorization_url to obtain the authorization url in the user deletion notice.
+
+## [1.15.0] - 2021-04-27
+### Added
+- Move JITM's REST API endpoints into the package
+
+### Changed
+- Always display pre-connection JITMs, without the need to set a filter.
+- Avoid wrapping text in the main CTA button.
+- Bump JITM package version requirement.
+- JITM: Update CTA redirect url with unlinked query arg to indicate current user is not connected.
+- Update package dependencies.
+- Use the a8c-mc-stats package to generate stats.
+
+## [1.14.1] - 2021-03-30
+### Added
+- Composer alias for dev-master, to improve dependencies
+
+### Changed
+- Use is_connected instead of is_active to instantiate Pre/Post_Connection_JITM
+- Add a jetpack_pre_connection_jitms filter.
+- Update colors to match upcoming WP 5.7 color changes
+- Update Node to match latest LTS 12
+- Update package dependencies.
+
+### Fixed
+- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in.
+
+## [1.14.0] - 2021-02-23
+
+- Recommendations: Hide JITMs when banner is displaying
+- Setup Wizard: Remove setup wizard
+- JITM: move jetpack-jitm.js to the JITM package
+- CI: Make tests more generic
+
+## [1.13.5] - 2021-02-08
+
+- Update dependencies to latest stable
+
+## [1.13.4] - 2021-01-28
+
+- Update dependencies to latest stable
+
+## [1.13.3] - 2021-01-26
+
+- Update dependencies to latest stable
+
+## [1.13.2] - 2021-01-26
+
+- Update dependencies to latest stable
+
+## [1.13.1] - 2021-01-26
+
+- Add mirror-repo information to all current composer packages
+- Monorepo: Reorganize all projects
+
+## [1.13.0] - 2021-01-05
+
+- Update dependency brain/monkey to v2.6.0
+- Pin dependencies
+- Packages: Update for PHP 8 testing
+
+## [1.12.2] - 2020-12-09
+
+- Update dependencies to latest stable
+
+## [1.12.1] - 2020-11-24
+
+- Version packages for release
+
+## [1.12.0] - 2020-11-24
+
+- Status: Introduce get_site_suffix method
+- General: update minimum required version to WordPress 5.5
+- Updated PHPCS: Packages and Debugger
+
+## [1.11.2] - 2020-11-05
+
+- Update dependencies to latest stable
+
+## [1.11.1] - 2020-10-29
+
+- Update dependencies to latest stable
+
+## [1.11.0] - 2020-10-27
+
+- JITM: add a Pre_Connection_JITM::generate_admin_url method
+- JITM: use is_active from the connection package
+- JITM: regenerate assets
+
+## [1.10.4] - 2020-10-14
+
+- Update dependencies to latest stable
+
+## [1.10.3] - 2020-10-09
+
+- Update dependencies to latest stable
+
+## [1.10.2] - 2020-10-06
+
+- Update dependencies to latest stable
+
+## [1.10.1] - 2020-10-01
+
+- Update dependencies to latest stable
+
+## [1.10.0] - 2020-09-29
+
+- Update dependencies to latest stable
+
+## [1.9.1] - 2020-09-09
+
+- Update dependencies to latest stable
+
+## [1.9.0] - 2020-08-26
+
+- Compat: add new Creative Mail compat file
+- Packages: Update filenames after #16810
+- CI: Try collect js coverage
+- Docker: Add package testing shortcut
+
+## [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
+
+- Core Compat: Site Environment
+- Core REST API: Add permission callback to delete_jitm_message endpoint
+
+## [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
+
+- PHPCS: Clean up the packages
+- Hide pre-connection JITM on the posts page when few posts are published
+- Jetpack Setup Wizard: Do not show pre-connection JITMs to non admins
+- JITM: change 'setup' to 'set up' in pre-connection JITMs
+- Pre-connection JITMS: Link to connect-in-place flow
+- JITM: add Redirect use statement
+
+## [1.6.5] - 2020-06-01
+
+- Hide pre-connection JITM on the posts page when few posts are published
+
+## [1.6.4] - 2020-06-01
+
+- Update dependencies to latest stable
+
+## [1.6.3] - 2020-05-29
+
+- Jetpack Setup Wizard: Do not show pre-connection JITMs to non admins
+
+## [1.6.2] - 2020-05-29
+
+- JITM: change 'setup' to 'set up' in pre-connection JITMs
+- Pre-connection JITMS: Link to connect-in-place flow
+
+## [1.6.1] - 2020-05-28
+
+- JITM: add Redirect use statement
+
+## [1.6.0] - 2020-05-26
+
+- JITM: expand docs and tests to account for pre-connection messages
+- Improve responsiveness of JITMs
+- JITM: fix the use statements
+- Implement pre-connection JITMs
+- JITM: Allow JITM on stats pages
+
+## [1.5.1] - 2020-04-30
+
+- JITM: Allow JITM on stats pages
+
+## [1.5.0] - 2020-04-28
+
+- Use jp.com redirect in all links
+
+## [1.4.0] - 2020-03-31
+
+- Update dependencies to latest stable
+
+## [1.3.0] - 2020-03-31
+
+- Use dynamic Jetpack logos on JITMs
+
+## [1.2.0] - 2020-02-25
+
+- JITM: Show ToS update notice
+
+## [1.1.2] - 2020-02-14
+
+- SSO: do not display JITM when not in wp-admin
+
+## [1.1.1] - 2020-01-23
+
+- Moved JITM initialization to plugins_loaded.
+
+## [1.1.0] - 2020-01-07
+
+- Add partner subsidiary id to upgrade URLs.
+
+## [1.0.10] - 2019-11-25
+
+- Connection Owner Deletion Notice: Fix display bug and sanitize…
+
+## [1.0.9] - 2019-11-19
+
+- Don't show JITMs on Gutenberg editor pages (for now)
+
+## [1.0.8] - 2019-11-08
+
+- Packages: Use classmap instead of PSR-4
+
+## [1.0.7] - 2019-11-08
+
+- Remove unused get_emblem method
+
+## [1.0.6] - 2019-10-31
+
+- Inherit 400 weight for button fonts
+
+## [1.0.5] - 2019-10-28
+
+- PHPCS: JITM and Assets packages
+
+## [1.0.4] - 2019-10-24
+
+- Update Jetpack button and card styles to match WordPress 5.3
+
+## [1.0.3] - 2019-10-23
+
+- Use spread operator instead of func_get_args
+
+## [1.0.2] - 2019-10-17
+
+- Change the class in the add_filter() calls to $this. Also fix some
+
+## [1.0.1] - 2019-09-27
+
+- Initial trial of prefer-dist
+- JITM: Send the user's role in the request for JITM messages
+
+## 1.0.0 - 2019-09-14
+
+- Update Jetpack to use new JITM package
+
+[2.5.1]: https://github.com/Automattic/jetpack-jitm/compare/v2.5.0...v2.5.1
+[2.5.0]: https://github.com/Automattic/jetpack-jitm/compare/v2.4.0...v2.5.0
+[2.4.0]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.19...v2.4.0
+[2.3.19]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.18...v2.3.19
+[2.3.18]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.17...v2.3.18
+[2.3.17]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.16...v2.3.17
+[2.3.16]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.15...v2.3.16
+[2.3.15]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.14...v2.3.15
+[2.3.14]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.13...v2.3.14
+[2.3.13]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.12...v2.3.13
+[2.3.12]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.11...v2.3.12
+[2.3.11]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.10...v2.3.11
+[2.3.10]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.9...v2.3.10
+[2.3.9]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.8...v2.3.9
+[2.3.8]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.7...v2.3.8
+[2.3.7]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.6...v2.3.7
+[2.3.6]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.5...v2.3.6
+[2.3.5]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.4...v2.3.5
+[2.3.4]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.3...v2.3.4
+[2.3.3]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.2...v2.3.3
+[2.3.2]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.1...v2.3.2
+[2.3.1]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.0...v2.3.1
+[2.3.0]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.42...v2.3.0
+[2.2.42]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.41...v2.2.42
+[2.2.41]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.40...v2.2.41
+[2.2.40]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.39...v2.2.40
+[2.2.39]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.38...v2.2.39
+[2.2.38]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.37...v2.2.38
+[2.2.37]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.36...v2.2.37
+[2.2.36]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.35...v2.2.36
+[2.2.35]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.34...v2.2.35
+[2.2.34]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.33...v2.2.34
+[2.2.33]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.32...v2.2.33
+[2.2.32]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.31...v2.2.32
+[2.2.31]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.30...v2.2.31
+[2.2.30]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.29...v2.2.30
+[2.2.29]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.28...v2.2.29
+[2.2.28]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.27...v2.2.28
+[2.2.27]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.26...v2.2.27
+[2.2.26]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.25...v2.2.26
+[2.2.25]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.24...v2.2.25
+[2.2.24]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.23...v2.2.24
+[2.2.23]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.22...v2.2.23
+[2.2.22]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.21...v2.2.22
+[2.2.21]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.20...v2.2.21
+[2.2.20]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.19...v2.2.20
+[2.2.19]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.18...v2.2.19
+[2.2.18]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.17...v2.2.18
+[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
+[2.0.8]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.7...v2.0.8
+[2.0.7]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.6...v2.0.7
+[2.0.6]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.5...v2.0.6
+[2.0.5]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.4...v2.0.5
+[2.0.4]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.3...v2.0.4
+[2.0.3]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.2...v2.0.3
+[2.0.2]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.1...v2.0.2
+[2.0.1]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.0...v2.0.1
+[2.0.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.16.2...v2.0.0
+[1.16.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.16.1...v1.16.2
+[1.16.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.16.0...v1.16.1
+[1.16.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.15.1...v1.16.0
+[1.15.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.15.0...v1.15.1
+[1.15.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.14.1...v1.15.0
+[1.14.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.14.0...v1.14.1
+[1.14.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.13.5...v1.14.0
+[1.13.5]: https://github.com/Automattic/jetpack-jitm/compare/v1.13.4...v1.13.5
+[1.13.4]: https://github.com/Automattic/jetpack-jitm/compare/v1.13.3...v1.13.4
+[1.13.3]: https://github.com/Automattic/jetpack-jitm/compare/v1.13.2...v1.13.3
+[1.13.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.13.1...v1.13.2
+[1.13.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.13.0...v1.13.1
+[1.13.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.12.2...v1.13.0
+[1.12.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.12.1...v1.12.2
+[1.12.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.12.0...v1.12.1
+[1.12.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.11.2...v1.12.0
+[1.11.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.11.1...v1.11.2
+[1.11.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.11.0...v1.11.1
+[1.11.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.10.4...v1.11.0
+[1.10.4]: https://github.com/Automattic/jetpack-jitm/compare/v1.10.3...v1.10.4
+[1.10.3]: https://github.com/Automattic/jetpack-jitm/compare/v1.10.2...v1.10.3
+[1.10.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.10.1...v1.10.2
+[1.10.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.10.0...v1.10.1
+[1.10.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.9.1...v1.10.0
+[1.9.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.9.0...v1.9.1
+[1.9.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.8.2...v1.9.0
+[1.8.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.8.1...v1.8.2
+[1.8.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.8.0...v1.8.1
+[1.8.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.7.2...v1.8.0
+[1.7.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.7.1...v1.7.2
+[1.7.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.7.0...v1.7.1
+[1.7.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.6.5...v1.7.0
+[1.6.5]: https://github.com/Automattic/jetpack-jitm/compare/v1.6.4...v1.6.5
+[1.6.4]: https://github.com/Automattic/jetpack-jitm/compare/v1.6.3...v1.6.4
+[1.6.3]: https://github.com/Automattic/jetpack-jitm/compare/v1.6.2...v1.6.3
+[1.6.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.6.1...v1.6.2
+[1.6.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.6.0...v1.6.1
+[1.6.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.5.1...v1.6.0
+[1.5.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.5.0...v1.5.1
+[1.5.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.4.0...v1.5.0
+[1.4.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.3.0...v1.4.0
+[1.3.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.2.0...v1.3.0
+[1.2.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.1.2...v1.2.0
+[1.1.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.1.1...v1.1.2
+[1.1.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.1.0...v1.1.1
+[1.1.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.10...v1.1.0
+[1.0.10]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.9...v1.0.10
+[1.0.9]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.8...v1.0.9
+[1.0.8]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.7...v1.0.8
+[1.0.7]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.6...v1.0.7
+[1.0.6]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.5...v1.0.6
+[1.0.5]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.4...v1.0.5
+[1.0.4]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.3...v1.0.4
+[1.0.3]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.2...v1.0.3
+[1.0.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.1...v1.0.2
+[1.0.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.0...v1.0.1
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/SECURITY.md
new file mode 100644
index 00000000..98f48dd1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/SECURITY.md
@@ -0,0 +1,47 @@
+# 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 and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions.
+
+## Reporting a Vulnerability
+
+Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure:
+
+* [Jetpack](https://jetpack.com/)
+* Jetpack Backup
+* Jetpack Boost
+* Jetpack CRM
+* Jetpack Protect
+* Jetpack Search
+* Jetpack Social
+* Jetpack VideoPress
+
+**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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/images/background-165b2f00927a762c8cf4.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/images/background-165b2f00927a762c8cf4.png
new file mode 100644
index 00000000..c2d50e1b
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/images/background-165b2f00927a762c8cf4.png differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php
new file mode 100644
index 00000000..544d79eb
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php
@@ -0,0 +1 @@
+ array('jquery', 'wp-polyfill'), 'version' => '76ec3c26b0b3d8144645');
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.css
new file mode 100644
index 00000000..b51e593c
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.css
@@ -0,0 +1 @@
+.jitm-button{-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #000;border-radius:4px;box-sizing:border-box;color:#000;cursor:pointer;display:inline-block;font-size:14px;font-weight:600;margin:0;min-width:90px;outline:0;overflow:hidden;padding:7px 14px 9px;text-align:center;text-decoration:none;text-overflow:ellipsis;vertical-align:top;width:100%}.jitm-button.is-primary{background:#000;color:#fff}.jitm-button.is-primary .gridicons-external-link{fill:#fff}.jitm-button.is-secondary .gridicons-external-link{fill:#000}.jitm-button.is-secondary:hover{background:#f6f7f7;color:#000}.jitm-button.is-secondary:hover .gridicons-external-link{fill:#000}.jitm-button:focus,.jitm-button:hover{background:#414141;border-color:#414141;color:#fff}.jitm-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2271b1}.jitm-button:disabled,.jitm-button[disabled]{background:#dcdcde;border-color:#dcdcde;color:#a7aaad;cursor:default}.jitm-button.is-compact{font-size:14px;height:32px;line-height:1;white-space:nowrap}.jitm-button.is-compact .gridicon{margin-top:-8px;top:4px}.jitm-button.is-compact .gridicons-plus-small{margin-left:-4px}.jitm-button.is-compact .gridicons-plus-small:last-of-type{margin-left:0}.jitm-button.is-compact .gridicons-plus-small+.gridicon{margin-left:-4px}.jitm-button.is-compact .gridicons-external-link{margin:-3px 0 -3px 2px}.jitm-button.hidden{display:none}.jitm-card{background-color:#fff;background-image:url(images/background-165b2f00927a762c8cf4.png);background-position:100%;background-repeat:no-repeat;border:1px solid #fff;border-radius:2px;box-shadow:0 1px 4px rgba(0,0,0,.16);box-sizing:border-box;clear:both;display:block;margin:3rem 1.25rem 0 auto;padding:1rem 1rem 1rem 1.25rem;position:relative}.jitm-card:after{clear:both;content:".";display:block;height:0;visibility:hidden}.jitm-card.is-compact{margin-bottom:.0625rem}@media(min-width:481px){.jitm-card.is-compact{margin-bottom:1px;padding:1rem 1.5rem}}.jitm-card.is-card-link{padding-right:3rem}.my-jetpack-jitm-card .jitm-card{margin-bottom:0;margin-right:0}#screen-meta-links+.jitm-card{margin:2.5rem 1.5385em 0 auto}.post-php .jitm-card{margin-right:0}.jp-lower .jitm-card{margin:0 0 1.5rem}.jitm-banner.jitm-card{display:flex;position:relative;z-index:2}.jitm-banner.jitm-card:before{border-bottom-left-radius:1px;border-top-left-radius:1px;content:"";height:100%;left:0;position:absolute;top:0;width:4px}@media(max-width:480px){.jitm-banner.jitm-card{display:flex;flex-direction:column}}.jitm-banner.jitm-card.is-card-link{padding:.75rem 3rem .75rem 1rem}.jitm-banner.jitm-card.is-dismissible{padding-right:3rem}.jitm-banner.jitm-card:before{background-color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon{color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon-circle{background-color:#4ab866}.jitm-banner.jitm-card.is-upgrade-personal:before{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon{color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon-circle{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-premium:before{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon{color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon-circle{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-business:before,.jitm-banner.jitm-card.woo-jitm:before{background-color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon{color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon-circle,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon-circle{background-color:#855da6}.jitm-banner.jitm-card .jitm-card__link-indicator{align-items:center;color:#0087be;display:flex}.jitm-banner.jitm-card:hover{transition:all .1s ease-in-out}.jitm-banner.jitm-card:hover.is-card-link{box-shadow:0 0 0 1px #a2a2a2,0 2px 4px #d5d5d5}.jitm-banner.jitm-card:hover .jitm-card__link-indicator{color:#005082}@media(min-width:481px){.jitm-banner.jitm-card{padding:1rem 1rem 1rem 1.25rem}.jitm-banner.jitm-card.is-dismissible{padding-right:1rem}}.jitm-banner__buttons_container{display:flex;gap:1rem;height:50%;margin:auto 1rem auto 0;overflow:hidden}@media(min-width:481px){.jitm-banner__buttons_container{margin-left:1rem}}.jitm-banner__icons{display:flex}.jitm-banner__icons .jitm-banner__icon,.jitm-banner__icons .jitm-banner__icon-circle{border-radius:50%;flex-shrink:0;height:1.5rem;margin-right:1rem;margin-top:-.125rem;text-align:center;top:.25rem;width:1.5rem}.jitm-banner__icons .jitm-banner__icon{align-self:center;color:#fff;display:block}.jitm-banner__icons .jitm-banner__icon-circle{color:#fff;display:none;padding:.1875rem .25rem .25rem .1875rem}@media(min-width:481px){.jitm-banner__icons{align-items:center}.jitm-banner__icons .jitm-banner__icon{display:none}.jitm-banner__icons .jitm-banner__icon-circle{display:block}}.jitm-banner__icon-plan{display:flex;margin-right:1rem}.jitm-banner__icon-plan .dops-plan-icon{height:2rem;width:2rem}.jitm-banner__icon-plan .jp-emblem{position:relative;top:.125rem}@media(max-width:480px){.jitm-banner__icon-plan .jp-emblem{margin-bottom:1rem}}.jitm-banner__icon-plan .jp-emblem svg{fill:#069e08;height:2rem;width:2rem}.jitm-banner__icon-plan .jp-emblem .jitm-jp-logo{fill:inherit;height:inherit;width:2.5rem}@media(min-width:481px){.jitm-banner__icon-plan{align-items:center}}.jitm-banner__content{align-items:center;display:flex;flex-grow:1;flex-shrink:100000;flex-wrap:wrap}@media(max-width:480px){.jitm-banner__content{margin-right:0}}@media(min-width:481px){.jitm-banner__content{flex-wrap:nowrap}}@media(max-width:960px){.jitm-banner__content{margin-right:5px}}.jitm-banner__info{flex-grow:1;line-height:1.4}@media(min-width:481px){.jitm-banner__info{flex-basis:50%}}@media(min-width:961px){.jitm-banner__info{flex-basis:70%}}.jitm-banner__info .jitm-banner__description,.jitm-banner__info .jitm-banner__description a,.jitm-banner__info .jitm-banner__title{color:#000}.jitm-banner__info .jitm-banner__title{font-size:.9375rem;font-weight:700;line-height:136%}.jitm-banner__info .jitm-banner__description{font-size:.8125rem;line-height:150%;margin-top:.125rem}.jitm-banner__info .banner__list{font-size:12px;list-style:none;margin:10px 0}.jitm-banner__info .banner__list li{margin:6px 0}.jitm-banner__info .banner__list li .gridicon{fill:#a2a2a2;display:inline;margin-right:12px;vertical-align:bottom}.jitm-banner__action{align-self:center;font-size:.75rem;overflow:hidden;text-align:left}.jitm-banner__action .jitm-banner__prices{display:flex;justify-content:flex-start}.jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:0}.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted,.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted .dops-plan-price__currency-symbol{color:#414141}.has-call-to-action .jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:.5rem}@media(max-width:480px){.jitm-banner__action{margin-top:1rem}}@media(min-width:481px){.jitm-banner__action{text-align:center;width:auto}.jitm-banner__action .is-dismissible{margin-top:2.5rem}.jitm-banner__action .jitm-banner__prices{justify-content:flex-end;text-align:right}}.jitm-banner__dismiss{display:block;line-height:.5;margin-bottom:auto;margin-top:auto;text-decoration:none}.jitm-banner__dismiss:before{color:#6f6f6f;content:"";font:400 20px/1 dashicons}@media(min-width:661px){.jitm-banner__dismiss{margin-right:-.5rem}}@media(max-width:480px){.jitm-banner__dismiss{align-items:center;display:flex;height:48px;justify-content:center;margin:0;position:absolute;right:0;top:0;width:48px}}.jitm-banner__action+.jitm-banner__dismiss{margin-left:.625rem}#dolly+.jitm-card{margin:3rem 1rem 0 auto}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.js b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.js
new file mode 100644
index 00000000..f9066d9a
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.js
@@ -0,0 +1 @@
+!function(){"use strict";var t,a={567:function(t){t.exports=window.jQuery}},e={};function n(t){var i=e[t];if(void 0!==i)return i.exports;var c=e[t]={exports:{}};return a[t](c,c.exports,n),c.exports}n.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(a,{a:a}),a},n.d=function(t,a){for(var e in a)n.o(a,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:a[e]})},n.o=function(t,a){return Object.prototype.hasOwnProperty.call(t,a)},t=n(567),n.n(t)()(document).ready((function(t){var a={default:function(a){const e='\n\t\t\t\t\n\t\t\t\t';var n='
")}},e=function(){t(".jetpack-jitm-message").each((function(){var e=t(this),n=e.data("message-path"),i=e.data("query"),c=e.data("redirect"),o=location.hash;o=o.replace(/#\//,"_"),n.includes("jetpack_page_my-jetpack")?n=n.replace("jetpack_page_my-jetpack","jetpack_page_my-jetpack"+o):"_dashboard"!==o&&(n=n.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:n,query:i,full_jp_logo_exists:r,_wpnonce:e.data("nonce")}).then((function(n){"object"==typeof n&&n[1]&&(n=[n[1]]),0!==n.length&&n[0].content&&function(e,n,i){var c;(c=n.template)&&a[c]||(c="default"),n.url=n.url+"&redirect="+i;var o,r=a[c](n);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:n.id,feature_class:n.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(){if(t("#jitm-banner__activate a").text(window.jitm_config.activated_module_text),t("#jitm-banner__activate a").attr("disabled",!0),a.data("settings_link"))return t("#jitm-banner__settings").show(),void t("#jitm-banner__activate").hide();setTimeout((function(){r.fadeOut("slow")}),2e3)}))})),r.find(".jitm-button[data-ajax-action]").on("click",(function(a){a.preventDefault();var n=t(this);return n.attr("disabled",!0),t.post(window.ajaxurl,{action:n.data("ajax-action"),_nonce:e.data("ajax-nonce")}).done((function(){r.fadeOut("slow")})).fail((function(){n.attr("disabled",!1)})),!1})),r.find(".jitm-button").on("click",(function(a){var e=t(this),n=e.attr("data-jptracks-name");if(void 0!==n){var i={clicked:e.attr("data-jptracks-prop")||!1,jitm_message_path:e.attr("data-jitm-path")||!1};window.jpTracksAJAX&&window.jpTracksAJAX.record_ajax_event(n,"click",i)}}))}(e,n[0],c)}))}))};e(),t(window).on("hashchange",(function(t){const a=t.originalEvent.newURL;if(["jetpack","my-jetpack","jetpack-backup","jetpack-boost","jetpack-protect","jetpack-search","jetpack-social","jetpack-videopress"].some((t=>a.includes(`admin.php?page=${t}`)))){var n=document.querySelector(".jitm-card");n&&n.remove(),e()}}))}))}();
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.rtl.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.rtl.css
new file mode 100644
index 00000000..1cde88b8
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.rtl.css
@@ -0,0 +1 @@
+.jitm-button{-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #000;border-radius:4px;box-sizing:border-box;color:#000;cursor:pointer;display:inline-block;font-size:14px;font-weight:600;margin:0;min-width:90px;outline:0;overflow:hidden;padding:7px 14px 9px;text-align:center;text-decoration:none;text-overflow:ellipsis;vertical-align:top;width:100%}.jitm-button.is-primary{background:#000;color:#fff}.jitm-button.is-primary .gridicons-external-link{fill:#fff}.jitm-button.is-secondary .gridicons-external-link{fill:#000}.jitm-button.is-secondary:hover{background:#f6f7f7;color:#000}.jitm-button.is-secondary:hover .gridicons-external-link{fill:#000}.jitm-button:focus,.jitm-button:hover{background:#414141;border-color:#414141;color:#fff}.jitm-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2271b1}.jitm-button:disabled,.jitm-button[disabled]{background:#dcdcde;border-color:#dcdcde;color:#a7aaad;cursor:default}.jitm-button.is-compact{font-size:14px;height:32px;line-height:1;white-space:nowrap}.jitm-button.is-compact .gridicon{margin-top:-8px;top:4px}.jitm-button.is-compact .gridicons-plus-small{margin-right:-4px}.jitm-button.is-compact .gridicons-plus-small:last-of-type{margin-right:0}.jitm-button.is-compact .gridicons-plus-small+.gridicon{margin-right:-4px}.jitm-button.is-compact .gridicons-external-link{margin:-3px 2px -3px 0}.jitm-button.hidden{display:none}.jitm-card{background-color:#fff;background-image:url(images/background-165b2f00927a762c8cf4.png);background-position:0;background-repeat:no-repeat;border:1px solid #fff;border-radius:2px;box-shadow:0 1px 4px rgba(0,0,0,.16);box-sizing:border-box;clear:both;display:block;margin:3rem auto 0 1.25rem;padding:1rem 1.25rem 1rem 1rem;position:relative}.jitm-card:after{clear:both;content:".";display:block;height:0;visibility:hidden}.jitm-card.is-compact{margin-bottom:.0625rem}@media(min-width:481px){.jitm-card.is-compact{margin-bottom:1px;padding:1rem 1.5rem}}.jitm-card.is-card-link{padding-left:3rem}.my-jetpack-jitm-card .jitm-card{margin-bottom:0;margin-left:0}#screen-meta-links+.jitm-card{margin:2.5rem auto 0 1.5385em}.post-php .jitm-card{margin-left:0}.jp-lower .jitm-card{margin:0 0 1.5rem}.jitm-banner.jitm-card{display:flex;position:relative;z-index:2}.jitm-banner.jitm-card:before{border-bottom-right-radius:1px;border-top-right-radius:1px;content:"";height:100%;position:absolute;right:0;top:0;width:4px}@media(max-width:480px){.jitm-banner.jitm-card{display:flex;flex-direction:column}}.jitm-banner.jitm-card.is-card-link{padding:.75rem 1rem .75rem 3rem}.jitm-banner.jitm-card.is-dismissible{padding-left:3rem}.jitm-banner.jitm-card:before{background-color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon{color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon-circle{background-color:#4ab866}.jitm-banner.jitm-card.is-upgrade-personal:before{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon{color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon-circle{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-premium:before{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon{color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon-circle{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-business:before,.jitm-banner.jitm-card.woo-jitm:before{background-color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon{color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon-circle,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon-circle{background-color:#855da6}.jitm-banner.jitm-card .jitm-card__link-indicator{align-items:center;color:#0087be;display:flex}.jitm-banner.jitm-card:hover{transition:all .1s ease-in-out}.jitm-banner.jitm-card:hover.is-card-link{box-shadow:0 0 0 1px #a2a2a2,0 2px 4px #d5d5d5}.jitm-banner.jitm-card:hover .jitm-card__link-indicator{color:#005082}@media(min-width:481px){.jitm-banner.jitm-card{padding:1rem 1.25rem 1rem 1rem}.jitm-banner.jitm-card.is-dismissible{padding-left:1rem}}.jitm-banner__buttons_container{display:flex;gap:1rem;height:50%;margin:auto 0 auto 1rem;overflow:hidden}@media(min-width:481px){.jitm-banner__buttons_container{margin-right:1rem}}.jitm-banner__icons{display:flex}.jitm-banner__icons .jitm-banner__icon,.jitm-banner__icons .jitm-banner__icon-circle{border-radius:50%;flex-shrink:0;height:1.5rem;margin-left:1rem;margin-top:-.125rem;text-align:center;top:.25rem;width:1.5rem}.jitm-banner__icons .jitm-banner__icon{align-self:center;color:#fff;display:block}.jitm-banner__icons .jitm-banner__icon-circle{color:#fff;display:none;padding:.1875rem .1875rem .25rem .25rem}@media(min-width:481px){.jitm-banner__icons{align-items:center}.jitm-banner__icons .jitm-banner__icon{display:none}.jitm-banner__icons .jitm-banner__icon-circle{display:block}}.jitm-banner__icon-plan{display:flex;margin-left:1rem}.jitm-banner__icon-plan .dops-plan-icon{height:2rem;width:2rem}.jitm-banner__icon-plan .jp-emblem{position:relative;top:.125rem}@media(max-width:480px){.jitm-banner__icon-plan .jp-emblem{margin-bottom:1rem}}.jitm-banner__icon-plan .jp-emblem svg{fill:#069e08;height:2rem;width:2rem}.jitm-banner__icon-plan .jp-emblem .jitm-jp-logo{fill:inherit;height:inherit;width:2.5rem}@media(min-width:481px){.jitm-banner__icon-plan{align-items:center}}.jitm-banner__content{align-items:center;display:flex;flex-grow:1;flex-shrink:100000;flex-wrap:wrap}@media(max-width:480px){.jitm-banner__content{margin-left:0}}@media(min-width:481px){.jitm-banner__content{flex-wrap:nowrap}}@media(max-width:960px){.jitm-banner__content{margin-left:5px}}.jitm-banner__info{flex-grow:1;line-height:1.4}@media(min-width:481px){.jitm-banner__info{flex-basis:50%}}@media(min-width:961px){.jitm-banner__info{flex-basis:70%}}.jitm-banner__info .jitm-banner__description,.jitm-banner__info .jitm-banner__description a,.jitm-banner__info .jitm-banner__title{color:#000}.jitm-banner__info .jitm-banner__title{font-size:.9375rem;font-weight:700;line-height:136%}.jitm-banner__info .jitm-banner__description{font-size:.8125rem;line-height:150%;margin-top:.125rem}.jitm-banner__info .banner__list{font-size:12px;list-style:none;margin:10px 0}.jitm-banner__info .banner__list li{margin:6px 0}.jitm-banner__info .banner__list li .gridicon{fill:#a2a2a2;display:inline;margin-left:12px;vertical-align:bottom}.jitm-banner__action{align-self:center;font-size:.75rem;overflow:hidden;text-align:right}.jitm-banner__action .jitm-banner__prices{display:flex;justify-content:flex-start}.jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:0}.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted,.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted .dops-plan-price__currency-symbol{color:#414141}.has-call-to-action .jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:.5rem}@media(max-width:480px){.jitm-banner__action{margin-top:1rem}}@media(min-width:481px){.jitm-banner__action{text-align:center;width:auto}.jitm-banner__action .is-dismissible{margin-top:2.5rem}.jitm-banner__action .jitm-banner__prices{justify-content:flex-end;text-align:left}}.jitm-banner__dismiss{display:block;line-height:.5;margin-bottom:auto;margin-top:auto;text-decoration:none}.jitm-banner__dismiss:before{color:#6f6f6f;content:"";font:400 20px/1 dashicons}@media(min-width:661px){.jitm-banner__dismiss{margin-left:-.5rem}}@media(max-width:480px){.jitm-banner__dismiss{align-items:center;display:flex;height:48px;justify-content:center;left:0;margin:0;position:absolute;top:0;width:48px}}.jitm-banner__action+.jitm-banner__dismiss{margin-right:.625rem}#dolly+.jitm-card{margin:3rem auto 0 1rem}
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/composer.json
new file mode 100644
index 00000000..96b1342d
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/composer.json
@@ -0,0 +1,63 @@
+{
+ "name": "automattic/jetpack-jitm",
+ "description": "Just in time messages for Jetpack",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {
+ "automattic/jetpack-a8c-mc-stats": "^1.4.22",
+ "automattic/jetpack-assets": "^1.18.13",
+ "automattic/jetpack-connection": "^1.58.2",
+ "automattic/jetpack-device-detection": "^1.4.27",
+ "automattic/jetpack-logo": "^1.6.3",
+ "automattic/jetpack-partner": "^1.7.25",
+ "automattic/jetpack-redirect": "^1.7.27",
+ "automattic/jetpack-status": "^1.18.5"
+ },
+ "require-dev": {
+ "brain/monkey": "2.6.1",
+ "yoast/phpunit-polyfills": "1.1.0",
+ "automattic/jetpack-changelogger": "^3.3.11"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "build-production": [
+ "pnpm run build-production"
+ ],
+ "build-development": [
+ "pnpm run build"
+ ],
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "test-php": [
+ "@composer phpunit"
+ ],
+ "watch": [
+ "Composer\\Config::disableProcessTimeout",
+ "pnpm run watch"
+ ]
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-jitm",
+ "textdomain": "jetpack-jitm",
+ "version-constants": {
+ "::PACKAGE_VERSION": "src/class-jitm.php"
+ },
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}"
+ },
+ "branch-alias": {
+ "dev-trunk": "2.5.x-dev"
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php
new file mode 100644
index 00000000..32ce193e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php
@@ -0,0 +1,313 @@
+register();
+ }
+
+ /**
+ * Pre/Post Connection JITM factory metod
+ *
+ * @return Post_Connection_JITM|Pre_Connection_JITM JITM instance.
+ */
+ public static function get_instance() {
+ if ( ( new Connection_Manager() )->is_connected() ) {
+ $jitm = new Post_Connection_JITM();
+ } else {
+ $jitm = new Pre_Connection_JITM();
+ }
+ return $jitm;
+ }
+
+ /**
+ * Sets up JITM action callbacks if needed.
+ */
+ public function register() {
+ if ( did_action( 'jetpack_registered_jitms' ) ) {
+ // JITMs have already been registered.
+ return;
+ }
+
+ if ( ! $this->jitms_enabled() ) {
+ // Do nothing.
+ return;
+ }
+
+ add_action( 'rest_api_init', array( __NAMESPACE__ . '\\Rest_Api_Endpoints', 'register_endpoints' ) );
+
+ add_action( 'current_screen', array( $this, 'prepare_jitms' ) );
+
+ /**
+ * These are sync actions that we need to keep track of for jitms.
+ */
+ add_filter( 'jetpack_sync_before_send_updated_option', array( $this, 'jetpack_track_last_sync_callback' ), 99 );
+
+ /**
+ * Fires when the JITMs are registered. This action is used to ensure that
+ * JITMs are registered only once.
+ *
+ * @since 1.16.0
+ */
+ do_action( 'jetpack_registered_jitms' );
+ }
+
+ /**
+ * Checks the jetpack_just_in_time_msgs filters and whether the site
+ * is offline to determine whether JITMs are enabled.
+ *
+ * @return bool True if JITMs are enabled, else false.
+ */
+ public function jitms_enabled() {
+ /**
+ * Filter to turn off all just in time messages
+ *
+ * @since 1.1.0
+ * @since-jetpack 3.7.0
+ * @since-jetpack 5.4.0 Correct docblock to reflect default arg value
+ *
+ * @param bool true Whether to show just in time messages.
+ */
+ if ( ! apply_filters( 'jetpack_just_in_time_msgs', true ) ) {
+ return false;
+ }
+
+ // Folks cannot connect to WordPress.com and won't really be able to act on the pre-connection messages. So bail.
+ if ( ( new Status() )->is_offline_mode() ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Prepare actions according to screen and post type.
+ *
+ * @since 1.1.0
+ * @since-jetpack 3.8.2
+ *
+ * @uses Jetpack_Autoupdate::get_possible_failures()
+ *
+ * @param \WP_Screen $screen WP Core's screen object.
+ */
+ public function prepare_jitms( $screen ) {
+ /**
+ * Filter to hide JITMs on certain screens.
+ *
+ * @since 1.14.0
+ *
+ * @param bool true Whether to show just in time messages.
+ * @param string $string->id The ID of the current screen.
+ */
+ if ( apply_filters( 'jetpack_display_jitms_on_screen', true, $screen->id ) ) {
+ add_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) );
+ add_action( 'admin_notices', array( $this, 'ajax_message' ) );
+ add_action( 'edit_form_top', array( $this, 'ajax_message' ) );
+ }
+ }
+
+ /**
+ * Function to enqueue jitm css and js
+ */
+ public function jitm_enqueue_files() {
+ if ( $this->is_gutenberg_page() ) {
+ return;
+ }
+
+ Assets::register_script(
+ 'jetpack-jitm',
+ '../build/index.js',
+ __FILE__,
+ array(
+ 'in_footer' => true,
+ 'dependencies' => array( 'jquery' ),
+ )
+ );
+ Assets::enqueue_script( 'jetpack-jitm' );
+ wp_localize_script(
+ 'jetpack-jitm',
+ 'jitm_config',
+ array(
+ 'api_root' => esc_url_raw( rest_url() ),
+ 'activate_module_text' => esc_html__( 'Activate', 'jetpack-jitm' ),
+ 'activated_module_text' => esc_html__( 'Activated', 'jetpack-jitm' ),
+ 'activating_module_text' => esc_html__( 'Activating', 'jetpack-jitm' ),
+ 'settings_module_text' => esc_html__( 'Settings', 'jetpack-jitm' ),
+ 'nonce' => wp_create_nonce( 'wp_rest' ),
+ )
+ );
+ }
+
+ /**
+ * Is the current page a block editor page?
+ *
+ * @since 1.1.0
+ * @since-jetpack 8.0.0
+ */
+ public function is_gutenberg_page() {
+ $current_screen = get_current_screen();
+ return ( method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() );
+ }
+
+ /**
+ * Get's the current message path for display of a JITM
+ *
+ * @return string The message path
+ */
+ public function get_message_path() {
+ $screen = get_current_screen();
+
+ return 'wp:' . $screen->id . ':' . current_filter();
+ }
+
+ /**
+ * Injects the dom to show a JITM inside of wp-admin.
+ */
+ public function ajax_message() {
+ if ( ! is_admin() ) {
+ return;
+ }
+
+ // do not display on Gutenberg pages.
+ if ( $this->is_gutenberg_page() ) {
+ return;
+ }
+
+ $message_path = $this->get_message_path();
+ $query_string = _http_build_query( $_GET, '', ',' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
+ $current_screen = isset( $_SERVER['REQUEST_URI'] ) ? wp_unslash( $_SERVER['REQUEST_URI'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- Escaped below
+ ?>
+
+ ' . ( ( $full_jp_logo_exists ) ? $jetpack_logo->get_jp_emblem() : $jetpack_logo->get_jp_emblem_larger() ) . '';
+ break;
+ case 'woocommerce':
+ $content_icon = '';
+ break;
+ default:
+ $content_icon = '';
+ break;
+ }
+ return $content_icon;
+ }
+
+ /**
+ * Returns an array containing the supported icons for JITMs.
+ *
+ * The list includes an empty string, which is used when no icon should be displayed.
+ *
+ * @return array The list of supported icons.
+ */
+ public function get_supported_icons() {
+ return array(
+ 'jetpack',
+ 'woocommerce',
+ '',
+ );
+ }
+
+ /**
+ * Stores dismiss data into an option
+ *
+ * @param string $key Dismiss key.
+ */
+ public function save_dismiss( $key ) {
+ $hide_jitm = \Jetpack_Options::get_option( 'hide_jitm' );
+ if ( ! is_array( $hide_jitm ) ) {
+ $hide_jitm = array();
+ }
+
+ if ( ! isset( $hide_jitm[ $key ] ) || ! is_array( $hide_jitm[ $key ] ) ) {
+ $hide_jitm[ $key ] = array(
+ 'last_dismissal' => 0,
+ 'number' => 0,
+ );
+ }
+
+ $hide_jitm[ $key ] = array(
+ 'last_dismissal' => time(),
+ 'number' => $hide_jitm[ $key ]['number'] + 1,
+ );
+
+ \Jetpack_Options::update_option( 'hide_jitm', $hide_jitm );
+ }
+
+ /**
+ * Sets the 'jetpack_last_plugin_sync' transient when the active_plugins option is synced.
+ *
+ * @param array $params The action parameters.
+ *
+ * @return array Returns the action parameters unchanged.
+ */
+ public function jetpack_track_last_sync_callback( $params ) {
+ /**
+ * This filter is documented in the Automattic\Jetpack\JITMS\Post_Connection_JITM class.
+ */
+ if ( ! apply_filters( 'jetpack_just_in_time_msg_cache', true ) ) {
+ return $params;
+ }
+
+ if ( is_array( $params ) && isset( $params[0] ) ) {
+ $option = $params[0];
+ if ( 'active_plugins' === $option ) {
+ // Use the cache if we can, but not terribly important if it gets evicted.
+ set_transient( 'jetpack_last_plugin_sync', time(), HOUR_IN_SECONDS );
+ }
+ }
+
+ return $params;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-post-connection-jitm.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-post-connection-jitm.php
new file mode 100644
index 00000000..bd18d3ab
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-post-connection-jitm.php
@@ -0,0 +1,417 @@
+tracking = new Tracking();
+ }
+
+ /**
+ * A special filter for WooCommerce, to set a message based on local state.
+ *
+ * @param string $content The current message.
+ *
+ * @return array The new message.
+ */
+ public static function jitm_woocommerce_services_msg( $content ) {
+ if ( ! function_exists( 'wc_get_base_location' ) ) {
+ return $content;
+ }
+
+ $base_location = wc_get_base_location();
+
+ switch ( $base_location['country'] ) {
+ case 'US':
+ $content->message = esc_html__( 'New free service: Show USPS shipping rates on your store! Added bonus: print shipping labels without leaving WooCommerce.', 'jetpack-jitm' );
+ break;
+ case 'CA':
+ $content->message = esc_html__( 'New free service: Show Canada Post shipping rates on your store!', 'jetpack-jitm' );
+ break;
+ default:
+ $content->message = '';
+ }
+
+ return $content;
+ }
+
+ /**
+ * A special filter for WooCommerce Call To Action button
+ *
+ * @return string The new CTA
+ */
+ public static function jitm_jetpack_woo_services_install() {
+ return wp_nonce_url(
+ add_query_arg(
+ array(
+ 'wc-services-action' => 'install',
+ ),
+ admin_url( 'admin.php?page=wc-settings' )
+ ),
+ 'wc-services-install'
+ );
+ }
+
+ /**
+ * A special filter for WooCommerce Call To Action button.
+ *
+ * @return string The new CTA
+ */
+ public static function jitm_jetpack_woo_services_activate() {
+ return wp_nonce_url(
+ add_query_arg(
+ array(
+ 'wc-services-action' => 'activate',
+ ),
+ admin_url( 'admin.php?page=wc-settings' )
+ ),
+ 'wc-services-install'
+ );
+ }
+
+ /**
+ * A special filter used in the CTA of a JITM offering to install the Creative Mail plugin.
+ *
+ * @return string The new CTA
+ */
+ public static function jitm_jetpack_creative_mail_install() {
+ return wp_nonce_url(
+ add_query_arg(
+ array(
+ 'creative-mail-action' => 'install',
+ ),
+ admin_url( 'edit.php?post_type=feedback' )
+ ),
+ 'creative-mail-install'
+ );
+ }
+
+ /**
+ * A special filter used in the CTA of a JITM offering to activate the Creative Mail plugin.
+ *
+ * @return string The new CTA
+ */
+ public static function jitm_jetpack_creative_mail_activate() {
+ return wp_nonce_url(
+ add_query_arg(
+ array(
+ 'creative-mail-action' => 'activate',
+ ),
+ admin_url( 'edit.php?post_type=feedback' )
+ ),
+ 'creative-mail-install'
+ );
+ }
+
+ /**
+ * A special filter used in the CTA of a JITM offering to install the Jetpack Backup plugin.
+ *
+ * @return string The new CTA
+ */
+ public static function jitm_jetpack_backup_install() {
+ return wp_nonce_url(
+ add_query_arg(
+ array(
+ 'jetpack-backup-action' => 'install',
+ ),
+ admin_url( 'admin.php?page=jetpack' )
+ ),
+ 'jetpack-backup-install'
+ );
+ }
+
+ /**
+ * A special filter used in the CTA of a JITM offering to activate the Jetpack Backup plugin.
+ *
+ * @return string The new CTA
+ */
+ public static function jitm_jetpack_backup_activate() {
+ return wp_nonce_url(
+ add_query_arg(
+ array(
+ 'jetpack-backup-action' => 'activate',
+ ),
+ admin_url( 'admin.php?page=jetpack' )
+ ),
+ 'jetpack-backup-install'
+ );
+ }
+
+ /**
+ * A special filter used in the CTA of a JITM offering to install the Jetpack Boost plugin.
+ *
+ * @return string The new CTA
+ */
+ public static function jitm_jetpack_boost_install() {
+ return wp_nonce_url(
+ add_query_arg(
+ array(
+ 'jetpack-boost-action' => 'install',
+ ),
+ admin_url( 'admin.php?page=jetpack' )
+ ),
+ 'jetpack-boost-install'
+ );
+ }
+
+ /**
+ * A special filter used in the CTA of a JITM offering to activate the Jetpack Boost plugin.
+ *
+ * @return string The new CTA
+ */
+ public static function jitm_jetpack_boost_activate() {
+ return wp_nonce_url(
+ add_query_arg(
+ array(
+ 'jetpack-boost-action' => 'activate',
+ ),
+ admin_url( 'admin.php?page=jetpack' )
+ ),
+ 'jetpack-boost-install'
+ );
+ }
+
+ /**
+ * Dismisses a JITM feature class so that it will no longer be shown.
+ *
+ * @param string $id The id of the JITM that was dismissed.
+ * @param string $feature_class The feature class of the JITM that was dismissed.
+ *
+ * @return bool Always true.
+ */
+ public function dismiss( $id, $feature_class ) {
+ $this->tracking->record_user_event(
+ 'jitm_dismiss_client',
+ array(
+ 'jitm_id' => $id,
+ 'feature_class' => $feature_class,
+ )
+ );
+ $this->save_dismiss( $feature_class );
+ return true;
+ }
+
+ /**
+ * Asks the wpcom API for the current message to display keyed on query string and message path
+ *
+ * @param string $message_path The message path to ask for.
+ * @param string $query The query string originally from the front end.
+ * @param bool $full_jp_logo_exists If there is a full Jetpack logo already on the page.
+ *
+ * @return array The JITM's to show, or an empty array if there is nothing to show
+ */
+ public function get_messages( $message_path, $query, $full_jp_logo_exists ) {
+ // WooCommerce Services.
+ add_filter( 'jitm_woocommerce_services_msg', array( $this, 'jitm_woocommerce_services_msg' ) );
+ add_filter( 'jitm_jetpack_woo_services_install', array( $this, 'jitm_jetpack_woo_services_install' ) );
+ add_filter( 'jitm_jetpack_woo_services_activate', array( $this, 'jitm_jetpack_woo_services_activate' ) );
+
+ // Creative Mail.
+ add_filter( 'jitm_jetpack_creative_mail_install', array( $this, 'jitm_jetpack_creative_mail_install' ) );
+ add_filter( 'jitm_jetpack_creative_mail_activate', array( $this, 'jitm_jetpack_creative_mail_activate' ) );
+
+ // Jetpack Backup.
+ add_filter( 'jitm_jetpack_backup_install', array( $this, 'jitm_jetpack_backup_install' ) );
+ add_filter( 'jitm_jetpack_backup_activate', array( $this, 'jitm_jetpack_backup_activate' ) );
+
+ // Jetpack Boost.
+ add_filter( 'jitm_jetpack_boost_install', array( $this, 'jitm_jetpack_boost_install' ) );
+ add_filter( 'jitm_jetpack_boost_activate', array( $this, 'jitm_jetpack_boost_activate' ) );
+
+ $user = wp_get_current_user();
+
+ // Unauthenticated or invalid requests just bail.
+ if ( ! $user ) {
+ return array();
+ }
+
+ $user_roles = implode( ',', $user->roles );
+ $site_id = \Jetpack_Options::get_option( 'id' );
+
+ // Build our jitm request.
+ $path = add_query_arg(
+ array(
+ 'external_user_id' => urlencode_deep( $user->ID ),
+ 'user_roles' => urlencode_deep( $user_roles ),
+ 'query_string' => urlencode_deep( build_query( $query ) ),
+ 'mobile_browser' => Device_Detection::is_smartphone() ? 1 : 0,
+ '_locale' => get_user_locale(),
+ ),
+ sprintf( '/sites/%d/jitm/%s', $site_id, $message_path )
+ );
+
+ // Attempt to get from cache.
+ $envelopes = get_transient( 'jetpack_jitm_' . substr( md5( $path ), 0, 31 ) );
+
+ // If something is in the cache and it was put in the cache after the last sync we care about, use it.
+ $use_cache = false;
+
+ /**
+ * Filter to turn off jitm caching
+ *
+ * @since 1.1.0
+ * @since-jetpack 5.4.0
+ *
+ * @param bool true Whether to cache just in time messages
+ */
+ if ( apply_filters( 'jetpack_just_in_time_msg_cache', true ) ) {
+ $use_cache = true;
+ }
+
+ if ( $use_cache ) {
+ $last_sync = (int) get_transient( 'jetpack_last_plugin_sync' );
+ $from_cache = $envelopes && $last_sync > 0 && $last_sync < $envelopes['last_response_time'];
+ } else {
+ $from_cache = false;
+ }
+
+ // Otherwise, ask again.
+ if ( ! $from_cache ) {
+ $wpcom_response = Client::wpcom_json_api_request_as_blog(
+ $path,
+ '2',
+ array(
+ 'user_id' => $user->ID,
+ 'user_roles' => implode( ',', $user->roles ),
+ ),
+ null,
+ 'wpcom'
+ );
+
+ // silently fail...might be helpful to track it?
+ if ( is_wp_error( $wpcom_response ) ) {
+ return array();
+ }
+
+ $envelopes = json_decode( $wpcom_response['body'] );
+
+ if ( ! is_array( $envelopes ) ) {
+ return array();
+ }
+
+ $expiration = isset( $envelopes[0] ) ? $envelopes[0]->ttl : 300;
+
+ // Do not cache if expiration is 0 or we're not using the cache.
+ if ( 0 !== $expiration && $use_cache ) {
+ $envelopes['last_response_time'] = time();
+
+ set_transient( 'jetpack_jitm_' . substr( md5( $path ), 0, 31 ), $envelopes, $expiration );
+ }
+ }
+
+ $hidden_jitms = \Jetpack_Options::get_option( 'hide_jitm' );
+ unset( $envelopes['last_response_time'] );
+
+ /**
+ * Allow adding your own custom JITMs after a set of JITMs has been received.
+ *
+ * @since 1.1.0
+ * @since-jetpack 6.9.0
+ * @since-jetpack 8.3.0 - Added Message path.
+ *
+ * @param array $envelopes array of existing JITMs.
+ * @param string $message_path The message path to ask for.
+ */
+ $envelopes = apply_filters( 'jetpack_jitm_received_envelopes', $envelopes, $message_path );
+
+ foreach ( $envelopes as $idx => &$envelope ) {
+
+ $dismissed_feature = isset( $hidden_jitms[ $envelope->feature_class ] ) && is_array( $hidden_jitms[ $envelope->feature_class ] ) ? $hidden_jitms[ $envelope->feature_class ] : null;
+
+ // If the this feature class has been dismissed and the request has not passed the ttl, skip it as it's been dismissed.
+ if ( is_array( $dismissed_feature ) && ( time() - $dismissed_feature['last_dismissal'] < $envelope->expires || $dismissed_feature['number'] >= $envelope->max_dismissal ) ) {
+ unset( $envelopes[ $idx ] );
+ continue;
+ }
+
+ $this->tracking->record_user_event(
+ 'jitm_view_client',
+ array(
+ 'jitm_id' => $envelope->id,
+ 'jitm_message_path' => $message_path,
+ )
+ );
+
+ $url_params = array(
+ 'u' => $user->ID,
+ );
+
+ // Get affiliate code and add it to the array of URL parameters.
+ $aff = Partner::init()->get_partner_code( Partner::AFFILIATE_CODE );
+ if ( '' !== $aff ) {
+ $url_params['aff'] = $aff;
+ }
+
+ // Check if the current user has connected their WP.com account
+ // and if not add this information to the the array of URL parameters.
+ if ( ! ( new Manager() )->is_user_connected( $user->ID ) ) {
+ $url_params['query'] = 'unlinked=1';
+ }
+ $envelope->url = esc_url( Redirect::get_url( "jitm-$envelope->id", $url_params ) );
+
+ $stats = new A8c_Mc_Stats();
+
+ $envelope->jitm_stats_url = $stats->build_stats_url( array( 'x_jetpack-jitm' => $envelope->id ) );
+
+ // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
+ // $CTA is not valid per PHPCS, but it is part of the return from WordPress.com, so allowing.
+ if ( $envelope->CTA->hook ) {
+ $envelope->url = apply_filters( 'jitm_' . $envelope->CTA->hook, $envelope->url );
+ unset( $envelope->CTA->hook );
+ }
+ // phpcs:enable
+
+ if ( isset( $envelope->content->hook ) ) {
+ $envelope->content = apply_filters( 'jitm_' . $envelope->content->hook, $envelope->content );
+ unset( $envelope->content->hook );
+ }
+
+ // No point in showing an empty message.
+ if ( empty( $envelope->content->message ) ) {
+ unset( $envelopes[ $idx ] );
+ continue;
+ }
+
+ $envelope->content->icon = $this->generate_icon( $envelope->content->icon, $full_jp_logo_exists );
+ $envelope->message_path = esc_attr( $message_path );
+
+ $stats->add( 'jitm', $envelope->id . '-viewed' );
+ $stats->do_server_side_stats();
+ }
+
+ return $envelopes;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-pre-connection-jitm.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-pre-connection-jitm.php
new file mode 100644
index 00000000..6a779873
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-pre-connection-jitm.php
@@ -0,0 +1,171 @@
+validate_messages( $messages );
+
+ $formatted_messages = array();
+
+ foreach ( $messages as $message ) {
+ if ( ! preg_match( $message['message_path'], $message_path ) ) {
+ continue;
+ }
+
+ $obj = new \stdClass();
+ $obj->CTA = array( // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
+ 'message' => $message['button_caption'],
+ 'newWindow' => false,
+ );
+ $obj->url = $message['button_link'];
+ $obj->id = $message['id'];
+ $obj->is_dismissible = true;
+ $obj->content = array(
+ 'message' => $message['message'],
+ 'description' => $message['description'],
+ 'list' => array(),
+ 'icon' => $this->get_message_icon( $message ),
+ );
+
+ $formatted_messages[] = $obj;
+ }
+
+ return $formatted_messages;
+ }
+
+ /**
+ * Validates that each of the messages contains all of the required keys:
+ * - id
+ * - message_path
+ * - message
+ * - description
+ * - button_link
+ * - button_caption
+ *
+ * @param array $messages An array of JITM messages.
+ *
+ * @return array An array of JITM messages that contain all of the required keys.
+ */
+ private function validate_messages( $messages ) {
+ if ( ! is_array( $messages ) ) {
+ return array();
+ }
+
+ $expected_keys = array_flip( array( 'id', 'message_path', 'message', 'description', 'button_link', 'button_caption' ) );
+
+ foreach ( $messages as $index => $message ) {
+ if ( count( array_intersect_key( $expected_keys, $message ) ) !== count( $expected_keys ) ) {
+ // Remove any messages that are missing expected keys.
+ unset( $messages[ $index ] );
+ }
+ }
+
+ return $messages;
+ }
+
+ /**
+ * Get the icon for the message.
+ *
+ * The message may contain an 'icon' key. If the value of the 'icon' key matches a supported icon (or empty string), the value is used.
+ * If the message does not contain an icon key or if the value does not match a supported icon, the Jetpack icon is used by default.
+ *
+ * @param array $message A pre-connection JITM.
+ *
+ * @return string The icon to use in the JITM.
+ */
+ private function get_message_icon( $message ) {
+ // Default to the Jetpack icon.
+ $icon = 'jetpack';
+
+ if ( ! isset( $message['icon'] ) ) {
+ return $icon;
+ }
+
+ $supported_icons = $this->get_supported_icons();
+
+ if ( in_array( $message['icon'], $supported_icons, true ) ) {
+ // Only use the message icon if it's a supported icon or an empty string (for no icon).
+ $icon = $message['icon'];
+ }
+
+ return $icon;
+ }
+
+ /**
+ * Retrieve the current message to display keyed on query string and message path
+ *
+ * @param string $message_path The message path to ask for.
+ * @param string $query The query string originally from the front end. Unused in this subclass.
+ * @param bool $full_jp_logo_exists If there is a full Jetpack logo already on the page.
+ *
+ * @return array The JITMs to show, or an empty array if there is nothing to show
+ */
+ public function get_messages( $message_path, $query, $full_jp_logo_exists ) {
+ if ( ! current_user_can( 'install_plugins' ) ) {
+ return array();
+ }
+
+ $messages = $this->filter_messages( $message_path );
+
+ if ( empty( $messages ) ) {
+ return array();
+ }
+
+ $hidden_jitms = \Jetpack_Options::get_option( 'hide_jitm' );
+
+ foreach ( $messages as $idx => &$envelope ) {
+ $dismissed_feature = isset( $hidden_jitms[ 'pre-connection-' . $envelope->id ] ) &&
+ is_array( $hidden_jitms[ 'pre-connection-' . $envelope->id ] ) ? $hidden_jitms[ 'pre-connection-' . $envelope->id ] : null;
+
+ if ( is_array( $dismissed_feature ) ) {
+ unset( $messages[ $idx ] );
+ continue;
+ }
+
+ $envelope->content['icon'] = $this->generate_icon( $envelope->content['icon'], $full_jp_logo_exists );
+ }
+
+ return $messages;
+ }
+
+ /**
+ * Dismisses a JITM ID so that it will no longer be shown.
+ *
+ * @param string $id The id of the JITM that was dismissed.
+ *
+ * @return bool Always true
+ */
+ public function dismiss( $id ) {
+ $this->save_dismiss( 'pre-connection-' . $id );
+ return true;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-rest-api-endpoints.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-rest-api-endpoints.php
new file mode 100644
index 00000000..e7d97dc8
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-rest-api-endpoints.php
@@ -0,0 +1,96 @@
+ WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::get_jitm_message',
+ 'permission_callback' => '__return_true',
+ )
+ );
+
+ register_rest_route(
+ 'jetpack/v4',
+ '/jitm',
+ array(
+ 'methods' => WP_REST_Server::CREATABLE,
+ 'callback' => __CLASS__ . '::delete_jitm_message',
+ 'permission_callback' => __CLASS__ . '::delete_jitm_message_permission_callback',
+ )
+ );
+ }
+
+ /**
+ * Asks for a jitm, unless they've been disabled, in which case it returns an empty array
+ *
+ * @param WP_REST_Request $request The request object.
+ *
+ * @return array An array of jitms
+ */
+ public static function get_jitm_message( $request ) {
+ $jitm = JITM::get_instance();
+
+ if ( ! $jitm->jitms_enabled() ) {
+ return array();
+ }
+
+ // add the search term to the query params if it exists
+ $query = $request['query'];
+ if ( ! empty( $request['s'] ) ) {
+ $query['s'] = $request['s'];
+ }
+
+ return $jitm->get_messages( $request['message_path'], urldecode_deep( $query ), 'true' === $request['full_jp_logo_exists'] ? true : false );
+ }
+
+ /**
+ * Dismisses a jitm.
+ *
+ * @param WP_REST_Request $request The request object.
+ *
+ * @return bool Always True
+ */
+ public static function delete_jitm_message( $request ) {
+ $jitm = JITM::get_instance();
+
+ if ( ! $jitm->jitms_enabled() ) {
+ return true;
+ }
+
+ return $jitm->dismiss( $request['id'], $request['feature_class'] );
+ }
+
+ /**
+ * Verify that the user can dismiss JITM messages.
+ *
+ * @return bool|WP_Error True if user is able to dismiss JITM messages.
+ */
+ public static function delete_jitm_message_permission_callback() {
+ if ( current_user_can( 'read' ) ) {
+ return true;
+ }
+
+ return new \WP_Error( 'invalid_user_permission_jetpack_delete_jitm_message', REST_Connector::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/css/jetpack-admin-jitm.scss b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/css/jetpack-admin-jitm.scss
new file mode 100644
index 00000000..f36beefe
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/css/jetpack-admin-jitm.scss
@@ -0,0 +1,501 @@
+// Just in Time Messaging - message prompts
+
+// TODO: Switch to using the `@automattic/jetpack-base-styles` package when its ready.
+@import '../../plugins/jetpack/_inc/client/scss/functions/rem';
+@import '../../plugins/jetpack/_inc/client/scss/variables/colors';
+@import '../../plugins/jetpack/_inc/client/scss/mixins/breakpoints';
+@import '../../plugins/jetpack/_inc/client/scss/calypso-colors';
+
+@mixin clear-fix {
+ &::after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+}
+
+@mixin jitm-banner-color( $color ) {
+ &::before {
+ background-color: $color;
+ }
+
+ .jitm-banner__icon {
+ color: $color;
+ }
+
+ .jitm-banner__icon-circle {
+ background-color: $color;
+ }
+}
+
+// New JITMS - modified calypso banner styles
+$blue-medium-dark: #2271b1;
+$jp-gray: #dcdcde;
+$jp-gray-0: #f6f7f7;
+$jp-gray-20: #a7aaad;
+
+.jitm-button {
+ border-style: solid;
+ border-width: 1px;
+ cursor: pointer;
+ display: inline-block;
+ margin: 0;
+ outline: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ text-decoration: none;
+ vertical-align: top;
+ box-sizing: border-box;
+ font-size: 14px;
+ border-radius: 4px;
+ padding: 7px 14px 9px;
+ -webkit-appearance: none;
+ appearance: none;
+ text-align: center;
+ min-width: 90px;
+ font-weight: 600;
+ border-color: black;
+ background: $white;
+ color: black;
+ width: 100%;
+
+ // Primary buttons
+ &.is-primary {
+ background: black;
+ color: $white;
+ .gridicons-external-link {
+ fill: $white;
+ }
+ }
+
+ // Secondary buttons
+ &.is-secondary {
+ .gridicons-external-link {
+ fill: black;
+ }
+ &:hover{
+ color: black;
+ background: $jp-gray-0;
+ .gridicons-external-link {
+ fill: black;
+ }
+ }
+ }
+
+ &:hover,
+ &:focus {
+ border-color: $gray-dark;
+ background: $gray-dark;
+ color: $white;
+ }
+ &:focus {
+ box-shadow:
+ 0 0 0 1px $white,
+ 0 0 0 3px $blue-medium-dark;
+ }
+
+ &[disabled],
+ &:disabled {
+ color: $jp-gray-20;
+ background: $jp-gray;
+ border-color: $jp-gray;
+ cursor: default;
+ }
+ &.is-compact {
+ height: 32px;
+ font-size: 14px;
+ line-height: 1;
+ white-space: nowrap;
+
+ .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;
+ }
+
+ // Properly align icon with the button text
+ .gridicons-external-link {
+ margin: -3px 0 -3px 2px;
+ }
+ }
+ &.hidden {
+ display: none;
+ }
+}
+
+.jitm-card {
+ display: block;
+ clear: both;
+ position: relative;
+ margin: rem( 48px ) rem( 20px ) 0 auto;
+ padding: rem( 16px );
+ padding-left: rem( 20px );
+ box-sizing: border-box;
+ background-color: $white;
+ background-image: url( "../images/background.png" );
+ background-repeat: no-repeat;
+ background-position: right center;
+ border: 1px solid $white;
+ border-radius: 2px;
+ box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.16);
+
+ @include clear-fix;
+
+ // Compact Card
+ &.is-compact {
+ margin-bottom: rem( 1px );
+
+ @include breakpoint( ">480px" ) {
+ margin-bottom: 1px;
+ padding: rem( 16px ) rem( 24px );
+ }
+ }
+
+ &.is-card-link {
+ padding-right: rem( 48px );
+ }
+}
+
+// Minor adjustments for the display in My Jetpack.
+.my-jetpack-jitm-card {
+ .jitm-card {
+ margin-right: 0;
+ margin-bottom: 0;
+ }
+}
+
+// if JITM appears directly below WordPress "help" menu adjust margins
+#screen-meta-links+.jitm-card {
+ margin: rem( 40px ) 1.5385em 0 auto;
+}
+
+// if JITM appears directly below WordPress hello dolly adjust margins
+#dolly+.jitm-card {
+ margin: 3rem 1rem 0 auto;
+}
+
+// remove right margin for jitms in the editor
+.post-php .jitm-card {
+ margin-right: 0;
+}
+
+ // if JITM appears inside of the jetpack dashboard adjust margins
+ .jp-lower .jitm-card {
+ margin: 0 0 rem( 24px );
+ }
+
+.jitm-banner.jitm-card {
+ display: flex;
+ position: relative;
+ z-index: 2;
+
+ &::before {
+ content: '';
+ width: 4px;
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 100%;
+ border-top-left-radius: 1px;
+ border-bottom-left-radius: 1px;
+ }
+
+ @include breakpoint( "<480px" ) {
+ display: flex;
+ flex-direction: column;
+ }
+
+ &.is-card-link {
+ padding: rem( 12px ) rem( 48px ) rem( 12px ) rem( 16px );
+ }
+ &.is-dismissible {
+ padding-right: rem( 48px );
+ }
+
+ @include jitm-banner-color( $alert-green );
+
+ &.is-upgrade-personal {
+ @include jitm-banner-color( $alert-yellow );
+ }
+ &.is-upgrade-premium {
+ @include jitm-banner-color( #069e08 );
+ }
+ &.is-upgrade-business,
+ &.woo-jitm {
+ @include jitm-banner-color( $alert-purple );
+ }
+
+ .jitm-card__link-indicator {
+ align-items: center;
+ color: $blue-wordpress;
+ display: flex;
+ }
+
+ &:hover {
+ transition: all 100ms ease-in-out;
+ &.is-card-link {
+ box-shadow: 0 0 0 1px $gray, 0 2px 4px lighten( $gray, 20% );
+ }
+ .jitm-card__link-indicator {
+ color: $blue-dark;
+ }
+ }
+
+ @include breakpoint( ">480px" ) {
+ padding: rem( 16px );
+ padding-left: rem( 20px );
+
+ &.is-dismissible {
+ padding-right: rem( 16px );
+ }
+ }
+}
+
+.jitm-banner__buttons_container {
+ display: flex;
+ height: 50%;
+ margin: auto rem( 16px ) auto 0;
+ gap: rem( 16px );
+ overflow: hidden;
+
+ @include breakpoint( ">480px" ) {
+ margin-left: rem( 16px );
+ }
+}
+
+.jitm-banner__icons {
+ display: flex;
+
+ .jitm-banner__icon,
+ .jitm-banner__icon-circle {
+ border-radius: 50%;
+ flex-shrink: 0;
+ height: rem( 24px );
+ width: rem( 24px );
+ margin-right: rem( 16px );
+ margin-top: rem( -2px );
+ text-align: center;
+ top: rem( 4px );
+ }
+
+ .jitm-banner__icon {
+ align-self: center;
+ color: $white;
+ display: block;
+ }
+
+ .jitm-banner__icon-circle {
+ color: white;
+ display: none;
+ padding: rem( 3px ) rem( 4px ) rem( 4px ) rem( 3px );
+ }
+
+ @include breakpoint( ">480px" ) {
+ align-items: center;
+
+ .jitm-banner__icon {
+ display: none;
+ }
+ .jitm-banner__icon-circle {
+ display: block;
+ }
+ }
+}
+
+.jitm-banner__icon-plan {
+ display: flex;
+ margin-right: rem( 16px );
+
+ .dops-plan-icon {
+ height: rem( 32px );
+ width: rem( 32px );
+ }
+
+ .jp-emblem {
+ position: relative;
+ top: rem( 2px );
+
+ @include breakpoint( "<480px" ) {
+ margin-bottom: rem( 16px );
+ }
+
+ svg {
+ height: rem( 32px );
+ width: rem( 32px );
+ fill: $green-primary;
+ }
+
+ .jitm-jp-logo {
+ height: inherit;
+ width: rem( 40px );
+ fill: inherit;
+ }
+ }
+
+ @include breakpoint( ">480px" ) {
+ align-items: center;
+ }
+}
+
+.jitm-banner__content {
+ align-items: center;
+ display: flex;
+ flex-grow: 1;
+ flex-wrap: wrap;
+ flex-shrink: 100000;
+
+ @include breakpoint( "<480px" ) {
+ margin-right: 0;
+ }
+
+ @include breakpoint( ">480px" ) {
+ flex-wrap: nowrap;
+ }
+
+ @include breakpoint( "<960px" ) {
+ margin-right: 5px;
+ }
+}
+
+.jitm-banner__info {
+ flex-grow: 1;
+ line-height: 1.4;
+
+ @include breakpoint( ">480px" ) {
+ flex-basis: 50%;
+ }
+
+ @include breakpoint( ">960px" ) {
+ flex-basis: 70%;
+ }
+
+ .jitm-banner__title,
+ .jitm-banner__description,
+ .jitm-banner__description a {
+ color: black;
+ }
+
+ .jitm-banner__title {
+ font-size: rem( 15px );
+ font-weight: 700;
+ line-height: 136%;
+ }
+
+ .jitm-banner__description {
+ font-size: rem( 13px );
+ line-height: 150%;
+ margin-top: rem( 2px );
+ }
+
+ .banner__list {
+ font-size: 12px;
+ list-style: none;
+ margin: 10px 0;
+ li {
+ margin: 6px 0;
+ .gridicon {
+ fill: $gray;
+ display: inline;
+ margin-right: 12px;
+ vertical-align: bottom;
+ }
+ }
+ }
+}
+
+.jitm-banner__action {
+ align-self: center;
+ font-size: rem( 12px );
+ text-align: left;
+ overflow: hidden;
+
+ .jitm-banner__prices {
+ display: flex;
+ justify-content: flex-start;
+
+ .dops-plan-price {
+ margin-bottom: 0;
+ }
+
+ .dops-plan-price.is-discounted,
+ .dops-plan-price.is-discounted .dops-plan-price__currency-symbol {
+ color: $gray-dark;
+ }
+
+ .has-call-to-action & .dops-plan-price {
+ margin-bottom: rem( 8px );
+ }
+ }
+
+ @include breakpoint( "<480px" ) {
+ margin-top: 1rem;
+ }
+
+ @include breakpoint( ">480px" ) {
+ text-align: center;
+ width: auto;
+
+ .is-dismissible {
+ margin-top: rem( 40px );
+ }
+
+ .jitm-banner__prices {
+ justify-content: flex-end;
+ text-align: right;
+ }
+ }
+}
+
+.jitm-banner__dismiss {
+ display: block;
+ text-decoration: none;
+ line-height: .5;
+ margin-top: auto;
+ margin-bottom: auto;
+
+ &::before {
+ color: darken($gray, 20%);
+ font: 400 20px/1 dashicons;
+ content: '\f335';
+ }
+
+ @include breakpoint( ">660px" ) {
+ margin-right: rem( -8px );
+ }
+
+ @include breakpoint( "<480px" ) {
+ position: absolute;
+ top: 0;
+ right: 0;
+
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin: 0;
+
+ // Minimum touch area
+ width: 48px;
+ height: 48px;
+ }
+}
+
+.jitm-banner__action + .jitm-banner__dismiss {
+ margin-left: rem( 10px );
+}
+
+#dolly + .jitm-card {
+ margin: 3rem 1rem 0 auto;
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/images/background.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/images/background.png
new file mode 100644
index 00000000..c2d50e1b
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/images/background.png differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/CHANGELOG.md
new file mode 100644
index 00000000..ef94366f
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/CHANGELOG.md
@@ -0,0 +1,306 @@
+# 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.8.4] - 2023-09-19
+- Minor internal updates.
+
+## [1.8.3] - 2023-08-23
+### Changed
+- Updated package dependencies. [#32605]
+
+## [1.8.2] - 2023-04-10
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+
+## [1.8.1] - 2023-02-20
+### Changed
+- Minor internal updates.
+
+## [1.8.0] - 2023-02-08
+### Added
+- After connection flow, load unattached licenses. If any of them match the product that's being connected, redirect users to the license activation page. [#28509]
+
+## [1.7.14] - 2023-01-11
+### Changed
+- Updated package dependencies.
+
+## [1.7.13] - 2022-12-02
+### Changed
+- Updated package dependencies. [#27688]
+
+## [1.7.12] - 2022-11-22
+### Changed
+- Updated package dependencies. [#27043]
+
+## [1.7.11] - 2022-10-25
+### Changed
+- Updated package dependencies. [#26705]
+
+## [1.7.10] - 2022-09-20
+### Changed
+- Updated package dependencies.
+
+## [1.7.9] - 2022-09-08
+### Changed
+- Updated package dependencies.
+
+## [1.7.8] - 2022-08-29
+### Changed
+- Updated package dependencies.
+
+## [1.7.7] - 2022-08-23
+### Changed
+- Updated package dependencies. [#25628]
+
+## [1.7.6] - 2022-08-03
+### Changed
+- Updated package dependencies. [#25300, #25315]
+
+## [1.7.5] - 2022-07-26
+### Changed
+- Updated package dependencies. [#25158]
+
+## [1.7.4] - 2022-06-21
+### Changed
+- Renaming master to trunk.
+
+## [1.7.3] - 2022-06-14
+### Changed
+- Updated package dependencies. [#24529]
+
+## [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.
+- Updated package dependencies
+- Updated package textdomain from `jetpack` to `jetpack-licensing`.
+
+## [1.5.4] - 2021-12-14
+### Changed
+- Updated package dependencies.
+
+## [1.5.3] - 2021-12-03
+### Changed
+- Increases the timeout of the license activation request from 10 to 30 seconds.
+
+## [1.5.2] - 2021-11-30
+### Changed
+- Updated package dependencies.
+
+## [1.5.1] - 2021-11-23
+### Changed
+- Updated package dependencies.
+
+## [1.5.0] - 2021-11-16
+### Added
+- Add a test for update to WPCOM return change.
+- Added get_license_activation_notice_dismiss() function.
+
+## [1.4.9] - 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.4.8] - 2021-10-19
+### Changed
+- Updated package dependencies.
+
+## [1.4.7] - 2021-10-12
+### Changed
+- Updated package dependencies
+
+## [1.4.6] - 2021-09-28
+### Changed
+- Updated package dependencies.
+
+## [1.4.5] - 2021-08-31
+### Changed
+- Run composer update on test-php command instead of phpunit.
+- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills).
+- Updated versions in annotations.
+
+## [1.4.4] - 2021-07-27
+### Changed
+- Updated package dependencies.
+
+## [1.4.3] - 2021-06-29
+### Changed
+- Updated package dependencies.
+
+## [1.4.2] - 2021-05-25
+### Changed
+- Updated package dependencies.
+
+## [1.4.1] - 2021-04-27
+### Changed
+- Updated package dependencies.
+
+## [1.4.0] - 2021-03-30
+### Added
+- Composer alias for dev-master, to improve dependencies
+- Dashboard: add new option to input license key.
+
+### Changed
+- Replace usage of deprecated is_active method
+- Update package dependencies.
+
+### Fixed
+- Fix stored licenses not being attached on option creation
+- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in.
+
+## [1.3.4] - 2021-02-23
+
+- CI: Make tests more generic
+- codesniffer: Hack around mediawiki-codesniffer bug
+
+## [1.3.3] - 2021-02-08
+
+- Update dependencies to latest stable
+
+## [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.4] - 2020-11-24
+
+- Version packages for release
+
+## [1.2.3] - 2020-11-24
+
+- Updated PHPCS: Packages and Debugger
+
+## [1.2.2] - 2020-11-05
+
+- Update dependencies to latest stable
+
+## [1.2.1] - 2020-10-29
+
+- Update dependencies to latest stable
+
+## [1.2.0] - 2020-10-27
+
+- Licensing: use Oxford comma in error message
+
+## [1.1.4] - 2020-10-14
+
+- Update dependencies to latest stable
+
+## [1.1.3] - 2020-10-09
+
+- Update dependencies to latest stable
+
+## [1.1.2] - 2020-10-06
+
+- Update dependencies to latest stable
+
+## [1.1.1] - 2020-10-01
+
+- Update dependencies to latest stable
+
+## [1.1.0] - 2020-09-29
+
+- Update dependencies to latest stable
+
+## 1.0.0 - 2020-09-24
+
+- Licensing: Add support for Jetpack licenses
+
+[1.8.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.8.3...v1.8.4
+[1.8.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.8.2...v1.8.3
+[1.8.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.8.1...v1.8.2
+[1.8.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.8.0...v1.8.1
+[1.8.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.14...v1.8.0
+[1.7.14]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.13...v1.7.14
+[1.7.13]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.12...v1.7.13
+[1.7.12]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.11...v1.7.12
+[1.7.11]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.10...v1.7.11
+[1.7.10]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.9...v1.7.10
+[1.7.9]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.8...v1.7.9
+[1.7.8]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.7...v1.7.8
+[1.7.7]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.6...v1.7.7
+[1.7.6]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.5...v1.7.6
+[1.7.5]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.4...v1.7.5
+[1.7.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.3...v1.7.4
+[1.7.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.2...v1.7.3
+[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
+[1.5.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.5.1...v1.5.2
+[1.5.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.5.0...v1.5.1
+[1.5.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.9...v1.5.0
+[1.4.9]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.8...v1.4.9
+[1.4.8]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.7...v1.4.8
+[1.4.7]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.6...v1.4.7
+[1.4.6]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.5...v1.4.6
+[1.4.5]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.4...v1.4.5
+[1.4.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.3...v1.4.4
+[1.4.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.2...v1.4.3
+[1.4.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.1...v1.4.2
+[1.4.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.0...v1.4.1
+[1.4.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.3.4...v1.4.0
+[1.3.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.3.3...v1.3.4
+[1.3.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.3.2...v1.3.3
+[1.3.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.3.1...v1.3.2
+[1.3.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.3.0...v1.3.1
+[1.3.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.2.4...v1.3.0
+[1.2.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.2.3...v1.2.4
+[1.2.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.2.2...v1.2.3
+[1.2.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.2.1...v1.2.2
+[1.2.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.2.0...v1.2.1
+[1.2.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.1.4...v1.2.0
+[1.1.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.1.3...v1.1.4
+[1.1.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.1.2...v1.1.3
+[1.1.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.1.1...v1.1.2
+[1.1.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.1.0...v1.1.1
+[1.1.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.0.0...v1.1.0
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/SECURITY.md
new file mode 100644
index 00000000..b4b46c0e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/composer.json
new file mode 100644
index 00000000..6250b73b
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/composer.json
@@ -0,0 +1,50 @@
+{
+ "name": "automattic/jetpack-licensing",
+ "description": "Everything needed to manage Jetpack licenses client-side.",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {
+ "automattic/jetpack-connection": "^1.57.5"
+ },
+ "require-dev": {
+ "automattic/wordbless": "@dev",
+ "yoast/phpunit-polyfills": "1.1.0",
+ "automattic/jetpack-changelogger": "^3.3.9"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy",
+ "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy",
+ "test-php": [
+ "@composer phpunit"
+ ]
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-licensing",
+ "textdomain": "jetpack-licensing",
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-licensing/compare/v${old}...v${new}"
+ },
+ "branch-alias": {
+ "dev-trunk": "1.8.x-dev"
+ }
+ },
+ "config": {
+ "allow-plugins": {
+ "roots/wordpress-core-installer": true
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php
new file mode 100644
index 00000000..39e40d23
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php
@@ -0,0 +1,447 @@
+ \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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php
new file mode 100644
index 00000000..13982d71
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php
@@ -0,0 +1,359 @@
+register_endpoints();
+ }
+
+ /**
+ * Get Jetpack connection manager instance.
+ *
+ * @return Connection_Manager
+ */
+ protected function connection() {
+ static $connection;
+
+ if ( null === $connection ) {
+ $connection = new Connection_Manager();
+ }
+
+ return $connection;
+ }
+
+ /**
+ * Get the last license attach request error that has occurred, if any.
+ *
+ * @return string Human-readable error message or an empty string.
+ */
+ public function last_error() {
+ return Jetpack_Options::get_option( 'licensing_error', '' );
+ }
+
+ /**
+ * Log an error to be surfaced to the user at a later time.
+ *
+ * @param string $error Human-readable error message.
+ * @return void
+ */
+ public function log_error( $error ) {
+ $substr = function_exists( 'mb_substr' ) ? 'mb_substr' : 'substr';
+ Jetpack_Options::update_option( 'licensing_error', $substr( $error, 0, 1024 ) );
+ }
+
+ /**
+ * Get all stored licenses.
+ *
+ * @return string[] License keys.
+ */
+ public function stored_licenses() {
+ $licenses = (array) get_option( self::LICENSES_OPTION_NAME, array() );
+ $licenses = array_filter( $licenses, 'is_scalar' );
+ $licenses = array_map( 'strval', $licenses );
+ $licenses = array_filter( $licenses );
+
+ return $licenses;
+ }
+
+ /**
+ * Append a license
+ *
+ * @param string $license A jetpack license key.
+ * @return bool True if the option was updated with the new license, false otherwise.
+ */
+ public function append_license( $license ) {
+ $licenses = $this->stored_licenses();
+
+ array_push( $licenses, $license );
+
+ return update_option( self::LICENSES_OPTION_NAME, $licenses );
+ }
+
+ /**
+ * Make an authenticated WP.com XMLRPC multicall request to attach the provided license keys.
+ *
+ * @param string[] $licenses License keys to attach.
+ * @return Jetpack_IXR_ClientMulticall
+ */
+ protected function attach_licenses_request( array $licenses ) {
+ $xml = new Jetpack_IXR_ClientMulticall( array( 'timeout' => 30 ) );
+
+ foreach ( $licenses as $license ) {
+ $xml->addCall( 'jetpack.attachLicense', $license );
+ }
+
+ $xml->query();
+
+ return $xml;
+ }
+
+ /**
+ * Attach the given licenses.
+ *
+ * @param string[] $licenses Licenses to attach.
+ * @return array|WP_Error Results for each license (which may include WP_Error instances) or a WP_Error instance.
+ */
+ public function attach_licenses( array $licenses ) {
+ if ( ! $this->connection()->has_connected_owner() ) {
+ return new WP_Error( 'not_connected', __( 'Jetpack doesn\'t have a connected owner.', 'jetpack-licensing' ) );
+ }
+
+ if ( empty( $licenses ) ) {
+ return array();
+ }
+
+ $xml = $this->attach_licenses_request( $licenses );
+
+ if ( $xml->isError() ) {
+ $error = new WP_Error( 'request_failed', __( 'License attach request failed.', 'jetpack-licensing' ) );
+ $error->add( $xml->getErrorCode(), $xml->getErrorMessage() );
+ return $error;
+ }
+
+ $results = array_map(
+ function ( $response ) {
+ if ( isset( $response['faultCode'] ) || isset( $response['faultString'] ) ) {
+ return new WP_Error( $response['faultCode'], $response['faultString'] );
+ }
+
+ return $response;
+ },
+ (array) $xml->getResponse()
+ );
+
+ return $results;
+ }
+
+ /**
+ * Attach all stored licenses.
+ *
+ * @return array|WP_Error Results for each license (which may include WP_Error instances) or a WP_Error instance.
+ */
+ public function attach_stored_licenses() {
+ $licenses = $this->stored_licenses();
+ $results = $this->attach_licenses( $licenses );
+
+ if ( is_wp_error( $results ) ) {
+ if ( 'request_failed' === $results->get_error_code() ) {
+ $this->log_error(
+ __( 'Failed to attach your Jetpack license(s). Please try reconnecting Jetpack.', 'jetpack-licensing' )
+ );
+ }
+
+ return $results;
+ }
+
+ $failed = array();
+
+ foreach ( $results as $index => $result ) {
+ if ( isset( $licenses[ $index ] ) && is_wp_error( $result ) ) {
+ $failed[] = $licenses[ $index ];
+ }
+ }
+
+ if ( ! empty( $failed ) ) {
+ $this->log_error(
+ sprintf(
+ /* translators: %s is a comma-separated list of license keys. */
+ __( 'The following Jetpack licenses are invalid, already in use, or revoked: %s', 'jetpack-licensing' ),
+ implode( ', ', $failed )
+ )
+ );
+ }
+
+ return $results;
+ }
+
+ /**
+ * Attach all stored licenses during connection flow for the connection owner.
+ *
+ * @return void
+ */
+ public function attach_stored_licenses_on_connection() {
+ if ( $this->connection()->is_connection_owner() ) {
+ $this->attach_stored_licenses();
+ }
+ }
+
+ /**
+ * Is the current user allowed to use the Licensing Input UI?
+ *
+ * @since 1.4.0
+ * @return bool
+ */
+ public static function is_licensing_input_enabled() {
+ /**
+ * Filter that checks if the user is allowed to see the Licensing UI. `true` enables it.
+ *
+ * @since 1.4.0
+ *
+ * @param bool False by default.
+ */
+ return apply_filters( 'jetpack_licensing_ui_enabled', false ) && current_user_can( 'jetpack_connect_user' );
+ }
+
+ /**
+ * Gets the user-licensing activation notice dismissal info.
+ *
+ * @since 10.4.0
+ * @return array
+ */
+ public function get_license_activation_notice_dismiss() {
+
+ $default = array(
+ 'last_detached_count' => null,
+ 'last_dismissed_time' => null,
+ );
+
+ if ( $this->connection()->is_user_connected() && $this->connection()->is_connection_owner() ) {
+ return Jetpack_Options::get_option( 'licensing_activation_notice_dismiss', $default );
+ }
+
+ return $default;
+ }
+
+ /**
+ * Load current user's licenses.
+ *
+ * @param bool $unattached_only Only return unattached licenses.
+ *
+ * @return array
+ */
+ public function get_user_licenses( $unattached_only = false ) {
+ $licenses = Endpoints::get_user_licenses();
+
+ if ( empty( $licenses->items ) ) {
+ return array();
+ }
+
+ $items = $licenses->items;
+
+ if ( $unattached_only ) {
+ $items = array_filter(
+ $items,
+ static function ( $item ) {
+ return $item->attached_at === null;
+ }
+ );
+ }
+
+ return $items;
+ }
+
+ /**
+ * If the destination URL is checkout page,
+ * see if there are unattached licenses they could use instead of getting a new one.
+ * If found, redirect the user to license activation.
+ *
+ * @param string $dest_url User's destination URL.
+ *
+ * @return void
+ */
+ public function handle_user_connected_redirect( $dest_url ) {
+ if ( ! preg_match( '#^https://[^/]+/checkout/#i', $dest_url ) ) {
+ return;
+ }
+
+ $licenses = $this->get_user_licenses( true );
+ $plugin_slug = null;
+
+ $query_string = wp_parse_url( $dest_url, PHP_URL_QUERY );
+ if ( $query_string ) {
+ parse_str( $query_string, $query_args );
+
+ if ( $query_args['redirect_to']
+ && preg_match( '/^admin\.php\?page=(jetpack-\w+)/i', $query_args['redirect_to'], $matches )
+ ) {
+ $plugin_slug = $matches[1];
+ }
+ }
+
+ /**
+ * Check for the user's unattached licenses.
+ *
+ * @since 3.8.2
+ *
+ * @param bool $has_license Whether a license was already found.
+ * @param array $licenses Unattached licenses belonging to the user.
+ * @param string $plugin_slug Slug of the plugin that initiated the flow.
+ */
+ if ( $plugin_slug && count( $licenses )
+ && apply_filters( 'jetpack_connection_user_has_license', false, $licenses, $plugin_slug )
+ ) {
+ wp_safe_redirect( '/wp-admin/admin.php?page=my-jetpack#/add-license' );
+ exit;
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/CHANGELOG.md
new file mode 100644
index 00000000..fc3bc039
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/CHANGELOG.md
@@ -0,0 +1,197 @@
+# 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.6.3] - 2023-09-19
+- Minor internal updates.
+
+## [1.6.2] - 2023-08-23
+### Changed
+- Updated package dependencies. [#32605]
+
+## [1.6.1] - 2023-04-10
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+
+## [1.6.0] - 2023-04-04
+### Added
+- Add new method to get a base64 encoded SVG of the Jetpack logo. [#29418]
+
+## [1.5.22] - 2023-02-20
+### Changed
+- Minor internal updates.
+
+## [1.5.21] - 2023-01-30
+### Changed
+- Updated styles for Just in Time Messages (notices) [#27515]
+
+## [1.5.20] - 2022-12-02
+### Changed
+- Updated package dependencies. [#27688]
+
+## [1.5.19] - 2022-11-22
+### Changed
+- Updated package dependencies. [#27043]
+
+## [1.5.18] - 2022-11-07
+### Changed
+- Updated package dependencies.
+
+## [1.5.17] - 2022-07-26
+### Changed
+- Updated package dependencies. [#25158]
+
+## [1.5.16] - 2022-06-21
+### Changed
+- Renaming master to trunk. [#24661]
+
+## [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.
+- Updated package dependencies
+
+## [1.5.12] - 2021-12-14
+### Changed
+- Updated package dependencies.
+
+## [1.5.11] - 2021-11-30
+### Changed
+- Colors: update Jetpack Primary color to match latest brand book.
+
+## [1.5.10] - 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.5.9] - 2021-10-13
+### Changed
+- Updated package dependencies.
+
+## [1.5.8] - 2021-10-07
+### Changed
+- Updated package dependencies
+
+## [1.5.7] - 2021-09-28
+### Changed
+- Updated package dependencies.
+
+## [1.5.6] - 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.5.5] - 2021-05-25
+### Changed
+- Updated package dependencies.
+
+## [1.5.4] - 2021-04-27
+### Changed
+- Updated package dependencies.
+
+## [1.5.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.5.2] - 2021-02-05
+
+- CI: Make tests more generic
+
+## [1.5.1] - 2021-01-19
+
+- Add mirror-repo information to all current composer packages
+- Monorepo: Reorganize all projects
+
+## [1.5.0] - 2020-12-07
+
+- Pin dependencies
+- Packages: Update for PHP 8 testing
+
+## [1.4.0] - 2020-08-13
+
+- CI: Try collect js coverage
+
+## [1.3.0] - 2020-06-22
+
+- PHPCS: Clean up the packages
+- PHPCS Updates after WPCS 2.3
+
+## [1.2.0] - 2020-03-27
+
+- Use dynamic Jetpack logos on JITMs
+
+## [1.1.4] - 2019-11-08
+
+- Packages: Use classmap instead of PSR-4
+
+## [1.1.2] - 2019-10-28
+
+- Packages: Add gitattributes files to all packages that need th…
+
+## [1.1.1] - 2019-09-20
+
+- Docs: Unify usage of @package phpdoc tags
+
+## [1.1.0] - 2019-06-11
+
+- Feature/jetpack packages pt 1. (May 31 - June 6)
+- Update/package logo add gray
+- Packages: Move JITM tests to package and fix deps
+- Update Jetpack to use new JITM package
+- Packages: Make logo package tests independent
+
+## 1.0.0 - 2019-05-29
+
+- Packages: Add a basic Jetpack Logo package
+
+[1.6.3]: https://github.com/Automattic/jetpack-logo/compare/v1.6.2...v1.6.3
+[1.6.2]: https://github.com/Automattic/jetpack-logo/compare/v1.6.1...v1.6.2
+[1.6.1]: https://github.com/Automattic/jetpack-logo/compare/v1.6.0...v1.6.1
+[1.6.0]: https://github.com/Automattic/jetpack-logo/compare/v1.5.22...v1.6.0
+[1.5.22]: https://github.com/Automattic/jetpack-logo/compare/v1.5.21...v1.5.22
+[1.5.21]: https://github.com/Automattic/jetpack-logo/compare/v1.5.20...v1.5.21
+[1.5.20]: https://github.com/Automattic/jetpack-logo/compare/v1.5.19...v1.5.20
+[1.5.19]: https://github.com/Automattic/jetpack-logo/compare/v1.5.18...v1.5.19
+[1.5.18]: https://github.com/Automattic/jetpack-logo/compare/v1.5.17...v1.5.18
+[1.5.17]: https://github.com/Automattic/jetpack-logo/compare/v1.5.16...v1.5.17
+[1.5.16]: https://github.com/Automattic/jetpack-logo/compare/v1.5.15...v1.5.16
+[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
+[1.5.10]: https://github.com/Automattic/jetpack-logo/compare/v1.5.9...v1.5.10
+[1.5.9]: https://github.com/Automattic/jetpack-logo/compare/v1.5.8...v1.5.9
+[1.5.8]: https://github.com/Automattic/jetpack-logo/compare/v1.5.7...v1.5.8
+[1.5.7]: https://github.com/Automattic/jetpack-logo/compare/v1.5.6...v1.5.7
+[1.5.6]: https://github.com/Automattic/jetpack-logo/compare/v1.5.5...v1.5.6
+[1.5.5]: https://github.com/Automattic/jetpack-logo/compare/v1.5.4...v1.5.5
+[1.5.4]: https://github.com/Automattic/jetpack-logo/compare/v1.5.3...v1.5.4
+[1.5.3]: https://github.com/Automattic/jetpack-logo/compare/v1.5.2...v1.5.3
+[1.5.2]: https://github.com/Automattic/jetpack-logo/compare/v1.5.1...v1.5.2
+[1.5.1]: https://github.com/Automattic/jetpack-logo/compare/v1.5.0...v1.5.1
+[1.5.0]: https://github.com/Automattic/jetpack-logo/compare/v1.4.0...v1.5.0
+[1.4.0]: https://github.com/Automattic/jetpack-logo/compare/v1.3.0...v1.4.0
+[1.3.0]: https://github.com/Automattic/jetpack-logo/compare/v1.2.0...v1.3.0
+[1.2.0]: https://github.com/Automattic/jetpack-logo/compare/v1.1.4...v1.2.0
+[1.1.4]: https://github.com/Automattic/jetpack-logo/compare/v1.1.2...v1.1.4
+[1.1.2]: https://github.com/Automattic/jetpack-logo/compare/v1.1.1...v1.1.2
+[1.1.1]: https://github.com/Automattic/jetpack-logo/compare/v1.1.0...v1.1.1
+[1.1.0]: https://github.com/Automattic/jetpack-logo/compare/v1.0.0...v1.1.0
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/SECURITY.md
new file mode 100644
index 00000000..b4b46c0e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/composer.json
new file mode 100644
index 00000000..186a0d16
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/composer.json
@@ -0,0 +1,39 @@
+{
+ "name": "automattic/jetpack-logo",
+ "description": "A logo for Jetpack",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {},
+ "require-dev": {
+ "yoast/phpunit-polyfills": "1.1.0",
+ "automattic/jetpack-changelogger": "^3.3.9"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "test-php": [
+ "@composer phpunit"
+ ]
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-logo",
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-logo/compare/v${old}...v${new}"
+ },
+ "branch-alias": {
+ "dev-trunk": "1.6.x-dev"
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/src/class-logo.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/src/class-logo.php
new file mode 100644
index 00000000..05622de3
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/src/class-logo.php
@@ -0,0 +1,122 @@
+ tag.
+ * - jetpack-logo__icon-circle: the circle of the Jetpack mark.
+ * - jetpack-logo__icon-triangle: two shapes that correspond to each triangle in the Jetpack mark.
+ * - jetpack-logo__icon-text: the Jetpack lettering.
+ *
+ * @var string
+ */
+const JETPACK_LOGO_SVG = <<<'EOSVG'
+
+EOSVG;
+
+/**
+ * Create and render a Jetpack logo.
+ */
+class Logo {
+
+ /**
+ * Return the Jetpack logo.
+ *
+ * @return string The Jetpack logo.
+ */
+ public function render() {
+ return JETPACK_LOGO_SVG;
+ }
+
+ /**
+ * Return string containing the Jetpack logo.
+ *
+ * @since 1.1.4
+ * @since-jetpack 7.5.0
+ *
+ * @param bool $logotype Should we use the full logotype (logo + text). Default to false.
+ *
+ * @return string
+ */
+ public function get_jp_emblem( $logotype = false ) {
+ $logo_text = $this->get_jp_logo_parts();
+ return sprintf(
+ '',
+ ( true === $logotype ? '118' : '32' ),
+ ( true === $logotype ? $logo_text['logo'] . $logo_text['text'] : $logo_text['logo'] )
+ );
+ }
+
+ /**
+ * Return string containing the Jetpack logo in a slightly larger format than get_jp_emblem().
+ *
+ * @since 1.1.4
+ * @param bool $logotype Should we use the full logotype (logo + text). Default to false.
+ * @return string
+ */
+ public function get_jp_emblem_larger( $logotype = false ) {
+ $logo_text = $this->get_jp_logo_parts();
+ return sprintf(
+ '',
+ ( true === $logotype ? '118' : '32' ),
+ ( true === $logotype ? $logo_text['logo'] . $logo_text['text'] : $logo_text['logo'] )
+ );
+ }
+
+ /**
+ * Return array containing the Jetpack logo and text
+ *
+ * @since 1.6.0 - Added $color parameter.
+ *
+ * @param string $color The color of the logo.
+ *
+ * @return array
+ */
+ private function get_jp_logo_parts( $color = '#069e08' ) {
+ return array(
+ 'logo' => '',
+ 'text' => '
+
+
+
+
+
+ ',
+ );
+ }
+
+ /**
+ * Return a base64 encoded SVG of the Jetpack logo.
+ * Can be used as a data URI to use the logo inline in CSS.
+ *
+ * @since 1.6.0
+ *
+ * @param string $color The color of the logo.
+ *
+ * @return string
+ */
+ public function get_base64_logo( $color = '#ffffff' ) {
+ $logo_text = $this->get_jp_logo_parts( $color );
+ $base_logo = sprintf(
+ '',
+ $logo_text['logo']
+ );
+ $encoded_logo = base64_encode( $base_logo ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode -- The encoded version is used as data URI to use the logo in CSS.
+
+ return 'data:image/svg+xml;base64,' . $encoded_logo;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md
new file mode 100644
index 00000000..26d9cdfc
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md
@@ -0,0 +1,1199 @@
+# 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).
+
+## [3.9.1] - 2023-10-19
+### Changed
+- Make has_required_plan return true (as it was before #33410) as a way to revert the change. [#33697]
+- Updated package dependencies. [#33687]
+
+## [3.9.0] - 2023-10-17
+### Added
+- Add has_required_plan method for VideoPress product class, check plan purchase exists for site [#33410]
+
+### Changed
+- Updated package dependencies. [#33646]
+
+## [3.8.2] - 2023-10-16
+### Changed
+- Updated package dependencies. [#33429, #33584]
+
+## [3.8.1] - 2023-10-10
+### Changed
+- Changes title of the my-jetpack page to "My Jetpack" [#33486]
+- Updated package dependencies. [#33428]
+
+### Fixed
+- My Jetpack: fix fatal error [#33523]
+- My Jetpack: fix Stats card status when not connected [#33521]
+
+## [3.8.0] - 2023-10-03
+### Added
+- Display a new section on My Jetpack to display the stats of the site. [#33283]
+
+## [3.7.0] - 2023-09-28
+### Added
+- Add a section to display stats from Jetpack Stats in My Jetpack [#33160]
+
+### Changed
+- Redirect to a proper upgrade page for free license owners [#33297]
+
+## [3.6.0] - 2023-09-25
+### Added
+- Add barebones infrastructure for querying jetpack product data. [#33095]
+
+### Changed
+- Stats: link to purchase page within WP Admin. [#33227]
+
+## [3.5.0] - 2023-09-19
+### Changed
+- Added support for upgradable products. Updated the Stats card to handle upgradeable products. [#33058]
+- Updated Jetpack submenu sort order so individual features are alpha-sorted. [#32958]
+
+### Fixed
+- My Jetpack: Add AI Assistant Monthly to required plan check [#33078]
+
+## [3.4.5] - 2023-09-13
+### Changed
+- Updated package dependencies. [#33001]
+
+## [3.4.4] - 2023-09-11
+### Changed
+- General: remove WP 6.1 backwards compatibility checks [#32772]
+
+### Fixed
+- Stats: stop showing upgrade button for sites with Complete plan [#32870]
+
+## [3.4.3] - 2023-09-04
+### Changed
+- Updated package dependencies. [#32803]
+- Updated package dependencies. [#32804]
+
+## [3.4.2] - 2023-08-23
+### Changed
+- Updated package dependencies. [#32605]
+
+## [3.4.1] - 2023-08-22
+### Changed
+- Connection: allow dismissing the IDC modal. [#32594]
+
+## [3.4.0] - 2023-08-21
+### Added
+- Support Jetpack AI Yearly offering [#32130]
+
+### Changed
+- Use the new method to render Connection initial state. [#32499]
+
+## [3.3.3] - 2023-08-14
+### Added
+- Make My Jetpack the default WP-Admin page for Jetpack. [#32385]
+
+### Changed
+- Start showing My Jetpack for authors, editors, and contributors [#32420]
+
+## [3.3.2] - 2023-08-09
+### Fixed
+- Revert My Jetpack as first menu item. [#32384]
+
+## [3.3.1] - 2023-08-09
+### Changed
+- Updated package dependencies. [#32166]
+
+## [3.3.0] - 2023-08-07
+### Added
+- Add Identity Crisis screen modal. [#32249]
+
+### Changed
+- Move 'My Jetpack' sub-menu item to first position. [#32240]
+
+### Fixed
+- Fix IDC modal height issue. [#32316]
+
+## [3.2.1] - 2023-08-01
+### Added
+- Add transient caching for zendesk jwt auth token. [#32140]
+
+### Changed
+- My Jetpack: Rename the namespace of the JWT endpoint, and register it only when it isn't already registered [#32081]
+
+## [3.2.0] - 2023-07-25
+### Added
+- My Jetpack: register jetpack-ai-jwt endpoint [#31965]
+- My Jetpack: release Paid Stats to the public [#32020]
+
+### Changed
+- My Jetpack: changed Stats features wording [#32046]
+- Updated package dependencies. [#31999]
+- Updated package dependencies. [#32040]
+
+### Fixed
+- Make Jetpack logo in footer smaller [#31627]
+- My Jetpack: enabled Stats purchase flow returning to Stats Dashboard [#31959]
+
+## [3.1.3] - 2023-07-17
+### Changed
+- Updated package dependencies. [#31872]
+
+### Fixed
+- Hide connection owner information if the data is invalid
+- Don't suggest user connection if user is already connected, but connection owner is invalid [#31618]
+
+## [3.1.2] - 2023-07-11
+### Changed
+- Updated package dependencies. [#31785]
+
+## [3.1.1] - 2023-07-10
+### Fixed
+- Make product card primary buttons links when applicable [#31611]
+
+## [3.1.0] - 2023-07-05
+### Added
+- Added Jetpack Stats card to My Jetpack [#31589]
+
+### Changed
+- Jetpack Stats: Enable skipping interstitial page [#31629]
+- Updated package dependencies. [#31659]
+
+### Fixed
+- My Jetpack: hide Stats card for standalone plugins [#31689]
+- Organize product cards in list [#31606]
+
+## [3.0.0] - 2023-06-26
+### Added
+- Add authentication to Zendesk chat. [#31339]
+- Stats: add stats card to my Jetpack. [#31531]
+
+## [2.15.0] - 2023-06-23
+### Added
+- My Jetpack: add Stats product [#31368]
+
+### Changed
+- Updated package dependencies. [#31468]
+
+## [2.14.3] - 2023-06-12
+### Added
+- My Jetpack: populate the Jetpack AI product with feature data [#31238]
+
+## [2.14.2] - 2023-06-06
+### Changed
+- Filter out revoked licenses from the license activation options. [#31088]
+- Updated package dependencies. [#31129]
+
+## [2.14.1] - 2023-05-29
+### Added
+- My Jetpack: Add new Jetpack AI card [#30904]
+
+### Changed
+- My Jetpack: Enable Jetpack AI card [#30988]
+- My Jetpack: Update AI class to be product and not module [#30905]
+- My Jetpack: Update AI interstitial background [#30992]
+
+## [2.14.0] - 2023-05-22
+### Added
+- Added ability to purchase Jetpack AI monthly product [#30793]
+- Added tier data to the Boost product to support a pricing table interstitial page. [#29931]
+
+## [2.13.0] - 2023-05-15
+### Added
+- Added My Jetpack interstitial for Jetpack AI [#30543]
+
+## [2.12.2] - 2023-05-11
+### Changed
+- PHP 8.1 compatibility updates [#30517]
+
+## [2.12.1] - 2023-05-08
+### Added
+- My Jetpack: Add deactivate plugin menu action on product card [#30489]
+
+### Changed
+- My Jetpack: Remove icon from plugin activation action in product card [#30458]
+- My Jetpack: Remove manage option from menu [#30440]
+- My Jetpack: Remove product card icon [#30441]
+- My Jetpack: Set a post-checkout redirect destination on the "Purchase a plan" link. [#27693]
+
+### Fixed
+- My Jetpack: Add check for product status before requesting stats [#30430]
+- My Jetpack: Reload page after successful license activation [#30364]
+- My Jetpack: Use a single column for the page title section [#30406]
+
+## [2.12.0] - 2023-05-02
+### Added
+- Add API to query Zendesk chat availability and use it to conditionally display zendesk chat. [#29942]
+- Add pricing table interstitial view for Jetpack Protect. [#29930]
+- My Jetpack: Add product detail table component for comparing product tiers. [#29759]
+
+### Changed
+- My Jetpack: Move logic out of Product Card component. [#30274]
+- Updated package dependencies.
+
+### Fixed
+- Fix activation and layout on Protect interstatial page. [#29525]
+- My Jetpack: Keep product card action button disabled while installing standalone plugin. [#30346]
+
+## [2.11.0] - 2023-05-01
+### Added
+- Added Jetpack Starter bundle post-activation screen and plan header [#30368]
+
+## [2.10.3] - 2023-04-25
+### Added
+- My Jetpack: Add flags field in initial state [#30241]
+- My Jetpack: Add Install/Activate menu actions based on the standalone plugin status. [#30153]
+- My Jetpack: Add neutral color in contextual card [#30250]
+- My Jetpack: Add side-effect action to request the standalone plugin installation on the backend. [#30143]
+- My Jetpack: Add stats to VideoPress card [#30197]
+- My Jetpack: Enable menu for all hybrid products [#30247]
+- My Jetpack: Reload page after standalone action [#30221]
+
+### Changed
+- My Jetpack: Connect the standalone plugin menu options so they trigger the installation and activation when clicked. [#30168]
+- MyJetpack: set the Social standalone page as the default admin one [#30193]
+- MyJetpack: Try to activate the product module after installing the standalone plugin [#30215]
+- Updated package dependencies. [#30015]
+
+## [2.10.2] - 2023-04-17
+### Added
+- Ad missing TOS in Jetpack interstitial. [#29683]
+- My Jetpack: Add endpoint to install the standalone plugin for hybrid products. [#30045]
+- My Jetpack: Expose information about standalone plugin status on My Jetpack product initial state. [#29977]
+
+### Changed
+- Backup and Scan: redirect after checkout to Jetpack recommendations page if Jetpack plugin is active. Otherwise, redirect back to plugin admin page. [#29708]
+- My Jetpack: Adjustments in Product Card [#30014]
+- Updated package dependencies. [#30019]
+
+## [2.10.1] - 2023-04-10
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+- My Jetpack: Introduce absent_with_plan status [#29920]
+
+### Changed
+- My Jetpack: Turn Search into a hybrid product to handle it as module and as standalone plugin. [#29946]
+- My Jetpack: Turn Social into a hybrid product to handle it as module and as standalone plugin. [#29935]
+- My Jetpack: Turn VaultPress Backup into a Hybrid product to handle it as module and as standalone plugin. [#29928]
+- My Jetpack: Turn VideoPress into a Hybrid product to handle it as module and as standalone plugin. [#29918]
+
+## [2.10.0] - 2023-04-04
+### Added
+- My Jetpack: Adds a selector, reducer and resolver machinery to fetch product stats. [#29764]
+- My Jetpack: Enhance Product Card [#29787]
+- My Jetpack: Introduce menu in Product Card [#29815]
+
+### Changed
+- * Updated add-anti-spam path to add-akismet to match the product key
+ * Updated product interstitial component to accept an existingLicenseKeyUrl
+ * Updated product interstitial component to display a product name instead of a title where preferProductName is set
+ * Make is_plugin_active available from the API [#29598]
+- My Jetpack: Change the bottom of My Jetpack screen to use single-column rows on small viewports. [#29844]
+- Updated package dependencies. [#29854]
+
+## [2.9.2] - 2023-04-03
+### Changed
+- Internal updates.
+
+## [2.9.1] - 2023-03-28
+### Changed
+- Move GoldenTokenModal component to licensing package. [#29748]
+
+## [2.9.0] - 2023-03-27
+### Added
+- Adds new route for Golden Token. Also the experience of redeeming one [#29644]
+- Clarified when license activation fails that a user connection is required, added a link to complete the connection, and added functionality to redirect back to license activation when the connection is done. [#29443]
+
+## [2.8.1] - 2023-03-20
+### Changed
+- Product Interstitial: Use browser history to go back, in case they're coming from somewhere outside of the app. [#29138]
+- Updated My Jetpack wpwrap color to --jp-white-off [#29568]
+- Updated package dependencies. [#29471]
+
+## [2.8.0] - 2023-03-13
+### Added
+- Add Zendesk chat module to My Jetpack page [#28712]
+
+## [2.7.13] - 2023-03-08
+### Changed
+- Updated package dependencies. [#29216]
+
+## [2.7.12] - 2023-02-28
+### Changed
+- Update billing language [#29126]
+
+## [2.7.11] - 2023-02-20
+### Fixed
+- My Jetpack: Fix button to add bundle in product interstitial component [#28984]
+
+## [2.7.10] - 2023-02-15
+### Changed
+- Update to React 18. [#28710]
+
+## [2.7.9] - 2023-02-08
+### Changed
+- Updated package dependencies. [#28682, #28700]
+
+## [2.7.8] - 2023-02-06
+### Changed
+- Updated package dependencies.
+
+## [2.7.7] - 2023-01-26
+### Changed
+- Use `flex-start` instead of `start` for better browser compatibility. [#28530]
+
+## [2.7.6] - 2023-01-25
+### Changed
+- Minor internal updates.
+
+## [2.7.5] - 2023-01-23
+### Fixed
+- Components: Fix usage of box-sizing across the elements [#28489]
+- Fixes the price display for products with intro offers for the first month. [#28424]
+
+## [2.7.4] - 2023-01-16
+### Changed
+- Updated package dependencies. [#28303]
+
+## [2.7.3] - 2023-01-11
+### Changed
+- Updated package dependencies.
+
+## [2.7.2] - 2023-01-02
+### Added
+- My Jetpack: Move VideoPress from Hybrid [#28097]
+
+### Changed
+- My Jetpack: Move Search out of hybrid and deprecate Hybrid_Product class [#28113]
+
+## [2.7.1] - 2022-12-27
+### Changed
+- Fix layout visual issues [#28055]
+- My Jetpack: Move Backup out of hybrid product [#28022]
+- My Jetpack: Move Social out of hybrid product [#28074]
+
+## [2.7.0] - 2022-12-19
+### Added
+- Implement detached licenses redux store. [#27609]
+
+### Changed
+- Updated package dependencies. [#27916]
+
+### Fixed
+- Add translation context to Security product name. [#27920]
+
+## [2.6.1] - 2022-12-12
+### Changed
+- Updated package dependencies. [#27888]
+
+## [2.6.0] - 2022-12-05
+### Changed
+- Improve design of the error notice. [#27340]
+- Updated package dependencies. [#27340]
+
+## [2.5.2] - 2022-12-02
+### Changed
+- My Jetpack: Requires connection only if needed [#27615]
+- Updated package dependencies. [#27697]
+
+## [2.5.1] - 2022-11-30
+
+## [2.5.0] - 2022-11-28
+### Changed
+- My Jetpack: rename Backup and Anti-Spam to new product names [#27377]
+- Show My Jetpack even if site is disconnected [#26967]
+- Updated package dependencies. [#27576]
+
+## [2.4.1] - 2022-11-22
+### Changed
+- Updated package dependencies. [#27043]
+
+## [2.4.0] - 2022-11-17
+### Added
+- Added Jetpack Protect to My Jetpack. [#26069]
+
+### Changed
+- Updated package dependencies. [#26736]
+
+## [2.3.5] - 2022-11-10
+### Changed
+- Updated package dependencies. [#27319]
+
+## [2.3.4] - 2022-11-08
+### Changed
+- Updated package dependencies. [#27289]
+
+## [2.3.3] - 2022-11-01
+### Changed
+- Updated package dependencies. [#27196]
+
+## [2.3.2] - 2022-10-25
+### Changed
+- Updated package dependencies. [#26705]
+
+## [2.3.1] - 2022-10-25
+### Added
+- Add a flag to indicate if the pricing is introductory with product price [#26982]
+- My Jetpack: Support trial [#27033]
+
+### Changed
+- Search: now support 38 languages [#27025]
+
+### Fixed
+- Don't show old price when it's the same as new one [#27015]
+- Search: check if free plan and new pricing is active using wpcom API [#27016]
+
+## [2.3.0] - 2022-10-19
+### Added
+- Added support for free product and added free product for Search [#26808]
+
+### Changed
+- Updated package dependencies. [#26883]
+
+## [2.2.3] - 2022-10-17
+### Changed
+- Updated package dependencies. [#26851]
+
+## [2.2.2] - 2022-10-13
+### Changed
+- Updated package dependencies. [#26790]
+
+## [2.2.1] - 2022-10-11
+### Changed
+- Updated package dependencies. [#25973]
+
+## [2.2.0] - 2022-10-05
+### Added
+- Integrate the new connection error message React component into My Jetpack. [#26485]
+- Search: add post type breakdown endpoint [#26463]
+- Trigger restore connection flow. [#26489]
+
+### Changed
+- Updated package dependencies. [#26457]
+
+## [2.1.1] - 2022-09-27
+### Changed
+- Updated package dependencies.
+
+## [2.1.0] - 2022-09-20
+### Added
+- Added the ConnectionErrorNotice React component. [#26259]
+
+### Changed
+- Updated package dependencies.
+
+### Fixed
+- Fixed the tests for the Module_Product class by creating and using a sample, test-only module product class as the test subject instead of relying on Videopress or other concrete products. [#26227]
+
+## [2.0.5] - 2022-09-08
+### Changed
+- Change VideoPress into a Hybrid product in My Jetpack [#25954]
+- Updated package dependencies.
+
+## [2.0.4] - 2022-08-31
+### Added
+- Allow plugins to override a product class. [#25891]
+
+### Changed
+- Updated package dependencies. [#25856]
+
+## [2.0.3] - 2022-08-29
+### Changed
+- Updated package dependencies.
+
+## [2.0.2] - 2022-08-25
+### Changed
+- Activate plugins in normal mode to trigger plugin_activated hooks [#25727]
+- Updated package dependencies. [#25814]
+
+### Fixed
+- Licensing: do not enable the Licensing UI if My Jetpack cannot be enabled. [#25667]
+- Search: increased search plan/pricing API timeouts to 5s [#25775]
+
+## [2.0.1] - 2022-08-23
+### Added
+- My Jetpack: Add container for JITMs [#22452]
+
+### Changed
+- Updated package dependencies. [#25338, #25339, #25377, #25422, #25628, #25762, #25764]
+
+## [2.0.0] - 2022-08-09
+### Added
+- Make product cards compatible with disclaimers and add disclaimer for backup card [#25265]
+
+### Changed
+- Search: changed to only require site level connection [#24477]
+
+## [1.8.3] - 2022-08-03
+### Changed
+- Updated package dependencies. [#25300, #25315]
+
+## [1.8.2] - 2022-07-27
+### Changed
+- My Jetpack: changed link used in ProductCard component to a button when the plugin is absent
+
+## [1.8.1] - 2022-07-26
+### Changed
+- My Jetpack: changed button used in ProductCard component from WordPress to Jetpack default [#25146]
+- Updated package dependencies. [#25147]
+
+## [1.8.0] - 2022-07-19
+### Added
+- My Jetpack: scroll window to top on route change [#25086]
+
+### Changed
+- Updated package dependencies. [#24710]
+
+## [1.7.4] - 2022-07-12
+### Changed
+- Updated package dependencies. [#25048, #25055]
+
+## [1.7.3] - 2022-07-06
+### Added
+- Display alert when we cant automatically install the plugin [#24884]
+
+### Changed
+- Updated package dependencies. [#24923]
+
+## [1.7.2] - 2022-06-28
+### Changed
+- Disambiguate redirectUrls vars [#24839]
+- Search: use centralized search pricing API [#24795]
+- Updated package dependencies. [#24826]
+
+### Fixed
+- Search Pricing: fix pricing fetch issue before site is connected [#24826]
+
+## [1.7.1] - 2022-06-21
+### Fixed
+- My Jetpack: Replace wordpress from PNG to SVG at Connection [#24793]
+
+## [1.7.0] - 2022-06-21
+### Changed
+- My Jetpack: set products grid to 3x3 for large viewport size
+- Renaming master to trunk.
+- Renaming `master` references to `trunk`
+
+## [1.6.2] - 2022-06-14
+### Changed
+- Updated package dependencies. [#24529]
+
+## [1.6.1] - 2022-06-08
+### Changed
+- Reorder JS imports for `import/order` eslint rule. [#24601]
+- Updated package dependencies. [#24510]
+
+## [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 `` 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
+- Switch to pcov for code coverage.
+- Updated package dependencies.
+- Updated package textdomain from `jetpack` to `jetpack-my-jetpack`.
+
+## [0.2.0] - 2021-12-14
+### Added
+- Added Connection Status Card to the page.
+- Janitorial: add watch command to the plugin.
+
+### Changed
+- Adapt to new layout components.
+- Build: do not ship scss and jsx files in production build.
+
+### Fixed
+- Build minimized JS for the production build.
+- Fix JavaScript i18n strings.
+
+## [0.1.3] - 2021-12-07
+### Changed
+- Updated package dependencies.
+
+## [0.1.2] - 2021-11-30
+### Added
+- Janitorial: create mirror repo for the package.
+
+### Changed
+- Remove now-redundant `output.filename` from Webpack config.
+
+## 0.1.1 - 2021-11-23
+### Changed
+- Updated package dependencies.
+
+## 0.1.0 - 2021-11-17
+### Added
+- Created package
+
+[3.9.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.9.0...3.9.1
+[3.9.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.8.2...3.9.0
+[3.8.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.8.1...3.8.2
+[3.8.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.8.0...3.8.1
+[3.8.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.7.0...3.8.0
+[3.7.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.6.0...3.7.0
+[3.6.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.5.0...3.6.0
+[3.5.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.4.5...3.5.0
+[3.4.5]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.4.4...3.4.5
+[3.4.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.4.3...3.4.4
+[3.4.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.4.2...3.4.3
+[3.4.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.4.1...3.4.2
+[3.4.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.4.0...3.4.1
+[3.4.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.3.3...3.4.0
+[3.3.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.3.2...3.3.3
+[3.3.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.3.1...3.3.2
+[3.3.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.3.0...3.3.1
+[3.3.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.2.1...3.3.0
+[3.2.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.2.0...3.2.1
+[3.2.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.1.3...3.2.0
+[3.1.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.1.2...3.1.3
+[3.1.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.1.1...3.1.2
+[3.1.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.1.0...3.1.1
+[3.1.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.0.0...3.1.0
+[3.0.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.15.0...3.0.0
+[2.15.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.14.3...2.15.0
+[2.14.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.14.2...2.14.3
+[2.14.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.14.1...2.14.2
+[2.14.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.14.0...2.14.1
+[2.14.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.13.0...2.14.0
+[2.13.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.12.2...2.13.0
+[2.12.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.12.1...2.12.2
+[2.12.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.12.0...2.12.1
+[2.12.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.11.0...2.12.0
+[2.11.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.10.3...2.11.0
+[2.10.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.10.2...2.10.3
+[2.10.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.10.1...2.10.2
+[2.10.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.10.0...2.10.1
+[2.10.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.9.2...2.10.0
+[2.9.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.9.1...2.9.2
+[2.9.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.9.0...2.9.1
+[2.9.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.8.1...2.9.0
+[2.8.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.8.0...2.8.1
+[2.8.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.13...2.8.0
+[2.7.13]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.12...2.7.13
+[2.7.12]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.11...2.7.12
+[2.7.11]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.10...2.7.11
+[2.7.10]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.9...2.7.10
+[2.7.9]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.8...2.7.9
+[2.7.8]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.7...2.7.8
+[2.7.7]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.6...2.7.7
+[2.7.6]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.5...2.7.6
+[2.7.5]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.4...2.7.5
+[2.7.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.3...2.7.4
+[2.7.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.2...2.7.3
+[2.7.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.1...2.7.2
+[2.7.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.0...2.7.1
+[2.7.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.6.1...2.7.0
+[2.6.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.6.0...2.6.1
+[2.6.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.5.2...2.6.0
+[2.5.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.5.1...2.5.2
+[2.5.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.5.0...2.5.1
+[2.5.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.4.1...2.5.0
+[2.4.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.4.0...2.4.1
+[2.4.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.5...2.4.0
+[2.3.5]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.4...2.3.5
+[2.3.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.3...2.3.4
+[2.3.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.2...2.3.3
+[2.3.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.1...2.3.2
+[2.3.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.0...2.3.1
+[2.3.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.2.3...2.3.0
+[2.2.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.2.2...2.2.3
+[2.2.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.2.1...2.2.2
+[2.2.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.2.0...2.2.1
+[2.2.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.1.1...2.2.0
+[2.1.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.1.0...2.1.1
+[2.1.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.0.5...2.1.0
+[2.0.5]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.0.4...2.0.5
+[2.0.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.0.3...2.0.4
+[2.0.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.0.2...2.0.3
+[2.0.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.0.1...2.0.2
+[2.0.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.0.0...2.0.1
+[2.0.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.8.3...2.0.0
+[1.8.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.8.2...1.8.3
+[1.8.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.8.1...1.8.2
+[1.8.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.8.0...1.8.1
+[1.8.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.7.4...1.8.0
+[1.7.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.7.3...1.7.4
+[1.7.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.7.2...1.7.3
+[1.7.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.7.1...1.7.2
+[1.7.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.7.0...1.7.1
+[1.7.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.6.2...1.7.0
+[1.6.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.6.1...1.6.2
+[1.6.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.6.0...1.6.1
+[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
+[0.1.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.1.1...0.1.2
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/SECURITY.md
new file mode 100644
index 00000000..98f48dd1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/SECURITY.md
@@ -0,0 +1,47 @@
+# 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 and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions.
+
+## Reporting a Vulnerability
+
+Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure:
+
+* [Jetpack](https://jetpack.com/)
+* Jetpack Backup
+* Jetpack Boost
+* Jetpack CRM
+* Jetpack Protect
+* Jetpack Search
+* Jetpack Social
+* Jetpack VideoPress
+
+**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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/apple-92dacafad84e79708a74.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/apple-92dacafad84e79708a74.svg
new file mode 100644
index 00000000..478fcfd9
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/apple-92dacafad84e79708a74.svg
@@ -0,0 +1,3 @@
+
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/boost-a54137485af36fdffe9c.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/boost-a54137485af36fdffe9c.png
new file mode 100644
index 00000000..dd818e46
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/boost-a54137485af36fdffe9c.png differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/cloud-81ac85ba680343200f54.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/cloud-81ac85ba680343200f54.svg
new file mode 100644
index 00000000..a033545d
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/cloud-81ac85ba680343200f54.svg
@@ -0,0 +1,12 @@
+
+
+
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/connect-f27775ac15cf885713c2.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/connect-f27775ac15cf885713c2.png
new file mode 100644
index 00000000..66f8710a
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/connect-f27775ac15cf885713c2.png differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/crm-7e7684ae2c40327d8fed.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/crm-7e7684ae2c40327d8fed.png
new file mode 100644
index 00000000..cfec3eed
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/crm-7e7684ae2c40327d8fed.png differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/disconnect-confirm-dc9fe8f5c68cfd1320e0.jpg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/disconnect-confirm-dc9fe8f5c68cfd1320e0.jpg
new file mode 100644
index 00000000..13f5651c
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/disconnect-confirm-dc9fe8f5c68cfd1320e0.jpg differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/disconnect-thanks-5873bfac56a9bd7322cd.jpg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/disconnect-thanks-5873bfac56a9bd7322cd.jpg
new file mode 100644
index 00000000..a191ec9e
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/disconnect-thanks-5873bfac56a9bd7322cd.jpg differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/empty-avatar-fea23feddfa99b07c2e8.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/empty-avatar-fea23feddfa99b07c2e8.svg
new file mode 100644
index 00000000..d648cc87
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/empty-avatar-fea23feddfa99b07c2e8.svg
@@ -0,0 +1,40 @@
+
+
+
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/extras-26daf36507504c96d066.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/extras-26daf36507504c96d066.png
new file mode 100644
index 00000000..d4d49627
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/extras-26daf36507504c96d066.png differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/google-dec2a429bf1d8e83f9ad.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/google-dec2a429bf1d8e83f9ad.svg
new file mode 100644
index 00000000..5794583d
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/google-dec2a429bf1d8e83f9ad.svg
@@ -0,0 +1 @@
+
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-9de1caef5eb5c22da5d6.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-9de1caef5eb5c22da5d6.svg
new file mode 100644
index 00000000..f8dbeb91
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-9de1caef5eb5c22da5d6.svg
@@ -0,0 +1,23 @@
+
+
+
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-ai-29e60474d5890cbb6889.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-ai-29e60474d5890cbb6889.png
new file mode 100644
index 00000000..efc3f3b5
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-ai-29e60474d5890cbb6889.png differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png
new file mode 100644
index 00000000..ea421dc0
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-success-cad524ede4e793cc0ece.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-success-cad524ede4e793cc0ece.png
new file mode 100644
index 00000000..a2562d9b
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-success-cad524ede4e793cc0ece.png differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/search-f9756bd9c926d905fe70.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/search-f9756bd9c926d905fe70.png
new file mode 100644
index 00000000..0f77309b
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/search-f9756bd9c926d905fe70.png differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/videopress-9591093a9a238cc48a35.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/videopress-9591093a9a238cc48a35.png
new file mode 100644
index 00000000..9a8f1dfb
Binary files /dev/null and b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/videopress-9591093a9a238cc48a35.png differ
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/wordpress-1fc3e0ba6c52e9707900.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/wordpress-1fc3e0ba6c52e9707900.svg
new file mode 100644
index 00000000..b1cd75b6
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/wordpress-1fc3e0ba6c52e9707900.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.asset.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.asset.php
new file mode 100644
index 00000000..75d5b60a
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.asset.php
@@ -0,0 +1 @@
+ array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '86d713f826cd96de9db1');
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.css
new file mode 100644
index 00000000..e20d1601
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.css
@@ -0,0 +1 @@
+#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 .jp-dashboard-footer__jetpack-symbol{height:16px}#wpbody-content>.notice{display:none}#wpwrap{background-color:var(--jp-white-off)}.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.51px;border-radius:var(--jp-border-radius);font-weight:600;justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo{height:calc(var(--spacing-base)*5);padding:var(--spacing-base);width:calc(var(--spacing-base)*5)}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo>svg:first-child{margin:0;padding:0}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo.Na39I683LAaSA99REg14{height:calc(var(--spacing-base)*4);min-width:calc(var(--spacing-base)*4);padding:calc(var(--spacing-base)/2);width:calc(var(--spacing-base)*4)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF:not(.tuBt2DLqimiImoqVzPqo){font-size:var(--font-body);height:auto;line-height:24px;padding:var(--spacing-base) calc(var(--spacing-base)*3)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF:not(.tuBt2DLqimiImoqVzPqo).paGLQwtPEaJmtArCcmyK{padding:var(--spacing-base) calc(var(--spacing-base)*2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo){font-size:var(--font-body-extra-small);height:auto;line-height:20px;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo).paGLQwtPEaJmtArCcmyK>svg:first-child{margin-right:calc(var(--spacing-base)/2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo)>.components-spinner{height:20px}.zI5tJ_qhWE6Oe6Lk75GY.lZAo6_oGfclXOO9CC6Rd{font-weight:400}.zI5tJ_qhWE6Oe6Lk75GY.xJDOiJxTt0R_wSl8Ipz_{min-width:100%}.zI5tJ_qhWE6Oe6Lk75GY.is-primary:disabled,.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:disabled{background:var(--jp-gray);color:var(--jp-gray-20)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary{background:var(--jp-white);box-shadow:inset 0 0 0 1.51px var(--jp-black)}.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 1.5px 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 1.5px 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)}._fUXxnSp5pagKBp9gSN7 *{box-sizing:border-box}.jErCC9oKHSM15BxzFyQK{margin-bottom:0}.oVoYbwbFB6U2o90Njusk{border:1px solid var(--jp-gray);border-left:6px solid var(--jp-red-50);border-radius:var(--jp-border-radius);box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);color:var(--jp-gray-80);font-size:16px;line-height:22px;margin:0;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3) calc(var(--spacing-base)*2) calc(var(--spacing-base)*3)}.oVoYbwbFB6U2o90Njusk.is-error{background-color:var(--jp-white)}.oVoYbwbFB6U2o90Njusk .components-notice__content{align-items:flex-start;display:flex;flex-direction:column;margin:0;padding:12px 4px}.oVoYbwbFB6U2o90Njusk .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.oVoYbwbFB6U2o90Njusk .components-notice__dismiss{align-self:center}.oVoYbwbFB6U2o90Njusk .components-notice__action{align-items:center;background:#000;border-radius:var(--jp-border-radius);color:var(--jp-white);cursor:pointer;font-size:16px;font-weight:600;height:auto;justify-content:center;letter-spacing:-.01em;line-height:24px;margin-left:calc(var(--spacing-base)*2 + 24px);margin-top:24px;padding:8px 24px;text-decoration:none}.oVoYbwbFB6U2o90Njusk.Snc8NEmDelsbhlH4285s .components-notice__action{margin-left:0;margin-top:0;white-space:nowrap}.oVoYbwbFB6U2o90Njusk.Snc8NEmDelsbhlH4285s .components-notice__content{align-items:center;flex-direction:row}.wBVXH4OTNwLHPRpN4nsq{display:flex;flex-grow:1;margin-right:var(--spacing-base)}.wBVXH4OTNwLHPRpN4nsq>svg{fill:var(--jp-red-60);align-self:flex-start;flex-shrink:0;margin-right:calc(var(--spacing-base)*2)}.wBVXH4OTNwLHPRpN4nsq>svg.F1qvEnFfHs5nz3zFZUOV{fill:none}.UyzOAKNwoDF9DW_qjLii{margin-bottom:-1.5rem}.urouayitSUT8zW0V3p_0{margin-bottom:0}.iXXJlk08gFDeCvsTTlNQ{border:1px solid var(--jp-gray);border-left:6px solid var(--jp-red-50);border-radius:var(--jp-border-radius);box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);box-sizing:border-box;color:var(--jp-gray-80);font-size:16px;line-height:22px;margin:0;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3) calc(var(--spacing-base)*2) calc(var(--spacing-base)*3)}.iXXJlk08gFDeCvsTTlNQ.is-error{background-color:var(--jp-white)}.iXXJlk08gFDeCvsTTlNQ .components-notice__content{align-items:flex-start;display:flex;flex-direction:column;margin:0;padding:12px 4px}.iXXJlk08gFDeCvsTTlNQ .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.iXXJlk08gFDeCvsTTlNQ .components-notice__dismiss{align-self:center}.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:active,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:hover,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:visited{align-items:center;background:#000;border-radius:var(--jp-border-radius);color:var(--jp-white);cursor:pointer;font-size:16px;font-weight:600;justify-content:center;letter-spacing:-.01em;line-height:24px;margin-left:calc(var(--spacing-base)*2 + 24px);margin-top:24px;padding:8px 24px;text-decoration:none}.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:active,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:hover,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:visited{margin-left:0;margin-top:0;white-space:nowrap}.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .components-notice__content{align-items:center;flex-direction:row}.e6hHy8BZ7ZKPSXbIC0UG{margin-bottom:25px}.jXz8LnXNzMDdtHqkG0sZ{display:flex;flex-grow:1;margin-right:var(--spacing-base)}.jXz8LnXNzMDdtHqkG0sZ>svg{align-self:flex-start;flex-shrink:0}.jXz8LnXNzMDdtHqkG0sZ .jp-components-spinner,.jXz8LnXNzMDdtHqkG0sZ>svg{margin-right:calc(var(--spacing-base)*2)}@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:var(--jp-black);display:flex;flex-wrap:wrap;font-size:var(--font-body-extra-small);line-height:1.333;max-width:1128px;width:100%}.jp-dashboard-footer a{text-decoration:none}.jp-dashboard-footer a:any-link,.jp-dashboard-footer a[role=button]{color:inherit}.jp-dashboard-footer a:hover{text-decoration:underline;text-decoration-thickness:1.5px}.jp-dashboard-footer a:focus{border-radius:2px;box-shadow:none;outline:1.5px solid currentColor;outline-offset:3px}.jp-dashboard-footer.is-sm>ul{gap:.125rem}.jp-dashboard-footer.is-md,.jp-dashboard-footer.is-sm>ul{align-items:flex-start;flex-direction:column}.jp-dashboard-footer>ul{align-items:center;display:flex;flex-wrap:wrap;gap:1rem;list-style:none;margin:0;padding:0;width:100%}.jp-dashboard-footer>ul>li{margin-bottom:0}.jp-dashboard-footer>ul>li>a{align-items:center;display:flex;gap:.25rem;min-height:44px}.jp-dashboard-footer__jp-item{font-weight:600;padding-inline-end:1rem}.jp-dashboard-footer.is-sm .jp-dashboard-footer__jp-item{padding-bottom:1rem}.jp-dashboard-footer.is-lg .jp-dashboard-footer__a8c-item{margin-inline-start:auto}.jp-dashboard-footer.is-sm .jp-dashboard-footer__a8c-item{padding-top:1rem}.jp-dashboard-footer__a8c-item>a,.jp-dashboard-footer__jp-item>a{text-decoration:none}.HeJe1crc9XaWWpLvIPit .components-modal__frame{border-bottom-left-radius:4px;border-left:4px solid #e68b28;border-top-left-radius:4px;max-height:100%}.HeJe1crc9XaWWpLvIPit .components-modal__content{margin-top:0;padding:0}.HeJe1crc9XaWWpLvIPit .components-modal__header{display:none}.HeJe1crc9XaWWpLvIPit .or0JUScxkJPmNsfrxkEK .jp-idc__idc-screen{border:0}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off)}.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-weight:500}.gKZWDv5chz3_O3Syp74H,.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);line-height:32px}.gKZWDv5chz3_O3Syp74H{font-weight:600}.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-weight:400}.dso3Rh3tl3Xv1GumBktz,.mQ1UlbN9u4Mg9byO8m7v{font-size:var(--font-body-extra-small);line-height:20px}.mQ1UlbN9u4Mg9byO8m7v{font-weight:700}.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)}.mpr8_ygU8woV4bVR1xvw{align-items:center;display:flex;font-size:var(--font-title-small);font-weight:500;line-height:1.5;margin-bottom:.5rem;margin-top:0}.gwO_Q0L0jbwMARVlBezu{color:var(--jp-gray-60);font-family:SF Pro Text,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:var(--font-body-small);font-weight:400;letter-spacing:-.15px;line-height:20px;margin-left:.75rem}.qwy7CsLeEbXvaPwgC9WV{display:flex;flex-flow:row nowrap;max-width:100%;overflow-x:scroll;padding:1px;scrollbar-width:none}.qwy7CsLeEbXvaPwgC9WV::-webkit-scrollbar{display:none}.qwy7CsLeEbXvaPwgC9WV .Hrbg7DeSJs6gas9zdPDR{border-color:var(--jp-gray-5);border-radius:5px;margin-bottom:0;margin-right:1.5rem;min-width:180px;padding:1rem 1.5rem;width:100%}@media only screen and (min-width:960px){.qwy7CsLeEbXvaPwgC9WV .Hrbg7DeSJs6gas9zdPDR{min-width:220px}}.qwy7CsLeEbXvaPwgC9WV .Hrbg7DeSJs6gas9zdPDR:last-child{margin-right:0}.NFpbo5AINn6I6avKFGby{margin-bottom:1.5rem}.aoQZCG0JeyWmy2J6vVxF{font-weight:500;line-height:20px;margin-bottom:.25rem}.M6ApyXg79vuXo6GwDkbO{align-items:flex-end;display:flex;flex-wrap:wrap;font-size:36px;font-weight:400;line-height:40px}.M6ApyXg79vuXo6GwDkbO.DYHb5e6QhgXejWyo9s78{cursor:pointer}.OlInbY5YnDO06MEQHv98{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;line-height:1;margin-right:.5rem}.EtbKbd5m85w7oYT4stIs{fill:var(--jp-gray-20);color:var(--jp-gray-20);display:none;font-size:var(--font-body-small);font-weight:600;line-height:24px}@media screen and (min-width:960px){.EtbKbd5m85w7oYT4stIs{align-items:center;display:flex}}.EtbKbd5m85w7oYT4stIs.Awr7zl75sfAsFPHK9kDG{fill:var(--jp-red-50);color:var(--jp-red-50)}.EtbKbd5m85w7oYT4stIs.QFSZbIKFdWO3HEPBZyhc{fill:var(--jp-green-50);color:var(--jp-green-50)}.GgJAnS4gaEEGmRCP5n8y{align-content:flex-end;display:flex}.mjiNtwdbKpfo9edGVes4{margin-right:2px}.pAt4v_KG9Ir19wNcEtEj{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:calc(var(--spacing-base)*2.5);min-height:28px;width:100%}.OpMBda4vebhRbW8Fm6YC{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,0 0 40px 0 rgba(0,0,0,.08);display:flex;flex-direction:column;height:100%;padding:calc(var(--spacing-base)*3)}.OpMBda4vebhRbW8Fm6YC.BghJAx9hSagUdHWOUaYE{background:none;background-color:var(--jp-white-off);color:var(--jp-black-80);text-decoration:none}.OpMBda4vebhRbW8Fm6YC.BghJAx9hSagUdHWOUaYE:focus{background-color:var(--jp-white);box-shadow:0 0 0 1.5px var(--jp-black);outline:3px solid transparent}.OpMBda4vebhRbW8Fm6YC.IWsEW5nnNWUqqcT3K5L1{box-shadow:0 0 0 1.5px var(--jp-red-60)}.r3UCwgwCthua6lDCvIBI{align-items:center;display:flex;gap:var(--spacing-base);justify-content:space-between;margin-bottom:var(--spacing-base);width:100%}.r3UCwgwCthua6lDCvIBI h3{font-weight:700}.vpluqUMgmwx9_f8wCVIn{align-items:center;display:flex;flex-wrap:wrap-reverse;gap:var(--spacing-base);height:100%}.gmPKCDKZcfQt9WieTyKS{flex-grow:1}.fDBaV7I4yUO6w5AWVEtr{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:calc(var(--spacing-base)*2);min-height:28px;width:100%}.f5VJYwuJmjxH8PVxEbbv{align-items:center;display:flex;height:28px;white-space:nowrap}.f5VJYwuJmjxH8PVxEbbv:before{border-radius:50%;content:"";display:inline-block;height:8px;margin-right:var(--spacing-base);width:8px}.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}}.g4lyov8aMDggdD4yOi1p{align-items:baseline;display:flex;margin-top:calc(var(--spacing-base)/2)}.g4lyov8aMDggdD4yOi1p .Ys5ScZ_dYn2O2AzDE5Yi{font-size:32px;font-weight:400;line-height:36px;margin-right:var(--spacing-base)}.sUNg_b7XteVXOrpHAkJg :last-child{margin-top:4px}.cF6QAJf1vXXAMuutXPcq{align-items:baseline;display:flex}.cF6QAJf1vXXAMuutXPcq.coY634LconQ7gzDDNJeu{fill:var(--jp-gray-10);color:var(--jp-gray-10)}.cF6QAJf1vXXAMuutXPcq.kyqpwKaL2FyQ8CtxJQ0f{fill:var(--jp-green-50);color:var(--jp-green-50)}.cF6QAJf1vXXAMuutXPcq.aXf37lEOcjpNV8ImLaYK{fill:var(--jp-red-40);color:var(--jp-red-40)}.cF6QAJf1vXXAMuutXPcq .OyGdoGzsQ48VaVVR99_H{left:2px;position:relative;top:2px}.cF6QAJf1vXXAMuutXPcq .cKLicfMCaDSGPlX222jF{font-size:14px;font-weight:600;line-height:24px}.wm7Alh6CwbsWkVSODgI2{margin-top:calc(var(--spacing-base)/2)}.qpN923qyxjI06NCgFC8j>li{margin-bottom:0}@keyframes R2i0K45dEF157drbVRPI{0%{opacity:.6}50%{opacity:1}to{opacity:.6}}.NisihrgiIKl_knpYJtfg{animation:R2i0K45dEF157drbVRPI 1.5s infinite;background-color:var(--jp-gray);height:100%;width:100%}.cAbGtJDGgLubucBnz7vM{background-color:var(--jp-white)}.wiobThfXJCuhGNrbFIT6 a,.wiobThfXJCuhGNrbFIT6 a:active,.wiobThfXJCuhGNrbFIT6 a:hover{color:var(--jp-black)}.VgAxgahF9bC2M__FiIgV{display:flex;margin-bottom:calc(var(--spacing-base)*3)}.dbRwkMLqcMF67njPoAF7{margin-right:8px}.Doju0RxvvN9JS12mf489{line-height:calc(var(--spacing-base)*3);margin:0 0 var(--spacing-base) 0}.yWUvvF4WJLNDSpMgBMfm{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.ka1fVHj2HOkHjhdoEFOZ{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.ka1fVHj2HOkHjhdoEFOZ{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.ka1fVHj2HOkHjhdoEFOZ{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.JMOO4Y_9yhTO9lwLnRUx{grid-column-end:span 1}.PFDPAqk51qox_ChLqJwm{grid-column-end:span 2}.ault0jHVfWpShqOGooIP{grid-column-end:span 3}.GqpvdRzmzPJELtSm4FEN{grid-column-end:span 4}@media(min-width:600px){.Ym4_YneEGD_iZD6W1C2o{grid-column-end:span 1}.NbvHnnDtWw8n9BEUQ0Oy{grid-column-end:span 2}.ElMT7rhxe5ZJKO41MnhW{grid-column-end:span 3}.yKjnqjibn_wW_1tWWt5Q{grid-column-end:span 4}.Pb30lOcQFpzUX57GwflS{grid-column-end:span 5}.pC1wxc_R8y4pNILHsiiY{grid-column-end:span 6}.pChscSCnudQoWGjMFKI_{grid-column-end:span 7}.qw1H2gAgF3lDCI2Tbkmb{grid-column-end:span 8}}@media(min-width:960px){.VzcA_rrxBK3g4ozA0oD9{grid-column-end:span 1}.pNAa7O2adRZD8Slgk9iR{grid-column-end:span 2}.tlIMLlipexblj8CeOx4B{grid-column-end:span 3}.Dvt0u5l2Rr1BhBmvYAzl{grid-column-end:span 4}.BiUsgNTc0tyc7tC5jnzE{grid-column-end:span 5}.ulJXAsj7G2ROJ1g3_s28{grid-column-end:span 6}.HsoVlyVLsXYClx9Atox0{grid-column-end:span 7}.oXxjRQNNj2cfIpFBqC1W{grid-column-end:span 8}.qXgUn4Adg9xE_JnbuDio{grid-column-end:span 9}.xMpqTLiLfYFEJiRPQQQq{grid-column-end:span 10}.IiGo3Sz2FDZN7_eGElwA{grid-column-end:span 11}.Om8BNCjfgqQ_wmPQjfOY{grid-column-end:span 12}}@media(max-width:960px){.t10ZWzP7ADjJnR4tqxRS{display:none}}@media(max-width:600px){.eOUlZG8Pelh_Xj0aSoHG{display:none}}.l546LrwBEePz434NFK5Q{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}.l546LrwBEePz434NFK5Q span{display:block}.l546LrwBEePz434NFK5Q span:last-of-type{font-weight:600}.l546LrwBEePz434NFK5Q:focus span:last-of-type,.l546LrwBEePz434NFK5Q:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.l546LrwBEePz434NFK5Q:focus:after,.l546LrwBEePz434NFK5Q:hover:after{transform:translateY(-50%) translateX(8px)}.l546LrwBEePz434NFK5Q: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}.Q7w4fcEcemZ2nlwaYNog{fill:var(--jp-yellow-30)!important;display:inline-block!important;width:1.1em!important}.AoNQsOaTt6gSf0H6Yasz{display:inline-block;position:relative}.v13ZwGzUnecPA7Y3URAl{height:18px;left:-53px;pointer-events:none;position:absolute;top:0;width:124px}.EeDbu9pXFWTsCzfTpv2v{pointer-events:all}.BmSvoIi3rErkcrRiOi2W{color:var(--jp-black);font-size:16px;font-weight:600;line-height:19px}.BmSvoIi3rErkcrRiOi2W:not(:last-child){margin-bottom:8px}.mojRoVuWdDJo0E6LEjJw{font-size:14px;font-weight:400;line-height:24px}.golden-token-icon-tooltip .components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-right:-62px}.golden-token-icon-tooltip .components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-left:-62px}.golden-token-icon-tooltip .components-popover[data-y-axis=bottom] .components-popover__content{top:2px!important}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-6px!important}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-4px!important}.golden-token-icon-tooltip .components-popover[data-y-axis=top] .components-popover__content{bottom:10px!important}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:3px}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:4px}.golden-token-icon-tooltip .components-popover__content{border:1px solid var(--jp-gray);border-radius:4px;outline:none;padding:24px;white-space:normal;width:304px}.golden-token-icon-tooltip .components-button.is-link:focus:not(:disabled){box-shadow:none}.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)}.cbOwD8Y4tFjwimmtchQI.DKOBOTVmTLbh26gUH_73{fill:var(--color-mastodon)}.cbOwD8Y4tFjwimmtchQI.n5XodNsuMfMAAvqHFmbw{fill:var(--color-nextdoor)}.cbOwD8Y4tFjwimmtchQI.cL3m0xBYTYhIKI7lCqDB{fill:var(--color-instagram)}.cbOwD8Y4tFjwimmtchQI.fftumuc_lJ6v0tq4UMVR{fill:var(--color-whatsapp)}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe{align-items:center;display:flex;gap:var(--spacing-base);margin-bottom:calc(var(--spacing-base)*3)}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .VmtuLc2xRqmsO6cK8qjF{position:relative}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .MdTRfQ3eo5qZKChZlzNj{width:32px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .PbEpL02SEH9VNAlbKCfV{width:30px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .TD4AUM9gcTVAB6JHB5ZR{border-radius:50%;margin-left:-10px;position:absolute;width:32px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .yjl73qv0VWoPP8IhGreh{border-top-style:solid;border-top:2px dashed var(--jp-black);height:0;width:67px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .rq8YRaj9OyUUXJUHiUgI{border-color:var(--jp-red)}.kezuOHNvu9vdvlJ86Fwg .YZ7FNKEm9qpvQ4ZkbAz5{transform:rotate(180deg)}.kezuOHNvu9vdvlJ86Fwg .oH9tzGE80LnB6Og69RFz{margin-bottom:var(--spacing-base)}.kezuOHNvu9vdvlJ86Fwg .oH9tzGE80LnB6Og69RFz,.kezuOHNvu9vdvlJ86Fwg .xXVEWvQllVsFGmJY8WEp{align-items:center;display:flex;gap:var(--spacing-base)}.kezuOHNvu9vdvlJ86Fwg .xXVEWvQllVsFGmJY8WEp.J0GIu2rNR7rXocQTyd8p{fill:var(--jp-red);color:var(--jp-red)}.jp-connection__manage-dialog{--spacing-base:8px;border-radius:3px;margin:auto;width:1200px}.jp-connection__manage-dialog__content{align-items:center;background:var(--jp-white-off);display:flex;flex-direction:column;justify-content:center;padding:80px;text-align:center}.jp-connection__manage-dialog__content h1{font-size:var(--font-title-large);font-weight:700;line-height:1.2;margin:0}.jp-connection__manage-dialog__large-text{font-size:1.25rem;font-weight:600;margin-bottom:calc(var(--spacing-base)*4);margin-top:calc(var(--spacing-base)*3);max-width:60%}.jp-connection__manage-dialog__actions{align-items:center;background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;box-sizing:border-box;margin:0!important;max-width:1200px!important;padding:calc(var(--spacing-base)*4) calc(var(--spacing-base)*5);position:sticky}.jp-connection__manage-dialog__link{color:var(--jp-black)}.jp-connection__manage-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__manage-dialog__link:focus{color:var(--jp-black)}.jp-connection__manage-dialog__button-wrap button{float:right}.jp-connection__manage-dialog__action-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:var(--spacing-base) auto;max-width:100%;padding:1rem 2rem;text-align:left;width:750px}.jp-connection__manage-dialog__action-card__card-headline{font-size:var(--font-body);font-weight:600;line-height:calc(var(--spacing-base)*3);text-decoration:none}.jp-connection__manage-dialog__action-card__icon{float:right}.jp-connection__manage-dialog__action-card .transfer{fill:var(--jp-black);color:var(--jp-black)}.jp-connection__manage-dialog__action-card .disconnect{fill:var(--jp-red);color:var(--jp-red)}.jp-connection__manage-dialog .components-modal__header{display:none}.jp-connection__manage-dialog .components-modal__content{margin:0;padding: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,');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,')}.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;max-width:110px}.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{--spacing-base:8px}.jp-connection__connect-screen__loading{display:none}.jp-connection__connect-screen .terms-of-service{margin-bottom:calc(var(--spacing-base)*3);margin-top:calc(var(--spacing-base)*4);max-width:360px}.jp-connection__connect-screen .terms-of-service a{text-decoration:underline}.jp-connection__connect-screen .jp-action-button{margin-top:40px}.jp-connection__connect-screen .jp-action-button--button{border-radius:4px;font-weight:600}.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:calc(var(--spacing-base)*3)}@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}}.rna{overflow:hidden}.rna .jp-connection__connect-screen-layout__left{position:relative;z-index:2}.rna .jp-connection__connect-screen-layout__left h2{font-weight:700;margin-top:0}.rna .jp-connection__connect-screen-layout__left h3{margin-top:24px}@media(min-width:600px){.rna .jp-connection__connect-screen-layout__left{padding:4rem 6rem 4rem 4rem}}@media(min-width:1080px){.rna .jp-connection__connect-screen-required-plan__pricing-card{position:absolute;right:calc(var(--spacing-base)*-45);top:calc(var(--spacing-base)*9.25)}}.rna .jp-connection__connect-screen-required-plan__pricing-card .jp-components__pricing-card{border-radius:var(--jp-border-radius-rna);max-width:100%;width:425px}.rna .jp-connection__connect-screen-required-plan__pricing-card .jp-components__pricing-card__title{margin-top:.625rem}@media(min-width:960px){.rna .jp-connection__connect-screen-required-plan__pricing-card .jp-components__pricing-card{padding:3rem}}.rna .jp-connection__connect-screen-required-plan__pricing-card .components-button{margin-bottom:0}.rna .jp-backup-dashboard-promotion ul.jp-product-promote li{margin-bottom:.75rem}.rna .jp-connection__connect-screen-layout__color-blobs{clip-path:polygon(100% 0,100% 100%,0 0,0 0);display:none;height:677px;position:absolute;right:0;top:0;width:363px;z-index:1}.rna .jp-connection__connect-screen-layout__color-blobs__blue,.rna .jp-connection__connect-screen-layout__color-blobs__green,.rna .jp-connection__connect-screen-layout__color-blobs__yellow{border-radius:50%;filter:blur(50px);position:absolute}.rna .jp-connection__connect-screen-layout__color-blobs__blue{background-color:var(--jp-blue-5);height:400px;right:-100px;top:-275px;width:400px;z-index:3}.rna .jp-connection__connect-screen-layout__color-blobs__yellow{background-color:var(--jp-yellow-5);height:250px;right:-25px;top:10px;width:250px;z-index:2}.rna .jp-connection__connect-screen-layout__color-blobs__green{background-color:var(--jp-green-5);height:300px;right:0;top:175px;width:300px;z-index:1}@media(min-width:1080px){.rna .jp-connection__connect-screen-layout__color-blobs{display:initial}}.terms-of-service{color:var(--jp-black);font-size:var(--font-body)}.terms-of-service .terms-of-service__link{color:var(--jp-green-50);text-decoration:underline;white-space:nowrap}.TcCZnGE6mad8Dvz9pCZi{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIvPjxwYXRoIGZpbGw9IiNENjM2MzkiIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIi8+PC9zdmc+) no-repeat 0 0;color:var(--jp-red);line-height:25px;padding-left:25px}._mn6o2Dtm5pfFWc8_A1K{--spacing-base:8px;min-width:264px}.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%}.i_AnOR3MaQLraGvb2QU5{background-color:#f9f9f6}.YcYvLvdvWrb1EUZoVsE8{display:flex;flex-wrap:wrap;gap:calc(var(--horizontal-spacing)*2);justify-content:space-between}.uGTTsKoIOoZdYhk6uPnl{white-space:nowrap}.uGTTsKoIOoZdYhk6uPnl>span{font-size:var(--font-body-small)}.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}.p4qz2tkq0p9hxucJ6Qk2{--padding:calc(var(--spacing-base)*4);color:var(--jp-black)}.lbNDyXioOwvyvbALtCBm{--gap:calc(var(--spacing-base)*3);padding:var(--padding) 0;position:relative}.s2Lsn4kbm6BrS3DSndRB .lbNDyXioOwvyvbALtCBm{column-gap:var(--gap);display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--columns),1fr);grid-template-rows:repeat(var(--rows),minmax(min-content,max-content))}.cLaNK_XcbTGlRQ4Tp43Q{margin-top:var(--padding)}.s2Lsn4kbm6BrS3DSndRB .cLaNK_XcbTGlRQ4Tp43Q{display:contents}.cLaNK_XcbTGlRQ4Tp43Q.CYt1X0eH1icRjhtJ28jx>*{background:var(--jp-white);position:relative}.cLaNK_XcbTGlRQ4Tp43Q.CYt1X0eH1icRjhtJ28jx>:after{bottom:0;box-shadow:0 4px 24px rgba(0,0,0,.05);content:"";left:0;position:absolute;right:0;top:0;z-index:-1}.cLaNK_XcbTGlRQ4Tp43Q>:first-child{border-top-left-radius:var(--jp-border-radius);border-top-right-radius:var(--jp-border-radius);border-width:1px 1px 0}.cLaNK_XcbTGlRQ4Tp43Q>:last-child{border-bottom-left-radius:var(--jp-border-radius);border-bottom-right-radius:var(--jp-border-radius);border-width:0 1px 1px}.DAkZc1P9A3K12fjEliMg{display:flex;flex-direction:column;justify-content:space-between;padding:var(--padding)}.WUBuYABl8nymjs9NnCEL{align-items:center;display:flex;padding-bottom:calc(var(--spacing-base)*2);position:relative}.WUBuYABl8nymjs9NnCEL:not(:nth-child(2)){padding-top:calc(var(--spacing-base)*2)}.WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{background-color:var(--jp-gray);content:"";height:1px;left:var(--padding);position:absolute;right:var(--padding);top:0;z-index:5}.s2Lsn4kbm6BrS3DSndRB .WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{left:0;right:unset;width:calc(100% + var(--gap))}.s2Lsn4kbm6BrS3DSndRB .lbNDyXioOwvyvbALtCBm>:last-child .WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{width:100%}.ANtCFeb41NhA8PA3H7ZN,.WUBuYABl8nymjs9NnCEL:last-of-type{padding-bottom:var(--padding)}.Ql2gy_148yW8Vw5vhaKD{padding-left:var(--padding);padding-right:var(--padding)}.EAQrAnQEW1z1BfdY5gbC{fill:var(--jp-gray);flex-shrink:0;margin:0 var(--spacing-base)}.EAQrAnQEW1z1BfdY5gbC.JDSTlLoOC_4aUoH2oNM2{fill:var(--jp-green-40)}.EAQrAnQEW1z1BfdY5gbC.zNdQRJ1w7BvaQOYyqzHK{fill:var(--jp-red-50)}.lr7vbX95SKtoe7DarJcZ{margin-left:auto}.s2Lsn4kbm6BrS3DSndRB .lr7vbX95SKtoe7DarJcZ{margin:0 var(--spacing-base);top:1px}.WUBuYABl8nymjs9NnCEL .KRrGp2xdkeBOxLZeuQ6X{fill:var(--jp-gray-20);flex-shrink:0}.H_ZJiRVJg0LiMXPGOcmt{text-align:center;width:fit-content}.H_ZJiRVJg0LiMXPGOcmt>a{color:#000}.s2Lsn4kbm6BrS3DSndRB .H_ZJiRVJg0LiMXPGOcmt{grid-column:2;overflow:hidden;padding-left:var(--padding);padding-right:var(--padding);white-space:nowrap}.x21z_DixObRDsDaWotP1{align-items:right;display:flex;justify-content:right;margin:0 calc(var(--spacing-base)*4)}.components-popover:not(.is-without-arrow):before{border-color:var(--jp-gray)}.icon-tooltip-helper .components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-right:-62px}.icon-tooltip-helper .components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-left:-62px}.icon-tooltip-helper .components-popover[data-y-axis=bottom] .components-popover__content{top:2px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-6px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-4px!important}.icon-tooltip-helper .components-popover[data-y-axis=top] .components-popover__content{bottom:10px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:3px}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:4px}.icon-tooltip-helper .components-popover__content{border:1px solid var(--jp-gray);border-radius:4px;outline:none;padding:24px;white-space:normal;width:304px}.icon-tooltip-helper.is-wide .components-popover__content{width:440px}.icon-tooltip-wrapper{color:var(--jp-black);display:inline-block;position:relative}.icon-tooltip-wrapper .components-button.is-link:focus:not(:disabled){box-shadow:none}.icon-tooltip-helper{height:18px;left:-53px;pointer-events:none;position:absolute;top:0;width:124px}.icon-tooltip-container{pointer-events:all}.icon-tooltip-title{font-size:16px;font-weight:600;line-height:19px}.icon-tooltip-title:not(:last-child){margin-bottom:8px}.icon-tooltip-content{font-size:14px;font-weight:400;line-height:24px}.icon-tooltip-content ul{list-style-type:disc;margin:0 0 0 1rem}.icon-tooltip-content ul li:last-child{margin-bottom:0}.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)}.dovianZYLKhnbnh9I06o{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-end}.lljtQMhW7lq5tE5SDJEf{align-items:flex-start;display:flex;flex-basis:0;flex-grow:2}.lljtQMhW7lq5tE5SDJEf .NubApIV1vQCRUNprfm6b{margin-left:auto}.dhFQXpZfMwVI8vuYHnwC{align-items:flex-start;display:inline-flex;flex:0 0 auto;position:relative}.dhFQXpZfMwVI8vuYHnwC:first-child{margin-right:calc(var(--spacing-base)*2)}.dhFQXpZfMwVI8vuYHnwC.eD7hzxFmdtG_MgmBtl_k{color:var(--jp-gray-20)}.dhFQXpZfMwVI8vuYHnwC.eD7hzxFmdtG_MgmBtl_k: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%}.C64ZjjUAqJC1T2Sa7apS{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-start;margin-bottom:calc(var(--spacing-base)*3)}.UpZDGew6Ay1hPoP6eI7b{color:var(--jp-gray-40);font-size:var(--font-body-small);line-height:20px}.UpZDGew6Ay1hPoP6eI7b:after{content:""}.NubApIV1vQCRUNprfm6b{background-color:var(--jp-yellow-10);border-radius:4px;font-size:13px;font-weight:600;margin-left:var(--spacing-base);padding-left:var(--spacing-base);padding-right:var(--spacing-base)}.TDiiPbuW1Z0_05u_pvcK{font-weight:400}.VHYulMcpzbr10HWR0iSE{align-items:flex-start;border:1px solid var(--jp-black);border-color:var(--jp-gray-5);border-left-width:6px;border-radius:4px;display:flex;font-size:var(--font-body);padding:24px 31px 27px 18px}.FGpSkMCiIHQjszcV0dbn{margin-right:20px}.FGpSkMCiIHQjszcV0dbn,.KoWZcCwhW13xvkEb0QON{height:calc(var(--spacing-base)*3);width:calc(var(--spacing-base)*3)}.KoWZcCwhW13xvkEb0QON{background-color:transparent;border:none;cursor:pointer;outline:none}@media screen and (max-width:600px){.VHYulMcpzbr10HWR0iSE{box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);padding-top:68px;position:relative}.FGpSkMCiIHQjszcV0dbn{left:24px;position:absolute;top:24px}.KoWZcCwhW13xvkEb0QON{position:absolute;right:24px;top:24px}}.smrfczkC53EaFM8OJUXs{flex-grow:1}.IKYRWoPwt9xOVEx1wzNS{font-weight:600;margin-bottom:8px}.qM0qY6mPYp1MPN54A3Kg{align-items:center;display:flex;margin-top:20px}.qM0qY6mPYp1MPN54A3Kg a,.qM0qY6mPYp1MPN54A3Kg a:active,.qM0qY6mPYp1MPN54A3Kg a:focus,.qM0qY6mPYp1MPN54A3Kg a:hover{color:var(--jp-black)}.qM0qY6mPYp1MPN54A3Kg>*{margin-right:24px}.A5YkDkkXuiYgavrY6Nux{border-left-color:var(--jp-red)}.A5YkDkkXuiYgavrY6Nux .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-red)}.cT5rwuPMZzWvi5o6shMl{border-left-color:var(--jp-yellow-20)}.cT5rwuPMZzWvi5o6shMl .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-yellow-20)}.yo0O3uvNomPsYUXFCpAS{border-left-color:var(--black)}.yo0O3uvNomPsYUXFCpAS .y_IPyP1wIAOhyNaqvXJq{fill:var(--black)}.oZdDFf1jBLkzn5ICCC6x{border-left-color:var(--jp-green)}.oZdDFf1jBLkzn5ICCC6x .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-green)}.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:.5em 2em;text-align:center;width:100%}.Q6uUUQCPWS6_6nLxIn68 .YU4iBCRze09ZP3iCsdcb{margin:0}.Q6uUUQCPWS6_6nLxIn68.components-button.is-primary{height:auto;white-space:normal}.Q6uUUQCPWS6_6nLxIn68.is-secondary:hover:not(:disabled){background-color:var(--jp-black);color:var(--jp-white)}.OrQG7DjDd9Ha2Xj1Mx3L{margin-top:calc(var(--spacing-base)*2)}.Q1jaYDpa2AVfJpA29wT0{flex-grow:1;margin:0;margin-bottom:calc(var(--spacing-base)*2);padding:0}.Q1jaYDpa2AVfJpA29wT0 li{align-items:flex-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)}.sEcLfpWjo0GF7QrxD3Lt{margin-top:calc(var(--spacing-base)*2)}.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)}.gCTKfAPzJqZas7CaRbKN{margin-bottom:calc(var(--spacing-base)*4)}.demNsMJjhi7BLY7xhjU5{align-items:center;display:flex;font-size:var(--font-body);line-height:calc(var(--spacing-base)*3);margin:calc(var(--spacing-base)*2) 0;min-height:calc(var(--spacing-base)*3)}.QiUjdjJSkqh6nH7YMG5A{align-self:flex-start;height:calc(var(--spacing-base)*3);margin-right:calc(var(--spacing-base)/2);width:calc(var(--spacing-base)*3)}.Q080AHcq29J2fc68Hhk5{color:var(--jp-red)}.Q080AHcq29J2fc68Hhk5 .hYWbIwhppukXmGnsiT9H{fill:var(--jp-red)}.JjHuxWly0HI9C60gorbq{color:var(--jp-yellow-40)}.JjHuxWly0HI9C60gorbq .hYWbIwhppukXmGnsiT9H{fill:var(--jp-yellow-40)}.Cm8ZFHi3mngl4cj9Gatx{color:var(--jp-blue-40)}.Cm8ZFHi3mngl4cj9Gatx .hYWbIwhppukXmGnsiT9H{fill:var(--jp-blue-40)}.ytGBsU015p3LGwOPwFDx{color:var(--jp-green)}.ytGBsU015p3LGwOPwFDx .hYWbIwhppukXmGnsiT9H{fill:var(--jp-green)}.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,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error{max-width:500px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field .components-input-control__label.components-input-control__label.components-input-control__label,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error .components-input-control__label.components-input-control__label.components-input-control__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 select.components-select-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error input.components-text-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error select.components-select-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,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error select.components-select-control__input{border:1px solid var(--jp-red)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error{align-items:flex-start;color:var(--jp-red);display:flex;flex-direction:row;max-width:500px}.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%}.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}.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%}.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}.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}}: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-5:#f5e6b3;--jp-yellow-10:#f2cf75;--jp-orange-20:#faa754;--jp-blue-5:#ced9f2;--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-border-radius-rna:8px;--jp-menu-border-height:1px;--jp-underline-thickness:2px;--jp-modal-padding-large:32px;--jp-modal-padding:24px;--jp-modal-padding-small:16px;--jp-modal-radius:8px;--jp-button-padding:8px;--jp-button-radius:4px;--jp-gap:16px;--jp-highlight:#3858e9}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.EiaNctK1_P9pPqOeiaSI{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.ogHZg_sJCljylz3VJfsf{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.ogHZg_sJCljylz3VJfsf{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.ogHZg_sJCljylz3VJfsf{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.zv7eGvijKRkbPVakubHw{grid-column-end:span 1}.VoJNoiya_1ck3_kXS6_C{grid-column-end:span 2}.ecv0NO526NoTNbpALA1A{grid-column-end:span 3}.OfBdkceMzeHvRbzhqDlP{grid-column-end:span 4}@media(min-width:600px){.JLb3NpEKN8pOaWd7K1bu{grid-column-end:span 1}.fsMPGqPKE4mjMIPFwl77{grid-column-end:span 2}.DIK_zdaGAQ09eKspBJ4E{grid-column-end:span 3}.shXYpxPu3WCJsR8aOHtz{grid-column-end:span 4}.s7ElrOqG_yGd5SIfwqOR{grid-column-end:span 5}.Cxml9uzGvArAL8_RDs_p{grid-column-end:span 6}.aANxBKDGx72eDqU0iUPj{grid-column-end:span 7}.XxyzuTY3mnQcl9EGZadm{grid-column-end:span 8}}@media(min-width:960px){.Sfo4WaSNIWInJ93Abd3w{grid-column-end:span 1}.tQS7SKUGrU4THhWMysbo{grid-column-end:span 2}.I94U7mpY4h16pcOksZNF{grid-column-end:span 3}.uWMb9k77kQxBdS5MTt0s{grid-column-end:span 4}.rKwEEZQxK9s_POMg5Jss{grid-column-end:span 5}.UcPXX_s06IPCkF7ZjH3D{grid-column-end:span 6}.CrQdtiCFkRbzY6K2dFvt{grid-column-end:span 7}.rEUALOmOdUBXO0Us871z{grid-column-end:span 8}.NqXa9TlcTEviVsB53hBV{grid-column-end:span 9}.OnWVeiQiwgQ9lzdGPW66{grid-column-end:span 10}.D2PkTcy7b8u2K9QXY6VQ{grid-column-end:span 11}.EcqBhzAyxo5RDc2Y6m7K{grid-column-end:span 12}}@media(max-width:960px){.gB1mWzHOM38d80lrhBRX{display:none}}@media(max-width:600px){.KNQXLP78ejczOkour3zg{display:none}}.rBVbaVWBnBRtTMrUKZxm{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}.rBVbaVWBnBRtTMrUKZxm span{display:block}.rBVbaVWBnBRtTMrUKZxm span:last-of-type{font-weight:600}.rBVbaVWBnBRtTMrUKZxm:focus span:last-of-type,.rBVbaVWBnBRtTMrUKZxm:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.rBVbaVWBnBRtTMrUKZxm:focus:after,.rBVbaVWBnBRtTMrUKZxm:hover:after{transform:translateY(-50%) translateX(8px)}.rBVbaVWBnBRtTMrUKZxm: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}.gfM_DIJrVbRhmKdAphIm{background:var(--jp-white);border-radius:var(--jp-modal-radius);box-shadow:0 12px 16px -.5px rgba(0,0,0,.15);height:max-content;margin:3rem auto;max-width:414px;overflow:hidden;position:relative;transition:height .25s cubic-bezier(.59,.37,.18,1.19) 0;width:90%;will-change:height}.gfM_DIJrVbRhmKdAphIm>div:first-child{padding:0}.gfM_DIJrVbRhmKdAphIm *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.gfM_DIJrVbRhmKdAphIm p{color:var(--jp-black)}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN{display:none}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh{height:614px;transition-delay:2.15s}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh h2{margin-top:0}._j4GWTmW5psCHFYh6R0x{align-self:flex-start;margin-top:var(--jp-gap)!important;padding:8px var(--jp-modal-padding-small)!important;width:100%}.saSAjv8yulVXQDoqDJEI{font-weight:500;line-height:110%;margin-bottom:8px}.O_hcdbeMivIhBn7ApDnS{line-height:140%}@media(min-width:760px){.gfM_DIJrVbRhmKdAphIm{height:740px;max-width:1360px;position:relative;width:95%}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN{display:block;left:64px;position:absolute;top:64px;z-index:99}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN clipPath,.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN path{fill:#000}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN path.FCnyb_xCK7DhJ63p6TEd{fill:#fff}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh{height:740px;transition-delay:0}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh .zfJfONxRAw0fHjXUS7LN clipPath,.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh .zfJfONxRAw0fHjXUS7LN path{fill:#fff;transition:fill 2s ease .5s}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh .zfJfONxRAw0fHjXUS7LN path.FCnyb_xCK7DhJ63p6TEd{fill:#000;transition:fill 2s ease .5s}}@keyframes OmAVpCQ270MqI4IsT9Ky{20%{transform:translateY(0) scale(1)}65%{transform:translateY(16%) scale(1.4)}to{transform:translateY(0) scale(1)}}.Qn5xayjI_jH2m1d6BEoq{border-radius:var(--jp-button-radius);display:flex;height:50%;justify-content:center;min-height:400px;overflow:hidden;position:relative;transition:height .55s cubic-bezier(.59,.37,.18,1) 0s;will-change:height}.pnwbCuWbV0PNQr1LFpRh .Qn5xayjI_jH2m1d6BEoq{height:100%;transition-delay:.65s}.pnwbCuWbV0PNQr1LFpRh .Qn5xayjI_jH2m1d6BEoq video{animation:OmAVpCQ270MqI4IsT9Ky 1.5s ease-in-out forwards}.Qn5xayjI_jH2m1d6BEoq video{height:100%;left:0;object-fit:cover;position:absolute;top:0;transform:scale(1);transition:all .85s cubic-bezier(1,0,.39,1) 0s;width:100%;will-change:transform}@media(min-width:760px){@keyframes Axe8f2LgqEBZHVcsRgY5{0%{animation-timing-function:cubic-bezier(.86,0,.07,1);left:60%;top:32px}50%{animation-timing-function:cubic-bezier(.17,.84,.44,1);bottom:32px;left:32px;top:32px;width:100%}to{left:32px;width:40%}}.Qn5xayjI_jH2m1d6BEoq{border-radius:12px;bottom:32px;display:block;height:auto;left:60%;overflow:hidden;position:absolute;right:32px;top:32px;transition-delay:0;transition:width .55s ease 0s;z-index:3}.Qn5xayjI_jH2m1d6BEoq video{height:100%;left:0;object-fit:cover;position:absolute;top:0;width:100%}.pnwbCuWbV0PNQr1LFpRh .Qn5xayjI_jH2m1d6BEoq{animation-delay:.25s;animation-duration:2s;animation-fill-mode:forwards;animation-name:Axe8f2LgqEBZHVcsRgY5;height:auto}}.iBMDoShSmqpt72YfJb36{padding:var(--jp-modal-padding)}.iBMDoShSmqpt72YfJb36 h2{font-size:clamp(1.5rem,-.7353rem + 4.7059vw,3.5rem)}.iBMDoShSmqpt72YfJb36 p{font-size:clamp(1rem,.6974rem + 1.1696vw,1.75rem)}.iBMDoShSmqpt72YfJb36 p.eQG1KKK8jjKtQyzfv573{display:none;font-size:clamp(1.25rem,1.1491rem + .3899vw,1.5rem)}@media(min-width:760px){.iBMDoShSmqpt72YfJb36{bottom:15%;display:flex;flex-direction:column;gap:64px;left:64px;padding:0 var(--jp-modal-padding) 0 0;position:absolute;width:55%}.iBMDoShSmqpt72YfJb36 .l35bIyiqYJiZ6tVYvJtC{align-items:flex-start;display:flex;flex-direction:column;gap:16px;padding:0 32px 0 0}.iBMDoShSmqpt72YfJb36 .l35bIyiqYJiZ6tVYvJtC h2,.iBMDoShSmqpt72YfJb36 .l35bIyiqYJiZ6tVYvJtC p{margin:0}.iBMDoShSmqpt72YfJb36 p.eQG1KKK8jjKtQyzfv573{display:block}.iBMDoShSmqpt72YfJb36 ._j4GWTmW5psCHFYh6R0x{align-self:flex-start;padding:16px var(--jp-modal-padding-large)!important;width:auto}.pnwbCuWbV0PNQr1LFpRh .iBMDoShSmqpt72YfJb36{left:-20px;opacity:0;transition:all .55s cubic-bezier(.59,.37,.18,1) .3s}}.HQVDZ6J3x6SJNYFX5khS{background:var(--jp-white);left:0;opacity:0;position:absolute;top:100%;transition:transform .45s cubic-bezier(.59,.37,.18,1) 2s,opacity .45s linear;width:100%;will-change:transform,opacity;z-index:2}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS{opacity:1;transform:translateY(-100%);transition-delay:2s}@media(min-width:760px){.HQVDZ6J3x6SJNYFX5khS{align-items:flex-end;bottom:5%;container-type:inline-size;display:flex;flex-direction:column;gap:40px;left:45%;padding:0;right:32px;transform:translateY(0);transition-delay:0;transition:none;width:auto}.HQVDZ6J3x6SJNYFX5khS h2{width:100%}.HQVDZ6J3x6SJNYFX5khS ._j4GWTmW5psCHFYh6R0x{margin-right:var(--jp-modal-padding-large)}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS{bottom:12%;left:45%;opacity:1;right:32px;top:unset;transform:translateY(0);transition:all .45s cubic-bezier(.59,.37,.18,1) 2s,opacity .45s linear;transition-delay:2s;width:auto}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS .l35bIyiqYJiZ6tVYvJtC{padding-left:32px}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS ._j4GWTmW5psCHFYh6R0x{align-self:flex-end}}.KdvmPIjelQIFiPQGuIYf{background:var(--jp-gray-0);display:flex;flex-direction:column;gap:var(--jp-gap)}.KdvmPIjelQIFiPQGuIYf div{background-color:var(--jp-white);border:1px solid var(--jp-gray-10);border-radius:var(--jp-button-radius);box-shadow:0 0 40px 0 rgba(0,0,0,.08);flex:1;padding:var(--jp-modal-padding)}.KdvmPIjelQIFiPQGuIYf h3{font-size:24px;line-height:normal;margin:0}.KdvmPIjelQIFiPQGuIYf p{font-size:14px}@media(min-width:760px){.KdvmPIjelQIFiPQGuIYf{flex-direction:row;padding:var(--jp-modal-padding-large)}.KdvmPIjelQIFiPQGuIYf div{border:none;box-shadow:0 2px 16px rgba(0,0,0,.08),0 2px 2px rgba(0,0,0,.1)}.KdvmPIjelQIFiPQGuIYf div p{margin:8px 0}.KdvmPIjelQIFiPQGuIYf svg{margin-bottom:var(--jp-modal-padding-small)}}@container (max-width: 600px){.KdvmPIjelQIFiPQGuIYf div{padding:var(--jp-modal-padding-small)}}.jp-license-activation-screen{border-radius:4px;box-shadow:0 4px 24px 0 rgba(0,0,0,.149);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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js
new file mode 100644
index 00000000..8cb88373
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js
@@ -0,0 +1,34 @@
+/*! For license information please see index.js.LICENSE.txt */
+(()=>{var e={9487:(e,t,n)=>{"use strict";n.d(t,{X:()=>c});const a={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 a[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},8899:(e,t,n)=>{"use strict";n.d(t,{LR:()=>r});var a=n(9487),c=n(2003);function r(e,t,n={}){const r=(0,a.X)(t);if(!r||isNaN(e))return null;const{decimal:i,grouping:s,precision:o,symbol:l}={...r,...n},u=e<0?"-":"",p=Math.abs(e),d=Math.floor(p);return{sign:u,symbol:l,integer:(0,c.Z)(p,o,i,s).split(i)[0],fraction:o>0?(0,c.Z)(p-d,o,i,s).slice(1):""}}},2003:(e,t,n)=>{"use strict";function a(e,t=0,n=".",a=","){const c=(e+"").replace(/[^0-9+\-Ee.]/g,""),r=isFinite(+c)?+c:0,i=isFinite(+t)?Math.abs(t):0,s=(i?function(e,t){const n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(r,i):""+Math.round(r)).split(".");return s[0].length>3&&(s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a)),(s[1]||"").lengtha})},3170:(e,t,n)=>{"use strict";function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;tp,RQ:()=>L,WK:()=>U,Zn:()=>R,Zq:()=>z,aU:()=>c,cP:()=>d,fp:()=>v,kG:()=>s,pC:()=>I,q_:()=>i}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(c||(c={}));const r="popstate";function i(e){return void 0===e&&(e={}),g((function(e,t){let{pathname:n="/",search:a="",hash:c=""}=d(e.location.hash.substr(1));return u("",{pathname:n,search:a,hash:c},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),a="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");a=-1===n?t:t.slice(0,n)}return a+"#"+("string"==typeof t?t:p(t))}),(function(e,t){o("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function s(e,t){if(!1===e||null==e)throw new Error(t)}function o(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function l(e){return{usr:e.state,key:e.key}}function u(e,t,n,c){return void 0===n&&(n=null),a({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?d(t):t,{state:n,key:t&&t.key||c||Math.random().toString(36).substr(2,8)})}function p(e){let{pathname:t="/",search:n="",hash:a=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),a&&"#"!==a&&(t+="#"===a.charAt(0)?a:"#"+a),t}function d(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function m(e){let t="undefined"!=typeof window&&void 0!==window.location&&"null"!==window.location.origin?window.location.origin:window.location.href,n="string"==typeof e?e:p(e);return s(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}function g(e,t,n,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:s=!1}=a,o=i.history,d=c.Pop,g=null;function h(){d=c.Pop,g&&g({action:d,location:v.location})}let v={get action(){return d},get location(){return e(i,o)},listen(e){if(g)throw new Error("A history only accepts one active listener");return i.addEventListener(r,h),g=e,()=>{i.removeEventListener(r,h),g=null}},createHref:e=>t(i,e),encodeLocation(e){let t=m("string"==typeof e?e:p(e));return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){d=c.Push;let a=u(v.location,e,t);n&&n(a,e);let r=l(a),p=v.createHref(a);try{o.pushState(r,"",p)}catch(e){i.location.assign(p)}s&&g&&g({action:d,location:v.location})},replace:function(e,t){d=c.Replace;let a=u(v.location,e,t);n&&n(a,e);let r=l(a),i=v.createHref(a);o.replaceState(r,"",i),s&&g&&g({action:d,location:v.location})},go:e=>o.go(e)};return v}var h;function v(e,t,n){void 0===n&&(n="/");let a=R(("string"==typeof t?d(t):t).pathname||"/",n);if(null==a)return null;let c=f(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(c);let r=null;for(let e=0;null==r&&e{let i={relativePath:void 0===r?e.path||"":r,caseSensitive:!0===e.caseSensitive,childrenIndex:c,route:e};i.relativePath.startsWith("/")&&(s(i.relativePath.startsWith(a),'Absolute route path "'+i.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(a.length));let o=L([a,i.relativePath]),l=n.concat(i);e.children&&e.children.length>0&&(s(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),f(e.children,t,l,o)),(null!=e.path||e.index)&&t.push({path:o,score:Z(o,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of k(e.path))c(e,t,n);else c(e,t)})),t}function k(e){let t=e.split("/");if(0===t.length)return[];let[n,...a]=t,c=n.endsWith("?"),r=n.replace(/\?$/,"");if(0===a.length)return c?[r,""]:[r];let i=k(a.join("/")),s=[];return s.push(...i.map((e=>""===e?r:[r,e].join("/")))),c&&s.push(...i),s.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(h||(h={}));const y=/^:\w+$/,E=3,w=2,b=1,j=10,C=-2,_=e=>"*"===e;function Z(e,t){let n=e.split("/"),a=n.length;return n.some(_)&&(a+=C),t&&(a+=w),n.filter((e=>!_(e))).reduce(((e,t)=>e+(y.test(t)?E:""===t?b:j)),a)}function N(e,t){let{routesMeta:n}=e,a={},c="/",r=[];for(let e=0;e(a.push(t),"/([^\\/]+)")));e.endsWith("*")?(a.push("*"),c+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?c+="\\/*$":""!==e&&"/"!==e&&(c+="(?:(?=\\/|$))");let r=new RegExp(c,t?void 0:"i");return[r,a]}(e.path,e.caseSensitive,e.end),c=t.match(n);if(!c)return null;let r=c[0],i=r.replace(/(.)\/+$/,"$1"),s=c.slice(1);return{params:a.reduce(((e,t,n)=>{if("*"===t){let e=s[n]||"";i=r.slice(0,r.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return x(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(s[n]||"",t),e}),{}),pathname:r,pathnameBase:i,pattern:e}}function P(e){try{return decodeURI(e)}catch(t){return x(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function R(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&"/"!==a?null:e.slice(n)||"/"}function x(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function A(e,t,n,a){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(a)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function z(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function I(e,t,n,c){let r;void 0===c&&(c=!1),"string"==typeof e?r=d(e):(r=a({},e),s(!r.pathname||!r.pathname.includes("?"),A("?","pathname","search",r)),s(!r.pathname||!r.pathname.includes("#"),A("#","pathname","hash",r)),s(!r.search||!r.search.includes("#"),A("#","search","hash",r)));let i,o=""===e||""===r.pathname,l=o?"/":r.pathname;if(c||null==l)i=n;else{let e=t.length-1;if(l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}i=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:a="",hash:c=""}="string"==typeof e?d(e):e,r=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:r,search:T(a),hash:F(c)}}(r,i),p=l&&"/"!==l&&l.endsWith("/"),m=(o||"."===l)&&n.endsWith("/");return u.pathname.endsWith("/")||!p&&!m||(u.pathname+="/"),u}const L=e=>e.join("/").replace(/\/\/+/g,"/"),M=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),T=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",F=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;class O{constructor(e,t,n,a){void 0===a&&(a=!1),this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function U(e){return e instanceof O}const D=["post","put","patch","delete"],V=(new Set(D),["get",...D]);new Set(V),new Set([301,302,303,307,308]),new Set([307,308]),"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement},1074:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var a=n(9307);const c=(0,a.forwardRef)((function({icon:e,size:t=24,...n},c){return(0,a.cloneElement)(e,{width:t,height:t,...n,ref:c})}))},9404:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}))},3259:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}))},986:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"}))},9201:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}))},6936:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}))},6163:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}))},9517:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.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"}))},5316:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(c.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"}))},5899:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"}))},5381:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}))},496:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.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"}))},3482:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}))},4955:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.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 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"}))},1908:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}))},6514:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(c.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}))},797:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(444);const r=(0,a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(c.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 a={}.hasOwnProperty;function c(){for(var e=[],t=0;t{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 a=0,c=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(a++,"%c"===e&&(c=a))})),t.splice(c,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:a}=e.exports;a.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,c,r,i=null;function s(...e){if(!s.enabled)return;const a=s,c=Number(new Date),r=c-(n||c);a.diff=r,a.prev=n,a.curr=c,n=c,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,c)=>{if("%%"===n)return"%";i++;const r=t.formatters[c];if("function"==typeof r){const t=e[i];n=r.call(a,t),e.splice(i,1),i--}return n})),t.formatArgs.call(a,e);(a.log||t.log).apply(a,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=a,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(c!==t.namespaces&&(c=t.namespaces,r=t.enabled(e)),r),set:e=>{i=e}}),"function"==typeof t.init&&t.init(s),s}function a(e,n){const a=t(this.namespace+(void 0===n?":":n)+e);return a.log=this.log,a}function c(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(c),...t.skips.map(c).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 a=("string"==typeof e?e:"").split(/[\s,]+/),c=a.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t{"use strict";n.d(t,{Z:()=>a});const a={error:"TcCZnGE6mad8Dvz9pCZi",button:"_mn6o2Dtm5pfFWc8_A1K"}},1494:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={"admin-page":"sexr0jUxC1jVixdKiDnC",background:"vKQ11sLeAM45M04P1ccj"}},511:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={section:"cAbGtJDGgLubucBnz7vM"}},281:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={"section-hero":"vMa4i_Dza2t5Zi_Bw9Nf"}},9171:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={container:"demNsMJjhi7BLY7xhjU5","icon-wrapper":"QiUjdjJSkqh6nH7YMG5A","is-error":"Q080AHcq29J2fc68Hhk5",icon:"hYWbIwhppukXmGnsiT9H","is-warning":"JjHuxWly0HI9C60gorbq","is-info":"Cm8ZFHi3mngl4cj9Gatx","is-success":"ytGBsU015p3LGwOPwFDx"}},3466:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={button:"zI5tJ_qhWE6Oe6Lk75GY","is-icon-button":"tuBt2DLqimiImoqVzPqo",small:"Na39I683LAaSA99REg14",normal:"ipS7tKy9GntCS4R3vekF",icon:"paGLQwtPEaJmtArCcmyK",regular:"lZAo6_oGfclXOO9CC6Rd","full-width":"xJDOiJxTt0R_wSl8Ipz_",loading:"q_tVWqMjl39RcY6WtQA6","external-icon":"CDuBjJp_8jxzx5j6Nept"}},2404:()=>{},5785:()=>{},1275:()=>{},5612:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={"star-icon":"cuoSlhSNrqf1dozY22Xb",jetpack:"lAIiifeLMmZAPlQ9n9ZR","checkmark-icon":"JLquNpQVlysAamuh5lJO",socialIcon:"cbOwD8Y4tFjwimmtchQI",facebook:"aHOlEBGD5EA8NKRw3xTw",instagram:"cL3m0xBYTYhIKI7lCqDB",twitter:"af4Y_zItXvLAOEoSDPSv",linkedin:"f68aqF3XSD1OBvXR1get",tumblr:"xFI0dt3UiXRlRQdqPWkx",google:"q7JEoyymveP6kF747M43",mastodon:"DKOBOTVmTLbh26gUH_73",nextdoor:"n5XodNsuMfMAAvqHFmbw",whatsapp:"fftumuc_lJ6v0tq4UMVR"}},9054:()=>{},3247:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)"}},3080:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={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:()=>a});const a={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",container:"SqdhUZkXCRuIpErj1B3z",fluid:"OZC_9a1LhpWF9dv15Gdh"}},7946:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={placeholder:"NisihrgiIKl_knpYJtfg",pulse:"R2i0K45dEF157drbVRPI"}},7703:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={container:"VHYulMcpzbr10HWR0iSE","icon-wrapper":"FGpSkMCiIHQjszcV0dbn","close-button":"KoWZcCwhW13xvkEb0QON","main-content":"smrfczkC53EaFM8OJUXs",title:"IKYRWoPwt9xOVEx1wzNS","action-bar":"qM0qY6mPYp1MPN54A3Kg","is-error":"A5YkDkkXuiYgavrY6Nux",icon:"y_IPyP1wIAOhyNaqvXJq","is-warning":"cT5rwuPMZzWvi5o6shMl","is-info":"yo0O3uvNomPsYUXFCpAS","is-success":"oZdDFf1jBLkzn5ICCC6x"}},9929:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={container:"p4qz2tkq0p9hxucJ6Qk2",table:"lbNDyXioOwvyvbALtCBm","is-viewport-large":"s2Lsn4kbm6BrS3DSndRB",card:"cLaNK_XcbTGlRQ4Tp43Q","is-primary":"CYt1X0eH1icRjhtJ28jx",header:"DAkZc1P9A3K12fjEliMg",item:"WUBuYABl8nymjs9NnCEL","last-feature":"ANtCFeb41NhA8PA3H7ZN",value:"Ql2gy_148yW8Vw5vhaKD",icon:"EAQrAnQEW1z1BfdY5gbC","icon-check":"JDSTlLoOC_4aUoH2oNM2","icon-cross":"zNdQRJ1w7BvaQOYyqzHK",popover:"lr7vbX95SKtoe7DarJcZ","popover-icon":"KRrGp2xdkeBOxLZeuQ6X",tos:"H_ZJiRVJg0LiMXPGOcmt","tos-container":"x21z_DixObRDsDaWotP1"}},9184:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={container:"dovianZYLKhnbnh9I06o","price-container":"lljtQMhW7lq5tE5SDJEf","promo-label":"NubApIV1vQCRUNprfm6b",price:"dhFQXpZfMwVI8vuYHnwC","is-not-off-price":"eD7hzxFmdtG_MgmBtl_k",footer:"C64ZjjUAqJC1T2Sa7apS",legend:"UpZDGew6Ay1hPoP6eI7b",symbol:"TDiiPbuW1Z0_05u_pvcK"}},1683:()=>{},7920:()=>{},3280:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={reset:"WQVtrU6q0L1Igcj7wCrQ","headline-medium":"UujoBFTnQNY2cWU2SIsH","headline-small":"TeGO5V_thHw5lDAm1_2M","headline-small-regular":"WolQzb2MsSgiNmLtc7_j","title-medium":"hUB0JT8p1T2Hw28N6qC8","title-medium-semi-bold":"gKZWDv5chz3_O3Syp74H","title-small":"zY2No8Ga4b8shbOQGhnv",body:"tIj0D1t8Cc892ikmgFPZ","body-small":"KdcN0BnOaVeVhyLRKqhS","body-extra-small":"dso3Rh3tl3Xv1GumBktz","body-extra-small-bold":"mQ1UlbN9u4Mg9byO8m7v",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"}},3591:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={global:"_fUXxnSp5pagKBp9gSN7"}},1510:()=>{},9610:()=>{},9836:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={heading:"urouayitSUT8zW0V3p_0",notice:"iXXJlk08gFDeCvsTTlNQ",button:"MWqRqr7q6fgvLxitcWYk","bigger-than-medium":"YLcXAoc82nypTPaKSAcd",error:"e6hHy8BZ7ZKPSXbIC0UG",message:"jXz8LnXNzMDdtHqkG0sZ"}},4220:()=>{},287:()=>{},9823:()=>{},7664:()=>{},1008:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={"jp-wrap":"EiaNctK1_P9pPqOeiaSI","jp-row":"ogHZg_sJCljylz3VJfsf","sm-col-span-1":"zv7eGvijKRkbPVakubHw","sm-col-span-2":"VoJNoiya_1ck3_kXS6_C","sm-col-span-3":"ecv0NO526NoTNbpALA1A","sm-col-span-4":"OfBdkceMzeHvRbzhqDlP","md-col-span-1":"JLb3NpEKN8pOaWd7K1bu","md-col-span-2":"fsMPGqPKE4mjMIPFwl77","md-col-span-3":"DIK_zdaGAQ09eKspBJ4E","md-col-span-4":"shXYpxPu3WCJsR8aOHtz","md-col-span-5":"s7ElrOqG_yGd5SIfwqOR","md-col-span-6":"Cxml9uzGvArAL8_RDs_p","md-col-span-7":"aANxBKDGx72eDqU0iUPj","md-col-span-8":"XxyzuTY3mnQcl9EGZadm","lg-col-span-1":"Sfo4WaSNIWInJ93Abd3w","lg-col-span-2":"tQS7SKUGrU4THhWMysbo","lg-col-span-3":"I94U7mpY4h16pcOksZNF","lg-col-span-4":"uWMb9k77kQxBdS5MTt0s","lg-col-span-5":"rKwEEZQxK9s_POMg5Jss","lg-col-span-6":"UcPXX_s06IPCkF7ZjH3D","lg-col-span-7":"CrQdtiCFkRbzY6K2dFvt","lg-col-span-8":"rEUALOmOdUBXO0Us871z","lg-col-span-9":"NqXa9TlcTEviVsB53hBV","lg-col-span-10":"OnWVeiQiwgQ9lzdGPW66","lg-col-span-11":"D2PkTcy7b8u2K9QXY6VQ","lg-col-span-12":"EcqBhzAyxo5RDc2Y6m7K","md-col-span-0":"gB1mWzHOM38d80lrhBRX","sm-col-span-0":"KNQXLP78ejczOkour3zg","jp-cut":"rBVbaVWBnBRtTMrUKZxm",modal:"gfM_DIJrVbRhmKdAphIm","jetpack-logo":"zfJfONxRAw0fHjXUS7LN",animating:"pnwbCuWbV0PNQr1LFpRh",button:"_j4GWTmW5psCHFYh6R0x",headline:"saSAjv8yulVXQDoqDJEI",paragraph:"O_hcdbeMivIhBn7ApDnS","jetpack-logo-triangles":"FCnyb_xCK7DhJ63p6TEd","video-wrap":"Qn5xayjI_jH2m1d6BEoq",videoMove:"OmAVpCQ270MqI4IsT9Ky",slidein:"Axe8f2LgqEBZHVcsRgY5","content-wrap":"iBMDoShSmqpt72YfJb36","hi-user":"eQG1KKK8jjKtQyzfv573","content-wrap-text":"l35bIyiqYJiZ6tVYvJtC","powers-wrap":"HQVDZ6J3x6SJNYFX5khS","jetpack-products":"KdvmPIjelQIFiPQGuIYf"}},5893:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={container:"OpMBda4vebhRbW8Fm6YC","is-link":"BghJAx9hSagUdHWOUaYE","has-error":"IWsEW5nnNWUqqcT3K5L1",title:"r3UCwgwCthua6lDCvIBI",name:"vpluqUMgmwx9_f8wCVIn"}},6234:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={icon:"rV_5QyvhDnsVjCX4pb0h",link:"MO1jDNY8VPqeNS9xL8jE"}},8578:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={"relative-col":"zvd4dCB_bBDiXJKKDqXm","close-link":"ly4o9lSswAGHFXqGUEIO","account-description":"u64Go3kwEZ7MD9eji0H1","account-images":"_RT41NE3LU4R0ubcij2y",wordpress:"cFGWJeRiGHjAr8D7CWJW",google:"Iz3l7a05TP6HK9S92TIL",apple:"lmQ0wFmnk4kKkGVjokPA","all-features":"AoIs8wD92wKR8RpQj6Uc"}},6322:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={"connection-status-card":"kezuOHNvu9vdvlJ86Fwg",status:"qJizORs2q_CVCj9L6XLe","avatar-wrapper":"VmtuLc2xRqmsO6cK8qjF",cloud:"MdTRfQ3eo5qZKChZlzNj",jetpack:"PbEpL02SEH9VNAlbKCfV",avatar:"TD4AUM9gcTVAB6JHB5ZR",line:"yjl73qv0VWoPP8IhGreh",disconnected:"rq8YRaj9OyUUXJUHiUgI",info:"YZ7FNKEm9qpvQ4ZkbAz5","list-item":"oH9tzGE80LnB6Og69RFz","list-item-text":"xXVEWvQllVsFGmJY8WEp",error:"J0GIu2rNR7rXocQTyd8p"}},197:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={icon:"hdasSNj9k3Sc5PwXK4uE",link:"eWN8Hj0SBRDq1F48n_Fg"}},1854:()=>{},4416:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={"jp-wrap":"yWUvvF4WJLNDSpMgBMfm","jp-row":"ka1fVHj2HOkHjhdoEFOZ","sm-col-span-1":"JMOO4Y_9yhTO9lwLnRUx","sm-col-span-2":"PFDPAqk51qox_ChLqJwm","sm-col-span-3":"ault0jHVfWpShqOGooIP","sm-col-span-4":"GqpvdRzmzPJELtSm4FEN","md-col-span-1":"Ym4_YneEGD_iZD6W1C2o","md-col-span-2":"NbvHnnDtWw8n9BEUQ0Oy","md-col-span-3":"ElMT7rhxe5ZJKO41MnhW","md-col-span-4":"yKjnqjibn_wW_1tWWt5Q","md-col-span-5":"Pb30lOcQFpzUX57GwflS","md-col-span-6":"pC1wxc_R8y4pNILHsiiY","md-col-span-7":"pChscSCnudQoWGjMFKI_","md-col-span-8":"qw1H2gAgF3lDCI2Tbkmb","lg-col-span-1":"VzcA_rrxBK3g4ozA0oD9","lg-col-span-2":"pNAa7O2adRZD8Slgk9iR","lg-col-span-3":"tlIMLlipexblj8CeOx4B","lg-col-span-4":"Dvt0u5l2Rr1BhBmvYAzl","lg-col-span-5":"BiUsgNTc0tyc7tC5jnzE","lg-col-span-6":"ulJXAsj7G2ROJ1g3_s28","lg-col-span-7":"HsoVlyVLsXYClx9Atox0","lg-col-span-8":"oXxjRQNNj2cfIpFBqC1W","lg-col-span-9":"qXgUn4Adg9xE_JnbuDio","lg-col-span-10":"xMpqTLiLfYFEJiRPQQQq","lg-col-span-11":"IiGo3Sz2FDZN7_eGElwA","lg-col-span-12":"Om8BNCjfgqQ_wmPQjfOY","md-col-span-0":"t10ZWzP7ADjJnR4tqxRS","sm-col-span-0":"eOUlZG8Pelh_Xj0aSoHG","jp-cut":"l546LrwBEePz434NFK5Q",logo:"Q7w4fcEcemZ2nlwaYNog",wrapper:"AoNQsOaTt6gSf0H6Yasz",helper:"v13ZwGzUnecPA7Y3URAl",container:"EeDbu9pXFWTsCzfTpv2v",title:"BmSvoIi3rErkcrRiOi2W",content:"mojRoVuWdDJo0E6LEjJw"}},73:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={modal:"HeJe1crc9XaWWpLvIPit",container:"or0JUScxkJPmNsfrxkEK"}},1017:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={heading:"jErCC9oKHSM15BxzFyQK",notice:"oVoYbwbFB6U2o90Njusk","bigger-than-medium":"Snc8NEmDelsbhlH4285s",message:"wBVXH4OTNwLHPRpN4nsq",nofill:"F1qvEnFfHs5nz3zFZUOV",stats:"UyzOAKNwoDF9DW_qjLii"}},6891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={container:"wiobThfXJCuhGNrbFIT6","expire-date":"VgAxgahF9bC2M__FiIgV","expire-date--with-icon":"dbRwkMLqcMF67njPoAF7","actions-list-item":"Doju0RxvvN9JS12mf489"}},9720:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={description:"gmPKCDKZcfQt9WieTyKS",actions:"fDBaV7I4yUO6w5AWVEtr",status:"f5VJYwuJmjxH8PVxEbbv",active:"ry3pxoGtmQ0ZeSwp7F_3",inactive:"LZzE3EG7m3CDR46wwwEr",error:"Vx_jpT02r8W6NfsRSB02","is-fetching":"PdsJCfyyjSgrNDheF2qi","blink-animation":"dWP7ypkVXudMbAa38W5Z"}},523:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={"single-contextual-info":"g4lyov8aMDggdD4yOi1p","main-value":"Ys5ScZ_dYn2O2AzDE5Yi","single-contextual-info-placeholder":"sUNg_b7XteVXOrpHAkJg","contextual-percentage-change":"cF6QAJf1vXXAMuutXPcq",neutral:"coY634LconQ7gzDDNJeu",positive:"kyqpwKaL2FyQ8CtxJQ0f",negative:"aXf37lEOcjpNV8ImLaYK","change-icon":"OyGdoGzsQ48VaVVR99_H","change-values":"cKLicfMCaDSGPlX222jF","loading-placeholder":"wm7Alh6CwbsWkVSODgI2",cardlist:"qpN923qyxjI06NCgFC8j"}},8429:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={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","free-product-checkout-button":"OrQG7DjDd9Ha2Xj1Mx3L",features:"Q1jaYDpa2AVfJpA29wT0",disclaimers:"sEcLfpWjo0GF7QrxD3Lt","price-container":"xgv3jRkeF39aEQELCwru",price:"twlleZ5Ehq4bB7CvKVSW","is-old":"Qg4rPEvXsqmod1s_31d8","price-description":"ApsgxIornVy_3KnciVeJ","supporting-info":"NMxcZL17aEP7v81uG3zD","tos-container":"gCTKfAPzJqZas7CaRbKN"}},1287:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={container:"SWwV4Pw6OZ5vU3PqPXmr",imageContainer:"r7tUofa9Z3A5ziKVR1H7",aiImageContainer:"i_AnOR3MaQLraGvb2QU5","product-interstitial__header":"YcYvLvdvWrb1EUZoVsE8","product-interstitial__license-activation-link":"uGTTsKoIOoZdYhk6uPnl"}},2091:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a={"section-title":"mpr8_ygU8woV4bVR1xvw","section-description":"gwO_Q0L0jbwMARVlBezu","cards-list":"qwy7CsLeEbXvaPwgC9WV","stats-card":"Hrbg7DeSJs6gas9zdPDR","stats-card-icon":"NFpbo5AINn6I6avKFGby","stats-card-heading":"aoQZCG0JeyWmy2J6vVxF","stats-card-count":"M6ApyXg79vuXo6GwDkbO","is-pointer":"DYHb5e6QhgXejWyo9s78","stats-card-count-value":"OlInbY5YnDO06MEQHv98","stats-card-difference":"EtbKbd5m85w7oYT4stIs","stats-card-difference--positive":"Awr7zl75sfAsFPHK9kDG","stats-card-difference--negative":"QFSZbIKFdWO3HEPBZyhc","stats-card-difference-icon":"GgJAnS4gaEEGmRCP5n8y","stats-card-difference-absolute-value":"mjiNtwdbKpfo9edGVes4",actions:"pAt4v_KG9Ir19wNcEtEj"}},5878:()=>{},3171:e=>{var t=1e3,n=60*t,a=60*n,c=24*a,r=7*c,i=365.25*c;function s(e,t,n,a){var c=t>=1.5*n;return Math.round(e/n)+" "+a+(c?"s":"")}e.exports=function(e,o){o=o||{};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 o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return o*i;case"weeks":case"week":case"w":return o*r;case"days":case"day":case"d":return o*c;case"hours":case"hour":case"hrs":case"hr":case"h":return o*a;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===l&&isFinite(e))return o.long?function(e){var r=Math.abs(e);if(r>=c)return s(e,r,c,"day");if(r>=a)return s(e,r,a,"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>=c)return Math.round(e/c)+"d";if(r>=a)return Math.round(e/a)+"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))}},7556:(e,t,n)=>{"use strict";var a=n(3713);function c(){}function r(){}r.resetWarningCache=c,e.exports=function(){function e(e,t,n,c,r,i){if(i!==a){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:c};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 a=n(758);function c(){}function r(){}r.resetWarningCache=c,e.exports=function(){function e(e,t,n,c,r,i){if(i!==a){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,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:r,resetWarningCache:c};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"},9997:(e,t,n)=>{"use strict";n.d(t,{UT:()=>u,lr:()=>g,rU:()=>p});var a=n(9196),c=n(6417),r=n(3170);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(c[n]=e[n]);return c}function o(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map((e=>[n,e])):[[n,a]])}),[]))}const l=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function u(e){let{basename:t,children:n,window:i}=e,s=a.useRef();null==s.current&&(s.current=(0,r.q_)({window:i,v5Compat:!0}));let o=s.current,[l,u]=a.useState({action:o.action,location:o.location});return a.useLayoutEffect((()=>o.listen(u)),[o]),a.createElement(c.F0,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o})}const p=a.forwardRef((function(e,t){let{onClick:n,relative:o,reloadDocument:u,replace:p,state:d,target:m,to:g,preventScrollReset:h}=e,v=s(e,l),f=(0,c.oQ)(g,{relative:o}),k=function(e,t){let{target:n,replace:i,state:s,preventScrollReset:o,relative:l}=void 0===t?{}:t,u=(0,c.s0)(),p=(0,c.TH)(),d=(0,c.WU)(e,{relative:l});return a.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==i?i:(0,r.Ep)(p)===(0,r.Ep)(d);u(e,{replace:n,state:s,preventScrollReset:o,relative:l})}}),[p,u,d,i,s,n,e,o,l])}(g,{replace:p,state:d,target:m,preventScrollReset:h,relative:o});return a.createElement("a",i({},v,{href:f,onClick:u?n:function(e){n&&n(e),e.defaultPrevented||k(e)},ref:t,target:m}))}));var d,m;function g(e){let t=a.useRef(o(e)),n=(0,c.TH)(),r=a.useMemo((()=>function(e,t){let n=o(e);for(let e of t.keys())n.has(e)||t.getAll(e).forEach((t=>{n.append(e,t)}));return n}(n.search,t.current)),[n.search]),i=(0,c.s0)(),s=a.useCallback(((e,t)=>{const n=o("function"==typeof e?e(r):e);i("?"+n,t)}),[i,r]);return[r,s]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(d||(d={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(m||(m={}))},6417:(e,t,n)=>{"use strict";n.d(t,{AW:()=>z,F0:()=>I,Fg:()=>A,TH:()=>w,WU:()=>j,Z5:()=>L,oQ:()=>y,s0:()=>b});var a=n(3170),c=n(9196);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t{c.value=a,c.getSnapshot=t,p(c)&&r({inst:c})}),[e,a,t]),o((()=>{p(c)&&r({inst:c});return e((()=>{p(c)&&r({inst:c})}))}),[e]),u(a),a};"useSyncExternalStore"in c&&c.useSyncExternalStore;const m=c.createContext(null);const g=c.createContext(null);const h=c.createContext(null);const v=c.createContext(null);const f=c.createContext({outlet:null,matches:[]});const k=c.createContext(null);function y(e,t){let{relative:n}=void 0===t?{}:t;E()||(0,a.kG)(!1);let{basename:r,navigator:i}=c.useContext(h),{hash:s,pathname:o,search:l}=j(e,{relative:n}),u=o;return"/"!==r&&(u="/"===o?r:(0,a.RQ)([r,o])),i.createHref({pathname:u,search:l,hash:s})}function E(){return null!=c.useContext(v)}function w(){return E()||(0,a.kG)(!1),c.useContext(v).location}function b(){E()||(0,a.kG)(!1);let{basename:e,navigator:t}=c.useContext(h),{matches:n}=c.useContext(f),{pathname:r}=w(),i=JSON.stringify((0,a.Zq)(n).map((e=>e.pathnameBase))),s=c.useRef(!1);return c.useEffect((()=>{s.current=!0})),c.useCallback((function(n,c){if(void 0===c&&(c={}),!s.current)return;if("number"==typeof n)return void t.go(n);let o=(0,a.pC)(n,JSON.parse(i),r,"path"===c.relative);"/"!==e&&(o.pathname="/"===o.pathname?e:(0,a.RQ)([e,o.pathname])),(c.replace?t.replace:t.push)(o,c.state,c)}),[e,t,i,r])}function j(e,t){let{relative:n}=void 0===t?{}:t,{matches:r}=c.useContext(f),{pathname:i}=w(),s=JSON.stringify((0,a.Zq)(r).map((e=>e.pathnameBase)));return c.useMemo((()=>(0,a.pC)(e,JSON.parse(s),i,"path"===n)),[e,s,i,n])}function C(){let e=function(){var e;let t=c.useContext(k),n=R(P.UseRouteError),a=x(P.UseRouteError);if(t)return t;return null==(e=n.errors)?void 0:e[a]}(),t=(0,a.WK)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r};return c.createElement(c.Fragment,null,c.createElement("h2",null,"Unhandled Thrown Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),n?c.createElement("pre",{style:i},n):null,c.createElement("p",null,"💿 Hey developer 👋"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:s},"errorElement")," props on ",c.createElement("code",{style:s},"")))}class _ extends c.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?c.createElement(f.Provider,{value:this.props.routeContext},c.createElement(k.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Z(e){let{routeContext:t,match:n,children:a}=e,r=c.useContext(m);return r&&r.static&&r.staticContext&&n.route.errorElement&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),c.createElement(f.Provider,{value:t},a)}function N(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}let r=e,i=null==n?void 0:n.errors;if(null!=i){let e=r.findIndex((e=>e.route.id&&(null==i?void 0:i[e.route.id])));e>=0||(0,a.kG)(!1),r=r.slice(0,Math.min(r.length,e+1))}return r.reduceRight(((e,a,s)=>{let o=a.route.id?null==i?void 0:i[a.route.id]:null,l=n?a.route.errorElement||c.createElement(C,null):null,u=t.concat(r.slice(0,s+1)),p=()=>c.createElement(Z,{match:a,routeContext:{outlet:e,matches:u}},o?l:void 0!==a.route.element?a.route.element:e);return n&&(a.route.errorElement||0===s)?c.createElement(_,{location:n.location,component:l,error:o,children:p(),routeContext:{outlet:null,matches:u}}):p()}),null)}var S,P;function R(e){let t=c.useContext(g);return t||(0,a.kG)(!1),t}function x(e){let t=function(e){let t=c.useContext(f);return t||(0,a.kG)(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||(0,a.kG)(!1),n.route.id}!function(e){e.UseRevalidator="useRevalidator"}(S||(S={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(P||(P={}));function A(e){let{to:t,replace:n,state:r,relative:i}=e;E()||(0,a.kG)(!1);let s=c.useContext(g),o=b();return c.useEffect((()=>{s&&"idle"!==s.navigation.state||o(t,{replace:n,state:r,relative:i})})),null}function z(e){(0,a.kG)(!1)}function I(e){let{basename:t="/",children:n=null,location:r,navigationType:i=a.aU.Pop,navigator:s,static:o=!1}=e;E()&&(0,a.kG)(!1);let l=t.replace(/^\/*/,"/"),u=c.useMemo((()=>({basename:l,navigator:s,static:o})),[l,s,o]);"string"==typeof r&&(r=(0,a.cP)(r));let{pathname:p="/",search:d="",hash:m="",state:g=null,key:f="default"}=r,k=c.useMemo((()=>{let e=(0,a.Zn)(p,l);return null==e?null:{pathname:e,search:d,hash:m,state:g,key:f}}),[l,p,d,m,g,f]);return null==k?null:c.createElement(h.Provider,{value:u},c.createElement(v.Provider,{children:n,value:{location:k,navigationType:i}}))}function L(e){let{children:t,location:n}=e,i=c.useContext(m);return function(e,t){E()||(0,a.kG)(!1);let{navigator:n}=c.useContext(h),i=c.useContext(g),{matches:s}=c.useContext(f),o=s[s.length-1],l=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let p,d=w();if(t){var m;let e="string"==typeof t?(0,a.cP)(t):t;"/"===u||(null==(m=e.pathname)?void 0:m.startsWith(u))||(0,a.kG)(!1),p=e}else p=d;let k=p.pathname||"/",y="/"===u?k:k.slice(u.length)||"/",b=(0,a.fp)(e,{pathname:y}),j=N(b&&b.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:(0,a.RQ)([u,n.encodeLocation?n.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:(0,a.RQ)([u,n.encodeLocation?n.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,i||void 0);return t&&j?c.createElement(v.Provider,{value:{location:r({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:a.aU.Pop}},j):j}(i&&!t?i.router.routes:T(t),n)}var M;!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(M||(M={}));new Promise((()=>{}));c.Component;function T(e,t){void 0===t&&(t=[]);let n=[];return c.Children.forEach(e,((e,r)=>{if(!c.isValidElement(e))return;if(e.type===c.Fragment)return void n.push.apply(n,T(e.props.children,t));e.type!==z&&(0,a.kG)(!1),e.props.index&&e.props.children&&(0,a.kG)(!1);let i=[...t,r],s={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(s.children=T(e.props.children,i)),n.push(s)})),n}},2659:(e,t,n)=>{"use strict";function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var c,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var c={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!=i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(c,i,s):c[i]=e[i]}return c.default=e,n&&n.set(e,c),c}(n(9196)),i=(c=n(5162))&&c.__esModule?c:{default:c},s=["size","onClick","icon","className"];function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function l(){return l=Object.assign||function(e){for(var t,n=1;n{"use strict";n.d(t,{Z:()=>o});var a=n(951);const c=n.n(a)()("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 s={initialize:function(e,t,n){s.setUser(e,t),s.setSuperProps(n),s.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},assignSuperProps:function(e){r=Object.assign(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]);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);s.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);s.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){s.tracks.recordPageView(e),s.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,a,c,r,i){s.ga.recordPurchase(e,t,n,a,c,r,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(r&&(c("- Super Props: %o",r),t=Object.assign(t,r)),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};s.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){s.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={};s.ga.initialized||(i&&(e={userId:"u-"+i.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),s.ga.initialized=!0)},recordPageView:function(e,t){s.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,a){s.ga.initialize();let r="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(r+=" [Option Label: "+n+"]"),void 0!==a&&(r+=" [Option Value: "+a+"]"),c(r),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,a)},recordPurchase:function(e,t,n,a,c,r,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:a,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:c,quantity:r}),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"])}},o=s},4743:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>p});var a=n(1132),c=n(6483);function r(e){class t extends Error{constructor(){super(...arguments),this.name=e}}return t}const i=r("JsonParseError"),s=r("JsonParseAfterRedirectError"),o=r("Api404Error"),l=r("Api404AfterRedirectError"),u=r("FetchNetworkError");const p=new function(e,t){let n=e,r=e,i={"X-WP-Nonce":t},s={credentials:"same-origin",headers:i},o={method:"post",credentials:"same-origin",headers:Object.assign({},i,{"Content-type":"application/json"})},l=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",a=n.length?n.split("&"):[];return a.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+a.join("&")};const u={setApiRoot(e){n=e},setWpcomOriginApiUrl(e){r=e},setApiNonce(e){i={"X-WP-Nonce":e},s={credentials:"same-origin",headers:i},o={method:"post",credentials:"same-origin",headers:Object.assign({},i,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{l=e},registerSite:(e,t)=>{const c={registration_nonce:e,no_iframe:!0};return(0,a.jetpackConfigHas)("consumer_slug")&&(c.plugin_slug=(0,a.jetpackConfigGet)("consumer_slug")),null!==t&&(c.redirect_uri=t),g(`${n}jetpack/v4/connection/register`,o,{body:JSON.stringify(c)}).then(d).then(m)},fetchAuthorizationUrl:e=>p((0,c.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),s).then(d).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(d).then(m),fetchUserConnectionData:()=>p(`${n}jetpack/v4/connection/data`,s).then(m),fetchUserTrackingSettings:()=>p(`${n}jetpack/v4/tracking/settings`,s).then(d).then(m),updateUserTrackingSettings:e=>g(`${n}jetpack/v4/tracking/settings`,o,{body:JSON.stringify(e)}).then(d).then(m),disconnectSite:()=>g(`${n}jetpack/v4/connection`,o,{body:JSON.stringify({isActive:!1})}).then(d).then(m),fetchConnectUrl:()=>p(`${n}jetpack/v4/connection/url`,s).then(d).then(m),unlinkUser:()=>g(`${n}jetpack/v4/connection/user`,o,{body:JSON.stringify({linked:!1})}).then(d).then(m),reconnect:()=>g(`${n}jetpack/v4/connection/reconnect`,o).then(d).then(m),fetchConnectedPlugins:()=>p(`${n}jetpack/v4/connection/plugins`,s).then(d).then(m),setHasSeenWCConnectionModal:()=>g(`${n}jetpack/v4/seen-wc-connection-modal`,o).then(d).then(m),fetchModules:()=>p(`${n}jetpack/v4/module/all`,s).then(d).then(m),fetchModule:e=>p(`${n}jetpack/v4/module/${e}`,s).then(d).then(m),activateModule:e=>g(`${n}jetpack/v4/module/${e}/active`,o,{body:JSON.stringify({active:!0})}).then(d).then(m),deactivateModule:e=>g(`${n}jetpack/v4/module/${e}/active`,o,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>g(`${n}jetpack/v4/module/${e}`,o,{body:JSON.stringify(t)}).then(d).then(m),updateSettings:e=>g(`${n}jetpack/v4/settings`,o,{body:JSON.stringify(e)}).then(d).then(m),getProtectCount:()=>p(`${n}jetpack/v4/module/protect/data`,s).then(d).then(m),resetOptions:e=>g(`${n}jetpack/v4/options/${e}`,o,{body:JSON.stringify({reset:!0})}).then(d).then(m),activateVaultPress:()=>g(`${n}jetpack/v4/plugins`,o,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(d).then(m),getVaultPressData:()=>p(`${n}jetpack/v4/module/vaultpress/data`,s).then(d).then(m),installPlugin:(e,t)=>{const a={slug:e,status:"active"};return t&&(a.source=t),g(`${n}jetpack/v4/plugins`,o,{body:JSON.stringify(a)}).then(d).then(m)},activateAkismet:()=>g(`${n}jetpack/v4/plugins`,o,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(d).then(m),getAkismetData:()=>p(`${n}jetpack/v4/module/akismet/data`,s).then(d).then(m),checkAkismetKey:()=>p(`${n}jetpack/v4/module/akismet/key/check`,s).then(d).then(m),checkAkismetKeyTyped:e=>g(`${n}jetpack/v4/module/akismet/key/check`,o,{body:JSON.stringify({api_key:e})}).then(d).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(d).then(m).then(v),getPluginUpdates:()=>p(`${n}jetpack/v4/updates/plugins`,s).then(d).then(m),getPlans:()=>p(`${n}jetpack/v4/plans`,s).then(d).then(m),fetchSettings:()=>p(`${n}jetpack/v4/settings`,s).then(d).then(m),updateSetting:e=>g(`${n}jetpack/v4/settings`,o,{body:JSON.stringify(e)}).then(d).then(m),fetchSiteData:()=>p(`${n}jetpack/v4/site`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>p(`${n}jetpack/v4/site/features`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>p(`${n}jetpack/v4/site/products`,s).then(d).then(m),fetchSitePurchases:()=>p(`${n}jetpack/v4/site/purchases`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>p(`${n}jetpack/v4/site/benefits`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>p(`${n}jetpack/v4/site/discount`,s).then(d).then(m).then((e=>e.data)),fetchSetupQuestionnaire:()=>p(`${n}jetpack/v4/setup/questionnaire`,s).then(d).then(m),fetchRecommendationsData:()=>p(`${n}jetpack/v4/recommendations/data`,s).then(d).then(m),fetchRecommendationsProductSuggestions:()=>p(`${n}jetpack/v4/recommendations/product-suggestions`,s).then(d).then(m),fetchRecommendationsUpsell:()=>p(`${n}jetpack/v4/recommendations/upsell`,s).then(d).then(m),fetchRecommendationsConditional:()=>p(`${n}jetpack/v4/recommendations/conditional`,s).then(d).then(m),saveRecommendationsData:e=>g(`${n}jetpack/v4/recommendations/data`,o,{body:JSON.stringify({data:e})}).then(d),fetchProducts:()=>p(`${n}jetpack/v4/products`,s).then(d).then(m),fetchRewindStatus:()=>p(`${n}jetpack/v4/rewind`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>p(`${n}jetpack/v4/scan`,s).then(d).then(m).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>g(`${n}jetpack/v4/notice/${e}`,o,{body:JSON.stringify({dismissed:!0})}).then(d).then(m),fetchPluginsData:()=>p(`${n}jetpack/v4/plugins`,s).then(d).then(m),fetchIntroOffers:()=>p(`${n}jetpack/v4/intro-offers`,s).then(d).then(m),fetchVerifySiteGoogleStatus:e=>p(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,s).then(d).then(m),verifySiteGoogle:e=>g(`${n}jetpack/v4/verify-site/google`,o,{body:JSON.stringify({keyring_id:e})}).then(d).then(m),submitSurvey:e=>g(`${n}jetpack/v4/marketing/survey`,o,{body:JSON.stringify(e)}).then(d).then(m),saveSetupQuestionnaire:e=>g(`${n}jetpack/v4/setup/questionnaire`,o,{body:JSON.stringify(e)}).then(d).then(m),updateLicensingError:e=>g(`${n}jetpack/v4/licensing/error`,o,{body:JSON.stringify(e)}).then(d).then(m),updateLicenseKey:e=>g(`${n}jetpack/v4/licensing/set-license`,o,{body:JSON.stringify({license:e})}).then(d).then(m),getUserLicensesCounts:()=>p(`${n}jetpack/v4/licensing/user/counts`,s).then(d).then(m),getUserLicenses:()=>p(`${n}jetpack/v4/licensing/user/licenses`,s).then(d).then(m),updateLicensingActivationNoticeDismiss:e=>g(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,o,{body:JSON.stringify({last_detached_count:e})}).then(d).then(m),updateRecommendationsStep:e=>g(`${n}jetpack/v4/recommendations/step`,o,{body:JSON.stringify({step:e})}).then(d),confirmIDCSafeMode:()=>g(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,o).then(d),startIDCFresh:e=>g(`${n}jetpack/v4/identity-crisis/start-fresh`,o,{body:JSON.stringify({redirect_uri:e})}).then(d).then(m),migrateIDC:()=>g(`${n}jetpack/v4/identity-crisis/migrate`,o).then(d),attachLicenses:e=>g(`${n}jetpack/v4/licensing/attach-licenses`,o,{body:JSON.stringify({licenses:e})}).then(d).then(m),fetchSearchPlanInfo:()=>p(`${r}jetpack/v4/search/plan`,s).then(d).then(m),fetchSearchSettings:()=>p(`${r}jetpack/v4/search/settings`,s).then(d).then(m),updateSearchSettings:e=>g(`${r}jetpack/v4/search/settings`,o,{body:JSON.stringify(e)}).then(d).then(m),fetchSearchStats:()=>p(`${r}jetpack/v4/search/stats`,s).then(d).then(m),fetchWafSettings:()=>p(`${n}jetpack/v4/waf`,s).then(d).then(m),updateWafSettings:e=>g(`${n}jetpack/v4/waf`,o,{body:JSON.stringify(e)}).then(d).then(m),fetchWordAdsSettings:()=>p(`${n}jetpack/v4/wordads/settings`,s).then(d).then(m),updateWordAdsSettings:e=>g(`${n}jetpack/v4/wordads/settings`,o,{body:JSON.stringify(e)}),fetchSearchPricing:()=>p(`${r}jetpack/v4/search/pricing`,s).then(d).then(m),fetchMigrationStatus:()=>p(`${n}jetpack/v4/migration/status`,s).then(d).then(m),fetchBackupUndoEvent:()=>p(`${n}jetpack/v4/site/backup/undo-event`,s).then(d).then(m)};function p(e,t){return fetch(l(e),t)}function g(e,t,n){return fetch(e,Object.assign({},t,n)).catch(h)}function v(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}Object.assign(this,u)};function d(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new l(e.redirected):new o})):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 s(n):new i}function h(){throw new u}},7121:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var a=n(5609),c=n(5736),r=n(5235),i=n.n(r),s=n(5162),o=n.n(s),l=n(9196),u=n.n(l),p=n(526),d=n(2289);const __=c.__,m=e=>{const{label:t,onClick:n,isLoading:c,isDisabled:r,displayError:s,errorMessage:o}=e;return u().createElement(u().Fragment,null,u().createElement(p.Z,{className:i()(d.Z.button,"jp-action-button--button"),label:t,onClick:n,variant:"primary",disabled:c||r},c?u().createElement(a.Spinner,null):t),s&&u().createElement("p",{className:i()(d.Z.error,"jp-action-button__error")},o))};m.propTypes={label:o().string.isRequired,onClick:o().func,isLoading:o().bool,isDisabled:o().bool,displayError:o().bool,errorMessage:o().oneOfType([o().string,o().element])},m.defaultProps={isLoading:!1,displayError:!1,errorMessage:__("An error occurred. Please try again.","jetpack-my-jetpack")};const g=m},9105:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var a=n(5736),c=n(5235),r=n.n(c),i=n(8237),s=n(8868),o=n(3846),l=n(3363),u=n(1494);const __=a.__,p=e=>{let{children:t,moduleName:n=__("Jetpack","jetpack-my-jetpack"),moduleNameHref:a,showHeader:c=!0,showFooter:p=!0,showBackground:d=!0,header:m}=e;const g=r()(u.Z["admin-page"],{[u.Z.background]:d});return React.createElement("div",{className:g},c&&React.createElement(l.Z,{horizontalSpacing:5},React.createElement(o.Z,null,m||React.createElement(s.Z,null))),React.createElement(l.Z,{fluid:!0,horizontalSpacing:0},React.createElement(o.Z,null,t)),p&&React.createElement(l.Z,{horizontalSpacing:5},React.createElement(o.Z,null,React.createElement(i.Z,{moduleName:n,moduleNameHref:a}))))}},6579:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(9196),c=n.n(a),r=n(511);const i=e=>{let{children:t}=e;return c().createElement("div",{className:r.Z.section},t)}},216:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(9196),c=n.n(a),r=n(281);const i=e=>{let{children:t}=e;return c().createElement("div",{className:r.Z["section-hero"]},t)}},4972:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var a=n(797),c=n(496),r=n(9201),i=n(1074),s=n(5235),o=n.n(s),l=n(9196),u=n.n(l),p=n(9171);const d=e=>{switch(e){case"error":case"warning":default:return a.Z;case"info":return c.Z;case"success":return r.Z}},m=e=>{let{level:t,children:n,showIcon:a}=e;const c=o()(p.Z.container,p.Z[`is-${t}`]);return u().createElement("div",{className:c},a&&u().createElement("div",{className:p.Z["icon-wrapper"]},u().createElement(i.Z,{icon:d(t),className:p.Z.icon})),u().createElement("div",null,n))};m.defaultProps={level:"warning",showIcon:!0};const g=m},7525:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var a=n(2674),c=n.n(a),r=n(5736),i=n(5235),s=n.n(i),o=n(9196),l=n.n(o);const __=r.__,u=e=>{let{title:t=__("An Automattic Airline","jetpack-my-jetpack"),height:n=7,className:a,...r}=e;return l().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",a)},r),l().createElement("desc",{id:"jp-automattic-byline-logo-title"},t),l().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"}),l().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"}),l().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"}))}},526:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var a=n(2674),c=n.n(a),r=n(5609),i=n(1074),s=n(5381),o=n(5235),l=n.n(o),u=n(9196),p=n.n(u),d=n(3466);const m=(0,u.forwardRef)(((e,t)=>{const{children:n,variant:a="primary",size:o="normal",weight:u="bold",icon:m,iconSize:g,disabled:h,isDestructive:v,isLoading:f,isExternalLink:k,className:y,text:E,fullWidth:w,...b}=e,j=l()(d.Z.button,y,{[d.Z.normal]:"normal"===o,[d.Z.small]:"small"===o,[d.Z.icon]:Boolean(m),[d.Z.loading]:f,[d.Z.regular]:"regular"===u,[d.Z["full-width"]]:w,[d.Z["is-icon-button"]]:Boolean(m)&&!n});b.ref=t;const C="normal"===o?20:16,_=k&&p().createElement(i.Z,{size:C,icon:s.Z,className:d.Z["external-icon"]}),Z=k?"_blank":void 0,N=n?.[0]&&null!==n[0]&&"components-tooltip"!==n?.[0]?.props?.className;return p().createElement(r.Button,c()({target:Z,variant:a,className:l()(j,{"has-text":!!m&&N}),icon:k?void 0:m,iconSize:g,disabled:h,"aria-disabled":h,isDestructive:v,text:E},b),f&&p().createElement(r.Spinner,null),p().createElement("span",null,n),_)}));m.displayName="Button";const g=m},9026:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});n(2404);const a=e=>{let{format:t="horizontal",icon:n,imageUrl:a}=e;return React.createElement("div",{className:"jp-components__decorative-card "+(t?"jp-components__decorative-card--"+t:"")},React.createElement("div",{className:"jp-components__decorative-card__image",style:{backgroundImage:a?`url( ${a} )`:""}}),React.createElement("div",{className:"jp-components__decorative-card__content"},React.createElement("div",{className:"jp-components__decorative-card__lines"})),n?React.createElement("div",{className:"jp-components__decorative-card__icon-container"},React.createElement("span",{className:"jp-components__decorative-card__icon jp-components__decorative-card__icon--"+n})):null)}},7172:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var a=n(5736),c=n(5235),r=n.n(c),i=n(9196);n(5785);const __=a.__;class s extends i.Component{static defaultProps={"aria-hidden":"false",focusable:"true"};needsOffset(e,t){return["gridicons-arrow-left","gridicons-arrow-right","gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-info","gridicons-info-outline","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(e)>=0&&t%18==0}getSVGDescription(e){if("description"in this.props)return this.props.description;switch(e){default:return"";case"gridicons-audio":return __("Has audio.","jetpack-my-jetpack");case"gridicons-arrow-left":return __("Arrow left","jetpack-my-jetpack");case"gridicons-arrow-right":return __("Arrow right","jetpack-my-jetpack");case"gridicons-calendar":return __("Is an event.","jetpack-my-jetpack");case"gridicons-cart":return __("Is a product.","jetpack-my-jetpack");case"chevron-down":return __("Show filters","jetpack-my-jetpack");case"gridicons-comment":return __("Matching comment.","jetpack-my-jetpack");case"gridicons-cross":return __("Close.","jetpack-my-jetpack");case"gridicons-filter":return __("Toggle search filters.","jetpack-my-jetpack");case"gridicons-folder":return __("Category","jetpack-my-jetpack");case"gridicons-info":case"gridicons-info-outline":return __("Information.","jetpack-my-jetpack");case"gridicons-image-multiple":return __("Has multiple images.","jetpack-my-jetpack");case"gridicons-image":return __("Has an image.","jetpack-my-jetpack");case"gridicons-page":return __("Page","jetpack-my-jetpack");case"gridicons-post":return __("Post","jetpack-my-jetpack");case"gridicons-jetpack-search":case"gridicons-search":return __("Magnifying Glass","jetpack-my-jetpack");case"gridicons-tag":return __("Tag","jetpack-my-jetpack");case"gridicons-video":return __("Has a video.","jetpack-my-jetpack")}}renderIcon(e){switch(e){default:return null;case"gridicons-audio":return React.createElement("g",null,React.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-arrow-left":return React.createElement("g",null,React.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}));case"gridicons-arrow-right":return React.createElement("g",null,React.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"}));case"gridicons-block":return React.createElement("g",null,React.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 React.createElement("g",null,React.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 React.createElement("g",null,React.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 React.createElement("g",null,React.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-left":return React.createElement("g",null,React.createElement("path",{d:"M16.443 7.41L15.0399 6L9.06934 12L15.0399 18L16.443 16.59L11.8855 12L16.443 7.41Z"}));case"gridicons-chevron-right":return React.createElement("g",null,React.createElement("path",{d:"M10.2366 6L8.8335 7.41L13.391 12L8.8335 16.59L10.2366 18L16.2072 12L10.2366 6Z"}));case"gridicons-chevron-down":return React.createElement("g",null,React.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"}));case"gridicons-comment":return React.createElement("g",null,React.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-computer":return React.createElement("g",null,React.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"}));case"gridicons-cross":return React.createElement("g",null,React.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 React.createElement("g",null,React.createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"}));case"gridicons-folder":return React.createElement("g",null,React.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 React.createElement("g",null,React.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 React.createElement("g",null,React.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 React.createElement("g",null,React.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 React.createElement("g",null,React.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 React.createElement("g",null,React.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-phone":return React.createElement("g",null,React.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"}));case"gridicons-pages":return React.createElement("g",null,React.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 React.createElement("g",null,React.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"}));case"gridicons-search":return React.createElement("g",null,React.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 React.createElement("g",null,React.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 React.createElement("g",null,React.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 React.createElement("g",null,React.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 React.createElement("g",null,React.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"}));case"gridicons-lock":return React.createElement(React.Fragment,null,React.createElement("g",{id:"lock"},React.createElement("path",{d:"M18,8h-1V7c0-2.757-2.243-5-5-5S7,4.243,7,7v1H6c-1.105,0-2,0.895-2,2v10c0,1.105,0.895,2,2,2h12c1.105,0,2-0.895,2-2V10 C20,8.895,19.105,8,18,8z M9,7c0-1.654,1.346-3,3-3s3,1.346,3,3v1H9V7z M13,15.723V18h-2v-2.277c-0.595-0.346-1-0.984-1-1.723 c0-1.105,0.895-2,2-2s2,0.895,2,2C14,14.738,13.595,15.376,13,15.723z"})),React.createElement("g",{id:"Layer_1"}))}}render(){const{size:e=24,className:t=""}=this.props,n=this.props.height||e,a=this.props.width||e,c=this.props.style||{height:n,width:a},i="gridicons-"+this.props.icon,s=r()("gridicon",i,t,{"needs-offset":this.needsOffset(i,e)}),o=this.getSVGDescription(i);return React.createElement("svg",{className:s,focusable:this.props.focusable,height:n,onClick:this.props.onClick,style:c,viewBox:"0 0 24 24",width:a,xmlns:"http://www.w3.org/2000/svg","aria-hidden":this.props["aria-hidden"]},o?React.createElement("desc",null,o):null,this.renderIcon(i))}}const o=s},9665:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var a=n(5609),c=n(5235),r=n.n(c),i=n(9196),s=n.n(i),o=n(526),l=n(7172);n(1275);const u=e=>({"top-end":"top left",top:"top center","top-start":"top right","bottom-end":"bottom left",bottom:"bottom center","bottom-start":"bottom right"}[e]),p=e=>{let{className:t="",iconClassName:n="",placement:c="bottom-end",animate:p=!0,iconCode:d="info-outline",iconSize:m=18,offset:g=10,title:h,children:v,popoverAnchorStyle:f="icon",forceShow:k=!1,wide:y=!1}=e;const[E,w]=(0,i.useState)(!1),b=(0,i.useCallback)((()=>w(!0)),[w]),j=(0,i.useCallback)((()=>w(!1)),[w]),C={position:u(c),placement:c,animate:p,noArrow:!1,resize:!1,flip:!1,offset:g,focusOnMount:"container",onClose:j,className:"icon-tooltip-container"},_="wrapper"===f,Z=r()("icon-tooltip-wrapper",t),N={left:_?0:-(62-m/2)+"px"},S=_&&k;return s().createElement("div",{className:Z,"data-testid":"icon-tooltip_wrapper"},!_&&s().createElement(o.Z,{variant:"link",onClick:b},s().createElement(l.Z,{className:n,icon:d,size:m})),s().createElement("div",{className:r()("icon-tooltip-helper",{"is-wide":y}),style:N},(S||E)&&s().createElement(a.Popover,C,s().createElement("div",null,h&&s().createElement("div",{className:"icon-tooltip-title"},h),s().createElement("div",{className:"icon-tooltip-content"},v)))))}},3396:(e,t,n)=>{"use strict";n.d(t,{KM:()=>p,VS:()=>g,_1:()=>d,r7:()=>u});var a=n(2674),c=n.n(a),r=n(5609),i=n(5235),s=n.n(i),o=(n(2659),n(5612));const l=e=>{let{className:t,size:n=24,viewBox:a="0 0 24 24",opacity:i=1,color:l="#2C3338",children:u}=e;const p={className:s()(o.Z.iconWrapper,t),width:n,height:n,viewBox:a,opacity:i,fill:void 0};return l&&(p.fill=l),React.createElement(r.SVG,c()({},p,{fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg"}),React.createElement(r.G,{opacity:i},u))},u=e=>{let{size:t,className:n=o.Z["star-icon"],color:a}=e;return React.createElement(l,{className:n,size:t,color:a},React.createElement(r.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"}))},p=e=>{let{size:t,className:n=o.Z["checkmark-icon"],color:a}=e;return React.createElement(l,{className:n,size:t,color:a},React.createElement(r.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"}))},d=e=>{let{size:t,className:n=o.Z.jetpack,color:a}=e;return React.createElement(l,{className:n,size:t,color:a,viewBox:"0 0 32 32"},React.createElement(r.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"}),React.createElement(r.Polygon,{fill:"#fff",points:"15,19 7,19 15,3"}),React.createElement(r.Polygon,{fill:"#fff",points:"17,29 17,13 25,13"}))},m={...{"anti-spam":e=>{let{opacity:t=1,size:n,color:a}=e;return React.createElement(l,{size:n,opacity:t,color:a},React.createElement(r.Path,{d:"M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1 s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1 c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1 c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0 L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5 l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4 c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1 c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z"}),React.createElement(r.Path,{d:"M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1 s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1 c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1 c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0 L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5 l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4 c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1 c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z"}),React.createElement(r.Path,{d:"M21.6,12.5c0,0.6-0.3,1-0.9,1c-0.6,0-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1C21.3,11.7,21.6,12.1,21.6,12.5z"}),React.createElement(r.Path,{d:"M4.1,12.5c0,0.6-0.3,1-0.9,1s-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1S4.1,12.1,4.1,12.5z"}))},backup:e=>{let{opacity:t=1,size:n,color:a}=e;return React.createElement(l,{size:n,opacity:t,color:a},React.createElement(r.Path,{d:"M2.1,5.8c0-0.1,0-0.1,0-0.2c0-0.2,0.1-0.5,0.1-0.7c0.1-0.4,0.4-0.6,0.7-0.8l8.3-2.9c0.1-0.1,0.3-0.1,0.4-0.1l0.5,0.1 l8.3,2.9c0.3,0.2,0.5,0.4,0.7,0.7c0.2,0.2,0.2,0.4,0.2,0.7c0,0.1,0,0.1,0,0.2v0.1c-0.1,0.5-0.2,0.9-0.3,1.4 c-0.2,0.4-0.3,1.2-0.7,2.2c-0.3,1-0.7,2.1-1.1,3.1c-0.5,1-1,2.1-1.6,3.3s-1.4,2.3-2.2,3.5c-0.9,1.1-1.8,2.2-2.8,3.1 c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4c-1.2-1.1-2.4-2.4-3.5-4c-1-1.6-1.9-3-2.5-4.3c-0.6-1.3-1.1-2.7-1.6-4 C2.8,8.7,2.5,7.6,2.3,7C2.3,6.5,2.1,6.1,2.1,5.8z M2.9,5.9c0,0.2,0.1,0.4,0.1,0.8C3.1,7,3.2,7.5,3.5,8.2C3.7,9,3.9,9.7,4.2,10.6 c0.3,0.7,0.7,1.7,1.1,2.7c0.4,1,1,2,1.5,2.9c0.5,1,1.2,1.9,1.9,2.9c0.8,1,1.6,1.9,2.4,2.6c0.2,0.2,0.4,0.2,0.5,0.2 c0.2,0,0.4-0.1,0.5-0.2c1.2-1,2.2-2.3,3.2-3.8c1-1.5,1.8-2.8,2.3-4c0.6-1.3,1.1-2.5,1.5-3.9c0.4-1.3,0.7-2.2,0.9-2.8 c0.1-0.5,0.2-1,0.3-1.3c0-0.1,0-0.1,0-0.1c0-0.2,0-0.3-0.1-0.4C20.3,5.2,20.2,5.1,20,5L12,2.1c0,0-0.1,0-0.2,0s-0.1,0-0.1,0h-0.2 l-8,2.8C3.2,5,3.1,5.2,3,5.3C2.9,5.5,2.9,5.6,2.9,5.8C2.9,5.8,2.9,5.8,2.9,5.9z M5.9,6.7h3l2.8,7l2.8-7h3c-0.1,0.1-0.2,0.5-0.3,0.8 C17,7.8,17,8.2,16.8,8.4c-0.1,0.3-0.2,0.5-0.4,0.8c0,0.1-0.1,0.1-0.1,0.1s-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.2,0.1-0.2,0.2c0,0-0.1,0.1-0.1,0.1s-0.1,0.1-0.1,0.1c0,0,0,0.1-0.1,0.2c0,0.1-0.1,0.1-0.1,0.1l-0.4,1.1 c-1.3,3.3-2.1,5.2-2.3,5.8h-2.2l-1-2.4c-0.1-0.3-0.3-0.8-0.5-1.3c-0.1-0.3-0.3-0.8-0.5-1.3L8,10.8c-0.1-0.1-0.1-0.2-0.1-0.4 C7.8,10.2,7.7,10,7.7,9.8C7.6,9.7,7.5,9.5,7.4,9.4C7.3,9.3,7.3,9.3,7.3,9.3c-0.1,0-0.2,0-0.2,0s-0.1,0-0.1,0 C6.6,8.5,6.3,7.6,5.9,6.7z"}))},boost:e=>{let{opacity:t=1,size:n,color:a}=e;return React.createElement(l,{size:n,opacity:t,color:a},React.createElement(r.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,color:a}=e;return React.createElement(l,{size:n,opacity:t,color:a},React.createElement(r.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,color:a}=e;return React.createElement(l,{size:n,opacity:t,color:a},React.createElement(r.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:a,color:c}=e;return React.createElement(l,{className:a,size:n,opacity:t,color:c},React.createElement(r.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"}),React.createElement(r.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,color:a}=e;return React.createElement(l,{size:n,opacity:t,color:a},React.createElement(r.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,color:a}=e;return React.createElement(l,{size:n,opacity:t,color:a},React.createElement(r.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,color:a}=e;return React.createElement(l,{size:n,opacity:t,color:a},React.createElement(r.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:u,videopress:e=>{let{opacity:t=1,size:n,color:a}=e;return React.createElement(l,{size:n,opacity:t,color:a},React.createElement(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.3,6.2c0.8,0,1.6,0.6,1.8,1.4l2.3,7.9c0,0,0,0,0,0l2.7-9.3h1.5h4.2c2.9,0,4.9,1.9,4.9,4.7c0,2.9-2,4.7-5,4.7 h-2h-2.5l-0.5,1.5c-0.4,1.4-1.7,2.3-3.2,2.3c-1.4,0-2.7-0.9-3.2-2.3L2.5,8.7C2.1,7.4,3,6.2,4.3,6.2z M13,12.8h2.9c1.3,0,2-0.7,2-1.9 c0-1.2-0.8-1.8-2-1.8h-1.7L13,12.8z"}))},jetpack:d,share:e=>{let{size:t=16,className:n,color:a}=e;return React.createElement(l,{className:n,size:t,color:a,viewBox:"0 0 16 16"},React.createElement(r.Path,{fill:"#161722",fillRule:"evenodd",d:"M8.3 4.66C3.85 5.308.727 9.75.034 13.69l-.02.117c-.137.842.809 1.232 1.446.68 2.013-1.745 3.648-2.475 5.318-2.719a10.482 10.482 0 011.524-.103v2.792c0 .694.82 1.041 1.3.55l6.176-6.307a.79.79 0 00.012-1.088L9.614 1.004C9.14.496 8.301.84 8.301 1.542v3.117zm1.525-1.175v1.85a.773.773 0 01-.654.77l-.655.096c-2.133.311-3.987 1.732-5.295 3.672-.472.7-.854 1.44-1.143 2.18a12.32 12.32 0 011.675-.972c1.58-.75 3.048-.972 4.548-.972h.762a.77.77 0 01.762.779v1.69l4.347-4.44-4.347-4.653z",clipRule:"evenodd"}))}}};function g(e){return m[e]?m[e]:null}},8237:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var a=n(2674),c=n.n(a),r=n(9818),i=n(5736),s=n(1074),o=n(5381),l=n(5235),u=n.n(l),p=n(9196),d=n.n(p),m=n(6895),g=n(428),h=n(7525),v=(n(9054),n(8868)),f=n(2054);const __=i.__,_x=i._x,k=()=>d().createElement(v.Z,{logoColor:"#000",showText:!1,height:16,"aria-hidden":"true"}),y=e=>{let{moduleName:t=__("Jetpack","jetpack-my-jetpack"),className:n,moduleNameHref:a="https://jetpack.com",menu:i,siteAdminUrl:l,onAboutClick:p,onPrivacyClick:v,onTermsClick:y,...E}=e;const[w]=(0,f.Z)("sm","<="),[b]=(0,f.Z)("md","<="),[j]=(0,f.Z)("lg",">"),{isActive:C,connectedPlugins:_}=(0,r.useSelect)((e=>{const t=e(g.t);return{connectedPlugins:t?.getConnectedPlugins(),...t.getConnectionStatus()}}),[g.t]),Z=l&&C&&_?.some((e=>{let{slug:t}=e;return"jetpack"===t}));let N=[{label:_x("About","Link to learn more about Jetpack.","jetpack-my-jetpack"),title:__("About Jetpack","jetpack-my-jetpack"),href:Z?new URL("admin.php?page=jetpack_about",l).href:(0,m.Z)("jetpack-about"),target:"_blank",onClick:p},{label:_x("Privacy","Shorthand for Privacy Policy.","jetpack-my-jetpack"),title:__("Automattic's Privacy Policy","jetpack-my-jetpack"),href:Z?new URL("admin.php?page=jetpack#/privacy",l).href:(0,m.Z)("a8c-privacy"),target:Z?"_self":"_blank",onClick:v},{label:_x("Terms","Shorthand for Terms of Service.","jetpack-my-jetpack"),title:__("WordPress.com Terms of Service","jetpack-my-jetpack"),href:(0,m.Z)("wpcom-tos"),target:"_blank",onClick:y}];i&&(N=[...N,...i]);const S=d().createElement(d().Fragment,null,d().createElement(k,null),t);return d().createElement("footer",c()({className:u()("jp-dashboard-footer",{"is-sm":w,"is-md":b,"is-lg":j},n),"aria-label":__("Jetpack","jetpack-my-jetpack")},E),d().createElement("ul",null,d().createElement("li",{className:"jp-dashboard-footer__jp-item"},a?d().createElement("a",{href:a},S):S),N.map((e=>{const t="button"===e.role,n=!t&&"_blank"===e.target;return d().createElement("li",{key:e.label},d().createElement("a",{href:e.href,title:e.title,target:e.target,onClick:e.onClick,onKeyDown:e.onKeyDown,className:u()("jp-dashboard-footer__menu-item",{"is-external":n}),role:e.role,rel:n?"noopener noreferrer":void 0,tabIndex:t?0:void 0},e.label,n&&d().createElement(s.Z,{icon:o.Z,size:16})))})),d().createElement("li",{className:"jp-dashboard-footer__a8c-item"},d().createElement("a",{href:Z?new URL("admin.php?page=jetpack_about",l).href:(0,m.Z)("a8c-about"),"aria-label":__("An Automattic Airline","jetpack-my-jetpack")},d().createElement(h.Z,{"aria-hidden":"true"})))))}},8868:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var a=n(2674),c=n.n(a),r=n(5736),i=n(5235),s=n.n(i),o=n(9196),l=n.n(o);const __=r.__,u=e=>{let{logoColor:t="#069e08",showText:n=!0,className:a,height:r=32,...i}=e;const o=n?"0 0 118 32":"0 0 32 32";return l().createElement("svg",c()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:o,className:s()("jetpack-logo",a),"aria-labelledby":"jetpack-logo-title",height:r},i),l().createElement("desc",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-my-jetpack")),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"}),n&&l().createElement(l().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"})))}},3846:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var a=n(5235),c=n.n(a),r=n(9196),i=n(3080);const s=Number(i.Z.smCols),o=Number(i.Z.mdCols),l=Number(i.Z.lgCols),u=e=>{const{children:t,tagName:n="div",className:a}=e,u=Math.min(s,"number"==typeof e.sm?e.sm:s),p=Math.min(s,"object"==typeof e.sm?e.sm.start:0),d=Math.min(s,"object"==typeof e.sm?e.sm.end:0),m=Math.min(o,"number"==typeof e.md?e.md:o),g=Math.min(o,"object"==typeof e.md?e.md.start:0),h=Math.min(o,"object"==typeof e.md?e.md.end:0),v=Math.min(l,"number"==typeof e.lg?e.lg:l),f=Math.min(l,"object"==typeof e.lg?e.lg.start:0),k=Math.min(l,"object"==typeof e.lg?e.lg.end:0),y=c()(a,{[i.Z[`col-sm-${u}`]]:!(p&&d),[i.Z[`col-sm-${p}-start`]]:p>0,[i.Z[`col-sm-${d}-end`]]:d>0,[i.Z[`col-md-${m}`]]:!(g&&h),[i.Z[`col-md-${g}-start`]]:g>0,[i.Z[`col-md-${h}-end`]]:h>0,[i.Z[`col-lg-${v}`]]:!(f&&k),[i.Z[`col-lg-${f}-start`]]:f>0,[i.Z[`col-lg-${k}-end`]]:k>0});return(0,r.createElement)(n,{className:y},t)}},3363:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var a=n(5235),c=n.n(a),r=n(9196),i=n(8730);const s=e=>{let{children:t,fluid:n=!1,tagName:a="div",className:s,horizontalGap:o=1,horizontalSpacing:l=1}=e;const u=(0,r.useMemo)((()=>{const e=`calc( var(--horizontal-spacing) * ${l} )`;return{paddingTop:e,paddingBottom:e,rowGap:`calc( var(--horizontal-spacing) * ${o} )`}}),[o,l]),p=c()(s,i.Z.container,{[i.Z.fluid]:n});return(0,r.createElement)(a,{className:p,style:u},t)}},2054:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(4333),c=n(3247);const r=["sm","md","lg"],i=(e,t)=>{const n=Array.isArray(e)?e:[e],i=Array.isArray(t)?t:[t],[s,o,l]=r,u={sm:(0,a.useMediaQuery)(c.Z[s]),md:(0,a.useMediaQuery)(c.Z[o]),lg:(0,a.useMediaQuery)(c.Z[l])};return n.map(((e,t)=>{const n=i[t];return n?((e,t,n)=>{const a=r.indexOf(e),c=a+1,i=t.includes("=");let s=[];return t.startsWith("<")&&(s=r.slice(0,i?c:a)),t.startsWith(">")&&(s=r.slice(i?a:c)),s?.length?s.some((e=>n[e])):n[e]})(e,n,u):u[e]}))}},2636:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var a=n(5235),c=n.n(a),r=n(9196),i=n.n(r),s=n(7946);const o=e=>{let{children:t=null,width:n=null,height:a=null,className:r=""}=e;return i().createElement("div",{className:c()(s.Z.placeholder,r),style:{width:n,height:a}},t)}},1342:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var a=n(797),c=n(496),r=n(9201),i=n(1074),s=n(9517),o=n(5235),l=n.n(o),u=n(9196),p=n.n(u),d=n(7703);const m=e=>{switch(e){case"error":case"warning":default:return a.Z;case"info":return c.Z;case"success":return r.Z}},g=e=>{let{level:t,title:n,children:a,actions:c,hideCloseButton:r,onClose:o}=e;const u=l()(d.Z.container,d.Z[`is-${t}`]);return p().createElement("div",{className:u},p().createElement("div",{className:d.Z["icon-wrapper"]},p().createElement(i.Z,{icon:m(t),className:d.Z.icon})),p().createElement("div",{className:d.Z["main-content"]},p().createElement("div",{className:d.Z.title},n),a,c&&c.length>0&&p().createElement("div",{className:d.Z["action-bar"]},c.map(((e,t)=>p().createElement("div",{key:t,className:d.Z.action},e))))),!r&&p().createElement("button",{"aria-label":"close",className:d.Z["close-button"],onClick:o},p().createElement(i.Z,{icon:s.Z})))};g.defaultProps={level:"info",hideCloseButton:!1};const h=g},2947:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var a=n(8709);const c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,a.X)();return new Intl.NumberFormat(n,t).format(e)}},9608:(e,t,n)=>{"use strict";n.d(t,{NE:()=>w,ZP:()=>j,kF:()=>E,oK:()=>b});var a=n(5736),c=n(1074),r=n(9201),i=n(6163),s=n(5235),o=n.n(s),l=n(9196),u=n.n(l),p=n(9665),d=n(2054),m=n(7325),g=n(5106),h=n(9929);const __=a.__,v=__("Included","jetpack-my-jetpack"),f=__("Not included","jetpack-my-jetpack"),k=__("Coming soon","jetpack-my-jetpack"),y=(0,l.createContext)(void 0),E=e=>{let{isIncluded:t=!1,isComingSoon:n=!1,index:s=0,label:m=null,tooltipInfo:E,tooltipTitle:w,tooltipClassName:b=""}=e;const[j]=(0,d.Z)("lg"),C=(0,l.useContext)(y)[s],_=n||t,Z=C.name,N=C.tooltipInfo,S=C.tooltipTitle,P=E||!j&&N,R=((e,t,n)=>e?{lg:k,
+// translators: Name of the current feature
+default:(0,a.sprintf)(__("%s coming soon","jetpack-my-jetpack"),n)}:{lg:t?v:f,default:t?n:(0,a.sprintf)(/* translators: Name of the current feature */
+__("%s not included","jetpack-my-jetpack"),n)})(n,t,Z),x=j?R.lg:R.default;return u().createElement("div",{className:o()(h.Z.item,h.Z.value)},u().createElement(c.Z,{className:o()(h.Z.icon,_?h.Z["icon-check"]:h.Z["icon-cross"]),size:32,icon:_?r.Z:i.Z}),u().createElement(g.ZP,{variant:"body-small"},m||x),P&&u().createElement(p.Z,{title:w||S,iconClassName:h.Z["popover-icon"],className:o()(h.Z.popover,b),placement:"bottom-end",iconSize:14,offset:4,wide:Boolean(w&&E)},u().createElement(g.ZP,{variant:"body-small",component:"div"},E||N)))},w=e=>{let{children:t}=e;return u().createElement("div",{className:h.Z.header},t)},b=e=>{let{primary:t=!1,children:n}=e,a=0;return u().createElement("div",{className:o()(h.Z.card,{[h.Z["is-primary"]]:t})},l.Children.map(n,(e=>{const t=e;return t.type===E?(a++,(0,l.cloneElement)(t,{index:a-1})):t})))},j=e=>{let{title:t,items:n,children:a,showIntroOfferDisclaimer:c=!1}=e;const[r]=(0,d.Z)("lg");return u().createElement(y.Provider,{value:n},u().createElement("div",{className:o()(h.Z.container,{[h.Z["is-viewport-large"]]:r}),style:{"--rows":n.length+1,"--columns":l.Children.toArray(a).length+1}},u().createElement("div",{className:h.Z.table},u().createElement(g.ZP,{variant:"headline-small"},t),r&&n.map(((e,t)=>u().createElement("div",{className:o()(h.Z.item,{[h.Z["last-feature"]]:t===n.length-1}),key:t},u().createElement(g.ZP,{variant:"body-small"},u().createElement("strong",null,e.name)),e.tooltipInfo&&u().createElement(p.Z,{title:e.tooltipTitle,iconClassName:h.Z["popover-icon"],className:h.Z.popover,placement:e.tooltipPlacement?e.tooltipPlacement:"bottom-end",iconSize:14,offset:4,wide:Boolean(e.tooltipTitle&&e.tooltipInfo)},u().createElement(g.ZP,{variant:"body-small"},e.tooltipInfo))))),a)),u().createElement("div",{className:h.Z["tos-container"]},u().createElement("div",{className:h.Z.tos},c&&u().createElement(g.ZP,{variant:"body-small"},__("Reduced pricing is a limited offer for the first year and renews at regular price.","jetpack-my-jetpack")),u().createElement(m.Z,{multipleButtons:!0}))))}},5347:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(5736),c=n(5235),r=n.n(c),i=n(5106),s=n(3789),o=n(9184);const __=a.__,l=e=>{let{price:t,offPrice:n,currency:a="",showNotOffPrice:c=!0,hideDiscountLabel:l=!0,promoLabel:u="",legend:p=__("/month, paid yearly","jetpack-my-jetpack"),isNotConvenientPrice:d=!1,hidePriceFraction:m=!1,children:g}=e;if(null==t&&null==n||!a)return null;c=c&&null!=n;const h="number"==typeof t&&"number"==typeof n?Math.floor((t-n)/t*100):0,v=!l&&h&&h>0?h+__("% off","jetpack-my-jetpack"):null;return React.createElement(React.Fragment,null,React.createElement("div",{className:o.Z.container},React.createElement("div",{className:r()(o.Z["price-container"],"product-price_container")},React.createElement(s.t,{value:n??t,currency:a,isOff:!d,hidePriceFraction:m}),c&&React.createElement(s.t,{value:t,currency:a,isOff:!1,hidePriceFraction:m}),v&&React.createElement(i.ZP,{className:r()(o.Z["promo-label"],"product-price_promo_label")},v))),React.createElement("div",{className:o.Z.footer},g||React.createElement(i.ZP,{className:r()(o.Z.legend,"product-price_legend")},p),u&&React.createElement(i.ZP,{className:r()(o.Z["promo-label"],"product-price_promo_label")},u)))}},3789:(e,t,n)=>{"use strict";n.d(t,{t:()=>o});var a=n(8899),c=n(5235),r=n.n(c),i=n(5106),s=n(9184);const o=e=>{let{value:t,currency:n,isOff:c,hidePriceFraction:o}=e;const l=r()(s.Z.price,"product-price_price",{[s.Z["is-not-off-price"]]:!c}),{symbol:u,integer:p,fraction:d}=(0,a.LR)(t,n),m=!o||!d.endsWith("00");return React.createElement(i.ZP,{className:l,variant:"headline-medium",component:"p"},React.createElement(i.ZP,{className:s.Z.symbol,component:"sup",variant:"title-medium"},u),p,m&&React.createElement(i.ZP,{component:"sup",variant:"body-small","data-testid":"PriceFraction"},React.createElement("strong",null,d)))}},5033:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var a=n(5162),c=n.n(a),r=n(9196),i=n.n(r);n(1683);const s=e=>{const t=e.className+" jp-components-spinner",n={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},a={borderTopColor:e.color,borderRightColor:e.color};return i().createElement("div",{className:t},i().createElement("div",{className:"jp-components-spinner__outer",style:n},i().createElement("div",{className:"jp-components-spinner__inner",style:a})))};s.propTypes={color:c().string,className:c().string,size:c().number},s.defaultProps={color:"#FFFFFF",className:"",size:20};const o=s},7325:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var a=n(9307),c=n(5736),r=n(5235),i=n.n(r),s=n(6895),o=n(5106);n(7920);const __=c.__,l=()=>(0,a.createInterpolateElement)(__("By clicking the buttons above, you agree to our Terms of Service and to share details with WordPress.com.","jetpack-my-jetpack"),{tosLink:React.createElement(p,{slug:"wpcom-tos"}),shareDetailsLink:React.createElement(p,{slug:"jetpack-support-what-data-does-jetpack-sync"})}),u=e=>{let{agreeButtonLabel:t}=e;return(0,a.createInterpolateElement)((0,c.sprintf)(/* translators: %s is a button label */
+__("By clicking the %s button, you agree to our Terms of Service and to share details with WordPress.com.","jetpack-my-jetpack"),t),{strong:React.createElement("strong",null),tosLink:React.createElement(p,{slug:"wpcom-tos"}),shareDetailsLink:React.createElement(p,{slug:"jetpack-support-what-data-does-jetpack-sync"})})},p=e=>{let{slug:t,children:n}=e;return React.createElement("a",{className:"terms-of-service__link",href:(0,s.Z)(t),rel:"noopener noreferrer",target:"_blank"},n)},d=e=>{let{className:t,multipleButtons:n,agreeButtonLabel:a}=e;return React.createElement(o.ZP,{className:i()(t,"terms-of-service")},n?React.createElement(l,null):React.createElement(u,{agreeButtonLabel:a}))}},6017:(e,t,n)=>{"use strict";n.d(t,{h:()=>a,s:()=>c});const a={"headline-medium":"h1","headline-small":"h2","headline-small-regular":"h2","title-medium":"h3","title-medium-semi-bold":"h3","title-small":"h4",body:"p","body-small":"p","body-extra-small":"p","body-extra-small-bold":"p",label:"p"},c=["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 a=n(2674),c=n.n(a),r=n(5235),i=n.n(r),s=n(9196),o=n.n(s),l=n(6017),u=n(3280);const p=(0,s.forwardRef)(((e,t)=>{let{variant:n="body",children:a,component:r,className:p,...d}=e;const m=r||l.h[n]||"span",g=(0,s.useMemo)((()=>l.s.reduce(((e,t)=>(void 0!==d[t]&&(e+=u.Z[`${t}-${d[t]}`]+" ",delete d[t]),e)),"")),[d]);return d.ref=t,o().createElement(m,c()({className:i()(u.Z.reset,u.Z[n],p,g)},d),a)}));p.displayName="Text";const d=p,m=e=>{let{children:t,weight:n="bold",...a}=e;const r="headline-small"+("bold"===n?"":`-${n}`);return o().createElement(p,c()({variant:r,mb:3},a),t)},g=e=>{let{children:t,size:n="medium",...a}=e;return o().createElement(p,c()({variant:`title-${n}`,mb:1},a),t)}},8275:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>d});var a=n(9196),c=n.n(a),r=n(3591);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)"},s={"--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-70":"#3C434A","--jp-gray-80":"#2C3338","--jp-gray-90":"#1d2327","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-5":"#FACFD2","--jp-red-40":"#E65054","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-5":"#F5E6B3","--jp-yellow-10":"#F2CF75","--jp-yellow-20":"#F0C930","--jp-yellow-30":"#DEB100","--jp-yellow-40":"#C08C00","--jp-yellow-50":"#9D6E00","--jp-yellow-60":"#7D5600","--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"},l={"--spacing-base":"8px"},u={},p=(e,t,n)=>{const a={...i,...s,...o,...l};for(const t in a)e.style.setProperty(t,a[t]);n&&e.classList.add(r.Z.global),t&&(u[t]={provided:!0,root:e})},d=e=>{let{children:t=null,targetDom:n,id:r,withGlobalStyles:i=!0}=e;const s=(0,a.useRef)(),o=u?.[r]?.provided;return(0,a.useLayoutEffect)((()=>{if(!o)return n?p(n,r,i):void(s?.current&&p(s.current,r,i))}),[n,s,o,r,i]),n?t:c().createElement("div",{ref:s},t)}},5905:(e,t,n)=>{"use strict";n.d(t,{O:()=>a});const a="d729d42c-b547-4750-a6f6-8b30534a5f12"},4164:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(5905);const r=e=>{let{jwt_token:t}=e;const n=(0,a.useCallback)((()=>{"undefined"!=typeof window&&"function"==typeof window.zE&&window.zE("messenger","loginUser",(function(e){e(t)}))}),[t]);return(0,a.useEffect)((()=>{const e=document.createElement("script"),t=document.getElementById("zendesk-chat-container");e.src="https://static.zdassets.com/ekr/snippet.js?key="+encodeURIComponent(c.O),e.type="text/javascript",e.id="ze-snippet",e.onload=()=>{n()},t&&t.appendChild(e)}),[n]),React.createElement("div",{"data-testid":"zendesk-chat-container",id:"zendesk-chat-container"})}},8709:(e,t,n)=>{"use strict";n.d(t,{X:()=>c});var a=n(9771);const c=()=>{const{l10n:{locale:e}}=(0,a.getSettings)();if(e)return(e=>{const t=e.match(/^([a-z]{2,3})(_[a-z]{2}|_[a-z][a-z0-9]{4,7})?(?:_.*)?$/i);return t?`${t[1]}${t[2]?t[2]:""}`.replace("_","-"):"en-US"})(e);return window?.window?.navigator?.language??"en-US"}},4153:(e,t,n)=>{"use strict";function a(e,t,n,a){const c=new URL("https://wordpress.com/checkout/"),r=new URL(`${c}${t}/${e}`);return r.searchParams.set("redirect_to",n),a||r.searchParams.set("unlinked","1"),r.searchParams.set("site",t),r.toString()}n.d(t,{Z:()=>a})},6895:(e,t,n)=>{"use strict";function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let a;if("undefined"!=typeof window&&(a=window?.JP_CONNECTION_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);for(const e in t)n[e]=encodeURIComponent(t[e]);!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),a&&(n.calypso_env=a);return"https://jetpack.com/redirect/?"+Object.keys(n).map((e=>e+"="+n[e])).join("&")}n.d(t,{Z:()=>a})},1132:(e,t,n)=>{let a={};try{a=n(4462)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),a={missingConfig:!0}}const c=e=>a.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 a[e]}}},9312:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var a=n(5736),c=n(5162),r=n.n(c),i=n(9196),s=n.n(i),o=n(1294),l=n(1624);const __=a.__,u=e=>{let{title:t,buttonLabel:n,apiRoot:a,apiNonce:c,registrationNonce:r,from:i,redirectUri:u,images:p,children:d,assetBaseUrl:m,autoTrigger:g,footer:h,skipUserConnection:v,logo:f}=e;const{handleRegisterSite:k,siteIsRegistering:y,userIsConnecting:E,registrationError:w,isOfflineMode:b}=(0,o.Z)({registrationNonce:r,redirectUri:u,apiRoot:a,apiNonce:c,autoTrigger:g,from:i,skipUserConnection:v}),j=Boolean(w),C=y||E,_=w?.response?.code;return s().createElement(l.Z,{title:t,images:p,assetBaseUrl:m,buttonLabel:n,handleButtonClick:k,displayButtonError:j,errorCode:_,buttonIsLoading:C,footer:h,isOfflineMode:b,logo:f},d)};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,images:r().arrayOf(r().string),assetBaseUrl:r().string,skipUserConnection:r().bool,logo:r().element},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 a=n(6895),c=n(7325),r=n(7121),i=n(9307),s=n(5736),o=n(5162),l=n.n(o),u=n(9196),p=n.n(u),d=n(8524);n(1510);const __=s.__,m=e=>{const{title:t,images:n,children:s,assetBaseUrl:o,isLoading:l,buttonLabel:u,handleButtonClick:m,displayButtonError:g,errorCode:h,buttonIsLoading:v,footer:f,isOfflineMode:k,logo:y}=e,E=(()=>{switch(h){case"fail_domain_forbidden":case"fail_ip_forbidden":case"fail_domain_tld":case"fail_subdomain_wpcom":case"siteurl_private_ip":return __("Your site host is on a private network. Jetpack can only connect to public sites.","jetpack-my-jetpack")}if(k)return(0,i.createInterpolateElement)(__("Unavailable in Offline Mode","jetpack-my-jetpack"),{a:p().createElement("a",{href:(0,a.Z)("jetpack-support-development-mode"),target:"_blank",rel:"noopener noreferrer"})})})();return p().createElement(d.Z,{title:t,assetBaseUrl:o,images:n,className:"jp-connection__connect-screen"+(l?" jp-connection__connect-screen__loading":""),logo:y},p().createElement("div",{className:"jp-connection__connect-screen__content"},s,p().createElement("div",{className:"jp-connection__connect-screen__tos"},p().createElement(c.Z,{agreeButtonLabel:u})),p().createElement(r.Z,{label:u,onClick:m,displayError:g||k,errorMessage:E,isLoading:v,isDisabled:k}),f&&p().createElement("div",{className:"jp-connection__connect-screen__footer"},f)))};m.propTypes={title:l().string,images:l().arrayOf(l().string),assetBaseUrl:l().string,isLoading:l().bool,buttonLabel:l().string.isRequired,handleButtonClick:l().func,displayButtonError:l().bool,errorCode:l().string,buttonIsLoading:l().bool,footer:l().node,isOfflineMode:l().bool,logo:l().element},m.defaultProps={isLoading:!1,buttonIsLoading:!1,displayButtonError:!1,errorCode:null,handleButtonClick:()=>{},footer:null,isOfflineMode:!1};const g=m},2458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var a=n(5162),c=n.n(a),r=n(9196),i=n.n(r);const s=e=>{const{images:t,assetBaseUrl:n}=e;if(!t.length)return null;const a=t.map(((e,t)=>i().createElement(i().Fragment,{key:t},i().createElement("img",{src:n+e,alt:""}))));return i().createElement("div",{className:"jp-connection__connect-screen__image-slider"},a)};s.propTypes={images:c().arrayOf(c().string).isRequired,assetBaseUrl:c().string},s.defaultProps={assetBaseUrl:""};const o=s},8524:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var a=n(8868),c=n(5235),r=n.n(c),i=n(5162),s=n.n(i),o=n(9196),l=n.n(o),u=n(2458);n(9610);const p=e=>{const{title:t,children:n,className:c,assetBaseUrl:i,images:s,logo:o,rna:p=!1}=e,d=s?.length;return l().createElement("div",{className:r()("jp-connection__connect-screen-layout",d?"jp-connection__connect-screen-layout__two-columns":"",c?" "+c:"")},p&&l().createElement("div",{className:"jp-connection__connect-screen-layout__color-blobs"},l().createElement("div",{className:"jp-connection__connect-screen-layout__color-blobs__green"}),l().createElement("div",{className:"jp-connection__connect-screen-layout__color-blobs__yellow"}),l().createElement("div",{className:"jp-connection__connect-screen-layout__color-blobs__blue"})),l().createElement("div",{className:"jp-connection__connect-screen-layout__left"},o||l().createElement(a.Z,null),l().createElement("h2",null,t),n),d?l().createElement("div",{className:"jp-connection__connect-screen-layout__right"},l().createElement(u.Z,{images:s,assetBaseUrl:i})):null)};p.propTypes={title:s().string,className:s().string,images:s().arrayOf(s().string),assetBaseUrl:s().string,logo:s().element};const d=p},7879:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var a=n(5736),c=n(5162),r=n.n(c),i=n(9196),s=n.n(i),o=n(4322);const __=a.__,l=e=>{const{connectedPlugins:t,disconnectingPlugin:n}=e,a=(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&&a.length>0?s().createElement(s().Fragment,null,s().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},s().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"))),s().createElement("div",{className:"jp-connection__disconnect-card__group"},a.map((e=>s().createElement(o.Z,{title:e.name,key:e.slug}))))):null};l.propTypes={connectedPlugins:r().array,disconnectingPlugin:r().string};const u=l},6186:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var a=n(2054),c=n(5033),r=n(5609),i=n(5736),s=n(5162),o=n.n(s),l=n(9196),u=n.n(l),p=n(9836);const __=i.__,d=e=>{const{message:t,isRestoringConnection:n,restoreConnectionCallback:s,restoreConnectionError:o}=e,[l]=(0,a.Z)(["md"],[">"]),d=p.Z.notice+(l?" "+p.Z["bigger-than-medium"]:""),m=u().createElement(r.Icon,{icon:u().createElement(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u().createElement(r.Path,{d:"M11.7815 4.93772C11.8767 4.76626 12.1233 4.76626 12.2185 4.93772L20.519 19.8786C20.6116 20.0452 20.4911 20.25 20.3005 20.25H3.69951C3.50889 20.25 3.3884 20.0452 3.48098 19.8786L11.7815 4.93772Z",stroke:"#D63638",strokeWidth:"1.5"}),u().createElement(r.Path,{d:"M13 10H11V15H13V10Z",fill:"#D63638"}),u().createElement(r.Path,{d:"M13 16H11V18H13V16Z",fill:"#D63638"}))});if(!t)return null;if(n)return u().createElement(r.Notice,{status:"error",isDismissible:!1,className:d},u().createElement("div",{className:p.Z.message},u().createElement(c.Z,{color:"#B32D2E",size:24}),__("Reconnecting Jetpack","jetpack-my-jetpack")));const g=o?u().createElement(r.Notice,{status:"error",isDismissible:!1,className:d+" "+p.Z.error},u().createElement("div",{className:p.Z.message},m,(0,i.sprintf)(/* translators: placeholder is the error. */
+__("There was an error reconnecting Jetpack. Error: %s","jetpack-my-jetpack"),o))):null;return u().createElement(u().Fragment,null,g,u().createElement(r.Notice,{status:"error",isDismissible:!1,className:d},u().createElement("div",{className:p.Z.message},m,t),s&&u().createElement("a",{onClick:s,onKeyDown:s,className:p.Z.button,href:"#"},__("Restore Connection","jetpack-my-jetpack"))))};d.propTypes={message:o().string.isRequired,restoreConnectionCallback:o().func,isRestoringConnection:o().bool,restoreConnectionError:o().string};const m=d},4322:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var a=n(5162),c=n.n(a),r=n(9196),i=n.n(r);n(4220);const s=e=>{const{title:t,value:n,description:a}=e;return i().createElement("div",{className:"jp-connection__disconnect-card card"},i().createElement("div",{className:"jp-connection__disconnect-card__card-content"},i().createElement("p",{className:"jp-connection__disconnect-card__card-headline"},t),(n||a)&&i().createElement("div",{className:"jp-connection__disconnect-card__card-stat-block"},i().createElement("span",{className:"jp-connection__disconnect-card__card-stat"},n),i().createElement("div",{className:"jp-connection__disconnect-card__card-description"},a))))};s.propTypes={title:c().string,value:c().oneOfType([c().string,c().number]),description:c().string};const o=s},6168:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var a=n(6975),c=n(4743),r=n(1132),i=n(5609),s=n(5736),o=n(5162),l=n.n(o),u=n(9196),p=n.n(u),d=(n(287),n(9015)),m=n(5995),g=n(1702),h=n(1166);const __=s.__,v=e=>{const[t,n]=(0,u.useState)(!1),[s,o]=(0,u.useState)(!1),[l,v]=(0,u.useState)(!1),[f,k]=(0,u.useState)(!1),[y,E]=(0,u.useState)(!1),[w,b]=(0,u.useState)(!1),{apiRoot:j,apiNonce:C,connectedPlugins:_,title:Z,pluginScreenDisconnectCallback:N,onDisconnected:S,onError:P,disconnectStepComponent:R,context:x,connectedUser:A,connectedSiteId:z,isOpen:I,onClose:L}=e;let M="";(0,r.jetpackConfigHas)("consumer_slug")&&(M=(0,r.jetpackConfigGet)("consumer_slug"));const T=(0,u.useMemo)((()=>({context:x,plugin:M})),[x,M]);(0,u.useEffect)((()=>{c.ZP.setApiRoot(j),c.ZP.setApiNonce(C)}),[j,C]),(0,u.useEffect)((()=>{A&&A.ID&&A.login&&a.Z.initialize(A.ID,A.login)}),[A,A.ID,A.login]),(0,u.useEffect)((()=>{I&&a.Z.tracks.recordEvent("jetpack_disconnect_dialog_open",T)}),[I,T]),(0,u.useEffect)((()=>{I&&(s?!s||f||y?f&&!y?a.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"survey"},T)):y&&a.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"thank_you"},T)):a.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect_confirm"},T)):a.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect"},T)))}),[I,s,f,y,T]);const F=(0,u.useCallback)((()=>{c.ZP.disconnectSite().then((()=>{n(!1),o(!0)})).catch((e=>{n(!1),v(e),P&&P(e)}))}),[n,o,v,P]),O=(0,u.useCallback)(((e,t)=>{b(!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);a.Z.tracks.recordEvent("jetpack_disconnect_survey_submit",t),E(!0),b(!1)})).catch((e=>{a.Z.tracks.recordEvent("jetpack_disconnect_survey_error",Object.assign({},{error:e.message},t)),E(!0),b(!1)}))}),[b,E]),U=(0,u.useCallback)((e=>{e&&e.preventDefault(),v(!1),n(!0),"plugins"!==x?F():N&&N(e)}),[v,n,N,x,F]),D=(0,u.useCallback)((e=>a.Z.tracks.recordEvent(e,T)),[T]),V=(0,u.useCallback)((()=>!(!A.ID||!z)),[A,z]),B=(0,u.useCallback)(((e,t,n)=>{if(n&&n.preventDefault(),!V())return void E(!0);const a={site_id:z,user_id:A.ID,survey_id:"jetpack-plugin-disconnect",survey_responses:{"why-cancel":{response:e,text:t||null}}},c=Object.assign({},T,{disconnect_reason:e});O(a,c)}),[O,E,V,z,A,T]),H=(0,u.useCallback)((e=>{e&&e.preventDefault(),S&&S(),L()}),[S,L]),J=(0,u.useCallback)((e=>{e&&e.preventDefault(),k(!0)}),[k]);return p().createElement(p().Fragment,null,I&&p().createElement(i.Modal,{title:"",contentLabel:Z,aria:{labelledby:"jp-connection__disconnect-dialog__heading"},onRequestClose:L,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"jp-connection__disconnect-dialog"+(s?" jp-connection__disconnect-dialog__success":"")},s?!s||f||y?f&&!y?p().createElement(g.Z,{isSubmittingFeedback:w,onFeedBackProvided:B,onExit:H}):y?p().createElement(h.Z,{onExit:H}):void 0:p().createElement(m.Z,{canProvideFeedback:V(),onProvideFeedback:J,onExit:H}):p().createElement(d.Z,{title:Z,connectedPlugins:_,disconnectStepComponent:R,isDisconnecting:t,closeModal:L,onDisconnect:U,disconnectError:l,context:x,disconnectingPlugin:M,trackModalClick:D})))};v.propTypes={apiRoot:l().string.isRequired,apiNonce:l().string.isRequired,title:l().string,onDisconnected:l().func,onError:l().func,context:l().string,connectedPlugins:l().oneOfType([l().array,l().object]),pluginScreenDisconnectCallback:l().func,disconnectStepComponent:l().element,connectedUser:l().object,connectedSiteId:l().number,isOpen:l().bool,onClose:l().func},v.defaultProps={title:__("Are you sure you want to disconnect?","jetpack-my-jetpack"),context:"jetpack-dashboard",connectedUser:{}};const f=v},5995:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var a=n(9026),c=n(5609),r=n(9307),i=n(5736),s=n(5162),o=n.n(s),l=n(9196),u=n.n(l),p=n(2042);const __=i.__,d=e=>{const{onExit:t,canProvideFeedback:n,onProvideFeedback:i}=e;return u().createElement("div",{className:"jp-connection__disconnect-dialog__content"},u().createElement(a.Z,{icon:"unlink",imageUrl:p}),u().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy jp-connection__disconnect-dialog__step-copy--narrow"},u().createElement("h1",null,(0,r.createInterpolateElement)(__("Jetpack has been successfully disconnected.","jetpack-my-jetpack"),{br:u().createElement("br",null)})),n&&u().createElement(u().Fragment,null,u().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")),u().createElement("p",null,u().createElement(c.Button,{variant:"primary",onClick:i,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Help us improve","jetpack-my-jetpack"))),u().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:t},__("No thank you","jetpack-my-jetpack"))),!n&&u().createElement(u().Fragment,null,u().createElement("p",null,u().createElement(c.Button,{variant:"primary",onClick:t,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack-my-jetpack"))))))};d.propTypes={onExit:o().func,onProvideFeedback:o().func,canProvideFeedback:o().bool};const m=d},9015:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var a=n(6895),c=n(5609),r=n(9307),i=n(5736),s=n(5162),o=n.n(s),l=n(9196),u=n.n(l),p=n(7879);const __=i.__,d=e=>{const{title:t,isDisconnecting:n,onDisconnect:i,disconnectError:s,disconnectStepComponent:o,connectedPlugins:d,disconnectingPlugin:m,closeModal:g,context:h,trackModalClick:v}=e,f=(0,l.useCallback)((()=>v("jetpack_disconnect_dialog_click_learn_about")),[v]),k=(0,l.useCallback)((()=>v("jetpack_disconnect_dialog_click_support")),[v]),y=(0,l.useCallback)((()=>{v("jetpack_disconnect_dialog_click_stay_connected"),g()}),[v,g]),E=(0,l.useCallback)((e=>{v("jetpack_disconnect_dialog_click_disconnect"),i(e)}),[v,i]),w=(0,l.useCallback)((e=>{"Escape"!==e.key||n||y()}),[y,n]);(0,l.useEffect)((()=>(document.addEventListener("keydown",w,!1),()=>{document.removeEventListener("keydown",w,!1)})),[]);return u().createElement(u().Fragment,null,u().createElement("div",{className:"jp-connection__disconnect-dialog__content"},u().createElement("h1",{id:"jp-connection__disconnect-dialog__heading"},t),u().createElement(p.Z,{connectedPlugins:d,disconnectingPlugin:m}),o,(()=>{if(!(d&&Object.keys(d).filter((e=>e!==m)).length)&&!o)return u().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},u().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is currently powering multiple products on your site.","jetpack-my-jetpack"),u().createElement("br",null),__("Once you disconnect Jetpack, these will no longer work.","jetpack-my-jetpack")))})()),u().createElement("div",{className:"jp-connection__disconnect-dialog__actions"},u().createElement("div",{className:"jp-row"},u().createElement("div",{className:"lg-col-span-8 md-col-span-9 sm-col-span-4"},u().createElement("p",null,(0,r.createInterpolateElement)(__("Need help? Learn more about the Jetpack connection or contact Jetpack support.","jetpack-my-jetpack"),{strong:u().createElement("strong",null),jpConnectionInfoLink:u().createElement(c.ExternalLink,{href:(0,a.Z)("why-the-wordpress-com-connection-is-important-for-jetpack"),className:"jp-connection__disconnect-dialog__link",onClick:f}),jpSupportLink:u().createElement(c.ExternalLink,{href:(0,a.Z)("jetpack-support"),className:"jp-connection__disconnect-dialog__link",onClick:k})}))),u().createElement("div",{className:"jp-connection__disconnect-dialog__button-wrap lg-col-span-4 md-col-span-7 sm-col-span-4"},u().createElement(c.Button,{variant:"primary",disabled:n,onClick:y,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")),u().createElement(c.Button,{variant:"primary",disabled:n,onClick:E,className:"jp-connection__disconnect-dialog__btn-disconnect"},e)})())),s&&u().createElement("p",{className:"jp-connection__disconnect-dialog__error"},s)))};d.propTypes={title:o().string,isDisconnecting:o().bool,onDisconnect:o().func,disconnectError:o().bool,disconnectStepComponent:o().element,connectedPlugins:o().array,disconnectingPlugin:o().string,closeModal:o().func,context:o().string,trackModalClick:o().func};const m=d},1702:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var a=n(5736),c=n(5162),r=n.n(c),i=n(9196),s=n.n(i),o=(n(9823),n(6336));const __=a.__,l=e=>{const{onExit:t,onFeedBackProvided:n,isSubmittingFeedback:a}=e;return s().createElement("div",{className:"jp-connection__disconnect-dialog__content"},s().createElement("h1",null,__("Before you go, help us improve Jetpack","jetpack-my-jetpack")),s().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Let us know what didn‘t work for you","jetpack-my-jetpack")),s().createElement(o.Z,{onSubmit:n,isSubmittingFeedback:a}),s().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:r().func,onFeedBackProvided:r().func,isSubmittingFeedback:r().bool};const u=l},1166:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var a=n(9026),c=n(5609),r=n(9307),i=n(5736),s=n(5162),o=n.n(s),l=n(9196),u=n.n(l),p=n(724);const __=i.__,d=e=>{const{onExit:t}=e;return u().createElement("div",{className:"jp-connection__disconnect-dialog__content"},u().createElement(a.Z,{format:"vertical",imageUrl:p}),u().createElement("div",{className:"jp-connection__disconnect-dialog__copy"},u().createElement("h1",null,__("Thank you!","jetpack-my-jetpack")),u().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},(0,r.createInterpolateElement)(__("Your answer has been submitted. Thanks for your input on how we can improve Jetpack.","jetpack-my-jetpack"),{br:u().createElement("br",null)})),u().createElement(c.Button,{variant:"primary",onClick:t,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack-my-jetpack"))))};d.PropTypes={onExit:o().func,assetBaseUrl:o().string};const m=d},6336:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var a=n(5609),c=n(5736),r=n(5162),i=n.n(r),s=n(9196),o=n.n(s),l=n(4372);const __=c.__,u=e=>{const{onSubmit:t,isSubmittingFeedback:n}=e,[c,r]=(0,s.useState)(),[i,u]=(0,s.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,s.useCallback)((()=>{t(c,c===d?i:"")}),[t,d,i,c]),g=(0,s.useCallback)((e=>{const t=e.target.value;e.stopPropagation(),u(t)}),[u]),h=e=>e===c?"jp-connect__disconnect-survey-card--selected":"",v=(0,s.useCallback)(((e,t)=>{switch(t.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:v,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:d,key:d,onClick:r,onKeyDown:v,className:"card jp-connect__disconnect-survey-card "+h(d)},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(a.Button,{disabled:!c||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:i().func,isSubmittingFeedback:i().bool};const p=u},4372:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n.n(a);n(9823);const r=e=>{const{id:t,onClick:n,onKeyDown:r,children:i,className:s}=e,o=(0,a.useCallback)((()=>{n(t)}),[t,n]),l=(0,a.useCallback)((e=>{r(t,e)}),[t,r]);return c().createElement("div",{tabIndex:"0",role:"button",onClick:o,onKeyDown:l,className:"card jp-connect__disconnect-survey-card "+s},i)}},8137:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var a=n(5106),c=n(6895),r=n(526),i=n(5609),s=n(9307),o=n(5736),l=n(1074),u=n(6936),p=n(5381),d=n(5235),m=n.n(d),g=n(5162),h=n.n(g),v=n(9196),f=n.n(v),k=n(6168);n(7664);const __=o.__,y=e=>{const{title:t,apiRoot:n,apiNonce:r,connectedPlugins:s,onDisconnected:o,context:l,connectedUser:u,connectedSiteId:p,isOpen:d,onClose:m}=e,[g,h]=(0,v.useState)(!1),y=(0,v.useCallback)((e=>{e&&e.preventDefault(),h(!0)}),[h]),b=(0,v.useCallback)((e=>{e&&e.preventDefault(),h(!1)}),[h]);return f().createElement(f().Fragment,null,d&&f().createElement(f().Fragment,null,f().createElement(i.Modal,{title:"",contentLabel:t,aria:{labelledby:"jp-connection__manage-dialog__heading"},shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"jp-connection__manage-dialog"},f().createElement("div",{className:"jp-connection__manage-dialog__content"},f().createElement("h1",{id:"jp-connection__manage-dialog__heading"},t),f().createElement(a.ZP,{className:"jp-connection__manage-dialog__large-text"},__("At least one user must be connected for your Jetpack products to work properly.","jetpack-my-jetpack")),f().createElement(E,{title:__("Transfer ownership to another admin","jetpack-my-jetpack"),link:(0,c.Z)("calypso-settings-manage-connection",{site:window?.myJetpackInitialState?.siteSuffix}),key:"transfer",action:"transfer"}),f().createElement(E,{title:__("Disconnect Jetpack","jetpack-my-jetpack"),onClick:y,key:"disconnect",action:"disconnect"})),f().createElement(w,{onClose:m})),f().createElement(k.Z,{apiRoot:n,apiNonce:r,onDisconnected:o,connectedPlugins:s,connectedSiteId:p,connectedUser:u,isOpen:g,onClose:b,context:l})))},E=e=>{let{title:t,onClick:n=(()=>null),link:a="#",action:c}=e;return f().createElement("div",{className:"jp-connection__manage-dialog__action-card card"},f().createElement("div",{className:"jp-connection__manage-dialog__action-card__card-content"},f().createElement("a",{href:a,className:m()("jp-connection__manage-dialog__action-card__card-headline",c),onClick:n},t,f().createElement(l.Z,{icon:"disconnect"===c?u.Z:p.Z,className:"jp-connection__manage-dialog__action-card__icon"}))))},w=e=>{let{onClose:t}=e;return f().createElement("div",{className:"jp-row jp-connection__manage-dialog__actions"},f().createElement("div",{className:"jp-connection__manage-dialog__text-wrap lg-col-span-9 md-col-span-7 sm-col-span-3"},f().createElement(a.ZP,null,(0,s.createInterpolateElement)(__("Need help? Learn more about the Jetpack connection or contact Jetpack support","jetpack-my-jetpack"),{strong:f().createElement("strong",null),connectionInfoLink:f().createElement(i.ExternalLink,{href:(0,c.Z)("why-the-wordpress-com-connection-is-important-for-jetpack"),className:"jp-connection__manage-dialog__link"}),supportLink:f().createElement(i.ExternalLink,{href:(0,c.Z)("jetpack-support"),className:"jp-connection__manage-dialog__link"})}))),f().createElement("div",{className:"jp-connection__manage-dialog__button-wrap lg-col-span-3 md-col-span-1 sm-col-span-1"},f().createElement(r.Z,{weight:"regular",variant:"secondary",onClick:t,className:"jp-connection__manage-dialog__btn-dismiss"},__("Cancel","jetpack-my-jetpack"))))};y.propTypes={title:h().string,apiRoot:h().string.isRequired,apiNonce:h().string.isRequired,connectedPlugins:h().oneOfType([h().array,h().object]),onDisconnected:h().func,context:h().string,connectedUser:h().object,connectedSiteId:h().number,isOpen:h().bool,onClose:h().func},y.defaultProps={title:__("Manage your Jetpack connection","jetpack-my-jetpack"),isOpen:!1,context:"jetpack-dashboard",connectedUser:{}};const b=y},1294:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var a=n(4743),c=n(9818),r=n(9196),i=n(428);const s=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{},o=function(){let{registrationNonce:e=s.registrationNonce,apiRoot:t=s.apiRoot,apiNonce:n=s.apiNonce,redirectUri:o,autoTrigger:l,from:u,skipUserConnection:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{registerSite:d,connectUser:m,refreshConnectedPlugins:g}=(0,c.useDispatch)(i.t),h=(0,c.useSelect)((e=>e(i.t).getRegistrationError())),{siteIsRegistering:v,userIsConnecting:f,userConnectionData:k,connectedPlugins:y,connectionErrors:E,isRegistered:w,isUserConnected:b,hasConnectedOwner:j,isOfflineMode:C}=(0,c.useSelect)((e=>({siteIsRegistering:e(i.t).getSiteIsRegistering(),userIsConnecting:e(i.t).getUserIsConnecting(),userConnectionData:e(i.t).getUserConnectionData(),connectedPlugins:e(i.t).getConnectedPlugins(),connectionErrors:e(i.t).getConnectionErrors(),isOfflineMode:e(i.t).getIsOfflineMode(),...e(i.t).getConnectionStatus()}))),_=()=>p?o?(window.location=o,Promise.resolve(o)):Promise.resolve():m({from:u,redirectUri:o}),Z=t=>(t&&t.preventDefault(),w?_():d({registrationNonce:e,redirectUri:o}).then((()=>_())));return(0,r.useEffect)((()=>{a.ZP.setApiRoot(t),a.ZP.setApiNonce(n)}),[t,n]),(0,r.useEffect)((()=>{!l||v||f||Z()}),[]),{handleRegisterSite:Z,handleConnectUser:_,refreshConnectedPlugins:g,isRegistered:w,isUserConnected:b,siteIsRegistering:v,userIsConnecting:f,registrationError:h,userConnectionData:k,hasConnectedOwner:j,connectedPlugins:y,connectionErrors:E,isOfflineMode:C}}},3329:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i,h:()=>s});var a=n(6186),c=n(1294),r=n(1045);function i(){const{connectionErrors:e}=(0,c.Z)({}),t=Object.values(e).shift(),n=t&&Object.values(t).length&&Object.values(t).shift().error_message;return{hasConnectionError:Boolean(n),connectionErrorMessage:n}}const s=()=>{const{hasConnectionError:e,connectionErrorMessage:t}=i(),{restoreConnection:n,isRestoringConnection:c,restoreConnectionError:s}=(0,r.Z)();return e?React.createElement(a.Z,{isRestoringConnection:c,restoreConnectionError:s,restoreConnectionCallback:n,message:t}):null}},8258:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var a=n(4743),c=n(4153),r=n(9818),i=n(951),s=n.n(i),o=n(9196),l=n(1294),u=n(428);const p=s()("jetpack:connection:useProductCheckoutWorkflow"),{registrationNonce:d,apiRoot:m,apiNonce:g,siteSuffix:h}=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};function v(){let{productSlug:e,redirectUrl:t,siteSuffix:n=h,siteProductAvailabilityHandler:i=null,from:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p("productSlug is %s",e),p("redirectUrl is %s",t),p("siteSuffix is %s",n),p("from is %s",s);const[v,f]=(0,o.useState)(!1),{registerSite:k}=(0,r.useDispatch)(u.t),{isUserConnected:y,isRegistered:E,handleConnectUser:w}=(0,l.Z)({redirectUri:t,from:s}),b=(0,c.Z)(e,n,t,y);p("checkoutProductUrl is %s",b),p("isUserConnected is %s",y);const j=()=>Promise.resolve(i&&i()).then((e=>{if(e)return p("handleAfterRegistration: Site has a product associated"),w();p("handleAfterRegistration: Site does not have a product associated. Redirecting to checkout %s",b),window.location.href=b}));return(0,o.useEffect)((()=>{a.ZP.setApiRoot(m),a.ZP.setApiNonce(g)}),[]),{run:e=>{if(e&&e.preventDefault(),f(!0),E)return j();k({registrationNonce:d,redirectUri:t}).then(j)},isRegistered:E,hasCheckoutStarted:v}}},1045:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(4743),c=n(9818),r=n(9196),i=n(428);const{apiRoot:s,apiNonce:o}=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};function l(){const[e,t]=(0,r.useState)(!1),[n,l]=(0,r.useState)(null),{disconnectUserSuccess:u,setConnectionErrors:p}=(0,c.useDispatch)(i.t);return(0,r.useEffect)((()=>{a.ZP.setApiRoot(s),a.ZP.setApiNonce(o)}),[]),{restoreConnection:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t(!0),l(null),a.ZP.reconnect().then((t=>("in_progress"===t.status?(u(),p({}),e&&(window.location.href="/wp-admin/admin.php?page=my-jetpack#/connection")):window.location.reload(),t))).catch((e=>{throw l(e),t(!1),e}))},isRestoringConnection:e,restoreConnectionError:n}}},7523:(e,t,n)=>{"use strict";n.d(t,{LI:()=>r,N4:()=>s,Qo:()=>p,T1:()=>l,TS:()=>u,ZP:()=>b,b5:()=>m,i6:()=>c,qJ:()=>g,qV:()=>o,r7:()=>i,wQ:()=>d});var a=n(4743);const c="SET_CONNECTION_STATUS",r="SET_CONNECTION_STATUS_IS_FETCHING",i="SET_SITE_IS_REGISTERING",s="SET_USER_IS_CONNECTING",o="SET_REGISTRATION_ERROR",l="CLEAR_REGISTRATION_ERROR",u="SET_AUTHORIZATION_URL",p="DISCONNECT_USER_SUCCESS",d="SET_CONNECTED_PLUGINS",m="SET_CONNECTION_ERRORS",g="SET_IS_OFFLINE_MODE",h=e=>({type:c,connectionStatus:e}),v=e=>({type:i,isRegistering:e}),f=e=>({type:s,isConnecting:e}),k=e=>({type:o,registrationError:e}),y=()=>({type:l}),E=e=>({type:u,authorizationUrl:e}),w=e=>({type:d,connectedPlugins:e});const b={setConnectionStatus:h,setConnectionStatusIsFetching:e=>({type:r,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:v,setUserIsConnecting:f,setRegistrationError:k,clearRegistrationError:y,setAuthorizationUrl:E,registerSite:function(e){let{registrationNonce:t,redirectUri:n}=e;return function*(){yield y(),yield v(!0);try{const e=yield{type:"REGISTER_SITE",registrationNonce:t,redirectUri:n};return yield h({isRegistered:!0}),yield E(e.authorizeUrl),yield v(!1),Promise.resolve(e)}catch(e){return yield k(e),yield v(!1),Promise.reject(e)}}()},connectUser:function(){let{from:e,redirectFunc:t,redirectUri:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){yield f(!0),yield{type:"CONNECT_USER",from:e,redirectFunc:t,redirectUri:n}}()},disconnectUserSuccess:()=>({type:p}),setConnectedPlugins:w,refreshConnectedPlugins:()=>async e=>{let{dispatch:t}=e;return await new Promise((e=>a.ZP.fetchConnectedPlugins().then((n=>{t(w(n)),e(n)}))))},setConnectionErrors:e=>({type:m,connectionErrors:e}),setIsOfflineMode:e=>({type:g,isOfflineMode:e})}},1432:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(4743),c=n(9818),r=n(7057);const i={FETCH_AUTHORIZATION_URL:e=>{let{redirectUri:t}=e;return a.ZP.fetchAuthorizationUrl(t)},REGISTER_SITE:e=>{let{registrationNonce:t,redirectUri:n}=e;return a.ZP.registerSite(t,n)},CONNECT_USER:(0,c.createRegistryControl)((e=>{let{resolveSelect:t}=e;return function(){let{from:e,redirectFunc:n,redirectUri:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((c,i)=>{t(r.Z).getAuthorizationUrl(a).then((t=>{const a=n||(e=>window.location.assign(e)),r=new URL(t);e&&r.searchParams.set("from",encodeURIComponent(e));const i=r.toString();a(i),c(i)})).catch((e=>{i(e)}))}))}}))}},1479:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9818),c=n(7523);const r=(0,a.combineReducers)({connectionStatus:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case c.i6:return{...e,...t.connectionStatus};case c.Qo:return{...e,isUserConnected:!1}}return 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},connectionErrors:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===c.b5?t.connectionErrors:e},isOfflineMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===c.qJ?t.isConnecting:e}})},7728:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(9818),c=n(7523),r=n(7057);const i={...{getAuthorizationUrl:{isFulfilled:function(e){const t=Boolean(e.authorizationUrl);for(var n=arguments.length,c=new Array(n>1?n-1:0),i=1;i{"use strict";n.d(t,{Z:()=>a});const a={...{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||[],getConnectionErrors:e=>e.connectionErrors||[],getIsOfflineMode:e=>e.isOfflineMode||!1,getWpcomUser:e=>e?.userConnectionData?.currentUser?.wpcomUser,getBlogId:e=>e?.userConnectionData?.currentUser?.blogId}}},3535:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9818);class c{static store=null;static mayBeInit(e,t){null===c.store&&(c.store=(0,a.createReduxStore)(e,t),(0,a.register)(c.store))}}const r=c},7057:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const a="jetpack-connection"},428:(e,t,n)=>{"use strict";n.d(t,{t:()=>l.Z});var a=n(7523),c=n(1432),r=n(1479),i=n(7728),s=n(2725),o=n(3535),l=n(7057);const 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."),o.Z.mayBeInit(l.Z,{__experimentalUseThunks:!0,reducer:r.Z,actions:a.ZP,selectors:s.Z,resolvers:i.Z,controls:c.Z,initialState:u||{}})},8728:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var a=n(6975),c=n(8868),r=n(5033),i=n(5609),s=n(9307),o=n(5736),l=n(1074),u=n(797),p=n(5844),d=n.n(p),m=n(9196),g=n.n(m);const __=o.__,h=e=>{const{className:t,disabled:n,onChange:a,value:c}=e;return g().createElement(i.TextControl,{className:t,label:__("License key","jetpack-my-jetpack"),value:c,onChange:a,disabled:n})},v=e=>{const{className:t,availableLicenses:n,disabled:a,onChange:c,value:r}=e,[s,l]=(0,m.useState)(""),u=null===n,p=(0,m.useMemo)((()=>u?[{label:__("Fetching available licenses…","jetpack-my-jetpack"),value:""}]:[...n.map((e=>{let{product:t,license_key:n}=e;return{label:(0,o.sprintf)(/* translators: placeholder is the product name and license key */
+__("%1$s - %2$s","jetpack-my-jetpack"),t,n),value:n}})),{label:__("I want to add a license key manually","jetpack-my-jetpack"),value:""}]),[n,u]);(0,m.useEffect)((()=>{l(p?.length?p[0].value:"")}),[p]);const d=(0,m.useCallback)((e=>{l(e),c(e)}),[c]);return g().createElement(g().Fragment,null,g().createElement(i.SelectControl,{className:t,disabled:a,label:__("Select a license key","jetpack-my-jetpack"),value:s,options:p,onChange:d}),!u&&!s&&g().createElement(i.TextControl,{className:t,label:__("Input a license key","jetpack-my-jetpack"),value:r,onChange:c,disabled:a}))},f=e=>{const{activateLicense:t,availableLicenses:n,fetchingAvailableLicenses:o,isActivating:p,license:d,licenseError:f,onLicenseChange:k}=e,y=null!=f;(0,m.useEffect)((()=>{a.Z.tracks.recordEvent("jetpack_wpa_license_key_activation_view")}),[]);const E=y?"jp-license-activation-screen-controls--license-field-with-error":"jp-license-activation-screen-controls--license-field",w=n&&n.length;return g().createElement("div",{className:"jp-license-activation-screen-controls"},g().createElement("div",{className:"jp-license-activation-screen-controls--content"},g().createElement(c.Z,{showText:!1,height:48}),g().createElement("h1",null,__("Add a license key","jetpack-my-jetpack")),g().createElement("p",null,(0,s.createInterpolateElement)(__("Check your email for your license key. You should have received it after making your purchase.","jetpack-my-jetpack"),{strong:g().createElement("strong",null)})),o||w?g().createElement(v,{className:E,disabled:o||p,onChange:k,availableLicenses:o?null:n,value:d}):g().createElement(h,{className:E,disabled:p,onChange:k,value:d}),y&&g().createElement("div",{className:"jp-license-activation-screen-controls--license-field-error"},g().createElement(l.Z,{icon:u.Z}),g().createElement("span",null,f))),g().createElement("div",null,g().createElement(i.Button,{className:"jp-license-activation-screen-controls--button",onClick:t,disabled:!d},p?g().createElement(r.Z,null):__("Activate","jetpack-my-jetpack"))))};f.propTypes={activateLicense:d().func.isRequired,availableLicenses:d().array,fetchingAvailableLicenses:d().bool,isActivating:d().bool.isRequired,license:d().string.isRequired,licenseError:d().string,onLicenseChange:d().func.isRequired,siteUrl:d().string.isRequired};const k=f},8781:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var a=n(6895),c=n(9307),r=n(5736),i=n(5844),s=n.n(i),o=n(9196),l=n.n(o);const __=r.__,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,c.createInterpolateElement)(__("Do you need help? Contact us.","jetpack-my-jetpack"),{a:l().createElement("a",{href:(0,a.Z)("jetpack-support-license-activation")})})))};u.propTypes={imageUrl:s().string.isRequired,showSupportLink:s().bool};const p=u},7554:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var a=n(8868),c=n(5844),r=n.n(c),i=n(9196),s=n.n(i),o=n(3157),l=n(8288),u=n(4172);const p=e=>{const{productId:t,siteRawUrl:n,siteAdminUrl:c,currentRecommendationsStep:r}=e;return s().createElement("div",{className:"jp-license-activation-screen-success-info"},s().createElement("div",{className:"jp-license-activation-screen-success-info--content"},s().createElement(a.Z,{showText:!1,height:48})),s().createElement(l.Z,{siteRawUrl:n,productId:t}),s().createElement("div",{className:"jp-license-activation-screen-success-info--buttons"},s().createElement(o.c,{currentRecommendationsStep:r,siteAdminUrl:c,siteRawUrl:n}),s().createElement(u.o,{siteRawUrl:n,productId:t})))};p.propTypes={siteRawUrl:r().string,productId:r().number,siteAdminUrl:r().string,currentRecommendationsStep:r().string};const d=p},3157:(e,t,n)=>{"use strict";n.d(t,{c:()=>u});var a=n(6895),c=n(5609),r=n(5736),i=n(5844),s=n.n(i),o=n(9196),l=n.n(o);const __=r.__,u=e=>{const{currentRecommendationsStep:t,siteAdminUrl:n,siteRawUrl:r}=e;return"not-started"===t?l().createElement(c.Button,{className:"jp-license-activation-screen-success-info--button",href:n+"admin.php?page=jetpack#/recommendations"},__("Configure my site","jetpack-my-jetpack")):l().createElement(c.Button,{className:"jp-license-activation-screen-success-info--button",href:(0,a.Z)("license-activation-view-my-plans",{site:r})},__("View my plans","jetpack-my-jetpack"))};u.propTypes={siteAdminUrl:s().string.isRequired,currentRecommendationsStep:s().string,siteRawUrl:s().string.isRequired}},4172:(e,t,n)=>{"use strict";n.d(t,{o:()=>p});var a=n(6895),c=n(5609),r=n(5736),i=n(5844),s=n.n(i),o=n(9196),l=n.n(o),u=n(9430);const __=r.__,p=e=>{const{productId:t,siteRawUrl:n}=e,r={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,r&&l().createElement(c.ExternalLink,{className:"jp-license-activation-screen-success-info--external-link",href:(0,a.Z)(r.redirectSource,{site:n})},r.text))};p.propTypes={siteRawUrl:s().string,productId:s().number}},468:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var a=n(6975),c=n(4743),r=n(9307),i=n(5736),s=n(5844),o=n.n(s),l=n(9196),u=n.n(l),p=n(8728),d=n(8781),m=n(7554),g=n(9644),h=n(8702),v=n(1160);const __=i.__,f=e=>{const{availableLicenses:t=[],currentRecommendationsStep:n,fetchingAvailableLicenses:i=!1,onActivationSuccess:s=(()=>null),siteAdminUrl:o,siteRawUrl:f,startingLicense:k,displayName:y=""}=e,[E,w]=(0,l.useState)(k??""),[b,j]=(0,l.useState)(null),[C,_]=(0,l.useState)(!1),[Z,N]=(0,l.useState)(null);(0,l.useEffect)((()=>{t&&t[0]&&w(t[0].license_key)}),[t]);const S=(0,l.useCallback)((()=>C?Promise.resolve():E.length<1?(j(__("This is not a valid license key. Please try again.","jetpack-my-jetpack")),Promise.resolve()):(j(null),_(!0),a.Z.tracks.recordJetpackClick({target:"license_activation_button"}),c.ZP.attachLicenses([E]).then((e=>{const t=(e=>{let t=e;for(;Array.isArray(t)&&t.length>0;)t=t[0];if(t?.activatedProductId)return t.activatedProductId;if(t?.errors)for(const e in t.errors)if(t.errors[e].length>0)throw new Error(t.errors[e][0]);throw new Error(__("An unknown error occurred during license activation. Please try again.","jetpack-my-jetpack"))})(e);N(t),s(t),a.Z.tracks.recordEvent("jetpack_wpa_license_activation_success")})).catch((e=>{a.Z.tracks.recordEvent("jetpack_wpa_license_activation_error");"invalid_permission_manage_user_licenses"===e.response?.code?j((0,r.createInterpolateElement)(__("You either do not have permissions to perform this action or a user account needs to be connected. Click here to connect your user account or contact your administrator.","jetpack-my-jetpack"),{connectLink:u().createElement("a",{href:"admin.php?page=my-jetpack#/connection?returnTo=add-license"})})):j(e.message)})).finally((()=>{_(!1)})))),[C,E,s]);return null!==Z&&E.startsWith("jetpack-golden-token")?u().createElement(g.Z,{tokenRedeemed:!0,displayName:y}):null!==Z?u().createElement("div",{className:"jp-license-activation-screen"},u().createElement(m.Z,{siteRawUrl:f,productId:Z,siteAdminUrl:o,currentRecommendationsStep:n}),u().createElement(d.Z,{imageUrl:v,showSupportLink:!1})):u().createElement("div",{className:"jp-license-activation-screen"},u().createElement(p.Z,{availableLicenses:t,activateLicense:S,fetchingAvailableLicenses:i,isActivating:C,license:E,licenseError:b,onLicenseChange:w,siteUrl:f}),u().createElement(d.Z,{imageUrl:h,showSupportLink:!0}))};f.propTypes={availableLicenses:o().array,currentRecommendationsStep:o().string,fetchingAvailableLicenses:o().bool,onActivationSuccess:o().func,siteAdminUrl:o().string.isRequired,siteRawUrl:o().string.isRequired,startingLicense:o().string,displayName:o().string};const k=f},9644:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var a=n(3396),c=n(3363),r=n(3846),i=n(8868),s=n(526),o=n(5609),l=n(5736),u=n(5235),p=n.n(u),d=n(5844),m=n.n(d),g=n(9196),h=n.n(g),v=n(1008);const __=l.__,_x=l._x;function f(e){let{redeemClick:t,displayName:n,onModalClose:u,tokenRedeemed:d}=e;const[m,f]=(0,g.useState)(!1),k=(0,g.useRef)(null);(0,g.useEffect)((()=>{setTimeout((()=>{k?.current?.play()}),500)}),[k]);const y=(0,a.VS)("scan"),E=(0,a.VS)("backup"),w=(0,g.useCallback)((e=>{t?.(e),f(!0),k.current.play()}),[k,t]),b=(0,g.useCallback)((()=>{m&&k.current.play()}),[m]),j=p()(v.Z.modal,{[v.Z.animating]:m});return h().createElement("div",null,h().createElement(o.Modal,{className:j,onRequestClose:u,isDismissible:!1,__experimentalHideHeader:!0},h().createElement(c.Z,{horizontalSpacing:3,horizontalGap:3},h().createElement(r.Z,null,h().createElement(i.Z,{className:v.Z["jetpack-logo"]}),h().createElement("div",{className:v.Z["video-wrap"],onClick:b,role:"presentation"},h().createElement("video",{ref:k,src:"https://videos.files.wordpress.com/oSlNIBQO/jetpack-golden-token.mp4",muted:"muted"})),h().createElement("div",{className:v.Z["content-wrap"]},h().createElement("div",{className:v.Z["content-wrap-text"]},n.length>0&&h().createElement("p",{className:v.Z["hi-user"]},(0,l.sprintf)(/* Translators: %s is the user's display name. */
+__("Hey, %s","jetpack-my-jetpack"),n)),h().createElement("h2",{className:v.Z.headline},__("You have been gifted a Jetpack Golden Token.","jetpack-my-jetpack")),h().createElement("p",null,d&&__("This unlocked a lifetime of Jetpack powers for your website. Your exclusive Jetpack Experience is already active.","jetpack-my-jetpack"),!d&&__("This unlocks a lifetime of Jetpack powers for your website. Your exclusive Jetpack Experience awaits.","jetpack-my-jetpack"))),h().createElement(s.Z,{variant:"primary",weight:"regular",onClick:w,className:v.Z.button},d&&__("Awesome!","jetpack-my-jetpack"),!d&&__("Redeem your token","jetpack-my-jetpack"))),h().createElement("div",{className:`${v.Z["powers-wrap"]} ${v.Z["content-wrap"]}`},h().createElement("div",{className:v.Z["content-wrap-text"]},h().createElement("h2",{className:v.Z.headline},__("Super powers are ready!","jetpack-my-jetpack")),h().createElement("p",{className:v.Z.paragraph},__("Your Jetpack Golden Token provides a lifetime license for this website and includes the following products:","jetpack-my-jetpack"))),h().createElement("div",{className:v.Z["jetpack-products"]},h().createElement("div",null,h().createElement(E,null),h().createElement("h3",null,__("VaultPress Backup","jetpack-my-jetpack")),h().createElement("p",null,__("Save every change and get back online quickly with one‑click restores.","jetpack-my-jetpack"))),h().createElement("div",null,h().createElement(y,null),h().createElement("h3",null,_x("Scan","Plugin name (noun).","jetpack-my-jetpack")),h().createElement("p",null,__("Automated scanning and one‑click fixes to keep your site ahead of security threats.","jetpack-my-jetpack")))),h().createElement(s.Z,{variant:"primary",weight:"regular",onClick:w,href:window?.myJetpackInitialState?.myJetpackUrl,className:v.Z.button},__("Explore your new powers","jetpack-my-jetpack")))))))}f.defaultProps={tokenRedeemed:!1,onModalClose:e=>{document.referrer.includes(window.location.host)?(e.preventDefault(),history.back()):(e.preventDefault(),window.location.href=window?.myJetpackInitialState?.myJetpackUrl)}},f.propTypes={redeemClick:m().func,tokenRedeemed:m().bool,displayName:m().string,onModalClose:m().func};const k=f},3281:(e,t,n)=>{"use strict";n.d(t,{H:()=>c.Z,I:()=>a.Z});var a=n(468),c=n(9644)},1899:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var a=n(4743),c=n(9105),r=n(3363),i=n(3846),s=n(1294),o=n(3281),l=n(9196),u=n.n(l),p=n(2199),d=n(4106),m=n(5626);function g(){(0,l.useEffect)((()=>{const{apiRoot:e,apiNonce:t}=window?.myJetpackRest||{};a.ZP.setApiRoot(e),a.ZP.setApiNonce(t)}),[]);const{recordEvent:e}=(0,p.Z)(),{availableLicenses:t,fetchingAvailableLicenses:n}=(0,d.Z)(),{userConnectionData:g}=(0,s.Z)(),[h,v]=(0,l.useState)(!1),f=g?.currentUser?.wpcomUser?.display_name||g?.currentUser?.wpcomUser?.login||g?.currentUser?.username,k=(0,l.useCallback)((()=>{e("jetpack_myjetpack_license_activation_back_link_click")}),[e]),y=(0,l.useCallback)((()=>{v(!0)}),[]);return u().createElement(c.Z,{showHeader:!1,showBackground:!1},u().createElement(r.Z,{horizontalSpacing:3,horizontalGap:3},u().createElement(i.Z,null,u().createElement(m.Z,{onClick:k,reload:h})),u().createElement(i.Z,null,u().createElement(o.I,{currentRecommendationsStep:null,availableLicenses:t,fetchingAvailableLicenses:n,onActivationSuccess:y,siteAdminUrl:window?.myJetpackInitialState?.adminUrl,siteRawUrl:window?.myJetpackInitialState?.siteSuffix,displayName:f}))))}},1062:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var a=n(5106),c=n(5235),r=n.n(c),i=n(5162),s=n.n(i),o=n(9196),l=n.n(o),u=n(5893);const p=e=>{const{title:t,headerRightContent:n,className:c,children:i}=e,s=r()(u.Z.container,c);return l().createElement("div",{className:s},l().createElement("div",{className:u.Z.title},l().createElement("div",{className:u.Z.name},l().createElement(a.ZP,{variant:"title-medium"},t)),n),i)};p.propTypes={children:s().node,title:s().string.isRequired,className:s().string,headerRightContent:s().node};const d=p},3890:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var a=n(1074),c=n(9517),r=n(5235),i=n.n(r),s=n(9196),o=n.n(s),l=n(9997),u=n(6234);const p=e=>{let{className:t}=e;return o().createElement(l.rU,{to:"/",className:i()(u.Z.link,t)},o().createElement(a.Z,{icon:c.Z,className:u.Z.icon}))}},5745:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var a=n(1294),c=n(5162),r=n.n(c),i=n(9196),s=n.n(i),o=n(3345),l=n(3703),u=n(2307),p=n(2728);const d=e=>{let{admin:t,slug:n,children:c,showMenu:r=!1,menuItems:d=[]}=e;const{isRegistered:m,isUserConnected:g}=(0,a.Z)(),{detail:h,activate:v,deactivate:f,isFetching:k,installStandalonePlugin:y,deactivateStandalonePlugin:E}=(0,l.i)(n),{name:w,description:b,requiresUserConnection:j,standalonePluginInfo:C,status:_}=h,[Z,N]=(0,i.useState)(!1),[S,P]=(0,i.useState)(!1),R=(0,o.Z)("/connection"),x=C?.hasStandalonePlugin,A=C?.isStandaloneInstalled,z=C?.isStandaloneActive,I=x&&A&&!z,L=x&&A&&z,M=x&&!A,T=m&&g,F=_===u.N.ABSENT||_===u.N.ABSENT_WITH_PLAN,O=r&&!F&&_!==u.N.ERROR&&T&&(d?.length>0||I||L||M),U=(0,i.useCallback)((()=>{m&&g||!j?v():R()}),[v,m,g,j,R]),D=(0,i.useCallback)((()=>{N(!0),y().then((()=>{window?.location?.reload()})).catch((()=>{N(!1)}))}),[y]),V=(0,i.useCallback)((()=>{P(!0),E().then((()=>{window?.location?.reload()})).catch((()=>{P(!1)}))}),[E]);return s().createElement(p.ZP,{name:w,description:b,status:_,admin:t,isFetching:k,isInstallingStandalone:Z,isDeactivatingStandalone:S,onDeactivate:f,slug:n,onActivate:U,showMenu:O,menuItems:d,showActivateOption:I,showDeactivateOption:L,showInstallOption:M,onInstallStandalone:D,onActivateStandalone:D,onDeactivateStandalone:V},c)};d.propTypes={children:r().node,admin:r().bool.isRequired,slug:r().string.isRequired};const m=d},17:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var a=n(9105),c=n(3363),r=n(3846),i=n(6895),s=n(9312),o=n(5736),l=n(1074),u=n(5381),p=n(9196),d=n.n(p),m=n(9997),g=n(1689),h=n(3890),v=n(5242),f=n(6790),k=n(184),y=n(8578),E=n(4403);const __=o.__,w=()=>d().createElement(d().Fragment,null,d().createElement("div",{className:y.Z["account-description"]},__("You can use your existing account on any of these services:","jetpack-my-jetpack")),d().createElement("span",{className:y.Z["account-images"]},d().createElement("img",{src:E,className:y.Z.wordpress,alt:__("WordPress Logo","jetpack-my-jetpack")}),d().createElement("img",{src:k,className:y.Z.google,alt:__("Google Logo","jetpack-my-jetpack")}),d().createElement("img",{src:v,className:y.Z.apple,alt:__("Apple Logo","jetpack-my-jetpack")}))),b=()=>{const[e]=(0,m.lr)(),t=e.get("returnTo");return t?`admin.php?page=my-jetpack#/${t}`:"admin.php?page=my-jetpack"},j=()=>{const{apiRoot:e,apiNonce:t}=(0,g.Z)(),n=b();return d().createElement(a.Z,{showHeader:!1,showBackground:!1},d().createElement(c.Z,{horizontalSpacing:8,horizontalGap:0},d().createElement(r.Z,{className:y.Z["relative-col"]},d().createElement(h.Z,{className:y.Z["close-link"]})),d().createElement(r.Z,null,d().createElement(s.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:d().createElement(w,null),from:"my-jetpack",redirectUri:n},d().createElement("ul",null,d().createElement("li",null,__("Receive instant downtime alerts","jetpack-my-jetpack")),d().createElement("li",null,__("Automatically share your content on social media","jetpack-my-jetpack")),d().createElement("li",null,__("Let your subscribers know when you post","jetpack-my-jetpack")),d().createElement("li",null,__("Receive notifications about new likes and comments","jetpack-my-jetpack")),d().createElement("li",null,__("Let visitors share your content on social media","jetpack-my-jetpack")),d().createElement("li",null,__("And more!","jetpack-my-jetpack")," ",d().createElement("a",{href:(0,i.Z)("jetpack-features"),target:"_blank",className:y.Z["all-features"],rel:"noreferrer"},__("See all Jetpack features","jetpack-my-jetpack"),d().createElement(l.Z,{icon:u.Z}))))))))}},247:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Z});var a=n(5106),c=n(526),r=n(6895),i=n(1294),s=n(428),o=n(8137),l=n(9818),u=n(5736),p=n(1074),d=n(496),m=n(9201),g=n(5235),h=n.n(g),v=n(5162),f=n.n(v),k=n(9196),y=n.n(k),E=n(8489),w=n(3815),b=n(9182),j=n(6322);const __=u.__,C=e=>{let{text:t,actionText:n,onClick:r,status:i}=e;return y().createElement("div",{className:j.Z["list-item"]},y().createElement(a.ZP,{className:h()(j.Z["list-item-text"],{[j.Z.error]:"error"===i})},y().createElement(p.Z,{icon:"error"===i?d.Z:m.Z,className:h()({[j.Z.info]:"error"===i})}),t),n&&y().createElement(c.Z,{variant:"link",weight:"regular",onClick:r},n))},_=e=>{const{apiRoot:t,apiNonce:n,redirectUri:p,title:d,connectionInfoText:m,onDisconnected:g,connectedPlugins:v,connectedSiteId:f,context:_,onConnectUser:Z}=e,{isRegistered:N,isUserConnected:S,userConnectionData:P}=(0,i.Z)({apiRoot:t,apiNonce:n,redirectUri:p}),[R,x]=(0,k.useState)(!1),{setConnectionStatus:A,setUserIsConnecting:z}=(0,l.useDispatch)(s.t),I=Z||z,L=P.currentUser?.wpcomUser?.avatar,M=(0,k.useCallback)((e=>{e&&e.preventDefault(),x(!0)}),[x]),T=(0,k.useCallback)((e=>{e&&e.preventDefault(),x(!1)}),[x]),F=(0,k.useCallback)((e=>{e&&e.preventDefault(),A({isActive:!1,isRegistered:!1,isUserConnected:!1}),g?.()}),[g,A]);return y().createElement("div",{className:j.Z["connection-status-card"]},y().createElement(a.H3,null,d),y().createElement(a.ZP,{variant:"body",mb:3},`${m} `,y().createElement(c.Z,{href:(0,r.Z)("why-the-wordpress-com-connection-is-important-for-jetpack"),variant:"link",weight:"regular",isExternalLink:!0},__("Learn more about connections","jetpack-my-jetpack"))),y().createElement("div",{className:j.Z.status},y().createElement("img",{src:E,alt:"",className:j.Z.cloud}),y().createElement("div",{className:h()(j.Z.line,{[j.Z.disconnected]:!N||!S})}),y().createElement("div",{className:j.Z["avatar-wrapper"]},y().createElement("img",{src:b,alt:"",className:j.Z.jetpack}),y().createElement("img",{src:S&&L?L:w,alt:"",className:j.Z.avatar}))),y().createElement("div",null,N?y().createElement(y().Fragment,null,y().createElement(C,{onClick:M,text:__("Site connected.","jetpack-my-jetpack"),actionText:S&&P.currentUser?.isMaster?__("Manage","jetpack-my-jetpack"):null}),S&&y().createElement(C,{onClick:M,actionText:__("Manage","jetpack-my-jetpack"),text:(0,u.sprintf)(/* translators: first placeholder is user name, second is either the (Owner) string or an empty string */
+__("Connected as %1$s%2$s.","jetpack-my-jetpack"),P.currentUser?.wpcomUser?.display_name,P.currentUser?.isMaster?__(" (Owner)","jetpack-my-jetpack"):"")}),S&&P?.connectionOwner&&!P.currentUser?.isMaster&&y().createElement(C,{text:(0,u.sprintf)(/* translators: placeholder is the username of the Jetpack connection owner */
+__("Also connected: %s (Owner).","jetpack-my-jetpack"),P.connectionOwner)}),!S&&y().createElement(C,{onClick:I,text:__("User account not connected.","jetpack-my-jetpack"),actionText:__("Connect","jetpack-my-jetpack"),status:"error"})):y().createElement(C,{onClick:I,text:__("Jetpack is not connected.","jetpack-my-jetpack"),actionText:__("Connect","jetpack-my-jetpack"),status:"error"})),y().createElement(o.Z,{apiRoot:t,apiNonce:n,onDisconnected:F,connectedPlugins:v,connectedSiteId:f,connectedUser:P,isOpen:R,onClose:T,context:_}))};_.propTypes={apiRoot:f().string.isRequired,apiNonce:f().string.isRequired,redirectUri:f().string,connectedPlugins:f().array,connectedSiteId:f().number,title:f().string,connectionInfoText:f().string,onDisconnected:f().func,context:f().string,onConnectUser:f().func,requiresUserConnection:f().bool},_.defaultProps={title:__("Connection","jetpack-my-jetpack"),connectionInfoText:__("Jetpack connects your site and user account to the WordPress.com cloud to provide more powerful features.","jetpack-my-jetpack"),redirectUri:null,onConnectUser:null,requiresUserConnection:!0};const Z=_},5784:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var a=n(9818),c=n(9196),r=n.n(c),i=n(1689),s=n(3345),o=n(7493),l=n(247);function u(){const{apiRoot:e,apiNonce:t,topJetpackMenuItemUrl:n,connectedPlugins:c}=(0,i.Z)(),u=(0,s.Z)("/connection"),p=(0,a.useSelect)((e=>e(o.t).getProductsThatRequiresUserConnection()));return r().createElement(l.Z,{apiRoot:e,apiNonce:t,redirectUri:n,onConnectUser:u,connectedPlugins:c,requiresUserConnection:p.length>0,onDisconnected:()=>document?.location?.reload(!0)})}},5626:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var a=n(5736),c=n(1074),r=n(3259),i=n(9196),s=n.n(i),o=n(9997),l=n(197);const __=a.__;function u(e){let{onClick:t,reload:n}=e;const a=n?"/?reload=true":"/";return s().createElement(o.rU,{to:a,className:l.Z.link,onClick:t},s().createElement(c.Z,{icon:r.Z,className:l.Z.icon}),__("Go back","jetpack-my-jetpack"))}u.defaultProps={onClick:()=>{}};const p=u},8607:(e,t,n)=>{"use strict";n.d(t,{r:()=>d});var a=n(526),c=n(3396),r=n(5609),i=n(9771),s=n(5736),o=n(5235),l=n.n(o),u=n(9196),p=n(4416);n(1854);const __=s.__;function d(e){let{productName:t,giftedDate:n}=e;const[o,d]=(0,u.useState)(!1),m=(0,u.useCallback)((()=>d(!0)),[d]),g={position:"top center",placement:"top",animate:!0,noArrow:!1,resize:!1,flip:!1,offset:6,focusOnMount:"container",onClose:(0,u.useCallback)((()=>d(!1)),[d]),className:p.Z.container},h=l()(p.Z.wrapper,"golden-token-icon-tooltip");return React.createElement("div",{className:h},React.createElement(a.Z,{variant:"link",onClick:m},React.createElement(c._1,{className:p.Z.logo})),React.createElement("div",{className:p.Z.helper},o&&React.createElement(r.Popover,g,React.createElement("div",null,React.createElement("div",{className:p.Z.title},t),React.createElement("div",{className:p.Z.content},(0,s.sprintf)(
+// translators: %1$s is a product name, %2$s is the date the product was gifted.
+__("%1$s was gifted on %2$s. It gives you access to a lifetime subscription of Jetpack VaultPress Backup and Jetpack Scan.","jetpack-my-jetpack"),t,(0,i.dateI18n)("F j, Y",n)))))))}},4159:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var a=n(5609),c=n(9196),r=n.n(c),i=n(73);const s=function(){const[e,t]=(0,c.useState)(!0),n=(0,c.useCallback)((()=>t(!1)),[]);if(!e)return null;if(!window.hasOwnProperty("JP_IDENTITY_CRISIS__INITIAL_STATE"))return null;const{containerID:s,isSafeModeConfirmed:o}=window.JP_IDENTITY_CRISIS__INITIAL_STATE;return!s||o?null:r().createElement(a.Modal,{onRequestClose:n,overlayClassName:i.Z.modal},r().createElement("div",{id:s,className:i.Z.container}))}},8966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>L});var a=n(2674),c=n.n(a),r=n(2054),i=n(9105),s=n(216),o=n(3363),l=n(3846),u=n(5106),p=n(6579),d=n(4164),m=n(3329),g=n(5609),h=n(5736),v=n(496),f=n(5235),k=n.n(f),y=n(9196),E=n.n(y),w=n(2199),b=n(6913),j=n(8869),C=n(5371),_=n(5031),Z=n(3703),N=n(5784),S=n(4159),P=n(6800),R=n(2307),x=n(5943),A=n(9593),z=n(1017);const __=h.__,I=e=>{let{message:t,options:n,clean:a}=e;const[i]=(0,r.Z)(["md"],[">"]),s={error:E().createElement(g.SVG,{className:z.Z.nofill,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E().createElement(g.Path,{d:"M11.7815 4.93772C11.8767 4.76626 12.1233 4.76626 12.2185 4.93772L20.519 19.8786C20.6116 20.0452 20.4911 20.25 20.3005 20.25H3.69951C3.50889 20.25 3.3884 20.0452 3.48098 19.8786L11.7815 4.93772Z",stroke:"#D63638",strokeWidth:"1.5"}),E().createElement(g.Path,{d:"M13 10H11V15H13V10Z",fill:"#D63638"}),E().createElement(g.Path,{d:"M13 16H11V18H13V16Z",fill:"#D63638"})),info:v.Z};return E().createElement(g.Notice,c()({isDismissible:!1},n,{onRemove:a,className:z.Z.notice+(i?" "+z.Z["bigger-than-medium"]:"")}),E().createElement("div",{className:z.Z.message},s?.[n.status]&&E().createElement(g.Icon,{icon:s[n.status]}),t))};function L(){(0,C.Z)();const e="1"===window?.myJetpackInitialState?.isStatsModuleActive,{message:t,options:n,clean:a}=(0,_.Z)(),{hasConnectionError:c}=(0,m.Z)(),{isAvailable:r,isFetchingChatAvailability:g}=(0,j.Z)(),{detail:h}=(0,Z.i)("stats"),{jwt:v,isFetchingChatAuthentication:f}=(0,b.Z)(),L=!f&&!g&&r&&v,{recordEvent:M}=(0,w.Z)(),[T,F]=(0,y.useState)(!1);return(0,y.useEffect)((()=>{M("jetpack_myjetpack_page_view")}),[M]),window.location.hash.includes("?reload=true")&&(window.history.replaceState(null,"",window.location.href.replace("?reload=true","")),window.location.reload(),F(!0)),T?null:E().createElement(i.Z,null,E().createElement(S.Z,null),E().createElement(s.Z,null,E().createElement(o.Z,{horizontalSpacing:0},E().createElement(l.Z,null,E().createElement("div",{id:"jp-admin-notices",className:"my-jetpack-jitm-card"}))),E().createElement(o.Z,{horizontalSpacing:5,horizontalGap:t?3:6},E().createElement(l.Z,{sm:4,md:8,lg:12},E().createElement(u.ZP,{variant:"headline-small"},__("My Jetpack","jetpack-my-jetpack"))),c&&E().createElement(l.Z,null,E().createElement(m.h,null)),t&&E().createElement(l.Z,null,E().createElement(I,{message:t,options:n,clean:a})),e&&E().createElement(l.Z,{className:k()({[z.Z.stats]:h?.status!==R.N.ERROR})},E().createElement(A.Z,null)),E().createElement(l.Z,null,E().createElement(x.Z,null)))),E().createElement(p.Z,null,E().createElement(o.Z,{horizontalSpacing:8},E().createElement(l.Z,{sm:4,md:4,lg:6},E().createElement(P.Z,null)),E().createElement(l.Z,{sm:4,md:4,lg:6},E().createElement(N.Z,null)))),L&&E().createElement(d.Z,{jwt_token:v}))}},6800:(e,t,n)=>{"use strict";n.d(t,{Z:()=>w});var a=n(5106),c=n(526),r=n(5736),i=n(9196),s=n.n(i),o=n(2199),l=n(1689),u=n(3345),p=n(1750),d=n(8295),m=n(7258),g=n(6986),h=n(8607),v=n(6891);const __=r.__,_n=r._n;function f(e){let{purchase:t={}}=e;const{product_name:n}=t;return s().createElement(s().Fragment,null,s().createElement(a.Dx,null,n),s().createElement(k,t))}function k(e){const{expiry_message:t,product_name:n,subscribed_date:c}=e;return(0,g.h)(e)?s().createElement(a.ZP,{variant:"body",className:v.Z["expire-date"]},s().createElement("span",{className:v.Z["expire-date--with-icon"]},__("Never Expires","jetpack-my-jetpack")),s().createElement(h.r,{productName:n,giftedDate:c})):s().createElement(a.ZP,{variant:"body",className:v.Z["expire-date"]},t)}function y(e){let{purchases:t}=e;return s().createElement(s().Fragment,null,s().createElement(a.H3,null,t.length<=1?__("Your plan","jetpack-my-jetpack"):__("Your plans","jetpack-my-jetpack")),0===t.length&&s().createElement(a.ZP,{variant:"body"},__("Want to power up your Jetpack?","jetpack-my-jetpack")))}function E(e){let{purchases:t}=e;const{recordEvent:n}=(0,o.Z)(),{isUserConnected:a}=(0,l.Z)();let r=__("Purchase a plan","jetpack-my-jetpack");t.length>=1&&(r=_n("Manage your plan","Manage your plans",t.length,"jetpack-my-jetpack"));const p=(0,i.useCallback)((()=>{const e=t.length?"jetpack_myjetpack_plans_manage_click":"jetpack_myjetpack_plans_purchase_click";n(e)}),[t,n]),g=(0,u.Z)("/connection"),h=(0,i.useCallback)((()=>{n("jetpack_myjetpack_activate_license_click"),a||g()}),[g,a,n]);let f=__("Activate a license","jetpack-my-jetpack");return a||(f=__("Activate a license (requires a user connection)","jetpack-my-jetpack")),s().createElement("ul",null,s().createElement("li",{className:v.Z["actions-list-item"]},s().createElement(c.Z,{onClick:p,href:t.length?(0,d.Z)():(0,m.Z)(),weight:"regular",variant:"link",isExternalLink:!0},r)),window?.myJetpackInitialState?.loadAddLicenseScreen&&s().createElement("li",{className:v.Z["actions-list-item"]},s().createElement(c.Z,{onClick:h,href:a?`${window?.myJetpackInitialState?.adminUrl}admin.php?page=my-jetpack#/add-license`:void 0,variant:"link",weight:"regular"},f)))}function w(){const e=!!window?.myJetpackInitialState?.userIsAdmin,{purchases:t}=(0,p.Z)();return s().createElement("div",{className:v.Z.container},s().createElement(y,{purchases:t}),s().createElement("div",{className:v.Z.purchasesSection},t.map((e=>s().createElement(f,{key:`purchase-${e.product_name}`,purchase:e})))),e&&s().createElement(E,{purchases:t}))}},2307:(e,t,n)=>{"use strict";n.d(t,{N:()=>u,Z:()=>p});var a=n(2674),c=n.n(a),r=n(526),i=n(5736),s=n(9196),o=n.n(s),l=n(3703);const __=i.__,u={ACTIVE:"active",INACTIVE:"inactive",ERROR:"error",ABSENT:"plugin_absent",ABSENT_WITH_PLAN:"plugin_absent_with_plan",NEEDS_PURCHASE:"needs_purchase",NEEDS_PURCHASE_OR_FREE:"needs_purchase_or_free",CAN_UPGRADE:"can_upgrade"},p=e=>{let{status:t,admin:n,name:a,slug:s,onActivate:p,onManage:d,onFixConnection:m,isFetching:g,isInstallingStandalone:h,isDeactivatingStandalone:v,className:f,onAdd:k}=e;const{detail:y}=(0,l.i)(s),{manageUrl:E,purchaseUrl:w}=y,b=!E,j=g||h||v,C={variant:j?void 0:"primary",disabled:j,className:f};if(!n)return o().createElement(r.Z,c()({},C,{size:"small",variant:"link",weight:"regular"}),/* translators: placeholder is product name. */
+(0,i.sprintf)(__("Learn about %s","jetpack-my-jetpack"),a));switch(t){case u.ABSENT:case u.ABSENT_WITH_PLAN:return o().createElement(r.Z,c()({},C,{href:`#/add-${s}`,size:"small",variant:"link",weight:"regular"}),t===u.ABSENT&&(0,i.sprintf)(/* translators: placeholder is product name. */
+__("Get %s","jetpack-my-jetpack"),a),t===u.ABSENT_WITH_PLAN&&(0,i.sprintf)(/* translators: placeholder is product name. */
+__("Install %s","jetpack-my-jetpack"),a));case u.NEEDS_PURCHASE:case u.CAN_UPGRADE:{const e=__("Upgrade","jetpack-my-jetpack"),t=__("Purchase","jetpack-my-jetpack"),n=w?e:t;return o().createElement(r.Z,c()({},C,{href:w||`#/add-${s}`,size:"small",weight:"regular",onClick:k}),n)}case u.NEEDS_PURCHASE_OR_FREE:return o().createElement(r.Z,c()({},C,{href:`#/add-${s}`,size:"small",weight:"regular",onClick:k}),__("Start for free","jetpack-my-jetpack"));case u.ACTIVE:{const e=__("View","jetpack-my-jetpack"),t=__("Manage","jetpack-my-jetpack"),n=w?e:t;return o().createElement(r.Z,c()({},C,{disabled:b||C?.disabled,size:"small",weight:"regular",variant:"secondary",href:E,onClick:d}),n)}case u.ERROR:return o().createElement(r.Z,c()({},C,{href:"#/connection",size:"small",weight:"regular",onClick:m}),__("Fix connection","jetpack-my-jetpack"));case u.INACTIVE:return o().createElement(r.Z,c()({},C,{size:"small",weight:"regular",variant:"secondary",onClick:p}),__("Activate","jetpack-my-jetpack"));default:return null}}},2728:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>_,bY:()=>b});var a=n(2674),c=n.n(a),r=n(526),i=n(5106),s=n(5609),o=n(5736),l=n(3482),u=n(5899),p=n(5235),d=n.n(p),m=n(5162),g=n.n(m),h=n(9196),v=n.n(h),f=n(2199),k=n(1062),y=n(2307),E=n(6086),w=n(9720);const __=o.__,b={[y.N.ACTIVE]:__("Active","jetpack-my-jetpack"),[y.N.INACTIVE]:__("Inactive","jetpack-my-jetpack"),[y.N.NEEDS_PURCHASE]:__("Inactive","jetpack-my-jetpack"),[y.N.NEEDS_PURCHASE_OR_FREE]:__("Inactive","jetpack-my-jetpack"),[y.N.ERROR]:__("Error","jetpack-my-jetpack"),[y.N.CAN_UPGRADE]:__("Active","jetpack-my-jetpack")},j=e=>{let{items:t=[],showInstall:n=!1,onInstall:a,showActivate:c=!1,showDeactivate:i=!1,onActivate:o,onDeactivate:p}=e;return v().createElement(s.Dropdown,{className:w.Z.dropdown,popoverProps:{noArrow:!1,placement:"bottom-end"},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return v().createElement(r.Z,{variant:"tertiary",size:"small",icon:l.Z,onClick:n,"aria-expanded":t})},renderContent:e=>{let{onClose:s}=e;return v().createElement(v().Fragment,null,t.map((e=>v().createElement(r.Z,{weight:"regular",fullWidth:!0,variant:"tertiary",icon:e?.icon,onClick:()=>{s(),e?.onClick?.()}},e?.label))),n&&v().createElement(r.Z,{weight:"regular",fullWidth:!0,variant:"tertiary",icon:u.Z,onClick:()=>{s(),a?.()}},__("Install Plugin","jetpack-my-jetpack")),c&&v().createElement(r.Z,{weight:"regular",fullWidth:!0,variant:"tertiary",onClick:()=>{s(),o?.()}},__("Activate Plugin","jetpack-my-jetpack")),i&&v().createElement(r.Z,{weight:"regular",fullWidth:!0,variant:"tertiary",onClick:()=>{s(),p?.()}},__("Deactivate Plugin","jetpack-my-jetpack")))}})};j.propTypes={onActivate:g().func,onDeactivate:g().func,showActivate:g().bool,showDeactivate:g().bool,showInstall:g().bool,items:g().arrayOf(g().shape({label:g().string,icon:g().node,onClick:g().func})),onInstall:g().func},j.defaultProps={onActivate:()=>{},onDeactivate:()=>{},showActivate:!1,showDeactivate:!1};const C=e=>{const{name:t,description:n,status:a,onActivate:r,isFetching:s,isInstallingStandalone:o,isDeactivatingStandalone:l,slug:u,children:p,showMenu:m=!1,showActivateOption:g=!1,showDeactivateOption:b=!1,showInstallOption:C=!1,menuItems:_=[],onInstallStandalone:Z,onActivateStandalone:N,onDeactivateStandalone:S}=e,P=a===y.N.ACTIVE||a===y.N.CAN_UPGRADE,R=a===y.N.ERROR,x=a===y.N.ABSENT||a===y.N.ABSENT_WITH_PLAN,A=a===y.N.NEEDS_PURCHASE||a===y.N.NEEDS_PURCHASE_OR_FREE,z=d()({[w.Z.plugin_absent]:x,[w.Z["is-purchase-required"]]:A,[w.Z["is-link"]]:x,[w.Z["has-error"]]:R}),{recordEvent:I}=(0,f.Z)(),L=(0,h.useCallback)((()=>{I("jetpack_myjetpack_product_card_activate_click",{product:u}),r()}),[u,r,I]),M=(0,h.useCallback)((()=>{I("jetpack_myjetpack_product_card_add_click",{product:u})}),[u,I]),T=(0,h.useCallback)((()=>{I("jetpack_myjetpack_product_card_manage_click",{product:u})}),[u,I]),F=(0,h.useCallback)((()=>{I("jetpack_myjetpack_product_card_fixconnection_click",{product:u})}),[u,I]),O=(0,h.useCallback)((()=>{I("jetpack_myjetpack_product_card_install_standalone_plugin_click",{product:u}),Z()}),[u,Z,I]),U=(0,h.useCallback)((()=>{I("jetpack_myjetpack_product_card_activate_standalone_plugin_click",{product:u}),N()}),[u,N,I]),D=(0,h.useCallback)((()=>{I("jetpack_myjetpack_product_card_deactivate_standalone_plugin_click",{product:u}),S()}),[u,S,I]);return v().createElement(k.Z,{className:z,title:t,headerRightContent:m&&v().createElement(j,{items:_,showActivate:g,showDeactivate:b,onActivate:U,onDeactivate:D,showInstall:C,onInstall:O})},P&&p?p:v().createElement(i.ZP,{variant:"body-small",className:w.Z.description},n),v().createElement("div",{className:w.Z.actions},v().createElement(y.Z,c()({},e,{onActivate:L,onFixConnection:F,onManage:T,onAdd:M,className:w.Z.button})),!x&&v().createElement(E.Z,{status:a,isFetching:l,isInstallingStandalone:o,isDeactivatingStandalone:s})))};C.propTypes={children:g().node,name:g().string.isRequired,description:g().string.isRequired,admin:g().bool.isRequired,isFetching:g().bool,isInstallingStandalone:g().bool,isDeactivatingStandalone:g().bool,isManageDisabled:g().bool,onActivate:g().func,slug:g().string.isRequired,showMenu:g().bool,showActivateOption:g().bool,showDeactivateOption:g().bool,showInstallOption:g().bool,menuItems:g().arrayOf(g().shape({label:g().string,icon:g().node,onClick:g().func})),onInstallStandalone:g().func,onActivateStandalone:g().func,onDeactivateStandalone:g().func,status:g().oneOf([y.N.ACTIVE,y.N.INACTIVE,y.N.ERROR,y.N.ABSENT,y.N.ABSENT_WITH_PLAN,y.N.NEEDS_PURCHASE,y.N.NEEDS_PURCHASE_OR_FREE,y.N.CAN_UPGRADE]).isRequired},C.defaultProps={isFetching:!1,isInstallingStandalone:!1,isDeactivatingStandalone:!1,onActivate:()=>{},showMenu:!1,showActivateOption:!1,showDeactivateOption:!1,showInstallOption:!1,menuItems:[]};const _=C},6086:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(5106),c=n(5235),r=n.n(c),i=n(2307),s=n(9720),o=n(2728);const l=e=>{let{status:t,isFetching:n,isInstallingStandalone:c,isDeactivatingStandalone:l}=e;const u=o.bY[t],p=r()(s.Z.status,(e=>{switch(e){case i.N.ACTIVE:case i.N.CAN_UPGRADE:return s.Z.active;case i.N.INACTIVE:case i.N.NEEDS_PURCHASE:case i.N.NEEDS_PURCHASE_OR_FREE:return s.Z.inactive;case i.N.ERROR:return s.Z.error;default:return""}})(t),{[s.Z["is-fetching"]]:n||c||l});return React.createElement(a.ZP,{variant:"label",className:p},u)}},8777:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(5162),c=n.n(a),r=n(9196),i=n.n(r),s=n(5745);const o=e=>{let{admin:t}=e;return i().createElement(s.Z,{admin:t,slug:"jetpack-ai"})};o.propTypes={admin:c().bool.isRequired};const l=o},1640:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(5162),c=n.n(a),r=n(9196),i=n.n(r),s=n(5745);const o=e=>{let{admin:t}=e;return i().createElement(s.Z,{admin:t,slug:"anti-spam"})};o.propTypes={admin:c().bool.isRequired};const l=o},401:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(5162),c=n.n(a),r=n(9196),i=n.n(r),s=n(5745);const o=e=>{let{admin:t}=e;return i().createElement(s.Z,{admin:t,slug:"backup",showMenu:!0})};o.propTypes={admin:c().bool.isRequired};const l=o},4074:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(5162),c=n.n(a),r=n(9196),i=n.n(r),s=n(5745);const o=e=>{let{admin:t}=e;return i().createElement(s.Z,{admin:t,slug:"boost"})};o.propTypes={admin:c().bool.isRequired};const l=o},8112:(e,t,n)=>{"use strict";n.d(t,{G:()=>k,X:()=>f});var a=n(2947),c=n(5106),r=n(2636),i=n(5736),s=n(986),o=n(9404),l=n(1074),u=n(5235),p=n.n(u),d=n(5162),m=n.n(d),g=n(9196),h=n.n(g),v=n(523);const __=i.__,f=e=>{let{change:t,changePercentage:n}=e;if(!Number.isFinite(t))return null;const r=t>0?s.Z:o.Z,u=(0,a.Z)(Math.abs(t),{notation:"compact",compactDisplay:"short"});return h().createElement("div",{className:p()(v.Z["contextual-percentage-change"],{[v.Z.neutral]:0===t,[v.Z.positive]:t>0,[v.Z.negative]:t<0})},!!t&&h().createElement(l.Z,{icon:r,size:14,className:v.Z["change-icon"]}),h().createElement(c.ZP,{className:v.Z["change-values"]},(0,i.sprintf)(/* translators: both placeholders are numbers */
+__("%1$s (%2$s%%)","jetpack-my-jetpack"),u,n)))};f.propTypes={change:m().number,changePercentage:m().number};const k=e=>{let{description:t,value:n,context:a,loading:i}=e;return i?h().createElement("div",{className:v.Z["single-contextual-info-placeholder"]},h().createElement(r.Z,{height:24}),h().createElement(r.Z,{height:36})):h().createElement(h().Fragment,null,h().createElement(c.ZP,null,t),h().createElement("div",{className:v.Z["single-contextual-info"]},h().createElement(c.ZP,{className:v.Z["main-value"]},n),a))};k.propTypes={description:m().string.isRequired,value:m().string,context:m().node,loading:m().bool}},5996:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(5162),c=n.n(a),r=n(9196),i=n.n(r),s=n(5745);const o=e=>{let{admin:t}=e;return i().createElement(s.Z,{admin:t,slug:"crm"})};o.propTypes={admin:c().bool.isRequired};const l=o},5943:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var a=n(3363),c=n(3846),r=n(9196),i=n.n(r),s=n(8777),o=n(1640),l=n(401),u=n(4074),p=n(5996),d=n(5440),m=n(687),g=n(419),h=n(6217),v=n(523),f=n(9894);const{showJetpackStatsCard:k=!1}=window.myJetpackInitialState?.myJetpackFlags??{},y=()=>{const e=[l.Z,d.Z,o.Z,u.Z,m.Z,f.Z,p.Z,g.Z,s.Z];return k&&e.splice(6,0,h.Z),i().createElement(a.Z,{className:v.Z.cardlist,tagName:"ul",fluid:!0,horizontalSpacing:0,horizontalGap:3},e.map(((e,t)=>i().createElement(c.Z,{tagName:"li",sm:4,md:4,lg:4,key:t},i().createElement(e,{admin:!!window?.myJetpackInitialState?.userIsAdmin})))))}},5440:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var a=n(9818),c=n(5162),r=n.n(c),i=n(9196),s=n.n(i),o=n(7493),l=n(5745);const u=e=>{let{admin:t}=e;const n=(0,a.useSelect)((e=>e(o.t).hasStandalonePluginInstalled()));return s().createElement(l.Z,{admin:t,slug:n?"protect":"scan"})};u.propTypes={admin:r().bool.isRequired};const p=u},687:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(5162),c=n.n(a),r=n(9196),i=n.n(r),s=n(5745);const o=e=>{let{admin:t}=e;return i().createElement(s.Z,{admin:t,slug:"search",showMenu:!0})};o.propTypes={admin:c().bool.isRequired};const l=o},419:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(5162),c=n.n(a),r=n(9196),i=n.n(r),s=n(5745);const o=e=>{let{admin:t}=e;return i().createElement(s.Z,{admin:t,slug:"social",showMenu:!0})};o.propTypes={admin:c().bool.isRequired};const l=o},6217:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(5162),c=n.n(a),r=n(9196),i=n.n(r),s=n(5745);const o=e=>{let{admin:t}=e;return i().createElement(s.Z,{admin:t,slug:"stats",showMenu:!0})};o.propTypes={admin:c().bool.isRequired};const l=o},9894:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var a=n(2947),c=n(5736),r=n(5162),i=n.n(r),s=n(9196),o=n.n(s),l=n(3703),u=n(5745),p=n(8112);const __=c.__,d=e=>{let{admin:t}=e;const{videoPressStats:n=!1}=window.myJetpackInitialState?.myJetpackFlags??{},{loading:c,hasError:r,change:i,currentFormatted:s,changePercentage:d}=(()=>{const{stats:e}=(0,l.i)("videopress"),t=void 0===e,n=null===e,c=e?.data?.views??{},{previous:r=null,current:i=null}=c,s=null!==i?(0,a.Z)(i,{notation:"compact",compactDisplay:"short"}):null,o=null!==i&&null!==r?i-r:null;let u=null;return null!==o&&(u=0===o?0:0===r?100:Math.round(o/r*100)),{loading:t,hasError:n,currentFormatted:s,change:o,changePercentage:u}})();if(!n||r)return o().createElement(u.Z,{admin:t,slug:"videopress",showMenu:!0});const m=__("Views, last 7 days","jetpack-my-jetpack");return o().createElement(u.Z,{admin:t,slug:"videopress",showMenu:!0},o().createElement(p.G,{loading:c,description:m,value:s,context:o().createElement(p.X,{change:i,changePercentage:d})}))};d.propTypes={admin:i().bool.isRequired};const m=d},2667:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(5609),c=n(5162),r=n.n(c),i=n(9196),s=n.n(i);const o=e=>{let{children:t,className:n,href:c,isLoading:r,onClick:i,isPrimary:o,disabled:l}=e;return s().createElement(a.Button,{onClick:i,className:n,href:c,variant:o?"primary":"secondary",disabled:r||l},r?s().createElement(a.Spinner,null):t)};o.propTypes={className:r().string,isLoading:r().bool,isPrimary:r().bool,disabled:r().bool},o.defaultProps={isLoading:!1,isPrimary:!0,disabled:!1};const l=o},968:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var a=n(8899),c=n(5106),r=n(3396),i=n(4972),s=n(7325),o=n(8258),l=n(5609),u=n(5736),p=n(1074),d=n(1908),m=n(9201),g=n(5235),h=n.n(g),v=n(9196),f=n.n(v),k=n(2199),y=n(3703),E=n(2667),w=n(8429);const __=u.__;function b(e){let{value:t,currency:n,isOld:r}=e;if(!t||!n)return null;const i=(0,a.LR)(t,n),s=h()(w.Z.price,{[w.Z["is-old"]]:r});return f().createElement(c.ZP,{className:s,variant:"headline-medium",component:"p"},f().createElement(c.ZP,{component:"sup",variant:"title-medium"},i.symbol),i.integer,f().createElement(c.ZP,{component:"sup",variant:"title-medium"},i.fraction))}const j=e=>{let{slug:t,onClick:n,trackButtonClick:a,className:g,preferProductName:j,supportingInfo:C}=e;const{fileSystemWriteAccess:_,siteSuffix:Z,myJetpackUrl:N}=window?.myJetpackInitialState??{},{detail:S,isFetching:P}=(0,y.i)(t),{name:R,title:x,longDescription:A,features:z,disclaimers:I,pricingForUi:L,isBundle:M,supportedProducts:T,hasRequiredPlan:F,status:O,pluginSlug:U,postCheckoutUrl:D}=S,V="plugin_absent"===O&&"no"===_,{isFree:B,trialAvailable:H,fullPricePerMonth:J,currencyCode:q,discountPricePerMonth:G,wpcomProductSlug:W,wpcomFreeProductSlug:$,introductoryOffer:K,productTerm:Q}=L,{recordEvent:Y}=(0,k.Z)(),X=!B&&!F,ee=D||N,{run:te,hasCheckoutStarted:ne}=(0,o.Z)({productSlug:W,redirectUrl:ee,siteSuffix:Z,from:"my-jetpack"}),{run:ae,hasCheckoutStarted:ce}=(0,o.Z)({productSlug:$,redirectUrl:N,siteSuffix:Z,from:"my-jetpack"}),re=M?T.join("_plus_").split("_").map(((e,t)=>{if("plus"===e)return f().createElement(p.Z,{className:w.Z["plus-icon"],key:`icon-plugs${t}`,icon:d.Z,size:14});const n=(0,r.VS)(e);return f().createElement(n,{key:e,size:24})})):null;let ie;ie="month"===K?.intervalUnit&&1===K?.intervalCount?(0,u.sprintf)(
+// translators: %s is the monthly price for a product
+__("trial for the first month, then $%s /month, billed yearly","jetpack-my-jetpack"),J):"year"===Q?__("/month, paid yearly","jetpack-my-jetpack"):__("/month","jetpack-my-jetpack",0);const se=(0,v.useCallback)((()=>{a(),n?.(te,S)}),[n,a,te,S]),oe=(0,v.useCallback)((()=>{a($),n?.(ae)}),[n,a,ae,$]),le=(0,v.useCallback)((e=>{Y("jetpack_myjetpack_product_card_disclaimer_click",{id:e,product:t})}),[t,Y]);function ue(e){let{slug:t}=e;const n=(0,r.VS)(t);return n?f().createElement("div",{className:w.Z["product-icon"]},f().createElement(n,null)):null}const pe=(!M||M&&!F)&&H,de=R&&j?R:x,me=!M&&F?(0,u.sprintf)(/* translators: placeholder is product name. */
+__("Install %s","jetpack-my-jetpack"),de):(0,u.sprintf)(/* translators: placeholder is product name. */
+__("Get %s","jetpack-my-jetpack"),de);return f().createElement("div",{className:h()(w.Z.card,g,{[w.Z["is-bundle-card"]]:M})},M&&f().createElement("div",{className:w.Z["card-header"]},f().createElement(r.r7,{className:w.Z["product-bundle-icon"],size:16}),f().createElement(c.ZP,{variant:"label"},__("Popular upgrade","jetpack-my-jetpack"))),f().createElement("div",{className:w.Z.container},M&&f().createElement("div",{className:w.Z["product-bundle-icons"]},re),f().createElement(ue,{slug:t}),f().createElement(c.H3,null,de),f().createElement(c.ZP,{mb:3},A),f().createElement("ul",{className:w.Z.features},z.map(((e,t)=>f().createElement(c.ZP,{component:"li",key:`feature-${t}`,variant:"body"},f().createElement(p.Z,{icon:m.Z,size:24}),e)))),X&&f().createElement(f().Fragment,null,f().createElement("div",{className:w.Z["price-container"]},G0&&f().createElement("div",{className:w.Z.disclaimers},I.map(((e,t)=>{const{text:n,link_text:a=null,url:r=null}=e;return f().createElement(c.ZP,{key:`disclaimer-${t}`,component:"p",variant:"body-small"},`${n} `,r&&a&&f().createElement(l.ExternalLink,{onClick:()=>le(t),href:r,target:"_blank",rel:"noopener noreferrer"},a))}))),M&&F&&f().createElement("div",{className:w.Z["product-has-required-plan"]},f().createElement(r.KM,{size:36}),f().createElement(c.ZP,null,__("Active on your site","jetpack-my-jetpack"))),C&&f().createElement(c.ZP,{className:w.Z["supporting-info"],variant:"body-extra-small"},C)))};j.defaultProps={trackButtonClick:()=>{}};const C=j},9144:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var a=n(9608),c=n(5347),r=n(526),i=n(1342),s=n(5106),o=n(8258),l=n(5736),u=n(5162),p=n.n(u),d=n(9196),m=n.n(d),g=n(3703);const __=l.__,h=e=>{let{cantInstallPlugin:t,onProductButtonClick:n,detail:i,tier:s,trackProductButtonClick:u}=e;const{siteSuffix:p,myJetpackUrl:g}=window?.myJetpackInitialState??{},{featuresByTier:h=[],pricingForUi:{tiers:v},title:f,postActivationUrl:k}=i,{callToAction:y,currencyCode:E,fullPrice:w,introductoryOffer:b,isFree:j,wpcomProductSlug:C}=v[s],{run:_,hasCheckoutStarted:Z}=(0,o.Z)({from:"my-jetpack",productSlug:C,redirectUrl:k||g,siteSuffix:p}),N=(0,d.useCallback)((()=>{u(),n?.(_,i,s)}),[u,n,_,i,s]),S=w?Math.ceil(w/12*100)/100:null,P=b?.costPerInterval?Math.ceil(b.costPerInterval/12*100)/100:null,R="month"===b?.intervalUnit&&1===b?.intervalCount,x=R?(0,l.sprintf)(
+// translators: %s is the monthly price for a product
+__("trial for the first month, then $%s /month, billed yearly","jetpack-my-jetpack"),S):__("/month, paid yearly","jetpack-my-jetpack",0),A=y||(j?__("Start for Free","jetpack-my-jetpack"):(0,l.sprintf)(/* translators: placeholder is product name. */
+__("Get %s","jetpack-my-jetpack"),f,0));return m().createElement(a.oK,{primary:!j},m().createElement(a.NE,null,j?m().createElement(c.Z,{price:0,legend:"",currency:"USD",hidePriceFraction:!0}):m().createElement(c.Z,{price:S,offPrice:P,legend:x,currency:E,hideDiscountLabel:R,hidePriceFraction:!0}),m().createElement(r.Z,{fullWidth:!0,variant:j?"secondary":"primary",onClick:N,isLoading:Z,disabled:Z||t},A)),h.map(((e,t)=>{const{included:n,description:c,struck_description:r,info:i}=e.tiers[s],o=r||c?m().createElement(m().Fragment,null,r?m().createElement(m().Fragment,null,m().createElement("del",null,r)," "):null,c?m().createElement("strong",null,c):null):null;return m().createElement(a.kF,{key:t,isIncluded:n,label:o,tooltipTitle:i?.title,tooltipInfo:i?.content?m().createElement("div",{dangerouslySetInnerHTML:{__html:i?.content}}):null,tooltipClassName:i?.class})})))};h.propTypes={cantInstallPlugin:p().bool.isRequired,onProductButtonClick:p().func.isRequired,detail:p().object.isRequired,tier:p().string.isRequired,trackProductButtonClick:p().func.isRequired};const v=e=>{let{slug:t,onProductButtonClick:n,trackProductButtonClick:c}=e;const{fileSystemWriteAccess:o}=window?.myJetpackInitialState??{},{detail:u}=(0,g.i)(t),{description:p,featuresByTier:v=[],pluginSlug:f,status:k,tiers:y=[],title:E}=u,w="plugin_absent"===k&&"no"===o,b=w&&m().createElement(i.Z,{level:"error",hideCloseButton:!0,title:m().createElement(s.ZP,null,(0,l.sprintf)(
+// translators: %s is the plugin name.
+__("Due to your server settings, we can't automatically install the plugin for you. Please manually install the %s plugin.","jetpack-my-jetpack"),E)),actions:[m().createElement(r.Z,{variant:"secondary",href:`https://wordpress.org/plugins/${f}`,isExternalLink:!0},__("Get plugin","jetpack-my-jetpack"))]}),j=(0,d.useMemo)((()=>v.map((e=>({name:e?.name,tooltipTitle:e?.info?.title,tooltipInfo:e?.info?.content?m().createElement("div",{dangerouslySetInnerHTML:{__html:e?.info?.content}}):null})))),[v]);return m().createElement(m().Fragment,null,b,m().createElement(a.ZP,{title:p,items:j},y.map(((e,t)=>m().createElement(h,{key:t,tier:e,detail:u,onProductButtonClick:n,trackProductButtonClick:c,primary:0===t,cantInstallPlugin:w})))))};v.propTypes={slug:p().string.isRequired,onProductButtonClick:p().func.isRequired,trackProductButtonClick:p().func.isRequired};const f=v},8093:(e,t,n)=>{"use strict";n.d(t,{B$:()=>x,Jw:()=>F,Q5:()=>L,WJ:()=>R,Yi:()=>A,jO:()=>I,q:()=>S,qA:()=>P,sI:()=>z,uw:()=>T,y$:()=>M});var a=n(9105),c=n(3363),r=n(3846),i=n(5106),s=n(526),o=n(9307),l=n(5736),u=n(5235),p=n.n(u),d=n(9196),m=n.n(d),g=n(2199),h=n(3345),v=n(3703),f=n(5626),k=n(968),y=n(9144),E=n(5610),w=n(4763),b=n(2605),j=n(1488),C=n(720),_=n(1287),Z=n(1439);const __=l.__;function N(e){let{bundle:t,existingLicenseKeyUrl:n="admin.php?page=my-jetpack#/add-license",installsPlugin:l=!1,slug:u,supportingInfo:E,preferProductName:w=!1,children:b=null,imageContainerClassName:j=""}=e;const{activate:C,detail:Z}=(0,v.i)(u),{isUpgradableByBundle:N,tiers:S}=Z,{recordEvent:P}=(0,g.Z)();(0,d.useEffect)((()=>{P("jetpack_myjetpack_product_interstitial_view",{product:u})}),[P,u]);const R=(0,d.useCallback)((function(){P("jetpack_myjetpack_product_interstitial_add_link_click",{product:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)??u})}),[P,u]),x=(0,d.useCallback)((()=>{P("jetpack_myjetpack_product_interstitial_add_link_click",{product:t})}),[P,t]),A=(0,h.Z)("/"),z=(0,d.useCallback)(((e,t,n)=>{(t?.isBundle?Promise.resolve():C()).finally((()=>{if(t?.isBundle)return void e?.();const a=t?.postActivationUrl,c=n?t?.hasRequiredTier?.[n]:t?.hasRequiredPlan;if(!(!(n?t?.pricingForUi?.tiers?.[n]?.isFree:t?.pricingForUi?.isFree)&&!c))return a?void(window.location.href=a):A();e?.()}))}),[A,C]),I=(0,d.useCallback)((e=>{u&&P("jetpack_myjetpack_product_interstitial_back_link_click",{product:u}),document.referrer.includes(window.location.host)&&(e.preventDefault(),history.back())}),[P,u]);return m().createElement(a.Z,{showHeader:!1,showBackground:!1},m().createElement(c.Z,{horizontalSpacing:3,horizontalGap:3},m().createElement(r.Z,{className:_.Z["product-interstitial__header"]},m().createElement(f.Z,{onClick:I}),n&&m().createElement(i.ZP,{variant:"body-small"},(0,o.createInterpolateElement)(__("Already have an existing plan or license key? Get started.","jetpack-my-jetpack"),{a:m().createElement(s.Z,{className:_.Z["product-interstitial__license-activation-link"],href:n,variant:"link"})}))),m().createElement(r.Z,null,S&&S.length?m().createElement(y.Z,{slug:u,clickHandler:z,onProductButtonClick:z,trackProductButtonClick:R}):m().createElement(c.Z,{className:N?null:_.Z.container,horizontalSpacing:0,horizontalGap:0,fluid:!0},m().createElement(r.Z,{sm:4,md:4,lg:7},m().createElement(k.Z,{slug:u,trackButtonClick:R,onClick:l?z:void 0,className:N?_.Z.container:null,supportingInfo:E,preferProductName:w})),m().createElement(r.Z,{sm:4,md:4,lg:5,className:p()(_.Z.imageContainer,j)},t?m().createElement(k.Z,{slug:t,trackButtonClick:x,onClick:z,className:N?_.Z.container:null}):b)))))}function S(){const e="anti-spam",{detail:t}=(0,v.i)(e),{isPluginActive:n}=t;return m().createElement(N,{slug:e,installsPlugin:!0,bundle:"security",existingLicenseKeyUrl:n?"admin.php?page=akismet-key-config":null,preferProductName:!0})}function P(){return m().createElement(N,{slug:"backup",installsPlugin:!0,bundle:"security"})}function R(){return m().createElement(N,{slug:"boost",installsPlugin:!0},m().createElement("img",{src:E,alt:"Boost"}))}function x(){return m().createElement(N,{slug:"crm",installsPlugin:!0},m().createElement("img",{src:w,alt:"CRM"}))}function A(){return m().createElement(N,{slug:"extras",installsPlugin:!0},m().createElement("img",{src:b,alt:"Extras"}))}function z(){return m().createElement(N,{slug:"jetpack-ai",installsPlugin:!0,imageContainerClassName:_.Z.aiImageContainer},m().createElement("img",{src:j,alt:"Jetpack AI"}))}function I(){return m().createElement(N,{slug:"protect",installsPlugin:!0})}function L(){return m().createElement(N,{slug:"scan",installsPlugin:!0,bundle:"security"})}function M(){return m().createElement(N,{slug:"social",installsPlugin:!0})}function T(){const{detail:e}=(0,v.i)("search");return m().createElement(N,{slug:"search",installsPlugin:!0,supportingInfo:(e?.pricingForUi?.trialAvailable?__("Jetpack Search Free supports up to 5,000 records and 500 search requests per month for free. You will be asked to upgrade to a paid plan if you exceed these limits for three continuous months.","jetpack-my-jetpack"):"")+__("For the paid plan, 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")},m().createElement("img",{src:C,alt:"Search"}))}function F(){return m().createElement(N,{slug:"videopress",installsPlugin:!0},m().createElement("img",{src:Z,alt:"VideoPress"}))}},673:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var a=n(1294),c=n(3281),r=n(5736),i=n(9196),s=n.n(i),o=n(1750),l=n(6986);const __=r.__;function u(){const{userConnectionData:e}=(0,a.Z)(),t=e?.currentUser?.wpcomUser?.display_name||e?.currentUser?.wpcomUser?.login||e?.currentUser?.username,{isFetchingPurchases:n,purchases:r}=(0,o.Z)(),i=(0,l.o)(r);return n?s().createElement(s().Fragment,null,__("Checking gold status…","jetpack-my-jetpack")):s().createElement(s().Fragment,null,s().createElement(c.H,{tokenRedeemed:i,displayName:t}))}},2889:(e,t,n)=>{"use strict";n.d(t,{Z:()=>w});var a=n(3363),c=n(3846),r=n(526),i=n(5736),s=n(1074),o=n(4955),l=n(6514),u=n(5316),p=n(9196),d=n.n(p),m=n(2199),g=n(3703),h=n(1062),v=n(2307),f=n(6086),k=n(5090),y=n(5026),E=n(2091);const __=i.__,w=e=>{let{counts:t,previousCounts:n}=e;const{detail:i}=(0,g.i)("stats"),{recordEvent:w}=(0,m.Z)(),b=i.status===v.N.ERROR,j=(0,p.useCallback)((()=>{w(`jetpack_myjetpack_stats_card_${b?"fixconnection":"seedetailedstats"}_click`,{product:"stats"})}),[b,w]),C=b?"#/connection":"admin.php?page=stats";return d().createElement(a.Z,{fluid:!0,horizontalSpacing:0},d().createElement(c.Z,{lg:12},d().createElement(h.Z,{title:"Stats"},d().createElement("h3",{className:E.Z["section-title"]},d().createElement("span",null,__("7-day highlights","jetpack-my-jetpack")),d().createElement("small",{className:E.Z["section-description"]},__("Compared to previous period","jetpack-my-jetpack"))),d().createElement("div",{className:E.Z["cards-list"]},d().createElement(k.Z,{heading:__("Views","jetpack-my-jetpack"),icon:d().createElement(s.Z,{icon:y.Z}),count:t?.views,previousCount:n?.views}),d().createElement(k.Z,{heading:__("Visitors","jetpack-my-jetpack"),icon:d().createElement(s.Z,{icon:o.Z}),count:t?.visitors,previousCount:n?.visitors}),d().createElement(k.Z,{heading:__("Likes","jetpack-my-jetpack"),icon:d().createElement(s.Z,{icon:l.Z}),count:t?.likes,previousCount:n?.likes}),d().createElement(k.Z,{heading:__("Comments","jetpack-my-jetpack"),icon:d().createElement(s.Z,{icon:u.Z}),count:t?.comments,previousCount:n?.comments})),d().createElement("div",{className:E.Z.actions},d().createElement(r.Z,{size:"small",weight:"regular",variant:b?"primary":"secondary",href:C,onClick:j},b&&__("Fix connection","jetpack-my-jetpack"),!b&&__("See detailed stats","jetpack-my-jetpack")),d().createElement(f.Z,{status:i.status})))))}},5090:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var a=n(2947),c=n(5609),r=n(1074),i=n(9404),s=n(986),o=n(5235),l=n.n(o),u=n(5162),p=n.n(u),d=n(9196),m=n.n(d),g=n(2091);const h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null!==e&&Number.isFinite(e)?(0,a.Z)(e,t):"-"},v=e=>{let{count:t=0,previousCount:n=0,icon:a,heading:o}=e;const u=(d=n,"number"!=typeof(p=t)||"number"!=typeof d?null:p-d);var p,d;const v=Math.abs(u),f=Number.isFinite(u)?((e,t)=>{if("number"!=typeof e||"number"!=typeof t)return null;if(0===e&&0===t)return 0;const n=e/t*100;return Math.abs(n)===1/0?100:Math.round(n)})(v,n):null,k={maximumFractionDigits:1,notation:"compact"};return m().createElement(c.Card,{className:g.Z["stats-card"]},a&&m().createElement("div",{className:g.Z["stats-card-icon"]},a),o&&m().createElement("div",{className:g.Z["stats-card-heading"]},o),m().createElement("div",{className:g.Z["stats-card-count"]},m().createElement("span",{className:g.Z["stats-card-count-value"],title:Number.isFinite(t)?String(t):void 0},h(t,k)),null!==u?m().createElement("span",{className:l()(g.Z["stats-card-difference"],{[g.Z["stats-card-difference--positive"]]:u<0,[g.Z["stats-card-difference--negative"]]:u>0})},m().createElement("span",{className:g.Z["stats-card-difference-icon"],title:String(u)},u<0&&m().createElement(r.Z,{size:18,icon:i.Z}),u>0&&m().createElement(r.Z,{size:18,icon:s.Z})),m().createElement("span",{className:g.Z["stats-card-difference-absolute-value"]},h(v,v>9999?k:{})),null!==f&&m().createElement("span",{className:g.Z["stats-card-difference-absolute-percentage"]},"(",f,"%)")):null))};v.propTypes={count:p().number,heading:p().node,icon:p().node,previousCount:p().number};const f=v},5026:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var a=n(5609);const c=React.createElement(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement(a.Path,{d:"m4 13 .67.336.003-.005a2.42 2.42 0 0 1 .094-.17c.071-.122.18-.302.329-.52.298-.435.749-1.017 1.359-1.598C7.673 9.883 9.498 8.75 12 8.75s4.326 1.132 5.545 2.293c.61.581 1.061 1.163 1.36 1.599a8.29 8.29 0 0 1 .422.689l.002.005L20 13l.67-.336v-.003l-.003-.005-.008-.015-.028-.052a9.752 9.752 0 0 0-.489-.794 11.6 11.6 0 0 0-1.562-1.838C17.174 8.617 14.998 7.25 12 7.25S6.827 8.618 5.42 9.957c-.702.669-1.22 1.337-1.563 1.839a9.77 9.77 0 0 0-.516.845l-.008.015-.002.005-.001.002v.001L4 13Zm8 3a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z"}))},9593:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(5710),c=n(2889);const r=()=>{const{statsCounts:e}=(0,a.Z)(),t=e?.past_seven_days||{},n=e?.between_past_eight_and_fifteen_days||{};return React.createElement(c.Z,{counts:t,previousCounts:n})}},8565:(e,t,n)=>{"use strict";n.d(t,{f6:()=>c,w6:()=>a});const a="my-jetpack-my-plans-manage",c="my-jetpack-my-plans-purchase"},2199:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(6975),c=n(9196),r=n(1689);const i=()=>{const{isUserConnected:e,connectedPlugins:t,userConnectionData:n={}}=(0,r.Z)(),{login:i,ID:s}=n.currentUser?.wpcomUser||{};(0,c.useEffect)((()=>{e&&s&&i&&a.Z.initialize(s,i)}),[s,e,i]);const o=Object.keys(t||{}).sort().join(",").replaceAll("jetpack-",""),{clearedIdentity:l,ga:u,mc:p,pageView:d,purchase:m,setGoogleAnalyticsEnabled:g,setMcAnalyticsEnabled:h,setProperties:v,tracks:f}=a.Z;return{clearedIdentity:l,ga:u,mc:p,pageView:d,purchase:m,recordEvent:(0,c.useCallback)(((e,t)=>{f.recordEvent(e,{...t,version:window?.myJetpackInitialState?.myJetpackVersion,referring_plugins:o})}),[]),setGoogleAnalyticsEnabled:g,setMcAnalyticsEnabled:h,setProperties:v,tracks:f}}},4106:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9818),c=n(7493);function r(){return{availableLicenses:(0,a.useSelect)((e=>e(c.t).getAvailableLicenses())),fetchingAvailableLicenses:(0,a.useSelect)((e=>e(c.t).isFetchingAvailableLicenses()))}}},6913:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9818),c=n(7493);function r(){const{jwt:e,isFetchingChatAuthentication:t}=(0,a.useSelect)((e=>{const{getChatAuthentication:t,isRequestingChatAuthentication:n}=e(c.t);return{jwt:t(),isFetchingChatAuthentication:n()}}));return{jwt:e,isFetchingChatAuthentication:t}}},8869:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9818),c=n(7493);function r(){const{isAvailable:e,isFetchingChatAvailability:t}=(0,a.useSelect)((e=>{const{getChatAvailability:t,isRequestingChatAvailability:n}=e(c.t);return{isAvailable:t(),isFetchingChatAvailability:n()}}));return{isAvailable:e,isFetchingChatAvailability:t}}},5371:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var a=n(9818),c=n(5736),r=n(9196),i=n(7493),s=n(1689),o=n(3345);const __=c.__;function l(){const e=(0,o.Z)("/connection"),{setGlobalNotice:t}=(0,a.useDispatch)(i.t),n=(0,a.useSelect)((e=>e(i.t).getProductsThatRequiresUserConnection())),{isSiteConnected:l,hasConnectedOwner:u,isUserConnected:p}=(0,s.Z)(),d=!u&&!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,h=__("Some products need a connection to WordPress.com to be able to work.","jetpack-my-jetpack");(0,r.useEffect)((()=>{l?d&&t(g,{status:"error",actions:[{label:__("Connect your user account to fix this","jetpack-my-jetpack"),onClick:e,noDefaultClasses:!0}]}):t(h,{status:"warning",actions:[{label:__("Connect your site to fix this","jetpack-my-jetpack"),onClick:e,variant:"link",noDefaultClasses:!0}]})}),[l,h,g,d,e,t])}},1689:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var a=n(1294);function c(){const{apiRoot:e,apiNonce:t}=myJetpackRest,{topJetpackMenuItemUrl:n}=myJetpackInitialState,c=(0,a.Z)({apiRoot:e,apiNonce:t}),r=c.isRegistered;return{apiNonce:t,apiRoot:e,...c,isSiteConnected:r,topJetpackMenuItemUrl:n}}},3345:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9196),c=n(6417);function r(e){const t=(0,c.s0)();return(0,a.useCallback)((()=>t(e)),[t,e])}},5031:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9818),c=n(7493);function r(){const e=(0,a.useDispatch)(),{message:t,options:n}=(0,a.useSelect)((e=>e(c.t).getGlobalNotice()));return{message:t,options:n||{},clean:()=>e(c.t).cleanGlobalNotice()}}},3703:(e,t,n)=>{"use strict";n.d(t,{i:()=>r});var a=n(9818),c=n(7493);function r(e){const{activateProduct:t,deactivateProduct:n,installStandalonePluginForProduct:r,deactivateStandalonePluginForProduct:i}=(0,a.useDispatch)(c.t),s=(0,a.useSelect)((t=>t(c.t).getProduct(e)));return{activate:()=>t(e),deactivate:()=>n(e),deactivateStandalonePlugin:()=>i(e),installStandalonePlugin:()=>r(e),productsList:(0,a.useSelect)((e=>e(c.t).getProducts())),detail:s,isActive:"active"===s.status,isFetching:(0,a.useSelect)((t=>t(c.t).isFetching(e))),stats:(0,a.useSelect)((t=>t(c.t).getProductStats(e)))}}},1750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9818),c=n(7493);function r(){const{purchases:e,isFetchingPurchases:t}=(0,a.useSelect)((e=>{const{getPurchases:t,isRequestingPurchases:n}=e(c.t);return{purchases:t(),isFetchingPurchases:n()}}));return{purchases:e,isFetchingPurchases:t}}},5710:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9818),c=n(7493);function r(){const{statsCounts:e,isFetchingStatsCounts:t}=(0,a.useSelect)((e=>{const{getStatsCounts:t,isFetchingStatsCounts:n}=e(c.t);return{statsCounts:t(),isFetchingStatsCounts:n()}}));return{statsCounts:e,isFetchingStatsCounts:t}}},9274:(e,t,n)=>{"use strict";n.d(t,{$v:()=>j,G6:()=>C,GH:()=>p,IF:()=>f,JU:()=>N,MG:()=>b,N:()=>E,Np:()=>d,RT:()=>o,SK:()=>S,ZP:()=>L,cL:()=>y,d1:()=>_,dE:()=>h,dI:()=>g,dq:()=>v,fE:()=>Z,kk:()=>k,ny:()=>l,qp:()=>w,vv:()=>m,z8:()=>u});var a=n(428),c=n(6989),r=n.n(c),i=n(5736),s=n(2086);const __=i.__,o="SET_PURCHASES_IS_FETCHING",l="FETCH_PURCHASES",u="SET_PURCHASES",p="SET_AVAILABLE_LICENSES_IS_FETCHING",d="SET_AVAILABLE_LICENSES",m="SET_IS_FETCHING_PRODUCT",g="SET_PRODUCT",h="SET_PRODUCT_REQUEST_ERROR",v="SET_PRODUCT_STATUS",f="SET_CHAT_AVAILABILITY_IS_FETCHING",k="SET_CHAT_AVAILABILITY",y="SET_CHAT_AUTHENTICATION_IS_FETCHING",E="SET_CHAT_AUTHENTICATION",w="SET_PRODUCT_DATA_IS_FETCHING",b="SET_PRODUCT_DATA",j="SET_STATS_COUNTS_IS_FETCHING",C="SET_STATS_COUNTS",_="SET_GLOBAL_NOTICE",Z="CLEAN_GLOBAL_NOTICE",N="SET_PRODUCT_STATS",S="SET_IS_FETCHING_PRODUCT_STATS",P=e=>({type:g,product:e}),R=(e,t)=>({type:h,productId:e,error:t}),x=(e,t)=>({type:"SET_GLOBAL_NOTICE",message:e,options:t});function A(e,t){return{type:m,productId:e,isFetching:t}}function z(e,t,n){let{select:c,dispatch:o,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 o(R(e,n)),o(x(t,{status:"error",isDismissible:!0})),void u(n)}const p=t.activate?"POST":"DELETE";return o(A(e,!0)),r()({path:`${s.Jk}/${e}`,method:p}).then((t=>{o(A(e,!1)),o(P(t)),l.dispatch(a.t).refreshConnectedPlugins(),n(t?.status)})).catch((t=>{const{name:n}=c.getProduct(e),a=(0,i.sprintf)(
+// translators: %$1s: Jetpack Product name
+__("Failed to activate %1$s. Please try again","jetpack-my-jetpack"),n);o(A(e,!1)),o(R(e,t)),o(x(a,{status:"error",isDismissible:!0})),u(t)}))}))}const I={setProduct:P,activateProduct:e=>async t=>await z(e,{activate:!0},t),deactivateStandalonePluginForProduct:e=>async t=>await z(e,{activate:!1},t),installStandalonePluginForProduct:e=>async t=>{const{select:n,dispatch:c,registry:o}=t;return await new Promise(((t,l)=>{if(!n.isValidProduct(e)){const t=__("Invalid product name","jetpack-my-jetpack"),n=new Error(t);return c(R(e,n)),c(x(t,{status:"error",isDismissible:!0})),void l(n)}return c(A(e,!0)),r()({path:`${s.Jk}/${e}/install-standalone`,method:"POST"}).then((n=>{c(A(e,!1)),c(P(n)),o.dispatch(a.t).refreshConnectedPlugins(),t(n?.standalone_plugin_info)})).catch((t=>{const{name:a}=n.getProduct(e),r=(0,i.sprintf)(
+// translators: %$1s: Jetpack Product name; %$2s: Original error message
+__("Failed to install standalone plugin for %1$s: %2$s. Please try again","jetpack-my-jetpack"),a,t.message);c(A(e,!1)),c(R(e,t)),c(x(r,{status:"error",isDismissible:!0})),l(t)}))}))},setIsFetchingProduct:A,setRequestProductError:R,setProductStatus:(e,t)=>({type:v,productId:e,status:t})},L={setPurchasesIsFetching:e=>({type:o,isFetching:e}),setChatAvailabilityIsFetching:e=>({type:f,isFetching:e}),setChatAuthenticationIsFetching:e=>({type:y,isFetching:e}),fetchPurchases:()=>({type:l}),setPurchases:e=>({type:u,purchases:e}),setChatAvailability:e=>({type:k,chatAvailability:e}),setChatAuthentication:e=>({type:E,chatAuthentication:e}),setProductDataIsFetching:e=>({type:w,isFetching:e}),setProductData:e=>({type:b,productData:e}),setAvailableLicensesIsFetching:e=>({type:p,isFetching:e}),fetchAvailableLicenses:()=>({type:"FETCH_AVAILABLE_LICENSES"}),setAvailableLicenses:e=>({type:d,availableLicenses:e}),setProductStats:(e,t)=>({type:N,productId:e,stats:t}),setIsFetchingProductStats:(e,t)=>({type:S,productId:e,isFetching:t}),setStatsCounts:e=>({type:C,statsCounts:e}),setStatsCountsIsFetching:e=>({type:j,isFetching:e}),...{setGlobalNotice:x,cleanGlobalNotice:()=>({type:"CLEAN_GLOBAL_NOTICE"})},...I}},2086:(e,t,n)=>{"use strict";n.d(t,{Hq:()=>s,Jk:()=>r,LQ:()=>c,Vx:()=>d,dS:()=>i,iB:()=>l,n2:()=>p,rs:()=>u,xD:()=>o});const a="my-jetpack/v1",c=`${a}/site/purchases`,r=`${a}/site/products`,i=`${a}/site/product-data`,s=`${a}/chat/availability`,o=`${a}/chat/authentication`,l=["scan"],u="videopress",p="videopress/v1/stats/featured",d=e=>`jetpack/v4/stats-app/sites/${e}/stats/highlights`},9462:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var a=n(6989),c=n.n(a),r=n(9274),i=n(2086);const s={[r.ny]:function(){return new Promise(((e,t)=>{c()({path:i.LQ}).then(e).catch(t)}))}}},925:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9818),c=n(9274);const r=(0,a.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 c.vv:{const{productId:n,isFetching:a}=t;return{...e,isFetching:{...e.isFetching,[n]:a},errors:{...e.errors,[n]:a?void 0:e.errors[n]}}}case c.dq:{const{productId:n,status:a}=t;return{...e,items:{...e.items,[n]:{...e.items[n],status:a}}}}case c.dI:{const{product:n}=t,{slug:a}=n;return{...e,items:{...e.items,[a]:n}}}case c.dE:{const{productId:n,error:a}=t;return{...e,errors:{...e.errors,[n]:a}}}default:return e}},productData:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case c.qp:return{...e,isFetching:t.isFetching};case c.MG:return{...e,items:t?.productData||{}};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 c.RT:return{...e,isFetching:t.isFetching};case c.z8:return{...e,items:t?.purchases||[]};default:return e}},chatAvailability:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isFetching:!1,isAvailable:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case c.IF:return{...e,isFetching:t.isFetching};case c.kk:return{...e,isAvailable:t?.chatAvailability?.is_available};default:return e}},chatAuthentication:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isFetching:!1,jwt:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case c.cL:return{...e,isFetching:t.isFetching};case c.N:return{...e,jwt:t?.chatAuthentication?.user?.jwt};default:return e}},availableLicenses:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case c.GH:return{...e,isFetching:t.isFetching};case c.Np:return{...e,items:t?.availableLicenses||[]};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 c.d1:{const{message:n,options:a}=t;return{...e,global:{message:n,options:a}}}case c.fE:return{...e,global:{}};default:return e}},plugins:function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}},stats:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case c.SK:{const{productId:n,isFetching:a}=t;return{...e,isFetching:{...e.isFetching,[n]:a}}}case c.JU:{const{productId:n,stats:a}=t;return{...e,items:{...e.items,[n]:a}}}default:return e}},statsCounts:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case c.$v:return{...e,isFetching:t.isFetching};case c.G6:return{...e,data:t?.statsCounts||{}};default:return e}}})},9844:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var a=n(4743),c=n(428),r=n(6989),i=n.n(r),s=n(5736),o=n(2307),l=n(2086),u=n(6484);const __=s.__,p={...{getProduct:{isFulfilled:(e,t)=>(e?.products?.items||{}).hasOwnProperty(t)&&!l.iB.includes(t),fulfill:e=>async t=>{let{dispatch:n}=t;try{n.setIsFetchingProduct(e,!0);const t=await i()({path:`${l.Jk}/${e}`});return n.setProduct(t),n.setIsFetchingProduct(e,!1),Promise.resolve()}catch(t){if(n.setIsFetchingProduct(e,!1),t?.code&&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 i()({path:l.LQ})),t.setPurchasesIsFetching(!1)}catch(e){t.setPurchasesIsFetching(!1),"not_connected"!==e.code&&t.setGlobalNotice(__("There was an error fetching your purchases information. Check your site connectivity and try again.","jetpack-my-jetpack"),{status:"error"})}},getChatAvailability:()=>async e=>{let{dispatch:t}=e;t.setChatAvailabilityIsFetching(!0);try{t.setChatAvailability(await i()({path:l.Hq})),t.setChatAvailabilityIsFetching(!1)}catch(e){t.setChatAvailabilityIsFetching(!1)}},getChatAuthentication:()=>async e=>{let{dispatch:t}=e;t.setChatAuthenticationIsFetching(!0);try{t.setChatAuthentication(await i()({path:l.xD})),t.setChatAuthenticationIsFetching(!1)}catch(e){t.setChatAuthenticationIsFetching(!1)}},getAvailableLicenses:()=>async e=>{let{dispatch:t}=e;t.setAvailableLicensesIsFetching(!0);try{const{apiRoot:e,apiNonce:n}=window?.myJetpackRest||{};a.ZP.setApiRoot(e),a.ZP.setApiNonce(n);const c=await a.ZP.getUserLicenses();c&&c.items?t.setAvailableLicenses(c.items.filter((e=>{let{attached_at:t,revoked_at:n}=e;return null===t&&null===n}))):t.setAvailableLicenses([])}catch(e){t.setAvailableLicenses([])}finally{t.setAvailableLicensesIsFetching(!1)}},getProductData:()=>async e=>{let{dispatch:t}=e;t.setProductDataIsFetching(!0);try{t.setProductData(await i()({path:l.dS})),t.setProductDataIsFetching(!1)}catch(e){t.setProductDataIsFetching(!1)}},getStatsCounts:()=>async e=>{const{dispatch:t,registry:n}=e;t.setStatsCountsIsFetching(!0);const a=n.select(c.t).getBlogId();try{t.setStatsCounts(await i()({path:(0,l.Vx)(a)})),t.setStatsCountsIsFetching(!1)}catch(e){t.setStatsCountsIsFetching(!1)}}},getProductStats:{isFulfilled:(e,t)=>e.stats?.items?.hasOwnProperty(t)||!1,fulfill:e=>async t=>{let{dispatch:n,select:a}=t;const{status:c}=a.getProduct(e);if(c!==o.N.ACTIVE)return n.setProductStats(e,null),Promise.resolve();try{n.setIsFetchingProductStats(e,!0);const t=await(0,u.Z)(e);return n.setProductStats(e,t),n.setIsFetchingProductStats(e,!1),Promise.resolve()}catch(t){if(n.setProductStats(e,null),n.setIsFetchingProductStats(e,!1),t?.code&&t?.message)return Promise.reject(t);throw new Error(t)}}}}},6896:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>s});var a=n(2307),c=n(6782);const r=e=>e.products?.items||{},i=e=>Object.keys(r(e)),s={...{getProducts:r,getProductNames:i,getProduct:(e,t)=>{const n=r(e)?.[t]||{},a=(0,c.N)(n,!0);return a.standalonePluginInfo=(0,c.N)(a.standalonePluginInfo||{},!0),a.pricingForUi=(0,c.N)(a.pricingForUi||{},!0),a.pricingForUi.introductoryOffer=a.pricingForUi.isIntroductoryOffer?(0,c.N)(a.pricingForUi.introductoryOffer,!0):null,a.pricingForUi?.tiers&&(a.pricingForUi.tiers=(0,c.N)(a.pricingForUi.tiers,!0),a.pricingForUi.tiers=Object.keys(a.pricingForUi.tiers).reduce(((e,t)=>{const n=(0,c.N)(a.pricingForUi.tiers[t],!0)||{};return e[t]={...n,introductoryOffer:n?.isIntroductoryOffer?(0,c.N)(n?.introductoryOffer,!0):null},e}),{})),a.features=a.features||[],a.supportedProducts=a.supportedProducts||[],a.pricingForUi.fullPricePerMonth="year"===a.pricingForUi.productTerm?Math.ceil(a.pricingForUi.fullPrice/12*100)/100:a.pricingForUi.fullPrice,a.pricingForUi.discountPricePerMonth="year"===a.pricingForUi.productTerm?Math.ceil(a.pricingForUi.discountPrice/12*100)/100:a.pricingForUi.discountPrice,a},isValidProduct:(e,t)=>i(e).includes(t),isFetching:(e,t)=>e.products?.isFetching?.[t]||!1,getProductsThatRequiresUserConnection:e=>{const t=r(e);return Object.keys(t).reduce(((e,n)=>{const c=t[n];return c?.requires_user_connection&&(c?.status===a.N.ACTIVE||c?.status===a.N.ERROR)&&e.push(c?.name),e}),[])}},getPurchases:e=>e.purchases?.items||[],isRequestingPurchases:e=>e.purchases?.isFetching||!1,getChatAvailability:e=>e.chatAvailability.isAvailable,isRequestingChatAvailability:e=>e.chatAvailability.isFetching,getChatAuthentication:e=>e.chatAuthentication.jwt,isRequestingChatAuthentication:e=>e.chatAuthentication.isFetching,getProductData:e=>e.productData?.items||{},isFetchingProductData:e=>e.productData?.isFetching||!1,getAvailableLicenses:e=>e.availableLicenses?.items||[],isFetchingAvailableLicenses:e=>e.availableLicenses?.isFetching||!1,getGlobalNotice:e=>e.notices?.global,...{hasStandalonePluginInstalled:e=>Object.values(e.plugins).filter((e=>["jetpack-backup","jetpack-boost","jetpack-protect","jetpack-search","jetpack-social","jetpack-videopress"].indexOf(e.TextDomain)>=0)).length>0},...{getProductStats:(e,t)=>e.stats?.items?.[t],isFetchingProductStats:(e,t)=>e.stats?.isFetching?.[t]||!1},...{getStatsCounts:e=>e.statsCounts?.data,isFetchingStatsCounts:e=>e.statsCounts?.isFetching||!1}}},6484:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(2086),c=n(667);const r=async e=>e===a.rs?(0,c.Z)():null},667:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(6989),c=n.n(a),r=n(2086);const i=async()=>c()({path:r.n2})},1214:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(9818);class c{static store=null;static mayBeInit(e,t){null===c.store&&(c.store=(0,a.createReduxStore)(e,t),(0,a.register)(c.store))}}const r=c},7493:(e,t,n)=>{"use strict";n.d(t,{N:()=>u,t:()=>l});var a=n(9274),c=n(9462),r=n(925),i=n(9844),s=n(6896),o=n(1214);const l="my-jetpack";function u(){o.Z.mayBeInit(l,{__experimentalUseThunks:!0,reducer:r.Z,actions:a.ZP,selectors:s.ZP,resolvers:i.Z,controls:c.Z,initialState:window.myJetpackInitialState||{}})}},8295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(6895),c=n(8565);function r(){const e=window?.myJetpackInitialState?.siteSuffix;return(0,a.Z)(c.w6,{site:e})}},7258:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var a=n(6895),c=n(8565);function r(){const e=window?.myJetpackInitialState?.siteSuffix,t=window?.myJetpackInitialState?.myJetpackUrl?`redirect_to=${window?.myJetpackInitialState?.myJetpackUrl}`:null;return(0,a.Z)(c.f6,{site:e,query:t})}},6986:(e,t,n)=>{"use strict";function a(e){let{partner_slug:t}=e;return!!t&&"goldenticket"===t}function c(e){return!!Array.isArray(e)&&e.filter((e=>a(e))).length>0}n.d(t,{h:()=>a,o:()=>c})},6782:(e,t,n)=>{"use strict";function a(e){return e.replace(/([-_][a-z])/gi,(e=>e.toUpperCase().replace("_","")))}function c(){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)&&-1!==e.indexOf("_")&&(n[a(e)]=n[e],t&&delete n[e]);return n}n.d(t,{N:()=>c})},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"},4403:(e,t,n)=>{"use strict";e.exports=n.p+"images/wordpress-1fc3e0ba6c52e9707900.svg"},8489:(e,t,n)=>{"use strict";e.exports=n.p+"images/cloud-81ac85ba680343200f54.svg"},3815:(e,t,n)=>{"use strict";e.exports=n.p+"images/empty-avatar-fea23feddfa99b07c2e8.svg"},9182:(e,t,n)=>{"use strict";e.exports=n.p+"images/jetpack-9de1caef5eb5c22da5d6.svg"},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"},1488:(e,t,n)=>{"use strict";e.exports=n.p+"images/jetpack-ai-29e60474d5890cbb6889.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},6989:e=>{"use strict";e.exports=window.wp.apiFetch},5609:e=>{"use strict";e.exports=window.wp.components},4333:e=>{"use strict";e.exports=window.wp.compose},9818:e=>{"use strict";e.exports=window.wp.data},9771:e=>{"use strict";e.exports=window.wp.date},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},2674:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>l});var a=n(9307),c=n(5736),r=n(5844),i=n(9196),s=n(9430);const __=c.__,o=e=>{const{productId:t,siteRawUrl:n}=e,c=`https://cloud.jetpack.com/landing/${n}`,r=(0,s.F)(t),o={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,a.createInterpolateElement)(__("You can see your backups and restore your site on cloud.jetpack.com. If you ever lose access to your site, you can restore it there.","jetpack-my-jetpack"),{a:i.createElement("a",{href:c})})},jetpack_complete:{title:__("Jetpack Complete is active!","jetpack-my-jetpack"),text:(0,a.createInterpolateElement)(__("You can see your backups, security scans, and restore your site on cloud.jetpack.com. If you ever lose access to your site, you can restore it there.","jetpack-my-jetpack"),{a:i.createElement("a",{href:c})})},jetpack_scan:{title:__("Jetpack Scan is active!","jetpack-my-jetpack"),text:(0,a.createInterpolateElement)(__("You can see your security scans on cloud.jetpack.com.","jetpack-my-jetpack"),{a:i.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,a.createInterpolateElement)(__("You can see your backups, security scans, and restore your site on cloud.jetpack.com. If you ever lose access to your site, you can restore it there.","jetpack-my-jetpack"),{a:i.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 i.createElement("div",{className:"jp-license-activation-screen-success-info--product-details"},i.createElement("h1",null,o[r].title," ",String.fromCodePoint(127881)),i.createElement("p",null,o[r].text))};o.propTypes={dashboardUrl:r.string,productId:r.number};const l=o},9430:(e,t,n)=>{"use strict";n.d(t,{F:()=>c});const a={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 c(e){return Object.keys(a).find((t=>a[t].includes(e)))||"default"}}},t={};function n(a){var c=t[a];if(void 0!==c)return c.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,n),r.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 a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},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 a=t.getElementsByTagName("script");a.length&&(e=a[a.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(8275),t=n(9307),a=n(9196),c=n.n(a),r=n(6417),i=n(9997),s=n(1899),o=n(17),l=n(8966),u=n(8093),p=n(673),d=n(7493);n(5878);function m(){const e=(0,r.TH)();return(0,a.useEffect)((()=>window.scrollTo(0,0)),[e]),null}(0,d.N)();const g=()=>c().createElement(e.ZP,null,c().createElement(i.UT,null,c().createElement(m,null),c().createElement(r.Z5,null,c().createElement(r.AW,{path:"/",element:c().createElement(l.Z,null)}),c().createElement(r.AW,{path:"/connection",element:c().createElement(o.Z,null)}),c().createElement(r.AW,{path:"/add-akismet",element:c().createElement(u.q,null)}),c().createElement(r.AW,{path:"/add-anti-spam",element:c().createElement(r.Fg,{replace:!0,to:"/add-akismet"})}),c().createElement(r.AW,{path:"/add-backup",element:c().createElement(u.qA,null)}),c().createElement(r.AW,{path:"/add-boost",element:c().createElement(u.WJ,null)}),c().createElement(r.AW,{path:"/add-crm",element:c().createElement(u.B$,null)}),c().createElement(r.AW,{path:"/add-jetpack-ai",element:c().createElement(u.sI,null)}),c().createElement(r.AW,{path:"/add-extras",element:c().createElement(u.Yi,null)}),c().createElement(r.AW,{path:"/add-protect",element:c().createElement(u.jO,null)}),c().createElement(r.AW,{path:"/add-scan",element:c().createElement(u.Q5,null)}),c().createElement(r.AW,{path:"/add-social",element:c().createElement(u.y$,null)}),c().createElement(r.AW,{path:"/add-search",element:c().createElement(u.uw,null)}),c().createElement(r.AW,{path:"/add-videopress",element:c().createElement(u.Jw,null)}),c().createElement(r.AW,{path:"/add-stats",element:c().createElement(r.Fg,{replace:!0,to:"/connection"})}),window?.myJetpackInitialState?.loadAddLicenseScreen&&c().createElement(r.AW,{path:"/add-license",element:c().createElement(s.Z,null)}),c().createElement(r.AW,{path:"/redeem-token",element:c().createElement(p.Z,null)}))));!function(){const e=document.getElementById("my-jetpack-container");null!==e&&t.createRoot(e).render(c().createElement(g,null))}()})()})();
\ No newline at end of file
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js.LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js.LICENSE.txt
new file mode 100644
index 00000000..f599365f
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js.LICENSE.txt
@@ -0,0 +1,46 @@
+/*
+ * 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
+*/
+
+/**
+ * @remix-run/router v1.2.1
+ *
+ * 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 DOM v6.6.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.6.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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.rtl.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.rtl.css
new file mode 100644
index 00000000..77dcc513
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.rtl.css
@@ -0,0 +1 @@
+#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 .jp-dashboard-footer__jetpack-symbol{height:16px}#wpbody-content>.notice{display:none}#wpwrap{background-color:var(--jp-white-off)}.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.51px;border-radius:var(--jp-border-radius);font-weight:600;justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo{height:calc(var(--spacing-base)*5);padding:var(--spacing-base);width:calc(var(--spacing-base)*5)}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo>svg:first-child{margin:0;padding:0}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo.Na39I683LAaSA99REg14{height:calc(var(--spacing-base)*4);min-width:calc(var(--spacing-base)*4);padding:calc(var(--spacing-base)/2);width:calc(var(--spacing-base)*4)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF:not(.tuBt2DLqimiImoqVzPqo){font-size:var(--font-body);height:auto;line-height:24px;padding:var(--spacing-base) calc(var(--spacing-base)*3)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF:not(.tuBt2DLqimiImoqVzPqo).paGLQwtPEaJmtArCcmyK{padding:var(--spacing-base) calc(var(--spacing-base)*2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo){font-size:var(--font-body-extra-small);height:auto;line-height:20px;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo).paGLQwtPEaJmtArCcmyK>svg:first-child{margin-left:calc(var(--spacing-base)/2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo)>.components-spinner{height:20px}.zI5tJ_qhWE6Oe6Lk75GY.lZAo6_oGfclXOO9CC6Rd{font-weight:400}.zI5tJ_qhWE6Oe6Lk75GY.xJDOiJxTt0R_wSl8Ipz_{min-width:100%}.zI5tJ_qhWE6Oe6Lk75GY.is-primary:disabled,.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:disabled{background:var(--jp-gray);color:var(--jp-gray-20)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary{background:var(--jp-white);box-shadow:inset 0 0 0 1.51px var(--jp-black)}.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 1.5px 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 1.5px 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)}._fUXxnSp5pagKBp9gSN7 *{box-sizing:border-box}.jErCC9oKHSM15BxzFyQK{margin-bottom:0}.oVoYbwbFB6U2o90Njusk{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);border-right:6px solid var(--jp-red-50);box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);color:var(--jp-gray-80);font-size:16px;line-height:22px;margin:0;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3) calc(var(--spacing-base)*2) calc(var(--spacing-base)*3)}.oVoYbwbFB6U2o90Njusk.is-error{background-color:var(--jp-white)}.oVoYbwbFB6U2o90Njusk .components-notice__content{align-items:flex-start;display:flex;flex-direction:column;margin:0;padding:12px 4px}.oVoYbwbFB6U2o90Njusk .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.oVoYbwbFB6U2o90Njusk .components-notice__dismiss{align-self:center}.oVoYbwbFB6U2o90Njusk .components-notice__action{align-items:center;background:#000;border-radius:var(--jp-border-radius);color:var(--jp-white);cursor:pointer;font-size:16px;font-weight:600;height:auto;justify-content:center;letter-spacing:-.01em;line-height:24px;margin-right:calc(var(--spacing-base)*2 + 24px);margin-top:24px;padding:8px 24px;text-decoration:none}.oVoYbwbFB6U2o90Njusk.Snc8NEmDelsbhlH4285s .components-notice__action{margin-right:0;margin-top:0;white-space:nowrap}.oVoYbwbFB6U2o90Njusk.Snc8NEmDelsbhlH4285s .components-notice__content{align-items:center;flex-direction:row}.wBVXH4OTNwLHPRpN4nsq{display:flex;flex-grow:1;margin-left:var(--spacing-base)}.wBVXH4OTNwLHPRpN4nsq>svg{fill:var(--jp-red-60);align-self:flex-start;flex-shrink:0;margin-left:calc(var(--spacing-base)*2)}.wBVXH4OTNwLHPRpN4nsq>svg.F1qvEnFfHs5nz3zFZUOV{fill:none}.UyzOAKNwoDF9DW_qjLii{margin-bottom:-1.5rem}.urouayitSUT8zW0V3p_0{margin-bottom:0}.iXXJlk08gFDeCvsTTlNQ{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);border-right:6px solid var(--jp-red-50);box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);box-sizing:border-box;color:var(--jp-gray-80);font-size:16px;line-height:22px;margin:0;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3) calc(var(--spacing-base)*2) calc(var(--spacing-base)*3)}.iXXJlk08gFDeCvsTTlNQ.is-error{background-color:var(--jp-white)}.iXXJlk08gFDeCvsTTlNQ .components-notice__content{align-items:flex-start;display:flex;flex-direction:column;margin:0;padding:12px 4px}.iXXJlk08gFDeCvsTTlNQ .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.iXXJlk08gFDeCvsTTlNQ .components-notice__dismiss{align-self:center}.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:active,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:hover,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:visited{align-items:center;background:#000;border-radius:var(--jp-border-radius);color:var(--jp-white);cursor:pointer;font-size:16px;font-weight:600;justify-content:center;letter-spacing:-.01em;line-height:24px;margin-right:calc(var(--spacing-base)*2 + 24px);margin-top:24px;padding:8px 24px;text-decoration:none}.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:active,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:hover,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:visited{margin-right:0;margin-top:0;white-space:nowrap}.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .components-notice__content{align-items:center;flex-direction:row}.e6hHy8BZ7ZKPSXbIC0UG{margin-bottom:25px}.jXz8LnXNzMDdtHqkG0sZ{display:flex;flex-grow:1;margin-left:var(--spacing-base)}.jXz8LnXNzMDdtHqkG0sZ>svg{align-self:flex-start;flex-shrink:0}.jXz8LnXNzMDdtHqkG0sZ .jp-components-spinner,.jXz8LnXNzMDdtHqkG0sZ>svg{margin-left:calc(var(--spacing-base)*2)}@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:var(--jp-black);display:flex;flex-wrap:wrap;font-size:var(--font-body-extra-small);line-height:1.333;max-width:1128px;width:100%}.jp-dashboard-footer a{text-decoration:none}.jp-dashboard-footer a:any-link,.jp-dashboard-footer a[role=button]{color:inherit}.jp-dashboard-footer a:hover{text-decoration:underline;text-decoration-thickness:1.5px}.jp-dashboard-footer a:focus{border-radius:2px;box-shadow:none;outline:1.5px solid currentColor;outline-offset:3px}.jp-dashboard-footer.is-sm>ul{gap:.125rem}.jp-dashboard-footer.is-md,.jp-dashboard-footer.is-sm>ul{align-items:flex-start;flex-direction:column}.jp-dashboard-footer>ul{align-items:center;display:flex;flex-wrap:wrap;gap:1rem;list-style:none;margin:0;padding:0;width:100%}.jp-dashboard-footer>ul>li{margin-bottom:0}.jp-dashboard-footer>ul>li>a{align-items:center;display:flex;gap:.25rem;min-height:44px}.jp-dashboard-footer__jp-item{font-weight:600;padding-inline-end:1rem}.jp-dashboard-footer.is-sm .jp-dashboard-footer__jp-item{padding-bottom:1rem}.jp-dashboard-footer.is-lg .jp-dashboard-footer__a8c-item{margin-inline-start:auto}.jp-dashboard-footer.is-sm .jp-dashboard-footer__a8c-item{padding-top:1rem}.jp-dashboard-footer__a8c-item>a,.jp-dashboard-footer__jp-item>a{text-decoration:none}.HeJe1crc9XaWWpLvIPit .components-modal__frame{border-bottom-right-radius:4px;border-right:4px solid #e68b28;border-top-right-radius:4px;max-height:100%}.HeJe1crc9XaWWpLvIPit .components-modal__content{margin-top:0;padding:0}.HeJe1crc9XaWWpLvIPit .components-modal__header{display:none}.HeJe1crc9XaWWpLvIPit .or0JUScxkJPmNsfrxkEK .jp-idc__idc-screen{border:0}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off)}.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-weight:500}.gKZWDv5chz3_O3Syp74H,.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);line-height:32px}.gKZWDv5chz3_O3Syp74H{font-weight:600}.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-weight:400}.dso3Rh3tl3Xv1GumBktz,.mQ1UlbN9u4Mg9byO8m7v{font-size:var(--font-body-extra-small);line-height:20px}.mQ1UlbN9u4Mg9byO8m7v{font-weight:700}.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)}.mpr8_ygU8woV4bVR1xvw{align-items:center;display:flex;font-size:var(--font-title-small);font-weight:500;line-height:1.5;margin-bottom:.5rem;margin-top:0}.gwO_Q0L0jbwMARVlBezu{color:var(--jp-gray-60);font-family:SF Pro Text,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:var(--font-body-small);font-weight:400;letter-spacing:-.15px;line-height:20px;margin-right:.75rem}.qwy7CsLeEbXvaPwgC9WV{display:flex;flex-flow:row nowrap;max-width:100%;overflow-x:scroll;padding:1px;scrollbar-width:none}.qwy7CsLeEbXvaPwgC9WV::-webkit-scrollbar{display:none}.qwy7CsLeEbXvaPwgC9WV .Hrbg7DeSJs6gas9zdPDR{border-color:var(--jp-gray-5);border-radius:5px;margin-bottom:0;margin-left:1.5rem;min-width:180px;padding:1rem 1.5rem;width:100%}@media only screen and (min-width:960px){.qwy7CsLeEbXvaPwgC9WV .Hrbg7DeSJs6gas9zdPDR{min-width:220px}}.qwy7CsLeEbXvaPwgC9WV .Hrbg7DeSJs6gas9zdPDR:last-child{margin-left:0}.NFpbo5AINn6I6avKFGby{margin-bottom:1.5rem}.aoQZCG0JeyWmy2J6vVxF{font-weight:500;line-height:20px;margin-bottom:.25rem}.M6ApyXg79vuXo6GwDkbO{align-items:flex-end;display:flex;flex-wrap:wrap;font-size:36px;font-weight:400;line-height:40px}.M6ApyXg79vuXo6GwDkbO.DYHb5e6QhgXejWyo9s78{cursor:pointer}.OlInbY5YnDO06MEQHv98{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;line-height:1;margin-left:.5rem}.EtbKbd5m85w7oYT4stIs{fill:var(--jp-gray-20);color:var(--jp-gray-20);display:none;font-size:var(--font-body-small);font-weight:600;line-height:24px}@media screen and (min-width:960px){.EtbKbd5m85w7oYT4stIs{align-items:center;display:flex}}.EtbKbd5m85w7oYT4stIs.Awr7zl75sfAsFPHK9kDG{fill:var(--jp-red-50);color:var(--jp-red-50)}.EtbKbd5m85w7oYT4stIs.QFSZbIKFdWO3HEPBZyhc{fill:var(--jp-green-50);color:var(--jp-green-50)}.GgJAnS4gaEEGmRCP5n8y{align-content:flex-end;display:flex}.mjiNtwdbKpfo9edGVes4{margin-left:2px}.pAt4v_KG9Ir19wNcEtEj{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:calc(var(--spacing-base)*2.5);min-height:28px;width:100%}.OpMBda4vebhRbW8Fm6YC{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,0 0 40px 0 rgba(0,0,0,.08);display:flex;flex-direction:column;height:100%;padding:calc(var(--spacing-base)*3)}.OpMBda4vebhRbW8Fm6YC.BghJAx9hSagUdHWOUaYE{background:none;background-color:var(--jp-white-off);color:var(--jp-black-80);text-decoration:none}.OpMBda4vebhRbW8Fm6YC.BghJAx9hSagUdHWOUaYE:focus{background-color:var(--jp-white);box-shadow:0 0 0 1.5px var(--jp-black);outline:3px solid transparent}.OpMBda4vebhRbW8Fm6YC.IWsEW5nnNWUqqcT3K5L1{box-shadow:0 0 0 1.5px var(--jp-red-60)}.r3UCwgwCthua6lDCvIBI{align-items:center;display:flex;gap:var(--spacing-base);justify-content:space-between;margin-bottom:var(--spacing-base);width:100%}.r3UCwgwCthua6lDCvIBI h3{font-weight:700}.vpluqUMgmwx9_f8wCVIn{align-items:center;display:flex;flex-wrap:wrap-reverse;gap:var(--spacing-base);height:100%}.gmPKCDKZcfQt9WieTyKS{flex-grow:1}.fDBaV7I4yUO6w5AWVEtr{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:calc(var(--spacing-base)*2);min-height:28px;width:100%}.f5VJYwuJmjxH8PVxEbbv{align-items:center;display:flex;height:28px;white-space:nowrap}.f5VJYwuJmjxH8PVxEbbv:before{border-radius:50%;content:"";display:inline-block;height:8px;margin-left:var(--spacing-base);width:8px}.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}}.g4lyov8aMDggdD4yOi1p{align-items:baseline;display:flex;margin-top:calc(var(--spacing-base)/2)}.g4lyov8aMDggdD4yOi1p .Ys5ScZ_dYn2O2AzDE5Yi{font-size:32px;font-weight:400;line-height:36px;margin-left:var(--spacing-base)}.sUNg_b7XteVXOrpHAkJg :last-child{margin-top:4px}.cF6QAJf1vXXAMuutXPcq{align-items:baseline;display:flex}.cF6QAJf1vXXAMuutXPcq.coY634LconQ7gzDDNJeu{fill:var(--jp-gray-10);color:var(--jp-gray-10)}.cF6QAJf1vXXAMuutXPcq.kyqpwKaL2FyQ8CtxJQ0f{fill:var(--jp-green-50);color:var(--jp-green-50)}.cF6QAJf1vXXAMuutXPcq.aXf37lEOcjpNV8ImLaYK{fill:var(--jp-red-40);color:var(--jp-red-40)}.cF6QAJf1vXXAMuutXPcq .OyGdoGzsQ48VaVVR99_H{position:relative;right:2px;top:2px}.cF6QAJf1vXXAMuutXPcq .cKLicfMCaDSGPlX222jF{font-size:14px;font-weight:600;line-height:24px}.wm7Alh6CwbsWkVSODgI2{margin-top:calc(var(--spacing-base)/2)}.qpN923qyxjI06NCgFC8j>li{margin-bottom:0}@keyframes R2i0K45dEF157drbVRPI{0%{opacity:.6}50%{opacity:1}to{opacity:.6}}.NisihrgiIKl_knpYJtfg{animation:R2i0K45dEF157drbVRPI 1.5s infinite;background-color:var(--jp-gray);height:100%;width:100%}.cAbGtJDGgLubucBnz7vM{background-color:var(--jp-white)}.wiobThfXJCuhGNrbFIT6 a,.wiobThfXJCuhGNrbFIT6 a:active,.wiobThfXJCuhGNrbFIT6 a:hover{color:var(--jp-black)}.VgAxgahF9bC2M__FiIgV{display:flex;margin-bottom:calc(var(--spacing-base)*3)}.dbRwkMLqcMF67njPoAF7{margin-left:8px}.Doju0RxvvN9JS12mf489{line-height:calc(var(--spacing-base)*3);margin:0 0 var(--spacing-base) 0}.yWUvvF4WJLNDSpMgBMfm{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.ka1fVHj2HOkHjhdoEFOZ{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.ka1fVHj2HOkHjhdoEFOZ{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.ka1fVHj2HOkHjhdoEFOZ{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.JMOO4Y_9yhTO9lwLnRUx{grid-column-end:span 1}.PFDPAqk51qox_ChLqJwm{grid-column-end:span 2}.ault0jHVfWpShqOGooIP{grid-column-end:span 3}.GqpvdRzmzPJELtSm4FEN{grid-column-end:span 4}@media(min-width:600px){.Ym4_YneEGD_iZD6W1C2o{grid-column-end:span 1}.NbvHnnDtWw8n9BEUQ0Oy{grid-column-end:span 2}.ElMT7rhxe5ZJKO41MnhW{grid-column-end:span 3}.yKjnqjibn_wW_1tWWt5Q{grid-column-end:span 4}.Pb30lOcQFpzUX57GwflS{grid-column-end:span 5}.pC1wxc_R8y4pNILHsiiY{grid-column-end:span 6}.pChscSCnudQoWGjMFKI_{grid-column-end:span 7}.qw1H2gAgF3lDCI2Tbkmb{grid-column-end:span 8}}@media(min-width:960px){.VzcA_rrxBK3g4ozA0oD9{grid-column-end:span 1}.pNAa7O2adRZD8Slgk9iR{grid-column-end:span 2}.tlIMLlipexblj8CeOx4B{grid-column-end:span 3}.Dvt0u5l2Rr1BhBmvYAzl{grid-column-end:span 4}.BiUsgNTc0tyc7tC5jnzE{grid-column-end:span 5}.ulJXAsj7G2ROJ1g3_s28{grid-column-end:span 6}.HsoVlyVLsXYClx9Atox0{grid-column-end:span 7}.oXxjRQNNj2cfIpFBqC1W{grid-column-end:span 8}.qXgUn4Adg9xE_JnbuDio{grid-column-end:span 9}.xMpqTLiLfYFEJiRPQQQq{grid-column-end:span 10}.IiGo3Sz2FDZN7_eGElwA{grid-column-end:span 11}.Om8BNCjfgqQ_wmPQjfOY{grid-column-end:span 12}}@media(max-width:960px){.t10ZWzP7ADjJnR4tqxRS{display:none}}@media(max-width:600px){.eOUlZG8Pelh_Xj0aSoHG{display:none}}.l546LrwBEePz434NFK5Q{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}.l546LrwBEePz434NFK5Q span{display:block}.l546LrwBEePz434NFK5Q span:last-of-type{font-weight:600}.l546LrwBEePz434NFK5Q:focus span:last-of-type,.l546LrwBEePz434NFK5Q:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.l546LrwBEePz434NFK5Q:focus:after,.l546LrwBEePz434NFK5Q:hover:after{transform:translateY(-50%) translateX(-8px)}.l546LrwBEePz434NFK5Q: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}.Q7w4fcEcemZ2nlwaYNog{fill:var(--jp-yellow-30)!important;display:inline-block!important;width:1.1em!important}.AoNQsOaTt6gSf0H6Yasz{display:inline-block;position:relative}.v13ZwGzUnecPA7Y3URAl{height:18px;pointer-events:none;position:absolute;right:-53px;top:0;width:124px}.EeDbu9pXFWTsCzfTpv2v{pointer-events:all}.BmSvoIi3rErkcrRiOi2W{color:var(--jp-black);font-size:16px;font-weight:600;line-height:19px}.BmSvoIi3rErkcrRiOi2W:not(:last-child){margin-bottom:8px}.mojRoVuWdDJo0E6LEjJw{font-size:14px;font-weight:400;line-height:24px}.golden-token-icon-tooltip .components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-left:-62px}.golden-token-icon-tooltip .components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-right:-62px}.golden-token-icon-tooltip .components-popover[data-y-axis=bottom] .components-popover__content{top:2px!important}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-6px!important}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-4px!important}.golden-token-icon-tooltip .components-popover[data-y-axis=top] .components-popover__content{bottom:10px!important}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:3px}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:4px}.golden-token-icon-tooltip .components-popover__content{border:1px solid var(--jp-gray);border-radius:4px;outline:none;padding:24px;white-space:normal;width:304px}.golden-token-icon-tooltip .components-button.is-link:focus:not(:disabled){box-shadow:none}.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)}.cbOwD8Y4tFjwimmtchQI.DKOBOTVmTLbh26gUH_73{fill:var(--color-mastodon)}.cbOwD8Y4tFjwimmtchQI.n5XodNsuMfMAAvqHFmbw{fill:var(--color-nextdoor)}.cbOwD8Y4tFjwimmtchQI.cL3m0xBYTYhIKI7lCqDB{fill:var(--color-instagram)}.cbOwD8Y4tFjwimmtchQI.fftumuc_lJ6v0tq4UMVR{fill:var(--color-whatsapp)}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe{align-items:center;display:flex;gap:var(--spacing-base);margin-bottom:calc(var(--spacing-base)*3)}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .VmtuLc2xRqmsO6cK8qjF{position:relative}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .MdTRfQ3eo5qZKChZlzNj{width:32px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .PbEpL02SEH9VNAlbKCfV{width:30px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .TD4AUM9gcTVAB6JHB5ZR{border-radius:50%;margin-right:-10px;position:absolute;width:32px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .yjl73qv0VWoPP8IhGreh{border-top-style:solid;border-top:2px dashed var(--jp-black);height:0;width:67px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .rq8YRaj9OyUUXJUHiUgI{border-color:var(--jp-red)}.kezuOHNvu9vdvlJ86Fwg .YZ7FNKEm9qpvQ4ZkbAz5{transform:rotate(-180deg)}.kezuOHNvu9vdvlJ86Fwg .oH9tzGE80LnB6Og69RFz{margin-bottom:var(--spacing-base)}.kezuOHNvu9vdvlJ86Fwg .oH9tzGE80LnB6Og69RFz,.kezuOHNvu9vdvlJ86Fwg .xXVEWvQllVsFGmJY8WEp{align-items:center;display:flex;gap:var(--spacing-base)}.kezuOHNvu9vdvlJ86Fwg .xXVEWvQllVsFGmJY8WEp.J0GIu2rNR7rXocQTyd8p{fill:var(--jp-red);color:var(--jp-red)}.jp-connection__manage-dialog{--spacing-base:8px;border-radius:3px;margin:auto;width:1200px}.jp-connection__manage-dialog__content{align-items:center;background:var(--jp-white-off);display:flex;flex-direction:column;justify-content:center;padding:80px;text-align:center}.jp-connection__manage-dialog__content h1{font-size:var(--font-title-large);font-weight:700;line-height:1.2;margin:0}.jp-connection__manage-dialog__large-text{font-size:1.25rem;font-weight:600;margin-bottom:calc(var(--spacing-base)*4);margin-top:calc(var(--spacing-base)*3);max-width:60%}.jp-connection__manage-dialog__actions{align-items:center;background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;box-sizing:border-box;margin:0!important;max-width:1200px!important;padding:calc(var(--spacing-base)*4) calc(var(--spacing-base)*5);position:sticky}.jp-connection__manage-dialog__link{color:var(--jp-black)}.jp-connection__manage-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__manage-dialog__link:focus{color:var(--jp-black)}.jp-connection__manage-dialog__button-wrap button{float:left}.jp-connection__manage-dialog__action-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:var(--spacing-base) auto;max-width:100%;padding:1rem 2rem;text-align:right;width:750px}.jp-connection__manage-dialog__action-card__card-headline{font-size:var(--font-body);font-weight:600;line-height:calc(var(--spacing-base)*3);text-decoration:none}.jp-connection__manage-dialog__action-card__icon{float:left}.jp-connection__manage-dialog__action-card .transfer{fill:var(--jp-black);color:var(--jp-black)}.jp-connection__manage-dialog__action-card .disconnect{fill:var(--jp-red);color:var(--jp-red)}.jp-connection__manage-dialog .components-modal__header{display:none}.jp-connection__manage-dialog .components-modal__content{margin:0;padding: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,');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,')}.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;max-width:110px}.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{--spacing-base:8px}.jp-connection__connect-screen__loading{display:none}.jp-connection__connect-screen .terms-of-service{margin-bottom:calc(var(--spacing-base)*3);margin-top:calc(var(--spacing-base)*4);max-width:360px}.jp-connection__connect-screen .terms-of-service a{text-decoration:underline}.jp-connection__connect-screen .jp-action-button{margin-top:40px}.jp-connection__connect-screen .jp-action-button--button{border-radius:4px;font-weight:600}.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:calc(var(--spacing-base)*3)}@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}}.rna{overflow:hidden}.rna .jp-connection__connect-screen-layout__left{position:relative;z-index:2}.rna .jp-connection__connect-screen-layout__left h2{font-weight:700;margin-top:0}.rna .jp-connection__connect-screen-layout__left h3{margin-top:24px}@media(min-width:600px){.rna .jp-connection__connect-screen-layout__left{padding:4rem 4rem 4rem 6rem}}@media(min-width:1080px){.rna .jp-connection__connect-screen-required-plan__pricing-card{left:calc(var(--spacing-base)*-45);position:absolute;top:calc(var(--spacing-base)*9.25)}}.rna .jp-connection__connect-screen-required-plan__pricing-card .jp-components__pricing-card{border-radius:var(--jp-border-radius-rna);max-width:100%;width:425px}.rna .jp-connection__connect-screen-required-plan__pricing-card .jp-components__pricing-card__title{margin-top:.625rem}@media(min-width:960px){.rna .jp-connection__connect-screen-required-plan__pricing-card .jp-components__pricing-card{padding:3rem}}.rna .jp-connection__connect-screen-required-plan__pricing-card .components-button{margin-bottom:0}.rna .jp-backup-dashboard-promotion ul.jp-product-promote li{margin-bottom:.75rem}.rna .jp-connection__connect-screen-layout__color-blobs{clip-path:polygon(100% 0,100% 100%,0 0,0 0);display:none;height:677px;left:0;position:absolute;top:0;width:363px;z-index:1}.rna .jp-connection__connect-screen-layout__color-blobs__blue,.rna .jp-connection__connect-screen-layout__color-blobs__green,.rna .jp-connection__connect-screen-layout__color-blobs__yellow{border-radius:50%;filter:blur(50px);position:absolute}.rna .jp-connection__connect-screen-layout__color-blobs__blue{background-color:var(--jp-blue-5);height:400px;left:-100px;top:-275px;width:400px;z-index:3}.rna .jp-connection__connect-screen-layout__color-blobs__yellow{background-color:var(--jp-yellow-5);height:250px;left:-25px;top:10px;width:250px;z-index:2}.rna .jp-connection__connect-screen-layout__color-blobs__green{background-color:var(--jp-green-5);height:300px;left:0;top:175px;width:300px;z-index:1}@media(min-width:1080px){.rna .jp-connection__connect-screen-layout__color-blobs{display:initial}}.terms-of-service{color:var(--jp-black);font-size:var(--font-body)}.terms-of-service .terms-of-service__link{color:var(--jp-green-50);text-decoration:underline;white-space:nowrap}.TcCZnGE6mad8Dvz9pCZi{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIvPjxwYXRoIGZpbGw9IiNENjM2MzkiIGQ9Ik0xMyA3aC0ydjZoMlY3Wk0xMyAxNWgtMnYyaDJ2LTJaIi8+PC9zdmc+) no-repeat 100% 0;color:var(--jp-red);line-height:25px;padding-right:25px}._mn6o2Dtm5pfFWc8_A1K{--spacing-base:8px;min-width:264px}.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%}.i_AnOR3MaQLraGvb2QU5{background-color:#f9f9f6}.YcYvLvdvWrb1EUZoVsE8{display:flex;flex-wrap:wrap;gap:calc(var(--horizontal-spacing)*2);justify-content:space-between}.uGTTsKoIOoZdYhk6uPnl{white-space:nowrap}.uGTTsKoIOoZdYhk6uPnl>span{font-size:var(--font-body-small)}.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}.p4qz2tkq0p9hxucJ6Qk2{--padding:calc(var(--spacing-base)*4);color:var(--jp-black)}.lbNDyXioOwvyvbALtCBm{--gap:calc(var(--spacing-base)*3);padding:var(--padding) 0;position:relative}.s2Lsn4kbm6BrS3DSndRB .lbNDyXioOwvyvbALtCBm{column-gap:var(--gap);display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--columns),1fr);grid-template-rows:repeat(var(--rows),minmax(min-content,max-content))}.cLaNK_XcbTGlRQ4Tp43Q{margin-top:var(--padding)}.s2Lsn4kbm6BrS3DSndRB .cLaNK_XcbTGlRQ4Tp43Q{display:contents}.cLaNK_XcbTGlRQ4Tp43Q.CYt1X0eH1icRjhtJ28jx>*{background:var(--jp-white);position:relative}.cLaNK_XcbTGlRQ4Tp43Q.CYt1X0eH1icRjhtJ28jx>:after{bottom:0;box-shadow:0 4px 24px rgba(0,0,0,.05);content:"";left:0;position:absolute;right:0;top:0;z-index:-1}.cLaNK_XcbTGlRQ4Tp43Q>:first-child{border-top-left-radius:var(--jp-border-radius);border-top-right-radius:var(--jp-border-radius);border-width:1px 1px 0}.cLaNK_XcbTGlRQ4Tp43Q>:last-child{border-bottom-left-radius:var(--jp-border-radius);border-bottom-right-radius:var(--jp-border-radius);border-width:0 1px 1px}.DAkZc1P9A3K12fjEliMg{display:flex;flex-direction:column;justify-content:space-between;padding:var(--padding)}.WUBuYABl8nymjs9NnCEL{align-items:center;display:flex;padding-bottom:calc(var(--spacing-base)*2);position:relative}.WUBuYABl8nymjs9NnCEL:not(:nth-child(2)){padding-top:calc(var(--spacing-base)*2)}.WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{background-color:var(--jp-gray);content:"";height:1px;left:var(--padding);position:absolute;right:var(--padding);top:0;z-index:5}.s2Lsn4kbm6BrS3DSndRB .WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{left:unset;right:0;width:calc(100% + var(--gap))}.s2Lsn4kbm6BrS3DSndRB .lbNDyXioOwvyvbALtCBm>:last-child .WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{width:100%}.ANtCFeb41NhA8PA3H7ZN,.WUBuYABl8nymjs9NnCEL:last-of-type{padding-bottom:var(--padding)}.Ql2gy_148yW8Vw5vhaKD{padding-left:var(--padding);padding-right:var(--padding)}.EAQrAnQEW1z1BfdY5gbC{fill:var(--jp-gray);flex-shrink:0;margin:0 var(--spacing-base)}.EAQrAnQEW1z1BfdY5gbC.JDSTlLoOC_4aUoH2oNM2{fill:var(--jp-green-40)}.EAQrAnQEW1z1BfdY5gbC.zNdQRJ1w7BvaQOYyqzHK{fill:var(--jp-red-50)}.lr7vbX95SKtoe7DarJcZ{margin-right:auto}.s2Lsn4kbm6BrS3DSndRB .lr7vbX95SKtoe7DarJcZ{margin:0 var(--spacing-base);top:1px}.WUBuYABl8nymjs9NnCEL .KRrGp2xdkeBOxLZeuQ6X{fill:var(--jp-gray-20);flex-shrink:0}.H_ZJiRVJg0LiMXPGOcmt{text-align:center;width:fit-content}.H_ZJiRVJg0LiMXPGOcmt>a{color:#000}.s2Lsn4kbm6BrS3DSndRB .H_ZJiRVJg0LiMXPGOcmt{grid-column:2;overflow:hidden;padding-left:var(--padding);padding-right:var(--padding);white-space:nowrap}.x21z_DixObRDsDaWotP1{align-items:right;display:flex;justify-content:right;margin:0 calc(var(--spacing-base)*4)}.components-popover:not(.is-without-arrow):before{border-color:var(--jp-gray)}.icon-tooltip-helper .components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-left:-62px}.icon-tooltip-helper .components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-right:-62px}.icon-tooltip-helper .components-popover[data-y-axis=bottom] .components-popover__content{top:2px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-6px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-4px!important}.icon-tooltip-helper .components-popover[data-y-axis=top] .components-popover__content{bottom:10px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:3px}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:4px}.icon-tooltip-helper .components-popover__content{border:1px solid var(--jp-gray);border-radius:4px;outline:none;padding:24px;white-space:normal;width:304px}.icon-tooltip-helper.is-wide .components-popover__content{width:440px}.icon-tooltip-wrapper{color:var(--jp-black);display:inline-block;position:relative}.icon-tooltip-wrapper .components-button.is-link:focus:not(:disabled){box-shadow:none}.icon-tooltip-helper{height:18px;pointer-events:none;position:absolute;right:-53px;top:0;width:124px}.icon-tooltip-container{pointer-events:all}.icon-tooltip-title{font-size:16px;font-weight:600;line-height:19px}.icon-tooltip-title:not(:last-child){margin-bottom:8px}.icon-tooltip-content{font-size:14px;font-weight:400;line-height:24px}.icon-tooltip-content ul{list-style-type:disc;margin:0 1rem 0 0}.icon-tooltip-content ul li:last-child{margin-bottom:0}.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)}.dovianZYLKhnbnh9I06o{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-end}.lljtQMhW7lq5tE5SDJEf{align-items:flex-start;display:flex;flex-basis:0;flex-grow:2}.lljtQMhW7lq5tE5SDJEf .NubApIV1vQCRUNprfm6b{margin-right:auto}.dhFQXpZfMwVI8vuYHnwC{align-items:flex-start;display:inline-flex;flex:0 0 auto;position:relative}.dhFQXpZfMwVI8vuYHnwC:first-child{margin-left:calc(var(--spacing-base)*2)}.dhFQXpZfMwVI8vuYHnwC.eD7hzxFmdtG_MgmBtl_k{color:var(--jp-gray-20)}.dhFQXpZfMwVI8vuYHnwC.eD7hzxFmdtG_MgmBtl_k: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%}.C64ZjjUAqJC1T2Sa7apS{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-start;margin-bottom:calc(var(--spacing-base)*3)}.UpZDGew6Ay1hPoP6eI7b{color:var(--jp-gray-40);font-size:var(--font-body-small);line-height:20px}.UpZDGew6Ay1hPoP6eI7b:after{content:""}.NubApIV1vQCRUNprfm6b{background-color:var(--jp-yellow-10);border-radius:4px;font-size:13px;font-weight:600;margin-right:var(--spacing-base);padding-left:var(--spacing-base);padding-right:var(--spacing-base)}.TDiiPbuW1Z0_05u_pvcK{font-weight:400}.VHYulMcpzbr10HWR0iSE{align-items:flex-start;border:1px solid var(--jp-black);border-color:var(--jp-gray-5);border-radius:4px;border-right-width:6px;display:flex;font-size:var(--font-body);padding:24px 18px 27px 31px}.FGpSkMCiIHQjszcV0dbn{margin-left:20px}.FGpSkMCiIHQjszcV0dbn,.KoWZcCwhW13xvkEb0QON{height:calc(var(--spacing-base)*3);width:calc(var(--spacing-base)*3)}.KoWZcCwhW13xvkEb0QON{background-color:transparent;border:none;cursor:pointer;outline:none}@media screen and (max-width:600px){.VHYulMcpzbr10HWR0iSE{box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);padding-top:68px;position:relative}.FGpSkMCiIHQjszcV0dbn{position:absolute;right:24px;top:24px}.KoWZcCwhW13xvkEb0QON{left:24px;position:absolute;top:24px}}.smrfczkC53EaFM8OJUXs{flex-grow:1}.IKYRWoPwt9xOVEx1wzNS{font-weight:600;margin-bottom:8px}.qM0qY6mPYp1MPN54A3Kg{align-items:center;display:flex;margin-top:20px}.qM0qY6mPYp1MPN54A3Kg a,.qM0qY6mPYp1MPN54A3Kg a:active,.qM0qY6mPYp1MPN54A3Kg a:focus,.qM0qY6mPYp1MPN54A3Kg a:hover{color:var(--jp-black)}.qM0qY6mPYp1MPN54A3Kg>*{margin-left:24px}.A5YkDkkXuiYgavrY6Nux{border-right-color:var(--jp-red)}.A5YkDkkXuiYgavrY6Nux .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-red)}.cT5rwuPMZzWvi5o6shMl{border-right-color:var(--jp-yellow-20)}.cT5rwuPMZzWvi5o6shMl .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-yellow-20)}.yo0O3uvNomPsYUXFCpAS{border-right-color:var(--black)}.yo0O3uvNomPsYUXFCpAS .y_IPyP1wIAOhyNaqvXJq{fill:var(--black)}.oZdDFf1jBLkzn5ICCC6x{border-right-color:var(--jp-green)}.oZdDFf1jBLkzn5ICCC6x .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-green)}.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:.5em 2em;text-align:center;width:100%}.Q6uUUQCPWS6_6nLxIn68 .YU4iBCRze09ZP3iCsdcb{margin:0}.Q6uUUQCPWS6_6nLxIn68.components-button.is-primary{height:auto;white-space:normal}.Q6uUUQCPWS6_6nLxIn68.is-secondary:hover:not(:disabled){background-color:var(--jp-black);color:var(--jp-white)}.OrQG7DjDd9Ha2Xj1Mx3L{margin-top:calc(var(--spacing-base)*2)}.Q1jaYDpa2AVfJpA29wT0{flex-grow:1;margin:0;margin-bottom:calc(var(--spacing-base)*2);padding:0}.Q1jaYDpa2AVfJpA29wT0 li{align-items:flex-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)}.sEcLfpWjo0GF7QrxD3Lt{margin-top:calc(var(--spacing-base)*2)}.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)}.gCTKfAPzJqZas7CaRbKN{margin-bottom:calc(var(--spacing-base)*4)}.demNsMJjhi7BLY7xhjU5{align-items:center;display:flex;font-size:var(--font-body);line-height:calc(var(--spacing-base)*3);margin:calc(var(--spacing-base)*2) 0;min-height:calc(var(--spacing-base)*3)}.QiUjdjJSkqh6nH7YMG5A{align-self:flex-start;height:calc(var(--spacing-base)*3);margin-left:calc(var(--spacing-base)/2);width:calc(var(--spacing-base)*3)}.Q080AHcq29J2fc68Hhk5{color:var(--jp-red)}.Q080AHcq29J2fc68Hhk5 .hYWbIwhppukXmGnsiT9H{fill:var(--jp-red)}.JjHuxWly0HI9C60gorbq{color:var(--jp-yellow-40)}.JjHuxWly0HI9C60gorbq .hYWbIwhppukXmGnsiT9H{fill:var(--jp-yellow-40)}.Cm8ZFHi3mngl4cj9Gatx{color:var(--jp-blue-40)}.Cm8ZFHi3mngl4cj9Gatx .hYWbIwhppukXmGnsiT9H{fill:var(--jp-blue-40)}.ytGBsU015p3LGwOPwFDx{color:var(--jp-green)}.ytGBsU015p3LGwOPwFDx .hYWbIwhppukXmGnsiT9H{fill:var(--jp-green)}.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,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error{max-width:500px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field .components-input-control__label.components-input-control__label.components-input-control__label,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error .components-input-control__label.components-input-control__label.components-input-control__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 select.components-select-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error input.components-text-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error select.components-select-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,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error select.components-select-control__input{border:1px solid var(--jp-red)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error{align-items:flex-start;color:var(--jp-red);display:flex;flex-direction:row;max-width:500px}.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%}.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}.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%}.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}.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}}: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-5:#f5e6b3;--jp-yellow-10:#f2cf75;--jp-orange-20:#faa754;--jp-blue-5:#ced9f2;--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-border-radius-rna:8px;--jp-menu-border-height:1px;--jp-underline-thickness:2px;--jp-modal-padding-large:32px;--jp-modal-padding:24px;--jp-modal-padding-small:16px;--jp-modal-radius:8px;--jp-button-padding:8px;--jp-button-radius:4px;--jp-gap:16px;--jp-highlight:#3858e9}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.EiaNctK1_P9pPqOeiaSI{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.ogHZg_sJCljylz3VJfsf{grid-gap:24px;display:grid;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.ogHZg_sJCljylz3VJfsf{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.ogHZg_sJCljylz3VJfsf{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.zv7eGvijKRkbPVakubHw{grid-column-end:span 1}.VoJNoiya_1ck3_kXS6_C{grid-column-end:span 2}.ecv0NO526NoTNbpALA1A{grid-column-end:span 3}.OfBdkceMzeHvRbzhqDlP{grid-column-end:span 4}@media(min-width:600px){.JLb3NpEKN8pOaWd7K1bu{grid-column-end:span 1}.fsMPGqPKE4mjMIPFwl77{grid-column-end:span 2}.DIK_zdaGAQ09eKspBJ4E{grid-column-end:span 3}.shXYpxPu3WCJsR8aOHtz{grid-column-end:span 4}.s7ElrOqG_yGd5SIfwqOR{grid-column-end:span 5}.Cxml9uzGvArAL8_RDs_p{grid-column-end:span 6}.aANxBKDGx72eDqU0iUPj{grid-column-end:span 7}.XxyzuTY3mnQcl9EGZadm{grid-column-end:span 8}}@media(min-width:960px){.Sfo4WaSNIWInJ93Abd3w{grid-column-end:span 1}.tQS7SKUGrU4THhWMysbo{grid-column-end:span 2}.I94U7mpY4h16pcOksZNF{grid-column-end:span 3}.uWMb9k77kQxBdS5MTt0s{grid-column-end:span 4}.rKwEEZQxK9s_POMg5Jss{grid-column-end:span 5}.UcPXX_s06IPCkF7ZjH3D{grid-column-end:span 6}.CrQdtiCFkRbzY6K2dFvt{grid-column-end:span 7}.rEUALOmOdUBXO0Us871z{grid-column-end:span 8}.NqXa9TlcTEviVsB53hBV{grid-column-end:span 9}.OnWVeiQiwgQ9lzdGPW66{grid-column-end:span 10}.D2PkTcy7b8u2K9QXY6VQ{grid-column-end:span 11}.EcqBhzAyxo5RDc2Y6m7K{grid-column-end:span 12}}@media(max-width:960px){.gB1mWzHOM38d80lrhBRX{display:none}}@media(max-width:600px){.KNQXLP78ejczOkour3zg{display:none}}.rBVbaVWBnBRtTMrUKZxm{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}.rBVbaVWBnBRtTMrUKZxm span{display:block}.rBVbaVWBnBRtTMrUKZxm span:last-of-type{font-weight:600}.rBVbaVWBnBRtTMrUKZxm:focus span:last-of-type,.rBVbaVWBnBRtTMrUKZxm:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.rBVbaVWBnBRtTMrUKZxm:focus:after,.rBVbaVWBnBRtTMrUKZxm:hover:after{transform:translateY(-50%) translateX(-8px)}.rBVbaVWBnBRtTMrUKZxm: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}.gfM_DIJrVbRhmKdAphIm{background:var(--jp-white);border-radius:var(--jp-modal-radius);box-shadow:0 12px 16px -.5px rgba(0,0,0,.15);height:max-content;margin:3rem auto;max-width:414px;overflow:hidden;position:relative;transition:height .25s cubic-bezier(.59,.37,.18,1.19) 0;width:90%;will-change:height}.gfM_DIJrVbRhmKdAphIm>div:first-child{padding:0}.gfM_DIJrVbRhmKdAphIm *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.gfM_DIJrVbRhmKdAphIm p{color:var(--jp-black)}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN{display:none}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh{height:614px;transition-delay:2.15s}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh h2{margin-top:0}._j4GWTmW5psCHFYh6R0x{align-self:flex-start;margin-top:var(--jp-gap)!important;padding:8px var(--jp-modal-padding-small)!important;width:100%}.saSAjv8yulVXQDoqDJEI{font-weight:500;line-height:110%;margin-bottom:8px}.O_hcdbeMivIhBn7ApDnS{line-height:140%}@media(min-width:760px){.gfM_DIJrVbRhmKdAphIm{height:740px;max-width:1360px;position:relative;width:95%}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN{display:block;position:absolute;right:64px;top:64px;z-index:99}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN clipPath,.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN path{fill:#000}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN path.FCnyb_xCK7DhJ63p6TEd{fill:#fff}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh{height:740px;transition-delay:0}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh .zfJfONxRAw0fHjXUS7LN clipPath,.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh .zfJfONxRAw0fHjXUS7LN path{fill:#fff;transition:fill 2s ease .5s}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh .zfJfONxRAw0fHjXUS7LN path.FCnyb_xCK7DhJ63p6TEd{fill:#000;transition:fill 2s ease .5s}}@keyframes OmAVpCQ270MqI4IsT9Ky{20%{transform:translateY(0) scale(1)}65%{transform:translateY(16%) scale(1.4)}to{transform:translateY(0) scale(1)}}.Qn5xayjI_jH2m1d6BEoq{border-radius:var(--jp-button-radius);display:flex;height:50%;justify-content:center;min-height:400px;overflow:hidden;position:relative;transition:height .55s cubic-bezier(.59,.37,.18,1) 0s;will-change:height}.pnwbCuWbV0PNQr1LFpRh .Qn5xayjI_jH2m1d6BEoq{height:100%;transition-delay:.65s}.pnwbCuWbV0PNQr1LFpRh .Qn5xayjI_jH2m1d6BEoq video{animation:OmAVpCQ270MqI4IsT9Ky 1.5s ease-in-out forwards}.Qn5xayjI_jH2m1d6BEoq video{height:100%;object-fit:cover;position:absolute;right:0;top:0;transform:scale(1);transition:all .85s cubic-bezier(1,0,.39,1) 0s;width:100%;will-change:transform}@media(min-width:760px){@keyframes Axe8f2LgqEBZHVcsRgY5{0%{animation-timing-function:cubic-bezier(.86,0,.07,1);right:60%;top:32px}50%{animation-timing-function:cubic-bezier(.17,.84,.44,1);bottom:32px;right:32px;top:32px;width:100%}to{right:32px;width:40%}}.Qn5xayjI_jH2m1d6BEoq{border-radius:12px;bottom:32px;display:block;height:auto;left:32px;overflow:hidden;position:absolute;right:60%;top:32px;transition-delay:0;transition:width .55s ease 0s;z-index:3}.Qn5xayjI_jH2m1d6BEoq video{height:100%;object-fit:cover;position:absolute;right:0;top:0;width:100%}.pnwbCuWbV0PNQr1LFpRh .Qn5xayjI_jH2m1d6BEoq{animation-delay:.25s;animation-duration:2s;animation-fill-mode:forwards;animation-name:Axe8f2LgqEBZHVcsRgY5;height:auto}}.iBMDoShSmqpt72YfJb36{padding:var(--jp-modal-padding)}.iBMDoShSmqpt72YfJb36 h2{font-size:clamp(1.5rem,-.7353rem + 4.7059vw,3.5rem)}.iBMDoShSmqpt72YfJb36 p{font-size:clamp(1rem,.6974rem + 1.1696vw,1.75rem)}.iBMDoShSmqpt72YfJb36 p.eQG1KKK8jjKtQyzfv573{display:none;font-size:clamp(1.25rem,1.1491rem + .3899vw,1.5rem)}@media(min-width:760px){.iBMDoShSmqpt72YfJb36{bottom:15%;display:flex;flex-direction:column;gap:64px;padding:0 0 0 var(--jp-modal-padding);position:absolute;right:64px;width:55%}.iBMDoShSmqpt72YfJb36 .l35bIyiqYJiZ6tVYvJtC{align-items:flex-start;display:flex;flex-direction:column;gap:16px;padding:0 0 0 32px}.iBMDoShSmqpt72YfJb36 .l35bIyiqYJiZ6tVYvJtC h2,.iBMDoShSmqpt72YfJb36 .l35bIyiqYJiZ6tVYvJtC p{margin:0}.iBMDoShSmqpt72YfJb36 p.eQG1KKK8jjKtQyzfv573{display:block}.iBMDoShSmqpt72YfJb36 ._j4GWTmW5psCHFYh6R0x{align-self:flex-start;padding:16px var(--jp-modal-padding-large)!important;width:auto}.pnwbCuWbV0PNQr1LFpRh .iBMDoShSmqpt72YfJb36{opacity:0;right:-20px;transition:all .55s cubic-bezier(.59,.37,.18,1) .3s}}.HQVDZ6J3x6SJNYFX5khS{background:var(--jp-white);opacity:0;position:absolute;right:0;top:100%;transition:transform .45s cubic-bezier(.59,.37,.18,1) 2s,opacity .45s linear;width:100%;will-change:transform,opacity;z-index:2}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS{opacity:1;transform:translateY(-100%);transition-delay:2s}@media(min-width:760px){.HQVDZ6J3x6SJNYFX5khS{align-items:flex-end;bottom:5%;container-type:inline-size;display:flex;flex-direction:column;gap:40px;left:32px;padding:0;right:45%;transform:translateY(0);transition-delay:0;transition:none;width:auto}.HQVDZ6J3x6SJNYFX5khS h2{width:100%}.HQVDZ6J3x6SJNYFX5khS ._j4GWTmW5psCHFYh6R0x{margin-left:var(--jp-modal-padding-large)}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS{bottom:12%;left:32px;opacity:1;right:45%;top:unset;transform:translateY(0);transition:all .45s cubic-bezier(.59,.37,.18,1) 2s,opacity .45s linear;transition-delay:2s;width:auto}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS .l35bIyiqYJiZ6tVYvJtC{padding-right:32px}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS ._j4GWTmW5psCHFYh6R0x{align-self:flex-end}}.KdvmPIjelQIFiPQGuIYf{background:var(--jp-gray-0);display:flex;flex-direction:column;gap:var(--jp-gap)}.KdvmPIjelQIFiPQGuIYf div{background-color:var(--jp-white);border:1px solid var(--jp-gray-10);border-radius:var(--jp-button-radius);box-shadow:0 0 40px 0 rgba(0,0,0,.08);flex:1;padding:var(--jp-modal-padding)}.KdvmPIjelQIFiPQGuIYf h3{font-size:24px;line-height:normal;margin:0}.KdvmPIjelQIFiPQGuIYf p{font-size:14px}@media(min-width:760px){.KdvmPIjelQIFiPQGuIYf{flex-direction:row;padding:var(--jp-modal-padding-large)}.KdvmPIjelQIFiPQGuIYf div{border:none;box-shadow:0 2px 16px rgba(0,0,0,.08),0 2px 2px rgba(0,0,0,.1)}.KdvmPIjelQIFiPQGuIYf div p{margin:8px 0}.KdvmPIjelQIFiPQGuIYf svg{margin-bottom:var(--jp-modal-padding-small)}}@container (max-width: 600px){.KdvmPIjelQIFiPQGuIYf div{padding:var(--jp-modal-padding-small)}}.jp-license-activation-screen{border-radius:4px;box-shadow:0 4px 24px 0 rgba(0,0,0,.149);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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/composer.json
new file mode 100644
index 00000000..73a97f01
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/composer.json
@@ -0,0 +1,79 @@
+{
+ "name": "automattic/jetpack-my-jetpack",
+ "description": "WP Admin page with information and configuration shared among all Jetpack stand-alone plugins",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {
+ "automattic/jetpack-admin-ui": "^0.2.23",
+ "automattic/jetpack-assets": "^1.18.13",
+ "automattic/jetpack-connection": "^1.58.2",
+ "automattic/jetpack-jitm": "^2.5.1",
+ "automattic/jetpack-licensing": "^1.8.4",
+ "automattic/jetpack-plugins-installer": "^0.2.5",
+ "automattic/jetpack-redirect": "^1.7.27",
+ "automattic/jetpack-constants": "^1.6.23"
+ },
+ "require-dev": {
+ "yoast/phpunit-polyfills": "1.1.0",
+ "automattic/jetpack-changelogger": "^3.3.11",
+ "automattic/wordbless": "@dev",
+ "automattic/jetpack-videopress": "^0.18.0"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "classmap": [
+ "src/",
+ "src/products"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "test-php": [
+ "@composer phpunit"
+ ],
+ "test-js": [
+ "pnpm run test"
+ ],
+ "test-js-watch": [
+ "Composer\\Config::disableProcessTimeout",
+ "pnpm run test --watch"
+ ],
+ "build-development": [
+ "pnpm run build"
+ ],
+ "build-production": [
+ "NODE_ENV=production pnpm run build"
+ ],
+ "watch": [
+ "Composer\\Config::disableProcessTimeout",
+ "pnpm run watch"
+ ],
+ "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy",
+ "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy"
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-my-jetpack",
+ "textdomain": "jetpack-my-jetpack",
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-my-jetpack/compare/${old}...${new}"
+ },
+ "branch-alias": {
+ "dev-trunk": "3.9.x-dev"
+ },
+ "version-constants": {
+ "::PACKAGE_VERSION": "src/class-initializer.php"
+ }
+ },
+ "config": {
+ "allow-plugins": {
+ "roots/wordpress-core-installer": true
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php
new file mode 100644
index 00000000..34fb3d1a
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php
@@ -0,0 +1,352 @@
+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' ),
+ 'edit_posts',
+ 'my-jetpack',
+ array( __CLASS__, 'admin_page' ),
+ -1
+ );
+
+ add_action( 'load-' . $page_suffix, array( __CLASS__, 'admin_init' ) );
+
+ // Sets up JITMS.
+ JITM::configure();
+
+ /**
+ * Fires after the My Jetpack package is initialized
+ *
+ * @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() {
+ // Default changed to true in 1.5.0.
+ $is_enabled = true;
+
+ /*
+ * Bail if My Jetpack is not enabled,
+ * and thus the licensing UI shouldn't be enabled either.
+ */
+ if ( ! self::should_initialize() ) {
+ $is_enabled = false;
+ }
+
+ /**
+ * 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',
+ $is_enabled
+ );
+ }
+
+ /**
+ * Callback for the load my jetpack page hook.
+ *
+ * @return void
+ */
+ public static function admin_init() {
+ add_filter( 'identity_crisis_container_id', array( static::class, 'get_idc_container_id' ) );
+ 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_scripts() {
+ Assets::register_script(
+ 'my_jetpack_main_app',
+ '../build/index.js',
+ __FILE__,
+ array(
+ 'enqueue' => true,
+ 'in_footer' => true,
+ 'textdomain' => 'jetpack-my-jetpack',
+ )
+ );
+ $modules = new Modules();
+ wp_localize_script(
+ 'my_jetpack_main_app',
+ 'myJetpackInitialState',
+ array(
+ 'products' => array(
+ 'items' => Products::get_products(),
+ ),
+ 'purchases' => array(
+ 'items' => array(),
+ ),
+ 'plugins' => Plugins_Installer::get_plugins(),
+ 'myJetpackUrl' => 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,
+ 'myJetpackFlags' => self::get_my_jetpack_flags(),
+ 'fileSystemWriteAccess' => self::has_file_system_write_access(),
+ 'loadAddLicenseScreen' => self::is_licensing_ui_enabled(),
+ 'adminUrl' => esc_url( admin_url() ),
+ 'IDCContainerID' => static::get_idc_container_id(),
+ 'userIsAdmin' => current_user_can( 'manage_options' ),
+ 'isStatsModuleActive' => $modules->is_active( 'stats' ),
+ )
+ );
+
+ wp_localize_script(
+ 'my_jetpack_main_app',
+ 'myJetpackRest',
+ array(
+ 'apiRoot' => esc_url_raw( rest_url() ),
+ 'apiNonce' => wp_create_nonce( 'wp_rest' ),
+ )
+ );
+
+ // Connection Initial State.
+ Connection_Initial_State::render_script( 'my_jetpack_main_app' );
+
+ // Required for Analytics.
+ if ( self::can_use_analytics() ) {
+ Tracking::register_tracks_functions_scripts( true );
+ }
+ }
+
+ /**
+ * Build flags for My Jetpack UI
+ *
+ * @return array
+ */
+ public static function get_my_jetpack_flags() {
+ $flags = array(
+ 'videoPressStats' => Jetpack_Constants::is_true( 'JETPACK_MY_JETPACK_VIDEOPRESS_STATS_ENABLED' ),
+ 'showJetpackStatsCard' => class_exists( 'Jetpack' ),
+ );
+
+ return $flags;
+ }
+
+ /**
+ * Echoes the admin page content.
+ *
+ * @return void
+ */
+ public static function admin_page() {
+ echo '';
+ }
+
+ /**
+ * Register the REST API routes.
+ *
+ * @return void
+ */
+ public static function register_rest_endpoints() {
+ new REST_Products();
+ new REST_Purchases();
+ new REST_Zendesk_Chat();
+ new REST_Product_Data();
+ new REST_AI();
+
+ 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;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get container IDC for the IDC screen.
+ *
+ * @return string
+ */
+ public static function get_idc_container_id() {
+ return static::IDC_CONTAINER_ID;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php
new file mode 100644
index 00000000..7e10b403
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php
@@ -0,0 +1,183 @@
+ Products\Anti_Spam::class,
+ 'backup' => Products\Backup::class,
+ 'boost' => Products\Boost::class,
+ 'crm' => Products\Crm::class,
+ 'extras' => Products\Extras::class,
+ 'jetpack-ai' => Products\Jetpack_Ai::class,
+ 'scan' => Products\Scan::class,
+ 'search' => Products\Search::class,
+ 'social' => Products\Social::class,
+ 'security' => Products\Security::class,
+ 'protect' => Products\Protect::class,
+ 'videopress' => Products\Videopress::class,
+ 'stats' => Products\Stats::class,
+ );
+
+ /**
+ * This filter allows plugin to override the Product class of a given product. The new class must be a child class of the default one declared in My Jetpack
+ *
+ * For example, a stand-alone plugin could overwrite its product class to control specific behavior of the product in the My Jetpack page after it is active without having to commit changes to the My Jetpack package:
+ *
+ * add_filter( 'my_jetpack_products_classes', function( $classes ) {
+ * $classes['my_plugin'] = 'My_Plugin'; // a class that extends the original one declared in the My Jetpack package.
+ * return $classes
+ * } );
+ *
+ * @param array $classes An array where the keys are the product slugs and the values are the class names.
+ */
+ $final_classes = apply_filters( 'my_jetpack_products_classes', $classes );
+
+ // Check that the classes are still child of the same original classes.
+ foreach ( (array) $final_classes as $slug => $final_class ) {
+ if ( $final_class === $classes[ $slug ] ) {
+ continue;
+ }
+ if ( ! class_exists( $final_class ) || ! is_subclass_of( $final_class, $classes[ $slug ] ) ) {
+ throw new \Exception( 'You can only overwrite a Product class with a child of the original class.' );
+ }
+ }
+
+ return $final_classes;
+ }
+
+ /**
+ * 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 ) {
+ $classes = self::get_products_classes();
+ if ( isset( $classes[ $product_slug ] ) ) {
+ return $classes[ $product_slug ]::get_info();
+ }
+ }
+
+ /**
+ * Get one product Class name
+ *
+ * @param string $product_slug The product slug.
+ *
+ * @return ?string
+ */
+ public static function get_product_class( $product_slug ) {
+ $classes = self::get_products_classes();
+ if ( isset( $classes[ $product_slug ] ) ) {
+ return $classes[ $product_slug ];
+ }
+ }
+
+ /**
+ * Return product slugs list.
+ *
+ * @return array Product slugs array.
+ */
+ public static function get_products_slugs() {
+ return array_keys( self::get_products_classes() );
+ }
+
+ /**
+ * 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', 'needs_purchase_or_free', '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 = array(
+ 'backup',
+ 'boost',
+ 'crm',
+ 'videopress', // we use videopress here to add the plugin action to the Jetpack plugin itself
+ );
+ foreach ( $products as $product ) {
+ $class_name = self::get_product_class( $product );
+ $class_name::extend_plugin_action_links();
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-ai.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-ai.php
new file mode 100644
index 00000000..39698107
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-ai.php
@@ -0,0 +1,90 @@
+ \WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::get_openai_jwt',
+ 'permission_callback' => function () {
+ return ( new Connection_Manager( 'jetpack' ) )->is_user_connected() && current_user_can( 'edit_posts' );
+ },
+ )
+ );
+ }
+ }
+
+ /**
+ * Check if a specific REST endpoint is registered.
+ *
+ * @param string $namespace - The namespace of the endpoint.
+ * @param string $route - The route of the endpoint.
+ * @return bool True if the endpoint is registered, false otherwise.
+ */
+ public static function is_rest_endpoint_registered( $namespace, $route ) {
+ $server = rest_get_server();
+ $routes = $server->get_routes();
+ $full_endpoint = '/' . trim( $namespace, '/' ) . $route;
+ return isset( $routes[ $full_endpoint ] );
+ }
+
+ /**
+ * Ask WPCOM for a JWT token to use for OpenAI completion.
+ */
+ public static function get_openai_jwt() {
+ $blog_id = Jetpack_Options::get_option( 'id' );
+
+ $response = Client::wpcom_json_api_request_as_user(
+ "/sites/$blog_id/jetpack-openai-query/jwt",
+ '2',
+ array(
+ 'method' => 'POST',
+ 'headers' => array( 'Content-Type' => 'application/json; charset=utf-8' ),
+ ),
+ wp_json_encode( array() ),
+ 'wpcom'
+ );
+
+ if ( is_wp_error( $response ) ) {
+ return $response;
+ }
+
+ $json = json_decode( wp_remote_retrieve_body( $response ) );
+
+ if ( ! isset( $json->token ) ) {
+ return new WP_Error( 'no-token', 'No token returned from WPCOM' );
+ }
+
+ return array(
+ 'token' => $json->token,
+ 'blog_id' => $blog_id,
+ );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-product-data.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-product-data.php
new file mode 100644
index 00000000..aa5154c4
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-product-data.php
@@ -0,0 +1,58 @@
+ \WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::get_all_product_data',
+ 'permission_callback' => __CLASS__ . '::permissions_callback',
+ )
+ );
+ }
+
+ /**
+ * Checks if the user has the correct permissions
+ */
+ public static function permissions_callback() {
+ return current_user_can( 'manage_options' );
+ }
+
+ /**
+ * Gets the product data for all products
+ *
+ * @return array|WP_Error
+ */
+ public static function get_all_product_data() {
+ $site_id = \Jetpack_Options::get_option( 'id' );
+ $wpcom_endpoint = sprintf( 'sites/%d/jetpack-product-data?locale=%2$s&force=wpcom', $site_id, get_user_locale() );
+ $api_version = '2';
+ $response = Client::wpcom_json_api_request_as_blog( $wpcom_endpoint, $api_version, array(), null, 'wpcom' );
+ $response_code = wp_remote_retrieve_response_code( $response );
+ $body = json_decode( wp_remote_retrieve_body( $response ) );
+
+ if ( is_wp_error( $response ) || empty( $response['body'] ) || 200 !== $response_code ) {
+ return new WP_Error( 'site_products_data_fetch_failed', 'Site products data fetch failed', array( 'status' => $response_code ? $response_code : 400 ) );
+ }
+
+ return rest_ensure_response( $body, 200 );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php
new file mode 100644
index 00000000..4ecb9428
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php
@@ -0,0 +1,259 @@
+ \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[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,
+ ),
+ ),
+ )
+ );
+
+ register_rest_route(
+ 'my-jetpack/v1',
+ 'site/products/(?P[a-z\-]+)/install-standalone',
+ array(
+ array(
+ 'methods' => \WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::install_standalone',
+ '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 );
+ }
+
+ /**
+ * Callback for installing the standalone plugin on a Hybrid Product.
+ *
+ * @param \WP_REST_Request $request The request object.
+ * @return \WP_REST_Response
+ */
+ public static function install_standalone( $request ) {
+ $product_slug = $request->get_param( 'product' );
+ $product = Products::get_product( $product_slug );
+ if ( ! isset( $product['class'] ) ) {
+ return new \WP_Error(
+ 'not_implemented',
+ __( 'The product class handler is not implemented', 'jetpack-my-jetpack' ),
+ array( 'status' => 501 )
+ );
+ }
+
+ /**
+ * If the product is not hybrid, there is no need to deal with a standalone plugin.
+ */
+ if ( ! is_subclass_of( $product['class'], Hybrid_Product::class ) ) {
+ return new \WP_Error(
+ 'not_hybrid',
+ __( 'This product does not have a standalone plugin to install', 'jetpack-my-jetpack' ),
+ array( 'status' => 400 )
+ );
+ }
+
+ $install_product_result = call_user_func( array( $product['class'], 'install_and_activate_standalone' ) );
+ if ( is_wp_error( $install_product_result ) ) {
+ $install_product_result->add_data( array( 'status' => 400 ) );
+ return $install_product_result;
+ }
+
+ return rest_ensure_response( Products::get_product( $product_slug ), 200 );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php
new file mode 100644
index 00000000..6668a879
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php
@@ -0,0 +1,76 @@
+ \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( 'edit_posts' );
+ }
+
+ /**
+ * 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'] ) || 200 !== $response_code ) {
+ 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-zendesk-chat.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-zendesk-chat.php
new file mode 100644
index 00000000..e64a7e55
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-zendesk-chat.php
@@ -0,0 +1,120 @@
+ \WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::get_chat_availability',
+ 'permission_callback' => __CLASS__ . '::chat_authentication_permissions_callback',
+ )
+ );
+
+ register_rest_route(
+ 'my-jetpack/v1',
+ 'chat/authentication',
+ array(
+ 'methods' => \WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::get_chat_authentication',
+ 'args' => array(
+ 'type' => array(
+ 'required' => false,
+ 'type' => 'string',
+ ),
+ 'test_mode' => array(
+ 'required' => false,
+ 'type' => 'boolean',
+ ),
+ ),
+ 'permission_callback' => __CLASS__ . '::chat_authentication_permissions_callback',
+ )
+ );
+ }
+
+ /**
+ * Ensure user is logged in if making an authentication request
+ *
+ * @access public
+ * @static
+ *
+ * @return \WP_Error|true
+ */
+ public static function chat_authentication_permissions_callback() {
+ if ( ! get_current_user_id() ) {
+ return new \WP_Error( 'unauthorized', 'You must be logged in to access this resource.', array( 'status' => 401 ) );
+ }
+
+ return true;
+ }
+
+ /**
+ * Gets the chat authentication token.
+ *
+ * @return \WP_Error|object Object: { token: string }
+ */
+ public static function get_chat_authentication() {
+ $authentication = get_transient( self::ZENDESK_AUTH_TOKEN );
+ if ( $authentication ) {
+ return rest_ensure_response( $authentication, 200 );
+ }
+
+ $proxied = function_exists( 'wpcom_is_proxied_request' ) ? wpcom_is_proxied_request() : false;
+ $wpcom_endpoint = 'help/authenticate/chat';
+ $wpcom_api_version = '2';
+
+ $body = array(
+ 'type' => 'zendesk',
+ 'test_mode' => $proxied ? true : false,
+ );
+
+ $response = Client::wpcom_json_api_request_as_user( $wpcom_endpoint, $wpcom_api_version, array( 'method' => 'POST' ), $body );
+ $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( 'chat_authentication_failed', 'Chat authentication failed', array( 'status' => $response_code ) );
+ }
+
+ set_transient( self::ZENDESK_AUTH_TOKEN, $body, self::TRANSIENT_EXPIRY );
+ return rest_ensure_response( $body, 200 );
+ }
+
+ /**
+ * Calls `wpcom/v2/presales/chat?group=jp_presales` endpoint.
+ * This endpoint returns whether or not the Jetpack presales chat group is available
+ *
+ * @return \WP_Error/object Object: { is_available: bool }
+ */
+ public static function get_chat_availability() {
+ $wpcom_endpoint = '/presales/chat?group=jp_presales';
+ $wpcom_api_version = '2';
+ $response = Client::wpcom_json_api_request_as_user( $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( 'chat_config_data_fetch_failed', 'Chat config data fetch failed', array( 'status' => $response_code ) );
+ }
+
+ return rest_ensure_response( $body, 200 );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php
new file mode 100644
index 00000000..a673895b
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php
@@ -0,0 +1,264 @@
+get_ip( true );
+ $headers = array(
+ 'X-Forwarded-For' => $ip,
+ );
+
+ // If has a blog id, use connected endpoint.
+
+ if ( $blog_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' => $headers,
+ )
+ );
+ } else {
+ $endpoint = 'https://public-api.wordpress.com/rest/v1.1/products?locale=' . get_user_locale() . '&type=jetpack';
+
+ $wpcom_request = wp_remote_get(
+ esc_url_raw( $endpoint ),
+ array(
+ 'headers' => $headers,
+ )
+ );
+ }
+
+ $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;
+ $is_introductory_offer = false;
+ $introductory_offer = null;
+
+ // Get/compute the discounted price.
+ if ( isset( $product->introductory_offer->cost_per_interval ) ) {
+ $discount_price = $product->introductory_offer->cost_per_interval;
+ $is_introductory_offer = true;
+ $introductory_offer = $product->introductory_offer;
+ }
+
+ $pricing = array(
+ 'currency_code' => $product->currency_code,
+ 'full_price' => $cost,
+ 'discount_price' => $discount_price,
+ 'is_introductory_offer' => $is_introductory_offer,
+ 'introductory_offer' => $introductory_offer,
+ 'product_term' => $product->product_term,
+ );
+
+ 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;
+ }
+
+ /**
+ * Gets the site purchases from WPCOM.
+ *
+ * @todo Maybe add caching.
+ *
+ * @return Object|WP_Error
+ */
+ public static function get_site_current_purchases() {
+ // TODO: Add a short-lived cache (less than a minute) to accommodate repeated invocation of this function.
+ static $purchases = null;
+
+ if ( $purchases !== null ) {
+ return $purchases;
+ }
+
+ $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 );
+ $purchases = json_decode( $body );
+ return $purchases;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php
new file mode 100644
index 00000000..ff873390
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php
@@ -0,0 +1,137 @@
+ 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php
new file mode 100644
index 00000000..1740a74d
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php
@@ -0,0 +1,234 @@
+ _x( '* Subject to your usage and storage limit.', 'Backup Product Disclaimer', 'jetpack-my-jetpack' ),
+ 'link_text' => _x( 'Learn more', 'Backup Product Disclaimer', 'jetpack-my-jetpack' ),
+ 'url' => Redirect::get_url( 'jetpack-faq-backup-disclaimer' ),
+ ),
+ );
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * Get the URL where the user should be redirected after checkout
+ */
+ public static function get_post_checkout_url() {
+ if ( static::is_jetpack_plugin_active() ) {
+ return admin_url( 'admin.php?page=jetpack#/recommendations' );
+ } elseif ( static::is_plugin_active() ) {
+ return admin_url( 'admin.php?page=jetpack-backup' );
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php
new file mode 100644
index 00000000..1e37aeb8
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php
@@ -0,0 +1,292 @@
+ __( 'Optimize CSS Loading', 'jetpack-my-jetpack' ),
+ 'info' => array(
+ 'content' => __(
+ 'Move important styling information to the start of the page, which helps pages display your content sooner, so your users don’t have to wait for the entire page to load. Commonly referred to as Critical CSS.',
+ 'jetpack-my-jetpack'
+ ),
+ ),
+ 'tiers' => array(
+ self::FREE_TIER_SLUG => array(
+ 'included' => true,
+ 'description' => __( 'Must be done manually', 'jetpack-my-jetpack' ),
+ 'info' => array(
+ 'title' => __( 'Manual Critical CSS regeneration', 'jetpack-my-jetpack' ),
+ 'content' => __(
+ '
To enhance the speed of your site, with this plan you will need to optimize CSS by using the Manual Critical CSS generation feature whenever you:
+
+
Make theme changes.
+
Write a new post/page.
+
Edit a post/page.
+
Activate, deactivate, or update plugins that impact your site layout or HTML structure.
+
Change settings of plugins that impact your site layout or HTML structure.
+
Upgrade your WordPress version if the new release includes core CSS changes.
It’s essential to regenerate Critical CSS to optimize your site speed whenever your HTML or CSS structure changes. Being on top of this can be tedious and time-consuming.
+
Boost’s cloud service can automatically detect when your site needs the Critical CSS regenerated, and perform this function behind the scenes without requiring you to monitor it manually.
Paid customers get dedicated email support from our world-class Happiness Engineers to help with any issue.
+
All other questions are handled by our team as quickly as we are able to go through the WordPress support forum.
',
+ 'jetpack-my-jetpack'
+ ),
+ ),
+ 'tiers' => array(
+ self::FREE_TIER_SLUG => array( 'included' => false ),
+ self::UPGRADED_TIER_SLUG => array( 'included' => true ),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * Get the product princing details
+ *
+ * @return array Pricing details
+ */
+ public static function get_pricing_for_ui() {
+ return array(
+ 'tiers' => array(
+ self::FREE_TIER_SLUG => array(
+ 'available' => true,
+ 'is_free' => true,
+ ),
+ self::UPGRADED_TIER_SLUG => array_merge(
+ array(
+ 'available' => true,
+ 'wpcom_product_slug' => self::UPGRADED_TIER_PRODUCT_SLUG,
+ ),
+ Wpcom_Products::get_product_pricing( self::UPGRADED_TIER_PRODUCT_SLUG )
+ ),
+ ),
+ );
+ }
+
+ /**
+ * 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' );
+ }
+
+ /**
+ * 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;
+ }
+
+ // We just "got started" in My Jetpack, so skip the in-plugin experience.
+ update_option( 'jb_get_started', false );
+
+ return $product_activation;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php
new file mode 100644
index 00000000..9fce5f92
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php
@@ -0,0 +1,124 @@
+ 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php
new file mode 100644
index 00000000..ec35be1d
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php
@@ -0,0 +1,140 @@
+ 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() {
+ return activate_plugin( static::get_installed_plugin_filename( 'jetpack' ) );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php
new file mode 100644
index 00000000..579e2524
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php
@@ -0,0 +1,192 @@
+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.
+ */
+ if ( parent::is_plugin_installed() ) {
+ return activate_plugin( static::get_installed_plugin_filename() );
+ }
+
+ /*
+ * Otherwise, activate Jetpack plugin.
+ */
+ 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 happen, 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;
+ }
+
+ /**
+ * Install and activate the standalone plugin in the case it's missing.
+ *
+ * @return boolean|WP_Error
+ */
+ final public static function install_and_activate_standalone() {
+ /**
+ * Check for the presence of the standalone plugin, ignoring Jetpack presence.
+ *
+ * If the standalone plugin is not installed and the user can install plugins, proceed with the installation.
+ */
+ if ( ! parent::is_plugin_installed() ) {
+ /**
+ * Check for permissions
+ */
+ if ( ! current_user_can( 'install_plugins' ) ) {
+ return new WP_Error( 'not_allowed', __( 'You are not allowed to install plugins on this site.', 'jetpack-my-jetpack' ) );
+ }
+
+ /**
+ * Install the plugin
+ */
+ $installed = Plugins_Installer::install_plugin( static::get_plugin_slug() );
+ if ( is_wp_error( $installed ) ) {
+ return $installed;
+ }
+ }
+
+ /**
+ * Activate the installed plugin
+ */
+ $result = static::activate_plugin();
+
+ if ( is_wp_error( $result ) ) {
+ return $result;
+ }
+
+ /**
+ * Activate the module as well, if the user has a plan
+ * or the product does not require a plan to work
+ */
+ if ( static::has_required_plan() ) {
+ $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 true;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-ai.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-ai.php
new file mode 100644
index 00000000..2a98fea2
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-ai.php
@@ -0,0 +1,205 @@
+ 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_ai_yearly';
+ }
+
+ /**
+ * Get the WPCOM monthly product slug used to make the purchase
+ *
+ * @return ?string
+ */
+ public static function get_wpcom_monthly_product_slug() {
+ return 'jetpack_ai_monthly';
+ }
+
+ /**
+ * Checks whether the current plan (or purchases) of the site already supports the product
+ *
+ * @return boolean
+ */
+ public static function has_required_plan() {
+ $purchases_data = Wpcom_Products::get_site_current_purchases();
+ 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, static::get_wpcom_product_slug() ) ) {
+ return true;
+ }
+ if ( 0 === strpos( $purchase->product_slug, static::get_wpcom_monthly_product_slug() ) ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Get the URL where the user manages the product
+ *
+ * @return ?string
+ */
+ public static function get_manage_url() {
+ return '';
+ }
+
+ /**
+ * Get data about the AI Assistant feature
+ *
+ * @return array
+ */
+ public static function get_ai_assistant_feature() {
+ // Bail early if the plugin is not active.
+ if ( ! self::is_jetpack_plugin_installed() ) {
+ return array();
+ }
+
+ // Check if the global constant is defined.
+ if ( ! defined( 'JETPACK__PLUGIN_DIR' ) ) {
+ return array();
+ }
+
+ // Check if class exists. If not, try to require it once.
+ if ( ! class_exists( 'Jetpack_AI_Helper' ) ) {
+ $class_file_path = JETPACK__PLUGIN_DIR . '_inc/lib/class-jetpack-ai-helper.php';
+
+ // Check whether the file exists
+ if ( ! file_exists( $class_file_path ) ) {
+ return array();
+ }
+
+ require_once $class_file_path;
+ }
+
+ return \Jetpack_AI_Helper::get_ai_assistance_feature();
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php
new file mode 100644
index 00000000..763eca82
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php
@@ -0,0 +1,133 @@
+ static::$slug,
+ 'plugin_slug' => static::$plugin_slug,
+ 'name' => static::get_name(),
+ 'title' => static::get_title(),
+ 'description' => static::get_description(),
+ 'long_description' => static::get_long_description(),
+ 'tiers' => static::get_tiers(),
+ 'features' => static::get_features(),
+ 'features_by_tier' => static::get_features_by_tier(),
+ 'disclaimers' => static::get_disclaimers(),
+ 'status' => static::get_status(),
+ 'pricing_for_ui' => static::get_pricing_for_ui(),
+ 'is_bundle' => static::is_bundle_product(),
+ 'is_plugin_active' => static::is_plugin_active(),
+ '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(),
+ 'has_required_tier' => static::has_required_tier(),
+ 'manage_url' => static::get_manage_url(),
+ 'purchase_url' => static::get_purchase_url(),
+ 'post_activation_url' => static::get_post_activation_url(),
+ 'standalone_plugin_info' => static::get_standalone_info(),
+ 'class' => static::class,
+ 'post_checkout_url' => static::get_post_checkout_url(),
+ );
+ }
+
+ /**
+ * 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 tiers for the product
+ *
+ * @return boolean|string[] The slugs of the tiers (i.e. [ "free", "basic", "advanced" ]), or False if the product has no tiers.
+ */
+ public static function get_tiers() {
+ return array();
+ }
+
+ /**
+ * Get the internationalized features list
+ *
+ * @return array
+ */
+ abstract public static function get_features();
+
+ /**
+ * Get the internationalized comparison of features grouped by each tier
+ *
+ * @return array
+ */
+ public static function get_features_by_tier() {
+ return array();
+ }
+
+ /**
+ * Get the product pricing
+ *
+ * @return array
+ */
+ abstract public static function get_pricing_for_ui();
+
+ /**
+ * Get the URL where the user can purchase the product iff it doesn't have an interstitial page in My Jetpack.
+ *
+ * @return ?string
+ */
+ public static function get_purchase_url() {
+ // Declare as concrete method as most Jetpack products use an interstitial page within My Jetpack.
+ return null;
+ }
+
+ /**
+ * 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 URL the user is taken after purchasing the product through the checkout
+ *
+ * @return ?string
+ */
+ public static function get_post_checkout_url() {
+ return null;
+ }
+
+ /**
+ * Get the WPCOM product slug used to make the purchase
+ *
+ * @return ?string
+ */
+ public static function get_wpcom_product_slug() {
+ return null;
+ }
+
+ /**
+ * Get the disclaimers corresponding to a feature
+ *
+ * @return ?array
+ */
+ public static function get_disclaimers() {
+ return array();
+ }
+
+ /**
+ * Get the standalone plugin related info
+ *
+ * @return array
+ */
+ public static function get_standalone_info() {
+ $is_standalone_installed = static::$has_standalone_plugin && self::is_plugin_installed();
+ $is_standalone_active = static::$has_standalone_plugin && self::is_plugin_active();
+
+ return array(
+ 'has_standalone_plugin' => static::$has_standalone_plugin,
+ 'is_standalone_installed' => $is_standalone_installed,
+ 'is_standalone_active' => $is_standalone_active,
+ );
+ }
+
+ /**
+ * 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 the current plan (or purchases) of the site already supports the tiers
+ *
+ * @return array Key/value pairs of tier slugs and whether they are supported or not.
+ */
+ public static function has_required_tier() {
+ return array();
+ }
+
+ /**
+ * Checks whether the product supports trial or not
+ *
+ * Returns true if it supports. Return false otherwise.
+ *
+ * Free products will always return false.
+ *
+ * @return boolean
+ */
+ public static function has_trial_support() {
+ return false;
+ }
+
+ /**
+ * Checks whether the product can be upgraded to a different product.
+ *
+ * @return boolean
+ */
+ public static function is_upgradable() {
+ return false;
+ }
+
+ /**
+ * 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';
+ if ( static::has_required_plan() ) {
+ $status = 'plugin_absent_with_plan';
+ }
+ } 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::is_upgradable() ) {
+ // Upgradable plans should ignore whether or not they have the required plan.
+ $status = 'can_upgrade';
+ } elseif ( ! static::has_required_plan() ) { // We need needs_purchase here as well because some products we consider active without the required plan.
+ if ( static::has_trial_support() ) {
+ $status = 'needs_purchase_or_free';
+ } else {
+ $status = 'needs_purchase';
+ }
+ }
+ } elseif ( ! static::has_required_plan() ) {
+ if ( static::has_trial_support() ) {
+ $status = 'needs_purchase_or_free';
+ } else {
+ $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(
+ '%2$s',
+ 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php
new file mode 100644
index 00000000..f83e47ad
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php
@@ -0,0 +1,238 @@
+ __( 'Scan for threats and vulnerabilities', 'jetpack-my-jetpack' ),
+ 'tiers' => array(
+ self::FREE_TIER_SLUG => array(
+ 'included' => true,
+ 'description' => __( 'Check items against database', 'jetpack-my-jetpack' ),
+ ),
+ self::UPGRADED_TIER_SLUG => array(
+ 'included' => true,
+ 'description' => __( 'Line by line malware scanning', 'jetpack-my-jetpack' ),
+ ),
+ ),
+ ),
+ array(
+ 'name' => __( 'Daily automated scans', 'jetpack-my-jetpack' ),
+ 'tiers' => array(
+ self::FREE_TIER_SLUG => array( 'included' => true ),
+ self::UPGRADED_TIER_SLUG => array(
+ 'included' => true,
+ 'description' => __( 'Plus on-demand manual scans', 'jetpack-my-jetpack' ),
+ ),
+ ),
+ ),
+ array(
+ 'name' => __( 'Web Application Firewall', 'jetpack-my-jetpack' ),
+ 'tiers' => array(
+ self::FREE_TIER_SLUG => array(
+ 'included' => false,
+ 'description' => __( 'Manual rules only', 'jetpack-my-jetpack' ),
+ ),
+ self::UPGRADED_TIER_SLUG => array(
+ 'included' => true,
+ 'description' => __( 'Automatic protection and rule updates', 'jetpack-my-jetpack' ),
+ ),
+ ),
+ ),
+ array(
+ 'name' => __( 'Brute force protection', 'jetpack-my-jetpack' ),
+ 'tiers' => array(
+ self::FREE_TIER_SLUG => array( 'included' => true ),
+ self::UPGRADED_TIER_SLUG => array( 'included' => true ),
+ ),
+ ),
+ array(
+ 'name' => __( 'Access to scan on Cloud', 'jetpack-my-jetpack' ),
+ 'tiers' => array(
+ self::FREE_TIER_SLUG => array( 'included' => false ),
+ self::UPGRADED_TIER_SLUG => array( 'included' => true ),
+ ),
+ ),
+ array(
+ 'name' => __( 'One-click auto fixes', 'jetpack-my-jetpack' ),
+ 'tiers' => array(
+ self::FREE_TIER_SLUG => array( 'included' => false ),
+ self::UPGRADED_TIER_SLUG => array( 'included' => true ),
+ ),
+ ),
+ array(
+ 'name' => __( 'Notifications', 'jetpack-my-jetpack' ),
+ 'tiers' => array(
+ self::FREE_TIER_SLUG => array( 'included' => false ),
+ self::UPGRADED_TIER_SLUG => array( 'included' => true ),
+ ),
+ ),
+ array(
+ 'name' => __( 'Severity labels', 'jetpack-my-jetpack' ),
+ 'tiers' => array(
+ self::FREE_TIER_SLUG => array( 'included' => false ),
+ self::UPGRADED_TIER_SLUG => array( 'included' => true ),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * Get the product pricing details
+ *
+ * @return array Pricing details
+ */
+ public static function get_pricing_for_ui() {
+ return array(
+ 'tiers' => array(
+ self::FREE_TIER_SLUG => array(
+ 'available' => true,
+ 'is_free' => true,
+ ),
+ self::UPGRADED_TIER_SLUG => array_merge(
+ array(
+ 'available' => true,
+ 'wpcom_product_slug' => self::UPGRADED_TIER_PRODUCT_SLUG,
+ ),
+ Wpcom_Products::get_product_pricing( self::UPGRADED_TIER_PRODUCT_SLUG )
+ ),
+ ),
+ );
+ }
+
+ /**
+ * 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' );
+ }
+
+ /**
+ * Return product bundles list
+ * that supports the product.
+ *
+ * @return array Products bundle list.
+ */
+ public static function is_upgradable_by_bundle() {
+ return array( 'security' );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php
new file mode 100644
index 00000000..484231db
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php
@@ -0,0 +1,231 @@
+ 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' );
+ }
+
+ /**
+ * Get the URL where the user should be redirected after checkout
+ */
+ public static function get_post_checkout_url() {
+ if ( static::is_jetpack_plugin_active() ) {
+ return admin_url( 'admin.php?page=jetpack#/recommendations' );
+ }
+
+ // If Jetpack is not active, it means that the user has another standalone plugin active
+ // and it follows the `Protect` plugin flow instead of `Scan` so for now it would be safe
+ // to return null and let the user go back to the My Jetpack page.
+ return null;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php
new file mode 100644
index 00000000..8d363a3b
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php
@@ -0,0 +1,150 @@
+ true,
+ 'exclude_from_search' => false,
+ )
+ );
+ $indexable_status_array = get_post_stati(
+ array(
+ 'public' => true,
+ 'exclude_from_search' => false,
+ )
+ );
+ $raw_posts_counts = static::get_raw_post_type_breakdown();
+ if ( ! $raw_posts_counts || is_wp_error( $raw_posts_counts ) ) {
+ return array();
+ }
+ $posts_counts = static::get_post_type_breakdown_with( $raw_posts_counts, $indexable_post_types, $indexable_status_array );
+
+ return $posts_counts;
+ }
+
+ /**
+ * Calculate breakdown of post types with passed in indexable post types and statuses.
+ * The function is going to be used from WPCOM as well for consistency.
+ *
+ * @param array $raw_posts_counts Array of post types with counts as value.
+ * @param array $indexable_post_types Array of indexable post types.
+ * @param array $indexable_status_array Array of indexable post statuses.
+ */
+ public static function get_post_type_breakdown_with( $raw_posts_counts, $indexable_post_types, $indexable_status_array ) {
+ $posts_counts = array();
+ foreach ( $raw_posts_counts as $row ) {
+ // ignore if status is not public.
+ if ( ! in_array( $row['post_status'], $indexable_status_array, true ) ) {
+ continue;
+ }
+ // ignore if post type is in excluded post types.
+ if ( in_array( $row['post_type'], self::EXCLUDED_POST_TYPES, true ) ) {
+ continue;
+ }
+ // ignore if post type is not public and is not explicitly included.
+ if ( ! in_array( $row['post_type'], $indexable_post_types, true ) &&
+ ! in_array( $row['post_type'], self::DO_NOT_EXCLUDE_POST_TYPES, true )
+ ) {
+ continue;
+ }
+ // add up post type counts of potentially multiple post_status.
+ if ( ! isset( $posts_counts[ $row['post_type'] ] ) ) {
+ $posts_counts[ $row['post_type'] ] = 0;
+ }
+ $posts_counts[ $row['post_type'] ] += intval( $row['num_posts'] );
+ }
+
+ arsort( $posts_counts, SORT_NUMERIC );
+ return $posts_counts;
+ }
+
+ /**
+ * Get raw post type breakdown from the database.
+ */
+ protected static function get_raw_post_type_breakdown() {
+ global $wpdb;
+
+ $results = wp_cache_get( self::POST_TYPE_BREAKDOWN_CACHE_KEY, self::CACHE_GROUP );
+ if ( false !== $results ) {
+ return $results;
+ }
+
+ $query = "SELECT post_type, post_status, COUNT( * ) AS num_posts
+ FROM {$wpdb->posts}
+ WHERE post_password = ''
+ GROUP BY post_type, post_status";
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery
+ $results = $wpdb->get_results( $query, ARRAY_A );
+ wp_cache_set( self::POST_TYPE_BREAKDOWN_CACHE_KEY, $results, self::CACHE_GROUP, self::CACHE_EXPIRY );
+ return $results;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php
new file mode 100644
index 00000000..7d201301
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php
@@ -0,0 +1,330 @@
+ true,
+ 'trial_available' => static::has_trial_support(),
+ 'wpcom_product_slug' => static::get_wpcom_product_slug(),
+ 'wpcom_free_product_slug' => static::get_wpcom_free_product_slug(),
+ ),
+ Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() )
+ );
+
+ $record_count = intval( Search_Stats::estimate_count() );
+ $search_pricing = static::get_pricing_from_wpcom( $record_count );
+
+ if ( is_wp_error( $search_pricing ) ) {
+ return $pricing;
+ }
+
+ $pricing['estimated_record_count'] = $record_count;
+
+ return array_merge( $pricing, $search_pricing );
+ }
+
+ /**
+ * Get the WPCOM product slug used to make the purchase
+ *
+ * @return ?string
+ */
+ public static function get_wpcom_product_slug() {
+ return 'jetpack_search';
+ }
+
+ /**
+ * Get the WPCOM free product slug
+ *
+ * @return ?string
+ */
+ public static function get_wpcom_free_product_slug() {
+ return 'jetpack_search_free';
+ }
+
+ /**
+ * Returns true if the new_pricing_202208 is set to not empty in URL for testing purpose, or it's active.
+ */
+ public static function is_new_pricing_202208() {
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash
+ if ( isset( $_GET['new_pricing_202208'] ) && $_GET['new_pricing_202208'] ) {
+ return true;
+ }
+
+ $record_count = intval( Search_Stats::estimate_count() );
+ $search_pricing = static::get_pricing_from_wpcom( $record_count );
+ if ( is_wp_error( $search_pricing ) ) {
+ return false;
+ }
+
+ return '202208' === $search_pricing['pricing_version'];
+ }
+
+ /**
+ * Override status to `needs_purchase_or_free` when status is `needs_purchase`.
+ */
+ public static function get_status() {
+ $status = parent::get_status();
+ return $status;
+ }
+
+ /**
+ * Use centralized Search pricing API.
+ *
+ * The function is also used by the search package, as a result it could be called before site connection - i.e. blog token might not be available.
+ *
+ * @param int $record_count Record count to estimate pricing.
+ *
+ * @return array|WP_Error
+ */
+ public static function get_pricing_from_wpcom( $record_count ) {
+ static $pricings = array();
+
+ if ( isset( $pricings[ $record_count ] ) ) {
+ return $pricings[ $record_count ];
+ }
+
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ // For simple sites fetch the response directly.
+ $response = Client::wpcom_json_api_request_as_blog(
+ sprintf( '/jetpack-search/pricing?record_count=%1$d&locale=%2$s', $record_count, get_user_locale() ),
+ '2',
+ array( 'timeout' => 5 ),
+ null,
+ 'wpcom'
+ );
+ } else {
+ // For non-simple sites we have to use the wp_remote_get, as connection might not be available.
+ $response = wp_remote_get(
+ sprintf( Constants::get_constant( 'JETPACK__WPCOM_JSON_API_BASE' ) . '/wpcom/v2/jetpack-search/pricing?record_count=%1$d&locale=%2$s', $record_count, get_user_locale() ),
+ array( 'timeout' => 5 )
+ );
+ }
+
+ if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
+ return new WP_Error( 'search_pricing_fetch_failed' );
+ }
+
+ $body = wp_remote_retrieve_body( $response );
+ $pricings[ $record_count ] = json_decode( $body, true );
+ return $pricings[ $record_count ];
+ }
+
+ /**
+ * 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' => 5 ),
+ null,
+ 'wpcom'
+ );
+
+ if ( is_wp_error( $response ) || 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 product supports trial or not
+ *
+ * Returns true if it supports. Return false otherwise.
+ *
+ * Free products will always return false.
+ *
+ * @return boolean
+ */
+ public static function has_trial_support() {
+ return static::is_new_pricing_202208();
+ }
+
+ /**
+ * 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php
new file mode 100644
index 00000000..a2d91169
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php
@@ -0,0 +1,212 @@
+ 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();
+ }
+
+ /**
+ * Checks whether the current plan (or purchases) of the site already supports the product
+ *
+ * @return boolean
+ */
+ public static function has_required_plan() {
+ $purchases_data = Wpcom_Products::get_site_current_purchases();
+ 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php
new file mode 100644
index 00000000..45b51183
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php
@@ -0,0 +1,146 @@
+ 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.
+ *
+ * If the standalone plugin is active,
+ * it will redirect to the standalone plugin settings page.
+ * Otherwise, it will redirect to the Jetpack settings page.
+ *
+ * @return string
+ */
+ public static function get_manage_url() {
+ if ( static::is_standalone_plugin_active() ) {
+ return admin_url( 'admin.php?page=jetpack-social' );
+ }
+
+ return admin_url( 'admin.php?page=jetpack#/settings?term=publicize' );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-starter.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-starter.php
new file mode 100644
index 00000000..94284499
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-starter.php
@@ -0,0 +1,203 @@
+ 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_starter_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;
+ }
+
+ return $activation;
+ }
+
+ /**
+ * Checks whether the Product is active
+ *
+ * Jetpack Starter 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();
+ }
+
+ /**
+ * Checks whether the current plan (or purchases) of the site already supports the product
+ *
+ * @return boolean
+ */
+ public static function has_required_plan() {
+ $purchases_data = Wpcom_Products::get_site_current_purchases();
+ 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_starter' ) ) {
+ 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', 'anti-spam' );
+ }
+
+ /**
+ * Get the URL where the user manages the product
+ *
+ * @return ?string
+ */
+ public static function get_manage_url() {
+ return '';
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php
new file mode 100644
index 00000000..4d6dd54f
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php
@@ -0,0 +1,241 @@
+ true,
+ 'wpcom_product_slug' => static::get_wpcom_product_slug(),
+ 'wpcom_free_product_slug' => static::get_wpcom_free_product_slug(),
+ 'wpcom_pwyw_product_slug' => static::get_wpcom_pwyw_product_slug(),
+ ),
+ // TODO: replace with `Wpcom_Products::get_product_pricing` once available.
+ // This is not yet used anywhere, so it's fine to leave it as is for now.
+ array(
+ 'currency_code' => 'USD',
+ 'full_price' => 10,
+ 'discount_price' => 10,
+ 'product_term' => 'month',
+ )
+ );
+ }
+
+ /**
+ * Get the WPCOM product slug used to make the purchase
+ *
+ * @return ?string
+ */
+ public static function get_wpcom_product_slug() {
+ return 'jetpack_stats_monthly';
+ }
+
+ /**
+ * Get the WPCOM Pay Whatever You Want product slug used to make the purchase
+ *
+ * @return ?string
+ */
+ public static function get_wpcom_pwyw_product_slug() {
+ return 'jetpack_stats_pwyw_yearly';
+ }
+
+ /**
+ * Get the WPCOM free product slug
+ *
+ * @return ?string
+ */
+ public static function get_wpcom_free_product_slug() {
+ return 'jetpack_stats_free_yearly';
+ }
+
+ /**
+ * Checks whether the site already supports this product through an existing plan or purchase
+ *
+ * @return boolean
+ */
+ public static function has_required_plan() {
+ $purchases_data = Wpcom_Products::get_site_current_purchases();
+ 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_stats' ) ) {
+ return true;
+ }
+ if ( 0 === strpos( $purchase->product_slug, 'jetpack_complete' ) ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Checks whether the product can be upgraded to a different product.
+ * Only Jetpack Stats Commercial plan is not upgradable.
+ *
+ * @return boolean
+ */
+ public static function is_upgradable() {
+ $purchases_data = Wpcom_Products::get_site_current_purchases();
+ if ( is_wp_error( $purchases_data ) ) {
+ return false;
+ }
+ if ( is_array( $purchases_data ) && ! empty( $purchases_data ) ) {
+ foreach ( $purchases_data as $purchase ) {
+ if (
+ (
+ // Purchase is Jetpack Stats...
+ 0 === strpos( $purchase->product_slug, 'jetpack_stats' ) &&
+ // but not Jetpack Stats Free...
+ false === strpos( $purchase->product_slug, 'free' )
+ ) || 0 === strpos( $purchase->product_slug, 'jetpack_complete' )
+ ) {
+ // Only Jetpack Stats paid plans should be eligible for this conditional.
+ // Sample product slugs: jetpack_stats_monthly
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Returns a redirect parameter for an upgrade URL if current purchase license is a free license
+ * or an empty string otherwise.
+ *
+ * @return string
+ */
+ public static function get_url_redirect_string() {
+ $purchases_data = Wpcom_Products::get_site_current_purchases();
+ if ( is_wp_error( $purchases_data ) ) {
+ return '';
+ }
+ if ( is_array( $purchases_data ) && ! empty( $purchases_data ) ) {
+ foreach ( $purchases_data as $purchase ) {
+ if (
+ 0 === strpos( $purchase->product_slug, static::get_wpcom_free_product_slug() )
+ ) {
+ return '&productType=personal';
+ }
+ }
+ }
+ return '';
+ }
+
+ /**
+ * Checks whether the product supports trial or not.
+ * Since Jetpack Stats has been widely available as a free product in the past, it "supports" a trial.
+ *
+ * @return boolean
+ */
+ public static function has_trial_support() {
+ return true;
+ }
+
+ /**
+ * Get the WordPress.com URL for purchasing Jetpack Stats for the current site.
+ *
+ * @return ?string
+ */
+ public static function get_purchase_url() {
+ // The returning URL could be customized by changing the `redirect_uri` param with relative path.
+ return sprintf(
+ '%s#!/stats/purchase/%d?from=jetpack-my-jetpack%s&redirect_uri=%s',
+ admin_url( 'admin.php?page=stats' ),
+ Jetpack_Options::get_option( 'id' ),
+ static::get_url_redirect_string(),
+ rawurlencode( 'admin.php?page=stats' )
+ );
+ }
+
+ /**
+ * Get the URL where the user manages the product
+ *
+ * @return ?string
+ */
+ public static function get_manage_url() {
+ return admin_url( 'admin.php?page=stats' );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php
new file mode 100644
index 00000000..f917b37a
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php
@@ -0,0 +1,169 @@
+ 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 ( method_exists( 'Automattic\Jetpack\VideoPress\Initializer', 'should_initialize_admin_ui' ) && \Automattic\Jetpack\VideoPress\Initializer::should_initialize_admin_ui() ) {
+ return \Automattic\Jetpack\VideoPress\Admin_UI::get_admin_page_url();
+ } else {
+ return admin_url( 'admin.php?page=jetpack#/settings?term=videopress' );
+ }
+ }
+
+ /**
+ * Checks whether the current plan (or purchases) of the site already supports the product
+ *
+ * @return boolean
+ */
+ public static function has_required_plan() {
+ // TODO: import and perform a proper check with Current_Plan. See #33410.
+ return true;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/CHANGELOG.md
new file mode 100644
index 00000000..3c4ed8ca
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/CHANGELOG.md
@@ -0,0 +1,273 @@
+# 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.7.25] - 2023-09-19
+- Minor internal updates.
+
+## [1.7.24] - 2023-08-23
+### Changed
+- Updated package dependencies. [#32605]
+
+## [1.7.23] - 2023-04-10
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+
+## [1.7.22] - 2023-02-20
+### Changed
+- Minor internal updates.
+
+## [1.7.21] - 2022-12-02
+### Changed
+- Updated package dependencies. [#27688]
+
+## [1.7.20] - 2022-11-22
+### Changed
+- Updated package dependencies. [#27043]
+
+## [1.7.19] - 2022-11-07
+### Changed
+- Updated package dependencies. [#27278]
+
+## [1.7.18] - 2022-10-25
+### Changed
+- Updated package dependencies. [#26705]
+
+## [1.7.17] - 2022-09-20
+### Changed
+- Updated package dependencies.
+
+## [1.7.16] - 2022-09-08
+### Changed
+- Updated package dependencies.
+
+## [1.7.15] - 2022-08-29
+### Changed
+- Updated package dependencies.
+
+## [1.7.14] - 2022-08-23
+### Changed
+- Updated package dependencies. [#25628]
+
+## [1.7.13] - 2022-08-03
+### Changed
+- Updated package dependencies. [#25300, #25315]
+
+## [1.7.12] - 2022-07-26
+### Changed
+- Updated package dependencies. [#25158]
+
+## [1.7.11] - 2022-06-21
+### Changed
+- Renaming master to trunk. [#24661]
+
+## [1.7.10] - 2022-06-14
+### Changed
+- Updated package dependencies. [#24529]
+
+## [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.
+- Updated package dependencies
+
+## [1.6.1] - 2021-12-14
+### Changed
+- Updated package dependencies.
+
+## [1.6.0] - 2021-11-30
+### Added
+- Addde partner coupon logic
+
+## [1.5.7] - 2021-11-23
+### Changed
+- Updated package dependencies
+
+## [1.5.6] - 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.5.5] - 2021-10-19
+### Changed
+- Updated package dependencies.
+
+## [1.5.4] - 2021-10-12
+### Changed
+- Updated package dependencies
+
+## [1.5.3] - 2021-09-28
+### Changed
+- Updated package dependencies.
+
+## [1.5.2] - 2021-08-31
+### Changed
+- Run composer update on test-php command instead of phpunit.
+- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills).
+- update annotations versions.
+
+## [1.5.1] - 2021-05-25
+### Changed
+- Updated package dependencies.
+
+## [1.5.0] - 2021-04-27
+### Added
+- Adds segmentation "from" parameter to the registration flow
+
+## [1.4.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.4.2] - 2021-02-05
+
+- CI: Make tests more generic
+
+## [1.4.1] - 2021-01-20
+
+- Add mirror-repo information to all current composer packages
+- Monorepo: Reorganize all projects
+
+## [1.4.0] - 2020-12-14
+
+- Update dependency brain/monkey to v2.6.0
+- Pin dependencies
+- Packages: Update for PHP 8 testing
+
+## [1.3.1] - 2020-10-29
+
+- Update dependency brain/monkey to v2.5.0
+- Updated PHPCS: Packages and Debugger
+
+## [1.3.0] - 2020-08-25
+
+- Update Authorize URL iframe to include affiliate code
+- Packages: Update filenames after #16810
+- CI: Try collect js coverage
+- Docker: Add package testing shortcut
+
+## [1.2.0] - 2020-07-01
+
+- Package Unit tests: update test file names to make sure they runs in Travis
+
+## [1.1.0] - 2020-06-22
+
+- PHPCS: Clean up the packages
+- PHPCS Updates after WPCS 2.3
+- Update README.md on partner package
+
+## [1.0.1] - 2020-01-27
+
+- Pin dependency brain/monkey to 2.4.0
+
+## 1.0.0 - 2019-12-16
+
+- Add partner subsidiary id to upgrade URLs.
+
+[1.7.25]: https://github.com/Automattic/jetpack-partner/compare/v1.7.24...v1.7.25
+[1.7.24]: https://github.com/Automattic/jetpack-partner/compare/v1.7.23...v1.7.24
+[1.7.23]: https://github.com/Automattic/jetpack-partner/compare/v1.7.22...v1.7.23
+[1.7.22]: https://github.com/Automattic/jetpack-partner/compare/v1.7.21...v1.7.22
+[1.7.21]: https://github.com/Automattic/jetpack-partner/compare/v1.7.20...v1.7.21
+[1.7.20]: https://github.com/Automattic/jetpack-partner/compare/v1.7.19...v1.7.20
+[1.7.19]: https://github.com/Automattic/jetpack-partner/compare/v1.7.18...v1.7.19
+[1.7.18]: https://github.com/Automattic/jetpack-partner/compare/v1.7.17...v1.7.18
+[1.7.17]: https://github.com/Automattic/jetpack-partner/compare/v1.7.16...v1.7.17
+[1.7.16]: https://github.com/Automattic/jetpack-partner/compare/v1.7.15...v1.7.16
+[1.7.15]: https://github.com/Automattic/jetpack-partner/compare/v1.7.14...v1.7.15
+[1.7.14]: https://github.com/Automattic/jetpack-partner/compare/v1.7.13...v1.7.14
+[1.7.13]: https://github.com/Automattic/jetpack-partner/compare/v1.7.12...v1.7.13
+[1.7.12]: https://github.com/Automattic/jetpack-partner/compare/v1.7.11...v1.7.12
+[1.7.11]: https://github.com/Automattic/jetpack-partner/compare/v1.7.10...v1.7.11
+[1.7.10]: https://github.com/Automattic/jetpack-partner/compare/v1.7.9...v1.7.10
+[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
+[1.5.7]: https://github.com/Automattic/jetpack-partner/compare/v1.5.6...v1.5.7
+[1.5.6]: https://github.com/Automattic/jetpack-partner/compare/v1.5.5...v1.5.6
+[1.5.5]: https://github.com/Automattic/jetpack-partner/compare/v1.5.4...v1.5.5
+[1.5.4]: https://github.com/Automattic/jetpack-partner/compare/v1.5.3...v1.5.4
+[1.5.3]: https://github.com/Automattic/jetpack-partner/compare/v1.5.2...v1.5.3
+[1.5.2]: https://github.com/Automattic/jetpack-partner/compare/v1.5.1...v1.5.2
+[1.5.1]: https://github.com/Automattic/jetpack-partner/compare/v1.5.0...v1.5.1
+[1.5.0]: https://github.com/Automattic/jetpack-partner/compare/v1.4.3...v1.5.0
+[1.4.3]: https://github.com/Automattic/jetpack-partner/compare/v1.4.2...v1.4.3
+[1.4.2]: https://github.com/Automattic/jetpack-partner/compare/v1.4.1...v1.4.2
+[1.4.1]: https://github.com/Automattic/jetpack-partner/compare/v1.4.0...v1.4.1
+[1.4.0]: https://github.com/Automattic/jetpack-partner/compare/v1.3.1...v1.4.0
+[1.3.1]: https://github.com/Automattic/jetpack-partner/compare/v1.3.0...v1.3.1
+[1.3.0]: https://github.com/Automattic/jetpack-partner/compare/v1.2.0...v1.3.0
+[1.2.0]: https://github.com/Automattic/jetpack-partner/compare/v1.1.0...v1.2.0
+[1.1.0]: https://github.com/Automattic/jetpack-partner/compare/v1.0.1...v1.1.0
+[1.0.1]: https://github.com/Automattic/jetpack-partner/compare/v1.0.0...v1.0.1
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/SECURITY.md
new file mode 100644
index 00000000..b4b46c0e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/composer.json
new file mode 100644
index 00000000..d10f4837
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/composer.json
@@ -0,0 +1,51 @@
+{
+ "name": "automattic/jetpack-partner",
+ "description": "Support functions for Jetpack hosting partners.",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {
+ "automattic/jetpack-connection": "^1.57.5",
+ "automattic/jetpack-status": "^1.18.4"
+ },
+ "require-dev": {
+ "brain/monkey": "2.6.1",
+ "yoast/phpunit-polyfills": "1.1.0",
+ "automattic/jetpack-changelogger": "^3.3.9",
+ "automattic/wordbless": "@dev"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy",
+ "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy",
+ "test-php": [
+ "@composer phpunit"
+ ]
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-partner",
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-partner/compare/v${old}...v${new}"
+ },
+ "branch-alias": {
+ "dev-trunk": "1.7.x-dev"
+ }
+ },
+ "config": {
+ "allow-plugins": {
+ "roots/wordpress-core-installer": true
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/src/class-partner-coupon.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/src/class-partner-coupon.php
new file mode 100644
index 00000000..4f3462e0
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/src/class-partner-coupon.php
@@ -0,0 +1,463 @@
+ array(
+ 'name' => 'IONOS',
+ 'logo' => array(
+ 'src' => '/images/ionos-logo.jpg',
+ 'width' => 119,
+ 'height' => 32,
+ ),
+ ),
+ );
+
+ /**
+ * A list of supported presets.
+ *
+ * @var array
+ */
+ private static $supported_presets = array(
+ 'IONA' => 'jetpack_backup_daily',
+ );
+
+ /**
+ * Get singleton instance of class.
+ *
+ * @return Partner_Coupon
+ */
+ public static function get_instance() {
+ 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.
+ * @param string $redirect_location The location we should redirect to after catching the coupon.
+ */
+ public static function register_coupon_admin_hooks( $plugin_slug, $redirect_location ) {
+ $instance = self::get_instance();
+
+ // 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
+ // to both implement partner coupon logic.
+ add_action(
+ 'admin_init',
+ function () use ( $plugin_slug, $redirect_location, $instance ) {
+ $instance->catch_coupon( $plugin_slug, $redirect_location );
+ $instance->maybe_purge_coupon( $plugin_slug );
+ }
+ );
+ }
+
+ /**
+ * Catch partner coupon and redirect to claim component.
+ *
+ * @param string $plugin_slug The plugin slug to differentiate between Jetpack connections.
+ * @param string $redirect_location The location we should redirect to after catching the 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( wp_unslash( $_GET['jetpack-partner-coupon'] ) ) : false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
+ if ( $partner_coupon ) {
+ Jetpack_Options::update_options(
+ array(
+ self::$coupon_option => $partner_coupon,
+ self::$added_option => time(),
+ )
+ );
+
+ $connection = new Connection_Manager( $plugin_slug );
+ if ( $connection->is_connected() ) {
+ $redirect_location = add_query_arg( array( 'showCouponRedemption' => 1 ), $redirect_location );
+ wp_safe_redirect( $redirect_location );
+ } else {
+ wp_safe_redirect( $redirect_location );
+ }
+ }
+ }
+
+ /**
+ * Purge partner coupon.
+ *
+ * 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.
+ */
+ protected function maybe_purge_coupon_by_added_date() {
+ $date = Jetpack_Options::get_option( self::$added_option, '' );
+
+ if ( empty( $date ) ) {
+ return true;
+ }
+
+ $expire_date = strtotime( '+30 days', $date );
+ $today = time();
+
+ if ( $today >= $expire_date ) {
+ $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,
+ )
+ );
+ }
+
+ /**
+ * Get partner coupon data.
+ *
+ * @return array|bool
+ */
+ public static function get_coupon() {
+ $coupon_code = Jetpack_Options::get_option( self::$coupon_option, '' );
+
+ if ( ! is_string( $coupon_code ) || empty( $coupon_code ) ) {
+ return false;
+ }
+
+ $instance = self::get_instance();
+ $partner = $instance->get_coupon_partner( $coupon_code );
+
+ if ( ! $partner ) {
+ return false;
+ }
+
+ $preset = $instance->get_coupon_preset( $coupon_code );
+
+ if ( ! $preset ) {
+ return false;
+ }
+
+ $product = $instance->get_coupon_product( $preset );
+
+ if ( ! $product ) {
+ return false;
+ }
+
+ return array(
+ 'coupon_code' => $coupon_code,
+ 'partner' => $partner,
+ 'preset' => $preset,
+ 'product' => $product,
+ );
+ }
+
+ /**
+ * Get coupon partner.
+ *
+ * @param string $coupon_code Coupon code to go through.
+ * @return array|bool
+ */
+ private function get_coupon_partner( $coupon_code ) {
+ if ( ! is_string( $coupon_code ) || false === strpos( $coupon_code, '_' ) ) {
+ return false;
+ }
+
+ $prefix = strtok( $coupon_code, '_' );
+ $supported_partners = $this->get_supported_partners();
+
+ if ( ! isset( $supported_partners[ $prefix ] ) ) {
+ return false;
+ }
+
+ return array(
+ 'name' => $supported_partners[ $prefix ]['name'],
+ 'prefix' => $prefix,
+ 'logo' => isset( $supported_partners[ $prefix ]['logo'] ) ? $supported_partners[ $prefix ]['logo'] : null,
+ );
+ }
+
+ /**
+ * Get coupon product.
+ *
+ * @param string $coupon_preset The preset we wish to find a product for.
+ * @return array|bool
+ */
+ private function get_coupon_product( $coupon_preset ) {
+ if ( ! is_string( $coupon_preset ) ) {
+ return false;
+ }
+
+ /**
+ * Allow for plugins to register supported products.
+ *
+ * @since 1.6.0
+ *
+ * @param array A list of product details.
+ * @return array
+ */
+ $product_details = apply_filters( 'jetpack_partner_coupon_products', array() );
+ $product_slug = $this->get_supported_presets()[ $coupon_preset ];
+
+ foreach ( $product_details as $product ) {
+ if ( ! $this->array_keys_exist( array( 'title', 'slug', 'description', 'features' ), $product ) ) {
+ continue;
+ }
+
+ if ( $product_slug === $product['slug'] ) {
+ return $product;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks if multiple keys are present in an array.
+ *
+ * @param array $needles The keys we wish to check for.
+ * @param array $haystack The array we want to compare keys against.
+ *
+ * @return bool
+ */
+ private function array_keys_exist( $needles, $haystack ) {
+ foreach ( $needles as $needle ) {
+ if ( ! isset( $haystack[ $needle ] ) ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Get coupon preset.
+ *
+ * @param string $coupon_code Coupon code to go through.
+ * @return string|bool
+ */
+ private function get_coupon_preset( $coupon_code ) {
+ if ( ! is_string( $coupon_code ) ) {
+ return false;
+ }
+
+ $regex = '/^.*?_(?P.*?)_.+$/';
+ $matches = array();
+
+ if ( ! preg_match( $regex, $coupon_code, $matches ) ) {
+ return false;
+ }
+
+ return isset( $this->get_supported_presets()[ $matches['slug'] ] ) ? $matches['slug'] : false;
+ }
+
+ /**
+ * Get supported partners.
+ *
+ * @return array
+ */
+ private function get_supported_partners() {
+ /**
+ * Allow external code to add additional supported partners.
+ *
+ * @since 1.6.0
+ *
+ * @param array $supported_partners A list of supported partners.
+ * @return array
+ */
+ return apply_filters( 'jetpack_partner_coupon_supported_partners', self::$supported_partners );
+ }
+
+ /**
+ * Get supported presets.
+ *
+ * @return array
+ */
+ private function get_supported_presets() {
+ /**
+ * Allow external code to add additional supported presets.
+ *
+ * @since 1.6.0
+ *
+ * @param array $supported_presets A list of supported presets.
+ * @return array
+ */
+ return apply_filters( 'jetpack_partner_coupon_supported_presets', self::$supported_presets );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/src/class-partner.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/src/class-partner.php
new file mode 100644
index 00000000..2d70c521
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-partner/src/class-partner.php
@@ -0,0 +1,199 @@
+add_code_as_query_arg( self::SUBSIDIARY_CODE, $url );
+ }
+
+ /**
+ * Adds the affiliate code to the passed URL.
+ *
+ * @param string $url The URL.
+ *
+ * @return string
+ */
+ public function add_affiliate_code_as_query_arg( $url ) {
+ return $this->add_code_as_query_arg( self::AFFILIATE_CODE, $url );
+ }
+
+ /**
+ * Adds the partner subsidiary code to the passed array.
+ *
+ * @param array $params The parameters array.
+ *
+ * @return array
+ * @since 1.5.0
+ */
+ public function add_subsidiary_id_to_params_array( $params ) {
+ if ( ! is_array( $params ) ) {
+ return $params;
+ }
+ return array_merge( $params, $this->get_code_as_array( self::SUBSIDIARY_CODE ) );
+ }
+
+ /**
+ * Adds the affiliate code to the passed array.
+ *
+ * @param array $params The parameters array.
+ *
+ * @return array
+ * @since 1.5.0
+ */
+ public function add_affiliate_code_to_params_array( $params ) {
+ if ( ! is_array( $params ) ) {
+ return $params;
+ }
+ return array_merge( $params, $this->get_code_as_array( self::AFFILIATE_CODE ) );
+ }
+
+ /**
+ * Returns the passed URL with the partner code added as a URL query arg.
+ *
+ * @param string $type The partner code.
+ * @param string $url The URL where the partner subsidiary id will be added.
+ *
+ * @return string The passed URL with the partner code added.
+ * @since 1.0.0
+ */
+ public function add_code_as_query_arg( $type, $url ) {
+ return add_query_arg( $this->get_code_as_array( $type ), $url );
+ }
+
+ /**
+ * Gets the partner code in an associative array format
+ *
+ * @param string $type The partner code.
+ * @return array
+ * @since 1.5.0
+ */
+ private function get_code_as_array( $type ) {
+ switch ( $type ) {
+ case self::AFFILIATE_CODE:
+ $query_arg_name = 'aff';
+ break;
+ case self::SUBSIDIARY_CODE:
+ $query_arg_name = 'subsidiaryId';
+ break;
+ default:
+ return array();
+ }
+
+ $code = $this->get_partner_code( $type );
+
+ if ( '' === $code ) {
+ return array();
+ }
+
+ return array( $query_arg_name => $code );
+ }
+
+ /**
+ * Returns a partner code.
+ *
+ * @param string $type This can be either 'affiliate' or 'subsidiary'. Returns empty string when code is unknown.
+ *
+ * @return string The partner code.
+ * @since 1.0.0
+ */
+ public function get_partner_code( $type ) {
+ switch ( $type ) {
+ case self::AFFILIATE_CODE:
+ /**
+ * Allow to filter the affiliate code.
+ *
+ * @param string $affiliate_code The affiliate code, blank by default.
+ *
+ * @since 1.0.0
+ * @since-jetpack 6.9.0
+ */
+ return apply_filters( 'jetpack_affiliate_code', get_option( 'jetpack_affiliate_code', '' ) );
+ case self::SUBSIDIARY_CODE:
+ /**
+ * Allow to filter the partner subsidiary id.
+ *
+ * @param string $subsidiary_id The partner subsidiary id, blank by default.
+ *
+ * @since 1.0.0
+ */
+ return apply_filters(
+ 'jetpack_partner_subsidiary_id',
+ get_option( 'jetpack_partner_subsidiary_id', '' )
+ );
+ default:
+ return '';
+ }
+ }
+
+ /**
+ * Resets the singleton for testing purposes.
+ */
+ public static function reset() {
+ self::$instance = null;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/CHANGELOG.md
new file mode 100644
index 00000000..72cec9d8
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/CHANGELOG.md
@@ -0,0 +1,133 @@
+# 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.14] - 2023-08-23
+### Changed
+- Updated package dependencies. [#32605]
+
+## [0.2.13] - 2023-04-10
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+
+## [0.2.12] - 2023-03-20
+### Changed
+- Updated package dependencies. [#29480]
+
+## [0.2.11] - 2023-02-20
+### Changed
+- Minor internal updates.
+
+## [0.2.10] - 2023-01-11
+### Changed
+- Updated package dependencies.
+
+## [0.2.9] - 2022-12-02
+### Changed
+- Updated package dependencies. [#27688]
+
+## [0.2.8] - 2022-11-22
+### Changed
+- Updated package dependencies. [#27043]
+
+## [0.2.7] - 2022-09-20
+### Changed
+- Updated package dependencies.
+
+## [0.2.6] - 2022-07-26
+### Changed
+- Updated package dependencies. [#25158]
+
+## [0.2.5] - 2022-06-21
+### Changed
+- Renaming master to trunk. [#24661]
+
+## [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.
+- Updated package dependencies
+- Updated package textdomain from `jetpack` to `jetpack-password-checker`.
+
+## [0.1.8] - 2021-12-14
+### Changed
+- Updated package dependencies.
+
+## [0.1.7] - 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.
+
+## [0.1.6] - 2021-10-13
+### Changed
+- Updated package dependencies.
+
+## [0.1.5] - 2021-10-12
+### Changed
+- Updated package dependencies
+
+## [0.1.4] - 2021-09-28
+### Changed
+- Updated package dependencies.
+
+## [0.1.3] - 2021-08-30
+### Changed
+- Run composer update on test-php command instead of phpunit
+- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills).
+
+## [0.1.2] - 2021-05-25
+### Fixed
+- Avoid checking in vendor directory.
+
+## [0.1.1] - 2021-04-27
+### Changed
+- Updated package dependencies.
+
+## 0.1.0 - 2021-03-30
+### Added
+- Initial release.
+
+### Fixed
+- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in.
+
+[0.2.14]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.13...v0.2.14
+[0.2.13]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.12...v0.2.13
+[0.2.12]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.11...v0.2.12
+[0.2.11]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.10...v0.2.11
+[0.2.10]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.9...v0.2.10
+[0.2.9]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.8...v0.2.9
+[0.2.8]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.7...v0.2.8
+[0.2.7]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.6...v0.2.7
+[0.2.6]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.5...v0.2.6
+[0.2.5]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.4...v0.2.5
+[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
+[0.1.6]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.5...v0.1.6
+[0.1.5]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.4...v0.1.5
+[0.1.4]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.3...v0.1.4
+[0.1.3]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.2...v0.1.3
+[0.1.2]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.1...v0.1.2
+[0.1.1]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.0...v0.1.1
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/SECURITY.md
new file mode 100644
index 00000000..b4b46c0e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/composer.json
new file mode 100644
index 00000000..45483b4b
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/composer.json
@@ -0,0 +1,48 @@
+{
+ "name": "automattic/jetpack-password-checker",
+ "description": "Password Checker.",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {},
+ "require-dev": {
+ "automattic/jetpack-changelogger": "^3.3.8",
+ "automattic/wordbless": "@dev",
+ "yoast/phpunit-polyfills": "1.1.0"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "test-php": [
+ "@composer phpunit"
+ ],
+ "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy",
+ "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy"
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-password-checker",
+ "textdomain": "jetpack-password-checker",
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-password-checker/compare/v${old}...v${new}"
+ },
+ "branch-alias": {
+ "dev-trunk": "0.2.x-dev"
+ }
+ },
+ "config": {
+ "allow-plugins": {
+ "roots/wordpress-core-installer": true
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php
new file mode 100644
index 00000000..79c369c2
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php
@@ -0,0 +1,1313 @@
+user_id = get_current_user_id();
+ } elseif ( is_object( $user ) && isset( $user->ID ) ) {
+ // Existing user, using their ID.
+ $this->user_id = $user->ID;
+ } elseif ( is_object( $user ) ) {
+ // Newly created user, using existing data.
+ $this->user = $user;
+ $this->user_id = 'new_user';
+ } else {
+ $this->user_id = $user;
+ }
+
+ /**
+ * Filters the password strength enforcement settings.
+ *
+ * You can supply your own passwords that should not be used for authenticating in addition to weak and easy
+ * to guess strings for each user. For example, you can add passwords from known password databases to avoid
+ * compromised password usage.
+ *
+ * @param array $common_passwords strings that are forbidden for use as passwords.
+ */
+ $this->common_passwords = apply_filters( 'password_checker_common_passwords', $this->common_passwords );
+
+ /**
+ * Filters the password strength enforcement settings.
+ *
+ * You can modify the minimum password length using this filter.
+ *
+ * @param int $minimum_password_length minimum password length.
+ */
+ $this->minimum_password_length = apply_filters( 'password_checker_minimum_password_length', $this->minimum_password_length );
+
+ /**
+ * Filters the password strength enforcement settings.
+ *
+ * You can modify the minimum entropy bits requirement using this filter.
+ *
+ * @param int $minimum_entropy_bits minimum entropy bits requirement.
+ */
+ $this->minimum_entropy_bits = apply_filters( 'password_checker_minimum_entropy_bits', $this->minimum_entropy_bits );
+ }
+
+ /**
+ * Run tests against a password.
+ *
+ * @param string $password the password.
+ * @param bool $required_only only test against required conditions, defaults to false.
+ *
+ * @return array an array containing failed and passed test results.
+ */
+ public function test( $password, $required_only = false ) {
+ // Run the tests.
+ $results = $this->run_tests( $password, $this->get_tests(), $required_only );
+
+ // If we've failed on the required tests, return now.
+ if ( ! empty( $results['failed'] ) ) {
+ return array(
+ 'passed' => false,
+ 'test_results' => $results,
+ );
+ }
+
+ $entropy_bits = $this->calculate_entropy_bits( $password );
+
+ // If we have failed the entropy bits test, run the regex tests so we can suggest improvements.
+ if ( $entropy_bits < $this->minimum_entropy_bits ) {
+ $results['failed']['entropy_bits'] = $entropy_bits;
+ // Run the tests.
+ $results = array_merge( $results, $this->run_tests( $password, $this->get_tests( 'preg_match' ) ) );
+ }
+
+ return ( array(
+ 'passed' => empty( $results['failed'] ),
+ 'test_results' => $results,
+ ) );
+ }
+
+ /**
+ * Run the tests using the currently set up object values.
+ *
+ * @param string $password the password.
+ * @param array $tests tests to run.
+ * @param bool $required_only whether to run only required tests.
+ *
+ * @return array test results.
+ */
+ public function run_tests( $password, $tests, $required_only = false ) {
+ $results = array(
+ 'passed' => array(),
+ 'failed' => array(),
+ );
+
+ foreach ( $tests as $test_type => $section_tests ) {
+ foreach ( $section_tests as $test_name => $test_data ) {
+ // Skip non-required tests if required_only param is set.
+ if ( $required_only && ! $test_data['required'] ) {
+ continue;
+ }
+
+ $result = call_user_func_array( array( $this, 'test_' . $test_type ), array( $password, $test_data ) );
+ if ( $result ) {
+ $results['passed'][] = array( 'test_name' => $test_name );
+ } else {
+ $results['failed'][] = array(
+ 'test_name' => $test_name,
+ 'explanation' => $test_data['error'],
+ );
+
+ if ( isset( $test_data['fail_immediately'] ) ) {
+ return $results;
+ }
+ }
+ }
+ }
+
+ return $results;
+ }
+
+ /**
+ * Returns an array of tests that need to be run on password strings.
+ *
+ * @param array $sections only return specific sections with the passed keys, defaults to all.
+ *
+ * @return array test descriptions.
+ */
+ public function get_tests( $sections = false ) {
+ // Note: these should be in order of priority.
+ $tests = array(
+ 'preg_match' => array(
+ 'no_backslashes' => array(
+ 'pattern' => '/^[^\\\\]*$/u',
+ 'error' => __( 'Passwords may not contain the character "\".', 'jetpack-password-checker' ),
+ 'required' => true,
+ 'fail_immediately' => true,
+ ),
+ 'minimum_length' => array(
+ 'pattern' => '/^.{' . $this->minimum_password_length . ',}/u',
+ /* translators: %d is a number of characters in the password. */
+ 'error' => sprintf( __( 'Password must be at least %d characters.', 'jetpack-password-checker' ), $this->minimum_password_length ),
+ 'required' => true,
+ 'fail_immediately' => true,
+ ),
+ 'has_mixed_case' => array(
+ 'pattern' => '/([a-z].*?[A-Z]|[A-Z].*?[a-z])/u',
+ 'error' => __( 'This password is too easy to guess: you can improve it by adding additional uppercase letters, lowercase letters, or numbers.', 'jetpack-password-checker' ),
+ 'required' => false,
+ ),
+ 'has_digit' => array(
+ 'pattern' => '/\d/u',
+ 'error' => __( 'This password is too easy to guess: you can improve it by mixing both letters and numbers.', 'jetpack-password-checker' ),
+ 'required' => false,
+ ),
+ 'has_special_char' => array(
+ 'pattern' => '/[^a-zA-Z\d]/u',
+ 'error' => __( 'This password is too easy to guess: you can improve it by including special characters such as !#=?*&.', 'jetpack-password-checker' ),
+ 'required' => false,
+ ),
+ ),
+ 'compare_to_list' => array(
+ 'not_a_common_password' => array(
+ 'list_callback' => 'get_common_passwords',
+ 'compare_callback' => 'negative_in_array',
+ 'error' => __( 'This is a very common password. Choose something that will be harder for others to guess.', 'jetpack-password-checker' ),
+ 'required' => true,
+ ),
+ 'not_same_as_other_user_data' => array(
+ 'list_callback' => 'get_other_user_data',
+ 'compare_callback' => 'test_not_same_as_other_user_data',
+ 'error' => __( 'Your password is too weak: Looks like you are including easy to guess information about yourself. Try something a little more unique.', 'jetpack-password-checker' ),
+ 'required' => true,
+ ),
+ ),
+ );
+
+ /**
+ * Filters the password strength enforcement settings.
+ *
+ * You can determine the tests run and their order based on whatever criteria you wish to specify.
+ *
+ * @param array $tests tests to run.
+ */
+ $tests = apply_filters( 'password_checker_tests', $tests );
+
+ if ( ! $sections ) {
+ return $tests;
+ }
+
+ $sections = (array) $sections;
+
+ return array_intersect_key( $tests, array_flip( $sections ) );
+ }
+
+ /**
+ * Provides the regular expression tester functionality.
+ *
+ * @param string $password the password.
+ * @param array $test_data the current test data.
+ *
+ * @return bool does the test pass?
+ */
+ protected function test_preg_match( $password, $test_data ) {
+ return preg_match( $test_data['pattern'], $password );
+ }
+
+ /**
+ * Provides the comparison tester functionality.
+ *
+ * @param string $password the password.
+ * @param array $test_data the current test data.
+ *
+ * @return bool does the test pass?
+ */
+ protected function test_compare_to_list( $password, $test_data ) {
+ if (
+ ! is_callable( array( $this, $test_data['list_callback'] ) )
+ || ! is_callable( array( $this, $test_data['compare_callback'] ) )
+ ) {
+ return false;
+ }
+
+ return call_user_func(
+ array(
+ $this,
+ $test_data['compare_callback'],
+ ),
+ $password,
+ call_user_func( array( $this, $test_data['list_callback'] ) )
+ );
+ }
+
+ /**
+ * Getter for the common password list.
+ *
+ * @return array common passwords.
+ */
+ protected function get_common_passwords() {
+ return $this->common_passwords;
+ }
+
+ /**
+ * Returns the widely known user data that can not be used in the password to avoid
+ * predictable strings.
+ *
+ * @return array user data.
+ */
+ protected function get_other_user_data() {
+ if ( empty( $this->user_id ) ) {
+ return array();
+ }
+
+ $user_data = get_userdata( $this->user_id );
+ if ( ! $user_data ) {
+ return array();
+ }
+
+ if ( isset( $user_data->ID ) ) {
+ $this->add_user_strings_to_test( get_user_meta( $user_data->ID, 'first_name', true ) );
+ $this->add_user_strings_to_test( get_user_meta( $user_data->ID, 'last_name', true ) );
+ $this->add_user_strings_to_test( get_user_meta( $user_data->ID, 'nickname', true ) );
+ }
+
+ if ( isset( $user_data->user_nicename ) ) {
+ $this->add_user_strings_to_test( $user_data->user_nicename );
+ }
+
+ if ( isset( $user_data->display_name ) ) {
+ $this->add_user_strings_to_test( $user_data->display_name );
+ }
+
+ if ( isset( $user_data->first_name ) ) {
+ $this->add_user_strings_to_test( $user_data->first_name );
+ }
+
+ if ( isset( $user_data->last_name ) ) {
+ $this->add_user_strings_to_test( $user_data->last_name );
+ }
+
+ if ( isset( $user_data->user_email ) ) {
+ $email_username = substr( $user_data->user_email, 0, strpos( $user_data->user_email, '@' ) );
+ $this->add_user_strings_to_test( $email_username, '.' );
+ $this->add_user_strings_to_test( $user_data->user_email );
+ }
+
+ return $this->get_user_strings_to_test();
+ }
+
+ /**
+ * Compare the password for matches with known user data.
+ *
+ * @param string $password the password.
+ * @param array $strings_to_test known user data.
+ *
+ * @return bool does the test pass?
+ */
+ protected function test_not_same_as_other_user_data( $password, $strings_to_test ) {
+ if ( empty( $strings_to_test ) ) {
+ return false;
+ }
+
+ $password_lowercase = strtolower( $password );
+
+ foreach ( $strings_to_test as $string ) {
+ $string = strtolower( $string );
+ $string_reversed = strrev( $string );
+
+ if ( $password_lowercase === $string || $password_lowercase === $string_reversed ) {
+ return false;
+ }
+
+ // Also check for the string or reversed string with any numbers just stuck to the end to catch things like bob123 as passwords.
+ if (
+ preg_match( '/^' . preg_quote( $string, '/' ) . '\d+$/', $password_lowercase )
+ || preg_match( '/^' . preg_quote( $string_reversed, '/' ) . '\d+$/', $password_lowercase )
+ ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * A shorthand for the not in array construct.
+ *
+ * @param mixed $needle the needle.
+ * @param array $haystack the haystack.
+ *
+ * @return bool is the needle not in the haystack?
+ */
+ protected function negative_in_array( $needle, $haystack ) {
+ return ! in_array( $needle, $haystack, true );
+ }
+
+ /**
+ * A helper function used to break a single string into its constituents so
+ * that both the full string and its constituents and any variants thereof
+ * can be tested against the password.
+ *
+ * @param string $string the string to be broken down.
+ * @param string $explode_delimiter delimiter.
+ *
+ * @return bool
+ */
+ protected function add_user_strings_to_test( $string, $explode_delimiter = ' ' ) {
+ // Don't check against empty strings.
+ if ( empty( $string ) ) {
+ return false;
+ }
+
+ $strings = explode( $explode_delimiter, $string );
+
+ // Remove any non alpha numeric characters from the strings to check against.
+ foreach ( $strings as $key => $_string ) {
+ $_string = trim( preg_replace( '/[^a-zA-Z0-9]/', '', $_string ) );
+ if ( empty( $_string ) ) {
+ continue;
+ }
+
+ $strings[ $key ] = $_string;
+ }
+
+ // Check the original too.
+ $strings[] = trim( $string );
+
+ // Check the original minus non alpha numeric characters.
+ $strings[] = trim( preg_replace( '/[^a-zA-Z0-9]/', '', $string ) );
+
+ // Remove any empty strings.
+ // Note: This will also filter out '0'.
+ $strings = array_filter( $strings );
+ if ( empty( $strings ) ) {
+ return false;
+ }
+
+ $this->user_strings_to_test = array_unique( array_merge( $this->user_strings_to_test, $strings ) );
+
+ return true;
+ }
+
+ /**
+ * Getter for the user strings array.
+ *
+ * @return array user strings.
+ */
+ protected function get_user_strings_to_test() {
+ return $this->user_strings_to_test;
+ }
+
+ /**
+ * Return a character set size that is used in the string.
+ *
+ * @param string $password the password.
+ *
+ * @return int number of different character sets in use.
+ */
+ protected function get_charset_size( $password ) {
+ $size = 0;
+
+ // Lowercase a-z.
+ if ( preg_match( '/[a-z]/', $password ) ) {
+ $size += 26;
+ }
+
+ // Uppercase A-Z.
+ if ( preg_match( '/[A-Z]/', substr( $password, 1, - 1 ) ) ) {
+ $size += 26;
+ }
+
+ // Digits.
+ if ( preg_match( '/\d/', substr( $password, 1, - 1 ) ) ) {
+ $size += 10;
+ }
+
+ // Over digits symbols.
+ if ( preg_match( '/[!|@|#|$|%|^|&|*|(|)]/', $password ) ) {
+ $size += 10;
+ }
+
+ // Other symbols.
+ if ( preg_match( '#[`|~|-|_|=|+|\[|{|\]|}|\\|\|;:\'",<\.>/\?]#', $password ) ) {
+ $size += 20;
+ }
+
+ // Spaces.
+ if ( strpos( $password, ' ' ) ) {
+ ++$size;
+ }
+
+ return $size;
+ }
+
+ /**
+ * Shorthand for getting a character index.
+ *
+ * @param string $char character.
+ *
+ * @return int the character code.
+ */
+ protected function get_char_index( $char ) {
+ $char = strtolower( $char[0] );
+ if ( $char < 'a' || $char > 'z' ) {
+ return 0;
+ } else {
+ return ord( $char[0] ) - ord( 'a' ) + 1;
+ }
+ }
+
+ /**
+ * This is the password strength calculation algorithm, based on the formula H = L(logN/log2).
+ *
+ * H = Entropy
+ * L = String length (the for iterator)
+ * N = Our charset size, via get_charset_size()
+ *
+ * @see https://en.wikipedia.org/wiki/Password_strength#Random_passwords
+ *
+ * On top of the base formula, we're also multiplying the bits of entropy for every char
+ * by 1 - (the probabily of it following the previous char)
+ * i.e.: the probablity of U following Q is ~0.84. If our password contains this pair of characters,
+ * the u char will only add ( 0.16^2 * charset_score ) to our total of entropy bits.
+ *
+ * @param string $password the password.
+ *
+ * @return float|int
+ */
+ protected function calculate_entropy_bits( $password ) {
+ $bits = 0;
+ // Calculate the score.
+ $charset_score = log( $this->get_charset_size( $password ) ) / log( 2 );
+
+ $aidx = $this->get_char_index( $password[0] );
+ $length = strlen( $password );
+
+ for ( $b = 1; $b < $length; $b++ ) {
+ $bidx = $this->get_char_index( $password[ $b ] );
+
+ // 27 = number of chars in the index (a-z,' ').
+ $c = 1.0 - $this->frequency_table[ $aidx * 27 + $bidx ];
+
+ // Increment the bits.
+ $bits += $charset_score * $c * $c;
+
+ // Move on to next pair.
+ $aidx = $bidx;
+ }
+
+ return $bits;
+ }
+
+ /**
+ * A frequency table of character pairs, starting with ' ' then ' a', ' b' [...] , 'a ', 'aa' etc.
+ *
+ * @see http://rumkin.com/tools/password/passchk.php
+ *
+ * @var array
+ */
+ public $frequency_table = array(
+ 0.23653710453418866,
+ 0.04577693541332556,
+ 0.03449832337075375,
+ 0.042918209651552706,
+ 0.037390873305146524,
+ 0.028509112115468728,
+ 0.02350896632162123,
+ 0.022188657238664526,
+ 0.028429800262428927,
+ 0.04357019973757107,
+ 0.00913602565971716,
+ 0.03223093745443942,
+ 0.02235311269864412,
+ 0.04438081352966905,
+ 0.04512377897652719,
+ 0.020055401662049863,
+ 0.055903192885260244,
+ 0.0024388394809739026,
+ 0.035207464644991984,
+ 0.07355941099285611,
+ 0.036905671380667734,
+ 0.026134421927394666,
+ 0.023787724158040528,
+ 0.011352092141711621,
+ 0.0032354570637119114,
+ 0.005986878553725033,
+ 0.008861933226417843,
+ 0.11511532293337222,
+ 0.027556203528211108,
+ 0.024331243621519172,
+ 0.039266365359381834,
+ 0.031599941682461,
+ 0.014403265782183991,
+ 0.015480973902901297,
+ 0.027770812071730572,
+ 0.00942761335471643,
+ 0.039872867764980315,
+ 0.0078122175244204695,
+ 0.02808456043154979,
+ 0.08429100451960927,
+ 0.04688963405744277,
+ 0.13831170724595424,
+ 0.002540311998833649,
+ 0.025211838460416972,
+ 0.001543082081936142,
+ 0.09519638431258201,
+ 0.061845750109345385,
+ 0.08907071001603732,
+ 0.02137571074500656,
+ 0.027093162268552268,
+ 0.005521504592506197,
+ 0.003023181221752442,
+ 0.007086747339262283,
+ 0.010262720513194342,
+ 0.08785070710016038,
+ 0.14617757690625455,
+ 0.03417291150313457,
+ 0.0059635515381250915,
+ 0.006146668610584633,
+ 0.195202799241872,
+ 0.002774748505613063,
+ 0.004715556203528212,
+ 0.0044776206444088066,
+ 0.11205481848665985,
+ 0.005654468581425864,
+ 0.0028820527773727946,
+ 0.07383000437381543,
+ 0.005516839189386207,
+ 0.006496573844583759,
+ 0.09843067502551392,
+ 0.0027140982650532145,
+ 0.0006893133109782768,
+ 0.08425368129464937,
+ 0.021325557661466685,
+ 0.006493074792243767,
+ 0.07023414491908442,
+ 0.002077270739174807,
+ 0.0024633328473538415,
+ 0.0007744569179180639,
+ 0.015413325557661468,
+ 0.0011990086018370024,
+ 0.13162851727657093,
+ 0.10115993585070711,
+ 0.0026989357049132527,
+ 0.03319317684793702,
+ 0.002946202070272634,
+ 0.0783216212275842,
+ 0.0018358361277154103,
+ 0.00258813238081353,
+ 0.2141688292754046,
+ 0.09853681294649366,
+ 0.0032482869222918796,
+ 0.04359352675317102,
+ 0.01993526753171016,
+ 0.0036880011663507797,
+ 0.008011663507799971,
+ 0.12014696019827964,
+ 0.0029846916460125384,
+ 0.0017553579238956116,
+ 0.029470185158186325,
+ 0.010413179763813967,
+ 0.030699518880303252,
+ 0.03508499781309229,
+ 0.002021285901734947,
+ 0.0010613792097973467,
+ 0.0005295232541186761,
+ 0.009677212421635807,
+ 0.010585799679253535,
+ 0.17101734946785244,
+ 0.07968625164018078,
+ 0.007839043592360402,
+ 0.005438693687126403,
+ 0.0183606939787141,
+ 0.2732701559994168,
+ 0.004953491762647616,
+ 0.007259367254701851,
+ 0.008104971570199739,
+ 0.13274588132380813,
+ 0.004210526315789474,
+ 0.004997813092287506,
+ 0.017006560723137484,
+ 0.007442484327161393,
+ 0.016789619478058026,
+ 0.08477737279486806,
+ 0.005106283714827234,
+ 0.0005026971861787433,
+ 0.04040355736987899,
+ 0.037535500801866156,
+ 0.00885960052485785,
+ 0.0336410555474559,
+ 0.007066919376002332,
+ 0.005344219273946639,
+ 0.0006333284735384167,
+ 0.010684939495553289,
+ 0.0063064586674442345,
+ 0.15386849394955532,
+ 0.015049424114302375,
+ 0.012162705933809595,
+ 0.020425134859308938,
+ 0.037366379938766583,
+ 0.02157165767604607,
+ 0.009373961218836564,
+ 0.0173214754337367,
+ 0.009616562181075958,
+ 0.029522670943286193,
+ 0.010154249890654615,
+ 0.018600962239393497,
+ 0.06362210234728094,
+ 0.03157078291296107,
+ 0.151603440734801,
+ 0.0062329785683044175,
+ 0.014775331681003062,
+ 0.0020854351946347867,
+ 0.1826342032366234,
+ 0.0878017203674005,
+ 0.054190989940224525,
+ 0.010329202507654177,
+ 0.012763376585508092,
+ 0.0064872430383437815,
+ 0.006381105117364048,
+ 0.005388540603586529,
+ 0.0090800408222773,
+ 0.09611196967487973,
+ 0.09940691062837148,
+ 0.01033969966467415,
+ 0.004034407348009914,
+ 0.008826942703017933,
+ 0.11474675608689314,
+ 0.07132584924916169,
+ 0.012388977985129028,
+ 0.005435194634786413,
+ 0.1417174515235457,
+ 0.0037066627788307337,
+ 0.0045802595130485495,
+ 0.060800699810468,
+ 0.005341886572386646,
+ 0.005683627350925791,
+ 0.12434932205860913,
+ 0.004596588423968508,
+ 0.0007534626038781163,
+ 0.07107041842834232,
+ 0.022361277154104096,
+ 0.04784720804782038,
+ 0.06277533168100306,
+ 0.003441901151771395,
+ 0.005828254847645429,
+ 0.0009669047966175828,
+ 0.009470768333576322,
+ 0.002077270739174807,
+ 0.12797667298440007,
+ 0.08797783933518005,
+ 0.005388540603586529,
+ 0.0024913252660737715,
+ 0.007550954949701123,
+ 0.2786866890217233,
+ 0.002509986878553725,
+ 0.029002478495407494,
+ 0.0303204548768042,
+ 0.07576614666861058,
+ 0.00246799825047383,
+ 0.00592389561160519,
+ 0.039574281965301064,
+ 0.00706808572678233,
+ 0.03304505029887739,
+ 0.05474150750838315,
+ 0.0028633911648928414,
+ 0.0005073625892987316,
+ 0.07293541332555767,
+ 0.053528502697186175,
+ 0.022566554891383584,
+ 0.038151334013704616,
+ 0.002716430966613209,
+ 0.005049132526607377,
+ 0.0009902318122175246,
+ 0.008997229916897508,
+ 0.0011861787432570347,
+ 0.1666377022889634,
+ 0.14414462749671964,
+ 0.003374252806531564,
+ 0.005169266656947077,
+ 0.008468873013558828,
+ 0.16337541915731155,
+ 0.002873888321912815,
+ 0.004305000728969237,
+ 0.0031141565825922144,
+ 0.1241172182533897,
+ 0.0052800699810468,
+ 0.008969237498177577,
+ 0.024094474413179766,
+ 0.017029887738737422,
+ 0.01722700102055693,
+ 0.10618457501093455,
+ 0.006147834961364631,
+ 0.0008269427030179326,
+ 0.03303571949263741,
+ 0.024188948826359528,
+ 0.05213937891820965,
+ 0.04505846333284735,
+ 0.0035270447587111824,
+ 0.006799825047383001,
+ 0.0008199445983379502,
+ 0.02206735675754483,
+ 0.001010059775477475,
+ 0.11971191135734072,
+ 0.04656538854060359,
+ 0.011243621519171892,
+ 0.06513019390581717,
+ 0.032375564951159064,
+ 0.06347047674588133,
+ 0.013678961947805804,
+ 0.03309870243475726,
+ 0.006982942119842543,
+ 0.009726199154395685,
+ 0.010121592068814697,
+ 0.032514360693978714,
+ 0.04986032949409535,
+ 0.039734072022160664,
+ 0.15690683773144773,
+ 0.03949963551538125,
+ 0.014790494241143023,
+ 0.002722262720513194,
+ 0.02614375273363464,
+ 0.10753637556495116,
+ 0.06764834523983088,
+ 0.006221315060504448,
+ 0.021317393206006705,
+ 0.0030826651115322934,
+ 0.002399183554454002,
+ 0.0019069835252952323,
+ 0.015595276279341012,
+ 0.0925126111678087,
+ 0.18437906400349907,
+ 0.006538562472663654,
+ 0.008719638431258201,
+ 0.02116693395538708,
+ 0.18241376293920394,
+ 0.007290858725761773,
+ 0.005976381396705059,
+ 0.005629975215045925,
+ 0.09721300481119698,
+ 0.004810030616707975,
+ 0.024303251202799244,
+ 0.012954658113427612,
+ 0.011057005394372358,
+ 0.02733459688001166,
+ 0.10135121737862662,
+ 0.012016912086309959,
+ 0.001055547455897361,
+ 0.009027555037177431,
+ 0.07162326869806095,
+ 0.01007143898527482,
+ 0.07297623560285756,
+ 0.006741507508383147,
+ 0.0036891675171307776,
+ 0.0008409389123778977,
+ 0.011272780288671819,
+ 0.007020265344802449,
+ 0.1030389269572824,
+ 0.15350809155853623,
+ 0.004232686980609419,
+ 0.004353987461729115,
+ 0.0023385333138941536,
+ 0.14450386353695874,
+ 0.002546143752733635,
+ 0.0024470039364338824,
+ 0.01200758128006998,
+ 0.0981227584195947,
+ 0.003161976964572095,
+ 0.040695145064878264,
+ 0.03460446129173349,
+ 0.003908441463770229,
+ 0.01598483743986004,
+ 0.13107216795451232,
+ 0.003129319142732177,
+ 0.00032307916605919226,
+ 0.04050386353695874,
+ 0.05452689896486368,
+ 0.03589677795597026,
+ 0.07087097244496282,
+ 0.006143169558244642,
+ 0.008684647907858289,
+ 0.0004607085580988482,
+ 0.022010205569324977,
+ 0.0009097536083977258,
+ 0.07328765126111678,
+ 0.14751421490013122,
+ 0.008015162560139961,
+ 0.006601545414783497,
+ 0.025279486805656802,
+ 0.1682449336637994,
+ 0.008313748359819215,
+ 0.007010934538562473,
+ 0.005886572386645284,
+ 0.16889575739903775,
+ 0.004123050007289692,
+ 0.011925936725470185,
+ 0.10007289692374982,
+ 0.013380376148126549,
+ 0.009021723283277445,
+ 0.08650823735238372,
+ 0.007756232686980609,
+ 0.0007243038343781893,
+ 0.0026791077416533026,
+ 0.02797492345823006,
+ 0.032384895757399036,
+ 0.04187432570345531,
+ 0.00882461000145794,
+ 0.0032401224668318998,
+ 0.00033357632307916605,
+ 0.027878116343490307,
+ 0.0022277299897944304,
+ 0.14333518005540166,
+ 0.1725534334451086,
+ 0.02781629975215046,
+ 0.006909462020702727,
+ 0.005264907420906838,
+ 0.16661437527336345,
+ 0.004325995043009185,
+ 0.003334596880011664,
+ 0.005312727802886718,
+ 0.14024668318996938,
+ 0.0013261408368566844,
+ 0.003504884093891238,
+ 0.006375273363464061,
+ 0.04964922000291588,
+ 0.008290421344219274,
+ 0.09536783787724158,
+ 0.05394372357486515,
+ 0.005505175681586237,
+ 0.005339553870826651,
+ 0.01782067356757545,
+ 0.006710016037323225,
+ 0.05105933809593235,
+ 0.002983525295232541,
+ 0.002940370316372649,
+ 0.0004548768041988629,
+ 0.01208456043154979,
+ 0.000915585362297711,
+ 0.20146260387811635,
+ 0.067196967487972,
+ 0.006158332118384605,
+ 0.025438110511736407,
+ 0.07753783350342616,
+ 0.1273876658405015,
+ 0.009337804344656656,
+ 0.07683452398308792,
+ 0.0070412596588423975,
+ 0.08747164309666132,
+ 0.0038827817466102928,
+ 0.018116926665694706,
+ 0.005017641055547455,
+ 0.004567429654468581,
+ 0.028277008310249308,
+ 0.05271555620352821,
+ 0.004394809739029013,
+ 0.0013343052923166642,
+ 0.00411605190260971,
+ 0.059621519171890944,
+ 0.09073859163143316,
+ 0.01446858142586383,
+ 0.006770666277883074,
+ 0.003425572240851436,
+ 0.0004455459979588861,
+ 0.010401516256013998,
+ 0.005825922146085436,
+ 0.10833882490158916,
+ 0.007584779122321038,
+ 0.016903921854497742,
+ 0.02719580113719201,
+ 0.0304814112844438,
+ 0.02206385770520484,
+ 0.013064295086747339,
+ 0.02696369733197259,
+ 0.009581571657676046,
+ 0.026761918647033093,
+ 0.006510570053943724,
+ 0.021941390873305145,
+ 0.07042659279778393,
+ 0.05437410701268406,
+ 0.1425175681586237,
+ 0.027802303542790494,
+ 0.037690625455605774,
+ 0.0019606356611750987,
+ 0.1095623268698061,
+ 0.06157748942994606,
+ 0.044618749088788455,
+ 0.04955124653739612,
+ 0.03608689313310978,
+ 0.018381688292754043,
+ 0.003404577926811489,
+ 0.015036594255722409,
+ 0.009600233270156,
+ 0.10794693103951014,
+ 0.12447528794284882,
+ 0.0031981338387520046,
+ 0.0074716430966613205,
+ 0.003202799241871993,
+ 0.13437643971424407,
+ 0.006655197550663361,
+ 0.0036693395538708266,
+ 0.049338970695436656,
+ 0.09486863974340283,
+ 0.0015990669193760023,
+ 0.0026604461291733486,
+ 0.051775477474850555,
+ 0.0041347135150896636,
+ 0.005450357194926374,
+ 0.12030325120279925,
+ 0.04581309228750547,
+ 0.0004537104534188657,
+ 0.12425601399620935,
+ 0.025981629975215047,
+ 0.023926519900860182,
+ 0.04423385333138941,
+ 0.0017950138504155123,
+ 0.002661612479953346,
+ 0.0006333284735384167,
+ 0.008449045050298877,
+ 0.000653156436798367,
+ 0.04816678816153958,
+ 0.008625164018078437,
+ 0.0039037760606502403,
+ 0.005228750546726928,
+ 0.004531272780288672,
+ 0.0056672984400058316,
+ 0.00359585945473101,
+ 0.0032179618020119548,
+ 0.0038093016474704767,
+ 0.011452398308791368,
+ 0.002519317684793702,
+ 0.00280390727511299,
+ 0.005572824026826068,
+ 0.004554599795888614,
+ 0.004531272780288672,
+ 0.0035841959469310393,
+ 0.004400641492928998,
+ 0.0036670068523108326,
+ 0.004839189386207902,
+ 0.006258638285464354,
+ 0.004897506925207757,
+ 0.840776789619478,
+ 0.004968654322787578,
+ 0.002886718180492783,
+ 0.0019757982213150604,
+ 0.0018568304417553576,
+ 0.001691208630995772,
+ 0.09009243329931477,
+ 0.14030150167662925,
+ 0.013242746756086894,
+ 0.013746610293045632,
+ 0.027342761335471644,
+ 0.16938912377897652,
+ 0.006607377168683481,
+ 0.01661933226417845,
+ 0.008173786266219566,
+ 0.13297448607668758,
+ 0.0034675608689313307,
+ 0.016641492928998396,
+ 0.011722991689750693,
+ 0.021493512173786266,
+ 0.03430820819361423,
+ 0.10099548039072752,
+ 0.00873596734217816,
+ 0.0018323370753754193,
+ 0.020103222044029742,
+ 0.047197550663362,
+ 0.040833940807697915,
+ 0.03361189677795597,
+ 0.010844729552412887,
+ 0.005544831608106138,
+ 0.0007522962530981193,
+ 0.01525120279924187,
+ 0.00815512465373961,
+ 0.2109648636827526,
+ 0.058258055110074355,
+ 0.007181221752442048,
+ 0.043560868931331105,
+ 0.004058900714389853,
+ 0.10618107595859454,
+ 0.0062399766729844,
+ 0.004835690333867911,
+ 0.02679224376731302,
+ 0.08414637702288964,
+ 0.0030698352529523252,
+ 0.03637498177576906,
+ 0.01592885260242018,
+ 0.017413617145356466,
+ 0.008430383437818923,
+ 0.037231083248286924,
+ 0.03290275550371775,
+ 0.007538125091121154,
+ 0.004500947660008748,
+ 0.05932409972299169,
+ 0.16006764834523984,
+ 0.03309636973319726,
+ 0.007766729844000583,
+ 0.005225251494386936,
+ 0.0006321621227584196,
+ 0.012989648636827526,
+ 0.005274238227146815,
+ 0.1254503571949264,
+ 0.12852719055255868,
+ 0.0035433736696311416,
+ 0.005203090829566993,
+ 0.0019314768916751715,
+ 0.20520775623268697,
+ 0.002509986878553725,
+ 0.00343606939787141,
+ 0.027138649948972155,
+ 0.13926578218399185,
+ 0.004565096952908587,
+ 0.005614812654905963,
+ 0.00874413179763814,
+ 0.004109053797929727,
+ 0.008300918501239247,
+ 0.08270943286193323,
+ 0.002912377897652719,
+ 0.0037066627788307337,
+ 0.06909578655780726,
+ 0.03242805073625893,
+ 0.05237614812654906,
+ 0.04723487388832191,
+ 0.0038991106575302524,
+ 0.006299460562764251,
+ 0.00043388249015891526,
+ 0.020029741944889927,
+ 0.005311561452106721,
+ 0.09334072022160665,
+ 0.022940953491762648,
+ 0.024658988190698353,
+ 0.02901297565242747,
+ 0.03531593526753171,
+ 0.0758023035427905,
+ 0.013711619769645722,
+ 0.021597317393206007,
+ 0.009670214316955824,
+ 0.044728386062108175,
+ 0.010596296836273509,
+ 0.03264382563055839,
+ 0.0604822860475288,
+ 0.05489546581134276,
+ 0.11501851581863246,
+ 0.01837585653885406,
+ 0.026237060796034405,
+ 0.0011255285026971862,
+ 0.08704125965884241,
+ 0.10156349322058608,
+ 0.06660562764251349,
+ 0.023434319871701415,
+ 0.010777081207173057,
+ 0.005409534917626476,
+ 0.003123487388832191,
+ 0.0028762210234728096,
+ 0.0089995626184575,
+ 0.07518297127861205,
+ 0.2314868056568013,
+ 0.002226563639014434,
+ 0.003285610147251786,
+ 0.0027455897361131363,
+ 0.2724537104534189,
+ 0.0016655489138358362,
+ 0.0019209797346551977,
+ 0.0022137337804344656,
+ 0.17690392185449774,
+ 0.0014532730718763668,
+ 0.0024994897215337513,
+ 0.015302522233561744,
+ 0.003441901151771395,
+ 0.015303688584341741,
+ 0.09314593964134713,
+ 0.0017833503426155418,
+ 0.0005108616416387229,
+ 0.017828838023035427,
+ 0.010385187345094037,
+ 0.003168975069252078,
+ 0.01902901297565243,
+ 0.005525003644846187,
+ 0.0010088934246974776,
+ 0.0009272488700976819,
+ 0.036282840064149294,
+ 0.0022977110365942554,
+ 0.0766805656801283,
+ 0.22270418428342326,
+ 0.005283569033386791,
+ 0.007155562035282111,
+ 0.01173582154833066,
+ 0.1715620352821111,
+ 0.003925936725470185,
+ 0.004425134859308937,
+ 0.020040239101909902,
+ 0.14243242455168392,
+ 0.0016737133692958156,
+ 0.0066808572678232975,
+ 0.011980755212130047,
+ 0.012638577052048404,
+ 0.07206065024055984,
+ 0.08115701997375711,
+ 0.00710424260096224,
+ 0.0007278028867181805,
+ 0.02347630849978131,
+ 0.04595538708266512,
+ 0.01481965301064295,
+ 0.013925061962385188,
+ 0.0018125091121154687,
+ 0.00529173348884677,
+ 0.0016340574427759146,
+ 0.03072401224668319,
+ 0.0023746901880740633,
+ 0.25174165330223064,
+ 0.06673392622831317,
+ 0.00878378772415804,
+ 0.03956261845750109,
+ 0.010077270739174807,
+ 0.0844787869951888,
+ 0.00985216503863537,
+ 0.004973319725907567,
+ 0.01893220586091267,
+ 0.11200583175389998,
+ 0.0028715556203528212,
+ 0.004095057588569762,
+ 0.01202391019098994,
+ 0.01756757544831608,
+ 0.014825484764542934,
+ 0.05312961073042717,
+ 0.06746872721971132,
+ 0.003845458521650386,
+ 0.0210806239976673,
+ 0.019443067502551394,
+ 0.08017028721387957,
+ 0.01825572240851436,
+ 0.005365213587986587,
+ 0.01959702580551101,
+ 0.026184575010934536,
+ 0.02474879720075813,
+ 0.002171745152354571,
+ 0.25827321767021433,
+ 0.048050153083539875,
+ 0.01043184137629392,
+ 0.03930485493512174,
+ 0.027640180784370902,
+ 0.03294007872867765,
+ 0.006474413179763814,
+ 0.018314039947514214,
+ 0.015119405161102202,
+ 0.014706516984983233,
+ 0.005494678524566263,
+ 0.03309870243475726,
+ 0.043864120134130345,
+ 0.058996355153812505,
+ 0.06265986295378335,
+ 0.04633328473538417,
+ 0.03790756670068523,
+ 0.0004642076104388394,
+ 0.037849249161685375,
+ 0.08369966467415076,
+ 0.04999679253535501,
+ 0.02392768625164018,
+ 0.010998687855372504,
+ 0.009881323808135296,
+ 0.003867619186470331,
+ 0.012434465665548913,
+ 0.007253535500801866,
+ 0.11106225397288234,
+ 0.17624726636535937,
+ 0.008209943140399476,
+ 0.008390727511299025,
+ 0.012682898381688294,
+ 0.1825653885406036,
+ 0.001538416678816154,
+ 0.004590756670068524,
+ 0.008710307625018223,
+ 0.1299513048549351,
+ 0.002677941390873305,
+ 0.012309666132089225,
+ 0.014087184720804781,
+ 0.01199941682461,
+ 0.031246537396121883,
+ 0.07206648199445984,
+ 0.008254264470039366,
+ 0.0007033095203382417,
+ 0.007034261554162415,
+ 0.006599212713223502,
+ 0.013906400349905234,
+ 0.050098265053214755,
+ 0.007133401370462167,
+ 0.017750692520775622,
+ 0.0008257763522379356,
+ 0.03918821985712203,
+ 0.06015454147834961,
+ );
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/CHANGELOG.md
new file mode 100644
index 00000000..3797ecd5
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/CHANGELOG.md
@@ -0,0 +1,68 @@
+# 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.5] - 2023-08-23
+### Changed
+- Updated package dependencies. [#32605]
+
+## [0.2.4] - 2023-04-10
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+
+## [0.2.3] - 2023-02-20
+### Changed
+- Minor internal updates.
+
+## [0.2.2] - 2022-12-02
+### Changed
+- Updated package dependencies. [#27688]
+
+## [0.2.1] - 2022-11-22
+### Changed
+- Updated package dependencies. [#27043]
+
+## [0.2.0] - 2022-08-23
+### Added
+- Add method to check plugin activation context. [#25422]
+
+## [0.1.4] - 2022-07-26
+### Changed
+- Updated package dependencies. [#25158]
+
+## [0.1.3] - 2022-06-21
+### Changed
+- Renaming master to trunk.
+
+## [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.2.5]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.4...v0.2.5
+[0.2.4]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.3...v0.2.4
+[0.2.3]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.2...v0.2.3
+[0.2.2]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.1...v0.2.2
+[0.2.1]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.0...v0.2.1
+[0.2.0]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.4...v0.2.0
+[0.1.4]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.3...v0.1.4
+[0.1.3]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.2...v0.1.3
+[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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/SECURITY.md
new file mode 100644
index 00000000..b4b46c0e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/composer.json
new file mode 100644
index 00000000..fb1a5a52
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/composer.json
@@ -0,0 +1,42 @@
+{
+ "name": "automattic/jetpack-plugins-installer",
+ "description": "Handle installation of plugins from WP.org",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {
+ "automattic/jetpack-a8c-mc-stats": "^1.4.21"
+ },
+ "require-dev": {
+ "yoast/phpunit-polyfills": "1.1.0",
+ "automattic/jetpack-changelogger": "^3.3.8"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "test-php": [
+ "@composer phpunit"
+ ]
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "branch-alias": {
+ "dev-trunk": "0.2.x-dev"
+ },
+ "mirror-repo": "Automattic/jetpack-plugins-installer",
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-plugins-installer/compare/v${old}...v${new}"
+ },
+ "autotagger": true,
+ "textdomain": "jetpack-plugins-installer"
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php
new file mode 100644
index 00000000..ae129c59
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php
@@ -0,0 +1,155 @@
+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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php
new file mode 100644
index 00000000..4ebf4a83
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php
@@ -0,0 +1,291 @@
+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();
+ }
+
+ /**
+ * Determine if the current request is activating a plugin from the plugins page.
+ *
+ * @param string $plugin Plugin file path to check.
+ * @return bool
+ */
+ public static function is_current_request_activating_plugin_from_plugins_screen( $plugin ) {
+ // Filter out common async request contexts
+ if (
+ wp_doing_ajax() ||
+ ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ||
+ ( defined( 'REST_API_REQUEST' ) && REST_API_REQUEST ) ||
+ ( defined( 'WP_CLI' ) && WP_CLI )
+ ) {
+ return false;
+ }
+
+ if ( isset( $_SERVER['SCRIPT_NAME'] ) ) {
+ $request_file = esc_url_raw( wp_unslash( $_SERVER['SCRIPT_NAME'] ) );
+ } elseif ( isset( $_SERVER['REQUEST_URI'] ) ) {
+ list( $request_file ) = explode( '?', esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
+ } else {
+ return false;
+ }
+
+ // Not the plugins page
+ if ( strpos( $request_file, 'wp-admin/plugins.php' ) === false ) {
+ return false;
+ }
+
+ // Same method to get the action as used by plugins.php
+ $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
+ $action = $wp_list_table->current_action();
+
+ // Not a singular activation
+ // This also means that if the plugin is activated as part of a group ( bulk activation ), this function will return false here.
+ if ( 'activate' !== $action ) {
+ return false;
+ }
+
+ // Check the nonce associated with the plugin activation
+ // We are not changing any data here, so this is not super necessary, it's just a best practice before using the form data from $_REQUEST.
+ check_admin_referer( 'activate-plugin_' . $plugin );
+
+ // Not the right plugin
+ $requested_plugin = isset( $_REQUEST['plugin'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['plugin'] ) ) : null;
+ if ( $requested_plugin !== $plugin ) {
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/CHANGELOG.md
new file mode 100644
index 00000000..906bfba6
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/CHANGELOG.md
@@ -0,0 +1,230 @@
+# 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.7.27] - 2023-09-19
+- Minor internal updates.
+
+## [1.7.26] - 2023-08-23
+### Changed
+- Updated package dependencies. [#32605]
+
+## [1.7.25] - 2023-04-10
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+
+## [1.7.24] - 2023-02-20
+### Changed
+- Minor internal updates.
+
+## [1.7.23] - 2023-01-11
+### Changed
+- Updated package dependencies.
+
+## [1.7.22] - 2022-12-19
+### Changed
+- Updated package dependencies.
+
+## [1.7.21] - 2022-12-02
+### Changed
+- Updated package dependencies. [#27688]
+
+## [1.7.20] - 2022-11-22
+### Changed
+- Updated package dependencies. [#27043]
+
+## [1.7.19] - 2022-11-07
+### Changed
+- Updated package dependencies. [#27278]
+
+## [1.7.18] - 2022-07-26
+### Changed
+- Updated package dependencies. [#25158]
+
+## [1.7.17] - 2022-06-21
+### Changed
+- Renaming master to trunk.
+
+## [1.7.16] - 2022-06-14
+### Changed
+- Updated package dependencies. [#24529]
+
+## [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.
+- Updated package dependencies
+
+## [1.7.8] - 2021-12-14
+### Changed
+- Updated package dependencies.
+
+## [1.7.7] - 2021-11-22
+### Changed
+- Updated package dependencies
+
+## [1.7.6] - 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.7.5] - 2021-10-26
+### Changed
+- Updated package dependencies.
+
+## [1.7.4] - 2021-10-13
+### Changed
+- Updated package dependencies.
+
+## [1.7.3] - 2021-10-12
+### Changed
+- Updated package dependencies
+
+## [1.7.2] - 2021-09-28
+### Changed
+- Updated package dependencies.
+
+## [1.7.1] - 2021-08-30
+### Changed
+- Run composer update on test-php command instead of phpunit
+- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills).
+
+## [1.7.0] - 2021-06-29
+### Changed
+- Allow any argument to be passed.
+- Improve documentation.
+
+## [1.6.1] - 2021-06-15
+### Changed
+- Updated package dependencies.
+
+## [1.6.0] - 2021-05-25
+### Removed
+- Removed filter from the final Redirect URL
+
+## [1.5.5] - 2021-04-27
+### Changed
+- Updated package dependencies.
+
+## [1.5.4] - 2021-03-30
+### Added
+- Composer alias for dev-master, to improve dependencies
+
+### Changed
+- Update package dependencies.
+- Userless Connection: Redirect "userless" users to the "Plans" page
+
+### Fixed
+- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in.
+
+## [1.5.3] - 2021-02-23
+
+- CI: Make tests more generic
+
+## [1.5.2] - 2021-01-26
+
+- Update dependencies to latest stable
+
+## [1.5.1] - 2021-01-26
+
+- Add mirror-repo information to all current composer packages
+- Monorepo: Reorganize all projects
+
+## [1.5.0] - 2021-01-05
+
+- Update dependency brain/monkey to v2.6.0
+- Pin dependencies
+- Packages: Update for PHP 8 testing
+- Pin dependency brain/monkey to 2.5.0
+
+## [1.4.1] - 2020-11-24
+
+- Status: Introduce get_site_suffix method
+
+## [1.4.0] - 2020-10-27
+
+- Masterbar: Add Admin Menu endpoint
+
+## [1.3.0] - 2020-08-14
+
+- Packages: Update filenames after #16810
+- CI: Try collect js coverage
+- Docker: Add package testing shortcut
+
+## [1.2.0] - 2020-06-16
+
+- Add a trailing / to jetpack.com/redirect URLs.
+
+## [1.1.0] - 2020-05-22
+
+- add filter to Redirect::get_url
+
+## 1.0.0 - 2020-04-24
+
+- Create Jetpack Redirect package
+
+[1.7.27]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.26...v1.7.27
+[1.7.26]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.25...v1.7.26
+[1.7.25]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.24...v1.7.25
+[1.7.24]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.23...v1.7.24
+[1.7.23]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.22...v1.7.23
+[1.7.22]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.21...v1.7.22
+[1.7.21]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.20...v1.7.21
+[1.7.20]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.19...v1.7.20
+[1.7.19]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.18...v1.7.19
+[1.7.18]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.17...v1.7.18
+[1.7.17]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.16...v1.7.17
+[1.7.16]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.15...v1.7.16
+[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
+[1.7.6]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.5...v1.7.6
+[1.7.5]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.4...v1.7.5
+[1.7.4]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.3...v1.7.4
+[1.7.3]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.2...v1.7.3
+[1.7.2]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.1...v1.7.2
+[1.7.1]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.0...v1.7.1
+[1.7.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.6.1...v1.7.0
+[1.6.1]: https://github.com/Automattic/jetpack-redirect/compare/v1.6.0...v1.6.1
+[1.6.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.5.5...v1.6.0
+[1.5.5]: https://github.com/Automattic/jetpack-redirect/compare/v1.5.4...v1.5.5
+[1.5.4]: https://github.com/Automattic/jetpack-redirect/compare/v1.5.3...v1.5.4
+[1.5.3]: https://github.com/Automattic/jetpack-redirect/compare/v1.5.2...v1.5.3
+[1.5.2]: https://github.com/Automattic/jetpack-redirect/compare/v1.5.1...v1.5.2
+[1.5.1]: https://github.com/Automattic/jetpack-redirect/compare/v1.5.0...v1.5.1
+[1.5.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.4.1...v1.5.0
+[1.4.1]: https://github.com/Automattic/jetpack-redirect/compare/v1.4.0...v1.4.1
+[1.4.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.3.0...v1.4.0
+[1.3.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.2.0...v1.3.0
+[1.2.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.1.0...v1.2.0
+[1.1.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.0.0...v1.1.0
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/SECURITY.md
new file mode 100644
index 00000000..b4b46c0e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/composer.json
new file mode 100644
index 00000000..429ff92e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/composer.json
@@ -0,0 +1,42 @@
+{
+ "name": "automattic/jetpack-redirect",
+ "description": "Utilities to build URLs to the jetpack.com/redirect/ service",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {
+ "automattic/jetpack-status": "^1.18.4"
+ },
+ "require-dev": {
+ "brain/monkey": "2.6.1",
+ "yoast/phpunit-polyfills": "1.1.0",
+ "automattic/jetpack-changelogger": "^3.3.9"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "test-php": [
+ "@composer phpunit"
+ ]
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-redirect",
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-redirect/compare/v${old}...v${new}"
+ },
+ "branch-alias": {
+ "dev-trunk": "1.7.x-dev"
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/src/class-redirect.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/src/class-redirect.php
new file mode 100644
index 00000000..da5979b3
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/src/class-redirect.php
@@ -0,0 +1,79 @@
+get_site_suffix();
+ $args = wp_parse_args( $args, array( 'site' => $site_suffix ) );
+
+ $source_key = 'source';
+
+ if ( 0 === strpos( $source, 'https://' ) ) {
+ $source_key = 'url';
+ $source_url = \wp_parse_url( $source );
+
+ // discard any query and fragments.
+ $source = 'https://' . $source_url['host'] . ( isset( $source_url['path'] ) ? $source_url['path'] : '' );
+ }
+
+ $to_be_added = array(
+ $source_key => rawurlencode( $source ),
+ );
+
+ foreach ( $args as $arg_name => $arg_value ) {
+
+ if ( empty( $arg_value ) ) {
+ continue;
+ }
+
+ $to_be_added[ $arg_name ] = rawurlencode( $arg_value );
+
+ }
+
+ if ( ! empty( $to_be_added ) ) {
+ $url = add_query_arg( $to_be_added, $url );
+ }
+
+ return $url;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/CHANGELOG.md
new file mode 100644
index 00000000..c2415de8
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/CHANGELOG.md
@@ -0,0 +1,189 @@
+# 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.25] - 2023-09-19
+- Minor internal updates.
+
+## [1.4.24] - 2023-08-23
+### Changed
+- Updated package dependencies. [#32605]
+
+## [1.4.23] - 2023-04-10
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+
+## [1.4.22] - 2023-02-20
+### Changed
+- Minor internal updates.
+
+## [1.4.21] - 2023-01-11
+### Changed
+- Updated package dependencies.
+
+## [1.4.20] - 2022-12-19
+### Changed
+- Updated package dependencies.
+
+## [1.4.19] - 2022-12-02
+### Changed
+- Updated package dependencies. [#27688]
+
+## [1.4.18] - 2022-11-22
+### Changed
+- Updated package dependencies. [#27043]
+
+## [1.4.17] - 2022-07-26
+### Changed
+- Updated package dependencies. [#25158]
+
+## [1.4.16] - 2022-06-21
+### Changed
+- Renaming master to trunk.
+
+## [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.
+- Updated package dependencies
+
+## [1.4.12] - 2021-12-14
+### Changed
+- Updated package dependencies.
+
+## [1.4.11] - 2021-11-22
+### Changed
+- Updated package dependencies
+
+## [1.4.10] - 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.4.9] - 2021-10-13
+### Changed
+- Updated package dependencies.
+
+## [1.4.8] - 2021-10-12
+### Changed
+- Updated package dependencies
+
+## [1.4.7] - 2021-09-28
+### Changed
+- Updated package dependencies.
+
+## [1.4.6] - 2021-08-30
+### Changed
+- Run composer update on test-php command instead of phpunit
+- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills).
+
+## [1.4.5] - 2021-05-25
+### Changed
+- Updated package dependencies.
+
+## [1.4.4] - 2021-04-08
+### Changed
+- Packaging and build changes, no change to the package itself.
+
+## [1.4.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.4.2] - 2021-02-05
+
+- CI: Make tests more generic
+
+## [1.4.1] - 2021-01-20
+
+- Add mirror-repo information to all current composer packages
+- Monorepo: Reorganize all projects
+
+## [1.4.0] - 2020-12-14
+
+- Update dependency brain/monkey to v2.6.0
+- Pin dependencies
+- Packages: Update for PHP 8 testing
+
+## [1.3.1] - 2020-10-28
+
+- Updated PHPCS: Packages and Debugger
+
+## [1.3.0] - 2020-08-13
+
+- CI: Try collect js coverage
+- Docker: Add package testing shortcut
+
+## [1.2.0] - 2020-07-01
+
+- Package Unit tests: update test file names to make sure they runs in Travis
+
+## [1.1.0] - 2020-06-22
+
+- PHPCS: Clean up the packages
+- PHPCS Updates after WPCS 2.3
+
+## [1.0.4] - 2019-11-08
+
+- Packages: Use classmap instead of PSR-4
+
+## [1.0.2] - 2019-10-28
+
+- Packages: Add gitattributes files to all packages that need th…
+
+## [1.0.1] - 2019-09-20
+
+- Docs: Unify usage of @package phpdoc tags
+
+## 1.0.0 - 2019-09-14
+
+- Jetpack DNA: Introduce a Roles package
+
+[1.4.25]: https://github.com/Automattic/jetpack-roles/compare/v1.4.24...v1.4.25
+[1.4.24]: https://github.com/Automattic/jetpack-roles/compare/v1.4.23...v1.4.24
+[1.4.23]: https://github.com/Automattic/jetpack-roles/compare/v1.4.22...v1.4.23
+[1.4.22]: https://github.com/Automattic/jetpack-roles/compare/v1.4.21...v1.4.22
+[1.4.21]: https://github.com/Automattic/jetpack-roles/compare/v1.4.20...v1.4.21
+[1.4.20]: https://github.com/Automattic/jetpack-roles/compare/v1.4.19...v1.4.20
+[1.4.19]: https://github.com/Automattic/jetpack-roles/compare/v1.4.18...v1.4.19
+[1.4.18]: https://github.com/Automattic/jetpack-roles/compare/v1.4.17...v1.4.18
+[1.4.17]: https://github.com/Automattic/jetpack-roles/compare/v1.4.16...v1.4.17
+[1.4.16]: https://github.com/Automattic/jetpack-roles/compare/v1.4.15...v1.4.16
+[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
+[1.4.10]: https://github.com/Automattic/jetpack-roles/compare/v1.4.9...v1.4.10
+[1.4.9]: https://github.com/Automattic/jetpack-roles/compare/v1.4.8...v1.4.9
+[1.4.8]: https://github.com/Automattic/jetpack-roles/compare/v1.4.7...v1.4.8
+[1.4.7]: https://github.com/Automattic/jetpack-roles/compare/v1.4.6...v1.4.7
+[1.4.6]: https://github.com/Automattic/jetpack-roles/compare/v1.4.5...v1.4.6
+[1.4.5]: https://github.com/Automattic/jetpack-roles/compare/v1.4.4...v1.4.5
+[1.4.4]: https://github.com/Automattic/jetpack-roles/compare/v1.4.3...v1.4.4
+[1.4.3]: https://github.com/Automattic/jetpack-roles/compare/v1.4.2...v1.4.3
+[1.4.2]: https://github.com/Automattic/jetpack-roles/compare/v1.4.1...v1.4.2
+[1.4.1]: https://github.com/Automattic/jetpack-roles/compare/v1.4.0...v1.4.1
+[1.4.0]: https://github.com/Automattic/jetpack-roles/compare/v1.3.1...v1.4.0
+[1.3.1]: https://github.com/Automattic/jetpack-roles/compare/v1.3.0...v1.3.1
+[1.3.0]: https://github.com/Automattic/jetpack-roles/compare/v1.2.0...v1.3.0
+[1.2.0]: https://github.com/Automattic/jetpack-roles/compare/v1.1.0...v1.2.0
+[1.1.0]: https://github.com/Automattic/jetpack-roles/compare/v1.0.4...v1.1.0
+[1.0.4]: https://github.com/Automattic/jetpack-roles/compare/v1.0.2...v1.0.4
+[1.0.2]: https://github.com/Automattic/jetpack-roles/compare/v1.0.1...v1.0.2
+[1.0.1]: https://github.com/Automattic/jetpack-roles/compare/v1.0.0...v1.0.1
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/SECURITY.md
new file mode 100644
index 00000000..b4b46c0e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/composer.json
new file mode 100644
index 00000000..0a5b8aed
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/composer.json
@@ -0,0 +1,40 @@
+{
+ "name": "automattic/jetpack-roles",
+ "description": "Utilities, related with user roles and capabilities.",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {},
+ "require-dev": {
+ "brain/monkey": "2.6.1",
+ "yoast/phpunit-polyfills": "1.1.0",
+ "automattic/jetpack-changelogger": "^3.3.9"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "test-php": [
+ "@composer phpunit"
+ ]
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-roles",
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-roles/compare/v${old}...v${new}"
+ },
+ "branch-alias": {
+ "dev-trunk": "1.4.x-dev"
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/src/class-roles.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/src/class-roles.php
new file mode 100644
index 00000000..7bce3462
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/src/class-roles.php
@@ -0,0 +1,81 @@
+ 'manage_options',
+ 'editor' => 'edit_others_posts',
+ 'author' => 'publish_posts',
+ 'contributor' => 'edit_posts',
+ 'subscriber' => 'read',
+ );
+
+ /**
+ * Get the role of the current user.
+ *
+ * @access public
+ *
+ * @return string|boolean Current user's role, false if not enough capabilities for any of the roles.
+ */
+ public function translate_current_user_to_role() {
+ foreach ( $this->capability_translations as $role => $cap ) {
+ if ( current_user_can( $role ) || current_user_can( $cap ) ) {
+ return $role;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Get the role of a particular user.
+ *
+ * @access public
+ *
+ * @param \WP_User $user User object.
+ * @return string|boolean User's role, false if not enough capabilities for any of the roles.
+ */
+ public function translate_user_to_role( $user ) {
+ foreach ( $this->capability_translations as $role => $cap ) {
+ if ( user_can( $user, $role ) || user_can( $user, $cap ) ) {
+ return $role;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Get the minimum capability for a role.
+ *
+ * @access public
+ *
+ * @param string $role Role name.
+ * @return string|boolean Capability, false if role isn't mapped to any capabilities.
+ */
+ public function translate_role_to_cap( $role ) {
+ if ( ! isset( $this->capability_translations[ $role ] ) ) {
+ return false;
+ }
+
+ return $this->capability_translations[ $role ];
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/CHANGELOG.md
new file mode 100644
index 00000000..caba85ae
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/CHANGELOG.md
@@ -0,0 +1,351 @@
+# 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.18.5] - 2023-09-25
+### Changed
+- Add 127.0.0.1 into the list of known local domains. [#32898]
+- WP.com Compatibility: Abort out early checking if Protect is active. WP.com's protection is not site option based. [#33196]
+
+## [1.18.4] - 2023-09-19
+
+- Minor internal updates.
+
+## [1.18.3] - 2023-09-11
+### Changed
+- General: remove backwards-compatibility function checks now that the package supports WP 6.2. [#32772]
+
+## [1.18.2] - 2023-09-04
+### Fixed
+- Exclude domains starting with live from known Pantheon staging domains [#32789]
+
+## [1.18.1] - 2023-08-23
+### Changed
+- Updated package dependencies. [#32605]
+
+## [1.18.0] - 2023-07-18
+### Added
+- Transferred 'get_calypso_env()' method from Jetpack plugin. [#31906]
+
+## [1.17.2] - 2023-06-19
+### Changed
+- Use Plans package to detect feature support. [#31213]
+
+## [1.17.1] - 2023-05-11
+### Changed
+- PHP 8.1 compatibility updates [#30517]
+
+## [1.17.0] - 2023-04-17
+### Changed
+- When Jetpack is available, `Modules::get()` no longer translates `module_tags`. Use Jetpack's `jetpack_get_module_i18n_tag()` function if you need translations. [#30067]
+
+## [1.16.4] - 2023-04-10
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+
+## [1.16.3] - 2023-03-28
+### Changed
+- Move brute force protection into WAF package. [#28401]
+
+## [1.16.2] - 2023-02-20
+### Changed
+- Minor internal updates.
+
+## [1.16.1] - 2023-01-23
+### Added
+- Add new filters for the latest status methods [#28328]
+
+## [1.16.0] - 2023-01-16
+### Added
+- Add 2 new methods to detect whether a site is private or not. [#28322]
+
+## [1.15.4] - 2023-01-11
+### Changed
+- Modules: Allow for deactivating multiple plugins when activating a module. [#28181]
+
+## [1.15.3] - 2022-12-19
+### Changed
+- Updated package dependencies.
+
+## [1.15.2] - 2022-12-02
+### Changed
+- Updated package dependencies. [#27688]
+
+## [1.15.1] - 2022-11-22
+### Changed
+- Updated package dependencies. [#27043]
+
+## [1.15.0] - 2022-11-07
+### Added
+- WordPress.com: add checks for Simple or either Simple/WoA. [#27278]
+
+## [1.14.3] - 2022-07-26
+### Changed
+- Updated package dependencies. [#25158]
+
+## [1.14.2] - 2022-07-19
+### Changed
+- Update logic in `is_woa_site` function for host changes [#25067]
+
+## [1.14.1] - 2022-06-21
+### Changed
+- Renaming master to trunk.
+
+## [1.14.0] - 2022-06-14
+### Fixed
+- Moved the connection_url_redirect action handling to the connection package. [#24529]
+
+## [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.
+- Updated package dependencies
+
+## [1.9.4] - 2021-12-14
+### Changed
+- Updated package dependencies.
+
+## [1.9.3] - 2021-11-22
+### Changed
+- Updated package dependencies
+
+## [1.9.2] - 2021-11-16
+### Changed
+- Add a function_exists check before calling wp_get_environment_type
+
+## [1.9.1] - 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.0] - 2021-10-26
+### Added
+- Added Host class for reporting known hosting environment information.
+
+## [1.8.4] - 2021-10-13
+### Changed
+- Updated package dependencies.
+
+## [1.8.3] - 2021-10-12
+### Changed
+- Updated package dependencies
+
+## [1.8.2] - 2021-09-28
+### Changed
+- Updated package dependencies.
+
+## [1.8.1] - 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.8.0] - 2021-06-15
+### Changed
+- Update callback to Jetpack to new Identity_Crisis class.
+
+## [1.7.6] - 2021-05-25
+### Changed
+- Updated package dependencies.
+
+## [1.7.5] - 2021-04-27
+### Deprecated
+- Deprecates is_no_user_testing_mode
+
+## [1.7.4] - 2021-04-08
+### Changed
+- Packaging and build changes, no change to the package itself.
+
+## [1.7.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.7.2] - 2021-02-05
+
+- CI: Make tests more generic
+
+## [1.7.1] - 2021-01-20
+
+- Add mirror-repo information to all current composer packages
+- Monorepo: Reorganize all projects
+
+## [1.7.0] - 2020-12-14
+
+- Update dependency brain/monkey to v2.6.0
+- Pin dependencies
+- Packages: Update for PHP 8 testing
+
+## [1.6.0] - 2020-11-23
+
+- Status: Introduce get_site_suffix method
+- Status: Fix test failure
+- Status: Improve the staging site detection
+- General: update minimum required version to WordPress 5.5
+- Add the no_user_testing mode
+- Status: Add a couple of test cases for staging site detection
+- Update dependency brain/monkey to v2.5.0
+- Updated PHPCS: Packages and Debugger
+
+## [1.5.0] - 2020-10-13
+
+- Also use Core `wp_get_environment_type` for local
+
+## [1.4.0] - 2020-08-13
+
+- CI: Try collect js coverage
+
+## [1.3.0] - 2020-07-28
+
+- Core Compat: Site Environment
+
+## [1.2.0] - 2020-06-22
+
+- PHPCS: Clean up the packages
+- Staging Sites: add newspack staging to the list of known providers
+
+## [1.1.1] - 2020-01-27
+
+- Pin dependency brain/monkey to 2.4.0
+
+## [1.1.0] - 2020-01-14
+
+- Packages: Various improvements for wp.com or self-contained consumers
+
+## [1.0.4] - 2019-11-08
+
+- Packages: Use classmap instead of PSR-4
+
+## [1.0.3] - 2019-10-28
+
+- Packages: Add gitattributes files to all packages that need th…
+
+## [1.0.2] - 2019-10-23
+
+- Use spread operator instead of func_get_args
+
+## [1.0.1] - 2019-09-20
+
+- Docs: Unify usage of @package phpdoc tags
+
+## 1.0.0 - 2019-09-14
+
+- Packages: Introduce a status package
+
+[1.18.5]: https://github.com/Automattic/jetpack-status/compare/v1.18.4...v1.18.5
+[1.18.4]: https://github.com/Automattic/jetpack-status/compare/v1.18.3...v1.18.4
+[1.18.3]: https://github.com/Automattic/jetpack-status/compare/v1.18.2...v1.18.3
+[1.18.2]: https://github.com/Automattic/jetpack-status/compare/v1.18.1...v1.18.2
+[1.18.1]: https://github.com/Automattic/jetpack-status/compare/v1.18.0...v1.18.1
+[1.18.0]: https://github.com/Automattic/jetpack-status/compare/v1.17.2...v1.18.0
+[1.17.2]: https://github.com/Automattic/jetpack-status/compare/v1.17.1...v1.17.2
+[1.17.1]: https://github.com/Automattic/jetpack-status/compare/v1.17.0...v1.17.1
+[1.17.0]: https://github.com/Automattic/jetpack-status/compare/v1.16.4...v1.17.0
+[1.16.4]: https://github.com/Automattic/jetpack-status/compare/v1.16.3...v1.16.4
+[1.16.3]: https://github.com/Automattic/jetpack-status/compare/v1.16.2...v1.16.3
+[1.16.2]: https://github.com/Automattic/jetpack-status/compare/v1.16.1...v1.16.2
+[1.16.1]: https://github.com/Automattic/jetpack-status/compare/v1.16.0...v1.16.1
+[1.16.0]: https://github.com/Automattic/jetpack-status/compare/v1.15.4...v1.16.0
+[1.15.4]: https://github.com/Automattic/jetpack-status/compare/v1.15.3...v1.15.4
+[1.15.3]: https://github.com/Automattic/jetpack-status/compare/v1.15.2...v1.15.3
+[1.15.2]: https://github.com/Automattic/jetpack-status/compare/v1.15.1...v1.15.2
+[1.15.1]: https://github.com/Automattic/jetpack-status/compare/v1.15.0...v1.15.1
+[1.15.0]: https://github.com/Automattic/jetpack-status/compare/v1.14.3...v1.15.0
+[1.14.3]: https://github.com/Automattic/jetpack-status/compare/v1.14.2...v1.14.3
+[1.14.2]: https://github.com/Automattic/jetpack-status/compare/v1.14.1...v1.14.2
+[1.14.1]: https://github.com/Automattic/jetpack-status/compare/v1.14.0...v1.14.1
+[1.14.0]: https://github.com/Automattic/jetpack-status/compare/v1.13.6...v1.14.0
+[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
+[1.9.2]: https://github.com/Automattic/jetpack-status/compare/v1.9.1...v1.9.2
+[1.9.1]: https://github.com/Automattic/jetpack-status/compare/v1.9.0...v1.9.1
+[1.9.0]: https://github.com/Automattic/jetpack-status/compare/v1.8.4...v1.9.0
+[1.8.4]: https://github.com/Automattic/jetpack-status/compare/v1.8.3...v1.8.4
+[1.8.3]: https://github.com/Automattic/jetpack-status/compare/v1.8.2...v1.8.3
+[1.8.2]: https://github.com/Automattic/jetpack-status/compare/v1.8.1...v1.8.2
+[1.8.1]: https://github.com/Automattic/jetpack-status/compare/v1.8.0...v1.8.1
+[1.8.0]: https://github.com/Automattic/jetpack-status/compare/v1.7.6...v1.8.0
+[1.7.6]: https://github.com/Automattic/jetpack-status/compare/v1.7.5...v1.7.6
+[1.7.5]: https://github.com/Automattic/jetpack-status/compare/v1.7.4...v1.7.5
+[1.7.4]: https://github.com/Automattic/jetpack-status/compare/v1.7.3...v1.7.4
+[1.7.3]: https://github.com/Automattic/jetpack-status/compare/v1.7.2...v1.7.3
+[1.7.2]: https://github.com/Automattic/jetpack-status/compare/v1.7.1...v1.7.2
+[1.7.1]: https://github.com/Automattic/jetpack-status/compare/v1.7.0...v1.7.1
+[1.7.0]: https://github.com/Automattic/jetpack-status/compare/v1.6.0...v1.7.0
+[1.6.0]: https://github.com/Automattic/jetpack-status/compare/v1.5.0...v1.6.0
+[1.5.0]: https://github.com/Automattic/jetpack-status/compare/v1.4.0...v1.5.0
+[1.4.0]: https://github.com/Automattic/jetpack-status/compare/v1.3.0...v1.4.0
+[1.3.0]: https://github.com/Automattic/jetpack-status/compare/v1.2.0...v1.3.0
+[1.2.0]: https://github.com/Automattic/jetpack-status/compare/v1.1.1...v1.2.0
+[1.1.1]: https://github.com/Automattic/jetpack-status/compare/v1.1.0...v1.1.1
+[1.1.0]: https://github.com/Automattic/jetpack-status/compare/v1.0.4...v1.1.0
+[1.0.4]: https://github.com/Automattic/jetpack-status/compare/v1.0.3...v1.0.4
+[1.0.3]: https://github.com/Automattic/jetpack-status/compare/v1.0.2...v1.0.3
+[1.0.2]: https://github.com/Automattic/jetpack-status/compare/v1.0.1...v1.0.2
+[1.0.1]: https://github.com/Automattic/jetpack-status/compare/v1.0.0...v1.0.1
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/SECURITY.md
new file mode 100644
index 00000000..b4b46c0e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/composer.json
new file mode 100644
index 00000000..94ec5d09
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/composer.json
@@ -0,0 +1,43 @@
+{
+ "name": "automattic/jetpack-status",
+ "description": "Used to retrieve information about the current status of Jetpack and the site overall.",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {
+ "automattic/jetpack-constants": "^1.6.23"
+ },
+ "require-dev": {
+ "brain/monkey": "2.6.1",
+ "yoast/phpunit-polyfills": "1.1.0",
+ "automattic/jetpack-changelogger": "^3.3.10",
+ "automattic/jetpack-ip": "^0.1.6"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "test-php": [
+ "@composer phpunit"
+ ]
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-status",
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-status/compare/v${old}...v${new}"
+ },
+ "branch-alias": {
+ "dev-trunk": "1.18.x-dev"
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-cache.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-cache.php
new file mode 100644
index 00000000..54fa80d8
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-cache.php
@@ -0,0 +1,54 @@
+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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-errors.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-errors.php
new file mode 100644
index 00000000..342f1759
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-errors.php
@@ -0,0 +1,43 @@
+is_atomic_platform() && Constants::is_true( 'WPCOMSH__PLUGIN_FILE' );
+ Cache::set( 'is_woa_site', $ret );
+ }
+ return $ret;
+ }
+
+ /**
+ * Determine if the site is hosted on the Atomic hosting platform.
+ *
+ * @since 1.9.0
+ *
+ * @return bool;
+ */
+ public function is_atomic_platform() {
+ 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' );
+ }
+
+ /**
+ * Determine if this is a Simple platform site.
+ *
+ * @return bool
+ */
+ public function is_wpcom_simple() {
+ return Constants::is_defined( 'IS_WPCOM' ) && true === Constants::get_constant( 'IS_WPCOM' );
+ }
+
+ /**
+ * Determine if this is a WordPress.com site.
+ *
+ * Includes both Simple and WoA platforms.
+ *
+ * @return bool
+ */
+ public function is_wpcom_platform() {
+ return $this->is_wpcom_simple() || $this->is_woa_site();
+ }
+
+ /**
+ * Add all wordpress.com environments to the safe redirect allowed list.
+ *
+ * To be used with a filter of allowed domains for a redirect.
+ *
+ * @param array $domains Allowed WP.com Environments.
+ */
+ public static function allow_wpcom_environments( $domains ) {
+ $domains[] = 'wordpress.com';
+ $domains[] = 'jetpack.wordpress.com';
+ $domains[] = 'wpcalypso.wordpress.com';
+ $domains[] = 'horizon.wordpress.com';
+ $domains[] = 'calypso.localhost';
+ return $domains;
+ }
+
+ /**
+ * Return Calypso environment value; used for developing Jetpack and pairing
+ * it with different Calypso environments, such as localhost.
+ *
+ * @since 1.18.0
+ *
+ * @return string Calypso environment
+ */
+ public function get_calypso_env() {
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended -- Nonce is not required; only used for changing environments.
+ if ( isset( $_GET['calypso_env'] ) ) {
+ return sanitize_key( $_GET['calypso_env'] );
+ }
+ // phpcs:enable WordPress.Security.NonceVerification.Recommended
+
+ 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-modules.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-modules.php
new file mode 100644
index 00000000..fc2ed6fb
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-modules.php
@@ -0,0 +1,600 @@
+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'] );
+ } else {
+ $mod['module_tags'] = array( '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( '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. Doesn't apply to WP.com.
+ if ( ! in_array( 'protect', $active, true )
+ && ! ( new Host() )->is_wpcom_simple()
+ && 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 plugins.
+ $deactivated = array();
+ foreach ( $jetpack->plugins_to_deactivate[ $module ] as $idx => $deactivate_me ) {
+ if ( \Jetpack_Client_Server::deactivate_plugin( $deactivate_me[0], $deactivate_me[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.
+ $deactivated[] = "$module:$idx";
+ }
+ }
+ if ( $deactivated ) {
+ $state->state( 'deactivated_plugins', implode( ',', $deactivated ) );
+ wp_safe_redirect( add_query_arg( 'jetpack_restate', 1 ) );
+ exit;
+ }
+ }
+ }
+
+ // Protect won't work with mis-configured IPs.
+ if ( 'protect' === $module ) {
+ if ( ! IP_Utils::get_ip() ) {
+ $state->state( 'message', 'protect_misconfigured_ip' );
+ return false;
+ }
+ }
+
+ if ( ! 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-paths.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-paths.php
new file mode 100644
index 00000000..a3313c66
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-paths.php
@@ -0,0 +1,28 @@
+ 'jetpack' ) );
+ $url = add_query_arg( $args, admin_url( 'admin.php' ) );
+ return $url;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-status.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-status.php
new file mode 100644
index 00000000..b6d4a1e2
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-status.php
@@ -0,0 +1,414 @@
+is_offline_mode().
+ *
+ * @return bool Whether Jetpack's offline mode is active.
+ */
+ public function is_development_mode() {
+ _deprecated_function( __FUNCTION__, '1.3.0', 'Automattic\Jetpack\Status->is_offline_mode' );
+ return $this->is_offline_mode();
+ }
+
+ /**
+ * Is Jetpack in offline mode?
+ *
+ * This was formerly called "Development Mode", but sites "in development" aren't always offline/localhost.
+ *
+ * @since 1.3.0
+ *
+ * @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' ) ) {
+ $offline_mode = constant( '\\JETPACK_DEV_DEBUG' );
+ } elseif ( defined( '\\WP_LOCAL_DEV' ) ) {
+ $offline_mode = constant( '\\WP_LOCAL_DEV' );
+ } elseif ( $this->is_local_site() ) {
+ $offline_mode = true;
+ }
+
+ /**
+ * Filters Jetpack's offline mode.
+ *
+ * @see https://jetpack.com/support/development-mode/
+ * @todo Update documentation ^^.
+ *
+ * @since 1.1.1
+ * @since-jetpack 2.2.1
+ * @deprecated 1.3.0
+ *
+ * @param bool $offline_mode Is Jetpack's offline mode active.
+ */
+ $offline_mode = (bool) apply_filters_deprecated( 'jetpack_development_mode', array( $offline_mode ), '1.3.0', 'jetpack_offline_mode' );
+
+ /**
+ * Filters Jetpack's offline mode.
+ *
+ * @see https://jetpack.com/support/development-mode/
+ * @todo Update documentation ^^.
+ *
+ * @since 1.3.0
+ *
+ * @param bool $offline_mode Is Jetpack's offline mode active.
+ */
+ $offline_mode = (bool) apply_filters( 'jetpack_offline_mode', $offline_mode );
+
+ Cache::set( 'is_offline_mode', $offline_mode );
+ return $offline_mode;
+ }
+
+ /**
+ * Is Jetpack in "No User test mode"?
+ *
+ * This will make Jetpack act as if there were no connected users, but only a site connection (aka blog token)
+ *
+ * @since 1.6.0
+ * @deprecated 1.7.5 Since this version, Jetpack connection is considered active after registration, making no_user_testing_mode obsolete.
+ *
+ * @return bool Whether Jetpack's No User Testing Mode is active.
+ */
+ public function is_no_user_testing_mode() {
+ _deprecated_function( __METHOD__, '1.7.5' );
+ return true;
+ }
+
+ /**
+ * Whether this is a system with a multiple networks.
+ * Implemented since there is no core is_multi_network function.
+ * Right now there is no way to tell which network is the dominant network on the system.
+ *
+ * @return boolean
+ */
+ 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;
+ }
+
+ /**
+ * Whether the current site is single user site.
+ *
+ * @return bool
+ */
+ public function is_single_user_site() {
+ global $wpdb;
+
+ $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 $ret;
+ }
+
+ /**
+ * If the site is a local site.
+ *
+ * @since 1.3.0
+ *
+ * @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, '.' );
+
+ // Use Core's environment check, if available.
+ if ( 'local' === wp_get_environment_type() ) {
+ $is_local = true;
+ }
+
+ // Then check for usual usual domains used by local dev tools.
+ $known_local = array(
+ '#\.local$#i',
+ '#\.localhost$#i',
+ '#\.test$#i',
+ '#\.docksal$#i', // Docksal.
+ '#\.docksal\.site$#i', // Docksal.
+ '#\.dev\.cc$#i', // ServerPress.
+ '#\.lndo\.site$#i', // Lando.
+ '#^https?://127\.0\.0\.1$#',
+ );
+
+ if ( ! $is_local ) {
+ foreach ( $known_local as $url ) {
+ if ( preg_match( $url, $site_url ) ) {
+ $is_local = true;
+ break;
+ }
+ }
+ }
+
+ /**
+ * Filters is_local_site check.
+ *
+ * @since 1.3.0
+ *
+ * @param bool $is_local If the current site is a local site.
+ */
+ $is_local = apply_filters( 'jetpack_is_local_site', $is_local );
+
+ Cache::set( 'is_local_site', $is_local );
+ return $is_local;
+ }
+
+ /**
+ * If is a staging site.
+ *
+ * @todo Add IDC detection to a package.
+ *
+ * @return bool
+ */
+ public function is_staging_site() {
+ $cached = Cache::get( 'is_staging_site' );
+ if ( null !== $cached ) {
+ return $cached;
+ }
+
+ /*
+ * 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 = ! in_array( wp_get_environment_type(), array( 'production', 'local' ), true );
+
+ $known_staging = array(
+ 'urls' => array(
+ '#\.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.
+ '#\.newspackstaging\.com$#i', // Newspack.
+ '#^(?!live-)([a-zA-Z0-9-]+)\.pantheonsite\.io$#i', // Pantheon.
+ '#\.flywheelsites\.com$#i', // Flywheel.
+ '#\.flywheelstaging\.com$#i', // Flywheel.
+ '#\.cloudwaysapps\.com$#i', // Cloudways.
+ '#\.azurewebsites\.net$#i', // Azure.
+ '#\.wpserveur\.net$#i', // WPServeur.
+ '#\-liquidwebsites\.com$#i', // Liquidweb.
+ ),
+ 'constants' => array(
+ '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.
+ 'WP_LOCAL_DEV', // Generic.
+ ),
+ );
+ /**
+ * Filters the flags of known staging sites.
+ *
+ * @since 1.1.1
+ * @since-jetpack 3.9.0
+ *
+ * @param array $known_staging {
+ * An array of arrays that each are used to check if the current site is staging.
+ * @type array $urls URLs of staging sites in regex to check against site_url.
+ * @type array $constants PHP constants of known staging/developement environments.
+ * }
+ */
+ $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 ) ) ) {
+ $is_staging = true;
+ break;
+ }
+ }
+ }
+
+ if ( isset( $known_staging['constants'] ) ) {
+ foreach ( $known_staging['constants'] as $constant ) {
+ if ( defined( $constant ) && constant( $constant ) ) {
+ $is_staging = true;
+ }
+ }
+ }
+
+ // Last, let's check if sync is erroring due to an IDC. If so, set the site to staging mode.
+ if ( ! $is_staging && method_exists( 'Automattic\\Jetpack\\Identity_Crisis', 'validate_sync_error_idc_option' ) && \Automattic\Jetpack\Identity_Crisis::validate_sync_error_idc_option() ) {
+ $is_staging = true;
+ }
+
+ /**
+ * Filters is_staging_site check.
+ *
+ * @since 1.1.1
+ * @since-jetpack 3.9.0
+ *
+ * @param bool $is_staging If the current site is a staging site.
+ */
+ $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;
+ }
+
+ /**
+ * Whether the site is currently private or not.
+ * On WordPress.com and WoA, sites can be marked as private
+ *
+ * @since 1.16.0
+ *
+ * @return bool True if the site is private.
+ */
+ public function is_private_site() {
+ $ret = Cache::get( 'is_private_site' );
+ if ( null === $ret ) {
+ $is_private_site = '-1' === get_option( 'blog_public' );
+
+ /**
+ * Filters the is_private_site check.
+ *
+ * @since 1.16.1
+ *
+ * @param bool $is_private_site True if the site is private.
+ */
+ $is_private_site = apply_filters( 'jetpack_is_private_site', $is_private_site );
+
+ Cache::set( 'is_private_site', $is_private_site );
+ return $is_private_site;
+ }
+ return $ret;
+ }
+
+ /**
+ * Whether the site is currently unlaunched or not.
+ * On WordPress.com and WoA, sites can be marked as "coming soon", aka unlaunched
+ *
+ * @since 1.16.0
+ *
+ * @return bool True if the site is not launched.
+ */
+ public function is_coming_soon() {
+ $ret = Cache::get( 'is_coming_soon' );
+ if ( null === $ret ) {
+ $is_coming_soon = (bool) ( function_exists( 'site_is_coming_soon' ) && \site_is_coming_soon() )
+ || get_option( 'wpcom_public_coming_soon' );
+
+ /**
+ * Filters the is_coming_soon check.
+ *
+ * @since 1.16.1
+ *
+ * @param bool $is_coming_soon True if the site is coming soon (i.e. unlaunched).
+ */
+ $is_coming_soon = apply_filters( 'jetpack_is_coming_soon', $is_coming_soon );
+
+ Cache::set( 'is_coming_soon', $is_coming_soon );
+ return $is_coming_soon;
+ }
+ return $ret;
+ }
+
+ /**
+ * Returns the site slug suffix to be used as part of Calypso URLs.
+ *
+ * Strips http:// or https:// from a url, replaces forward slash with ::.
+ *
+ * @since 1.6.0
+ *
+ * @param string $url Optional. URL to build the site suffix from. Default: Home URL.
+ *
+ * @return string
+ */
+ public function get_site_suffix( $url = '' ) {
+ // On WordPress.com, site suffixes are a bit different.
+ if ( method_exists( 'WPCOM_Masterbar', 'get_calypso_site_slug' ) ) {
+ 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 '/', 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 rtrim( $url, ':' );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php
new file mode 100644
index 00000000..518e5029
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php
@@ -0,0 +1,43 @@
+ 0
+
+### Fixed
+- Fix PHP 8.1 deprecation warnings.
+
+## [1.27.1] - 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.27.0] - 2021-10-26
+### Added
+- Added the _wpas_feature_enabled meta key to the sync list
+- Sync Error Log to capture failed sync requests.
+
+### Fixed
+- Check the return value of get_comment() before to use it.
+- Increase send timeout to 20 seconds allowing capture of WP.com 408 responses.
+
+## [1.26.4] - 2021-10-13
+### Changed
+- Sync Checksums: Convert text fields to latin1 before generating checksum.
+- Updated package dependencies.
+
+### Fixed
+- Sync Checksums - Update distinct clause to use $wpdb-> table names to accouunt for differences in prefixes.
+
+## [1.26.3] - 2021-10-12
+### Changed
+- Updated package dependencies
+
+### Removed
+- Remove initialization of the identity-crisis package. That will be handled by the Config package.
+
+### Fixed
+- Reduce transient expiration for how often we check the state of the queue.
+- Sync Checksums - exclude locale from checksum if same as site setting
+- Sync Checksums - use distinct query when calculating count of Term Relationships
+
+## [1.26.2] - 2021-09-28
+### Added
+- Add support for checksumming user-related tabled: wp_users and wp_usermeta
+
+### Changed
+- Update annotations versions.
+- Updated package dependencies.
+
+### Fixed
+- Resolve indirect modification notice.
+- Sync Checksums: utilize distinct clause in term counts.
+- Sync Queue: better handling of serialization issues and empty actions.
+
+## [1.26.1] - 2021-09-03
+### Fixed
+- Add better checks if the WooCommerce tables should be enabled for checksum/fix.
+- Prevent PHP notices on queue_pull if all args are not set.
+
+## [1.26.0] - 2021-08-30
+### Added
+- Add support for WooCommerce table to the checksum/fix process.
+- Enable support for utf8 conversion during checksum calculation.
+
+### Changed
+- Don't run composer install on regular phpunit script
+- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills).
+
+### Fixed
+- Sync Checksums - ensure last object is included in histogram
+
+## [1.25.0] - 2021-08-12
+### Added
+- Add package version tracking.
+- Add `wpcom_is_fse_activated` to sync list
+- Made /sync/object endpoint accessible over POST, not only GET, to allow fetching more items in a single request.
+
+## [1.24.2] - 2021-08-02
+
+- Reverted: Sync option for the Carousel to display colorized slide background.
+
+## [1.24.1] - 2021-07-29
+### Changed
+- Utilize an import for WP_Error in all instances.
+
+### Fixed
+- Fixed unqualified WP_Error use in the Rest_Sender class.
+
+## [1.24.0] - 2021-07-27
+### Added
+- Add a package version constant.
+- Add Full Site Editing support to callback options.
+- Sync option for the Carousel to display colorized slide background.
+
+### Fixed
+- Update Sender so it adheres to max upload bytes when not encoding items.
+
+## [1.23.3] - 2021-07-16
+### Fixed
+- Update Options module to return jetpack_sync_settings_* values from the Settings class vs direct option lookup.
+
+## [1.23.2] - 2021-07-13
+### Changed
+- Updated package dependencies.
+
+### Fixed
+- Performance of Sync checksums degraded with the update to correlated subquery. This restricts its usage to term_taxonomy joins only."
+
+## [1.23.1] - 2021-07-01
+### Changed
+- Checksum parent_table joins need distinct selection to account for possibility of multiple rows.
+
+### Fixed
+- Update term_taxonomy checksum query to an allowed list vs disallowed
+
+## [1.23.0] - 2021-06-29
+### Added
+- Add jetpack_idc_disonnect action to clear Sync options on disconnect.
+- Add support to callables to sync/object endpoint.
+- Enable sync/object endpoint support for theme-info.
+- Enhance updates module to support get_objects_by_id.
+- Expand sync/object to support constants.
+- Extend sync/object to support callables.
+- Implement v4 REST endpoints.
+- Initialize the IDC package in the Sync package.
+
+### Removed
+- Remove product_cat from blocked taxonomies
+
+## [1.22.0] - 2021-06-15
+### Changed
+- Sync: Adding the Identity_Crisis package.
+- Updated package dependencies.
+
+### Deprecated
+- Deprecated URL methods in `Automattic\Jetpack\Sync\Functions` in favor of `Automattic\Jetpack\Connection\Urls`.
+
+## [1.21.3] - 2021-05-25
+### Changed
+- Performance: If no Full Sync is in process early return before we update options.
+
+### Fixed
+- Janitorial: avoid PHP notices in some edge-cases
+- Update Meta Module so get_object_by_id returns all meta values.
+
+## [1.21.2] - 2021-04-27
+### Added
+- Added the password-checker package the the Sync package composer.json file.
+
+### Changed
+- Updated package dependencies.
+
+### Fixed
+- Sync: removed references to the JETPACK__PLUGIN_DIR constant.
+- Sync Checksums : updated postmeta range query performance #19337.
+
+## [1.21.1] - 2021-03-30
+### Added
+- Composer alias for dev-master, to improve dependencies
+- Implement a 60 second back-off for non-200 respones, if no retry-after header is present in the response.
+- Impose a max limit of 2MB on post meta values that are synced.
+- Impose a max limit of 5MB on post_content that can be synced.
+
+### Changed
+- Sync: Use the new Password_Checker package instead of Jetpack_Password_Checker.
+- Update package dependencies.
+- Use the Heartbeat package to generate the stats array
+
+### Fixed
+- Migrate locks to update_option to avaoid memcache inconsistencies that can be introduced by delete_option usage.
+- Update Sync Queue so that serialize is wrapped to catch errors
+
+## [1.21.0] - 2021-02-23
+
+- General: update WordPress version requirements to WP 5.6
+- Update Checksums to support blacklisted taxonomies.
+- Refactor Jetpack callables into the plugin using existing filter jetpack_sync_callable_whitelist
+- Wrap call_user_func in is_callable so that we don't trigger warnings for callables that don't exist.
+- Sync: Trigger initial sync on jetpack_site_registered
+- Update Comments checksum field to comment_date_gmt. We cannot use comment_content directly due to charset/filters.
+- Deprecate jetpack_json_wrap
+- Remove Sync's usage of wp_startswith
+
+## [1.20.2] - 2021-02-08
+
+- Update dependencies to latest stable
+
+## [1.20.1] - 2021-01-28
+
+- Update dependencies to latest stable
+
+## [1.20.0] - 2021-01-26
+
+- Sync Concurrency / Race Conditions
+- Sync: Prevent an PHP warning
+- Jetpack Sync: Checksums: Use a better way to fetch and validate fields against table
+- Add mirror-repo information to all current composer packages
+- Full Sync :: Reduce Concurrency.
+- Monorepo: Reorganize all projects
+- Various PHPCS and Cleanup
+
+## [1.19.4] - 2021-01-18
+
+- Update dependencies to latest stable
+
+## [1.19.3] - 2021-01-18
+
+- Full Sync :: Reduce Concurrency.
+
+## [1.19.2] - 2020-12-21
+
+- Update the do_full_sync function to early return if we are in SYNC READ ONLY mode.
+- Return an empty array if the specified range is empty. (It was returning the checksum for the WHOLE dataset).
+
+## [1.19.1] - 2020-12-17
+
+## [1.19.0] - 2020-12-17
+
+- sync: Improve sync checksum algorithm and endpoints
+- wp_get_environment_type as callable.
+- Disallow amp_validated_url as it is not site content but instead validation errors for amp mark-up.
+- Whitelist (allow) jetpack_sync_settings_* options to be synced
+- Re-order Sync default option whitelist (allowlist)
+
+## [1.18.1] - 2020-11-24
+
+- Version packages for release
+
+## [1.18.0] - 2020-11-24
+
+- Migrate jetpack_published_post to wp_after_insert_post hook
+- Check value to determine if we should enable sync after an action enqueuement.
+- General: update minimum required version to WordPress 5.5
+- Fix remaining phpcs warnings in most of requirelist
+- Update access of comment_status_to_approval_value to allow extension.
+- Update get_term Replicastore function to handle term_taxonomy_id option
+- Update get_terms to utilize ensure_taxonomy so that the Taxonomy is registered.
+- Addtion of note on explict return of null instead of false if option not found.
+- Alignment of comment_status_to_approval_value function. Addition of post-trashed status and cleanup of cases.
+- Alignment with implemenations. Call ensure_taxonomy to ensure Taxonomies have been initialized.
+- Call ensure_taxonomy within get_object_terms so that the taxonomy is registered before action is performed.
+- Updated PHPCS: Packages and Debugger
+
+## [1.17.2] - 2020-11-05
+
+- Update dependencies to latest stable
+
+## [1.17.1] - 2020-10-29
+
+- Update dependencies to latest stable
+
+## [1.17.0] - 2020-10-27
+
+- WPCOM Block Editor: Update meta key name
+- Resolve PHP Warning with array_filter usage in sync of action_links.
+- Sync: Seperate theme data ( name, version, slug and uri) from theme support data
+- Replaced intval() with (int) as part of issue #17432.
+- Replaced strval() with type casting (string) as part of issue #17432.
+- Replaced floatval() with type cast (float) as part of issue #17432.
+- Make XMLRPC methods available for blog token
+
+## [1.16.4] - 2020-10-14
+
+- Update dependencies to latest stable
+
+## [1.16.3] - 2020-10-09
+
+- Update dependencies to latest stable
+
+## [1.16.2] - 2020-10-06
+
+- Update dependencies to latest stable
+
+## [1.16.1] - 2020-10-01
+
+- Update dependencies to latest stable
+
+## [1.16.0] - 2020-09-29
+
+- Publicize: Allow publishing a post as a Twitter thread.
+- props @jmdodd - filter out set_object_terms actions that don't perform any update. Includes unit tests.
+- Sort Arrays by keys before generating callable checksums
+- Packages: avoid PHPCS warnings
+- Adding 'review' to whitelisted comment types
+- Disable Sync sending on Backup API Requests
+- Sync: stop trying to check for edit_comment capability
+- Added options to sync wc whitelist
+- Sync: Improve theme support syncing
+
+## [1.15.1] - 2020-09-09
+
+- Update dependencies to latest stable
+
+## [1.15.0] - 2020-08-26
+
+- Sync: add Creative Mail configuration option to synced options
+- Extend sync_status endpoint with optional debug_details field
+- REST API endpoints: expand management endpoints
+- Sync: Fix nonce action string in theme edit sync
+- WP 5.5 Compat: Align Jetpack and Core's plugin autoupdates
+- use current user token to updateRole request
+- Resolve Sync Errors from empty edge case and WP.com returning concurrent_request_error
+- Rework Sender to properly return state during do_full_sync
+
+## [1.14.4] - 2020-08-10
+
+- WP 5.5 Compat: Align Jetpack and Core's plugin autoupdates
+
+## [1.14.3] - 2020-08-10
+
+- Update dependencies to latest stable
+
+## [1.14.2] - 2020-08-10
+
+- Update dependencies to latest stable
+
+## [1.14.1] - 2020-08-10
+
+- Resolve Sync Errors from empty edge case and WP.com returning concurrent_request_error
+
+## [1.14.0] - 2020-07-28
+
+- Core Compat: Site Environment
+- Unit Tests: fix tests according to changes in Core
+- Utilize the blog token vs master user token to send sync actions.
+
+## [1.13.2] - 2020-07-06
+
+- Update dependencies to latest stable
+
+## [1.13.1] - 2020-07-01
+
+- Update dependencies to latest stable
+
+## [1.13.0] - 2020-06-30
+
+- Block Flamingo Plugin post types in Jetpack Sync
+- Explicit single execution of do_full_sync from cron
+- Update to reference the property defined in the Jetpack Connection Manager class
+- PHPCS: Clean up the packages
+- WordAds: Add consent support for California Consumer Privacy Act (CCPA)
+- Sync: Add additional support for theme_support_whitelist
+
+## [1.12.4] - 2020-06-02
+
+- Revert "Fix `jetpack sync start` CLI command (#16010)"
+
+## [1.12.3] - 2020-06-01
+
+- Update dependencies to latest stable
+
+## [1.12.2] - 2020-06-01
+
+- Fix `jetpack sync start` CLI command
+
+## [1.12.1] - 2020-05-29
+
+- Sync: Add additional support for theme_support_whitelist
+
+## [1.12.0] - 2020-05-26
+
+- Update ReplicaStore to call clean_comment_cache when comments are upserted or a reset is perofrmed.
+- Store the list of active plugins that uses connection in an option
+- Jetpack Sync :: Alternate non-blocking flow
+- Settings - Writing: add a toggle to Carousel so users can hide comment area
+- Sender needs to load consistently utilizing logic
+- Always delete items from the queue even if the buffer is no longer checked out.
+- Update the hook of Sync's Comment module to not send meta actions when the comment_type is not whitelisted.
+- Sync Comments apply whitelist to all actions
+
+## [1.11.0] - 2020-04-28
+
+- Correct inline documentation "Array" type
+- Filter out blacklisted post_types for deleted_post actions.
+- Publicize: Add jetpack_publicize_options
+- Blacklisting Post Types from Sync
+- Comments: update default comment type
+- Jetpack Sync: Split `jetpack_post_meta_batch_delete` in action to be called in chunks of 100 items, compared to all at once.
+- Update Sync limits based on analysis of data loss events.
+
+## [1.10.0] - 2020-03-31
+
+- Update dependencies to latest stable
+
+## [1.9.0] - 2020-03-31
+
+- Debugger: Add sync health progress bar
+- Add main network WPCOM blog ID to sync functions
+- Masterbar: send wpcom user ID to wpcom when attempting to log…
+- Sync: a better readme
+
+## [1.8.0] - 2020-02-25
+
+- Minileven: add options back as they still exist on sites
+- Sync: add queue size to actions
+- Mobile Theme: remove feature
+
+## [1.7.6] - 2020-02-14
+
+- get_sync_status does not properly account for unexpected states.
+
+## [1.7.5] - 2020-02-14
+
+- Empty Helper function for checkin handler
+- Sync Health: fix excessive data loss reports
+- Initial Sync Health Status Class and Data Loss Handler
+- Stop REST API Log entries from being synced
+
+## [1.7.4+vip] - 2020-02-14
+
+- Empty Helper function for checkin handler
+
+## [1.7.4] - 2020-01-23
+
+- Sync Chunk Keys need to be unique
+
+## [1.7.3] - 2020-01-20
+
+- Sync: ensure we run the initial sync on new connections
+
+## [1.7.2] - 2020-01-17
+
+- Sync Package: use Full_Sync_Immediately by default
+- Adding new managed WordPress hosts to be identified in class-functions.php.
+
+## [1.7.1] - 2020-01-14
+
+- Packages: Various improvements for wp.com or self-contained consumers
+
+## [1.7.0] - 2020-01-14
+
+- Trying to add deterministic initialization.
+
+## [1.6.3] - 2020-01-07
+
+- Fix git history.
+
+## [1.6.2] - 2019-12-31
+
+- Sync: Remove DEFAULT_SYNC_MODULES legacy map
+- Connection: Loose Comparison for Port Number in Signatures
+
+## [1.6.1] - 2019-12-13
+
+- tweak default sync settings
+
+## [1.6.0] - 2019-12-02
+
+- Sync: Full Sync: Send immediately.
+
+## [1.5.1] - 2019-11-26
+
+- Marked the xmlrpc_api_url method as deprecated.
+
+## [1.5.0] - 2019-11-25
+
+- Remove sync settings cache
+
+## [1.4.0] - 2019-11-19
+
+- Full Sync: Don't allow more than one request to enqueue
+- Sync: Update Max Int
+
+## [1.3.4] - 2019-11-08
+
+- Packages: Use classmap instead of PSR-4
+
+## [1.3.3] - 2019-11-08
+
+- Deprecate Jetpack::is_development_mode() in favor of the packaged Status()->is_development_mode()
+
+## [1.3.2] - 2019-11-01
+
+- Full Sync updates to allow full enqueuing of chunks.
+
+## [1.3.1] - 2019-10-29
+
+- PHPCS: Rest of the packages
+
+## [1.3.0] - 2019-10-29
+
+- Sync: Checkout Endpoint: Add `pop` argument 😱
+
+## [1.2.1] - 2019-10-28
+
+- Sync: Add Settings to enable/disable the sender for a particular queue
+
+## [1.2.0] - 2019-10-24
+
+- Sync: Fix how we enqueue term_relationships on full sync 🏝
+- WP 5.3: Use modern wp_timezone
+- Check for last_error when enqueuing IDs
+
+## [1.1.1] - 2019-10-23
+
+- Use spread operator instead of func_get_args
+
+## [1.1.0] - 2019-10-07
+
+- Sync: Ensure a post object is returned
+- PHPCS: Sync Functions
+- Sync: Bail initial sync if there is an ongoing full sync
+
+## [1.0.2] - 2019-09-25
+
+- Sync: Only allow white listed comment types to be inserted.
+- Sync: Move sync_object XML-RPC method from connection to sync
+- Sync: do not sync comments made via Action Scheduler
+- Docs: Unify usage of @package phpdoc tags
+
+## [1.0.1] - 2019-09-14
+
+## 1.0.0 - 2019-09-14
+
+- Packages: Move sync to a classmapped package
+
+[1.58.1]: https://github.com/Automattic/jetpack-sync/compare/v1.58.0...v1.58.1
+[1.58.0]: https://github.com/Automattic/jetpack-sync/compare/v1.57.4...v1.58.0
+[1.57.4]: https://github.com/Automattic/jetpack-sync/compare/v1.57.3...v1.57.4
+[1.57.3]: https://github.com/Automattic/jetpack-sync/compare/v1.57.2...v1.57.3
+[1.57.2]: https://github.com/Automattic/jetpack-sync/compare/v1.57.1...v1.57.2
+[1.57.1]: https://github.com/Automattic/jetpack-sync/compare/v1.57.0...v1.57.1
+[1.57.0]: https://github.com/Automattic/jetpack-sync/compare/v1.56.0...v1.57.0
+[1.56.0]: https://github.com/Automattic/jetpack-sync/compare/v1.55.2...v1.56.0
+[1.55.2]: https://github.com/Automattic/jetpack-sync/compare/v1.55.1...v1.55.2
+[1.55.1]: https://github.com/Automattic/jetpack-sync/compare/v1.55.0...v1.55.1
+[1.55.0]: https://github.com/Automattic/jetpack-sync/compare/v1.54.0...v1.55.0
+[1.54.0]: https://github.com/Automattic/jetpack-sync/compare/v1.53.0...v1.54.0
+[1.53.0]: https://github.com/Automattic/jetpack-sync/compare/v1.52.0...v1.53.0
+[1.52.0]: https://github.com/Automattic/jetpack-sync/compare/v1.51.0...v1.52.0
+[1.51.0]: https://github.com/Automattic/jetpack-sync/compare/v1.50.2...v1.51.0
+[1.50.2]: https://github.com/Automattic/jetpack-sync/compare/v1.50.1...v1.50.2
+[1.50.1]: https://github.com/Automattic/jetpack-sync/compare/v1.50.0...v1.50.1
+[1.50.0]: https://github.com/Automattic/jetpack-sync/compare/v1.49.0...v1.50.0
+[1.49.0]: https://github.com/Automattic/jetpack-sync/compare/v1.48.1...v1.49.0
+[1.48.1]: https://github.com/Automattic/jetpack-sync/compare/v1.48.0...v1.48.1
+[1.48.0]: https://github.com/Automattic/jetpack-sync/compare/v1.47.9...v1.48.0
+[1.47.9]: https://github.com/Automattic/jetpack-sync/compare/v1.47.8...v1.47.9
+[1.47.8]: https://github.com/Automattic/jetpack-sync/compare/v1.47.7...v1.47.8
+[1.47.7]: https://github.com/Automattic/jetpack-sync/compare/v1.47.6...v1.47.7
+[1.47.6]: https://github.com/Automattic/jetpack-sync/compare/v1.47.5...v1.47.6
+[1.47.5]: https://github.com/Automattic/jetpack-sync/compare/v1.47.4...v1.47.5
+[1.47.4]: https://github.com/Automattic/jetpack-sync/compare/v1.47.3...v1.47.4
+[1.47.3]: https://github.com/Automattic/jetpack-sync/compare/v1.47.2...v1.47.3
+[1.47.2]: https://github.com/Automattic/jetpack-sync/compare/v1.47.1...v1.47.2
+[1.47.1]: https://github.com/Automattic/jetpack-sync/compare/v1.47.0...v1.47.1
+[1.47.0]: https://github.com/Automattic/jetpack-sync/compare/v1.46.1...v1.47.0
+[1.46.1]: https://github.com/Automattic/jetpack-sync/compare/v1.46.0...v1.46.1
+[1.46.0]: https://github.com/Automattic/jetpack-sync/compare/v1.45.0...v1.46.0
+[1.45.0]: https://github.com/Automattic/jetpack-sync/compare/v1.44.2...v1.45.0
+[1.44.2]: https://github.com/Automattic/jetpack-sync/compare/v1.44.1...v1.44.2
+[1.44.1]: https://github.com/Automattic/jetpack-sync/compare/v1.44.0...v1.44.1
+[1.44.0]: https://github.com/Automattic/jetpack-sync/compare/v1.43.2...v1.44.0
+[1.43.2]: https://github.com/Automattic/jetpack-sync/compare/v1.43.1...v1.43.2
+[1.43.1]: https://github.com/Automattic/jetpack-sync/compare/v1.43.0...v1.43.1
+[1.43.0]: https://github.com/Automattic/jetpack-sync/compare/v1.42.0...v1.43.0
+[1.42.0]: https://github.com/Automattic/jetpack-sync/compare/v1.41.0...v1.42.0
+[1.41.0]: https://github.com/Automattic/jetpack-sync/compare/v1.40.3...v1.41.0
+[1.40.3]: https://github.com/Automattic/jetpack-sync/compare/v1.40.2...v1.40.3
+[1.40.2]: https://github.com/Automattic/jetpack-sync/compare/v1.40.1...v1.40.2
+[1.40.1]: https://github.com/Automattic/jetpack-sync/compare/v1.40.0...v1.40.1
+[1.40.0]: https://github.com/Automattic/jetpack-sync/compare/v1.39.0...v1.40.0
+[1.39.0]: https://github.com/Automattic/jetpack-sync/compare/v1.38.4...v1.39.0
+[1.38.4]: https://github.com/Automattic/jetpack-sync/compare/v1.38.3...v1.38.4
+[1.38.3]: https://github.com/Automattic/jetpack-sync/compare/v1.38.2...v1.38.3
+[1.38.2]: https://github.com/Automattic/jetpack-sync/compare/v1.38.1...v1.38.2
+[1.38.1]: https://github.com/Automattic/jetpack-sync/compare/v1.38.0...v1.38.1
+[1.38.0]: https://github.com/Automattic/jetpack-sync/compare/v1.37.1...v1.38.0
+[1.37.1]: https://github.com/Automattic/jetpack-sync/compare/v1.37.0...v1.37.1
+[1.37.0]: https://github.com/Automattic/jetpack-sync/compare/v1.36.1...v1.37.0
+[1.36.1]: https://github.com/Automattic/jetpack-sync/compare/v1.36.0...v1.36.1
+[1.36.0]: https://github.com/Automattic/jetpack-sync/compare/v1.35.2...v1.36.0
+[1.35.2]: https://github.com/Automattic/jetpack-sync/compare/v1.35.1...v1.35.2
+[1.35.1]: https://github.com/Automattic/jetpack-sync/compare/v1.35.0...v1.35.1
+[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
+[1.27.4]: https://github.com/Automattic/jetpack-sync/compare/v1.27.3...v1.27.4
+[1.27.3]: https://github.com/Automattic/jetpack-sync/compare/v1.27.2...v1.27.3
+[1.27.2]: https://github.com/Automattic/jetpack-sync/compare/v1.27.1...v1.27.2
+[1.27.1]: https://github.com/Automattic/jetpack-sync/compare/v1.27.0...v1.27.1
+[1.27.0]: https://github.com/Automattic/jetpack-sync/compare/v1.26.4...v1.27.0
+[1.26.4]: https://github.com/Automattic/jetpack-sync/compare/v1.26.3...v1.26.4
+[1.26.3]: https://github.com/Automattic/jetpack-sync/compare/v1.26.2...v1.26.3
+[1.26.2]: https://github.com/Automattic/jetpack-sync/compare/v1.26.1...v1.26.2
+[1.26.1]: https://github.com/Automattic/jetpack-sync/compare/v1.26.0...v1.26.1
+[1.26.0]: https://github.com/Automattic/jetpack-sync/compare/v1.25.0...v1.26.0
+[1.25.0]: https://github.com/Automattic/jetpack-sync/compare/v1.24.2...v1.25.0
+[1.24.2]: https://github.com/Automattic/jetpack-sync/compare/v1.24.1...v1.24.2
+[1.24.1]: https://github.com/Automattic/jetpack-sync/compare/v1.24.0...v1.24.1
+[1.24.0]: https://github.com/Automattic/jetpack-sync/compare/v1.23.3...v1.24.0
+[1.23.3]: https://github.com/Automattic/jetpack-sync/compare/v1.23.2...v1.23.3
+[1.23.2]: https://github.com/Automattic/jetpack-sync/compare/v1.23.1...v1.23.2
+[1.23.1]: https://github.com/Automattic/jetpack-sync/compare/v1.23.0...v1.23.1
+[1.23.0]: https://github.com/Automattic/jetpack-sync/compare/v1.22.0...v1.23.0
+[1.22.0]: https://github.com/Automattic/jetpack-sync/compare/v1.21.3...v1.22.0
+[1.21.3]: https://github.com/Automattic/jetpack-sync/compare/v1.21.2...v1.21.3
+[1.21.2]: https://github.com/Automattic/jetpack-sync/compare/v1.21.1...v1.21.2
+[1.21.1]: https://github.com/Automattic/jetpack-sync/compare/v1.21.0...v1.21.1
+[1.21.0]: https://github.com/Automattic/jetpack-sync/compare/v1.20.2...v1.21.0
+[1.20.2]: https://github.com/Automattic/jetpack-sync/compare/v1.20.1...v1.20.2
+[1.20.1]: https://github.com/Automattic/jetpack-sync/compare/v1.20.0...v1.20.1
+[1.20.0]: https://github.com/Automattic/jetpack-sync/compare/v1.19.4...v1.20.0
+[1.19.4]: https://github.com/Automattic/jetpack-sync/compare/v1.19.3...v1.19.4
+[1.19.3]: https://github.com/Automattic/jetpack-sync/compare/v1.19.2...v1.19.3
+[1.19.2]: https://github.com/Automattic/jetpack-sync/compare/v1.19.1...v1.19.2
+[1.19.1]: https://github.com/Automattic/jetpack-sync/compare/v1.19.0...v1.19.1
+[1.19.0]: https://github.com/Automattic/jetpack-sync/compare/v1.18.1...v1.19.0
+[1.18.1]: https://github.com/Automattic/jetpack-sync/compare/v1.18.0...v1.18.1
+[1.18.0]: https://github.com/Automattic/jetpack-sync/compare/v1.17.2...v1.18.0
+[1.17.2]: https://github.com/Automattic/jetpack-sync/compare/v1.17.1...v1.17.2
+[1.17.1]: https://github.com/Automattic/jetpack-sync/compare/v1.17.0...v1.17.1
+[1.17.0]: https://github.com/Automattic/jetpack-sync/compare/v1.16.4...v1.17.0
+[1.16.4]: https://github.com/Automattic/jetpack-sync/compare/v1.16.3...v1.16.4
+[1.16.3]: https://github.com/Automattic/jetpack-sync/compare/v1.16.2...v1.16.3
+[1.16.2]: https://github.com/Automattic/jetpack-sync/compare/v1.16.1...v1.16.2
+[1.16.1]: https://github.com/Automattic/jetpack-sync/compare/v1.16.0...v1.16.1
+[1.16.0]: https://github.com/Automattic/jetpack-sync/compare/v1.15.1...v1.16.0
+[1.15.1]: https://github.com/Automattic/jetpack-sync/compare/v1.15.0...v1.15.1
+[1.15.0]: https://github.com/Automattic/jetpack-sync/compare/v1.14.4...v1.15.0
+[1.14.4]: https://github.com/Automattic/jetpack-sync/compare/v1.14.3...v1.14.4
+[1.14.3]: https://github.com/Automattic/jetpack-sync/compare/v1.14.2...v1.14.3
+[1.14.2]: https://github.com/Automattic/jetpack-sync/compare/v1.14.1...v1.14.2
+[1.14.1]: https://github.com/Automattic/jetpack-sync/compare/v1.14.0...v1.14.1
+[1.14.0]: https://github.com/Automattic/jetpack-sync/compare/v1.13.2...v1.14.0
+[1.13.2]: https://github.com/Automattic/jetpack-sync/compare/v1.13.1...v1.13.2
+[1.13.1]: https://github.com/Automattic/jetpack-sync/compare/v1.13.0...v1.13.1
+[1.13.0]: https://github.com/Automattic/jetpack-sync/compare/v1.12.4...v1.13.0
+[1.12.4]: https://github.com/Automattic/jetpack-sync/compare/v1.12.3...v1.12.4
+[1.12.3]: https://github.com/Automattic/jetpack-sync/compare/v1.12.2...v1.12.3
+[1.12.2]: https://github.com/Automattic/jetpack-sync/compare/v1.12.1...v1.12.2
+[1.12.1]: https://github.com/Automattic/jetpack-sync/compare/v1.12.0...v1.12.1
+[1.12.0]: https://github.com/Automattic/jetpack-sync/compare/v1.11.0...v1.12.0
+[1.11.0]: https://github.com/Automattic/jetpack-sync/compare/v1.10.0...v1.11.0
+[1.10.0]: https://github.com/Automattic/jetpack-sync/compare/v1.9.0...v1.10.0
+[1.9.0]: https://github.com/Automattic/jetpack-sync/compare/v1.8.0...v1.9.0
+[1.8.0]: https://github.com/Automattic/jetpack-sync/compare/v1.7.6...v1.8.0
+[1.7.6]: https://github.com/Automattic/jetpack-sync/compare/v1.7.5...v1.7.6
+[1.7.5]: https://github.com/Automattic/jetpack-sync/compare/v1.7.4+vip...v1.7.5
+[1.7.4+vip]: https://github.com/Automattic/jetpack-sync/compare/v1.7.4...v1.7.4+vip
+[1.7.4]: https://github.com/Automattic/jetpack-sync/compare/v1.7.3...v1.7.4
+[1.7.3]: https://github.com/Automattic/jetpack-sync/compare/v1.7.2...v1.7.3
+[1.7.2]: https://github.com/Automattic/jetpack-sync/compare/v1.7.1...v1.7.2
+[1.7.1]: https://github.com/Automattic/jetpack-sync/compare/v1.7.0...v1.7.1
+[1.7.0]: https://github.com/Automattic/jetpack-sync/compare/v1.6.3...v1.7.0
+[1.6.3]: https://github.com/Automattic/jetpack-sync/compare/v1.6.2...v1.6.3
+[1.6.2]: https://github.com/Automattic/jetpack-sync/compare/v1.6.1...v1.6.2
+[1.6.1]: https://github.com/Automattic/jetpack-sync/compare/v1.6.0...v1.6.1
+[1.6.0]: https://github.com/Automattic/jetpack-sync/compare/v1.5.1...v1.6.0
+[1.5.1]: https://github.com/Automattic/jetpack-sync/compare/v1.5.0...v1.5.1
+[1.5.0]: https://github.com/Automattic/jetpack-sync/compare/v1.4.0...v1.5.0
+[1.4.0]: https://github.com/Automattic/jetpack-sync/compare/v1.3.4...v1.4.0
+[1.3.4]: https://github.com/Automattic/jetpack-sync/compare/v1.3.3...v1.3.4
+[1.3.3]: https://github.com/Automattic/jetpack-sync/compare/v1.3.2...v1.3.3
+[1.3.2]: https://github.com/Automattic/jetpack-sync/compare/v1.3.1...v1.3.2
+[1.3.1]: https://github.com/Automattic/jetpack-sync/compare/v1.3.0...v1.3.1
+[1.3.0]: https://github.com/Automattic/jetpack-sync/compare/v1.2.1...v1.3.0
+[1.2.1]: https://github.com/Automattic/jetpack-sync/compare/v1.2.0...v1.2.1
+[1.2.0]: https://github.com/Automattic/jetpack-sync/compare/v1.1.1...v1.2.0
+[1.1.1]: https://github.com/Automattic/jetpack-sync/compare/v1.1.0...v1.1.1
+[1.1.0]: https://github.com/Automattic/jetpack-sync/compare/v1.0.2...v1.1.0
+[1.0.2]: https://github.com/Automattic/jetpack-sync/compare/v1.0.1...v1.0.2
+[1.0.1]: https://github.com/Automattic/jetpack-sync/compare/v1.0.0...v1.0.1
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/SECURITY.md
new file mode 100644
index 00000000..98f48dd1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/SECURITY.md
@@ -0,0 +1,47 @@
+# 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 and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions.
+
+## Reporting a Vulnerability
+
+Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure:
+
+* [Jetpack](https://jetpack.com/)
+* Jetpack Backup
+* Jetpack Boost
+* Jetpack CRM
+* Jetpack Protect
+* Jetpack Search
+* Jetpack Social
+* Jetpack VideoPress
+
+**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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/composer.json
new file mode 100644
index 00000000..2a34f886
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/composer.json
@@ -0,0 +1,59 @@
+{
+ "name": "automattic/jetpack-sync",
+ "description": "Everything needed to allow syncing to the WP.com infrastructure.",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {
+ "automattic/jetpack-connection": "^1.58.1",
+ "automattic/jetpack-constants": "^1.6.23",
+ "automattic/jetpack-identity-crisis": "^0.11.0",
+ "automattic/jetpack-password-checker": "^0.2.14",
+ "automattic/jetpack-ip": "^0.1.6",
+ "automattic/jetpack-roles": "^1.4.25",
+ "automattic/jetpack-status": "^1.18.5"
+ },
+ "require-dev": {
+ "automattic/jetpack-changelogger": "^3.3.11",
+ "yoast/phpunit-polyfills": "1.1.0",
+ "automattic/wordbless": "@dev"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "test-php": [
+ "@composer phpunit"
+ ],
+ "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy",
+ "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy"
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-sync",
+ "textdomain": "jetpack-sync",
+ "version-constants": {
+ "::PACKAGE_VERSION": "src/class-package-version.php"
+ },
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-sync/compare/v${old}...v${new}"
+ },
+ "branch-alias": {
+ "dev-trunk": "1.58.x-dev"
+ }
+ },
+ "config": {
+ "allow-plugins": {
+ "roots/wordpress-core-installer": true
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php
new file mode 100644
index 00000000..73fbfadf
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php
@@ -0,0 +1,1100 @@
+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.
+ *
+ * @access public
+ * @static
+ */
+ public static function mark_sync_read_only() {
+ Constants::set_constant( 'JETPACK_SYNC_READ_ONLY', true );
+ }
+
+ /**
+ * Decides if the sender should run on shutdown for this request.
+ *
+ * @access public
+ * @static
+ *
+ * @return bool
+ */
+ public static function should_initialize_sender() {
+
+ // Allow for explicit disable of Sync from request param jetpack_sync_read_only.
+ if ( isset( $_REQUEST['jetpack_sync_read_only'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
+ self::mark_sync_read_only();
+ return false;
+ }
+
+ if ( Constants::is_true( 'DOING_CRON' ) ) {
+ 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;
+ }
+
+ if ( current_user_can( 'manage_options' ) ) {
+ return true;
+ }
+
+ if ( is_admin() ) {
+ return true;
+ }
+
+ if ( defined( 'PHPUNIT_JETPACK_TESTSUITE' ) ) {
+ return true;
+ }
+
+ if ( Constants::get_constant( 'WP_CLI' ) ) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Decides if the sender should run on shutdown when actions are queued.
+ *
+ * @access public
+ * @static
+ *
+ * @param bool $enable Should we initilize sender.
+ * @return bool
+ */
+ public static function should_initialize_sender_enqueue( $enable ) {
+
+ // If $enabled is false don't modify it, only check cron if enabled.
+ if ( false === $enable ) {
+ return $enable;
+ }
+
+ if ( Constants::is_true( 'DOING_CRON' ) ) {
+ return self::sync_via_cron_allowed();
+ }
+
+ return true;
+ }
+
+ /**
+ * Decides if sync should run at all during this request.
+ *
+ * @access public
+ * @static
+ *
+ * @return bool
+ */
+ public static function sync_allowed() {
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ return false;
+ }
+
+ if ( defined( 'PHPUNIT_JETPACK_TESTSUITE' ) ) {
+ return true;
+ }
+
+ if ( ! Settings::is_sync_enabled() ) {
+ return false;
+ }
+
+ if ( ( new Status() )->is_offline_mode() ) {
+ return false;
+ }
+
+ if ( ( new Status() )->is_staging_site() ) {
+ return false;
+ }
+
+ $connection = new Jetpack_Connection();
+ if ( ! $connection->is_connected() ) {
+ if ( ! doing_action( 'jetpack_site_registered' ) ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Helper function to get details as to why sync is not allowed, if it is not allowed.
+ *
+ * @return array
+ */
+ public static function get_debug_details() {
+ $debug = array();
+ $debug['debug_details']['sync_allowed'] = self::sync_allowed();
+ $debug['debug_details']['sync_health'] = Health::get_status();
+ if ( false === $debug['debug_details']['sync_allowed'] ) {
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ $debug['debug_details']['is_wpcom'] = true;
+ }
+ if ( defined( 'PHPUNIT_JETPACK_TESTSUITE' ) ) {
+ $debug['debug_details']['PHPUNIT_JETPACK_TESTSUITE'] = true;
+ }
+ if ( ! Settings::is_sync_enabled() ) {
+ $debug['debug_details']['is_sync_enabled'] = false;
+ $debug['debug_details']['jetpack_sync_disable'] = Settings::get_setting( 'disable' );
+ $debug['debug_details']['jetpack_sync_network_disable'] = Settings::get_setting( 'network_disable' );
+ }
+ if ( ( new Status() )->is_offline_mode() ) {
+ $debug['debug_details']['is_offline_mode'] = true;
+ }
+ if ( ( new Status() )->is_staging_site() ) {
+ $debug['debug_details']['is_staging_site'] = true;
+ }
+ $connection = new Jetpack_Connection();
+ if ( ! $connection->is_connected() ) {
+ $debug['debug_details']['active_connection'] = false;
+ }
+ }
+
+ // Sync locks.
+ $debug['debug_details']['dedicated_sync_enabled'] = Settings::is_dedicated_sync_enabled();
+
+ $queue = self::$sender->get_sync_queue();
+ $full_queue = self::$sender->get_full_sync_queue();
+
+ $debug['debug_details']['sync_locks'] = array(
+ 'retry_time_sync' => get_option( self::RETRY_AFTER_PREFIX . 'sync' ),
+ 'retry_time_full_sync' => get_option( self::RETRY_AFTER_PREFIX . 'full_sync' ),
+ 'next_sync_time_sync' => self::$sender->get_next_sync_time( 'sync' ),
+ 'next_sync_time_full_sync' => self::$sender->get_next_sync_time( 'full_sync' ),
+ 'queue_locked_sync' => $queue->is_locked(),
+ 'queue_locked_full_sync' => $full_queue->is_locked(),
+ 'dedicated_sync_request_lock' => \Jetpack_Options::get_raw_option( Dedicated_Sender::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, null ),
+ 'dedicated_sync_temporary_disable_flag' => get_transient( Dedicated_Sender::DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG ),
+ );
+
+ // Sync Logs.
+ $debug['debug_details']['last_succesful_sync'] = get_option( self::LAST_SUCCESS_PREFIX . 'sync', '' );
+ $debug['debug_details']['sync_error_log'] = get_option( self::ERROR_LOG_PREFIX . 'sync', '' );
+
+ return $debug;
+ }
+
+ /**
+ * Determines if syncing during a cron job is allowed.
+ *
+ * @access public
+ * @static
+ *
+ * @return bool|int
+ */
+ public static function sync_via_cron_allowed() {
+ return ( Settings::get_setting( 'sync_via_cron' ) );
+ }
+
+ /**
+ * Decides if the given post should be Publicized based on its type.
+ *
+ * @access public
+ * @static
+ *
+ * @param bool $should_publicize Publicize status prior to this filter running.
+ * @param \WP_Post $post The post to test for Publicizability.
+ * @return bool
+ */
+ public static function prevent_publicize_blacklisted_posts( $should_publicize, $post ) {
+ if ( in_array( $post->post_type, Settings::get_setting( 'post_types_blacklist' ), true ) ) {
+ return false;
+ }
+
+ return $should_publicize;
+ }
+
+ /**
+ * Set an importing flag to `true` in sync settings.
+ *
+ * @access public
+ * @static
+ */
+ public static function set_is_importing_true() {
+ Settings::set_importing( true );
+ }
+
+ /**
+ * Sends data to WordPress.com via an XMLRPC request.
+ *
+ * @access public
+ * @static
+ *
+ * @param object $data Data relating to a sync action.
+ * @param string $codec_name The name of the codec that encodes the data.
+ * @param float $sent_timestamp Current server time so we can compensate for clock differences.
+ * @param string $queue_id The queue the action belongs to, sync or full_sync.
+ * @param float $checkout_duration Time spent retrieving queue items from the DB.
+ * @param float $preprocess_duration Time spent converting queue items into data to send.
+ * @param int $queue_size The size of the sync queue at the time of processing.
+ * @param string $buffer_id The ID of the Queue buffer checked out for processing.
+ * @return mixed|WP_Error The result of the sending request.
+ */
+ 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,
+ // 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',
+ 'storage_type' => Settings::is_custom_queue_table_enabled() ? 'custom' : 'options',
+ );
+
+ $query_args['timeout'] = Settings::is_doing_cron() ? 30 : 20;
+
+ if ( 'immediate-send' === $queue_id ) {
+ $query_args['timeout'] = 30;
+ }
+
+ /**
+ * Filters query parameters appended to the Sync request URL sent to WordPress.com.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.7.0
+ *
+ * @param array $query_args associative array of query parameters.
+ */
+ $query_args = apply_filters( 'jetpack_sync_send_data_query_args', $query_args );
+
+ $connection = new Jetpack_Connection();
+ $url = add_query_arg( $query_args, $connection->xmlrpc_api_url() );
+
+ // If we're currently updating to Jetpack 7.7, the IXR client may be missing briefly
+ // because since 7.7 it's being autoloaded with Composer.
+ if ( ! class_exists( '\\Jetpack_IXR_Client' ) ) {
+ return new WP_Error(
+ 'ixr_client_missing',
+ esc_html__( 'Sync has been aborted because the IXR client is missing.', 'jetpack-sync' )
+ );
+ }
+
+ $rpc = new \Jetpack_IXR_Client(
+ array(
+ 'url' => $url,
+ 'timeout' => $query_args['timeout'],
+ )
+ );
+
+ $result = $rpc->query( 'jetpack.syncActions', $data );
+
+ // Adhere to Retry-After headers.
+ $retry_after = $rpc->get_response_header( 'Retry-After' );
+ if ( false !== $retry_after ) {
+ if ( (int) $retry_after > 0 ) {
+ update_option( self::RETRY_AFTER_PREFIX . $queue_id, microtime( true ) + (int) $retry_after, false );
+ } else {
+ // if unexpected value default to 3 minutes.
+ update_option( self::RETRY_AFTER_PREFIX . $queue_id, microtime( true ) + 180, false );
+ }
+ }
+
+ // Enable/Disable Dedicated Sync flow via response headers.
+ $dedicated_sync_header = $rpc->get_response_header( 'Jetpack-Dedicated-Sync' );
+ if ( false !== $dedicated_sync_header ) {
+ Dedicated_Sender::maybe_change_dedicated_sync_status_from_wpcom_header( $dedicated_sync_header );
+ }
+
+ if ( ! $result ) {
+ if ( false === $retry_after ) {
+ // We received a non standard response from WP.com, lets backoff from sending requests for 1 minute.
+ update_option( self::RETRY_AFTER_PREFIX . $queue_id, microtime( true ) + 60, false );
+ }
+ // Record Sync Errors.
+ $error_log = get_option( self::ERROR_LOG_PREFIX . $queue_id, array() );
+ if ( ! is_array( $error_log ) ) {
+ $error_log = array();
+ }
+ // Trim existing array to last 4 entries.
+ if ( 5 <= count( $error_log ) ) {
+ $error_log = array_slice( $error_log, -4, null, true );
+ }
+ // Add new error indexed to time.
+ $error = $rpc->get_jetpack_error();
+ $error->add_data( $rpc->get_last_response() );
+ $error_log[ (string) microtime( true ) ] = $error;
+ // Update the error log.
+ update_option( self::ERROR_LOG_PREFIX . $queue_id, $error_log );
+
+ // return request error.
+ return $rpc->get_jetpack_error();
+ }
+
+ $response = $rpc->getResponse();
+
+ // Check if WordPress.com IDC mitigation blocked the sync request.
+ if ( Identity_Crisis::init()->check_response_for_idc( $response ) ) {
+ return new WP_Error(
+ 'sync_error_idc',
+ esc_html__( 'Sync has been blocked from WordPress.com because it would cause an identity crisis', 'jetpack-sync' )
+ );
+ }
+
+ // Record last successful sync.
+ update_option( self::LAST_SUCCESS_PREFIX . $queue_id, microtime( true ), false );
+
+ return $response;
+ }
+
+ /**
+ * Kicks off the initial sync.
+ *
+ * @access public
+ * @static
+ *
+ * @return bool|null False if sync is not allowed.
+ */
+ public static function do_initial_sync() {
+ // Let's not sync if we are not supposed to.
+ if ( ! self::sync_allowed() ) {
+ return false;
+ }
+
+ // Don't start new sync if a full sync is in process.
+ $full_sync_module = Modules::get_module( 'full-sync' );
+ if ( $full_sync_module && $full_sync_module->is_started() && ! $full_sync_module->is_finished() ) {
+ return false;
+ }
+
+ $initial_sync_config = array(
+ 'options' => true,
+ 'functions' => true,
+ 'constants' => true,
+ 'users' => array( get_current_user_id() ),
+ 'network_options' => true,
+ );
+
+ self::do_full_sync( $initial_sync_config );
+ }
+
+ /**
+ * Do an initial full sync only if one has not already been started.
+ *
+ * @return bool|null False if the initial full sync was already started, otherwise null.
+ */
+ public static function do_only_first_initial_sync() {
+ $full_sync_module = Modules::get_module( 'full-sync' );
+ if ( $full_sync_module && $full_sync_module->is_started() ) {
+ return false;
+ }
+
+ static::do_initial_sync();
+ }
+
+ /**
+ * Kicks off a full sync.
+ *
+ * @access public
+ * @static
+ *
+ * @param array $modules The sync modules should be included in this full sync. All will be included if null.
+ * @return bool True if full sync was successfully started.
+ */
+ public static function do_full_sync( $modules = null ) {
+ if ( ! self::sync_allowed() ) {
+ return false;
+ }
+
+ $full_sync_module = Modules::get_module( 'full-sync' );
+
+ if ( ! $full_sync_module ) {
+ return false;
+ }
+
+ self::initialize_listener();
+
+ $full_sync_module->start( $modules );
+
+ return true;
+ }
+
+ /**
+ * Adds a cron schedule for regular syncing via cron, unless the schedule already exists.
+ *
+ * @access public
+ * @static
+ *
+ * @param array $schedules The list of WordPress cron schedules prior to this filter.
+ * @return array A list of WordPress cron schedules with the Jetpack sync interval added.
+ */
+ public static function jetpack_cron_schedule( $schedules ) {
+ if ( ! isset( $schedules[ self::DEFAULT_SYNC_CRON_INTERVAL_NAME ] ) ) {
+ $minutes = (int) ( self::DEFAULT_SYNC_CRON_INTERVAL_VALUE / 60 );
+ $display = ( 1 === $minutes ) ?
+ __( 'Every minute', 'jetpack-sync' ) :
+ /* translators: %d is an integer indicating the number of minutes. */
+ sprintf( __( 'Every %d minutes', 'jetpack-sync' ), $minutes );
+ $schedules[ self::DEFAULT_SYNC_CRON_INTERVAL_NAME ] = array(
+ 'interval' => self::DEFAULT_SYNC_CRON_INTERVAL_VALUE,
+ 'display' => $display,
+ );
+ }
+ return $schedules;
+ }
+
+ /**
+ * Starts an incremental sync via cron.
+ *
+ * @access public
+ * @static
+ */
+ public static function do_cron_sync() {
+ self::do_cron_sync_by_type( 'sync' );
+ }
+
+ /**
+ * Starts a full sync via cron.
+ *
+ * @access public
+ * @static
+ */
+ public static function do_cron_full_sync() {
+ self::do_cron_sync_by_type( 'full_sync' );
+ }
+
+ /**
+ * Try to send actions until we run out of things to send,
+ * or have to wait more than 15s before sending again,
+ * or we hit a lock or some other sending issue
+ *
+ * @access public
+ * @static
+ *
+ * @param string $type Sync type. Can be `sync` or `full_sync`.
+ */
+ public static function do_cron_sync_by_type( $type ) {
+ if ( ! self::sync_allowed() || ( 'sync' !== $type && 'full_sync' !== $type ) ) {
+ return;
+ }
+
+ self::initialize_sender();
+
+ $time_limit = Settings::get_setting( 'cron_sync_time_limit' );
+ $start_time = time();
+ $executions = 0;
+
+ do {
+ $next_sync_time = self::$sender->get_next_sync_time( $type );
+
+ if ( $next_sync_time ) {
+ $delay = $next_sync_time - time() + 1;
+ if ( $delay > 15 ) {
+ break;
+ } elseif ( $delay > 0 ) {
+ sleep( $delay );
+ }
+ }
+
+ // Explicitly only allow 1 do_full_sync call until issue with Immediate Full Sync is resolved.
+ // For more context see p1HpG7-9pe-p2.
+ if ( 'full_sync' === $type && $executions >= 1 ) {
+ 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.
+ ++$executions;
+
+ } while ( $result && ! is_wp_error( $result ) && ( $start_time + $time_limit ) > time() );
+
+ return $executions;
+ }
+
+ /**
+ * Initialize the sync listener.
+ *
+ * @access public
+ * @static
+ */
+ public static function initialize_listener() {
+ self::$listener = Listener::get_instance();
+ }
+
+ /**
+ * Initializes the sync sender.
+ *
+ * @access public
+ * @static
+ */
+ public static function initialize_sender() {
+ self::$sender = Sender::get_instance();
+ add_filter( 'jetpack_sync_send_data', array( __CLASS__, 'send_data' ), 10, 8 );
+ }
+
+ /**
+ * Initializes sync for WooCommerce.
+ *
+ * @access public
+ * @static
+ */
+ public static function initialize_woocommerce() {
+ if ( false === class_exists( 'WooCommerce' ) ) {
+ return;
+ }
+ add_filter( 'jetpack_sync_modules', array( __CLASS__, 'add_woocommerce_sync_module' ) );
+
+ if ( ! class_exists( CustomOrdersTableController::class ) ) {
+ return;
+ }
+ $cot_controller = wc_get_container()->get( CustomOrdersTableController::class );
+ if ( $cot_controller->custom_orders_table_usage_is_enabled() ) {
+ add_filter( 'jetpack_sync_modules', array( __CLASS__, 'add_woocommerce_hpos_order_sync_module' ) );
+ }
+ }
+
+ /**
+ * 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
+ * @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 Woo's modules.
+ */
+ public static function add_woocommerce_sync_module( $sync_modules ) {
+ $sync_modules[] = 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce';
+ return $sync_modules;
+ }
+
+ /**
+ * Adds Woo's HPOS sync modules to existing modules for sending.
+ *
+ * @param array $sync_modules The list of sync modules declared prior to this filter.
+ *
+ * @access public
+ * @static
+ *
+ * @return array A list of sync modules that now includes Woo's HPOS modules.
+ */
+ public static function add_woocommerce_hpos_order_sync_module( $sync_modules ) {
+ $sync_modules[] = WooCommerce_HPOS_Orders::class;
+ return $sync_modules;
+ }
+
+ /**
+ * Initializes sync for WP Super Cache.
+ *
+ * @access public
+ * @static
+ */
+ public static function initialize_wp_super_cache() {
+ if ( false === function_exists( 'wp_cache_is_enabled' ) ) {
+ return;
+ }
+ add_filter( 'jetpack_sync_modules', array( __CLASS__, 'add_wp_super_cache_sync_module' ) );
+ }
+
+ /**
+ * Adds WP Super Cache's sync modules to existing modules for sending.
+ *
+ * @access public
+ * @static
+ *
+ * @param array $sync_modules The list of sync modules declared prior to this filer.
+ * @return array A list of sync modules that now includes WP Super Cache's modules.
+ */
+ public static function add_wp_super_cache_sync_module( $sync_modules ) {
+ $sync_modules[] = 'Automattic\\Jetpack\\Sync\\Modules\\WP_Super_Cache';
+ return $sync_modules;
+ }
+
+ /**
+ * Sanitizes the name of sync's cron schedule.
+ *
+ * @access public
+ * @static
+ *
+ * @param string $schedule The name of a WordPress cron schedule.
+ * @return string The sanitized name of sync's cron schedule.
+ */
+ public static function sanitize_filtered_sync_cron_schedule( $schedule ) {
+ $schedule = sanitize_key( $schedule );
+ $schedules = wp_get_schedules();
+
+ // Make sure that the schedule has actually been registered using the `cron_intervals` filter.
+ if ( isset( $schedules[ $schedule ] ) ) {
+ return $schedule;
+ }
+
+ return self::DEFAULT_SYNC_CRON_INTERVAL_NAME;
+ }
+
+ /**
+ * Allows offsetting of start times for sync cron jobs.
+ *
+ * @access public
+ * @static
+ *
+ * @param string $schedule The name of a cron schedule.
+ * @param string $hook The hook that this method is responding to.
+ * @return int The offset for the sync cron schedule.
+ */
+ public static function get_start_time_offset( $schedule = '', $hook = '' ) {
+ $start_time_offset = is_multisite()
+ ? wp_rand( 0, ( 2 * self::DEFAULT_SYNC_CRON_INTERVAL_VALUE ) )
+ : 0;
+
+ /**
+ * Allows overriding the offset that the sync cron jobs will first run. This can be useful when scheduling
+ * cron jobs across multiple sites in a network.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.5.0
+ *
+ * @param int $start_time_offset
+ * @param string $hook
+ * @param string $schedule
+ */
+ return (int) apply_filters(
+ 'jetpack_sync_cron_start_time_offset',
+ $start_time_offset,
+ $hook,
+ $schedule
+ );
+ }
+
+ /**
+ * Decides if a sync cron should be scheduled.
+ *
+ * @access public
+ * @static
+ *
+ * @param string $schedule The name of a cron schedule.
+ * @param string $hook The hook that this method is responding to.
+ */
+ public static function maybe_schedule_sync_cron( $schedule, $hook ) {
+ if ( ! $hook ) {
+ return;
+ }
+ $schedule = self::sanitize_filtered_sync_cron_schedule( $schedule );
+
+ $start_time = time() + self::get_start_time_offset( $schedule, $hook );
+ if ( ! wp_next_scheduled( $hook ) ) {
+ // Schedule a job to send pending queue items once a minute.
+ wp_schedule_event( $start_time, $schedule, $hook );
+ } elseif ( wp_get_schedule( $hook ) !== $schedule ) {
+ // If the schedule has changed, update the schedule.
+ wp_clear_scheduled_hook( $hook );
+ wp_schedule_event( $start_time, $schedule, $hook );
+ }
+ }
+
+ /**
+ * Clears Jetpack sync cron jobs.
+ *
+ * @access public
+ * @static
+ */
+ public static function clear_sync_cron_jobs() {
+ wp_clear_scheduled_hook( 'jetpack_sync_cron' );
+ wp_clear_scheduled_hook( 'jetpack_sync_full_cron' );
+ }
+
+ /**
+ * Initializes Jetpack sync cron jobs.
+ *
+ * @access public
+ * @static
+ */
+ public static function init_sync_cron_jobs() {
+ add_filter( 'cron_schedules', array( __CLASS__, 'jetpack_cron_schedule' ) ); // phpcs:ignore WordPress.WP.CronInterval.ChangeDetected
+
+ add_action( 'jetpack_sync_cron', array( __CLASS__, 'do_cron_sync' ) );
+ add_action( 'jetpack_sync_full_cron', array( __CLASS__, 'do_cron_full_sync' ) );
+
+ /**
+ * Allows overriding of the default incremental sync cron schedule which defaults to once every 5 minutes.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.3.2
+ *
+ * @param string self::DEFAULT_SYNC_CRON_INTERVAL_NAME
+ */
+ $incremental_sync_cron_schedule = apply_filters( 'jetpack_sync_incremental_sync_interval', self::DEFAULT_SYNC_CRON_INTERVAL_NAME );
+ self::maybe_schedule_sync_cron( $incremental_sync_cron_schedule, 'jetpack_sync_cron' );
+
+ /**
+ * Allows overriding of the full sync cron schedule which defaults to once every 5 minutes.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.3.2
+ *
+ * @param string self::DEFAULT_SYNC_CRON_INTERVAL_NAME
+ */
+ $full_sync_cron_schedule = apply_filters( 'jetpack_sync_full_sync_interval', self::DEFAULT_SYNC_CRON_INTERVAL_NAME );
+ self::maybe_schedule_sync_cron( $full_sync_cron_schedule, 'jetpack_sync_full_cron' );
+ }
+
+ /**
+ * Perform maintenance when a plugin upgrade occurs.
+ *
+ * @access public
+ * @static
+ *
+ * @param string $new_version New version of the plugin.
+ * @param string $old_version Old version of the plugin.
+ */
+ public static function cleanup_on_upgrade( $new_version = '', $old_version = '' ) {
+ if ( wp_next_scheduled( 'jetpack_sync_send_db_checksum' ) ) {
+ wp_clear_scheduled_hook( 'jetpack_sync_send_db_checksum' );
+ }
+
+ $is_new_sync_upgrade = version_compare( $old_version, '4.2', '>=' );
+ if ( ! empty( $old_version ) && $is_new_sync_upgrade && version_compare( $old_version, '4.5', '<' ) ) {
+ self::clear_sync_cron_jobs();
+ Settings::update_settings(
+ array(
+ 'render_filtered_content' => Defaults::$default_render_filtered_content,
+ )
+ );
+ }
+
+ Health::on_jetpack_upgraded();
+ }
+
+ /**
+ * Get syncing status for the given fields.
+ *
+ * @access public
+ * @static
+ *
+ * @param string|null $fields A comma-separated string of the fields to include in the array from the JSON response.
+ * @return array An associative array with the status report.
+ */
+ public static function get_sync_status( $fields = null ) {
+ self::initialize_sender();
+
+ $sync_module = Modules::get_module( 'full-sync' );
+ $queue = self::$sender->get_sync_queue();
+
+ // _get_cron_array can be false
+ $cron_timestamps = ( _get_cron_array() ) ? array_keys( _get_cron_array() ) : array();
+ $next_cron = ( ! empty( $cron_timestamps ) ) ? $cron_timestamps[0] - time() : '';
+
+ $checksums = array();
+ $debug = array();
+
+ if ( ! empty( $fields ) ) {
+ $store = new Replicastore();
+ $fields_params = array_map( 'trim', explode( ',', $fields ) );
+
+ if ( in_array( 'posts_checksum', $fields_params, true ) ) {
+ $checksums['posts_checksum'] = $store->posts_checksum();
+ }
+ if ( in_array( 'comments_checksum', $fields_params, true ) ) {
+ $checksums['comments_checksum'] = $store->comments_checksum();
+ }
+ if ( in_array( 'post_meta_checksum', $fields_params, true ) ) {
+ $checksums['post_meta_checksum'] = $store->post_meta_checksum();
+ }
+ if ( in_array( 'comment_meta_checksum', $fields_params, true ) ) {
+ $checksums['comment_meta_checksum'] = $store->comment_meta_checksum();
+ }
+
+ if ( in_array( 'debug_details', $fields_params, true ) ) {
+ $debug = self::get_debug_details();
+ }
+ }
+
+ $full_sync_status = ( $sync_module ) ? $sync_module->get_status() : array();
+
+ $full_queue = self::$sender->get_full_sync_queue();
+
+ $result = array_merge(
+ $full_sync_status,
+ $checksums,
+ $debug,
+ array(
+ 'cron_size' => count( $cron_timestamps ),
+ 'next_cron' => $next_cron,
+ 'queue_size' => $queue->size(),
+ 'queue_lag' => $queue->lag(),
+ 'queue_next_sync' => ( self::$sender->get_next_sync_time( 'sync' ) - microtime( true ) ),
+ 'full_queue_next_sync' => ( self::$sender->get_next_sync_time( 'full_sync' ) - microtime( true ) ),
+ )
+ );
+
+ // Verify $sync_module is not false.
+ if ( ( $sync_module ) && false === strpos( get_class( $sync_module ), 'Full_Sync_Immediately' ) ) {
+ $result['full_queue_size'] = $full_queue->size();
+ $result['full_queue_lag'] = $full_queue->lag();
+ }
+ return $result;
+ }
+
+ /**
+ * Reset Sync locks.
+ *
+ * @access public
+ * @static
+ * @since 1.43.0
+ *
+ * @param bool $unlock_queues Whether to unlock Sync queues. Defaults to true.
+ */
+ public static function reset_sync_locks( $unlock_queues = true ) {
+ // Next sync locks.
+ delete_option( Sender::NEXT_SYNC_TIME_OPTION_NAME . '_sync' );
+ delete_option( Sender::NEXT_SYNC_TIME_OPTION_NAME . '_full_sync' );
+ delete_option( Sender::NEXT_SYNC_TIME_OPTION_NAME . '_full-sync-enqueue' );
+ // Retry after locks.
+ delete_option( self::RETRY_AFTER_PREFIX . 'sync' );
+ delete_option( self::RETRY_AFTER_PREFIX . 'full_sync' );
+ // Dedicated sync locks.
+ \Jetpack_Options::delete_raw_option( Dedicated_Sender::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME );
+ delete_transient( Dedicated_Sender::DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG );
+
+ // Queue locks.
+ // Note that we are just unlocking the queues here, not reseting them.
+ if ( $unlock_queues ) {
+ $sync_queue = new Queue( 'sync' );
+ $sync_queue->unlock();
+
+ $full_sync_queue = new Queue( 'full_sync' );
+ $full_sync_queue->unlock();
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php
new file mode 100644
index 00000000..c2f9288c
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php
@@ -0,0 +1,417 @@
+ array(
+ 'Automattic\\Jetpack\\Sync\\Modules\\Callables',
+ 'Automattic\\Jetpack\\Sync\\Modules\\Constants',
+ 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately', // enable Initial Sync on Site Connection.
+ 'Automattic\\Jetpack\\Sync\\Modules\\Options',
+ 'Automattic\\Jetpack\\Sync\\Modules\\Updates',
+ ),
+ 'jetpack_sync_callable_whitelist' => array(
+ 'site_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'site_url' ),
+ 'home_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'home_url' ),
+ 'get_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins' ),
+ 'get_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_themes' ),
+ 'paused_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_plugins' ),
+ 'paused_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_themes' ),
+ 'timezone' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_timezone' ),
+ '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' ),
+ ),
+ 'jetpack_sync_constants_whitelist' => array(
+ 'ABSPATH',
+ 'ALTERNATE_WP_CRON',
+ 'ATOMIC_CLIENT_ID',
+ 'AUTOMATIC_UPDATER_DISABLED',
+ 'DISABLE_WP_CRON',
+ 'DISALLOW_FILE_EDIT',
+ 'DISALLOW_FILE_MODS',
+ 'EMPTY_TRASH_DAYS',
+ 'FS_METHOD',
+ 'IS_PRESSABLE',
+ 'PHP_VERSION',
+ 'WP_ACCESSIBLE_HOSTS',
+ 'WP_AUTO_UPDATE_CORE',
+ 'WP_CONTENT_DIR',
+ 'WP_CRON_LOCK_TIMEOUT',
+ 'WP_DEBUG',
+ 'WP_HTTP_BLOCK_EXTERNAL',
+ 'WP_MAX_MEMORY_LIMIT',
+ 'WP_MEMORY_LIMIT',
+ 'WP_POST_REVISIONS',
+ ),
+ 'jetpack_sync_options_whitelist' => array(
+ /**
+ * Sync related options
+ */
+ 'jetpack_sync_non_blocking',
+ 'jetpack_sync_non_public_post_stati',
+ 'jetpack_sync_settings_comment_meta_whitelist',
+ 'jetpack_sync_settings_post_meta_whitelist',
+ 'jetpack_sync_settings_post_types_blacklist',
+ 'jetpack_sync_settings_taxonomies_blacklist',
+ 'jetpack_sync_settings_dedicated_sync_enabled',
+ 'jetpack_sync_settings_custom_queue_table_enabled',
+ /**
+ * Connection related options
+ */
+ 'jetpack_connection_active_plugins',
+ /**
+ * Generic site options
+ */
+ 'blog_charset',
+ 'blog_public',
+ 'blogdescription',
+ 'blogname',
+ 'permalink_structure',
+ 'stylesheet',
+ 'time_format',
+ 'timezone_string',
+ ),
+ );
+
+ 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 ) || ! is_array( $plugin_settings ) ) {
+ /*
+ * No custom plugin settings, 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 ] ) && is_array( $filters_settings[ self::MODULES_FILTER_NAME ] ) ) {
+ $this->add_custom_filter_setting( self::MODULES_FILTER_NAME, $filters_settings[ self::MODULES_FILTER_NAME ] );
+ $enabled_modules = $filters_settings[ self::MODULES_FILTER_NAME ];
+ } else {
+ $this->add_sync_filter_setting( self::MODULES_FILTER_NAME, Modules::DEFAULT_SYNC_MODULES );
+ $enabled_modules = Modules::DEFAULT_SYNC_MODULES;
+ }
+
+ $all_modules = Modules::DEFAULT_SYNC_MODULES;
+
+ foreach ( $all_modules as $module ) {
+ if ( in_array( $module, $enabled_modules, true ) || in_array( $module, self::MUST_SYNC_DATA_SETTINGS['jetpack_sync_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 ) {
+ // If the corresponding setting is already set and matches the default one, no need to proceed.
+ if ( isset( static::$data_settings[ $filter ] ) && static::$data_settings[ $filter ] === $this->get_default_setting_for_filter( $filter ) ) {
+ continue;
+ }
+ $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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php
new file mode 100644
index 00000000..baf5e381
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php
@@ -0,0 +1,423 @@
+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 );
+ }
+ /**
+ * How much time to wait before we start suspecting Dedicated Sync is in trouble.
+ */
+ $queue_send_time_threshold = 30 * MINUTE_IN_SECONDS;
+
+ $queue_lag = $queue->lag();
+
+ // Only check if we're failing to send events if the queue lag is longer than the threshold.
+ if ( $queue_lag > $queue_send_time_threshold ) {
+ /**
+ * Check if Dedicated Sync is healthy and revert to Default Sync if such case is detected.
+ */
+ $last_successful_queue_send_time = get_option( Actions::LAST_SUCCESS_PREFIX . $queue->id, null );
+
+ if ( $last_successful_queue_send_time === null ) {
+ /**
+ * No successful sync sending completed. This might be either a "new" sync site or a site that's totally stuck.
+ */
+ self::on_dedicated_sync_lag_not_sending_threshold_reached();
+
+ return new WP_Error( 'dedicated_sync_not_sending', 'Dedicated Sync is not successfully sending events' );
+ } else {
+ /**
+ * We have recorded a successful sending of events. Let's see if that is not too long ago in the past.
+ */
+ $time_since_last_succesful_send = time() - $last_successful_queue_send_time;
+
+ if ( $time_since_last_succesful_send > $queue_send_time_threshold ) {
+ // We haven't successfully sent stuff in more than 30 minutes. Revert to Default Sync
+ self::on_dedicated_sync_lag_not_sending_threshold_reached();
+
+ return new WP_Error( 'dedicated_sync_not_sending', 'Dedicated Sync is not successfully sending events' );
+ }
+ }
+ }
+
+ /**
+ * Try to acquire a request lock, so we don't spawn multiple requests at the same time.
+ * This should prevent cases where sites might have limits on the amount of simultaneous requests.
+ */
+ $request_lock = self::try_lock_spawn_request();
+ if ( ! $request_lock ) {
+ return new WP_Error( 'dedicated_request_lock', 'Unable to acquire request lock' );
+ }
+
+ $url = rest_url( 'jetpack/v4/sync/spawn-sync' );
+ $url = add_query_arg( 'time', time(), $url ); // Enforce Cache busting.
+ $url = add_query_arg( self::DEDICATED_SYNC_REQUEST_LOCK_QUERY_PARAM_NAME, $request_lock, $url );
+
+ $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;
+ }
+
+ /**
+ * Attempt to acquire a request lock.
+ *
+ * To avoid spawning multiple requests at the same time, we need to have a quick lock that will
+ * allow only a single request to continue if we try to spawn multiple at the same time.
+ *
+ * @return false|mixed|string
+ */
+ public static function try_lock_spawn_request() {
+ $current_microtime = (string) microtime( true );
+
+ if ( wp_using_ext_object_cache() ) {
+ if ( true !== wp_cache_add( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, $current_microtime, 'jetpack', self::DEDICATED_SYNC_REQUEST_LOCK_TIMEOUT ) ) {
+ // Cache lock has been claimed already.
+ return false;
+ }
+ }
+
+ $current_lock_value = \Jetpack_Options::get_raw_option( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, null );
+
+ if ( ! empty( $current_lock_value ) ) {
+ // Check if time has passed to overwrite the lock - min 5s?
+ if ( is_numeric( $current_lock_value ) && ( ( $current_microtime - $current_lock_value ) < self::DEDICATED_SYNC_REQUEST_LOCK_TIMEOUT ) ) {
+ // Still in previous lock, quit
+ return false;
+ }
+
+ // If the value is not numeric (float/current time), we want to just overwrite it and continue.
+ }
+
+ // Update. We don't want it to autoload, as we want to fetch it right before the checks.
+ \Jetpack_Options::update_raw_option( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, $current_microtime, false );
+ // Give some time for the update to happen
+ usleep( wp_rand( 1000, 3000 ) );
+
+ $updated_value = \Jetpack_Options::get_raw_option( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, null );
+
+ if ( $updated_value === $current_microtime ) {
+ return $current_microtime;
+ }
+
+ return false;
+ }
+
+ /**
+ * Attempt to release the request lock.
+ *
+ * @param string $lock_id The request lock that's currently being held.
+ *
+ * @return bool|WP_Error
+ */
+ public static function try_release_lock_spawn_request( $lock_id = '' ) {
+ // Try to get the lock_id from the current request if it's not supplied.
+ if ( empty( $lock_id ) ) {
+ $lock_id = self::get_request_lock_id_from_request();
+ }
+
+ // If it's still not a valid lock_id, throw an error and let the lock process figure it out.
+ if ( empty( $lock_id ) || ! is_numeric( $lock_id ) ) {
+ return new WP_Error( 'dedicated_request_lock_invalid', 'Invalid lock_id supplied for unlock' );
+ }
+
+ if ( wp_using_ext_object_cache() ) {
+ if ( (string) $lock_id === wp_cache_get( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, 'jetpack', true ) ) {
+ wp_cache_delete( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, 'jetpack' );
+ }
+ }
+
+ // If this is the flow that has the lock, let's release it so we can spawn other requests afterwards
+ $current_lock_value = \Jetpack_Options::get_raw_option( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, null );
+ if ( (string) $lock_id === $current_lock_value ) {
+ \Jetpack_Options::delete_raw_option( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME );
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Try to get the request lock id from the current request.
+ *
+ * @return array|string|string[]|null
+ */
+ public static function get_request_lock_id_from_request() {
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended
+ if ( ! isset( $_GET[ self::DEDICATED_SYNC_REQUEST_LOCK_QUERY_PARAM_NAME ] ) || ! is_numeric( $_GET[ self::DEDICATED_SYNC_REQUEST_LOCK_QUERY_PARAM_NAME ] ) ) {
+ return null;
+ }
+
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
+ return wp_unslash( $_GET[ self::DEDICATED_SYNC_REQUEST_LOCK_QUERY_PARAM_NAME ] );
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Disable dedicated sync and set a transient to prevent re-enabling it for some time.
+ *
+ * @return void
+ */
+ public static function on_dedicated_sync_lag_not_sending_threshold_reached() {
+ set_transient( self::DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG, true, 6 * HOUR_IN_SECONDS );
+
+ Settings::update_settings(
+ array(
+ 'dedicated_sync_enabled' => 0,
+ )
+ );
+
+ // Inform that we had to temporarily disable Dedicated Sync
+ $data = array(
+ 'timestamp' => microtime( true ),
+
+ // Send the flow type that was attempted.
+ 'sync_flow_type' => 'dedicated',
+ );
+
+ $sender = Sender::get_instance();
+
+ $sender->send_action( 'jetpack_sync_flow_error_temp_disable', $data );
+ }
+
+ /**
+ * Disable or enable Dedicated Sync sender based on the header value returned from WordPress.com
+ *
+ * @param string $dedicated_sync_header The Dedicated Sync header value - `on` or `off`.
+ *
+ * @return bool Whether Dedicated Sync is going to be enabled or not.
+ */
+ public static function maybe_change_dedicated_sync_status_from_wpcom_header( $dedicated_sync_header ) {
+ $dedicated_sync_enabled = 'on' === $dedicated_sync_header ? 1 : 0;
+
+ // Prevent enabling of Dedicated sync via header flag if we're in an autoheal timeout.
+ if ( $dedicated_sync_enabled ) {
+ $check_transient = get_transient( self::DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG );
+
+ if ( $check_transient ) {
+ // Something happened and Dedicated Sync should not be automatically re-enabled.
+ return false;
+ }
+ }
+
+ Settings::update_settings(
+ array(
+ 'dedicated_sync_enabled' => $dedicated_sync_enabled,
+ )
+ );
+
+ return Settings::is_dedicated_sync_enabled();
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php
new file mode 100644
index 00000000..81946fe8
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php
@@ -0,0 +1,80 @@
+ '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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php
new file mode 100644
index 00000000..a443bba9
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php
@@ -0,0 +1,1318 @@
+ array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_loaded_extensions' ),
+ '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' ),
+ 'hosting_provider' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_hosting_provider' ),
+ 'is_fse_theme' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_is_fse_theme' ),
+ 'is_main_network' => array( __CLASS__, 'is_multi_network' ),
+ 'is_multi_site' => 'is_multisite',
+ 'is_version_controlled' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'is_version_controlled' ),
+ 'locale' => 'get_locale',
+ 'main_network_site' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'main_network_site_url' ),
+ 'main_network_site_wpcom_id' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'main_network_site_wpcom_id' ),
+ 'paused_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_plugins' ),
+ 'paused_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_themes' ),
+ 'post_type_features' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_post_type_features' ),
+ 'post_types' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_post_types' ),
+ 'rest_api_allowed_post_types' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'rest_api_allowed_post_types' ),
+ 'rest_api_allowed_public_metadata' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'rest_api_allowed_public_metadata' ),
+ 'roles' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'roles' ),
+ 'shortcodes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_shortcodes' ),
+ 'site_icon_url' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'site_icon_url' ),
+ 'site_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'site_url' ),
+ 'taxonomies' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_taxonomies' ),
+ 'theme_support' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_theme_support' ),
+ 'timezone' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_timezone' ),
+ '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' ),
+ );
+
+ /**
+ * Array of post type attributes synced.
+ *
+ * @var array Default post type attributes.
+ */
+ public static $default_post_type_attributes = array(
+ '_builtin' => false,
+ '_edit_link' => 'post.php?post=%d',
+ 'can_export' => true,
+ 'cap' => array(),
+ 'capabilities' => array(),
+ 'capability_type' => 'post',
+ 'delete_with_user' => null,
+ 'description' => '',
+ 'exclude_from_search' => true,
+ 'has_archive' => false,
+ 'hierarchical' => false,
+ 'label' => '',
+ 'labels' => array(),
+ 'map_meta_cap' => true,
+ 'menu_icon' => null,
+ 'menu_position' => null,
+ 'name' => '',
+ 'public' => false,
+ 'publicly_queryable' => null,
+ 'query_var' => true,
+ 'rest_base' => false,
+ 'rewrite' => true,
+ 'show_in_admin_bar' => false,
+ 'show_in_menu' => null,
+ 'show_in_nav_menus' => null,
+ 'show_in_rest' => false,
+ 'show_ui' => false,
+ 'supports' => array(),
+ 'taxonomies' => array(),
+ );
+
+ /**
+ * Get the whitelist of callables allowed to be managed via the JSON API.
+ *
+ * @return array Whitelist of callables allowed to be managed via the JSON API.
+ */
+ public static function get_callable_whitelist() {
+ /**
+ * Filter the list of callables that are manageable via the JSON API.
+ *
+ * @module sync
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.8.0
+ *
+ * @param array The default list of callables.
+ */
+ return apply_filters( 'jetpack_sync_callable_whitelist', self::$default_callable_whitelist );
+ }
+
+ /**
+ * Post types that will not be synced.
+ *
+ * These are usually automated post types (sitemaps, logs, etc).
+ *
+ * @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.
+ 'bwg_album',
+ 'bwg_gallery',
+ 'customize_changeset', // WP built-in post type for Customizer changesets.
+ 'dn_wp_yt_log',
+ 'flamingo_contact', // https://wordpress.org/plugins/flamingo/.
+ 'flamingo_inbound',
+ 'flamingo_outbound',
+ 'http',
+ 'idx_page',
+ 'jetpack_inspect_log', // Jetpack Inspect dev tool. p1HpG7-nkd-p2
+ 'jetpack_migration',
+ 'jp_img_sitemap',
+ 'jp_img_sitemap_index',
+ 'jp_sitemap',
+ 'jp_sitemap_index',
+ 'jp_sitemap_master',
+ 'jp_vid_sitemap',
+ 'jp_vid_sitemap_index',
+ 'msm_sitemap', // Metro Sitemap Plugin.
+ 'postman_sent_mail',
+ 'rssap-feed',
+ 'rssmi_feed_item',
+ 'scheduled-action', // Action Scheduler - Job Queue for WordPress https://github.com/woocommerce/woocommerce/tree/e7762627c37ec1f7590e6cac4218ba0c6a20024d/includes/libraries/action-scheduler .
+ 'secupress_log_action',
+ 'sg_optimizer_jobs',
+ 'sl-insta-media',
+ 'snitch',
+ 'vip-legacy-redirect',
+ 'wp-rest-api-log', // https://wordpress.org/plugins/wp-rest-api-log/.
+ 'wp_automatic',
+ 'wp_log', // WP Logging Plugin.
+ 'wpephpcompat_jobs',
+ 'wprss_feed_item',
+ );
+
+ /**
+ * Taxonomies that we're not syncing by default.
+ *
+ * The list is compiled by auditing the dynamic filters and actions that contain taxonomy slugs
+ * and could conflict with other existing filters/actions in WP core, Jetpack and WooCommerce.
+ *
+ * @var array
+ */
+ public static $blacklisted_taxonomies = array(
+ 'ancestors',
+ 'archives_link',
+ 'attached_file',
+ 'attached_media',
+ 'attached_media_args',
+ 'attachment',
+ 'available_languages',
+ 'avatar',
+ 'avatar_comment_types',
+ 'avatar_data',
+ 'avatar_url',
+ 'bloginfo_rss',
+ 'blogs_of_user',
+ 'bookmark_link',
+ 'bookmarks',
+ 'calendar',
+ 'canonical_url',
+ 'categories_per_page',
+ 'categories_taxonomy',
+ 'category_form',
+ 'category_form_fields',
+ 'category_form_pre',
+ 'comment',
+ 'comment_ID',
+ 'comment_author',
+ 'comment_author_IP',
+ 'comment_author_email',
+ 'comment_author_link',
+ 'comment_author_url',
+ 'comment_author_url_link',
+ 'comment_date',
+ 'comment_excerpt',
+ 'comment_link',
+ 'comment_misc_actions',
+ 'comment_text',
+ 'comment_time',
+ 'comment_type',
+ 'comments_link',
+ 'comments_number',
+ 'comments_pagenum_link',
+ 'custom_logo',
+ 'date_sql',
+ 'default_comment_status',
+ 'delete_post_link',
+ 'edit_bookmark_link',
+ 'edit_comment_link',
+ 'edit_post_link',
+ 'edit_tag_link',
+ 'edit_term_link',
+ 'edit_user_link',
+ 'enclosed',
+ 'feed_build_date',
+ 'form_advanced',
+ 'form_after_editor',
+ 'form_after_title',
+ 'form_before_permalink',
+ 'form_top',
+ 'handle_product_cat',
+ 'header_image_tag',
+ 'header_video_url',
+ 'image_tag',
+ 'image_tag_class',
+ 'lastpostdate',
+ 'lastpostmodified',
+ 'link',
+ 'link_category_form',
+ 'link_category_form_fields',
+ 'link_category_form_pre',
+ 'main_network_id',
+ 'media',
+ 'media_item_args',
+ 'ms_user',
+ 'network',
+ 'object_terms',
+ 'option',
+ 'page',
+ 'page_form',
+ 'page_of_comment',
+ 'page_uri',
+ 'pagenum_link',
+ 'pages',
+ 'plugin',
+ 'post',
+ 'post_galleries',
+ 'post_gallery',
+ 'post_link',
+ 'post_modified_time',
+ 'post_status',
+ 'post_time',
+ 'postmeta',
+ 'posts_per_page',
+ 'product_search_form',
+ 'profile_url',
+ 'pung',
+ 'role_list',
+ 'sample_permalink',
+ 'sample_permalink_html',
+ 'schedule',
+ 'search_form',
+ 'search_query',
+ 'shortlink',
+ 'site',
+ 'site_email_content',
+ 'site_icon_url',
+ 'site_option',
+ 'space_allowed',
+ 'tag',
+ 'tag_form',
+ 'tag_form_fields',
+ 'tag_form_pre',
+ 'tag_link',
+ 'tags',
+ 'tags_per_page',
+ 'term',
+ 'term_link',
+ 'term_relationships',
+ 'term_taxonomies',
+ 'term_taxonomy',
+ 'terms',
+ 'terms_args',
+ 'terms_defaults',
+ 'terms_fields',
+ 'terms_orderby',
+ 'the_archive_description',
+ 'the_archive_title',
+ 'the_categories',
+ 'the_date',
+ 'the_excerpt',
+ 'the_guid',
+ 'the_modified_date',
+ 'the_modified_time',
+ 'the_post_type_description',
+ 'the_tags',
+ 'the_terms',
+ 'the_time',
+ 'theme_starter_content',
+ 'to_ping',
+ 'user',
+ 'user_created_user',
+ 'user_form',
+ 'user_profile',
+ 'user_profile_update',
+ 'usermeta',
+ 'usernumposts',
+ 'users_drafts',
+ 'webhook',
+ 'widget',
+ 'woocommerce_archive',
+ 'wp_title_rss',
+ );
+
+ /**
+ * Default array of post table columns.
+ *
+ * @var array Post table columns.
+ */
+ public static $default_post_checksum_columns = array(
+ 'ID',
+ 'post_modified',
+ );
+
+ /**
+ * Default array of post meta table columns.
+ *
+ * @var array Post meta table columns.
+ */
+ public static $default_post_meta_checksum_columns = array(
+ 'meta_id',
+ 'meta_value',
+ );
+
+ /**
+ * Default array of comment table columns.
+ *
+ * @var array Default comment table columns.
+ */
+ public static $default_comment_checksum_columns = array(
+ 'comment_ID',
+ 'comment_content',
+ );
+
+ /**
+ * Default array of comment meta columns.
+ *
+ * @var array Comment meta table columns.
+ */
+ public static $default_comment_meta_checksum_columns = array(
+ 'meta_id',
+ 'meta_value',
+ );
+
+ /**
+ * Default array of option table columns.
+ *
+ * @var array Default array of option columns.
+ */
+ public static $default_option_checksum_columns = array(
+ 'option_name',
+ 'option_value',
+ );
+
+ /**
+ * Default array of term columns.
+ *
+ * @var array array of term columns.
+ */
+ public static $default_term_checksum_columns = array(
+ 'name',
+ 'slug',
+ 'term_id',
+ );
+
+ /**
+ * Default array of term taxonomy columns.
+ *
+ * @var array Array of term taxonomy columns.
+ */
+ public static $default_term_taxonomy_checksum_columns = array(
+ 'count',
+ 'parent',
+ 'taxonomy',
+ 'term_id',
+ 'term_taxonomy_id',
+ );
+
+ /**
+ * Default term relationship columns.
+ *
+ * @var array Array of term relationship columns.
+ */
+ public static $default_term_relationships_checksum_columns = array(
+ 'object_id',
+ 'term_order',
+ 'term_taxonomy_id',
+ );
+
+ /**
+ * Default multisite callables able to be managed via JSON API.
+ *
+ * @var array multsite callables whitelisted
+ */
+ public static $default_multisite_callable_whitelist = array();
+
+ /**
+ * Get array of multisite callables whitelisted.
+ *
+ * @return array Multisite callables managable via JSON API.
+ */
+ public static function get_multisite_callable_whitelist() {
+ /**
+ * Filter the list of multisite callables that are manageable via the JSON API.
+ *
+ * @module sync
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.8.0
+ *
+ * @param array The default list of multisite callables.
+ */
+ return apply_filters( 'jetpack_sync_multisite_callable_whitelist', self::$default_multisite_callable_whitelist );
+ }
+
+ /**
+ * Array of post meta keys whitelisted.
+ *
+ * @var array Post meta whitelist.
+ */
+ public static $post_meta_whitelist = array(
+ '_feedback_akismet_values',
+ '_feedback_email',
+ '_feedback_extra_fields',
+ '_g_feedback_shortcode',
+ '_jetpack_post_thumbnail',
+ '_last_editor_used_jetpack',
+ '_menu_item_classes',
+ '_menu_item_menu_item_parent',
+ '_menu_item_object',
+ '_menu_item_object_id',
+ '_menu_item_orphaned',
+ '_menu_item_type',
+ '_menu_item_xfn',
+ '_publicize_facebook_user',
+ '_publicize_twitter_user',
+ '_thumbnail_id',
+ '_wp_attached_file',
+ '_wp_attachment_backup_sizes',
+ '_wp_attachment_context',
+ '_wp_attachment_image_alt',
+ '_wp_attachment_is_custom_background',
+ '_wp_attachment_is_custom_header',
+ '_wp_attachment_metadata',
+ '_wp_page_template',
+ '_wp_trash_meta_comments_status',
+ '_wpas_feature_enabled',
+ '_wpas_is_tweetstorm',
+ '_wpas_mess',
+ '_wpas_options',
+ 'advanced_seo_description', // Jetpack_SEO_Posts::DESCRIPTION_META_KEY.
+ 'content_width',
+ 'custom_css_add',
+ 'custom_css_preprocessor',
+ 'enclosure',
+ 'imagedata',
+ 'nova_price',
+ 'publicize_results',
+ 'sharing_disabled',
+ 'switch_like_status',
+ 'videopress_guid',
+ 'vimeo_poster_image',
+ '_jetpack_blogging_prompt_key',
+ );
+
+ /**
+ * Get the post meta key whitelist.
+ *
+ * @return array Post meta whitelist.
+ */
+ public static function get_post_meta_whitelist() {
+ /**
+ * Filter the list of post meta data that are manageable via the JSON API.
+ *
+ * @module sync
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.8.0
+ *
+ * @param array The default list of meta data keys.
+ */
+ return apply_filters( 'jetpack_sync_post_meta_whitelist', self::$post_meta_whitelist );
+ }
+
+ /**
+ * Comment meta whitelist.
+ *
+ * @var array Comment meta whitelist.
+ */
+ public static $comment_meta_whitelist = array(
+ 'hc_avatar',
+ 'hc_foreign_user_id',
+ 'hc_post_as',
+ 'hc_wpcom_id_sig',
+ );
+
+ /**
+ * Get the comment meta whitelist.
+ *
+ * @return array
+ */
+ public static function get_comment_meta_whitelist() {
+ /**
+ * Filter the list of comment meta data that are manageable via the JSON API.
+ *
+ * @module sync
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.7.0
+ *
+ * @param array The default list of comment meta data keys.
+ */
+ return apply_filters( 'jetpack_sync_comment_meta_whitelist', self::$comment_meta_whitelist );
+ }
+
+ /**
+ * Default theme support whitelist.
+ *
+ * @todo move this to server? - these are theme support values
+ * that should be synced as jetpack_current_theme_supports_foo option values
+ *
+ * @var array Default theme support whitelist.
+ */
+ public static $default_theme_support_whitelist = array(
+ 'align-wide',
+ 'appearance-tools', // In Gutenberg.
+ 'automatic-feed-links',
+ 'block-templates',
+ 'block-template-parts', // WP 6.1. Added via https://core.trac.wordpress.org/changeset/54176
+ 'custom-background',
+ 'custom-header',
+ 'custom-logo',
+ 'customize-selective-refresh-widgets',
+ 'dark-editor-style',
+ 'default-color-palette', // In Gutenberg.
+ 'default-gradient-presets', // In Gutenberg.
+ 'disable-custom-colors',
+ 'disable-custom-font-sizes',
+ 'disable-custom-gradients',
+ 'disable-layout-styles', // WP 6.1. Added via https://core.trac.wordpress.org/changeset/54159
+ 'editor-color-palette',
+ 'editor-font-sizes',
+ 'editor-gradient-presets',
+ 'editor-style', // deprecated.
+ 'editor-styles',
+ 'html5',
+ 'infinite-scroll',
+ 'jetpack-responsive-videos',
+ 'jetpack-social-menu',
+ 'menus',
+ 'post-formats',
+ 'post-thumbnails',
+ 'responsive-embeds',
+ 'site-logo',
+ 'title-tag',
+ 'widgets',
+ 'wp-block-styles',
+ );
+
+ /**
+ * Is an option whitelisted?
+ *
+ * @param string $option Option name.
+ * @return bool If option is on the whitelist.
+ */
+ public static function is_whitelisted_option( $option ) {
+ $whitelisted_options = self::get_options_whitelist();
+ foreach ( $whitelisted_options as $whitelisted_option ) {
+ if ( '/' === $whitelisted_option[0] && preg_match( $whitelisted_option, $option ) ) {
+ return true;
+ } elseif ( $whitelisted_option === $option ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Default whitelist of capabilities to sync.
+ *
+ * @var array Array of WordPress capabilities.
+ */
+ public static $default_capabilities_whitelist = array(
+ 'activate_plugins',
+ 'add_users',
+ 'create_users',
+ 'customize',
+ 'delete_others_pages',
+ 'delete_others_posts',
+ 'delete_pages',
+ 'delete_plugins',
+ 'delete_posts',
+ 'delete_private_pages',
+ 'delete_private_posts',
+ 'delete_published_pages',
+ 'delete_published_posts',
+ 'delete_site',
+ 'delete_themes',
+ 'delete_users',
+ 'edit_dashboard',
+ 'edit_files',
+ 'edit_others_pages',
+ 'edit_others_posts',
+ 'edit_pages',
+ 'edit_plugins',
+ 'edit_posts',
+ 'edit_private_pages',
+ 'edit_private_posts',
+ 'edit_published_pages',
+ 'edit_published_posts',
+ 'edit_theme_options',
+ 'edit_themes',
+ 'edit_users',
+ 'export',
+ 'import',
+ 'install_plugins',
+ 'install_themes',
+ 'list_users',
+ 'manage_categories',
+ 'manage_links',
+ 'manage_options',
+ 'moderate_comments',
+ 'promote_users',
+ 'publish_pages',
+ 'publish_posts',
+ 'read',
+ 'read_private_pages',
+ 'read_private_posts',
+ 'remove_users',
+ 'switch_themes',
+ 'unfiltered_html',
+ 'unfiltered_upload',
+ 'update_core',
+ 'update_plugins',
+ 'update_themes',
+ 'upload_files',
+ 'upload_plugins',
+ 'upload_themes',
+ );
+
+ /**
+ * Get default capabilities whitelist.
+ *
+ * @return array
+ */
+ public static function get_capabilities_whitelist() {
+ /**
+ * Filter the list of capabilities that we care about
+ *
+ * @module sync
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.5.0
+ *
+ * @param array The default list of capabilities.
+ */
+ return apply_filters( 'jetpack_sync_capabilities_whitelist', self::$default_capabilities_whitelist );
+ }
+
+ /**
+ * Get max execution sync time.
+ *
+ * @return float Number of seconds.
+ */
+ public static function get_max_sync_execution_time() {
+ $max_exec_time = (int) ini_get( 'max_execution_time' );
+ if ( 0 === $max_exec_time ) {
+ // 0 actually means "unlimited", but let's not treat it that way.
+ $max_exec_time = 60;
+ }
+ return floor( $max_exec_time / 3 );
+ }
+
+ /**
+ * Get default for a given setting.
+ *
+ * @param string $setting Setting to get.
+ * @return mixed Value will be a string, int, array, based on the particular setting requested.
+ */
+ public static function get_default_setting( $setting ) {
+ $default_name = "default_$setting"; // e.g. default_dequeue_max_bytes.
+ return self::$$default_name;
+ }
+
+ /**
+ * Default list of network options.
+ *
+ * @var array network options
+ */
+ public static $default_network_options_whitelist = array(
+ 'active_sitewide_plugins',
+ 'auto_update_plugins', // WordPress 5.5+ auto-updates.
+ 'jetpack_protect_global_whitelist',
+ 'jetpack_protect_key',
+ 'site_name',
+ );
+
+ /**
+ * A mapping of known importers to friendly names.
+ *
+ * Keys are the class name of the known importer.
+ * Values are the friendly name.
+ *
+ * @since 1.6.3
+ * @since-jetpack 7.3.0
+ *
+ * @var array
+ */
+ public static $default_known_importers = array(
+ 'Blogger_Importer' => 'blogger',
+ 'LJ_API_Import' => 'livejournal',
+ 'MT_Import' => 'mt',
+ 'RSS_Import' => 'rss',
+ 'WC_Tax_Rate_Importer' => 'woo-tax-rate',
+ 'WP_Import' => 'wordpress',
+ );
+
+ /**
+ * Returns a list of known importers.
+ *
+ * @since 1.6.3
+ * @since-jetpack 7.3.0
+ *
+ * @return array Known importers with importer class names as keys and friendly names as values.
+ */
+ public static function get_known_importers() {
+ /**
+ * Filter the list of known importers.
+ *
+ * @module sync
+ *
+ * @since 1.6.3
+ * @since-jetpack 7.3.0
+ *
+ * @param array The default list of known importers.
+ */
+ return apply_filters( 'jetpack_sync_known_importers', self::$default_known_importers );
+ }
+
+ /**
+ * Whether this is a system with a multiple networks.
+ * We currently need this static wrapper because we statically define our default list of callables.
+ *
+ * @since 1.6.3
+ * @since-jetpack 7.6.0
+ *
+ * @uses Automattic\Jetpack\Status::is_multi_network
+ *
+ * @return boolean
+ */
+ public static function is_multi_network() {
+ $status = new Status();
+ return $status->is_multi_network();
+ }
+
+ /**
+ * Default bytes to dequeue.
+ *
+ * @var int Bytes.
+ */
+ public static $default_dequeue_max_bytes = 500000; // very conservative value, 1/2 MB.
+
+ /**
+ * Default upload bytes.
+ *
+ * This value is a little bigger than the upload limit to account for serialization.
+ *
+ * @var int Bytes.
+ */
+ public static $default_upload_max_bytes = 600000;
+
+ /**
+ * Default number of rows uploaded.
+ *
+ * @var int Number of rows.
+ */
+ public static $default_upload_max_rows = 500;
+
+ /**
+ * Default sync wait time.
+ *
+ * @var int Number of seconds.
+ */
+ public static $default_sync_wait_time = 10; // seconds, between syncs.
+
+ /**
+ * Only wait before next send if the current send took more than this number of seconds.
+ *
+ * @var int Number of seconds.
+ */
+ public static $default_sync_wait_threshold = 10;
+
+ /**
+ * Default wait between attempting to continue a full sync via requests.
+ *
+ * @var int Number of seconds.
+ */
+ public static $default_enqueue_wait_time = 1;
+
+ /**
+ * Maximum queue size.
+ *
+ * Each item is represented with a new row in the wp_options table.
+ *
+ * @var int Number of queue items.
+ */
+ public static $default_max_queue_size = 5000;
+
+ /**
+ * Default maximum lag allowed in the queue.
+ *
+ * @var int Number of seconds
+ */
+ public static $default_max_queue_lag = 7200; // 2 hours.
+
+ /**
+ * Default for default writes per sec.
+ *
+ * @var int Rows per second.
+ */
+ public static $default_queue_max_writes_sec = 100; // 100 rows a second.
+
+ /**
+ * Default for post types blacklist.
+ *
+ * @var array Empty array.
+ */
+ public static $default_post_types_blacklist = array();
+
+ /**
+ * Default for taxonomies blacklist.
+ *
+ * @var array Empty array.
+ */
+ public static $default_taxonomies_blacklist = array();
+
+ /**
+ * Default for taxonomies whitelist.
+ *
+ * @var array Empty array.
+ */
+ public static $default_taxonomy_whitelist = array();
+
+ /**
+ * Default for post meta whitelist.
+ *
+ * @var array Empty array.
+ */
+ public static $default_post_meta_whitelist = array();
+
+ /**
+ * Default for comment meta whitelist.
+ *
+ * @var array Empty array.
+ */
+ public static $default_comment_meta_whitelist = array();
+
+ /**
+ * Default for disabling sync across the site.
+ *
+ * @var int Bool-ish. Default to 0.
+ */
+ public static $default_disable = 0; // completely disable sending data to wpcom.
+
+ /**
+ * Default for disabling sync across the entire network on multisite.
+ *
+ * @var int Bool-ish. Default 0.
+ */
+ public static $default_network_disable = 0;
+
+ /**
+ * Default for disabling checksums.
+ *
+ * @var int Bool-ish. Default 0.
+ */
+ public static $default_checksum_disable = 0;
+
+ /**
+ * Should Sync use cron?
+ *
+ * @var int Bool-ish value. Default 1.
+ */
+ public static $default_sync_via_cron = 1;
+
+ /**
+ * Default if Sync should render content.
+ *
+ * @var int Bool-ish value. Default is 0.
+ */
+ public static $default_render_filtered_content = 0;
+
+ /**
+ * Default number of items to enqueue at a time when running full sync.
+ *
+ * @var int Number of items.
+ */
+ public static $default_max_enqueue_full_sync = 100;
+
+ /**
+ * Default for maximum queue size during a full sync.
+ *
+ * Each item will represent a value in the wp_options table.
+ *
+ * @var int Number of items.
+ */
+ public static $default_max_queue_size_full_sync = 1000; // max number of total items in the full sync queue.
+
+ /**
+ * Default max time for sending in immediate mode.
+ *
+ * @var float Number of Seconds
+ */
+ public static $default_full_sync_send_duration = 9;
+
+ /**
+ * Defaul for time between syncing callables.
+ *
+ * @var int Number of seconds.
+ */
+ public static $default_sync_callables_wait_time = MINUTE_IN_SECONDS; // seconds before sending callables again.
+
+ /**
+ * Default for time between syncing constants.
+ *
+ * @var int Number of seconds.
+ */
+ public static $default_sync_constants_wait_time = HOUR_IN_SECONDS; // seconds before sending constants again.
+ /**
+ * Default for sync queue lock timeout time.
+ *
+ * @var int Number of seconds.
+ */
+ public static $default_sync_queue_lock_timeout = 120; // 2 minutes.
+
+ /**
+ * Default for cron sync time limit.
+ *
+ * @var int Number of seconds.
+ */
+ public static $default_cron_sync_time_limit = 4 * MINUTE_IN_SECONDS;
+
+ /**
+ * Default for number of term relationship items sent in an full sync item.
+ *
+ * @var int Number of items.
+ */
+ public static $default_term_relationships_full_sync_item_size = 100;
+
+ /**
+ * Default for enabling incremental sync.
+ *
+ * @var int 1 for true.
+ */
+ public static $default_sync_sender_enabled = 1; // Should send incremental sync items.
+
+ /**
+ * Default for enabling Full Sync.
+ *
+ * @var int 1 for true.
+ */
+ public static $default_full_sync_sender_enabled = 1; // Should send full sync items.
+
+ /**
+ * Default Full Sync config
+ *
+ * @var array list of module names.
+ */
+ public static $default_full_sync_config = array(
+ 'comments' => 1,
+ 'constants' => 1,
+ 'functions' => 1,
+ 'options' => 1,
+ 'posts' => 1,
+ 'term_relationships' => 1,
+ 'terms' => 1,
+ 'themes' => 1,
+ 'updates' => 1,
+ 'users' => 1,
+ );
+
+ /**
+ * Default Full Sync max objects to send on a single request.
+ *
+ * @var array list of module => max.
+ */
+ public static $default_full_sync_limits = array(
+ 'comments' => array(
+ 'chunk_size' => 100,
+ 'max_chunks' => 10,
+ ),
+ 'posts' => array(
+ 'chunk_size' => 100,
+ 'max_chunks' => 1,
+ ),
+ 'term_relationships' => array(
+ 'chunk_size' => 1000,
+ 'max_chunks' => 10,
+ ),
+ 'terms' => array(
+ 'chunk_size' => 1000,
+ 'max_chunks' => 10,
+ ),
+ 'users' => array(
+ 'chunk_size' => 100,
+ 'max_chunks' => 10,
+ ),
+ );
+
+ /**
+ * Default for enabling dedicated Sync flow.
+ *
+ * @var int Bool-ish. Default 0.
+ */
+ public static $default_dedicated_sync_enabled = 0;
+
+ /**
+ * Default for enabling custom queue table for Sync.
+ *
+ * @var int Bool-ish. Default 0.
+ */
+ public static $default_custom_queue_table_enabled = 0;
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php
new file mode 100644
index 00000000..3da795c6
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php
@@ -0,0 +1,712 @@
+get_modules();
+ }
+
+ return array();
+ }
+
+ /**
+ * Return array of taxonomies registered on the site.
+ *
+ * @return array
+ */
+ public static function get_taxonomies() {
+ global $wp_taxonomies;
+ $wp_taxonomies_without_callbacks = array();
+ foreach ( $wp_taxonomies as $taxonomy_name => $taxonomy ) {
+ $sanitized_taxonomy = self::sanitize_taxonomy( $taxonomy );
+ if ( ! empty( $sanitized_taxonomy ) ) {
+ $wp_taxonomies_without_callbacks[ $taxonomy_name ] = $sanitized_taxonomy;
+ }
+ }
+ return $wp_taxonomies_without_callbacks;
+ }
+
+ /**
+ * Return array of registered shortcodes.
+ *
+ * @return array
+ */
+ public static function get_shortcodes() {
+ global $shortcode_tags;
+ return array_keys( $shortcode_tags );
+ }
+
+ /**
+ * Removes any callback data since we will not be able to process it on our side anyways.
+ *
+ * @param \WP_Taxonomy $taxonomy \WP_Taxonomy item.
+ *
+ * @return mixed|null
+ */
+ public static function sanitize_taxonomy( $taxonomy ) {
+
+ // Lets clone the taxonomy object instead of modifing the global one.
+ $cloned_taxonomy = json_decode( wp_json_encode( $taxonomy ) );
+
+ // recursive taxonomies are no fun.
+ if ( $cloned_taxonomy === null ) {
+ return null;
+ }
+ // Remove any meta_box_cb if they are not the default wp ones.
+ if ( isset( $cloned_taxonomy->meta_box_cb ) &&
+ ! in_array( $cloned_taxonomy->meta_box_cb, array( 'post_tags_meta_box', 'post_categories_meta_box' ), true ) ) {
+ $cloned_taxonomy->meta_box_cb = null;
+ }
+ // Remove update call back.
+ if ( isset( $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.
+ if ( isset( $cloned_taxonomy->rest_controller_class ) &&
+ 'WP_REST_Terms_Controller' !== $cloned_taxonomy->rest_controller_class ) {
+ $cloned_taxonomy->rest_controller_class = null;
+ }
+ return $cloned_taxonomy;
+ }
+
+ /**
+ * Return array of registered post types.
+ *
+ * @return array
+ */
+ public static function get_post_types() {
+ global $wp_post_types;
+
+ $post_types_without_callbacks = array();
+ foreach ( $wp_post_types as $post_type_name => $post_type ) {
+ $sanitized_post_type = self::sanitize_post_type( $post_type );
+ if ( ! empty( $sanitized_post_type ) ) {
+ $post_types_without_callbacks[ $post_type_name ] = $sanitized_post_type;
+ }
+ }
+ return $post_types_without_callbacks;
+ }
+
+ /**
+ * Sanitizes by cloning post type object.
+ *
+ * @param object $post_type \WP_Post_Type.
+ *
+ * @return object
+ */
+ public static function sanitize_post_type( $post_type ) {
+ // Lets clone the post type object instead of modifing the global one.
+ $sanitized_post_type = array();
+ foreach ( Defaults::$default_post_type_attributes as $attribute_key => $default_value ) {
+ if ( isset( $post_type->{ $attribute_key } ) ) {
+ $sanitized_post_type[ $attribute_key ] = $post_type->{ $attribute_key };
+ }
+ }
+ return (object) $sanitized_post_type;
+ }
+
+ /**
+ * Return information about a synced post type.
+ *
+ * @param array $sanitized_post_type Array of args used in constructing \WP_Post_Type.
+ * @param string $post_type Post type name.
+ *
+ * @return object \WP_Post_Type
+ */
+ public static function expand_synced_post_type( $sanitized_post_type, $post_type ) {
+ $post_type = sanitize_key( $post_type );
+ $post_type_object = new \WP_Post_Type( $post_type, $sanitized_post_type );
+ $post_type_object->add_supports();
+ $post_type_object->add_rewrite_rules();
+ $post_type_object->add_hooks();
+ $post_type_object->register_taxonomies();
+ return (object) $post_type_object;
+ }
+
+ /**
+ * Returns site's post_type_features.
+ *
+ * @return array
+ */
+ public static function get_post_type_features() {
+ global $_wp_post_type_features;
+
+ return $_wp_post_type_features;
+ }
+
+ /**
+ * Return hosting provider.
+ *
+ * Uses a set of known constants, classes, or functions to help determine the hosting platform.
+ *
+ * @return string Hosting provider.
+ */
+ public static function get_hosting_provider() {
+ $hosting_provider_detection_methods = array(
+ 'get_hosting_provider_by_known_constant',
+ 'get_hosting_provider_by_known_class',
+ 'get_hosting_provider_by_known_function',
+ );
+
+ $functions = new Functions();
+ foreach ( $hosting_provider_detection_methods as $method ) {
+ $hosting_provider = call_user_func( array( $functions, $method ) );
+ if ( false !== $hosting_provider ) {
+ return $hosting_provider;
+ }
+ }
+
+ return 'unknown';
+ }
+
+ /**
+ * Return a hosting provider using a set of known constants.
+ *
+ * @return mixed A host identifier string or false.
+ */
+ public function get_hosting_provider_by_known_constant() {
+ $hosting_provider_constants = array(
+ 'GD_SYSTEM_PLUGIN_DIR' => 'gd-managed-wp',
+ 'MM_BASE_DIR' => 'bh',
+ 'PAGELYBIN' => 'pagely',
+ 'KINSTAMU_VERSION' => 'kinsta',
+ 'FLYWHEEL_CONFIG_DIR' => 'flywheel',
+ 'IS_PRESSABLE' => 'pressable',
+ 'VIP_GO_ENV' => 'vip-go',
+ );
+
+ foreach ( $hosting_provider_constants as $constant => $constant_value ) {
+ if ( Constants::is_defined( $constant ) ) {
+ if ( 'VIP_GO_ENV' === $constant && false === Constants::get_constant( 'VIP_GO_ENV' ) ) {
+ continue;
+ }
+ return $constant_value;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Return a hosting provider using a set of known classes.
+ *
+ * @return mixed A host identifier string or false.
+ */
+ public function get_hosting_provider_by_known_class() {
+ $hosting_provider = false;
+
+ switch ( true ) {
+ case ( class_exists( '\\WPaaS\\Plugin' ) ):
+ $hosting_provider = 'gd-managed-wp';
+ break;
+ }
+
+ return $hosting_provider;
+ }
+
+ /**
+ * Return a hosting provider using a set of known functions.
+ *
+ * @return mixed A host identifier string or false.
+ */
+ public function get_hosting_provider_by_known_function() {
+ $hosting_provider = false;
+
+ switch ( true ) {
+ case ( function_exists( 'is_wpe' ) || function_exists( 'is_wpe_snapshot' ) ):
+ $hosting_provider = 'wpe';
+ break;
+ }
+
+ return $hosting_provider;
+ }
+
+ /**
+ * Return array of allowed REST API post types.
+ *
+ * @return array Array of allowed post types.
+ */
+ public static function rest_api_allowed_post_types() {
+ /** This filter is already documented in class.json-api-endpoints.php */
+ return apply_filters( 'rest_api_allowed_post_types', array( 'post', 'page', 'revision' ) );
+ }
+
+ /**
+ * Return array of allowed REST API public metadata.
+ *
+ * @return array Array of allowed metadata.
+ */
+ public static function rest_api_allowed_public_metadata() {
+ /**
+ * Filters the meta keys accessible by the REST API.
+ *
+ * @see https://developer.wordpress.com/2013/04/26/custom-post-type-and-metadata-support-in-the-rest-api/
+ *
+ * @module json-api
+ *
+ * @since 1.6.3
+ * @since-jetpack 2.2.3
+ *
+ * @param array $whitelisted_meta Array of metadata that is accessible by the REST API.
+ */
+ return apply_filters( 'rest_api_allowed_public_metadata', array() );
+ }
+
+ /**
+ * Finds out if a site is using a version control system.
+ *
+ * @return bool
+ **/
+ public static function is_version_controlled() {
+
+ if ( ! class_exists( 'WP_Automatic_Updater' ) ) {
+ require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
+ }
+ $updater = new \WP_Automatic_Updater();
+
+ return (bool) (string) $updater->is_vcs_checkout( ABSPATH );
+ }
+
+ /**
+ * Returns true if the site has file write access false otherwise.
+ *
+ * @return bool
+ **/
+ public static function file_system_write_access() {
+ if ( ! function_exists( 'get_filesystem_method' ) ) {
+ require_once ABSPATH . 'wp-admin/includes/file.php';
+ }
+
+ require_once ABSPATH . 'wp-admin/includes/template.php';
+
+ $filesystem_method = get_filesystem_method();
+ if ( 'direct' === $filesystem_method ) {
+ return true;
+ }
+
+ ob_start();
+
+ if ( ! function_exists( 'request_filesystem_credentials' ) ) {
+ require_once ABSPATH . 'wp-admin/includes/file.php';
+ }
+
+ $filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() );
+ ob_end_clean();
+ if ( $filesystem_credentials_are_stored ) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Helper function that is used when getting home or siteurl values. Decides
+ * whether to get the raw or filtered value.
+ *
+ * @deprecated 1.23.1
+ *
+ * @param string $url_type URL to get, home or siteurl.
+ * @return string
+ */
+ public static function get_raw_or_filtered_url( $url_type ) {
+ _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::get_raw_or_filtered_url' );
+ return Urls::get_raw_or_filtered_url( $url_type );
+ }
+
+ /**
+ * Return the escaped home_url.
+ *
+ * @deprecated 1.23.1
+ *
+ * @return string
+ */
+ public static function home_url() {
+ _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::home_url' );
+ return Urls::home_url();
+ }
+
+ /**
+ * Return the escaped siteurl.
+ *
+ * @deprecated 1.23.1
+ *
+ * @return string
+ */
+ public static function site_url() {
+ _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::site_url' );
+ return Urls::site_url();
+ }
+
+ /**
+ * Return main site URL with a normalized protocol.
+ *
+ * @deprecated 1.23.1
+ *
+ * @return string
+ */
+ public static function main_network_site_url() {
+ _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::main_network_site_url' );
+ return Urls::main_network_site_url();
+ }
+
+ /**
+ * Return main site WordPress.com site ID.
+ *
+ * @return string
+ */
+ public static function main_network_site_wpcom_id() {
+ /**
+ * Return the current site WPCOM ID for single site installs
+ */
+ if ( ! is_multisite() ) {
+ return \Jetpack_Options::get_option( 'id' );
+ }
+
+ /**
+ * Return the main network site WPCOM ID for multi-site installs
+ */
+ $current_network = get_network();
+ switch_to_blog( $current_network->blog_id );
+ $wpcom_blog_id = \Jetpack_Options::get_option( 'id' );
+ restore_current_blog();
+ return $wpcom_blog_id;
+ }
+
+ /**
+ * Return URL with a normalized protocol.
+ *
+ * @deprecated 1.23.1
+ *
+ * @param callable $callable Function to retrieve URL option.
+ * @param string $new_value URL Protocol to set URLs to.
+ * @return string Normalized URL.
+ */
+ public static function get_protocol_normalized_url( $callable, $new_value ) {
+ _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::get_protocol_normalized_url' );
+ return Urls::get_protocol_normalized_url( $callable, $new_value );
+ }
+
+ /**
+ * Return URL from option or PHP constant.
+ *
+ * @deprecated 1.23.1
+ *
+ * @param string $option_name (e.g. 'home').
+ *
+ * @return mixed|null URL.
+ */
+ public static function get_raw_url( $option_name ) {
+ _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::get_raw_url' );
+ return Urls::get_raw_url( $option_name );
+ }
+
+ /**
+ * Normalize domains by removing www unless declared in the site's option.
+ *
+ * @deprecated 1.23.1
+ *
+ * @param string $option Option value from the site.
+ * @param callable $url_function Function retrieving the URL to normalize.
+ * @return mixed|string URL.
+ */
+ public static function normalize_www_in_url( $option, $url_function ) {
+ _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::normalize_www_in_url' );
+ return Urls::normalize_www_in_url( $option, $url_function );
+ }
+
+ /**
+ * Return filtered value of get_plugins.
+ *
+ * @return mixed|void
+ */
+ public static function get_plugins() {
+ 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 */
+ return apply_filters( 'all_plugins', get_plugins() );
+ }
+
+ /**
+ * Get custom action link tags that the plugin is using
+ * Ref: https://codex.wordpress.org/Plugin_API/Filter_Reference/plugin_action_links_(plugin_file_name)
+ *
+ * @param string $plugin_file_singular Particular plugin.
+ * @return array of plugin action links (key: link name value: url)
+ */
+ public static function get_plugins_action_links( $plugin_file_singular = null ) {
+ // Some sites may have DOM disabled in PHP fail early.
+ if ( ! class_exists( 'DOMDocument' ) ) {
+ return array();
+ }
+ $plugins_action_links = get_option( 'jetpack_plugin_api_action_links', array() );
+ if ( ! empty( $plugins_action_links ) ) {
+ if ( $plugin_file_singular === null ) {
+ return $plugins_action_links;
+ }
+ return ( isset( $plugins_action_links[ $plugin_file_singular ] ) ? $plugins_action_links[ $plugin_file_singular ] : null );
+ }
+ return array();
+ }
+
+ /**
+ * Return the WP version as defined in the $wp_version global.
+ *
+ * @return string
+ */
+ public static function wp_version() {
+ global $wp_version;
+ return $wp_version;
+ }
+
+ /**
+ * Return site icon url used on the site.
+ *
+ * @param int $size Size of requested icon in pixels.
+ * @return mixed|string|void
+ */
+ public static function site_icon_url( $size = 512 ) {
+ $site_icon = get_site_icon_url( $size );
+ return $site_icon ? $site_icon : get_option( 'jetpack_site_icon_url' );
+ }
+
+ /**
+ * Return roles registered on the site.
+ *
+ * @return array
+ */
+ public static function roles() {
+ $wp_roles = wp_roles();
+ return $wp_roles->roles;
+ }
+
+ /**
+ * Determine time zone from WordPress' options "timezone_string"
+ * and "gmt_offset".
+ *
+ * 1. Check if `timezone_string` is set and return it.
+ * 2. Check if `gmt_offset` is set, formats UTC-offset from it and return it.
+ * 3. Default to "UTC+0" if nothing is set.
+ *
+ * Note: This function is specifically not using wp_timezone() to keep consistency with
+ * the existing formatting of the timezone string.
+ *
+ * @return string
+ */
+ public static function get_timezone() {
+ $timezone_string = get_option( 'timezone_string' );
+
+ if ( ! empty( $timezone_string ) ) {
+ return str_replace( '_', ' ', $timezone_string );
+ }
+
+ $gmt_offset = get_option( 'gmt_offset', 0 );
+
+ $formatted_gmt_offset = sprintf( '%+g', (float) $gmt_offset );
+
+ $formatted_gmt_offset = str_replace(
+ array( '.25', '.5', '.75' ),
+ array( ':15', ':30', ':45' ),
+ (string) $formatted_gmt_offset
+ );
+
+ /* translators: %s is UTC offset, e.g. "+1" */
+ return sprintf( __( 'UTC%s', 'jetpack-sync' ), $formatted_gmt_offset );
+ }
+
+ /**
+ * Return list of paused themes.
+ *
+ * @return array|bool Array of paused themes or false if unsupported.
+ */
+ public static function get_paused_themes() {
+ $paused_themes = wp_paused_themes();
+ return $paused_themes->get_all();
+ }
+
+ /**
+ * Return list of paused plugins.
+ *
+ * @return array|bool Array of paused plugins or false if unsupported.
+ */
+ public static function get_paused_plugins() {
+ $paused_plugins = wp_paused_plugins();
+ return $paused_plugins->get_all();
+ }
+
+ /**
+ * Return the theme's supported features.
+ * Used for syncing the supported feature that we care about.
+ *
+ * @return array List of features that the theme supports.
+ */
+ public static function get_theme_support() {
+ global $_wp_theme_features;
+
+ $theme_support = array();
+ foreach ( Defaults::$default_theme_support_whitelist as $theme_feature ) {
+ $has_support = current_theme_supports( $theme_feature );
+ if ( $has_support ) {
+ $theme_support[ $theme_feature ] = $_wp_theme_features[ $theme_feature ];
+ }
+ }
+
+ return $theme_support;
+ }
+
+ /**
+ * Returns if the current theme is a Full Site Editing theme.
+ *
+ * @since 1.49.0 Uses wp_is_block_theme() instead of deprecated gutenberg_is_fse_theme().
+ *
+ * @return bool Theme is a Full Site Editing theme.
+ */
+ public static function get_is_fse_theme() {
+ return wp_is_block_theme();
+ }
+
+ /**
+ * Wraps data in a way so that we can distinguish between objects and array and also prevent object recursion.
+ *
+ * @since 1.21.0
+ *
+ * @param array|obj $any Source data to be cleaned up.
+ * @param array $seen_nodes Built array of nodes.
+ *
+ * @return array
+ */
+ public static function json_wrap( &$any, $seen_nodes = array() ) {
+ if ( is_object( $any ) ) {
+ $input = get_object_vars( $any );
+ $input['__o'] = 1;
+ } else {
+ $input = &$any;
+ }
+
+ if ( is_array( $input ) ) {
+ $seen_nodes[] = &$any;
+
+ $return = array();
+
+ foreach ( $input as $k => &$v ) {
+ if ( ( is_array( $v ) || is_object( $v ) ) ) {
+ if ( in_array( $v, $seen_nodes, true ) ) {
+ continue;
+ }
+ $return[ $k ] = self::json_wrap( $v, $seen_nodes );
+ } else {
+ $return[ $k ] = $v;
+ }
+ }
+
+ return $return;
+ }
+
+ 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();
+ }
+
+ /**
+ * Return a list of PHP modules that we want to track.
+ *
+ * @since $$next_version$$
+ *
+ * @return array
+ */
+ public static function get_loaded_extensions() {
+ if ( function_exists( 'get_loaded_extensions' ) ) {
+ return get_loaded_extensions();
+ }
+
+ // If a hosting provider has blocked get_loaded_extensions for any reason,
+ // we check extensions manually.
+
+ $extensions_to_check = array(
+ 'libxml' => array( 'class' => 'libXMLError' ),
+ 'xml' => array( 'function' => 'xml_parse' ),
+ 'dom' => array( 'class' => 'DOMDocument' ),
+ 'xdebug' => array( 'function' => 'xdebug_break' ),
+ );
+
+ $enabled_extensions = array();
+ foreach ( $extensions_to_check as $extension_name => $extension ) {
+ if (
+ ( isset( $extension['function'] )
+ && function_exists( $extension['function'] ) )
+ || class_exists( $extension['class'] )
+ ) {
+ $enabled_extensions[] = $extension_name;
+ }
+ }
+
+ return $enabled_extensions;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-health.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-health.php
new file mode 100644
index 00000000..41d7f788
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-health.php
@@ -0,0 +1,188 @@
+ self::STATUS_UNKNOWN,
+ self::OPTION_TIMESTAMP_KEY => microtime( true ),
+ );
+
+ switch ( $status ) {
+ case self::STATUS_DISABLED:
+ case self::STATUS_OUT_OF_SYNC:
+ case self::STATUS_IN_SYNC:
+ $new_status[ self::OPTION_STATUS_KEY ] = $status;
+ break;
+ }
+
+ \Jetpack_Options::update_option( self::STATUS_OPTION, $new_status );
+ return true;
+ }
+
+ /**
+ * Check if Status has been previously set.
+ *
+ * @return bool is a Status defined
+ */
+ public static function is_status_defined() {
+ $status = \Jetpack_Options::get_option( self::STATUS_OPTION );
+
+ if ( false === $status || ! is_array( $status ) || empty( $status[ self::OPTION_STATUS_KEY ] ) ) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Update Sync Status if Full Sync ended of Posts
+ *
+ * @param string $checksum The checksum that's currently being processed.
+ * @param array $range The ranges of object types being processed.
+ */
+ public static function full_sync_end_update_status( $checksum, $range ) {
+ if ( isset( $range['posts'] ) ) {
+ self::update_status( self::STATUS_IN_SYNC );
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-json-deflate-array-codec.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-json-deflate-array-codec.php
new file mode 100644
index 00000000..ecc33a94
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-json-deflate-array-codec.php
@@ -0,0 +1,93 @@
+json_serialize( $object ) ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
+ }
+
+ /**
+ * Decode compressed serialized value.
+ *
+ * @param string $input Item to decode.
+ * @return array|mixed|object
+ */
+ public function decode( $input ) {
+ return $this->json_unserialize( gzinflate( base64_decode( $input ) ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
+ }
+
+ /**
+ * Serialize JSON
+ *
+ * @see https://gist.github.com/muhqu/820694
+ *
+ * @param string $any Value to serialize and wrap.
+ *
+ * @return false|string
+ */
+ protected function json_serialize( $any ) {
+ return wp_json_encode( Functions::json_wrap( $any ) );
+ }
+
+ /**
+ * Unserialize JSON
+ *
+ * @param string $str JSON string.
+ * @return array|object Unwrapped JSON.
+ */
+ protected function json_unserialize( $str ) {
+ return $this->json_unwrap( json_decode( $str, true ) );
+ }
+
+ /**
+ * Unwraps a json_decode return.
+ *
+ * @param array|object $any json_decode object.
+ * @return array|object
+ */
+ private function json_unwrap( $any ) {
+ if ( is_array( $any ) ) {
+ foreach ( $any as $k => $v ) {
+ if ( '__o' === $k ) {
+ continue;
+ }
+ $any[ $k ] = $this->json_unwrap( $v );
+ }
+
+ if ( isset( $any['__o'] ) ) {
+ unset( $any['__o'] );
+ $any = (object) $any;
+ }
+ }
+
+ return $any;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php
new file mode 100644
index 00000000..ae954ee8
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php
@@ -0,0 +1,483 @@
+:(
+ */
+ protected function __construct() {
+ $this->set_defaults();
+ $this->init();
+ }
+
+ /**
+ * Sync Listener init.
+ */
+ private function init() {
+ $handler = array( $this, 'action_handler' );
+ $full_sync_handler = array( $this, 'full_sync_action_handler' );
+
+ foreach ( Modules::get_modules() as $module ) {
+ $module->init_listeners( $handler );
+ $module->init_full_sync_listeners( $full_sync_handler );
+ }
+
+ // Module Activation.
+ add_action( 'jetpack_activate_module', $handler );
+ add_action( 'jetpack_deactivate_module', $handler );
+
+ // Jetpack Upgrade.
+ add_action( 'updating_jetpack_version', $handler, 10, 2 );
+
+ // Send periodic checksum.
+ add_action( 'jetpack_sync_checksum', $handler );
+ }
+
+ /**
+ * Get incremental sync queue.
+ */
+ public function get_sync_queue() {
+ return $this->sync_queue;
+ }
+
+ /**
+ * Gets the full sync queue.
+ */
+ public function get_full_sync_queue() {
+ return $this->full_sync_queue;
+ }
+
+ /**
+ * Sets queue size limit.
+ *
+ * @param int $limit Queue size limit.
+ */
+ public function set_queue_size_limit( $limit ) {
+ $this->sync_queue_size_limit = $limit;
+ }
+
+ /**
+ * Get queue size limit.
+ */
+ public function get_queue_size_limit() {
+ return $this->sync_queue_size_limit;
+ }
+
+ /**
+ * Sets the queue lag limit.
+ *
+ * @param int $age Queue lag limit.
+ */
+ public function set_queue_lag_limit( $age ) {
+ $this->sync_queue_lag_limit = $age;
+ }
+
+ /**
+ * Return value of queue lag limit.
+ */
+ public function get_queue_lag_limit() {
+ return $this->sync_queue_lag_limit;
+ }
+
+ /**
+ * Force a recheck of the queue limit.
+ */
+ public function force_recheck_queue_limit() {
+ delete_transient( self::QUEUE_STATE_CHECK_TRANSIENT . '_' . $this->sync_queue->id );
+ delete_transient( self::QUEUE_STATE_CHECK_TRANSIENT . '_' . $this->full_sync_queue->id );
+ }
+
+ /**
+ * Determine if an item can be added to the queue.
+ *
+ * Prevent adding items to the queue if it hasn't sent an item for 15 mins
+ * AND the queue is over 1000 items long (by default).
+ *
+ * @param object $queue Sync queue.
+ * @return bool
+ */
+ public function can_add_to_queue( $queue ) {
+ if ( ! Settings::is_sync_enabled() ) {
+ return false;
+ }
+
+ $state_transient_name = self::QUEUE_STATE_CHECK_TRANSIENT . '_' . $queue->id;
+
+ $queue_state = get_transient( $state_transient_name );
+
+ if ( false === $queue_state ) {
+ $queue_state = array( $queue->size(), $queue->lag() );
+ set_transient( $state_transient_name, $queue_state, self::QUEUE_STATE_CHECK_TIMEOUT );
+ }
+
+ list( $queue_size, $queue_age ) = $queue_state;
+
+ return ( $queue_age < $this->sync_queue_lag_limit )
+ ||
+ ( ( $queue_size + 1 ) < $this->sync_queue_size_limit );
+ }
+
+ /**
+ * Full sync action handler.
+ *
+ * @param mixed ...$args Args passed to the action.
+ */
+ public function full_sync_action_handler( ...$args ) {
+ $this->enqueue_action( current_filter(), $args, $this->full_sync_queue );
+ }
+
+ /**
+ * Action handler.
+ *
+ * @param mixed ...$args Args passed to the action.
+ */
+ public function action_handler( ...$args ) {
+ $this->enqueue_action( current_filter(), $args, $this->sync_queue );
+ }
+
+ // add many actions to the queue directly, without invoking them.
+
+ /**
+ * Bulk add action to the queue.
+ *
+ * @param string $action_name The name the full sync action.
+ * @param array $args_array Array of chunked arguments.
+ */
+ public function bulk_enqueue_full_sync_actions( $action_name, $args_array ) {
+ $queue = $this->get_full_sync_queue();
+
+ /*
+ * If we add any items to the queue, we should try to ensure that our script
+ * can't be killed before they are sent.
+ */
+ if ( function_exists( 'ignore_user_abort' ) ) {
+ ignore_user_abort( true );
+ }
+
+ $data_to_enqueue = array();
+ $user_id = get_current_user_id();
+ $currtime = microtime( true );
+ $is_importing = Settings::is_importing();
+
+ foreach ( $args_array as $args ) {
+ $previous_end = isset( $args['previous_end'] ) ? $args['previous_end'] : null;
+ $args = isset( $args['ids'] ) ? $args['ids'] : $args;
+
+ /**
+ * Modify or reject the data within an action before it is enqueued locally.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @module sync
+ *
+ * @param array The action parameters
+ */
+ $args = apply_filters( "jetpack_sync_before_enqueue_$action_name", $args );
+ $action_data = array( $args );
+ if ( $previous_end !== null ) {
+ $action_data[] = $previous_end;
+ }
+ // allow listeners to abort.
+ if ( false === $args ) {
+ continue;
+ }
+
+ $data_to_enqueue[] = array(
+ $action_name,
+ $action_data,
+ $user_id,
+ $currtime,
+ $is_importing,
+ );
+ }
+
+ $queue->add_all( $data_to_enqueue );
+ }
+
+ /**
+ * Enqueue the action.
+ *
+ * @param string $current_filter Current WordPress filter.
+ * @param object $args Sync args.
+ * @param string $queue Sync queue.
+ */
+ public function enqueue_action( $current_filter, $args, $queue ) {
+ // don't enqueue an action during the outbound http request - this prevents recursion.
+ if ( Settings::is_sending() ) {
+ return;
+ }
+
+ if ( ! ( new Connection_Manager() )->is_connected() ) {
+ // Don't enqueue an action if the site is disconnected.
+ return;
+ }
+
+ /**
+ * Add an action hook to execute when anything on the whitelist gets sent to the queue to sync.
+ *
+ * @module sync
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.9.0
+ */
+ do_action( 'jetpack_sync_action_before_enqueue' );
+
+ /**
+ * Modify or reject the data within an action before it is enqueued locally.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param array The action parameters
+ */
+ $args = apply_filters( "jetpack_sync_before_enqueue_$current_filter", $args );
+
+ // allow listeners to abort.
+ if ( false === $args ) {
+ return;
+ }
+
+ /*
+ * Periodically check the size of the queue, and disable adding to it if
+ * it exceeds some limit AND the oldest item exceeds the age limit (i.e. sending has stopped).
+ */
+ if ( ! $this->can_add_to_queue( $queue ) ) {
+ if ( 'sync' === $queue->id ) {
+ $this->sync_data_loss( $queue );
+ }
+ return;
+ }
+
+ /*
+ * If we add any items to the queue, we should try to ensure that our script
+ * can't be killed before they are sent.
+ */
+ if ( function_exists( 'ignore_user_abort' ) ) {
+ ignore_user_abort( true );
+ }
+
+ if (
+ 'sync' === $queue->id ||
+ in_array(
+ $current_filter,
+ array(
+ 'jetpack_full_sync_start',
+ 'jetpack_full_sync_end',
+ 'jetpack_full_sync_cancel',
+ ),
+ true
+ )
+ ) {
+ $queue->add(
+ array(
+ $current_filter,
+ $args,
+ get_current_user_id(),
+ microtime( true ),
+ Settings::is_importing(),
+ $this->get_actor( $current_filter, $args ),
+ )
+ );
+ } else {
+ $queue->add(
+ array(
+ $current_filter,
+ $args,
+ get_current_user_id(),
+ microtime( true ),
+ Settings::is_importing(),
+ )
+ );
+ }
+
+ // since we've added some items, let's try to load the sender so we can send them as quickly as possible.
+ if ( ! Actions::$sender ) {
+ add_filter( 'jetpack_sync_sender_should_load', __NAMESPACE__ . '\Actions::should_initialize_sender_enqueue', 10, 1 );
+ if ( did_action( 'init' ) ) {
+ Actions::add_sender_shutdown();
+ }
+ }
+ }
+
+ /**
+ * Sync Data Loss Handler
+ *
+ * @param Queue $queue Sync queue.
+ * @return boolean was send successful
+ */
+ public function sync_data_loss( $queue ) {
+ if ( ! Settings::is_sync_enabled() ) {
+ return;
+ }
+ $updated = Health::update_status( Health::STATUS_OUT_OF_SYNC );
+
+ if ( ! $updated ) {
+ return;
+ }
+
+ $data = array(
+ 'timestamp' => microtime( true ),
+ 'queue_size' => $queue->size(),
+ 'queue_lag' => $queue->lag(),
+ );
+
+ $sender = Sender::get_instance();
+ return $sender->send_action( 'jetpack_sync_data_loss', $data );
+ }
+
+ /**
+ * Get the event's actor.
+ *
+ * @param string $current_filter Current wp-admin page.
+ * @param object $args Sync event.
+ * @return array Actor information.
+ */
+ public function get_actor( $current_filter, $args ) {
+ if ( 'wp_login' === $current_filter ) {
+ $user = get_user_by( 'ID', $args[1]->data->ID );
+ } else {
+ $user = wp_get_current_user();
+ }
+
+ $roles = new Roles();
+ $translated_role = $roles->translate_user_to_role( $user );
+
+ $actor = array(
+ 'wpcom_user_id' => null,
+ 'external_user_id' => isset( $user->ID ) ? $user->ID : null,
+ 'display_name' => isset( $user->display_name ) ? $user->display_name : null,
+ 'user_email' => isset( $user->user_email ) ? $user->user_email : null,
+ 'user_roles' => isset( $user->roles ) ? $user->roles : null,
+ 'translated_role' => $translated_role ? $translated_role : null,
+ 'is_cron' => defined( 'DOING_CRON' ) ? DOING_CRON : false,
+ 'is_rest' => defined( 'REST_API_REQUEST' ) ? REST_API_REQUEST : false,
+ 'is_xmlrpc' => defined( 'XMLRPC_REQUEST' ) ? XMLRPC_REQUEST : false,
+ 'is_wp_rest' => defined( 'REST_REQUEST' ) ? REST_REQUEST : false,
+ 'is_ajax' => defined( 'DOING_AJAX' ) ? DOING_AJAX : false,
+ 'is_wp_admin' => is_admin(),
+ 'is_cli' => defined( 'WP_CLI' ) ? WP_CLI : false,
+ 'from_url' => $this->get_request_url(),
+ );
+
+ if ( $this->should_send_user_data_with_actor( $current_filter ) ) {
+ $ip = IP_Utils::get_ip();
+
+ $actor['ip'] = $ip ? $ip : '';
+ $actor['user_agent'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? filter_var( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : 'unknown';
+ }
+
+ return $actor;
+ }
+
+ /**
+ * Should user data be sent as the actor?
+ *
+ * @param string $current_filter The current WordPress filter being executed.
+ * @return bool
+ */
+ public function should_send_user_data_with_actor( $current_filter ) {
+ $should_send = in_array( $current_filter, array( 'jetpack_wp_login', 'wp_logout', 'jetpack_valid_failed_login_attempt' ), true );
+ /**
+ * Allow or deny sending actor's user data ( IP and UA ) during a sync event
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.8.0
+ *
+ * @module sync
+ *
+ * @param bool True if we should send user data
+ * @param string The current filter that is performing the sync action
+ */
+ return apply_filters( 'jetpack_sync_actor_user_data', $should_send, $current_filter );
+ }
+
+ /**
+ * Sets Listener defaults.
+ */
+ public function set_defaults() {
+ $this->sync_queue = new Queue( 'sync' );
+ $this->full_sync_queue = new Queue( 'full_sync' );
+ $this->set_queue_size_limit( Settings::get_setting( 'max_queue_size' ) );
+ $this->set_queue_lag_limit( Settings::get_setting( 'max_queue_lag' ) );
+ }
+
+ /**
+ * Get the request URL.
+ *
+ * @return string Request URL, if known. Otherwise, wp-admin or home_url.
+ */
+ public function get_request_url() {
+ if ( isset( $_SERVER['HTTP_HOST'] ) && isset( $_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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-lock.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-lock.php
new file mode 100644
index 00000000..61b89a1c
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-lock.php
@@ -0,0 +1,77 @@
+ $locked_time ) {
+ update_option( $lock_name, false, false );
+ }
+ return false;
+ }
+
+ $locked_time = microtime( true ) + $expiry;
+ update_option( $lock_name, $locked_time, false );
+ return $locked_time;
+ }
+
+ /**
+ * Remove the lock.
+ *
+ * @access public
+ *
+ * @param string $name lock name.
+ * @param bool|float $lock_expiration lock expiration.
+ */
+ public function remove( $name, $lock_expiration = false ) {
+ $lock_name = self::LOCK_PREFIX . $name;
+
+ // Only remove lock if current value matches our lock.
+ if ( true === $lock_expiration || (string) get_option( $lock_name ) === (string) $lock_expiration ) {
+ update_option( $lock_name, false, false );
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-main.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-main.php
new file mode 100644
index 00000000..f48e2c66
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-main.php
@@ -0,0 +1,135 @@
+uninstall();
+ }
+
+ /**
+ * Sync cleanup on shutdown.
+ */
+ public static function on_jetpack_site_disconnected() {
+ add_action( 'shutdown', array( __CLASS__, 'sync_cleanup' ), 10000 );
+ }
+
+ /**
+ * Delete all sync related data on Site disconnect / clean up custom table.
+ * Needs to happen on shutdown to prevent fatals.
+ */
+ public static function sync_cleanup() {
+ Sender::get_instance()->uninstall();
+
+ $table_storage = new Queue_Storage_Table( 'test_queue' );
+ $table_storage->drop_table();
+ }
+
+ /**
+ * 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
+ */
+ public static function on_plugins_loaded_early() {
+ /**
+ * Additional Sync modules can be carried out into their own packages and they
+ * will get their own config settings.
+ *
+ * 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();
+
+ // We need to define this here so that it's hooked before `updating_jetpack_version` is called.
+ add_action( 'updating_jetpack_version', array( 'Automattic\\Jetpack\\Sync\\Actions', 'cleanup_on_upgrade' ), 10, 2 );
+ }
+
+ /**
+ * Runs after most of plugins_loaded hook functions have been run.
+ *
+ * @action plugins_loaded
+ */
+ public static function on_plugins_loaded_late() {
+ /*
+ * Init after plugins loaded and before the `init` action. This helps with issues where plugins init
+ * with a high priority or sites that use alternate cron.
+ */
+ Sync_Actions::init();
+
+ // Enable non-blocking Jetpack Sync flow.
+ $non_block_enabled = (bool) get_option( 'jetpack_sync_non_blocking', false );
+
+ /**
+ * Filters the option to enable non-blocking sync.
+ *
+ * Default value is false, filter to true to enable non-blocking mode which will have
+ * WP.com return early and use the sync/close endpoint to check-in processed items.
+ *
+ * @since 1.12.3
+ *
+ * @param bool $enabled Should non-blocking flow be enabled.
+ */
+ $filtered = (bool) apply_filters( 'jetpack_sync_non_blocking', $non_block_enabled );
+
+ if ( $non_block_enabled !== $filtered ) {
+ update_option( 'jetpack_sync_non_blocking', $filtered, false );
+ }
+
+ // Initialize health-related hooks after plugins have loaded.
+ Health::init();
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-modules.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-modules.php
new file mode 100644
index 00000000..993ebef5
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-modules.php
@@ -0,0 +1,160 @@
+set_defaults();
+ }
+ }
+
+ /**
+ * Gets the name of an initialized module. Returns false if given module has not been initialized.
+ *
+ * @access public
+ * @static
+ *
+ * @param string $module_name A module name.
+ *
+ * @return bool|Automattic\Jetpack\Sync\Modules\Module
+ */
+ public static function get_module( $module_name ) {
+ foreach ( self::get_modules() as $module ) {
+ if ( $module->name() === $module_name ) {
+ return $module;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Loads and sets defaults for all declared modules.
+ *
+ * @access public
+ * @static
+ *
+ * @return array
+ */
+ public static function initialize_modules() {
+ /**
+ * Filters the list of class names of sync modules.
+ * If you add to this list, make sure any classes implement the
+ * Jetpack_Sync_Module interface.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ */
+ $modules = apply_filters( 'jetpack_sync_modules', self::DEFAULT_SYNC_MODULES );
+
+ $modules = array_map( array( __CLASS__, 'load_module' ), $modules );
+
+ return array_map( array( __CLASS__, 'set_module_defaults' ), $modules );
+ }
+
+ /**
+ * Returns an instance of the given module class.
+ *
+ * @access public
+ * @static
+ *
+ * @param string $module_class The classname of a Jetpack sync module.
+ *
+ * @return Automattic\Jetpack\Sync\Modules\Module
+ */
+ public static function load_module( $module_class ) {
+ return new $module_class();
+ }
+
+ /**
+ * Sets defaults for the given instance of a Jetpack sync module.
+ *
+ * @access public
+ * @static
+ *
+ * @param Automattic\Jetpack\Sync\Modules\Module $module Instance of a Jetpack sync module.
+ *
+ * @return Automattic\Jetpack\Sync\Modules\Module
+ */
+ public static function set_module_defaults( $module ) {
+ $module->set_defaults();
+ if ( method_exists( $module, 'set_late_default' ) ) {
+ add_action( 'init', array( $module, 'set_late_default' ), 90 );
+ }
+ return $module;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php
new file mode 100644
index 00000000..24fdb53f
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php
@@ -0,0 +1,30 @@
+id = $id;
+ $this->items_with_ids = $items_with_ids;
+ }
+
+ /**
+ * Retrieve the sync items in the buffer, in an ID => value form.
+ *
+ * @access public
+ *
+ * @return bool|array Sync items in the buffer.
+ */
+ public function get_items() {
+ return array_combine( $this->get_item_ids(), $this->get_item_values() );
+ }
+
+ /**
+ * Retrieve the values of the sync items in the buffer.
+ *
+ * @access public
+ *
+ * @return array Sync items values.
+ */
+ public function get_item_values() {
+ return Utils::get_item_values( $this->items_with_ids );
+ }
+
+ /**
+ * Retrieve the IDs of the sync items in the buffer.
+ *
+ * @access public
+ *
+ * @return array Sync items IDs.
+ */
+ public function get_item_ids() {
+ return Utils::get_item_ids( $this->items_with_ids );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php
new file mode 100644
index 00000000..fa9da083
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php
@@ -0,0 +1,678 @@
+id = str_replace( '-', '_', $id ); // Necessary to ensure we don't have ID collisions in the SQL.
+ $this->row_iterator = 0;
+ $this->random_int = wp_rand( 1, 1000000 );
+
+ /**
+ * If the Custom queue table is enabled - let's use it as a backend. Otherwise, fall back to the Options table.
+ */
+ if ( Settings::is_custom_queue_table_enabled() ) {
+ $this->queue_storage = new Queue_Storage_Table( $this->id );
+ } else {
+ // Initialize the storage with the Options table backend. To be changed in subsequent updates to include the logic to switch to Custom Table.
+ $this->queue_storage = new Queue_Storage_Options( $this->id );
+ }
+ }
+
+ /**
+ * Add a single item to the queue.
+ *
+ * @param object $item Event object to add to queue.
+ *
+ * @return bool|WP_Error
+ */
+ public function add( $item ) {
+ $added = false;
+
+ // If empty, don't add.
+ if ( empty( $item ) ) {
+ return false;
+ }
+
+ // Attempt to serialize data, if an exception (closures) return early.
+ try {
+ $item = serialize( $item ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize
+ } catch ( \Exception $ex ) {
+ return new WP_Error( 'queue_unable_to_serialize', 'Unable to serialize item' );
+ }
+
+ // This basically tries to add the option until enough time has elapsed that
+ // it has a unique (microtime-based) option key.
+ while ( ! $added ) {
+ $added = $this->queue_storage->insert_item( $this->get_next_data_row_option_name(), $item );
+ }
+
+ return $added;
+ }
+
+ /**
+ * Insert all the items in a single SQL query. May be subject to query size limits!
+ *
+ * @param array $items Array of events to add to the queue.
+ *
+ * @return bool|\WP_Error
+ */
+ public function add_all( $items ) {
+ // TODO check and figure out if it's used at all and if we can optimize it.
+ $base_option_name = $this->get_next_data_row_option_name();
+
+ $rows_added = $this->queue_storage->add_all( $items, $base_option_name );
+
+ if ( count( $items ) !== $rows_added ) {
+ return new WP_Error( 'row_count_mismatch', "The number of rows inserted didn't match the size of the input array" );
+ }
+
+ return true;
+ }
+
+ /**
+ * Get the front-most item on the queue without checking it out.
+ *
+ * @param int $count Number of items to return when looking at the items.
+ *
+ * @return array
+ */
+ public function peek( $count = 1 ) {
+ $items = $this->fetch_items( $count );
+ if ( $items ) {
+ return Utils::get_item_values( $items );
+ }
+
+ return array();
+ }
+
+ /**
+ * Gets items with particular IDs.
+ *
+ * @param array $item_ids Array of item IDs to retrieve.
+ *
+ * @return array
+ */
+ public function peek_by_id( $item_ids ) {
+ $items = $this->fetch_items_by_id( $item_ids );
+ if ( $items ) {
+ return Utils::get_item_values( $items );
+ }
+
+ return array();
+ }
+
+ /**
+ * Gets the queue lag.
+ * Lag is the difference in time between the age of the oldest item
+ * (aka first or frontmost item) and the current time.
+ *
+ * @param float $now The current time in microtime.
+ *
+ * @return float
+ */
+ public function lag( $now = null ) {
+ return (float) $this->queue_storage->get_lag( $now );
+ }
+
+ /**
+ * Resets the queue.
+ */
+ public function reset() {
+ $this->delete_checkout_id();
+
+ $this->queue_storage->clear_queue();
+ }
+
+ /**
+ * Return the size of the queue.
+ *
+ * @return int
+ */
+ public function size() {
+ return $this->queue_storage->get_item_count();
+ }
+
+ /**
+ * Lets you know if there is any items in the queue.
+ *
+ * We use this peculiar implementation because it's much faster than count(*).
+ *
+ * @return bool
+ */
+ public function has_any_items() {
+ return $this->size() > 0;
+ }
+
+ /**
+ * Used to checkout the queue.
+ *
+ * @param int $buffer_size Size of the buffer to checkout.
+ *
+ * @return Automattic\Jetpack\Sync\Queue_Buffer|bool|int|\WP_Error
+ */
+ public function checkout( $buffer_size ) {
+ if ( $this->get_checkout_id() ) {
+ return new WP_Error( 'unclosed_buffer', 'There is an unclosed buffer' );
+ }
+
+ // TODO check if adding a prefix is going to be a problem
+ $buffer_id = uniqid( '', true );
+
+ $result = $this->set_checkout_id( $buffer_id );
+
+ if ( ! $result || is_wp_error( $result ) ) {
+ return $result;
+ }
+
+ $items = $this->fetch_items( $buffer_size );
+
+ if ( ! is_countable( $items ) ) {
+ return false;
+ }
+
+ if ( count( $items ) === 0 ) {
+ return false;
+ }
+
+ return new Queue_Buffer( $buffer_id, array_slice( $items, 0, $buffer_size ) );
+ }
+
+ /**
+ * Given a list of items return the items ids.
+ *
+ * @param array $items List of item objects.
+ *
+ * @return array Ids of the items.
+ */
+ public function get_ids( $items ) {
+ return array_map(
+ function ( $item ) {
+ return $item->id;
+ },
+ $items
+ );
+ }
+
+ /**
+ * Pop elements from the queue.
+ *
+ * @param int $limit Number of items to pop from the queue.
+ *
+ * @return array|object|null
+ */
+ public function pop( $limit ) {
+ $items = $this->fetch_items( $limit );
+
+ $ids = $this->get_ids( $items );
+
+ $this->delete( $ids );
+
+ return $items;
+ }
+
+ /**
+ * Get the items from the queue with a memory limit.
+ *
+ * This checks out rows until it either empties the queue or hits a certain memory limit
+ * it loads the sizes from the DB first so that it doesn't accidentally
+ * load more data into memory than it needs to.
+ * The only way it will load more items than $max_size is if a single queue item
+ * exceeds the memory limit, but in that case it will send that item by itself.
+ *
+ * @param int $max_memory (bytes) Maximum memory threshold.
+ * @param int $max_buffer_size Maximum buffer size (number of items).
+ *
+ * @return \Automattic\Jetpack\Sync\Queue_Buffer|bool|int|\WP_Error
+ */
+ public function checkout_with_memory_limit( $max_memory, $max_buffer_size = 500 ) {
+ if ( $this->get_checkout_id() ) {
+ return new WP_Error( 'unclosed_buffer', 'There is an unclosed buffer' );
+ }
+
+ $buffer_id = uniqid( '', true );
+
+ $result = $this->set_checkout_id( $buffer_id );
+
+ if ( ! $result || is_wp_error( $result ) ) {
+ return $result;
+ }
+
+ // How much memory is currently being used by the items.
+ $total_memory = 0;
+
+ // Store the items to return
+ $items = array();
+
+ $current_items_ids = $this->queue_storage->get_items_ids_with_size( $max_buffer_size - count( $items ) );
+
+ // If no valid items are returned or no items are returned, continue.
+ if ( ! is_countable( $current_items_ids ) || count( $current_items_ids ) === 0 ) {
+ return false;
+ }
+
+ $item_ids_to_fetch = array();
+
+ foreach ( $current_items_ids as $id => $item_with_size ) {
+ $total_memory += $item_with_size->value_size;
+
+ // If this is the first item and it exceeds memory, allow loop to continue
+ // we will exit on the next iteration instead.
+ if ( $total_memory > $max_memory && $id > 0 ) {
+ break;
+ }
+
+ $item_ids_to_fetch[] = $item_with_size->id;
+ }
+
+ $current_items = $this->queue_storage->fetch_items_by_ids( $item_ids_to_fetch );
+
+ $items_count = is_countable( $current_items ) ? count( $current_items ) : 0;
+
+ if ( $items_count > 0 ) {
+ /**
+ * Save some memory by moving things one by one to the array of items being returned, instead of
+ * unserializing all and then merging them with other items.
+ *
+ * PHPCS ignore is because this is the expected behavior - we're assigning a variable in the condition part of the loop.
+ */
+ // phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition
+ while ( ( $current_item = array_shift( $current_items ) ) !== null ) {
+ // @codingStandardsIgnoreStart
+ $current_item->value = unserialize( $current_item->value );
+ // @codingStandardsIgnoreEnd
+
+ $items[] = $current_item;
+ }
+ }
+
+ if ( count( $items ) === 0 ) {
+ $this->delete_checkout_id();
+
+ return false;
+ }
+
+ return new Queue_Buffer( $buffer_id, $items );
+ }
+
+ /**
+ * Check in the queue.
+ *
+ * @param Automattic\Jetpack\Sync\Queue_Buffer $buffer Queue_Buffer object.
+ *
+ * @return bool|\WP_Error
+ */
+ public function checkin( $buffer ) {
+ $is_valid = $this->validate_checkout( $buffer );
+
+ if ( is_wp_error( $is_valid ) ) {
+ return $is_valid;
+ }
+
+ $this->delete_checkout_id();
+
+ return true;
+ }
+
+ /**
+ * Close the buffer.
+ *
+ * @param Automattic\Jetpack\Sync\Queue_Buffer $buffer Queue_Buffer object.
+ * @param null|array $ids_to_remove Ids to remove from the queue.
+ *
+ * @return bool|\WP_Error
+ */
+ public function close( $buffer, $ids_to_remove = null ) {
+ $is_valid = $this->validate_checkout( $buffer );
+
+ 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 ( $ids_to_remove !== null ) {
+ $this->delete( $ids_to_remove );
+ }
+ return $is_valid;
+ }
+
+ $this->delete_checkout_id();
+
+ // By default clear all items in the buffer.
+ if ( $ids_to_remove === null ) {
+ $ids_to_remove = $buffer->get_item_ids();
+ }
+
+ $this->delete( $ids_to_remove );
+
+ return true;
+ }
+
+ /**
+ * Delete elements from the queue.
+ *
+ * @param array $ids Ids to delete.
+ *
+ * @return bool|int
+ */
+ private function delete( $ids ) {
+ if ( array() === $ids ) {
+ return 0;
+ }
+
+ $this->queue_storage->delete_items_by_ids( $ids );
+
+ return true;
+ }
+
+ /**
+ * Flushes all items from the queue.
+ *
+ * @return array
+ */
+ public function flush_all() {
+ $items = Utils::get_item_values( $this->fetch_items() );
+ $this->reset();
+
+ return $items;
+ }
+
+ /**
+ * Get all the items from the queue.
+ *
+ * @return array|object|null
+ */
+ public function get_all() {
+ return $this->fetch_items();
+ }
+
+ /**
+ * Forces Checkin of the queue.
+ * Use with caution, this could allow multiple processes to delete
+ * and send from the queue at the same time
+ */
+ public function force_checkin() {
+ $this->delete_checkout_id();
+ }
+
+ /**
+ * 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.
+ *
+ * @param int $timeout The wait time in seconds for the queue to be empty.
+ *
+ * @return bool|int|\WP_Error
+ */
+ public function lock( $timeout = 30 ) {
+ $tries = 0;
+
+ while ( $this->has_any_items() && $tries < $timeout ) {
+ sleep( 1 );
+ ++$tries;
+ }
+
+ if ( 30 === $tries ) {
+ return new WP_Error( 'lock_timeout', 'Timeout waiting for sync queue to empty' );
+ }
+
+ if ( $this->get_checkout_id() ) {
+ return new WP_Error( 'unclosed_buffer', 'There is an unclosed buffer' );
+ }
+
+ // Hopefully this means we can acquire a checkout?
+ $result = $this->set_checkout_id( 'lock' );
+
+ if ( ! $result || is_wp_error( $result ) ) {
+ return $result;
+ }
+
+ return true;
+ }
+
+ /**
+ * Unlocks the queue.
+ *
+ * @return bool|int
+ */
+ public function unlock() {
+ return $this->delete_checkout_id();
+ }
+
+ /**
+ * This option is specifically chosen to, as much as possible, preserve time order
+ * and minimise the possibility of collisions between multiple processes working
+ * at the same time.
+ *
+ * @return string
+ */
+ protected function generate_option_name_timestamp() {
+ return sprintf( '%.6f', microtime( true ) );
+ }
+
+ /**
+ * Gets the checkout ID.
+ *
+ * @return bool|string
+ */
+ private function get_checkout_id() {
+ global $wpdb;
+ $checkout_value = $wpdb->get_var(
+ $wpdb->prepare(
+ "SELECT option_value FROM $wpdb->options WHERE option_name = %s",
+ $this->get_lock_option_name()
+ )
+ );
+
+ if ( $checkout_value ) {
+ list( $checkout_id, $timestamp ) = explode( ':', $checkout_value );
+ if ( (int) $timestamp > time() ) {
+ return $checkout_id;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Sets the checkout id.
+ *
+ * @param string $checkout_id The ID of the checkout.
+ *
+ * @return bool|int
+ */
+ private function set_checkout_id( $checkout_id ) {
+ global $wpdb;
+
+ $expires = time() + Defaults::$default_sync_queue_lock_timeout;
+ $updated_num = $wpdb->query(
+ $wpdb->prepare(
+ "UPDATE $wpdb->options SET option_value = %s WHERE option_name = %s",
+ "$checkout_id:$expires",
+ $this->get_lock_option_name()
+ )
+ );
+
+ if ( ! $updated_num ) {
+ $updated_num = $wpdb->query(
+ $wpdb->prepare(
+ "INSERT INTO $wpdb->options ( option_name, option_value, autoload ) VALUES ( %s, %s, 'no' )",
+ $this->get_lock_option_name(),
+ "$checkout_id:$expires"
+ )
+ );
+ }
+
+ return $updated_num;
+ }
+
+ /**
+ * Deletes the checkout ID.
+ *
+ * @return bool|int
+ */
+ private function delete_checkout_id() {
+ global $wpdb;
+ // Rather than delete, which causes fragmentation, we update in place.
+ return $wpdb->query(
+ $wpdb->prepare(
+ "UPDATE $wpdb->options SET option_value = %s WHERE option_name = %s",
+ '0:0',
+ $this->get_lock_option_name()
+ )
+ );
+ }
+
+ /**
+ * Return the lock option name.
+ *
+ * @return string
+ */
+ private function get_lock_option_name() {
+ return "jpsq_{$this->id}_checkout";
+ }
+
+ /**
+ * Return the next data row option name.
+ *
+ * @return string
+ */
+ private function get_next_data_row_option_name() {
+ $timestamp = $this->generate_option_name_timestamp();
+
+ // Row iterator is used to avoid collisions where we're writing data waaay fast in a single process.
+ if ( PHP_INT_MAX === $this->row_iterator ) {
+ $this->row_iterator = 0;
+ } else {
+ $this->row_iterator += 1;
+ }
+
+ return 'jpsq_' . $this->id . '-' . $timestamp . '-' . $this->random_int . '-' . $this->row_iterator;
+ }
+
+ /**
+ * Return the items in the queue.
+ *
+ * @param null|int $limit Limit to the number of items we fetch at once.
+ *
+ * @return array|object|null
+ */
+ private function fetch_items( $limit = null ) {
+ $items = $this->queue_storage->fetch_items( $limit );
+
+ return $this->unserialize_values( $items );
+ }
+
+ /**
+ * Return items with specific ids.
+ *
+ * @param array $items_ids Array of event ids.
+ *
+ * @return array|object|null
+ */
+ private function fetch_items_by_id( $items_ids ) {
+ return $this->unserialize_values( $this->queue_storage->fetch_items_by_ids( $items_ids ) );
+ }
+
+ /**
+ * Unserialize item values.
+ *
+ * @param array $items Events from the Queue to be unserialized.
+ *
+ * @return mixed
+ */
+ private function unserialize_values( $items ) {
+ array_walk(
+ $items,
+ function ( $item ) {
+ // @codingStandardsIgnoreStart
+ $item->value = @unserialize( $item->value );
+ // @codingStandardsIgnoreEnd
+ }
+ );
+
+ return $items;
+ }
+
+ /**
+ * Return true if the buffer is still valid or an Error other wise.
+ *
+ * @param Automattic\Jetpack\Sync\Queue_Buffer $buffer The Queue_Buffer.
+ *
+ * @return bool|WP_Error
+ */
+ private function validate_checkout( $buffer ) {
+ if ( ! $buffer instanceof Queue_Buffer ) {
+ return new WP_Error( 'not_a_buffer', 'You must checkin an instance of Automattic\\Jetpack\\Sync\\Queue_Buffer' );
+ }
+
+ $checkout_id = $this->get_checkout_id();
+
+ if ( ! $checkout_id ) {
+ return new WP_Error( 'buffer_not_checked_out', 'There are no checked out buffers' );
+ }
+
+ // TODO: change to strict comparison.
+ 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' );
+ }
+
+ return true;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php
new file mode 100644
index 00000000..1ed11d35
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php
@@ -0,0 +1,1457 @@
+query( "DELETE FROM $wpdb->posts" );
+
+ // Delete comments from cache.
+ $comment_ids = $wpdb->get_col( "SELECT comment_ID FROM $wpdb->comments" );
+ if ( ! empty( $comment_ids ) ) {
+ clean_comment_cache( $comment_ids );
+ }
+ $wpdb->query( "DELETE FROM $wpdb->comments" );
+
+ // Also need to delete terms from cache.
+ $term_ids = $wpdb->get_col( "SELECT term_id FROM $wpdb->terms" );
+ foreach ( $term_ids as $term_id ) {
+ wp_cache_delete( $term_id, 'terms' );
+ }
+
+ $wpdb->query( "DELETE FROM $wpdb->terms" );
+
+ $wpdb->query( "DELETE FROM $wpdb->term_taxonomy" );
+ $wpdb->query( "DELETE FROM $wpdb->term_relationships" );
+
+ // Callables and constants.
+ $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'jetpack_%'" );
+ $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key NOT LIKE '\_%'" );
+ }
+
+ /**
+ * Ran when full sync has just started.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ */
+ public function full_sync_start( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ $this->reset();
+ }
+
+ /**
+ * Ran when full sync has just finished.
+ *
+ * @access public
+ *
+ * @param string $checksum Deprecated since 7.3.0.
+ */
+ public function full_sync_end( $checksum ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ // Noop right now.
+ }
+
+ /**
+ * Retrieve the number of terms.
+ *
+ * @access public
+ *
+ * @return int Number of terms.
+ */
+ public function term_count() {
+ global $wpdb;
+ return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->terms" );
+ }
+
+ /**
+ * Retrieve the number of rows in the `term_taxonomy` table.
+ *
+ * @access public
+ *
+ * @return int Number of terms.
+ */
+ public function term_taxonomy_count() {
+ global $wpdb;
+ return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->term_taxonomy" );
+ }
+
+ /**
+ * Retrieve the number of term relationships.
+ *
+ * @access public
+ *
+ * @return int Number of rows in the term relationships table.
+ */
+ public function term_relationship_count() {
+ global $wpdb;
+ return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->term_relationships" );
+ }
+
+ /**
+ * Retrieve the number of posts with a particular post status within a certain range.
+ *
+ * @access public
+ *
+ * @todo Prepare the SQL query before executing it.
+ *
+ * @param string $status Post status.
+ * @param int $min_id Minimum post ID.
+ * @param int $max_id Maximum post ID.
+ * @return int Number of posts.
+ */
+ public function post_count( $status = null, $min_id = null, $max_id = null ) {
+ global $wpdb;
+
+ $where = '';
+
+ if ( $status ) {
+ $where = "post_status = '" . esc_sql( $status ) . "'";
+ } else {
+ $where = '1=1';
+ }
+
+ if ( ! empty( $min_id ) ) {
+ $where .= ' AND ID >= ' . (int) $min_id;
+ }
+
+ if ( ! empty( $max_id ) ) {
+ $where .= ' AND ID <= ' . (int) $max_id;
+ }
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE $where" );
+ }
+
+ /**
+ * Retrieve the posts with a particular post status.
+ *
+ * @access public
+ *
+ * @todo Implement range and actually use max_id/min_id arguments.
+ *
+ * @param string $status Post status.
+ * @param int $min_id Minimum post ID.
+ * @param int $max_id Maximum post ID.
+ * @return array Array of posts.
+ */
+ public function get_posts( $status = null, $min_id = null, $max_id = null ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ $args = array(
+ 'orderby' => 'ID',
+ 'posts_per_page' => -1,
+ );
+
+ if ( $status ) {
+ $args['post_status'] = $status;
+ } else {
+ $args['post_status'] = 'any';
+ }
+
+ return get_posts( $args );
+ }
+
+ /**
+ * Retrieve a post object by the post ID.
+ *
+ * @access public
+ *
+ * @param int $id Post ID.
+ * @return \WP_Post Post object.
+ */
+ public function get_post( $id ) {
+ return get_post( $id );
+ }
+
+ /**
+ * Update or insert a post.
+ *
+ * @access public
+ *
+ * @param \WP_Post $post Post object.
+ * @param bool $silent Whether to perform a silent action. Not used in this implementation.
+ */
+ public function upsert_post( $post, $silent = false ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ global $wpdb;
+
+ // Reject the post if it's not a \WP_Post.
+ if ( ! $post instanceof \WP_Post ) {
+ return;
+ }
+
+ $post = $post->to_array();
+
+ // Reject posts without an ID.
+ if ( ! isset( $post['ID'] ) ) {
+ return;
+ }
+
+ $now = current_time( 'mysql' );
+ $now_gmt = get_gmt_from_date( $now );
+
+ $defaults = array(
+ 'ID' => 0,
+ 'post_author' => '0',
+ 'post_content' => '',
+ 'post_content_filtered' => '',
+ 'post_title' => '',
+ 'post_name' => '',
+ 'post_excerpt' => '',
+ 'post_status' => 'draft',
+ 'post_type' => 'post',
+ 'comment_status' => 'closed',
+ 'comment_count' => '0',
+ 'ping_status' => '',
+ 'post_password' => '',
+ 'to_ping' => '',
+ 'pinged' => '',
+ 'post_parent' => 0,
+ 'menu_order' => 0,
+ 'guid' => '',
+ 'post_date' => $now,
+ 'post_date_gmt' => $now_gmt,
+ 'post_modified' => $now,
+ 'post_modified_gmt' => $now_gmt,
+ );
+
+ $post = array_intersect_key( $post, $defaults );
+
+ $post = sanitize_post( $post, 'db' );
+
+ unset( $post['filter'] );
+
+ $exists = $wpdb->get_var( $wpdb->prepare( "SELECT EXISTS( SELECT 1 FROM $wpdb->posts WHERE ID = %d )", $post['ID'] ) );
+
+ if ( $exists ) {
+ $wpdb->update( $wpdb->posts, $post, array( 'ID' => $post['ID'] ) );
+ } else {
+ $wpdb->insert( $wpdb->posts, $post );
+ }
+
+ clean_post_cache( $post['ID'] );
+ }
+
+ /**
+ * Delete a post by the post ID.
+ *
+ * @access public
+ *
+ * @param int $post_id Post ID.
+ */
+ public function delete_post( $post_id ) {
+ wp_delete_post( $post_id, true );
+ }
+
+ /**
+ * Retrieve the checksum for posts within a range.
+ *
+ * @access public
+ *
+ * @param int $min_id Minimum post ID.
+ * @param int $max_id Maximum post ID.
+ * @return int The checksum.
+ */
+ public function posts_checksum( $min_id = null, $max_id = null ) {
+ return $this->summarize_checksum_histogram( $this->checksum_histogram( 'posts', null, $min_id, $max_id ) );
+ }
+
+ /**
+ * Retrieve the checksum for post meta within a range.
+ *
+ * @access public
+ *
+ * @param int $min_id Minimum post meta ID.
+ * @param int $max_id Maximum post meta ID.
+ * @return int The checksum.
+ */
+ public function post_meta_checksum( $min_id = null, $max_id = null ) {
+ return $this->summarize_checksum_histogram( $this->checksum_histogram( 'postmeta', null, $min_id, $max_id ) );
+ }
+
+ /**
+ * Retrieve the number of comments with a particular comment status within a certain range.
+ *
+ * @access public
+ *
+ * @todo Prepare the SQL query before executing it.
+ *
+ * @param string $status Comment status.
+ * @param int $min_id Minimum comment ID.
+ * @param int $max_id Maximum comment ID.
+ * @return int Number of comments.
+ */
+ public function comment_count( $status = null, $min_id = null, $max_id = null ) {
+ global $wpdb;
+
+ $comment_approved = $this->comment_status_to_approval_value( $status );
+
+ if ( false !== $comment_approved ) {
+ $where = "comment_approved = '" . esc_sql( $comment_approved ) . "'";
+ } else {
+ $where = '1=1';
+ }
+
+ if ( ! empty( $min_id ) ) {
+ $where .= ' AND comment_ID >= ' . (int) $min_id;
+ }
+
+ if ( ! empty( $max_id ) ) {
+ $where .= ' AND comment_ID <= ' . (int) $max_id;
+ }
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE $where" );
+ }
+
+ /**
+ * Translate a comment status to a value of the comment_approved field.
+ *
+ * @access protected
+ *
+ * @param string $status Comment status.
+ * @return string|bool New comment_approved value, false if the status doesn't affect it.
+ */
+ protected function comment_status_to_approval_value( $status ) {
+ switch ( (string) $status ) {
+ case 'approve':
+ case '1':
+ return '1';
+ case 'hold':
+ case '0':
+ return '0';
+ case 'spam':
+ return 'spam';
+ case 'trash':
+ return 'trash';
+ case 'post-trashed':
+ return 'post-trashed';
+ case 'any':
+ case 'all':
+ default:
+ return false;
+ }
+ }
+
+ /**
+ * Retrieve the comments with a particular comment status.
+ *
+ * @access public
+ *
+ * @todo Implement range and actually use max_id/min_id arguments.
+ *
+ * @param string $status Comment status.
+ * @param int $min_id Minimum comment ID.
+ * @param int $max_id Maximum comment ID.
+ * @return array Array of comments.
+ */
+ public function get_comments( $status = null, $min_id = null, $max_id = null ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ $args = array(
+ 'orderby' => 'ID',
+ 'status' => 'all',
+ );
+
+ if ( $status ) {
+ $args['status'] = $status;
+ }
+
+ return get_comments( $args );
+ }
+
+ /**
+ * Retrieve a comment object by the comment ID.
+ *
+ * @access public
+ *
+ * @param int $id Comment ID.
+ * @return \WP_Comment Comment object.
+ */
+ public function get_comment( $id ) {
+ return \WP_Comment::get_instance( $id );
+ }
+
+ /**
+ * Update or insert a comment.
+ *
+ * @access public
+ *
+ * @param \WP_Comment $comment Comment object.
+ */
+ public function upsert_comment( $comment ) {
+ global $wpdb;
+
+ $comment = $comment->to_array();
+
+ // Filter by fields on comment table.
+ $comment_fields_whitelist = array(
+ 'comment_ID',
+ 'comment_post_ID',
+ 'comment_author',
+ 'comment_author_email',
+ 'comment_author_url',
+ 'comment_author_IP',
+ 'comment_date',
+ 'comment_date_gmt',
+ 'comment_content',
+ 'comment_karma',
+ 'comment_approved',
+ 'comment_agent',
+ 'comment_type',
+ 'comment_parent',
+ 'user_id',
+ );
+
+ foreach ( $comment as $key => $value ) {
+ if ( ! in_array( $key, $comment_fields_whitelist, true ) ) {
+ unset( $comment[ $key ] );
+ }
+ }
+
+ $exists = $wpdb->get_var(
+ $wpdb->prepare(
+ "SELECT EXISTS( SELECT 1 FROM $wpdb->comments WHERE comment_ID = %d )",
+ $comment['comment_ID']
+ )
+ );
+
+ if ( $exists ) {
+ $wpdb->update( $wpdb->comments, $comment, array( 'comment_ID' => $comment['comment_ID'] ) );
+ } else {
+ $wpdb->insert( $wpdb->comments, $comment );
+ }
+ // Remove comment from cache.
+ clean_comment_cache( $comment['comment_ID'] );
+
+ wp_update_comment_count( $comment['comment_post_ID'] );
+ }
+
+ /**
+ * Trash a comment by the comment ID.
+ *
+ * @access public
+ *
+ * @param int $comment_id Comment ID.
+ */
+ public function trash_comment( $comment_id ) {
+ wp_delete_comment( $comment_id );
+ }
+
+ /**
+ * Delete a comment by the comment ID.
+ *
+ * @access public
+ *
+ * @param int $comment_id Comment ID.
+ */
+ public function delete_comment( $comment_id ) {
+ wp_delete_comment( $comment_id, true );
+ }
+
+ /**
+ * Mark a comment by the comment ID as spam.
+ *
+ * @access public
+ *
+ * @param int $comment_id Comment ID.
+ */
+ public function spam_comment( $comment_id ) {
+ wp_spam_comment( $comment_id );
+ }
+
+ /**
+ * Trash the comments of a post.
+ *
+ * @access public
+ *
+ * @param int $post_id Post ID.
+ * @param array $statuses Post statuses. Not used in this implementation.
+ */
+ public function trashed_post_comments( $post_id, $statuses ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ wp_trash_post_comments( $post_id );
+ }
+
+ /**
+ * Untrash the comments of a post.
+ *
+ * @access public
+ *
+ * @param int $post_id Post ID.
+ */
+ public function untrashed_post_comments( $post_id ) {
+ wp_untrash_post_comments( $post_id );
+ }
+
+ /**
+ * Retrieve the checksum for comments within a range.
+ *
+ * @access public
+ *
+ * @param int $min_id Minimum comment ID.
+ * @param int $max_id Maximum comment ID.
+ * @return int The checksum.
+ */
+ public function comments_checksum( $min_id = null, $max_id = null ) {
+ return $this->summarize_checksum_histogram( $this->checksum_histogram( 'comments', null, $min_id, $max_id ) );
+ }
+
+ /**
+ * Retrieve the checksum for comment meta within a range.
+ *
+ * @access public
+ *
+ * @param int $min_id Minimum comment meta ID.
+ * @param int $max_id Maximum comment meta ID.
+ * @return int The checksum.
+ */
+ public function comment_meta_checksum( $min_id = null, $max_id = null ) {
+ return $this->summarize_checksum_histogram( $this->checksum_histogram( 'commentmeta', null, $min_id, $max_id ) );
+ }
+
+ /**
+ * Update the value of an option.
+ *
+ * @access public
+ *
+ * @param string $option Option name.
+ * @param mixed $value Option value.
+ * @return bool False if value was not updated and true if value was updated.
+ */
+ public function update_option( $option, $value ) {
+ return update_option( $option, $value );
+ }
+
+ /**
+ * Retrieve an option value based on an option name.
+ *
+ * @access public
+ *
+ * @param string $option Name of option to retrieve.
+ * @param mixed $default Optional. Default value to return if the option does not exist.
+ * @return mixed Value set for the option.
+ */
+ public function get_option( $option, $default = false ) {
+ return get_option( $option, $default );
+ }
+
+ /**
+ * Remove an option by name.
+ *
+ * @access public
+ *
+ * @param string $option Name of option to remove.
+ * @return bool True, if option is successfully deleted. False on failure.
+ */
+ public function delete_option( $option ) {
+ return delete_option( $option );
+ }
+
+ /**
+ * Change the info of the current theme.
+ *
+ * @access public
+ *
+ * @param array $theme_info Theme info array.
+ */
+ public function set_theme_info( $theme_info ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ // Noop.
+ }
+
+ /**
+ * Whether the current theme supports a certain feature.
+ *
+ * @access public
+ *
+ * @param string $feature Name of the feature.
+ */
+ public function current_theme_supports( $feature ) {
+ return current_theme_supports( $feature );
+ }
+
+ /**
+ * Retrieve metadata for the specified object.
+ *
+ * @access public
+ *
+ * @param string $type Meta type.
+ * @param int $object_id ID of the object.
+ * @param string $meta_key Meta key.
+ * @param bool $single If true, return only the first value of the specified meta_key.
+ *
+ * @return mixed Single metadata value, or array of values.
+ */
+ public function get_metadata( $type, $object_id, $meta_key = '', $single = false ) {
+ return get_metadata( $type, $object_id, $meta_key, $single );
+ }
+
+ /**
+ * Stores remote meta key/values alongside an ID mapping key.
+ *
+ * @access public
+ *
+ * @todo Refactor to not use interpolated values when preparing the SQL query.
+ *
+ * @param string $type Meta type.
+ * @param int $object_id ID of the object.
+ * @param string $meta_key Meta key.
+ * @param mixed $meta_value Meta value.
+ * @param int $meta_id ID of the meta.
+ *
+ * @return bool False if meta table does not exist, true otherwise.
+ */
+ public function upsert_metadata( $type, $object_id, $meta_key, $meta_value, $meta_id ) {
+ $table = _get_meta_table( $type );
+ if ( ! $table ) {
+ return false;
+ }
+
+ global $wpdb;
+
+ $exists = $wpdb->get_var(
+ $wpdb->prepare(
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ "SELECT EXISTS( SELECT 1 FROM $table WHERE meta_id = %d )",
+ $meta_id
+ )
+ );
+
+ if ( $exists ) {
+ $wpdb->update(
+ $table,
+ array(
+ 'meta_key' => $meta_key,
+ 'meta_value' => maybe_serialize( $meta_value ),
+ ),
+ array( 'meta_id' => $meta_id )
+ );
+ } else {
+ $object_id_field = $type . '_id';
+ $wpdb->insert(
+ $table,
+ array(
+ 'meta_id' => $meta_id,
+ $object_id_field => $object_id,
+ 'meta_key' => $meta_key,
+ 'meta_value' => maybe_serialize( $meta_value ),
+ )
+ );
+ }
+
+ wp_cache_delete( $object_id, $type . '_meta' );
+
+ return true;
+ }
+
+ /**
+ * Delete metadata for the specified object.
+ *
+ * @access public
+ *
+ * @todo Refactor to not use interpolated values when preparing the SQL query.
+ *
+ * @param string $type Meta type.
+ * @param int $object_id ID of the object.
+ * @param array $meta_ids IDs of the meta objects to delete.
+ */
+ public function delete_metadata( $type, $object_id, $meta_ids ) {
+ global $wpdb;
+
+ $table = _get_meta_table( $type );
+ if ( ! $table ) {
+ return false;
+ }
+
+ foreach ( $meta_ids as $meta_id ) {
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $wpdb->query( $wpdb->prepare( "DELETE FROM $table WHERE meta_id = %d", $meta_id ) );
+ }
+
+ // If we don't have an object ID what do we do - invalidate ALL meta?
+ if ( $object_id ) {
+ wp_cache_delete( $object_id, $type . '_meta' );
+ }
+ }
+
+ /**
+ * Delete metadata with a certain key for the specified objects.
+ *
+ * @access public
+ *
+ * @todo Test this out to make sure it works as expected.
+ * @todo Refactor to not use interpolated values when preparing the SQL query.
+ *
+ * @param string $type Meta type.
+ * @param array $object_ids IDs of the objects.
+ * @param string $meta_key Meta key.
+ */
+ public function delete_batch_metadata( $type, $object_ids, $meta_key ) {
+ global $wpdb;
+
+ $table = _get_meta_table( $type );
+ if ( ! $table ) {
+ return false;
+ }
+ $column = sanitize_key( $type . '_id' );
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $wpdb->query( $wpdb->prepare( "DELETE FROM $table WHERE $column IN (%s) && meta_key = %s", implode( ',', $object_ids ), $meta_key ) );
+
+ // If we don't have an object ID what do we do - invalidate ALL meta?
+ foreach ( $object_ids as $object_id ) {
+ wp_cache_delete( $object_id, $type . '_meta' );
+ }
+ }
+
+ /**
+ * Retrieve value of a constant based on the constant name.
+ *
+ * We explicitly return null instead of false if the constant doesn't exist.
+ *
+ * @access public
+ *
+ * @param string $constant Name of constant to retrieve.
+ * @return mixed Value set for the constant.
+ */
+ public function get_constant( $constant ) {
+ $value = get_option( 'jetpack_constant_' . $constant );
+
+ if ( $value ) {
+ return $value;
+ }
+
+ return null;
+ }
+
+ /**
+ * Set the value of a constant.
+ *
+ * @access public
+ *
+ * @param string $constant Name of constant to retrieve.
+ * @param mixed $value Value set for the constant.
+ */
+ public function set_constant( $constant, $value ) {
+ update_option( 'jetpack_constant_' . $constant, $value );
+ }
+
+ /**
+ * Retrieve the number of the available updates of a certain type.
+ * Type is one of: `plugins`, `themes`, `wordpress`, `translations`, `total`, `wp_update_version`.
+ *
+ * @access public
+ *
+ * @param string $type Type of updates to retrieve.
+ * @return int|null Number of updates available, `null` if type is invalid or missing.
+ */
+ public function get_updates( $type ) {
+ $all_updates = get_option( 'jetpack_updates', array() );
+
+ if ( isset( $all_updates[ $type ] ) ) {
+ return $all_updates[ $type ];
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Set the available updates of a certain type.
+ * Type is one of: `plugins`, `themes`, `wordpress`, `translations`, `total`, `wp_update_version`.
+ *
+ * @access public
+ *
+ * @param string $type Type of updates to set.
+ * @param int $updates Total number of updates.
+ */
+ public function set_updates( $type, $updates ) {
+ $all_updates = get_option( 'jetpack_updates', array() );
+ $all_updates[ $type ] = $updates;
+ update_option( 'jetpack_updates', $all_updates );
+ }
+
+ /**
+ * Retrieve a callable value based on its name.
+ *
+ * @access public
+ *
+ * @param string $name Name of the callable to retrieve.
+ * @return mixed Value of the callable.
+ */
+ public function get_callable( $name ) {
+ $value = get_option( 'jetpack_' . $name );
+
+ if ( $value ) {
+ return $value;
+ }
+
+ return null;
+ }
+
+ /**
+ * Update the value of a callable.
+ *
+ * @access public
+ *
+ * @param string $name Callable name.
+ * @param mixed $value Callable value.
+ */
+ public function set_callable( $name, $value ) {
+ update_option( 'jetpack_' . $name, $value );
+ }
+
+ /**
+ * Retrieve a network option value based on a network option name.
+ *
+ * @access public
+ *
+ * @param string $option Name of network option to retrieve.
+ * @return mixed Value set for the network option.
+ */
+ public function get_site_option( $option ) {
+ return get_option( 'jetpack_network_' . $option );
+ }
+
+ /**
+ * Update the value of a network option.
+ *
+ * @access public
+ *
+ * @param string $option Network option name.
+ * @param mixed $value Network option value.
+ * @return bool False if value was not updated and true if value was updated.
+ */
+ public function update_site_option( $option, $value ) {
+ return update_option( 'jetpack_network_' . $option, $value );
+ }
+
+ /**
+ * Remove a network option by name.
+ *
+ * @access public
+ *
+ * @param string $option Name of option to remove.
+ * @return bool True, if option is successfully deleted. False on failure.
+ */
+ public function delete_site_option( $option ) {
+ return delete_option( 'jetpack_network_' . $option );
+ }
+
+ /**
+ * Retrieve the terms from a particular taxonomy.
+ *
+ * @access public
+ *
+ * @param string $taxonomy Taxonomy slug.
+ *
+ * @return array|WP_Error Array of terms or WP_Error object on failure.
+ */
+ public function get_terms( $taxonomy ) {
+ $t = $this->ensure_taxonomy( $taxonomy );
+ if ( ! $t || is_wp_error( $t ) ) {
+ return $t;
+ }
+ return get_terms( $taxonomy );
+ }
+
+ /**
+ * Retrieve a particular term.
+ *
+ * @access public
+ *
+ * @param string $taxonomy Taxonomy slug.
+ * @param int $term_id ID of the term.
+ * @param string $term_key ID Field `term_id` or `term_taxonomy_id`.
+ *
+ * @return \WP_Term|WP_Error Term object on success, \WP_Error object on failure.
+ */
+ public function get_term( $taxonomy, $term_id, $term_key = 'term_id' ) {
+
+ // Full Sync will pass false for the $taxonomy so a check for term_taxonomy_id is needed before ensure_taxonomy.
+ if ( 'term_taxonomy_id' === $term_key ) {
+ return get_term_by( 'term_taxonomy_id', $term_id );
+ }
+
+ $t = $this->ensure_taxonomy( $taxonomy );
+ if ( ! $t || is_wp_error( $t ) ) {
+ return $t;
+ }
+
+ return get_term( $term_id, $taxonomy );
+ }
+
+ /**
+ * Verify a taxonomy is legitimate and register it if necessary.
+ *
+ * @access private
+ *
+ * @param string $taxonomy Taxonomy slug.
+ *
+ * @return bool|void|WP_Error True if already exists; void if it was registered; \WP_Error on error.
+ */
+ private function ensure_taxonomy( $taxonomy ) {
+ if ( ! taxonomy_exists( $taxonomy ) ) {
+ // Try re-registering synced taxonomies.
+ $taxonomies = $this->get_callable( 'taxonomies' );
+ if ( ! isset( $taxonomies[ $taxonomy ] ) ) {
+ // Doesn't exist, or somehow hasn't been synced.
+ return new WP_Error( 'invalid_taxonomy', "The taxonomy '$taxonomy' doesn't exist" );
+ }
+ $t = $taxonomies[ $taxonomy ];
+
+ return register_taxonomy(
+ $taxonomy,
+ $t->object_type,
+ (array) $t
+ );
+ }
+
+ return true;
+ }
+
+ /**
+ * Retrieve all terms from a taxonomy that are related to an object with a particular ID.
+ *
+ * @access public
+ *
+ * @param int $object_id Object ID.
+ * @param string $taxonomy Taxonomy slug.
+ *
+ * @return array|bool|WP_Error Array of terms on success, `false` if no terms or post doesn't exist, \WP_Error on failure.
+ */
+ public function get_the_terms( $object_id, $taxonomy ) {
+ return get_the_terms( $object_id, $taxonomy );
+ }
+
+ /**
+ * Insert or update a term.
+ *
+ * @access public
+ *
+ * @param \WP_Term $term_object Term object.
+ *
+ * @return array|bool|WP_Error Array of term_id and term_taxonomy_id if updated, true if inserted, \WP_Error on failure.
+ */
+ public function update_term( $term_object ) {
+ $taxonomy = $term_object->taxonomy;
+ global $wpdb;
+ $exists = $wpdb->get_var(
+ $wpdb->prepare(
+ "SELECT EXISTS( SELECT 1 FROM $wpdb->terms WHERE term_id = %d )",
+ $term_object->term_id
+ )
+ );
+ if ( ! $exists ) {
+ $term_object = sanitize_term( clone $term_object, $taxonomy, 'db' );
+ $term = array(
+ 'term_id' => $term_object->term_id,
+ 'name' => $term_object->name,
+ 'slug' => $term_object->slug,
+ 'term_group' => $term_object->term_group,
+ );
+ $term_taxonomy = array(
+ 'term_taxonomy_id' => $term_object->term_taxonomy_id,
+ 'term_id' => $term_object->term_id,
+ 'taxonomy' => $term_object->taxonomy,
+ 'description' => $term_object->description,
+ 'parent' => (int) $term_object->parent,
+ 'count' => (int) $term_object->count,
+ );
+ $wpdb->insert( $wpdb->terms, $term );
+ $wpdb->insert( $wpdb->term_taxonomy, $term_taxonomy );
+
+ return true;
+ }
+
+ return wp_update_term( $term_object->term_id, $taxonomy, (array) $term_object );
+ }
+
+ /**
+ * Delete a term by the term ID and its corresponding taxonomy.
+ *
+ * @access public
+ *
+ * @param int $term_id Term ID.
+ * @param string $taxonomy Taxonomy slug.
+ *
+ * @return bool|int|WP_Error True on success, false if term doesn't exist. Zero if trying with default category. \WP_Error on invalid taxonomy.
+ */
+ public function delete_term( $term_id, $taxonomy ) {
+ $this->ensure_taxonomy( $taxonomy );
+ return wp_delete_term( $term_id, $taxonomy );
+ }
+
+ /**
+ * Add/update terms of a particular taxonomy of an object with the specified ID.
+ *
+ * @access public
+ *
+ * @param int $object_id The object to relate to.
+ * @param string $taxonomy The context in which to relate the term to the object.
+ * @param string|int|array $terms A single term slug, single term id, or array of either term slugs or ids.
+ * @param bool $append Optional. If false will delete difference of terms. Default false.
+ */
+ public function update_object_terms( $object_id, $taxonomy, $terms, $append ) {
+ $this->ensure_taxonomy( $taxonomy );
+ wp_set_object_terms( $object_id, $terms, $taxonomy, $append );
+ }
+
+ /**
+ * Remove certain term relationships from the specified object.
+ *
+ * @access public
+ *
+ * @todo Refactor to not use interpolated values when preparing the SQL query.
+ *
+ * @param int $object_id ID of the object.
+ * @param array $tt_ids Term taxonomy IDs.
+ * @return bool True on success, false on failure.
+ */
+ public function delete_object_terms( $object_id, $tt_ids ) {
+ global $wpdb;
+
+ if ( is_array( $tt_ids ) && ! empty( $tt_ids ) ) {
+ // Escape.
+ $tt_ids_sanitized = array_map( 'intval', $tt_ids );
+
+ $taxonomies = array();
+ foreach ( $tt_ids_sanitized as $tt_id ) {
+ $term = get_term_by( 'term_taxonomy_id', $tt_id );
+ $taxonomies[ $term->taxonomy ][] = $tt_id;
+ }
+ $in_tt_ids = implode( ', ', $tt_ids_sanitized );
+
+ /**
+ * Fires immediately before an object-term relationship is deleted.
+ *
+ * @since 1.6.3
+ * @since-jetpack 2.9.0
+ *
+ * @param int $object_id Object ID.
+ * @param array $tt_ids An array of term taxonomy IDs.
+ */
+ do_action( 'delete_term_relationships', $object_id, $tt_ids_sanitized );
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id ) );
+ foreach ( $taxonomies as $taxonomy => $taxonomy_tt_ids ) {
+ $this->ensure_taxonomy( $taxonomy );
+ wp_cache_delete( $object_id, $taxonomy . '_relationships' );
+ /**
+ * Fires immediately after an object-term relationship is deleted.
+ *
+ * @since 1.6.3
+ * @since-jetpack 2.9.0
+ *
+ * @param int $object_id Object ID.
+ * @param array $tt_ids An array of term taxonomy IDs.
+ */
+ do_action( 'deleted_term_relationships', $object_id, $taxonomy_tt_ids );
+ wp_update_term_count( $taxonomy_tt_ids, $taxonomy );
+ }
+
+ return (bool) $deleted;
+ }
+
+ return false;
+ }
+
+ /**
+ * Retrieve the number of users.
+ * Not supported in this replicastore.
+ *
+ * @access public
+ */
+ public function user_count() {
+ // Noop.
+ }
+
+ /**
+ * Retrieve a user object by the user ID.
+ *
+ * @access public
+ *
+ * @param int $user_id User ID.
+ * @return \WP_User User object.
+ */
+ public function get_user( $user_id ) {
+ return \WP_User::get_instance( $user_id );
+ }
+
+ /**
+ * Insert or update a user.
+ * Not supported in this replicastore.
+ *
+ * @access public
+ * @throws Exception If this method is invoked.
+ *
+ * @param \WP_User $user User object.
+ */
+ public function upsert_user( $user ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ $this->invalid_call();
+ }
+
+ /**
+ * Delete a user.
+ * Not supported in this replicastore.
+ *
+ * @access public
+ * @throws Exception If this method is invoked.
+ *
+ * @param int $user_id User ID.
+ */
+ public function delete_user( $user_id ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ $this->invalid_call();
+ }
+
+ /**
+ * Update/insert user locale.
+ * Not supported in this replicastore.
+ *
+ * @access public
+ * @throws Exception If this method is invoked.
+ *
+ * @param int $user_id User ID.
+ * @param string $local The user locale.
+ */
+ public function upsert_user_locale( $user_id, $local ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ $this->invalid_call();
+ }
+
+ /**
+ * Delete user locale.
+ * Not supported in this replicastore.
+ *
+ * @access public
+ * @throws Exception If this method is invoked.
+ *
+ * @param int $user_id User ID.
+ */
+ public function delete_user_locale( $user_id ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ $this->invalid_call();
+ }
+
+ /**
+ * Retrieve the user locale.
+ *
+ * @access public
+ *
+ * @param int $user_id User ID.
+ * @return string The user locale.
+ */
+ public function get_user_locale( $user_id ) {
+ return get_user_locale( $user_id );
+ }
+
+ /**
+ * Retrieve the allowed mime types for the user.
+ * Not supported in this replicastore.
+ *
+ * @access public
+ *
+ * @param int $user_id User ID.
+ */
+ public function get_allowed_mime_types( $user_id ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ // Noop.
+ }
+
+ /**
+ * Retrieve all the checksums we are interested in.
+ * Currently that is posts, comments, post meta and comment meta.
+ *
+ * @access public
+ *
+ * @param boolean $perform_text_conversion If text fields should be latin1 converted.
+ *
+ * @return array Checksums.
+ */
+ public function checksum_all( $perform_text_conversion = false ) {
+ $post_checksum = $this->checksum_histogram( 'posts', null, null, null, null, true, '', false, false, $perform_text_conversion );
+ $comments_checksum = $this->checksum_histogram( 'comments', null, null, null, null, true, '', false, false, $perform_text_conversion );
+ $post_meta_checksum = $this->checksum_histogram( 'postmeta', null, null, null, null, true, '', false, false, $perform_text_conversion );
+ $comment_meta_checksum = $this->checksum_histogram( 'commentmeta', null, null, null, null, true, '', false, false, $perform_text_conversion );
+ $terms_checksum = $this->checksum_histogram( 'terms', null, null, null, null, true, '', false, false, $perform_text_conversion );
+ $term_relationships_checksum = $this->checksum_histogram( 'term_relationships', null, null, null, null, true, '', false, false, $perform_text_conversion );
+ $term_taxonomy_checksum = $this->checksum_histogram( 'term_taxonomy', null, null, null, null, true, '', false, false, $perform_text_conversion );
+
+ $result = array(
+ 'posts' => $this->summarize_checksum_histogram( $post_checksum ),
+ 'comments' => $this->summarize_checksum_histogram( $comments_checksum ),
+ 'post_meta' => $this->summarize_checksum_histogram( $post_meta_checksum ),
+ 'comment_meta' => $this->summarize_checksum_histogram( $comment_meta_checksum ),
+ 'terms' => $this->summarize_checksum_histogram( $terms_checksum ),
+ 'term_relationships' => $this->summarize_checksum_histogram( $term_relationships_checksum ),
+ 'term_taxonomy' => $this->summarize_checksum_histogram( $term_taxonomy_checksum ),
+ );
+
+ /**
+ * WooCommerce tables
+ */
+
+ /**
+ * On WordPress.com, we can't directly check if the site has support for WooCommerce.
+ * Having the option to override the functionality here helps with syncing WooCommerce tables.
+ *
+ * @since 10.1
+ *
+ * @param bool If we should we force-enable WooCommerce tables support.
+ */
+ $force_woocommerce_support = apply_filters( 'jetpack_table_checksum_force_enable_woocommerce', false );
+
+ if ( $force_woocommerce_support || class_exists( 'WooCommerce' ) ) {
+ /**
+ * Guard in Try/Catch as it's possible for the WooCommerce class to exist, but
+ * the tables to not. If we don't do this, the response will be just the exception, without
+ * returning any valid data. This will prevent us from ever performing a checksum/fix
+ * for sites like this.
+ * It's better to just skip the tables in the response, instead of completely failing.
+ */
+
+ try {
+ $woocommerce_order_items_checksum = $this->checksum_histogram( 'woocommerce_order_items' );
+ $result['woocommerce_order_items'] = $this->summarize_checksum_histogram( $woocommerce_order_items_checksum );
+ } catch ( Exception $ex ) {
+ $result['woocommerce_order_items'] = null;
+ }
+
+ try {
+ $woocommerce_order_itemmeta_checksum = $this->checksum_histogram( 'woocommerce_order_itemmeta' );
+ $result['woocommerce_order_itemmeta'] = $this->summarize_checksum_histogram( $woocommerce_order_itemmeta_checksum );
+ } catch ( Exception $ex ) {
+ $result['woocommerce_order_itemmeta'] = null;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Return the summarized checksum from buckets or the WP_Error.
+ *
+ * @param array $histogram checksum_histogram result.
+ *
+ * @return int|WP_Error checksum or Error.
+ */
+ protected function summarize_checksum_histogram( $histogram ) {
+ if ( is_wp_error( $histogram ) ) {
+ return $histogram;
+ } else {
+ return array_sum( $histogram );
+ }
+ }
+
+ /**
+ * Grabs the minimum and maximum object ids for the given parameters.
+ *
+ * @access public
+ *
+ * @param string $id_field The id column in the table to query.
+ * @param string $object_table The table to query.
+ * @param string $where A sql where clause without 'WHERE'.
+ * @param int $bucket_size The maximum amount of objects to include in the query.
+ * For `term_relationships` table, the bucket size will refer to the amount
+ * of distinct object ids. This will likely include more database rows than
+ * the bucket size implies.
+ *
+ * @return object An object with min_id and max_id properties.
+ */
+ public function get_min_max_object_id( $id_field, $object_table, $where, $bucket_size ) {
+ global $wpdb;
+
+ // The term relationship table's unique key is a combination of 2 columns. `DISTINCT` helps us get a more acurate query.
+ $distinct_sql = ( $wpdb->term_relationships === $object_table ) ? 'DISTINCT' : '';
+ $where_sql = $where ? "WHERE $where" : '';
+
+ // Since MIN() and MAX() do not work with LIMIT, we'll need to adjust the dataset we query if a limit is present.
+ // With a limit present, we'll look at a dataset consisting of object_ids that meet the constructs of the $where clause.
+ // Without a limit, we can use the actual table as a dataset.
+ $from = $bucket_size ?
+ "( SELECT $distinct_sql $id_field FROM $object_table $where_sql ORDER BY $id_field ASC LIMIT " . ( (int) $bucket_size ) . ' ) as ids' :
+ "$object_table $where_sql ORDER BY $id_field ASC";
+
+ return $wpdb->get_row(
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ "SELECT MIN($id_field) as min, MAX($id_field) as max FROM $from"
+ );
+ }
+
+ /**
+ * Retrieve the checksum histogram for a specific object type.
+ *
+ * @access public
+ *
+ * @param string $table Object type.
+ * @param null $buckets Number of buckets to split the objects to.
+ * @param null $start_id Minimum object ID.
+ * @param null $end_id Maximum object ID.
+ * @param null $columns Table columns to calculate the checksum from.
+ * @param bool $strip_non_ascii Whether to strip non-ASCII characters.
+ * @param string $salt Salt, used for $wpdb->prepare()'s args.
+ * @param bool $only_range_edges Only return the range edges and not the actual checksums.
+ * @param bool $detailed_drilldown If the call should return a detailed drilldown for the checksum or only the checksum.
+ * @param bool $perform_text_conversion If text fields should be converted to latin1 during the checksum calculation.
+ *
+ * @return array|WP_Error The checksum histogram.
+ * @throws Exception Throws an exception if data validation fails inside `Table_Checksum` calls.
+ */
+ public function checksum_histogram( $table, $buckets = null, $start_id = null, $end_id = null, $columns = null, $strip_non_ascii = true, $salt = '', $only_range_edges = false, $detailed_drilldown = false, $perform_text_conversion = false ) {
+ global $wpdb;
+
+ $wpdb->queries = array();
+ try {
+ $checksum_table = $this->get_table_checksum_instance( $table, $salt, $perform_text_conversion );
+ } catch ( Exception $ex ) {
+ return new WP_Error( 'checksum_disabled', $ex->getMessage() );
+ }
+
+ // Validate / Determine Buckets.
+ if ( $buckets === null || $buckets < 1 ) {
+ $buckets = $this->calculate_buckets( $table, $start_id, $end_id );
+ }
+ if ( is_wp_error( $buckets ) ) {
+ return $buckets;
+ }
+
+ $range_edges = $checksum_table->get_range_edges( $start_id, $end_id );
+
+ if ( $only_range_edges ) {
+ return $range_edges;
+ }
+
+ $object_count = (int) $range_edges['item_count'];
+
+ if ( 0 === $object_count ) {
+ return array();
+ }
+
+ $bucket_size = (int) ceil( $object_count / $buckets );
+ $previous_max_id = max( 0, $range_edges['min_range'] );
+ $histogram = array();
+
+ do {
+ $ids_range = $checksum_table->get_range_edges( $previous_max_id, null, $bucket_size );
+
+ if ( empty( $ids_range['min_range'] ) || empty( $ids_range['max_range'] ) ) {
+ // Nothing to checksum here...
+ break;
+ }
+
+ // Get the checksum value.
+ $batch_checksum = $checksum_table->calculate_checksum( $ids_range['min_range'], $ids_range['max_range'], null, $detailed_drilldown );
+
+ if ( is_wp_error( $batch_checksum ) ) {
+ return $batch_checksum;
+ }
+
+ if ( $ids_range['min_range'] === $ids_range['max_range'] ) {
+ $histogram[ $ids_range['min_range'] ] = $batch_checksum;
+ } else {
+ $histogram[ "{$ids_range[ 'min_range' ]}-{$ids_range[ 'max_range' ]}" ] = $batch_checksum;
+ }
+
+ $previous_max_id = $ids_range['max_range'] + 1;
+ // If we've reached the max_range lets bail out.
+ if ( $previous_max_id > $range_edges['max_range'] ) {
+ break;
+ }
+ } while ( true );
+
+ return $histogram;
+ }
+
+ /**
+ * Retrieve the type of the checksum.
+ *
+ * @access public
+ *
+ * @return string Type of the checksum.
+ */
+ public function get_checksum_type() {
+ return 'sum';
+ }
+
+ /**
+ * Used in methods that are not implemented and shouldn't be invoked.
+ *
+ * @access private
+ * @throws Exception If this method is invoked.
+ */
+ private function invalid_call() {
+ // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
+ $backtrace = debug_backtrace();
+ $caller = $backtrace[1]['function'];
+ throw new Exception( "This function $caller is not supported on the WP Replicastore" );
+ }
+
+ /**
+ * Determine number of buckets to use in full table checksum.
+ *
+ * @param string $table Object Type.
+ * @param int $start_id Min Object ID.
+ * @param int $end_id Max Object ID.
+ * @return int|WP_Error Number of Buckets to use.
+ */
+ private function calculate_buckets( $table, $start_id = null, $end_id = null ) {
+ // Get # of objects.
+ try {
+ $checksum_table = $this->get_table_checksum_instance( $table );
+ } catch ( Exception $ex ) {
+ return new WP_Error( 'checksum_disabled', $ex->getMessage() );
+ }
+ $range_edges = $checksum_table->get_range_edges( $start_id, $end_id );
+ $object_count = $range_edges['item_count'];
+
+ // Ensure no division by 0.
+ if ( 0 === (int) $object_count ) {
+ return 1;
+ }
+
+ // Default Bucket sizes.
+ $bucket_size = 10000; // Default bucket size is 10,000 items.
+ switch ( $table ) {
+ case 'postmeta':
+ case 'commentmeta':
+ case 'order_itemmeta':
+ $bucket_size = 1000; // Meta bucket size is restricted to 1000 items.
+ }
+
+ return (int) ceil( $object_count / $bucket_size );
+ }
+
+ /**
+ * Return an instance for `Table_Checksum`, depending on the table.
+ *
+ * Some tables require custom instances, due to different checksum logic.
+ *
+ * @param string $table The table that we want to get the instance for.
+ * @param null $salt Salt to be used when generating the checksums.
+ * @param false $perform_text_conversion Should we perform text encoding conversion when calculating the checksum.
+ *
+ * @return Table_Checksum|Table_Checksum_Usermeta
+ * @throws Exception Might throw an exception if any of the input parameters were invalid.
+ */
+ public function get_table_checksum_instance( $table, $salt = null, $perform_text_conversion = false ) {
+ if ( 'users' === $table ) {
+ return new Table_Checksum_Users( $table, $salt, $perform_text_conversion );
+ }
+ if ( 'usermeta' === $table ) {
+ return new Table_Checksum_Usermeta( $table, $salt, $perform_text_conversion );
+ }
+
+ return new Table_Checksum( $table, $salt, $perform_text_conversion );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php
new file mode 100644
index 00000000..ae935622
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php
@@ -0,0 +1,871 @@
+ WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::full_sync_start',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ 'args' => array(
+ 'modules' => array(
+ 'description' => __( 'Data Modules that should be included in Full Sync', 'jetpack-sync' ),
+ 'type' => 'array',
+ 'required' => false,
+ ),
+ 'users' => array(
+ 'description' => __( 'User IDs to include in Full Sync or "initial"', 'jetpack-sync' ),
+ 'required' => false,
+ ),
+ 'posts' => array(
+ 'description' => __( 'Post IDs to include in Full Sync', 'jetpack-sync' ),
+ 'type' => 'array',
+ 'required' => false,
+ ),
+ 'comments' => array(
+ 'description' => __( 'Comment IDs to include in Full Sync', 'jetpack-sync' ),
+ 'type' => 'array',
+ 'required' => false,
+ ),
+ ),
+ )
+ );
+
+ // Obtain Sync status.
+ register_rest_route(
+ 'jetpack/v4',
+ '/sync/status',
+ array(
+ 'methods' => WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::sync_status',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ 'args' => array(
+ 'fields' => array(
+ 'description' => __( 'Comma seperated list of additional fields that should be included in status.', 'jetpack-sync' ),
+ 'type' => 'string',
+ 'required' => false,
+ ),
+ ),
+ )
+ );
+
+ // Update Sync health status.
+ register_rest_route(
+ 'jetpack/v4',
+ '/sync/health',
+ array(
+ 'methods' => WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::sync_health',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ 'args' => array(
+ 'status' => array(
+ 'description' => __( 'New Sync health status', 'jetpack-sync' ),
+ 'type' => 'string',
+ 'required' => true,
+ ),
+ ),
+ )
+ );
+
+ // Obtain Sync settings.
+ register_rest_route(
+ 'jetpack/v4',
+ '/sync/settings',
+ array(
+ array(
+ 'methods' => WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::get_sync_settings',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ ),
+ array(
+ 'methods' => WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::update_sync_settings',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ ),
+ )
+ );
+
+ // Retrieve Sync Object(s).
+ register_rest_route(
+ 'jetpack/v4',
+ '/sync/object',
+ array(
+ 'methods' => WP_REST_Server::ALLMETHODS,
+ 'callback' => __CLASS__ . '::get_sync_objects',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ 'args' => array(
+ 'module_name' => array(
+ 'description' => __( 'Name of Sync module', 'jetpack-sync' ),
+ 'type' => 'string',
+ 'required' => false,
+ ),
+ 'object_type' => array(
+ 'description' => __( 'Object Type', 'jetpack-sync' ),
+ 'type' => 'string',
+ 'required' => false,
+ ),
+ 'object_ids' => array(
+ 'description' => __( 'Objects Identifiers', 'jetpack-sync' ),
+ 'type' => 'array',
+ 'required' => false,
+ ),
+ ),
+ )
+ );
+
+ // Retrieve Sync Object(s).
+ register_rest_route(
+ 'jetpack/v4',
+ '/sync/now',
+ array(
+ 'methods' => WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::do_sync',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ 'args' => array(
+ 'queue' => array(
+ 'description' => __( 'Name of Sync queue.', 'jetpack-sync' ),
+ 'type' => 'string',
+ 'required' => true,
+ ),
+ ),
+ )
+ );
+
+ // Checkout Sync Objects.
+ register_rest_route(
+ 'jetpack/v4',
+ '/sync/checkout',
+ array(
+ 'methods' => WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::checkout',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ )
+ );
+
+ // Checkin Sync Objects.
+ register_rest_route(
+ 'jetpack/v4',
+ '/sync/close',
+ array(
+ 'methods' => WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::close',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ )
+ );
+
+ // Unlock Sync Queue.
+ register_rest_route(
+ 'jetpack/v4',
+ '/sync/unlock',
+ array(
+ 'methods' => WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::unlock_queue',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ 'args' => array(
+ 'queue' => array(
+ 'description' => __( 'Name of Sync queue.', 'jetpack-sync' ),
+ 'type' => 'string',
+ 'required' => true,
+ ),
+ ),
+ )
+ );
+
+ // Retrieve range of Object Ids.
+ register_rest_route(
+ 'jetpack/v4',
+ '/sync/object-id-range',
+ array(
+ 'methods' => WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::get_object_id_range',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ 'args' => array(
+ 'sync_module' => array(
+ 'description' => __( 'Name of Sync module.', 'jetpack-sync' ),
+ 'type' => 'string',
+ 'required' => true,
+ ),
+ 'batch_size' => array(
+ 'description' => __( 'Size of batches', 'jetpack-sync' ),
+ 'type' => 'int',
+ 'required' => true,
+ ),
+ ),
+ )
+ );
+
+ // Obtain table checksums.
+ register_rest_route(
+ 'jetpack/v4',
+ '/sync/data-check',
+ array(
+ 'methods' => WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::data_check',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ 'args' => array(
+ 'perform_text_conversion' => array(
+ 'description' => __( 'If text fields should be converted to latin1 in checksum calculation.', 'jetpack-sync' ),
+ 'type' => 'boolean',
+ 'required' => false,
+ ),
+ ),
+ )
+ );
+
+ // Obtain histogram.
+ register_rest_route(
+ 'jetpack/v4',
+ '/sync/data-histogram',
+ array(
+ 'methods' => WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::data_histogram',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ 'args' => array(
+ 'columns' => array(
+ 'description' => __( 'Column mappings', 'jetpack-sync' ),
+ 'type' => 'array',
+ 'required' => false,
+ ),
+ 'object_type' => array(
+ 'description' => __( 'Object Type', 'jetpack-sync' ),
+ 'type' => 'string',
+ 'required' => false,
+ ),
+ 'buckets' => array(
+ 'description' => __( 'Number of histogram buckets.', 'jetpack-sync' ),
+ 'type' => 'int',
+ 'required' => false,
+ ),
+ 'start_id' => array(
+ 'description' => __( 'Start ID for the histogram', 'jetpack-sync' ),
+ 'type' => 'int',
+ 'required' => false,
+ ),
+ 'end_id' => array(
+ 'description' => __( 'End ID for the histogram', 'jetpack-sync' ),
+ 'type' => 'int',
+ 'required' => false,
+ ),
+ 'strip_non_ascii' => array(
+ 'description' => __( 'Strip non-ascii characters?', 'jetpack-sync' ),
+ 'type' => 'boolean',
+ 'required' => false,
+ ),
+ 'shared_salt' => array(
+ 'description' => __( 'Shared Salt to use when generating checksum', 'jetpack-sync' ),
+ 'type' => 'string',
+ 'required' => false,
+ ),
+ 'only_range_edges' => array(
+ 'description' => __( 'Should only range endges be returned', 'jetpack-sync' ),
+ 'type' => 'boolean',
+ 'required' => false,
+ ),
+ 'detailed_drilldown' => array(
+ 'description' => __( 'Do we want the checksum or object ids.', 'jetpack-sync' ),
+ 'type' => 'boolean',
+ 'required' => false,
+ ),
+ 'perform_text_conversion' => array(
+ 'description' => __( 'If text fields should be converted to latin1 in checksum calculation.', 'jetpack-sync' ),
+ 'type' => 'boolean',
+ 'required' => false,
+ ),
+ ),
+ )
+ );
+
+ // 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',
+ )
+ );
+
+ // Reset Sync locks.
+ register_rest_route(
+ 'jetpack/v4',
+ '/sync/locks',
+ array(
+ 'methods' => WP_REST_Server::DELETABLE,
+ 'callback' => __CLASS__ . '::reset_locks',
+ 'permission_callback' => __CLASS__ . '::verify_default_permissions',
+ )
+ );
+ }
+
+ /**
+ * Trigger a Full Sync of specified modules.
+ *
+ * @since 1.23.1
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response|WP_Error
+ */
+ public static function full_sync_start( $request ) {
+
+ $modules = $request->get_param( 'modules' );
+
+ // convert list of modules into array format of "$modulename => true".
+ if ( ! empty( $modules ) ) {
+ $modules = array_map( '__return_true', array_flip( $modules ) );
+ }
+
+ // Process additional options.
+ foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) {
+ if ( 'users' === $module_name && 'initial' === $request->get_param( 'users' ) ) {
+ $modules['users'] = 'initial';
+ } elseif ( is_array( $request->get_param( $module_name ) ) ) {
+ $ids = $request->get_param( $module_name );
+ if ( array() !== $ids ) {
+ $modules[ $module_name ] = $ids;
+ }
+ }
+ }
+
+ if ( empty( $modules ) ) {
+ $modules = null;
+ }
+
+ return rest_ensure_response(
+ array(
+ 'scheduled' => Actions::do_full_sync( $modules ),
+ )
+ );
+ }
+
+ /**
+ * Return Sync's status.
+ *
+ * @since 1.23.1
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response
+ */
+ public static function sync_status( $request ) {
+ $fields = $request->get_param( 'fields' );
+ return rest_ensure_response( Actions::get_sync_status( $fields ) );
+ }
+
+ /**
+ * Return table checksums.
+ *
+ * @since 1.23.1
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response
+ */
+ public static function data_check( $request ) {
+ // Disable Sync during this call, so we can resolve faster.
+ Actions::mark_sync_read_only();
+ $store = new Replicastore();
+
+ $perform_text_conversion = false;
+ if ( true === $request->get_param( 'perform_text_conversion' ) ) {
+ $perform_text_conversion = true;
+ }
+
+ return rest_ensure_response( $store->checksum_all( $perform_text_conversion ) );
+ }
+
+ /**
+ * Return Histogram.
+ *
+ * @since 1.23.1
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response
+ */
+ public static function data_histogram( $request ) {
+
+ // Disable Sync during this call, so we can resolve faster.
+ Actions::mark_sync_read_only();
+
+ $args = $request->get_params();
+
+ if ( empty( $args['columns'] ) ) {
+ $args['columns'] = null; // go with defaults.
+ }
+
+ if ( false !== $args['strip_non_ascii'] ) {
+ $args['strip_non_ascii'] = true;
+ }
+
+ if ( true !== $args['perform_text_conversion'] ) {
+ $args['perform_text_conversion'] = false;
+ }
+
+ /**
+ * Hack: nullify the values of `start_id` and `end_id` if we're only requesting ranges.
+ *
+ * The endpoint doesn't support nullable values :(
+ */
+ if ( true === $args['only_range_edges'] ) {
+ if ( 0 === $args['start_id'] ) {
+ $args['start_id'] = null;
+ }
+
+ if ( 0 === $args['end_id'] ) {
+ $args['end_id'] = null;
+ }
+ }
+
+ $store = new Replicastore();
+ $histogram = $store->checksum_histogram( $args['object_type'], $args['buckets'], $args['start_id'], $args['end_id'], $args['columns'], $args['strip_non_ascii'], $args['shared_salt'], $args['only_range_edges'], $args['detailed_drilldown'], $args['perform_text_conversion'] );
+
+ return rest_ensure_response(
+ array(
+ 'histogram' => $histogram,
+ 'type' => $store->get_checksum_type(),
+ )
+ );
+ }
+
+ /**
+ * Update Sync health.
+ *
+ * @since 1.23.1
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response
+ */
+ public static function sync_health( $request ) {
+
+ switch ( $request->get_param( 'status' ) ) {
+ case Health::STATUS_IN_SYNC:
+ case Health::STATUS_OUT_OF_SYNC:
+ Health::update_status( $request->get_param( 'status' ) );
+ break;
+ default:
+ return new WP_Error( 'invalid_status', 'Invalid Sync Status Provided.' );
+ }
+
+ // re-fetch so we see what's really being stored.
+ return rest_ensure_response(
+ array(
+ 'success' => Health::get_status(),
+ )
+ );
+ }
+
+ /**
+ * Obtain Sync settings.
+ *
+ * @since 1.23.1
+ *
+ * @return \WP_REST_Response
+ */
+ public static function get_sync_settings() {
+ return rest_ensure_response( Settings::get_settings() );
+ }
+
+ /**
+ * Update Sync settings.
+ *
+ * @since 1.23.1
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response
+ */
+ public static function update_sync_settings( $request ) {
+ $args = $request->get_params();
+ $sync_settings = Settings::get_settings();
+
+ foreach ( $args as $key => $value ) {
+ if ( false !== $value ) {
+ if ( is_numeric( $value ) ) {
+ $value = (int) $value;
+ }
+
+ // special case for sending empty arrays - a string with value 'empty'.
+ if ( 'empty' === $value ) {
+ $value = array();
+ }
+
+ $sync_settings[ $key ] = $value;
+ }
+ }
+
+ Settings::update_settings( $sync_settings );
+
+ // re-fetch so we see what's really being stored.
+ return rest_ensure_response( Settings::get_settings() );
+ }
+
+ /**
+ * Retrieve Sync Objects.
+ *
+ * @since 1.23.1
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response
+ */
+ public static function get_sync_objects( $request ) {
+ $args = $request->get_params();
+
+ $module_name = $args['module_name'];
+ // Verify valid Sync Module.
+ $sync_module = Modules::get_module( $module_name );
+ if ( ! $sync_module ) {
+ return new WP_Error( 'invalid_module', 'You specified an invalid sync module' );
+ }
+
+ Actions::mark_sync_read_only();
+
+ $codec = Sender::get_instance()->get_codec();
+ Settings::set_is_syncing( true );
+ $objects = $codec->encode( $sync_module->get_objects_by_id( $args['object_type'], $args['object_ids'] ) );
+ Settings::set_is_syncing( false );
+
+ return rest_ensure_response(
+ array(
+ 'objects' => $objects,
+ 'codec' => $codec->name(),
+ )
+ );
+ }
+
+ /**
+ * Request Sync processing.
+ *
+ * @since 1.23.1
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response
+ */
+ public static function do_sync( $request ) {
+
+ $queue_name = self::validate_queue( $request->get_param( 'queue' ) );
+ if ( is_wp_error( $queue_name ) ) {
+ return $queue_name;
+ }
+
+ $sender = Sender::get_instance();
+ $response = $sender->do_sync_for_queue( new Queue( $queue_name ) );
+
+ return rest_ensure_response(
+ array(
+ 'response' => $response,
+ )
+ );
+ }
+
+ /**
+ * Request sync data from specified queue.
+ *
+ * @since 1.23.1
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response
+ */
+ public static function checkout( $request ) {
+ $args = $request->get_params();
+ $queue_name = self::validate_queue( $args['queue'] );
+
+ if ( is_wp_error( $queue_name ) ) {
+ return $queue_name;
+ }
+
+ $number_of_items = $args['number_of_items'];
+ if ( $number_of_items < 1 || $number_of_items > 100 ) {
+ return new WP_Error( 'invalid_number_of_items', 'Number of items needs to be an integer that is larger than 0 and less then 100', 400 );
+ }
+
+ // REST Sender.
+ $sender = new REST_Sender();
+
+ if ( 'immediate' === $queue_name ) {
+ return rest_ensure_response( $sender->immediate_full_sync_pull( $number_of_items ) );
+ }
+
+ return rest_ensure_response( $sender->queue_pull( $queue_name, $number_of_items, $args ) );
+ }
+
+ /**
+ * Unlock a Sync queue.
+ *
+ * @since 1.23.1
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response
+ */
+ public static function unlock_queue( $request ) {
+
+ $queue_name = $request->get_param( 'queue' );
+
+ if ( ! in_array( $queue_name, array( 'sync', 'full_sync' ), true ) ) {
+ return new WP_Error( 'invalid_queue', 'Queue name should be sync or full_sync', 400 );
+ }
+ $queue = new Queue( $queue_name );
+
+ // False means that there was no lock to delete.
+ $response = $queue->unlock();
+ return rest_ensure_response(
+ array(
+ 'success' => $response,
+ )
+ );
+ }
+
+ /**
+ * Checkin Sync actions.
+ *
+ * @since 1.23.1
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response
+ */
+ public static function close( $request ) {
+
+ $request_body = $request->get_params();
+ $queue_name = self::validate_queue( $request_body['queue'] );
+
+ if ( is_wp_error( $queue_name ) ) {
+ return $queue_name;
+ }
+
+ if ( empty( $request_body['buffer_id'] ) ) {
+ return new WP_Error( 'missing_buffer_id', 'Please provide a buffer id', 400 );
+ }
+
+ if ( ! is_array( $request_body['item_ids'] ) ) {
+ return new WP_Error( 'missing_item_ids', 'Please provide a list of item ids in the item_ids argument', 400 );
+ }
+
+ // Limit to A-Z,a-z,0-9,_,- .
+ $request_body['buffer_id'] = preg_replace( '/[^A-Za-z0-9]/', '', $request_body['buffer_id'] );
+ $request_body['item_ids'] = array_filter( array_map( array( 'Automattic\Jetpack\Sync\REST_Endpoints', 'sanitize_item_ids' ), $request_body['item_ids'] ) );
+
+ $queue = new Queue( $queue_name );
+
+ $items = $queue->peek_by_id( $request_body['item_ids'] );
+
+ // Update Full Sync Status if queue is "full_sync".
+ if ( 'full_sync' === $queue_name ) {
+ $full_sync_module = Modules::get_module( 'full-sync' );
+ $full_sync_module->update_sent_progress_action( $items );
+ }
+
+ $buffer = new Queue_Buffer( $request_body['buffer_id'], $request_body['item_ids'] );
+ $response = $queue->close( $buffer, $request_body['item_ids'] );
+
+ // Perform another checkout?
+ if ( isset( $request_body['continue'] ) && $request_body['continue'] ) {
+ if ( in_array( $queue_name, array( 'full_sync', 'immediate' ), true ) ) {
+ // Send Full Sync Actions.
+ Sender::get_instance()->do_full_sync();
+ } elseif ( $queue->has_any_items() ) {
+ // Send Incremental Sync Actions.
+ Sender::get_instance()->do_sync();
+ }
+ }
+
+ if ( is_wp_error( $response ) ) {
+ return $response;
+ }
+
+ return rest_ensure_response(
+ array(
+ 'success' => $response,
+ 'status' => Actions::get_sync_status(),
+ )
+ );
+ }
+
+ /**
+ * Retrieve range of Object Ids for a specified Sync module.
+ *
+ * @since 1.23.1
+ *
+ * @param \WP_REST_Request $request The request sent to the WP REST API.
+ *
+ * @return \WP_REST_Response
+ */
+ public static function get_object_id_range( $request ) {
+
+ $module_name = $request->get_param( 'sync_module' );
+ $batch_size = $request->get_param( 'batch_size' );
+
+ if ( ! self::is_valid_sync_module( $module_name ) ) {
+ return new WP_Error( 'invalid_module', 'This sync module cannot be used to calculate a range.', 400 );
+ }
+ $module = Modules::get_module( $module_name );
+
+ return rest_ensure_response(
+ array(
+ 'ranges' => $module->get_min_max_object_ids_for_batches( $batch_size ),
+ )
+ );
+ }
+
+ /**
+ * 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 )
+ );
+ }
+
+ /**
+ * Reset Sync locks.
+ *
+ * @since 1.43.0
+ *
+ * @return \WP_REST_Response
+ */
+ public static function reset_locks() {
+ Actions::reset_sync_locks();
+
+ return rest_ensure_response(
+ array(
+ 'success' => true,
+ )
+ );
+ }
+
+ /**
+ * Verify that request has default permissions to perform sync actions.
+ *
+ * @since 1.23.1
+ *
+ * @return bool Whether user has capability 'manage_options' or a blog token is used.
+ */
+ public static function verify_default_permissions() {
+ if ( current_user_can( 'manage_options' ) || Rest_Authentication::is_signed_with_blog_token() ) {
+ return true;
+ }
+
+ $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-sync'
+ );
+
+ return new WP_Error( 'invalid_user_permission_sync', $error_msg, array( 'status' => rest_authorization_required_code() ) );
+ }
+
+ /**
+ * Validate Queue name.
+ *
+ * @param string $value Queue Name.
+ *
+ * @return WP_Error
+ */
+ protected static function validate_queue( $value ) {
+ if ( ! isset( $value ) ) {
+ return new WP_Error( 'invalid_queue', 'Queue name is required', 400 );
+ }
+
+ if ( ! in_array( $value, array( 'sync', 'full_sync', 'immediate' ), true ) ) {
+ return new WP_Error( 'invalid_queue', 'Queue name should be sync, full_sync or immediate', 400 );
+ }
+ return $value;
+ }
+
+ /**
+ * Validate name is a valid Sync module.
+ *
+ * @param string $module_name Name of Sync Module.
+ *
+ * @return bool
+ */
+ protected static function is_valid_sync_module( $module_name ) {
+ return in_array(
+ $module_name,
+ array(
+ 'comments',
+ 'posts',
+ 'terms',
+ 'term_relationships',
+ 'users',
+ ),
+ true
+ );
+ }
+
+ /**
+ * Sanitize Item Ids.
+ *
+ * @param string $item Sync item identifier.
+ *
+ * @return string|string[]|null
+ */
+ protected static function sanitize_item_ids( $item ) {
+ // lets not delete any options that don't start with jpsq_sync- .
+ if ( ! is_string( $item ) || substr( $item, 0, 5 ) !== 'jpsq_' ) {
+ return null;
+ }
+ // Limit to A-Z,a-z,0-9,_,-,. .
+ return preg_replace( '/[^A-Za-z0-9-_.]/', '', $item );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-rest-sender.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-rest-sender.php
new file mode 100644
index 00000000..5ceb0b85
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-rest-sender.php
@@ -0,0 +1,143 @@
+size() ) {
+ return new WP_Error( 'queue_size', 'The queue is empty and there is nothing to send', 400 );
+ }
+
+ $sender = Sender::get_instance();
+
+ // try to give ourselves as much time as possible.
+ set_time_limit( 0 );
+
+ if ( ! empty( $args['pop'] ) ) {
+ $buffer = new Queue_Buffer( 'pop', $queue->pop( $number_of_items ) );
+ } else {
+ // let's delete the checkin state.
+ if ( $args['force'] ) {
+ $queue->unlock();
+ }
+ $buffer = $this->get_buffer( $queue, $number_of_items );
+ }
+ // Check that the $buffer is not checkout out already.
+ if ( is_wp_error( $buffer ) ) {
+ return new WP_Error( 'buffer_open', "We couldn't get the buffer it is currently checked out", 400 );
+ }
+
+ if ( ! is_object( $buffer ) ) {
+ return new WP_Error( 'buffer_non-object', 'Buffer is not an object', 400 );
+ }
+
+ $encode = isset( $args['encode'] ) ? $args['encode'] : true;
+
+ Settings::set_is_syncing( true );
+ list( $items_to_send, $skipped_items_ids ) = $sender->get_items_to_send( $buffer, $encode );
+ Settings::set_is_syncing( false );
+
+ return array(
+ 'buffer_id' => $buffer->id,
+ 'items' => $items_to_send,
+ 'skipped_items' => $skipped_items_ids,
+ 'codec' => $encode ? $sender->get_codec()->name() : null,
+ 'sent_timestamp' => time(),
+ );
+ }
+
+ /**
+ * Adds Sync items to local property.
+ */
+ public function jetpack_sync_send_data_listener() {
+ foreach ( func_get_args()[0] as $key => $item ) {
+ $this->items[ $key ] = $item;
+ }
+ }
+
+ /**
+ * Check out a buffer of full sync actions.
+ *
+ * @return array Sync Actions to be returned to requestor
+ */
+ public function immediate_full_sync_pull() {
+ // try to give ourselves as much time as possible.
+ set_time_limit( 0 );
+
+ $original_send_data_cb = array( 'Automattic\Jetpack\Sync\Actions', 'send_data' );
+ $temp_send_data_cb = array( $this, 'jetpack_sync_send_data_listener' );
+
+ Sender::get_instance()->set_enqueue_wait_time( 0 );
+ remove_filter( 'jetpack_sync_send_data', $original_send_data_cb );
+ add_filter( 'jetpack_sync_send_data', $temp_send_data_cb, 10, 6 );
+ Sender::get_instance()->do_full_sync();
+ remove_filter( 'jetpack_sync_send_data', $temp_send_data_cb );
+ add_filter( 'jetpack_sync_send_data', $original_send_data_cb, 10, 6 );
+
+ return array(
+ 'items' => $this->items,
+ 'codec' => Sender::get_instance()->get_codec()->name(),
+ 'sent_timestamp' => time(),
+ 'status' => Actions::get_sync_status(),
+ );
+ }
+
+ /**
+ * Checkout items out of the sync queue.
+ *
+ * @param Queue $queue Sync Queue.
+ * @param int $number_of_items Number of items to checkout.
+ *
+ * @return WP_Error
+ */
+ protected function get_buffer( $queue, $number_of_items ) {
+ $start = time();
+ $max_duration = 5; // this will try to get the buffer.
+
+ $buffer = $queue->checkout( $number_of_items );
+ $duration = time() - $start;
+
+ while ( is_wp_error( $buffer ) && $duration < $max_duration ) {
+ sleep( 2 );
+ $duration = time() - $start;
+ $buffer = $queue->checkout( $number_of_items );
+ }
+
+ if ( false === $buffer ) {
+ return new WP_Error( 'queue_size', 'The queue is empty and there is nothing to send', 400 );
+ }
+
+ return $buffer;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php
new file mode 100644
index 00000000..e42b2c1b
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php
@@ -0,0 +1,1001 @@
+:(
+ *
+ * @access protected
+ * @static
+ */
+ protected function __construct() {
+ $this->set_defaults();
+ $this->init();
+ }
+
+ /**
+ * Initialize the sender.
+ * Prepares the current user and initializes all sync modules.
+ *
+ * @access private
+ */
+ private function init() {
+ add_action( 'jetpack_sync_before_send_queue_sync', array( $this, 'maybe_set_user_from_token' ), 1 );
+ add_action( 'jetpack_sync_before_send_queue_sync', array( $this, 'maybe_clear_user_from_token' ), 20 );
+ add_filter( 'jetpack_xmlrpc_unauthenticated_methods', array( $this, 'register_jetpack_xmlrpc_methods' ) );
+ foreach ( Modules::get_modules() as $module ) {
+ $module->init_before_send();
+ }
+ }
+
+ /**
+ * Detect if this is a XMLRPC request with a valid signature.
+ * If so, changes the user to the new one.
+ *
+ * @access public
+ */
+ public function maybe_set_user_from_token() {
+ $connection = new Manager();
+ $verified_user = $connection->verify_xml_rpc_signature();
+ if ( Constants::is_true( 'XMLRPC_REQUEST' ) &&
+ ! is_wp_error( $verified_user )
+ && $verified_user
+ ) {
+ $old_user = wp_get_current_user();
+ $this->old_user = isset( $old_user->ID ) ? $old_user->ID : 0;
+ wp_set_current_user( $verified_user['user_id'] );
+ }
+ }
+
+ /**
+ * If we used to have a previous current user, revert back to it.
+ *
+ * @access public
+ */
+ public function maybe_clear_user_from_token() {
+ if ( isset( $this->old_user ) ) {
+ wp_set_current_user( $this->old_user );
+ }
+ }
+
+ /**
+ * Retrieve the next sync time.
+ *
+ * Update @since 1.43.2
+ * Sometimes when we process Sync requests in Jetpack, the server clock can be a
+ * bit in the future and this can lock Sync to not send stuff for a while.
+ * We are introducing an extra check, to make sure to limit the next_sync_time
+ * to be at most one hour in the future from the current time.
+ *
+ * @access public
+ *
+ * @param string $queue_name Name of the queue.
+ * @return float Timestamp of the next sync.
+ */
+ public function get_next_sync_time( $queue_name ) {
+ $option_name = self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name;
+ $next_sync_time = (float) get_option( $option_name, 0 );
+
+ $is_more_than_one_hour = ( $next_sync_time - microtime( true ) ) >= HOUR_IN_SECONDS;
+
+ if ( $is_more_than_one_hour ) {
+ delete_option( $option_name );
+ $next_sync_time = 0;
+ }
+
+ return $next_sync_time;
+ }
+
+ /**
+ * Set the next sync time.
+ *
+ * @access public
+ *
+ * @param int $time Timestamp of the next sync.
+ * @param string $queue_name Name of the queue.
+ * @return boolean True if update was successful, false otherwise.
+ */
+ public function set_next_sync_time( $time, $queue_name ) {
+ return update_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, $time, true );
+ }
+
+ /**
+ * Trigger a full sync.
+ *
+ * @access public
+ *
+ * @return boolean|WP_Error True if this sync sending was successful, error object otherwise.
+ */
+ public function do_full_sync() {
+ $sync_module = Modules::get_module( 'full-sync' );
+ if ( ! $sync_module ) {
+ return;
+ }
+ // Full Sync Disabled.
+ if ( ! Settings::get_setting( 'full_sync_sender_enabled' ) ) {
+ return;
+ }
+
+ // Don't sync if request is marked as read only.
+ if ( Constants::is_true( 'JETPACK_SYNC_READ_ONLY' ) ) {
+ return new WP_Error( 'jetpack_sync_read_only' );
+ }
+
+ // Sync not started or Sync finished.
+ $status = $sync_module->get_status();
+ if ( false === $status['started'] || ( ! empty( $status['started'] ) && ! empty( $status['finished'] ) ) ) {
+ return false;
+ }
+
+ $this->continue_full_sync_enqueue();
+ // immediate full sync sends data in continue_full_sync_enqueue.
+ if ( false === strpos( get_class( $sync_module ), 'Full_Sync_Immediately' ) ) {
+ return $this->do_sync_and_set_delays( $this->full_sync_queue );
+ } else {
+ $status = $sync_module->get_status();
+ // Sync not started or Sync finished.
+ if ( false === $status['started'] || ( ! empty( $status['started'] ) && ! empty( $status['finished'] ) ) ) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ }
+
+ /**
+ * Enqueue the next sync items for sending.
+ * Will not be done if the current request is a WP import one.
+ * Will be delayed until the next sync time comes.
+ *
+ * @access private
+ */
+ private function continue_full_sync_enqueue() {
+ if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {
+ return false;
+ }
+
+ if ( $this->get_next_sync_time( 'full-sync-enqueue' ) > microtime( true ) ) {
+ return false;
+ }
+
+ Modules::get_module( 'full-sync' )->continue_enqueuing();
+
+ $this->set_next_sync_time( time() + $this->get_enqueue_wait_time(), 'full-sync-enqueue' );
+ }
+
+ /**
+ * Trigger incremental sync.
+ *
+ * @access public
+ *
+ * @return boolean|WP_Error True if this sync sending was successful, error object otherwise.
+ */
+ public function do_sync() {
+ 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();
+
+ /**
+ * Close the PHP session to free up the server threads to handle other requests while we
+ * send sync data with Dedicated Sync.
+ *
+ * When we spawn Dedicated Sync, we send `$_COOKIES` with the request to help out with any
+ * firewall and/or caching functionality that might prevent us to ping the site directly.
+ *
+ * This will cause Dedicated Sync to reuse the visitor's PHP session and lock it until the
+ * request finishes, which can take anywhere from 1 to 30+ seconds, depending on the server
+ * `max_execution_time` configuration.
+ *
+ * By closing the session we're freeing up the session, so other requests can acquire the
+ * lock and proceed with their own tasks.
+ */
+ if ( session_status() === PHP_SESSION_ACTIVE ) {
+ session_write_close();
+ }
+
+ // Output not used right now. Try to release dedicated sync lock
+ Dedicated_Sender::try_release_lock_spawn_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;
+ }
+ }
+
+ /**
+ * Trigger sync for a certain sync queue.
+ * Responsible for setting next sync time.
+ * Will not be delayed if the current request is a WP import one.
+ * Will be delayed until the next sync time comes.
+ *
+ * @access public
+ *
+ * @param Automattic\Jetpack\Sync\Queue $queue Queue object.
+ *
+ * @return boolean|WP_Error True if this sync sending was successful, error object otherwise.
+ */
+ public function do_sync_and_set_delays( $queue ) {
+ // Don't sync if importing.
+ if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {
+ return new WP_Error( 'is_importing' );
+ }
+
+ // Don't sync if request is marked as read only.
+ if ( Constants::is_true( 'JETPACK_SYNC_READ_ONLY' ) ) {
+ return new WP_Error( 'jetpack_sync_read_only' );
+ }
+
+ if ( ! Settings::is_sender_enabled( $queue->id ) ) {
+ return new WP_Error( 'sender_disabled_for_queue_' . $queue->id );
+ }
+
+ // Return early if we've gotten a retry-after header response.
+ $retry_time = get_option( Actions::RETRY_AFTER_PREFIX . $queue->id );
+ if ( $retry_time ) {
+ // If expired update to false but don't send. Send will occurr in new request to avoid race conditions.
+ if ( microtime( true ) > $retry_time ) {
+ update_option( Actions::RETRY_AFTER_PREFIX . $queue->id, false, false );
+ }
+ return new WP_Error( 'retry_after' );
+ }
+
+ // Don't sync if we are throttled.
+ if ( $this->get_next_sync_time( $queue->id ) > microtime( true ) ) {
+ return new WP_Error( 'sync_throttled' );
+ }
+
+ $start_time = microtime( true );
+
+ Settings::set_is_syncing( true );
+
+ $sync_result = $this->do_sync_for_queue( $queue );
+
+ Settings::set_is_syncing( false );
+
+ $exceeded_sync_wait_threshold = ( microtime( true ) - $start_time ) > (float) $this->get_sync_wait_threshold();
+
+ if ( is_wp_error( $sync_result ) ) {
+ if ( 'unclosed_buffer' === $sync_result->get_error_code() ) {
+ $this->set_next_sync_time( time() + self::QUEUE_LOCKED_SYNC_DELAY, $queue->id );
+ }
+ if ( 'wpcom_error' === $sync_result->get_error_code() ) {
+ $this->set_next_sync_time( time() + self::WPCOM_ERROR_SYNC_DELAY, $queue->id );
+ }
+ } elseif ( $exceeded_sync_wait_threshold ) {
+ // If we actually sent data and it took a while, wait before sending again.
+ $this->set_next_sync_time( time() + $this->get_sync_wait_time(), $queue->id );
+ }
+
+ return $sync_result;
+ }
+
+ /**
+ * Retrieve the next sync items to send.
+ *
+ * @access public
+ *
+ * @param (array|Automattic\Jetpack\Sync\Queue_Buffer) $buffer_or_items Queue buffer or array of objects.
+ * @param boolean $encode Whether to encode the items.
+ * @return array Sync items to send.
+ */
+ public function get_items_to_send( $buffer_or_items, $encode = true ) {
+ // Track how long we've been processing so we can avoid request timeouts.
+ $start_time = microtime( true );
+ $upload_size = 0;
+ $items_to_send = array();
+ $items = is_array( $buffer_or_items ) ? $buffer_or_items : $buffer_or_items->get_items();
+ if ( ! is_array( $items ) ) {
+ $items = array();
+ }
+
+ // Set up current screen to avoid errors rendering content.
+ require_once ABSPATH . 'wp-admin/includes/class-wp-screen.php';
+ require_once ABSPATH . 'wp-admin/includes/screen.php';
+ set_current_screen( 'sync' );
+ $skipped_items_ids = array();
+ /**
+ * We estimate the total encoded size as we go by encoding each item individually.
+ * This is expensive, but the only way to really know :/
+ */
+ foreach ( $items as $key => $item ) {
+ // Suspending cache addition help prevent overloading in memory cache of large sites.
+ wp_suspend_cache_addition( true );
+ /**
+ * Modify the data within an action before it is serialized and sent to the server
+ * For example, during full sync this expands Post ID's into full Post objects,
+ * so that we don't have to serialize the whole object into the queue.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param array The action parameters
+ * @param int The ID of the user who triggered the action
+ */
+ $item[1] = apply_filters( 'jetpack_sync_before_send_' . $item[0], $item[1], $item[2] );
+ wp_suspend_cache_addition( false );
+ // Serialization usage can lead to empty, null or false action_name. Lets skip as there is no information to send.
+ if ( empty( $item[0] ) || false === $item[1] ) {
+ $skipped_items_ids[] = $key;
+ continue;
+ }
+ $encoded_item = $this->codec->encode( $item );
+ $upload_size += strlen( $encoded_item );
+ if ( $upload_size > $this->upload_max_bytes && array() !== $items_to_send ) {
+ break;
+ }
+ $items_to_send[ $key ] = $encode ? $encoded_item : $item;
+ if ( microtime( true ) - $start_time > $this->max_dequeue_time ) {
+ break;
+ }
+ }
+
+ return array( $items_to_send, $skipped_items_ids, $items, microtime( true ) - $start_time );
+ }
+
+ /**
+ * If supported, flush all response data to the client and finish the request.
+ * This allows for time consuming tasks to be performed without leaving the connection open.
+ *
+ * @access private
+ */
+ private function fastcgi_finish_request() {
+ if ( function_exists( 'fastcgi_finish_request' ) && version_compare( phpversion(), '7.0.16', '>=' ) ) {
+ fastcgi_finish_request();
+ }
+ }
+
+ /**
+ * Perform sync for a certain sync queue.
+ *
+ * @access public
+ *
+ * @param Automattic\Jetpack\Sync\Queue $queue Queue object.
+ *
+ * @return boolean|WP_Error True if this sync sending was successful, error object otherwise.
+ */
+ public function do_sync_for_queue( $queue ) {
+ do_action( 'jetpack_sync_before_send_queue_' . $queue->id );
+ if ( $queue->size() === 0 ) {
+ return new WP_Error( 'empty_queue_' . $queue->id );
+ }
+
+ /**
+ * Now that we're sure we are about to sync, try to ignore user abort
+ * so we can avoid getting into a bad state.
+ */
+ if ( function_exists( 'ignore_user_abort' ) ) {
+ ignore_user_abort( true );
+ }
+
+ /* Don't make the request block till we finish, if possible. */
+ if ( Constants::is_true( 'REST_REQUEST' ) || Constants::is_true( 'XMLRPC_REQUEST' ) ) {
+ $this->fastcgi_finish_request();
+ }
+
+ $checkout_start_time = microtime( true );
+
+ $buffer = $queue->checkout_with_memory_limit( $this->dequeue_max_bytes, $this->upload_max_rows );
+
+ if ( ! $buffer ) {
+ // Buffer has no items.
+ return new WP_Error( 'empty_buffer' );
+ }
+
+ if ( is_wp_error( $buffer ) ) {
+ return $buffer;
+ }
+
+ $checkout_duration = microtime( true ) - $checkout_start_time;
+
+ list( $items_to_send, $skipped_items_ids, $items, $preprocess_duration ) = $this->get_items_to_send( $buffer, true );
+ if ( ! empty( $items_to_send ) ) {
+ /**
+ * Fires when data is ready to send to the server.
+ * Return false or WP_Error to abort the sync (e.g. if there's an error)
+ * The items will be automatically re-sent later
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param array $data The action buffer
+ * @param string $codec The codec name used to encode the data
+ * @param double $time The current time
+ * @param string $queue The queue used to send ('sync' or 'full_sync')
+ * @param float $checkout_duration The duration of the checkout operation.
+ * @param float $preprocess_duration The duration of the pre-process operation.
+ * @param int $queue_size The size of the sync queue at the time of processing.
+ */
+ Settings::set_is_sending( true );
+ $processed_item_ids = apply_filters( 'jetpack_sync_send_data', $items_to_send, $this->codec->name(), microtime( true ), $queue->id, $checkout_duration, $preprocess_duration, $queue->size(), $buffer->id );
+ Settings::set_is_sending( false );
+ } else {
+ $processed_item_ids = $skipped_items_ids;
+ $skipped_items_ids = array();
+ }
+
+ if ( 'non-blocking' !== $processed_item_ids ) {
+ if ( ! $processed_item_ids || is_wp_error( $processed_item_ids ) ) {
+ $checked_in_item_ids = $queue->checkin( $buffer );
+ if ( is_wp_error( $checked_in_item_ids ) ) {
+ // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
+ error_log( 'Error checking in buffer: ' . $checked_in_item_ids->get_error_message() );
+ $queue->force_checkin();
+ }
+ if ( is_wp_error( $processed_item_ids ) ) {
+ return new WP_Error( 'wpcom_error', $processed_item_ids->get_error_code() );
+ }
+
+ // Returning a wpcom_error is a sign to the caller that we should wait a while before syncing again.
+ return new WP_Error( 'wpcom_error', 'jetpack_sync_send_data_false' );
+ } else {
+ // Detect if the last item ID was an error.
+ $had_wp_error = is_wp_error( end( $processed_item_ids ) );
+ $wp_error = $had_wp_error ? array_pop( $processed_item_ids ) : null;
+ // Also checkin any items that were skipped.
+ if ( array() !== $skipped_items_ids ) {
+ $processed_item_ids = array_merge( $processed_item_ids, $skipped_items_ids );
+ }
+ $processed_items = array_intersect_key( $items, array_flip( $processed_item_ids ) );
+ /**
+ * Allows us to keep track of all the actions that have been sent.
+ * Allows us to calculate the progress of specific actions.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param array $processed_actions The actions that we send successfully.
+ */
+ do_action( 'jetpack_sync_processed_actions', $processed_items );
+ $queue->close( $buffer, $processed_item_ids );
+ // Returning a WP_Error is a sign to the caller that we should wait a while before syncing again.
+ if ( $had_wp_error ) {
+ return new WP_Error( 'wpcom_error', $wp_error->get_error_code() );
+ }
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Immediately sends a single item without firing or enqueuing it
+ *
+ * @param string $action_name The action.
+ * @param array $data The data associated with the action.
+ *
+ * @return Items processed. TODO: this doesn't make much sense anymore, it should probably be just a bool.
+ */
+ public function send_action( $action_name, $data = null ) {
+ if ( ! Settings::is_sender_enabled( 'full_sync' ) ) {
+ return array();
+ }
+
+ // Compose the data to be sent.
+ $action_to_send = $this->create_action_to_send( $action_name, $data );
+
+ list( $items_to_send, $skipped_items_ids, $items, $preprocess_duration ) = $this->get_items_to_send( $action_to_send, true ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ Settings::set_is_sending( true );
+ $processed_item_ids = apply_filters( 'jetpack_sync_send_data', $items_to_send, $this->get_codec()->name(), microtime( true ), 'immediate-send', 0, $preprocess_duration );
+ Settings::set_is_sending( false );
+
+ /**
+ * Allows us to keep track of all the actions that have been sent.
+ * Allows us to calculate the progress of specific actions.
+ *
+ * @param array $processed_actions The actions that we send successfully.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ */
+ do_action( 'jetpack_sync_processed_actions', $action_to_send );
+
+ return $processed_item_ids;
+ }
+
+ /**
+ * Create an synthetic action for direct sending to WPCOM during full sync (for example)
+ *
+ * @access private
+ *
+ * @param string $action_name The action.
+ * @param array $data The data associated with the action.
+ * @return array An array of synthetic sync actions keyed by current microtime(true)
+ */
+ private function create_action_to_send( $action_name, $data ) {
+ return array(
+ (string) microtime( true ) => array(
+ $action_name,
+ $data,
+ get_current_user_id(),
+ microtime( true ),
+ Settings::is_importing(),
+ ),
+ );
+ }
+
+ /**
+ * Returns any object that is able to be synced.
+ *
+ * @access public
+ *
+ * @param array $args the synchronized object parameters.
+ * @return string Encoded sync object.
+ */
+ public function sync_object( $args ) {
+ // For example: posts, post, 5.
+ list( $module_name, $object_type, $id ) = $args;
+
+ $sync_module = Modules::get_module( $module_name );
+ $codec = $this->get_codec();
+
+ return $codec->encode( $sync_module->get_object_by_id( $object_type, $id ) );
+ }
+
+ /**
+ * Register additional sync XML-RPC methods available to Jetpack for authenticated users.
+ *
+ * @access public
+ * @since 1.6.3
+ * @since-jetpack 7.8.0
+ *
+ * @param array $jetpack_methods XML-RPC methods available to the Jetpack Server.
+ * @return array Filtered XML-RPC methods.
+ */
+ public function register_jetpack_xmlrpc_methods( $jetpack_methods ) {
+ $jetpack_methods['jetpack.syncObject'] = array( $this, 'sync_object' );
+ return $jetpack_methods;
+ }
+
+ /**
+ * Get the incremental sync queue object.
+ *
+ * @access public
+ *
+ * @return Automattic\Jetpack\Sync\Queue Queue object.
+ */
+ public function get_sync_queue() {
+ return $this->sync_queue;
+ }
+
+ /**
+ * Get the full sync queue object.
+ *
+ * @access public
+ *
+ * @return Automattic\Jetpack\Sync\Queue Queue object.
+ */
+ public function get_full_sync_queue() {
+ return $this->full_sync_queue;
+ }
+
+ /**
+ * Get the codec object.
+ *
+ * @access public
+ *
+ * @return Automattic\Jetpack\Sync\Codec_Interface Codec object.
+ */
+ public function get_codec() {
+ return $this->codec;
+ }
+
+ /**
+ * Determine the codec object.
+ * Use gzip deflate if supported.
+ *
+ * @access public
+ */
+ public function set_codec() {
+ if ( function_exists( 'gzinflate' ) ) {
+ $this->codec = new JSON_Deflate_Array_Codec();
+ } else {
+ $this->codec = new Simple_Codec();
+ }
+ }
+
+ /**
+ * Compute and send all the checksums.
+ *
+ * @access public
+ */
+ public function send_checksum() {
+ $store = new Replicastore();
+ do_action( 'jetpack_sync_checksum', $store->checksum_all() );
+ }
+
+ /**
+ * Reset the incremental sync queue.
+ *
+ * @access public
+ */
+ public function reset_sync_queue() {
+ $this->sync_queue->reset();
+ }
+
+ /**
+ * Reset the full sync queue.
+ *
+ * @access public
+ */
+ public function reset_full_sync_queue() {
+ $this->full_sync_queue->reset();
+ }
+
+ /**
+ * Set the maximum bytes to checkout without exceeding the memory limit.
+ *
+ * @access public
+ *
+ * @param int $size Maximum bytes to checkout.
+ */
+ public function set_dequeue_max_bytes( $size ) {
+ $this->dequeue_max_bytes = $size;
+ }
+
+ /**
+ * Set the maximum bytes in a single encoded item.
+ *
+ * @access public
+ *
+ * @param int $max_bytes Maximum bytes in a single encoded item.
+ */
+ public function set_upload_max_bytes( $max_bytes ) {
+ $this->upload_max_bytes = $max_bytes;
+ }
+
+ /**
+ * Set the maximum number of sync items in a single action.
+ *
+ * @access public
+ *
+ * @param int $max_rows Maximum number of sync items.
+ */
+ public function set_upload_max_rows( $max_rows ) {
+ $this->upload_max_rows = $max_rows;
+ }
+
+ /**
+ * Set the sync wait time (in seconds).
+ *
+ * @access public
+ *
+ * @param int $seconds Sync wait time.
+ */
+ public function set_sync_wait_time( $seconds ) {
+ $this->sync_wait_time = $seconds;
+ }
+
+ /**
+ * Get current sync wait time (in seconds).
+ *
+ * @access public
+ *
+ * @return int Sync wait time.
+ */
+ public function get_sync_wait_time() {
+ return $this->sync_wait_time;
+ }
+
+ /**
+ * Set the enqueue wait time (in seconds).
+ *
+ * @access public
+ *
+ * @param int $seconds Enqueue wait time.
+ */
+ public function set_enqueue_wait_time( $seconds ) {
+ $this->enqueue_wait_time = $seconds;
+ }
+
+ /**
+ * Get current enqueue wait time (in seconds).
+ *
+ * @access public
+ *
+ * @return int Enqueue wait time.
+ */
+ public function get_enqueue_wait_time() {
+ return $this->enqueue_wait_time;
+ }
+
+ /**
+ * Set the sync wait threshold (in seconds).
+ *
+ * @access public
+ *
+ * @param int $seconds Sync wait threshold.
+ */
+ public function set_sync_wait_threshold( $seconds ) {
+ $this->sync_wait_threshold = $seconds;
+ }
+
+ /**
+ * Get current sync wait threshold (in seconds).
+ *
+ * @access public
+ *
+ * @return int Sync wait threshold.
+ */
+ public function get_sync_wait_threshold() {
+ return $this->sync_wait_threshold;
+ }
+
+ /**
+ * Set the maximum time for perfirming a checkout of items from the queue (in seconds).
+ *
+ * @access public
+ *
+ * @param int $seconds Maximum dequeue time.
+ */
+ public function set_max_dequeue_time( $seconds ) {
+ $this->max_dequeue_time = $seconds;
+ }
+
+ /**
+ * Initialize the sync queues, codec and set the default settings.
+ *
+ * @access public
+ */
+ public function set_defaults() {
+ $this->sync_queue = new Queue( 'sync' );
+ $this->full_sync_queue = new Queue( 'full_sync' );
+ $this->set_codec();
+
+ // Saved settings.
+ Settings::set_importing( null );
+ $settings = Settings::get_settings();
+ $this->set_dequeue_max_bytes( $settings['dequeue_max_bytes'] );
+ $this->set_upload_max_bytes( $settings['upload_max_bytes'] );
+ $this->set_upload_max_rows( $settings['upload_max_rows'] );
+ $this->set_sync_wait_time( $settings['sync_wait_time'] );
+ $this->set_enqueue_wait_time( $settings['enqueue_wait_time'] );
+ $this->set_sync_wait_threshold( $settings['sync_wait_threshold'] );
+ $this->set_max_dequeue_time( Defaults::get_max_sync_execution_time() );
+ }
+
+ /**
+ * Reset sync queues, modules and settings.
+ *
+ * @access public
+ */
+ public function reset_data() {
+ $this->reset_sync_queue();
+ $this->reset_full_sync_queue();
+
+ foreach ( Modules::get_modules() as $module ) {
+ $module->reset_data();
+ }
+ // Reset Sync locks without unlocking queues since we already reset those.
+ Actions::reset_sync_locks( false );
+
+ Settings::reset_data();
+ }
+
+ /**
+ * Perform cleanup at the event of plugin uninstallation.
+ *
+ * @access public
+ */
+ public function uninstall() {
+ // Lets delete all the other fun stuff like transient and option and the sync queue.
+ $this->reset_data();
+
+ // Delete the full sync status.
+ delete_option( 'jetpack_full_sync_status' );
+
+ // Clear the sync cron.
+ wp_clear_scheduled_hook( 'jetpack_sync_cron' );
+ wp_clear_scheduled_hook( 'jetpack_sync_full_cron' );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-server.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-server.php
new file mode 100644
index 00000000..7b6d0545
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-server.php
@@ -0,0 +1,195 @@
+:(
+ *
+ * @access public
+ */
+ public function __construct() {
+ $this->codec = new JSON_Deflate_Array_Codec();
+ }
+
+ /**
+ * Set the codec instance.
+ *
+ * @access public
+ *
+ * @param Automattic\Jetpack\Sync\Codec_Interface $codec Codec instance.
+ */
+ public function set_codec( Codec_Interface $codec ) {
+ $this->codec = $codec;
+ }
+
+ /**
+ * Attempt to lock the request when the server receives concurrent requests from the same blog.
+ *
+ * @access public
+ *
+ * @param int $blog_id ID of the blog.
+ * @param int $expiry Blog lock transient lifetime.
+ * @return boolean True if succeeded, false otherwise.
+ */
+ public function attempt_request_lock( $blog_id, $expiry = self::BLOG_LOCK_TRANSIENT_EXPIRY ) {
+ $transient_name = $this->get_concurrent_request_transient_name( $blog_id );
+ $locked_time = get_site_transient( $transient_name );
+ if ( $locked_time ) {
+ return false;
+ }
+ set_site_transient( $transient_name, microtime( true ), $expiry );
+
+ return true;
+ }
+
+ /**
+ * Retrieve the blog lock transient name for a particular blog.
+ *
+ * @access public
+ *
+ * @param int $blog_id ID of the blog.
+ * @return string Name of the blog lock transient.
+ */
+ private function get_concurrent_request_transient_name( $blog_id ) {
+ return self::BLOG_LOCK_TRANSIENT_PREFIX . $blog_id;
+ }
+
+ /**
+ * Remove the request lock from a particular blog ID.
+ *
+ * @access public
+ *
+ * @param int $blog_id ID of the blog.
+ */
+ public function remove_request_lock( $blog_id ) {
+ delete_site_transient( $this->get_concurrent_request_transient_name( $blog_id ) );
+ }
+
+ /**
+ * Receive and process sync events.
+ *
+ * @access public
+ *
+ * @param array $data Sync events.
+ * @param object $token The auth token used to invoke the API.
+ * @param int $sent_timestamp Timestamp (in seconds) when the actions were transmitted.
+ * @param string $queue_id ID of the queue from which the event was sent (`sync` or `full_sync`).
+ * @return array Processed sync events.
+ */
+ public function receive( $data, $token = null, $sent_timestamp = null, $queue_id = null ) {
+ $start_time = microtime( true );
+ if ( ! is_array( $data ) ) {
+ return new WP_Error( 'action_decoder_error', 'Events must be an array' );
+ }
+
+ if ( $token && ! $this->attempt_request_lock( $token->blog_id ) ) {
+ /**
+ * Fires when the server receives two concurrent requests from the same blog
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param token The token object of the misbehaving site
+ */
+ do_action( 'jetpack_sync_multi_request_fail', $token );
+
+ return new WP_Error( 'concurrent_request_error', 'There is another request running for the same blog ID' );
+ }
+
+ $events = wp_unslash( array_map( array( $this->codec, 'decode' ), $data ) );
+ $events_processed = array();
+
+ /**
+ * Fires when an array of actions are received from a remote Jetpack site
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param array Array of actions received from the remote site
+ */
+ do_action( 'jetpack_sync_remote_actions', $events, $token );
+
+ foreach ( $events as $key => $event ) {
+ list( $action_name, $args, $user_id, $timestamp, $silent ) = $event;
+
+ /**
+ * Fires when an action is received from a remote Jetpack site
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param string $action_name The name of the action executed on the remote site
+ * @param array $args The arguments passed to the action
+ * @param int $user_id The external_user_id who did the action
+ * @param bool $silent Whether the item was created via import
+ * @param double $timestamp Timestamp (in seconds) when the action occurred
+ * @param double $sent_timestamp Timestamp (in seconds) when the action was transmitted
+ * @param string $queue_id ID of the queue from which the event was sent (sync or full_sync)
+ * @param array $token The auth token used to invoke the API
+ */
+ do_action( 'jetpack_sync_remote_action', $action_name, $args, $user_id, $silent, $timestamp, $sent_timestamp, $queue_id, $token );
+
+ $events_processed[] = $key;
+
+ if ( microtime( true ) - $start_time > self::MAX_TIME_PER_REQUEST_IN_SECONDS ) {
+ break;
+ }
+ }
+
+ if ( $token ) {
+ $this->remove_request_lock( $token->blog_id );
+ }
+
+ return $events_processed;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php
new file mode 100644
index 00000000..4a3ac49f
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php
@@ -0,0 +1,681 @@
+ true,
+ 'upload_max_bytes' => true,
+ 'upload_max_rows' => true,
+ 'sync_wait_time' => true,
+ 'sync_wait_threshold' => true,
+ 'enqueue_wait_time' => true,
+ 'max_queue_size' => true,
+ 'max_queue_lag' => true,
+ 'queue_max_writes_sec' => true,
+ 'post_types_blacklist' => true,
+ 'taxonomies_blacklist' => true,
+ 'disable' => true,
+ 'network_disable' => true,
+ 'render_filtered_content' => true,
+ 'post_meta_whitelist' => true,
+ 'comment_meta_whitelist' => true,
+ 'max_enqueue_full_sync' => true,
+ 'max_queue_size_full_sync' => true,
+ 'sync_via_cron' => true,
+ 'cron_sync_time_limit' => true,
+ 'known_importers' => true,
+ 'term_relationships_full_sync_item_size' => true,
+ 'sync_sender_enabled' => true,
+ 'full_sync_sender_enabled' => true,
+ 'full_sync_send_duration' => true,
+ 'full_sync_limits' => true,
+ 'checksum_disable' => true,
+ 'dedicated_sync_enabled' => true,
+ 'custom_queue_table_enabled' => true,
+ );
+
+ /**
+ * Whether WordPress is currently running an import.
+ *
+ * @access public
+ * @static
+ *
+ * @var null|boolean
+ */
+ public static $is_importing;
+
+ /**
+ * Whether WordPress is currently running a WP cron request.
+ *
+ * @access public
+ * @static
+ *
+ * @var null|boolean
+ */
+ public static $is_doing_cron;
+
+ /**
+ * Whether we're currently syncing.
+ *
+ * @access public
+ * @static
+ *
+ * @var null|boolean
+ */
+ public static $is_syncing;
+
+ /**
+ * Whether we're currently sending sync items.
+ *
+ * @access public
+ * @static
+ *
+ * @var null|boolean
+ */
+ public static $is_sending;
+
+ /**
+ * Retrieve all settings with their current values.
+ *
+ * @access public
+ * @static
+ *
+ * @return array All current settings.
+ */
+ public static function get_settings() {
+ $settings = array();
+ foreach ( array_keys( self::$valid_settings ) as $setting ) {
+ $settings[ $setting ] = self::get_setting( $setting );
+ }
+
+ return $settings;
+ }
+
+ /**
+ * Fetches the setting. It saves it if the setting doesn't exist, so that it gets
+ * autoloaded on page load rather than re-queried every time.
+ *
+ * @access public
+ * @static
+ *
+ * @param string $setting The setting name.
+ * @return mixed The setting value.
+ */
+ public static function get_setting( $setting ) {
+ if ( ! isset( self::$valid_settings[ $setting ] ) ) {
+ return false;
+ }
+
+ if ( self::is_network_setting( $setting ) ) {
+ if ( is_multisite() ) {
+ $value = get_site_option( self::SETTINGS_OPTION_PREFIX . $setting );
+ } else {
+ // On single sites just return the default setting.
+ return Defaults::get_default_setting( $setting );
+ }
+ } else {
+ $value = get_option( self::SETTINGS_OPTION_PREFIX . $setting );
+ }
+
+ if ( false === $value ) { // No default value is set.
+ $value = Defaults::get_default_setting( $setting );
+ if ( self::is_network_setting( $setting ) ) {
+ update_site_option( self::SETTINGS_OPTION_PREFIX . $setting, $value );
+ } else {
+ // We set one so that it gets autoloaded.
+ update_option( self::SETTINGS_OPTION_PREFIX . $setting, $value, true );
+ }
+ }
+
+ if ( is_numeric( $value ) ) {
+ $value = (int) $value;
+ }
+ $default_array_value = null;
+ switch ( $setting ) {
+ case 'post_types_blacklist':
+ $default_array_value = Defaults::$blacklisted_post_types;
+ break;
+ case 'taxonomies_blacklist':
+ $default_array_value = Defaults::$blacklisted_taxonomies;
+ break;
+ case 'post_meta_whitelist':
+ $default_array_value = Defaults::get_post_meta_whitelist();
+ break;
+ case 'comment_meta_whitelist':
+ $default_array_value = Defaults::get_comment_meta_whitelist();
+ break;
+ case 'known_importers':
+ $default_array_value = Defaults::get_known_importers();
+ break;
+ }
+
+ if ( $default_array_value ) {
+ if ( is_array( $value ) ) {
+ $value = array_unique( array_merge( $value, $default_array_value ) );
+ } else {
+ $value = $default_array_value;
+ }
+ }
+
+ return $value;
+ }
+
+ /**
+ * Change multiple settings in the same time.
+ *
+ * @access public
+ * @static
+ *
+ * @param array $new_settings The new settings.
+ */
+ public static function update_settings( $new_settings ) {
+ $validated_settings = array_intersect_key( $new_settings, self::$valid_settings );
+ foreach ( $validated_settings as $setting => $value ) {
+
+ /**
+ * Custom table migration logic.
+ *
+ * This needs to happen before the option is updated, to avoid race conditions where we update the option,
+ * but haven't yet created the table or can't create it.
+ *
+ * On high-traffic sites this can lead to Sync trying to write in a non-existent table.
+ *
+ * So to avoid this, we're going to first try to initialize everything and then update the option.
+ */
+ if ( 'custom_queue_table_enabled' === $setting ) {
+ // Need to check the current value in the database to make sure we're not doing anything weird.
+ $old_value = get_option( self::SETTINGS_OPTION_PREFIX . $setting, null );
+
+ if ( ! $old_value && $value ) {
+ /**
+ * The custom table has been enabled.
+ *
+ * - Initialize the custom table
+ * - Migrate the data
+ *
+ * If something fails, migrate back to the options table and clean up everything about the custom table.
+ */
+ $init_result = Queue_Storage_Table::initialize_custom_sync_table();
+
+ /**
+ * Check if there was a problem when initializing the table.
+ */
+ if ( is_wp_error( $init_result ) ) {
+ /**
+ * Unable to initialize the table properly. Set the value to `false` as we can't enable it.
+ */
+ $value = false;
+
+ /**
+ * Send error to WPCOM, so we can track and take an appropriate action.
+ */
+ $data = array(
+ 'timestamp' => microtime( true ),
+ 'error_code' => $init_result->get_error_code(),
+ 'response_body' => $init_result->get_error_message(),
+ );
+
+ $sender = Sender::get_instance();
+ $sender->send_action( 'jetpack_sync_storage_error_custom_init', $data );
+
+ } elseif ( ! Queue_Storage_Table::migrate_from_options_table_to_custom_table() ) {
+ /**
+ * If the migration fails, do a reverse migration and set the value to `false` as we can't
+ * safely enable the table.
+ */
+ Queue_Storage_Table::migrate_from_custom_table_to_options_table();
+
+ // Set $value to `false` as we couldn't do the migration, and we can't continue enabling the table.
+ $value = false;
+
+ /**
+ * Send error to WPCOM, so we can track and take an appropriate action.
+ */
+ $data = array(
+ 'timestamp' => microtime( true ),
+ // TODO: Maybe add more details here for the migration, i.e. how many items where in the queue?
+ );
+
+ $sender = Sender::get_instance();
+ $sender->send_action( 'jetpack_sync_storage_error_custom_migrate', $data );
+ }
+ } elseif ( $old_value && ! $value ) {
+ /**
+ * The custom table has been disabled, migrate what we can from the custom table to the options table.
+ */
+ Queue_Storage_Table::migrate_from_custom_table_to_options_table();
+ }
+ }
+
+ /**
+ * Regular option update and handling
+ */
+ if ( self::is_network_setting( $setting ) ) {
+ if ( is_multisite() && is_main_site() ) {
+ $updated = update_site_option( self::SETTINGS_OPTION_PREFIX . $setting, $value );
+ }
+ } else {
+ $updated = update_option( self::SETTINGS_OPTION_PREFIX . $setting, $value, true );
+ }
+
+ // If we set the disabled option to true, clear the queues.
+ if ( ( 'disable' === $setting || 'network_disable' === $setting ) && (bool) $value ) {
+ $listener = Listener::get_instance();
+ $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 );
+ }
+ }
+ }
+ }
+
+ /**
+ * Whether the specified setting is a network setting.
+ *
+ * @access public
+ * @static
+ *
+ * @param string $setting Setting name.
+ * @return boolean Whether the setting is a network setting.
+ */
+ public static function is_network_setting( $setting ) {
+ return strpos( $setting, 'network_' ) === 0;
+ }
+
+ /**
+ * Returns escaped SQL for blacklisted post types.
+ * Can be injected directly into a WHERE clause.
+ *
+ * @access public
+ * @static
+ *
+ * @return string SQL WHERE clause.
+ */
+ public static function get_blacklisted_post_types_sql() {
+ return 'post_type NOT IN (\'' . implode( '\', \'', array_map( 'esc_sql', self::get_setting( 'post_types_blacklist' ) ) ) . '\')';
+ }
+
+ /**
+ * Returns escaped values for disallowed post types.
+ *
+ * @access public
+ * @static
+ *
+ * @return array Post type filter values
+ */
+ public static function get_disallowed_post_types_structured() {
+ return array(
+ 'post_type' => array(
+ 'operator' => 'NOT IN',
+ 'values' => array_map( 'esc_sql', self::get_setting( 'post_types_blacklist' ) ),
+ ),
+ );
+ }
+
+ /**
+ * Returns escaped SQL for blacklisted taxonomies.
+ * Can be injected directly into a WHERE clause.
+ *
+ * @access public
+ * @static
+ *
+ * @return string SQL WHERE clause.
+ */
+ public static function get_blacklisted_taxonomies_sql() {
+ return "taxonomy NOT IN ('" . implode( "', '", array_map( 'esc_sql', self::get_setting( 'taxonomies_blacklist' ) ) ) . "')";
+ }
+
+ /**
+ * Returns escaped SQL for blacklisted post meta.
+ * Can be injected directly into a WHERE clause.
+ *
+ * @access public
+ * @static
+ *
+ * @return string SQL WHERE clause.
+ */
+ public static function get_whitelisted_post_meta_sql() {
+ return 'meta_key IN (\'' . implode( '\', \'', array_map( 'esc_sql', self::get_setting( 'post_meta_whitelist' ) ) ) . '\')';
+ }
+
+ /**
+ * Returns escaped SQL for allowed post meta keys.
+ *
+ * @access public
+ * @static
+ *
+ * @return array Meta keys filter values
+ */
+ public static function get_allowed_post_meta_structured() {
+ return array(
+ 'meta_key' => array(
+ 'operator' => 'IN',
+ 'values' => array_map( 'esc_sql', self::get_setting( 'post_meta_whitelist' ) ),
+ ),
+ );
+ }
+
+ /**
+ * Returns structured SQL clause for blacklisted taxonomies.
+ *
+ * @access public
+ * @static
+ *
+ * @return array taxonomies filter values
+ */
+ public static function get_blacklisted_taxonomies_structured() {
+ return array(
+ 'taxonomy' => array(
+ 'operator' => 'NOT IN',
+ 'values' => array_map( 'esc_sql', self::get_setting( 'taxonomies_blacklist' ) ),
+ ),
+ );
+ }
+
+ /**
+ * Returns structured SQL clause for allowed taxonomies.
+ *
+ * @access public
+ * @static
+ *
+ * @return array taxonomies filter values
+ */
+ public static function get_allowed_taxonomies_structured() {
+ global $wp_taxonomies;
+
+ $allowed_taxonomies = array_keys( $wp_taxonomies );
+ $allowed_taxonomies = array_diff( $allowed_taxonomies, self::get_setting( 'taxonomies_blacklist' ) );
+ return array(
+ 'taxonomy' => array(
+ 'operator' => 'IN',
+ 'values' => array_map( 'esc_sql', $allowed_taxonomies ),
+ ),
+ );
+ }
+
+ /**
+ * Returns escaped SQL for blacklisted comment meta.
+ * Can be injected directly into a WHERE clause.
+ *
+ * @access public
+ * @static
+ *
+ * @return string SQL WHERE clause.
+ */
+ public static function get_whitelisted_comment_meta_sql() {
+ return 'meta_key IN (\'' . implode( '\', \'', array_map( 'esc_sql', self::get_setting( 'comment_meta_whitelist' ) ) ) . '\')';
+ }
+
+ /**
+ * Returns SQL-escaped values for allowed post meta keys.
+ *
+ * @access public
+ * @static
+ *
+ * @return array Meta keys filter values
+ */
+ public static function get_allowed_comment_meta_structured() {
+ return array(
+ 'meta_key' => array(
+ 'operator' => 'IN',
+ 'values' => array_map( 'esc_sql', self::get_setting( 'comment_meta_whitelist' ) ),
+ ),
+ );
+ }
+
+ /**
+ * Returns SQL-escaped values for allowed order_item meta keys.
+ *
+ * @access public
+ * @static
+ *
+ * @return array Meta keys filter values
+ */
+ public static function get_allowed_order_itemmeta_structured() {
+ // Make sure that we only try to add the properties when the class exists.
+ if ( ! class_exists( '\Automattic\Jetpack\Sync\Modules\WooCommerce' ) ) {
+ return array();
+ }
+
+ $values = \Automattic\Jetpack\Sync\Modules\WooCommerce::$order_item_meta_whitelist;
+
+ return array(
+ 'meta_key' => array(
+ 'operator' => 'IN',
+ 'values' => array_map( 'esc_sql', $values ),
+ ),
+ );
+ }
+
+ /**
+ * Returns escaped SQL for comments, excluding any spam comments.
+ * Can be injected directly into a WHERE clause.
+ *
+ * @access public
+ * @static
+ *
+ * @return string SQL WHERE clause.
+ */
+ public static function get_comments_filter_sql() {
+ return "comment_approved <> 'spam'";
+ }
+
+ /**
+ * Delete any settings options and clean up the current settings state.
+ *
+ * @access public
+ * @static
+ */
+ public static function reset_data() {
+ $valid_settings = self::$valid_settings;
+ foreach ( $valid_settings as $option => $value ) {
+ delete_option( self::SETTINGS_OPTION_PREFIX . $option );
+ }
+ self::set_importing( null );
+ self::set_doing_cron( null );
+ self::set_is_syncing( null );
+ self::set_is_sending( null );
+ }
+
+ /**
+ * Set the importing state.
+ *
+ * @access public
+ * @static
+ *
+ * @param boolean $is_importing Whether WordPress is currently importing.
+ */
+ public static function set_importing( $is_importing ) {
+ // Set to NULL to revert to WP_IMPORTING, the standard behavior.
+ self::$is_importing = $is_importing;
+ }
+
+ /**
+ * Whether WordPress is currently importing.
+ *
+ * @access public
+ * @static
+ *
+ * @return boolean Whether WordPress is currently importing.
+ */
+ public static function is_importing() {
+ if ( self::$is_importing !== null ) {
+ return self::$is_importing;
+ }
+
+ return defined( 'WP_IMPORTING' ) && WP_IMPORTING;
+ }
+
+ /**
+ * Whether sync is enabled.
+ *
+ * @access public
+ * @static
+ *
+ * @return boolean Whether sync is enabled.
+ */
+ public static function is_sync_enabled() {
+ return ! ( self::get_setting( 'disable' ) || self::get_setting( 'network_disable' ) );
+ }
+
+ /**
+ * Set the WP cron state.
+ *
+ * @access public
+ * @static
+ *
+ * @param boolean $is_doing_cron Whether WordPress is currently doing WP cron.
+ */
+ public static function set_doing_cron( $is_doing_cron ) {
+ // Set to NULL to revert to WP_IMPORTING, the standard behavior.
+ self::$is_doing_cron = $is_doing_cron;
+ }
+
+ /**
+ * Whether WordPress is currently doing WP cron.
+ *
+ * @access public
+ * @static
+ *
+ * @return boolean Whether WordPress is currently doing WP cron.
+ */
+ public static function is_doing_cron() {
+ if ( self::$is_doing_cron !== null ) {
+ return self::$is_doing_cron;
+ }
+
+ return defined( 'DOING_CRON' ) && DOING_CRON;
+ }
+
+ /**
+ * Whether we are currently syncing.
+ *
+ * @access public
+ * @static
+ *
+ * @return boolean Whether we are currently syncing.
+ */
+ public static function is_syncing() {
+ return (bool) self::$is_syncing || Constants::is_true( 'REST_API_REQUEST' );
+ }
+
+ /**
+ * Set the syncing state.
+ *
+ * @access public
+ * @static
+ *
+ * @param boolean $is_syncing Whether we are currently syncing.
+ */
+ public static function set_is_syncing( $is_syncing ) {
+ self::$is_syncing = $is_syncing;
+ }
+
+ /**
+ * Whether we are currently sending sync items.
+ *
+ * @access public
+ * @static
+ *
+ * @return boolean Whether we are currently sending sync items.
+ */
+ public static function is_sending() {
+ return (bool) self::$is_sending;
+ }
+
+ /**
+ * Set the sending state.
+ *
+ * @access public
+ * @static
+ *
+ * @param boolean $is_sending Whether we are currently sending sync items.
+ */
+ public static function set_is_sending( $is_sending ) {
+ self::$is_sending = $is_sending;
+ }
+
+ /**
+ * Whether should send from the queue
+ *
+ * @access public
+ * @static
+ *
+ * @param string $queue_id The queue identifier.
+ *
+ * @return boolean Whether sync is enabled.
+ */
+ public static function is_sender_enabled( $queue_id ) {
+ return (bool) self::get_setting( $queue_id . '_sender_enabled' );
+ }
+
+ /**
+ * Whether checksums are enabled.
+ *
+ * @access public
+ * @static
+ *
+ * @return boolean Whether sync is enabled.
+ */
+ public static function is_checksum_enabled() {
+ 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' );
+ }
+
+ /**
+ * Whether custom queue table is enabled.
+ *
+ * @access public
+ * @static
+ *
+ * @return boolean Whether custom queue table is enabled.
+ */
+ public static function is_custom_queue_table_enabled() {
+ return (bool) self::get_setting( 'custom_queue_table_enabled' );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-simple-codec.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-simple-codec.php
new file mode 100644
index 00000000..cd6f2c37
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-simple-codec.php
@@ -0,0 +1,62 @@
+json_serialize( $object ) );
+ }
+
+ /**
+ * Encode a sync object.
+ *
+ * @access public
+ *
+ * @param string $input Encoded sync object to decode.
+ * @return mixed Decoded sync object.
+ */
+ public function decode( $input ) {
+ // This is intentionally using base64_decode().
+ // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
+ return $this->json_unserialize( base64_decode( $input ) );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-users.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-users.php
new file mode 100644
index 00000000..316df9ce
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-users.php
@@ -0,0 +1,152 @@
+has_connected_user() ) {
+ // Kick off synchronization of user role when it changes.
+ add_action( 'set_user_role', array( __CLASS__, 'user_role_change' ) );
+ }
+ }
+
+ /**
+ * Synchronize connected user role changes.
+ *
+ * @access public
+ * @static
+ *
+ * @param int $user_id ID of the user.
+ */
+ public static function user_role_change( $user_id ) {
+ $connection = new Jetpack_Connection();
+ if ( $connection->is_user_connected( $user_id ) ) {
+ self::update_role_on_com( $user_id );
+ // Try to choose a new master if we're demoting the current one.
+ self::maybe_demote_master_user( $user_id );
+ }
+ }
+
+ /**
+ * Retrieve the role of a user by their ID.
+ *
+ * @access public
+ * @static
+ *
+ * @param int $user_id ID of the user.
+ * @return string Role of the user.
+ */
+ public static function get_role( $user_id ) {
+ if ( isset( self::$user_roles[ $user_id ] ) ) {
+ return self::$user_roles[ $user_id ];
+ }
+
+ $current_user_id = get_current_user_id();
+ wp_set_current_user( $user_id );
+ $roles = new Roles();
+ $role = $roles->translate_current_user_to_role();
+ wp_set_current_user( $current_user_id );
+ self::$user_roles[ $user_id ] = $role;
+
+ return $role;
+ }
+
+ /**
+ * Retrieve the signed role of a user by their ID.
+ *
+ * @access public
+ * @static
+ *
+ * @param int $user_id ID of the user.
+ * @return string Signed role of the user.
+ */
+ public static function get_signed_role( $user_id ) {
+ $connection = new Jetpack_Connection();
+ return $connection->sign_role( self::get_role( $user_id ), $user_id );
+ }
+
+ /**
+ * Retrieve the signed role and update it in WP.com for that user.
+ *
+ * @access public
+ * @static
+ *
+ * @param int $user_id ID of the user.
+ */
+ public static function update_role_on_com( $user_id ) {
+ $signed_role = self::get_signed_role( $user_id );
+ XMLRPC_Async_Call::add_call( 'jetpack.updateRole', get_current_user_id(), $user_id, $signed_role );
+ }
+
+ /**
+ * Choose a new master user if we're demoting the current one.
+ *
+ * @access public
+ * @static
+ * @todo Disconnect if there is no user with enough capabilities to be the master user.
+ * @uses \WP_User_Query
+ *
+ * @param int $user_id ID of the user.
+ */
+ public static function maybe_demote_master_user( $user_id ) {
+ $master_user_id = (int) \Jetpack_Options::get_option( 'master_user' );
+ $role = self::get_role( $user_id );
+ if ( $user_id === $master_user_id && 'administrator' !== $role ) {
+ $query = new \WP_User_Query(
+ array(
+ 'fields' => array( 'ID' ),
+ 'role' => 'administrator',
+ '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 );
+ if ( $found_user_id && $connection->is_user_connected( $found_user_id ) ) {
+ $new_master = $found_user_id;
+ break;
+ }
+ }
+
+ if ( $new_master ) {
+ \Jetpack_Options::update_option( 'master_user', $new_master );
+ }
+ // TODO: else disconnect..?
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-utils.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-utils.php
new file mode 100644
index 00000000..23f24e95
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-utils.php
@@ -0,0 +1,65 @@
+value;
+ }
+
+ /**
+ * Get the ID of a sync item.
+ *
+ * @access private
+ * @static
+ *
+ * @param array $item Sync item.
+ * @return int Sync item ID.
+ */
+ private static function get_item_id( $item ) {
+ return $item->id;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/interface-codec.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/interface-codec.php
new file mode 100644
index 00000000..7653f26d
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/interface-codec.php
@@ -0,0 +1,44 @@
+post_parent && 0 !== $attachment_after->post_parent ) {
+ /**
+ * Fires when an existing attachment is added to a post for the first time
+ *
+ * @since 1.6.3
+ * @since-jetpack 6.6.0
+ *
+ * @param int $attachment_id Attachment ID.
+ * @param \WP_Post $attachment_after Attachment post object after the update.
+ */
+ do_action( 'jetpack_sync_save_attach_attachment', $attachment_id, $attachment_after );
+ } else {
+ /**
+ * Fires when the client needs to sync an updated attachment
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.9.0
+ *
+ * @param int $attachment_id Attachment ID.
+ * @param \WP_Post $attachment_after Attachment post object after the update.
+ *
+ * Previously this action was synced using jetpack_sync_save_add_attachment action.
+ */
+ do_action( 'jetpack_sync_save_update_attachment', $attachment_id, $attachment_after );
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php
new file mode 100644
index 00000000..77f3c40b
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php
@@ -0,0 +1,645 @@
+ 'home_url',
+ 'siteurl' => 'site_url',
+ 'jetpack_active_modules' => 'active_modules',
+ );
+
+ /**
+ * Sync module name.
+ *
+ * @access public
+ *
+ * @return string
+ */
+ public function name() {
+ return 'functions';
+ }
+
+ /**
+ * Set module defaults.
+ * Define the callable whitelist based on whether this is a single site or a multisite installation.
+ *
+ * @access public
+ */
+ public function set_defaults() {
+ if ( is_multisite() ) {
+ $this->callable_whitelist = array_merge( Defaults::get_callable_whitelist(), Defaults::get_multisite_callable_whitelist() );
+ } else {
+ $this->callable_whitelist = Defaults::get_callable_whitelist();
+ }
+ $this->force_send_callables_on_next_tick = false; // Resets here as well mostly for tests.
+ }
+
+ /**
+ * Initialize callables action listeners.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_listeners( $callable ) {
+ add_action( 'jetpack_sync_callable', $callable, 10, 2 );
+ add_action( 'current_screen', array( $this, 'set_plugin_action_links' ), 9999 ); // Should happen very late.
+
+ foreach ( self::ALWAYS_SEND_UPDATES_TO_THESE_OPTIONS as $option ) {
+ add_action( "update_option_{$option}", array( $this, 'unlock_sync_callable' ) );
+ add_action( "delete_option_{$option}", array( $this, 'unlock_sync_callable' ) );
+ }
+
+ foreach ( self::ALWAYS_SEND_UPDATES_TO_THESE_OPTIONS_NEXT_TICK as $option ) {
+ add_action( "update_option_{$option}", array( $this, 'unlock_sync_callable_next_tick' ) );
+ add_action( "delete_option_{$option}", array( $this, 'unlock_sync_callable_next_tick' ) );
+ }
+
+ // Provide a hook so that hosts can send changes to certain callables right away.
+ // Especially useful when a host uses constants to change home and siteurl.
+ add_action( 'jetpack_sync_unlock_sync_callable', array( $this, 'unlock_sync_callable' ) );
+
+ // get_plugins and wp_version
+ // gets fired when new code gets installed, updates etc.
+ add_action( 'upgrader_process_complete', array( $this, 'unlock_plugin_action_link_and_callables' ) );
+ add_action( 'update_option_active_plugins', array( $this, 'unlock_plugin_action_link_and_callables' ) );
+ }
+
+ /**
+ * Initialize callables action listeners for full sync.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_full_sync_listeners( $callable ) {
+ add_action( 'jetpack_full_sync_callables', $callable );
+ }
+
+ /**
+ * Initialize the module in the sender.
+ *
+ * @access public
+ */
+ public function init_before_send() {
+ add_action( 'jetpack_sync_before_send_queue_sync', array( $this, 'maybe_sync_callables' ) );
+
+ // Full sync.
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_callables', array( $this, 'expand_callables' ) );
+ }
+
+ /**
+ * Perform module cleanup.
+ * Deletes any transients and options that this module uses.
+ * Usually triggered when uninstalling the plugin.
+ *
+ * @access public
+ */
+ public function reset_data() {
+ delete_option( self::CALLABLES_CHECKSUM_OPTION_NAME );
+ delete_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME );
+
+ $url_callables = array( 'home_url', 'site_url', 'main_network_site_url' );
+ foreach ( $url_callables as $callable ) {
+ delete_option( Functions::HTTPS_CHECK_OPTION_PREFIX . $callable );
+ }
+ }
+
+ /**
+ * Set the callable whitelist.
+ *
+ * @access public
+ *
+ * @param array $callables The new callables whitelist.
+ */
+ public function set_callable_whitelist( $callables ) {
+ $this->callable_whitelist = $callables;
+ }
+
+ /**
+ * Get the callable whitelist.
+ *
+ * @access public
+ *
+ * @return array The callables whitelist.
+ */
+ public function get_callable_whitelist() {
+ return $this->callable_whitelist;
+ }
+
+ /**
+ * Retrieve all callables as per the current callables whitelist.
+ *
+ * @access public
+ *
+ * @return array All callables.
+ */
+ public function get_all_callables() {
+ // get_all_callables should run as the master user always.
+ $current_user_id = get_current_user_id();
+ wp_set_current_user( \Jetpack_Options::get_option( 'master_user' ) );
+ $callables = array_combine(
+ array_keys( $this->get_callable_whitelist() ),
+ array_map( array( $this, 'get_callable' ), array_values( $this->get_callable_whitelist() ) )
+ );
+ wp_set_current_user( $current_user_id );
+ return $callables;
+ }
+
+ /**
+ * Invoke a particular callable.
+ * Used as a wrapper to standartize invocation.
+ *
+ * @access private
+ *
+ * @param callable $callable Callable to invoke.
+ * @return mixed Return value of the callable, null if not callable.
+ */
+ private function get_callable( $callable ) {
+ if ( is_callable( $callable ) ) {
+ return call_user_func( $callable );
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Enqueue the callable actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue.
+ * @param boolean $state True if full sync has finished enqueueing this module, false otherwise.
+ * @return array Number of actions enqueued, and next module state.
+ */
+ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ /**
+ * Tells the client to sync all callables to the server
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param boolean Whether to expand callables (should always be true)
+ */
+ do_action( 'jetpack_full_sync_callables', true );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 1, true );
+ }
+
+ /**
+ * Send the callable actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $send_until The timestamp until the current request can send.
+ * @param array $status This Module Full Sync Status.
+ *
+ * @return array This Module Full Sync Status.
+ */
+ public function send_full_sync_actions( $config, $send_until, $status ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ // we call this instead of do_action when sending immediately.
+ $this->send_action( 'jetpack_full_sync_callables', array( true ) );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 'finished' => true );
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return array Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return 1;
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_callables' );
+ }
+
+ /**
+ * Unlock callables so they would be available for syncing again.
+ *
+ * @access public
+ */
+ public function unlock_sync_callable() {
+ delete_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME );
+ }
+
+ /**
+ * Unlock callables on the next tick.
+ * Sometime the true callable values are only present on the next tick.
+ * When switching themes for example.
+ *
+ * @access public
+ */
+ public function unlock_sync_callable_next_tick() {
+ $this->force_send_callables_on_next_tick = true;
+ }
+
+ /**
+ * Unlock callables and plugin action links.
+ *
+ * @access public
+ */
+ public function unlock_plugin_action_link_and_callables() {
+ delete_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME );
+ delete_transient( 'jetpack_plugin_api_action_links_refresh' );
+ add_filter( 'jetpack_check_and_send_callables', '__return_true' );
+ }
+
+ /**
+ * Parse and store the plugin action links if on the plugins page.
+ *
+ * @uses \DOMDocument
+ * @uses libxml_use_internal_errors
+ * @uses mb_convert_encoding
+ *
+ * @access public
+ */
+ public function set_plugin_action_links() {
+ if (
+ ! class_exists( '\DOMDocument' ) ||
+ ! function_exists( 'libxml_use_internal_errors' ) ||
+ ! function_exists( 'mb_convert_encoding' )
+ ) {
+ return;
+ }
+
+ $current_screeen = get_current_screen();
+
+ $plugins_action_links = array();
+ // Is the transient lock in place?
+ $plugins_lock = get_transient( 'jetpack_plugin_api_action_links_refresh', false );
+ if ( ! empty( $plugins_lock ) && ( isset( $current_screeen->id ) && 'plugins' !== $current_screeen->id ) ) {
+ return;
+ }
+ $plugins = array_keys( Functions::get_plugins() );
+ foreach ( $plugins as $plugin_file ) {
+ /**
+ * Plugins often like to unset things but things break if they are not able to.
+ */
+ $action_links = array(
+ 'deactivate' => '',
+ 'activate' => '',
+ 'details' => '',
+ 'delete' => '',
+ 'edit' => '',
+ );
+ /** This filter is documented in src/wp-admin/includes/class-wp-plugins-list-table.php */
+ $action_links = apply_filters( 'plugin_action_links', $action_links, $plugin_file, null, 'all' );
+ // Verify $action_links is still an array.
+ if ( ! is_array( $action_links ) ) {
+ $action_links = array();
+ }
+ /** This filter is documented in src/wp-admin/includes/class-wp-plugins-list-table.php */
+ $action_links = apply_filters( "plugin_action_links_{$plugin_file}", $action_links, $plugin_file, null, 'all' );
+ // Verify $action_links is still an array to resolve warnings from filters not returning an array.
+ if ( is_array( $action_links ) ) {
+ $action_links = array_filter( $action_links );
+ } else {
+ $action_links = array();
+ }
+ $formatted_action_links = null;
+ if ( $action_links ) {
+ $dom_doc = new \DOMDocument();
+ foreach ( $action_links as $action_link ) {
+ // The @ is not enough to suppress errors when dealing with libxml,
+ // we have to tell it directly how we want to handle errors.
+ libxml_use_internal_errors( true );
+ $dom_doc->loadHTML( '' . $action_link );
+ libxml_use_internal_errors( false );
+
+ $link_elements = $dom_doc->getElementsByTagName( 'a' );
+ if ( 0 === $link_elements->length ) {
+ continue;
+ }
+
+ $link_element = $link_elements->item( 0 );
+ // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
+ if ( $link_element->hasAttribute( 'href' ) && $link_element->nodeValue ) {
+ $link_url = trim( $link_element->getAttribute( 'href' ) );
+
+ // Add the full admin path to the url if the plugin did not provide it.
+ $link_url_scheme = wp_parse_url( $link_url, PHP_URL_SCHEME );
+ if ( empty( $link_url_scheme ) ) {
+ $link_url = admin_url( $link_url );
+ }
+
+ // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
+ $formatted_action_links[ $link_element->nodeValue ] = $link_url;
+ }
+ }
+ }
+ if ( $formatted_action_links ) {
+ $plugins_action_links[ $plugin_file ] = $formatted_action_links;
+ }
+ }
+ // Cache things for a long time.
+ set_transient( 'jetpack_plugin_api_action_links_refresh', time(), DAY_IN_SECONDS );
+ update_option( 'jetpack_plugin_api_action_links', $plugins_action_links );
+ }
+
+ /**
+ * Whether a certain callable should be sent.
+ *
+ * @access public
+ *
+ * @param array $callable_checksums Callable checksums.
+ * @param string $name Name of the callable.
+ * @param string $checksum A checksum of the callable.
+ * @return boolean Whether to send the callable.
+ */
+ public function should_send_callable( $callable_checksums, $name, $checksum ) {
+ $idc_override_callables = array(
+ 'main_network_site',
+ 'home_url',
+ 'site_url',
+ );
+ if ( in_array( $name, $idc_override_callables, true ) && \Jetpack_Options::get_option( 'migrate_for_idc' ) ) {
+ return true;
+ }
+
+ return ! $this->still_valid_checksum( $callable_checksums, $name, $checksum );
+ }
+
+ /**
+ * Sync the callables if we're supposed to.
+ *
+ * @access public
+ */
+ public function maybe_sync_callables() {
+ $callables = $this->get_all_callables();
+ if ( ! apply_filters( 'jetpack_check_and_send_callables', false ) ) {
+ /**
+ * Treating Dedicated Sync requests a bit differently from normal. We want to send callables
+ * normally with all Sync actions, no matter if they were with admin action origin or not,
+ * since Dedicated Sync runs out of bound and the requests are never coming from an admin.
+ */
+ if ( ! is_admin() && ! Dedicated_Sender::is_dedicated_sync_request() ) {
+ // If we're not an admin and we're not doing cron and this isn't WP_CLI, don't sync anything.
+ if ( ! Settings::is_doing_cron() && ! Jetpack_Constants::get_constant( 'WP_CLI' ) ) {
+ return;
+ }
+ // If we're not an admin and we are doing cron, sync the Callables that are always supposed to sync ( See https://github.com/Automattic/jetpack/issues/12924 ).
+ $callables = $this->get_always_sent_callables();
+ }
+ if ( get_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME ) ) {
+ if ( $this->force_send_callables_on_next_tick ) {
+ $this->unlock_sync_callable();
+ }
+ return;
+ }
+ }
+
+ if ( empty( $callables ) ) {
+ return;
+ }
+ // No need to set the transiant we are trying to remove it anyways.
+ if ( ! $this->force_send_callables_on_next_tick ) {
+ set_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME, microtime( true ), Defaults::$default_sync_callables_wait_time );
+ }
+
+ $callable_checksums = (array) \Jetpack_Options::get_raw_option( self::CALLABLES_CHECKSUM_OPTION_NAME, array() );
+ $has_changed = false;
+ // Only send the callables that have changed.
+ foreach ( $callables as $name => $value ) {
+ $checksum = $this->get_check_sum( $value );
+
+ // Explicitly not using Identical comparison as get_option returns a string.
+ 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 ) ) ) {
+
+ /**
+ * Tells the client to sync a callable (aka function) to the server
+ *
+ * @param string The name of the callable
+ * @param mixed The value of the callable
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ */
+ do_action( 'jetpack_sync_callable', $name, $value );
+ }
+
+ $callable_checksums[ $name ] = $checksum;
+ $has_changed = true;
+ } else {
+ $callable_checksums[ $name ] = $checksum;
+ }
+ }
+ if ( $has_changed ) {
+ \Jetpack_Options::update_raw_option( self::CALLABLES_CHECKSUM_OPTION_NAME, $callable_checksums );
+ }
+
+ if ( $this->force_send_callables_on_next_tick ) {
+ $this->unlock_sync_callable();
+ }
+ }
+
+ /**
+ * Get the callables that should always be sent, e.g. on cron.
+ *
+ * @return array Callables that should always be sent
+ */
+ protected function get_always_sent_callables() {
+ $callables = $this->get_all_callables();
+ $cron_callables = array();
+ foreach ( self::ALWAYS_SEND_UPDATES_TO_THESE_OPTIONS as $option_name ) {
+ if ( array_key_exists( $option_name, $callables ) ) {
+ $cron_callables[ $option_name ] = $callables[ $option_name ];
+ continue;
+ }
+
+ // Check for the Callable name/key for the option, if different from option name.
+ if ( array_key_exists( $option_name, self::OPTION_NAMES_TO_CALLABLE_NAMES ) ) {
+ $callable_name = self::OPTION_NAMES_TO_CALLABLE_NAMES[ $option_name ];
+ if ( array_key_exists( $callable_name, $callables ) ) {
+ $cron_callables[ $callable_name ] = $callables[ $callable_name ];
+ }
+ }
+ }
+ return $cron_callables;
+ }
+
+ /**
+ * Expand the callables within a hook before they are serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array $args The hook parameters.
+ */
+ public function expand_callables( $args ) {
+ if ( $args[0] ) {
+ $callables = $this->get_all_callables();
+ $callables_checksums = array();
+ foreach ( $callables as $name => $value ) {
+ $callables_checksums[ $name ] = $this->get_check_sum( $value );
+ }
+ \Jetpack_Options::update_raw_option( self::CALLABLES_CHECKSUM_OPTION_NAME, $callables_checksums );
+ return $callables;
+ }
+
+ return $args;
+ }
+
+ /**
+ * Return Total number of objects.
+ *
+ * @param array $config Full Sync config.
+ *
+ * @return int total
+ */
+ public function total( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return count( $this->get_callable_whitelist() );
+ }
+
+ /**
+ * Retrieve a set of callables by their IDs.
+ *
+ * @access public
+ *
+ * @param string $object_type Object type.
+ * @param array $ids Object IDs.
+ * @return array Array of objects.
+ */
+ public function get_objects_by_id( $object_type, $ids ) {
+ if ( empty( $ids ) || empty( $object_type ) || 'callable' !== $object_type ) {
+ return array();
+ }
+
+ $objects = array();
+ foreach ( (array) $ids as $id ) {
+ $object = $this->get_object_by_id( $object_type, $id );
+
+ if ( 'CALLABLE-DOES-NOT-EXIST' !== $object ) {
+ if ( 'all' === $id ) {
+ // If all was requested it contains all options and can simply be returned.
+ return $object;
+ }
+ $objects[ $id ] = $object;
+ }
+ }
+
+ return $objects;
+ }
+
+ /**
+ * Retrieve a callable by its name.
+ *
+ * @access public
+ *
+ * @param string $object_type Type of the sync object.
+ * @param string $id ID of the sync object.
+ * @return mixed Value of Callable.
+ */
+ public function get_object_by_id( $object_type, $id ) {
+ if ( 'callable' === $object_type ) {
+
+ // Only whitelisted options can be returned.
+ if ( array_key_exists( $id, $this->get_callable_whitelist() ) ) {
+ // requires master user to be in context.
+ $current_user_id = get_current_user_id();
+ wp_set_current_user( \Jetpack_Options::get_option( 'master_user' ) );
+ $callable = $this->get_callable( $this->callable_whitelist[ $id ] );
+ wp_set_current_user( $current_user_id );
+ return $callable;
+ } elseif ( 'all' === $id ) {
+ return $this->get_all_callables();
+ }
+ }
+
+ return 'CALLABLE-DOES-NOT-EXIST';
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-comments.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-comments.php
new file mode 100644
index 00000000..44fdcde4
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-comments.php
@@ -0,0 +1,503 @@
+filter_comment( $comment );
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Initialize comments action listeners.
+ * Also responsible for initializing comment meta listeners.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_listeners( $callable ) {
+ add_action( 'wp_insert_comment', $callable, 10, 2 );
+ add_action( 'deleted_comment', $callable );
+ add_action( 'trashed_comment', $callable );
+ add_action( 'spammed_comment', $callable );
+ add_action( 'trashed_post_comments', $callable, 10, 2 );
+ add_action( 'untrash_post_comments', $callable );
+ add_action( 'comment_approved_to_unapproved', $callable );
+ add_action( 'comment_unapproved_to_approved', $callable );
+ add_action( 'jetpack_modified_comment_contents', $callable, 10, 2 );
+ add_action( 'untrashed_comment', $callable, 10, 2 );
+ add_action( 'unspammed_comment', $callable, 10, 2 );
+ add_filter( 'wp_update_comment_data', array( $this, 'handle_comment_contents_modification' ), 10, 3 );
+
+ // comment actions.
+ add_filter( 'jetpack_sync_before_enqueue_wp_insert_comment', array( $this, 'filter_jetpack_sync_before_enqueue_wp_insert_comment' ) );
+ add_filter( 'jetpack_sync_before_enqueue_deleted_comment', array( $this, 'only_allow_white_listed_comment_types' ) );
+ add_filter( 'jetpack_sync_before_enqueue_trashed_comment', array( $this, 'only_allow_white_listed_comment_types' ) );
+ add_filter( 'jetpack_sync_before_enqueue_untrashed_comment', array( $this, 'only_allow_white_listed_comment_types' ) );
+ add_filter( 'jetpack_sync_before_enqueue_spammed_comment', array( $this, 'only_allow_white_listed_comment_types' ) );
+ add_filter( 'jetpack_sync_before_enqueue_unspammed_comment', array( $this, 'only_allow_white_listed_comment_types' ) );
+
+ // comment status transitions.
+ add_filter( 'jetpack_sync_before_enqueue_comment_approved_to_unapproved', array( $this, 'only_allow_white_listed_comment_type_transitions' ) );
+ add_filter( 'jetpack_sync_before_enqueue_comment_unapproved_to_approved', array( $this, 'only_allow_white_listed_comment_type_transitions' ) );
+
+ // Post Actions.
+ add_filter( 'jetpack_sync_before_enqueue_trashed_post_comments', array( $this, 'filter_blacklisted_post_types' ) );
+ add_filter( 'jetpack_sync_before_enqueue_untrash_post_comments', array( $this, 'filter_blacklisted_post_types' ) );
+
+ /**
+ * Even though it's messy, we implement these hooks because
+ * the edit_comment hook doesn't include the data
+ * so this saves us a DB read for every comment event.
+ */
+ foreach ( $this->get_whitelisted_comment_types() as $comment_type ) {
+ foreach ( array( 'unapproved', 'approved' ) as $comment_status ) {
+ $comment_action_name = "comment_{$comment_status}_{$comment_type}";
+ add_action( $comment_action_name, $callable, 10, 2 );
+ add_filter(
+ 'jetpack_sync_before_enqueue_' . $comment_action_name,
+ array(
+ $this,
+ 'expand_wp_insert_comment',
+ )
+ );
+ }
+ }
+
+ // Listen for meta changes.
+ $this->init_listeners_for_meta_type( 'comment', $callable );
+ $this->init_meta_whitelist_handler( 'comment', array( $this, 'filter_meta' ) );
+ }
+
+ /**
+ * Handler for any comment content updates.
+ *
+ * @access public
+ *
+ * @param array $new_comment The new, processed comment data.
+ * @param array $old_comment The old, unslashed comment data.
+ * @param array $new_comment_with_slashes The new, raw comment data.
+ * @return array The new, processed comment data.
+ */
+ public function handle_comment_contents_modification( $new_comment, $old_comment, $new_comment_with_slashes ) {
+ $changes = array();
+ $content_fields = array(
+ 'comment_author',
+ 'comment_author_email',
+ 'comment_author_url',
+ 'comment_content',
+ );
+ foreach ( $content_fields as $field ) {
+ if ( $new_comment_with_slashes[ $field ] !== $old_comment[ $field ] ) {
+ $changes[ $field ] = array( $new_comment[ $field ], $old_comment[ $field ] );
+ }
+ }
+
+ if ( ! empty( $changes ) ) {
+ /**
+ * Signals to the sync listener that this comment's contents were modified and a sync action
+ * reflecting the change(s) to the content should be sent
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.9.0
+ *
+ * @param int $new_comment['comment_ID'] ID of comment whose content was modified
+ * @param mixed $changes Array of changed comment fields with before and after values
+ */
+ do_action( 'jetpack_modified_comment_contents', $new_comment['comment_ID'], $changes );
+ }
+ return $new_comment;
+ }
+
+ /**
+ * Initialize comments action listeners for full sync.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_full_sync_listeners( $callable ) {
+ add_action( 'jetpack_full_sync_comments', $callable ); // Also send comments meta.
+ }
+
+ /**
+ * Gets a filtered list of comment types that sync can hook into.
+ *
+ * @access public
+ *
+ * @return array Defaults to [ '', 'trackback', 'pingback' ].
+ */
+ public function get_whitelisted_comment_types() {
+ /**
+ * Comment types present in this list will sync their status changes to WordPress.com.
+ *
+ * @since 1.6.3
+ * @since-jetpack 7.6.0
+ *
+ * @param array A list of comment types.
+ */
+ return apply_filters(
+ 'jetpack_sync_whitelisted_comment_types',
+ array( '', 'comment', 'trackback', 'pingback', 'review' )
+ );
+ }
+
+ /**
+ * Prevents any comment types that are not in the whitelist from being enqueued and sent to WordPress.com.
+ *
+ * @param array $args Arguments passed to wp_insert_comment, deleted_comment, spammed_comment, etc.
+ *
+ * @return bool or array $args Arguments passed to wp_insert_comment, deleted_comment, spammed_comment, etc.
+ */
+ public function only_allow_white_listed_comment_types( $args ) {
+ $comment = false;
+
+ if ( isset( $args[1] ) ) {
+ // comment object is available.
+ $comment = $args[1];
+ } elseif ( is_numeric( $args[0] ) ) {
+ // comment_id is available.
+ $comment = get_comment( $args[0] );
+ }
+
+ if (
+ isset( $comment->comment_type )
+ && ! in_array( $comment->comment_type, $this->get_whitelisted_comment_types(), true )
+ ) {
+ return false;
+ }
+
+ return $args;
+ }
+
+ /**
+ * Filter all blacklisted post types.
+ *
+ * @param array $args Hook arguments.
+ * @return array|false Hook arguments, or false if the post type is a blacklisted one.
+ */
+ public function filter_blacklisted_post_types( $args ) {
+ $post_id = $args[0];
+ $posts_module = Modules::get_module( 'posts' );
+
+ if ( false !== $posts_module && ! $posts_module->is_post_type_allowed( $post_id ) ) {
+ return false;
+ }
+
+ return $args;
+ }
+
+ /**
+ * Prevents any comment types that are not in the whitelist from being enqueued and sent to WordPress.com.
+ *
+ * @param array $args Arguments passed to wp_{old_status}_to_{new_status}.
+ *
+ * @return bool or array $args Arguments passed to wp_{old_status}_to_{new_status}
+ */
+ public function only_allow_white_listed_comment_type_transitions( $args ) {
+ $comment = $args[0];
+
+ if ( ! in_array( $comment->comment_type, $this->get_whitelisted_comment_types(), true ) ) {
+ return false;
+ }
+
+ return $args;
+ }
+
+ /**
+ * Prevents any comment types that are not in the whitelist from being enqueued and sent to WordPress.com.
+ * Also expands comment data before being enqueued.
+ *
+ * @param array $args Arguments passed to wp_insert_comment.
+ *
+ * @return false or array $args Arguments passed to wp_insert_comment or false if the comment type is a blacklisted one.
+ */
+ public function filter_jetpack_sync_before_enqueue_wp_insert_comment( $args ) {
+ if ( false === $this->only_allow_white_listed_comment_types( $args ) ) {
+ return false;
+ }
+
+ return $this->expand_wp_insert_comment( $args );
+ }
+
+ /**
+ * Whether a comment type is allowed.
+ * A comment type is allowed if it's present in the comment type whitelist.
+ *
+ * @param int $comment_id ID of the comment.
+ * @return boolean Whether the comment type is allowed.
+ */
+ public function is_comment_type_allowed( $comment_id ) {
+ $comment = get_comment( $comment_id );
+
+ if ( isset( $comment->comment_type ) ) {
+ return in_array( $comment->comment_type, $this->get_whitelisted_comment_types(), true );
+ }
+ return false;
+ }
+
+ /**
+ * Initialize the module in the sender.
+ *
+ * @access public
+ */
+ public function init_before_send() {
+ // Full sync.
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_comments', array( $this, 'expand_comment_ids' ) );
+ }
+
+ /**
+ * Enqueue the comments actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue.
+ * @param boolean $state True if full sync has finished enqueueing this module, false otherwise.
+ * @return array Number of actions enqueued, and next module state.
+ */
+ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) {
+ global $wpdb;
+ return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_comments', $wpdb->comments, 'comment_ID', $this->get_where_sql( $config ), $max_items_to_enqueue, $state );
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return int Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) {
+ global $wpdb;
+
+ $query = "SELECT count(*) FROM $wpdb->comments";
+
+ $where_sql = $this->get_where_sql( $config );
+ if ( $where_sql ) {
+ $query .= ' WHERE ' . $where_sql;
+ }
+
+ // TODO: Call $wpdb->prepare on the following query.
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $count = $wpdb->get_var( $query );
+
+ return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
+ }
+
+ /**
+ * Retrieve the WHERE SQL clause based on the module config.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return string WHERE SQL clause, or `null` if no comments are specified in the module config.
+ */
+ public function get_where_sql( $config ) {
+ if ( is_array( $config ) ) {
+ return 'comment_ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')';
+ }
+
+ return '1=1';
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_comments' );
+ }
+
+ /**
+ * Count all the actions that are going to be sent.
+ *
+ * @access public
+ *
+ * @param array $action_names Names of all the actions that will be sent.
+ * @return int Number of actions.
+ */
+ public function count_full_sync_actions( $action_names ) {
+ return $this->count_actions( $action_names, array( 'jetpack_full_sync_comments' ) );
+ }
+
+ /**
+ * Expand the comment status change before the data is serialized and sent to the server.
+ *
+ * @access public
+ * @todo This is not used currently - let's implement it.
+ *
+ * @param array $args The hook parameters.
+ * @return array The expanded hook parameters.
+ */
+ public function expand_wp_comment_status_change( $args ) {
+ return array( $args[0], $this->filter_comment( $args[1] ) );
+ }
+
+ /**
+ * Expand the comment creation before the data is added to the Sync queue.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array The expanded hook parameters.
+ */
+ public function expand_wp_insert_comment( $args ) {
+ return array( $args[0], $this->filter_comment( $args[1] ) );
+ }
+
+ /**
+ * Filter a comment object to the fields we need.
+ *
+ * @access public
+ *
+ * @param \WP_Comment $comment The unfiltered comment object.
+ * @return \WP_Comment Filtered comment object.
+ */
+ public function filter_comment( $comment ) {
+ /**
+ * Filters whether to prevent sending comment data to .com
+ *
+ * Passing true to the filter will prevent the comment data from being sent
+ * to the WordPress.com.
+ * Instead we pass data that will still enable us to do a checksum against the
+ * Jetpacks data but will prevent us from displaying the data on in the API as well as
+ * other services.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param boolean false prevent post data from bing synced to WordPress.com
+ * @param mixed $comment WP_COMMENT object
+ */
+ if ( apply_filters( 'jetpack_sync_prevent_sending_comment_data', false, $comment ) ) {
+ $blocked_comment = new \stdClass();
+ $blocked_comment->comment_ID = $comment->comment_ID;
+ $blocked_comment->comment_date = $comment->comment_date;
+ $blocked_comment->comment_date_gmt = $comment->comment_date_gmt;
+ $blocked_comment->comment_approved = 'jetpack_sync_blocked';
+ return $blocked_comment;
+ }
+
+ return $comment;
+ }
+
+ /**
+ * Whether a certain comment meta key is whitelisted for sync.
+ *
+ * @access public
+ *
+ * @param string $meta_key Comment meta key.
+ * @return boolean Whether the meta key is whitelisted.
+ */
+ public function is_whitelisted_comment_meta( $meta_key ) {
+ return in_array( $meta_key, Settings::get_setting( 'comment_meta_whitelist' ), true );
+ }
+
+ /**
+ * Handler for filtering out non-whitelisted comment meta.
+ *
+ * @access public
+ *
+ * @param array $args Hook args.
+ * @return array|boolean False if not whitelisted, the original hook args otherwise.
+ */
+ public function filter_meta( $args ) {
+ if ( $this->is_comment_type_allowed( $args[1] ) && $this->is_whitelisted_comment_meta( $args[2] ) ) {
+ return $args;
+ }
+
+ return false;
+ }
+
+ /**
+ * Expand the comment IDs to comment objects and meta before being serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array The expanded hook parameters.
+ */
+ public function expand_comment_ids( $args ) {
+ list( $comment_ids, $previous_interval_end ) = $args;
+ $comments = get_comments(
+ array(
+ 'include_unapproved' => true,
+ 'comment__in' => $comment_ids,
+ 'orderby' => 'comment_ID',
+ 'order' => 'DESC',
+ )
+ );
+
+ return array(
+ $comments,
+ $this->get_metadata( $comment_ids, 'comment', Settings::get_setting( 'comment_meta_whitelist' ) ),
+ $previous_interval_end,
+ );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php
new file mode 100644
index 00000000..ec913477
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php
@@ -0,0 +1,338 @@
+constants_whitelist = $constants;
+ }
+
+ /**
+ * Get the constants whitelist.
+ *
+ * @access public
+ *
+ * @return array The constants whitelist.
+ */
+ public function get_constants_whitelist() {
+ return Defaults::get_constants_whitelist();
+ }
+
+ /**
+ * Enqueue the constants actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue.
+ * @param boolean $state True if full sync has finished enqueueing this module, false otherwise.
+ *
+ * @return array Number of actions enqueued, and next module state.
+ */
+ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ /**
+ * Tells the client to sync all constants to the server
+ *
+ * @param boolean Whether to expand constants (should always be true)
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ */
+ do_action( 'jetpack_full_sync_constants', true );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 1, true );
+ }
+
+ /**
+ * Send the constants actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $send_until The timestamp until the current request can send.
+ * @param array $state This module Full Sync status.
+ *
+ * @return array This module Full Sync status.
+ */
+ public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ // we call this instead of do_action when sending immediately.
+ $this->send_action( 'jetpack_full_sync_constants', array( true ) );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 'finished' => true );
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ *
+ * @return array Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return 1;
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_constants' );
+ }
+
+ /**
+ * Sync the constants if we're supposed to.
+ *
+ * @access public
+ */
+ public function maybe_sync_constants() {
+ if ( get_transient( self::CONSTANTS_AWAIT_TRANSIENT_NAME ) ) {
+ return;
+ }
+
+ set_transient( self::CONSTANTS_AWAIT_TRANSIENT_NAME, microtime( true ), Defaults::$default_sync_constants_wait_time );
+
+ $constants = $this->get_all_constants();
+ if ( empty( $constants ) ) {
+ return;
+ }
+
+ $constants_checksums = (array) get_option( self::CONSTANTS_CHECKSUM_OPTION_NAME, array() );
+
+ 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 ) && $value !== null ) {
+ /**
+ * Tells the client to sync a constant to the server
+ *
+ * @param string The name of the constant
+ * @param mixed The value of the constant
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ */
+ do_action( 'jetpack_sync_constant', $name, $value );
+ $constants_checksums[ $name ] = $checksum;
+ } else {
+ $constants_checksums[ $name ] = $checksum;
+ }
+ }
+ update_option( self::CONSTANTS_CHECKSUM_OPTION_NAME, $constants_checksums );
+ }
+
+ /**
+ * Retrieve all constants as per the current constants whitelist.
+ * Public so that we don't have to store an option for each constant.
+ *
+ * @access public
+ *
+ * @return array All constants.
+ */
+ public function get_all_constants() {
+ $constants_whitelist = $this->get_constants_whitelist();
+
+ return array_combine(
+ $constants_whitelist,
+ array_map( array( $this, 'get_constant' ), $constants_whitelist )
+ );
+ }
+
+ /**
+ * Retrieve the value of a constant.
+ * Used as a wrapper to standartize access to constants.
+ *
+ * @access private
+ *
+ * @param string $constant Constant name.
+ *
+ * @return mixed Return value of the constant.
+ */
+ private function get_constant( $constant ) {
+ return ( defined( $constant ) ) ?
+ constant( $constant )
+ : null;
+ }
+
+ /**
+ * Expand the constants within a hook before they are serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ *
+ * @return array $args The hook parameters.
+ */
+ public function expand_constants( $args ) {
+ if ( $args[0] ) {
+ $constants = $this->get_all_constants();
+ $constants_checksums = array();
+ foreach ( $constants as $name => $value ) {
+ $constants_checksums[ $name ] = $this->get_check_sum( $value );
+ }
+ update_option( self::CONSTANTS_CHECKSUM_OPTION_NAME, $constants_checksums );
+
+ return $constants;
+ }
+
+ return $args;
+ }
+
+ /**
+ * Return Total number of objects.
+ *
+ * @param array $config Full Sync config.
+ *
+ * @return int total
+ */
+ public function total( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return count( $this->get_constants_whitelist() );
+ }
+
+ /**
+ * Retrieve a set of constants by their IDs.
+ *
+ * @access public
+ *
+ * @param string $object_type Object type.
+ * @param array $ids Object IDs.
+ * @return array Array of objects.
+ */
+ public function get_objects_by_id( $object_type, $ids ) {
+ if ( empty( $ids ) || empty( $object_type ) || 'constant' !== $object_type ) {
+ return array();
+ }
+
+ $objects = array();
+ foreach ( (array) $ids as $id ) {
+ $object = $this->get_object_by_id( $object_type, $id );
+
+ if ( 'all' === $id ) {
+ // If all was requested it contains all options and can simply be returned.
+ return $object;
+ }
+ $objects[ $id ] = $object;
+ }
+
+ return $objects;
+ }
+
+ /**
+ * Retrieve a constant by its name.
+ *
+ * @access public
+ *
+ * @param string $object_type Type of the sync object.
+ * @param string $id ID of the sync object.
+ * @return mixed Value of Constant.
+ */
+ public function get_object_by_id( $object_type, $id ) {
+ if ( 'constant' === $object_type ) {
+
+ // Only whitelisted constants can be returned.
+ if ( in_array( $id, $this->get_constants_whitelist(), true ) ) {
+ return $this->get_constant( $id );
+ } elseif ( 'all' === $id ) {
+ return $this->get_all_constants();
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php
new file mode 100644
index 00000000..94b7e91b
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php
@@ -0,0 +1,469 @@
+is_started() && ! $this->is_finished() ) {
+ /**
+ * Fires when a full sync is cancelled.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ */
+ do_action( 'jetpack_full_sync_cancelled' );
+ $this->send_action( 'jetpack_full_sync_cancelled' );
+ }
+
+ // Remove all evidence of previous full sync items and status.
+ $this->reset_data();
+
+ if ( ! is_array( $full_sync_config ) ) {
+ $full_sync_config = Defaults::$default_full_sync_config;
+ if ( is_multisite() ) {
+ $full_sync_config['network_options'] = 1;
+ }
+ }
+
+ if ( isset( $full_sync_config['users'] ) && 'initial' === $full_sync_config['users'] ) {
+ $full_sync_config['users'] = Modules::get_module( 'users' )->get_initial_sync_user_config();
+ }
+
+ $this->update_status(
+ array(
+ 'started' => time(),
+ 'config' => $full_sync_config,
+ 'progress' => $this->get_initial_progress( $full_sync_config ),
+ )
+ );
+
+ $range = $this->get_content_range();
+ /**
+ * Fires when a full sync begins. This action is serialized
+ * and sent to the server so that it knows a full sync is coming.
+ *
+ * @param array $full_sync_config Sync configuration for all sync modules.
+ * @param array $range Range of the sync items, containing min and max IDs for some item types.
+ * @param array $empty The modules with no items to sync during a full sync.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ * @since-jetpack 7.3.0 Added $range arg.
+ * @since-jetpack 7.4.0 Added $empty arg.
+ */
+ do_action( 'jetpack_full_sync_start', $full_sync_config, $range );
+ $this->send_action( 'jetpack_full_sync_start', array( $full_sync_config, $range ) );
+
+ return true;
+ }
+
+ /**
+ * Whether full sync has started.
+ *
+ * @access public
+ *
+ * @return boolean
+ */
+ public function is_started() {
+ return (bool) $this->get_status()['started'];
+ }
+
+ /**
+ * Retrieve the status of the current full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync status.
+ */
+ public function get_status() {
+ $default = array(
+ 'started' => false,
+ 'finished' => false,
+ 'progress' => array(),
+ 'config' => array(),
+ );
+
+ return wp_parse_args( \Jetpack_Options::get_raw_option( self::STATUS_OPTION ), $default );
+ }
+
+ /**
+ * Returns the progress percentage of a full sync.
+ *
+ * @access public
+ *
+ * @return int|null
+ */
+ public function get_sync_progress_percentage() {
+ if ( ! $this->is_started() || $this->is_finished() ) {
+ return null;
+ }
+ $status = $this->get_status();
+ if ( empty( $status['progress'] ) ) {
+ return null;
+ }
+ $total_items = array_reduce(
+ array_values( $status['progress'] ),
+ function ( $sum, $sync_item ) {
+ return isset( $sync_item['total'] ) ? ( $sum + (int) $sync_item['total'] ) : $sum;
+ },
+ 0
+ );
+ $total_sent = array_reduce(
+ array_values( $status['progress'] ),
+ function ( $sum, $sync_item ) {
+ return isset( $sync_item['sent'] ) ? ( $sum + (int) $sync_item['sent'] ) : $sum;
+ },
+ 0
+ );
+ return floor( ( $total_sent / $total_items ) * 100 );
+ }
+
+ /**
+ * Whether full sync has finished.
+ *
+ * @access public
+ *
+ * @return boolean
+ */
+ public function is_finished() {
+ return (bool) $this->get_status()['finished'];
+ }
+
+ /**
+ * Clear all the full sync data.
+ *
+ * @access public
+ */
+ public function reset_data() {
+ $this->clear_status();
+ ( new Lock() )->remove( self::LOCK_NAME, true );
+ }
+
+ /**
+ * Clear all the full sync status options.
+ *
+ * @access public
+ */
+ public function clear_status() {
+ \Jetpack_Options::delete_raw_option( self::STATUS_OPTION );
+ }
+
+ /**
+ * Updates the status of the current full sync.
+ *
+ * @access public
+ *
+ * @param array $values New values to set.
+ *
+ * @return bool True if success.
+ */
+ public function update_status( $values ) {
+ return $this->set_status( wp_parse_args( $values, $this->get_status() ) );
+ }
+
+ /**
+ * Retrieve the status of the current full sync.
+ *
+ * @param array $values New values to set.
+ *
+ * @access public
+ *
+ * @return boolean Full sync status.
+ */
+ public function set_status( $values ) {
+ return \Jetpack_Options::update_raw_option( self::STATUS_OPTION, $values );
+ }
+
+ /**
+ * Given an initial Full Sync configuration get the initial status.
+ *
+ * @param array $full_sync_config Full sync configuration.
+ *
+ * @return array Initial Sent status.
+ */
+ public function get_initial_progress( $full_sync_config ) {
+ // 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 );
+ if ( ! $module ) {
+ continue;
+ }
+ $status[ $name ] = array(
+ 'total' => $module->total( $config ),
+ 'sent' => 0,
+ 'finished' => false,
+ );
+ }
+
+ return $status;
+ }
+
+ /**
+ * Get the range for content (posts and comments) to sync.
+ *
+ * @access private
+ *
+ * @return array Array of range (min ID, max ID, total items) for all content types.
+ */
+ private function get_content_range() {
+ $range = array();
+ $config = $this->get_status()['config'];
+ // Add range only when syncing all objects.
+ if ( true === isset( $config['posts'] ) && $config['posts'] ) {
+ $range['posts'] = $this->get_range( 'posts' );
+ }
+
+ if ( true === isset( $config['comments'] ) && $config['comments'] ) {
+ $range['comments'] = $this->get_range( 'comments' );
+ }
+
+ return $range;
+ }
+
+ /**
+ * Get the range (min ID, max ID and total items) of items to sync.
+ *
+ * @access public
+ *
+ * @param string $type Type of sync item to get the range for.
+ *
+ * @return array Array of min ID, max ID and total items in the range.
+ */
+ public function get_range( $type ) {
+ global $wpdb;
+ if ( ! in_array( $type, array( 'comments', 'posts' ), true ) ) {
+ return array();
+ }
+
+ switch ( $type ) {
+ case 'posts':
+ $table = $wpdb->posts;
+ $id = 'ID';
+ $where_sql = Settings::get_blacklisted_post_types_sql();
+
+ break;
+ case 'comments':
+ $table = $wpdb->comments;
+ $id = 'comment_ID';
+ $where_sql = Settings::get_comments_filter_sql();
+ break;
+ }
+
+ // TODO: Call $wpdb->prepare on the following query.
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $results = $wpdb->get_results( "SELECT MAX({$id}) as max, MIN({$id}) as min, COUNT({$id}) as count FROM {$table} WHERE {$where_sql}" );
+ if ( isset( $results[0] ) ) {
+ return $results[0];
+ }
+
+ return array();
+ }
+
+ /**
+ * Continue sending instead of enqueueing.
+ *
+ * @access public
+ */
+ public function continue_enqueuing() {
+ $this->continue_sending();
+ }
+
+ /**
+ * Continue sending.
+ *
+ * @access public
+ */
+ public function continue_sending() {
+ // Return early if Full Sync is not running.
+ if ( ! $this->is_started() || $this->get_status()['finished'] ) {
+ return;
+ }
+
+ // Return early if we've gotten a retry-after header response.
+ $retry_time = get_option( Actions::RETRY_AFTER_PREFIX . 'immediate-send' );
+ if ( $retry_time ) {
+ // If expired delete but don't send. Send will occurr in new request to avoid race conditions.
+ if ( microtime( true ) > $retry_time ) {
+ update_option( Actions::RETRY_AFTER_PREFIX . 'immediate-send', false, false );
+ }
+ return false;
+ }
+
+ // Obtain send Lock.
+ $lock = new Lock();
+ $lock_expiration = $lock->attempt( self::LOCK_NAME );
+
+ // Return if unable to obtain lock.
+ if ( false === $lock_expiration ) {
+ return;
+ }
+
+ // Send Full Sync actions.
+ $success = $this->send();
+
+ // Remove lock.
+ if ( $success ) {
+ $lock->remove( self::LOCK_NAME, $lock_expiration );
+ }
+ }
+
+ /**
+ * Immediately send the next items to full sync.
+ *
+ * @access public
+ */
+ public function send() {
+ $config = $this->get_status()['config'];
+
+ $max_duration = Settings::get_setting( 'full_sync_send_duration' );
+ $send_until = microtime( true ) + $max_duration;
+
+ $progress = $this->get_status()['progress'];
+
+ foreach ( $this->get_remaining_modules_to_send() as $module ) {
+ $progress[ $module->name() ] = $module->send_full_sync_actions( $config[ $module->name() ], $progress[ $module->name() ], $send_until );
+ if ( isset( $progress[ $module->name() ]['error'] ) ) {
+ unset( $progress[ $module->name() ]['error'] );
+ $this->update_status( array( 'progress' => $progress ) );
+ return false;
+ } elseif ( ! $progress[ $module->name() ]['finished'] ) {
+ $this->update_status( array( 'progress' => $progress ) );
+ return true;
+ }
+ }
+
+ $this->send_full_sync_end();
+ $this->update_status( array( 'progress' => $progress ) );
+ return true;
+ }
+
+ /**
+ * Get Modules that are configured to Full Sync and haven't finished sending
+ *
+ * @return array
+ */
+ public function get_remaining_modules_to_send() {
+ $status = $this->get_status();
+
+ return array_filter(
+ Modules::get_modules(),
+ /**
+ * Select configured and not finished modules.
+ *
+ * @return bool
+ * @var $module Module
+ */
+ function ( $module ) use ( $status ) {
+ // Skip module if not configured for this sync or module is done.
+ if ( ! isset( $status['config'][ $module->name() ] ) ) {
+ return false;
+ }
+ if ( ! $status['config'][ $module->name() ] ) {
+ return false;
+ }
+ if ( isset( $status['progress'][ $module->name() ]['finished'] ) ) {
+ if ( true === $status['progress'][ $module->name() ]['finished'] ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ );
+ }
+
+ /**
+ * Send 'jetpack_full_sync_end' and update 'finished' status.
+ *
+ * @access public
+ */
+ public function send_full_sync_end() {
+ $range = $this->get_content_range();
+
+ /**
+ * Fires when a full sync ends. This action is serialized
+ * and sent to the server.
+ *
+ * @param string $checksum Deprecated since 7.3.0 - @see https://github.com/Automattic/jetpack/pull/11945/
+ * @param array $range Range of the sync items, containing min and max IDs for some item types.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ * @since-jetpack 7.3.0 Added $range arg.
+ */
+ do_action( 'jetpack_full_sync_end', '', $range );
+ $this->send_action( 'jetpack_full_sync_end', array( '', $range ) );
+
+ // Setting autoload to true means that it's faster to check whether we should continue enqueuing.
+ $this->update_status( array( 'finished' => time() ) );
+ }
+
+ /**
+ * Empty Function as we don't close buffers on Immediate Full Sync.
+ *
+ * @param array $actions an array of actions, ignored for queueless sync.
+ */
+ public function update_sent_progress_action( $actions ) { } // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php
new file mode 100644
index 00000000..a03506e5
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php
@@ -0,0 +1,729 @@
+is_started() && ! $this->is_finished();
+
+ // Remove all evidence of previous full sync items and status.
+ $this->reset_data();
+
+ if ( $was_already_running ) {
+ /**
+ * Fires when a full sync is cancelled.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ */
+ do_action( 'jetpack_full_sync_cancelled' );
+ }
+
+ $this->update_status_option( 'started', time() );
+ $this->update_status_option( 'params', $module_configs );
+
+ $enqueue_status = array();
+ $full_sync_config = array();
+ $include_empty = false;
+ $empty = array();
+
+ // Default value is full sync.
+ if ( ! is_array( $module_configs ) ) {
+ $module_configs = array();
+ $include_empty = true;
+ foreach ( Modules::get_modules() as $module ) {
+ $module_configs[ $module->name() ] = true;
+ }
+ }
+
+ // Set default configuration, calculate totals, and save configuration if totals > 0.
+ foreach ( Modules::get_modules() as $module ) {
+ $module_name = $module->name();
+ $module_config = isset( $module_configs[ $module_name ] ) ? $module_configs[ $module_name ] : false;
+
+ if ( ! $module_config ) {
+ continue;
+ }
+
+ if ( 'users' === $module_name && 'initial' === $module_config ) {
+ $module_config = $module->get_initial_sync_user_config();
+ }
+
+ $enqueue_status[ $module_name ] = false;
+
+ $total_items = $module->estimate_full_sync_actions( $module_config );
+
+ // If there's information to process, configure this module.
+ if ( $total_items !== null && $total_items > 0 ) {
+ $full_sync_config[ $module_name ] = $module_config;
+ $enqueue_status[ $module_name ] = array(
+ $total_items, // Total.
+ 0, // Queued.
+ false, // Current state.
+ );
+ } elseif ( $include_empty && 0 === $total_items ) {
+ $empty[ $module_name ] = true;
+ }
+ }
+
+ $this->set_config( $full_sync_config );
+ $this->set_enqueue_status( $enqueue_status );
+
+ $range = $this->get_content_range( $full_sync_config );
+ /**
+ * Fires when a full sync begins. This action is serialized
+ * and sent to the server so that it knows a full sync is coming.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ * @since-jetpack 7.3.0 Added $range arg.
+ * @since-jetpack 7.4.0 Added $empty arg.
+ *
+ * @param array $full_sync_config Sync configuration for all sync modules.
+ * @param array $range Range of the sync items, containing min and max IDs for some item types.
+ * @param array $empty The modules with no items to sync during a full sync.
+ */
+ do_action( 'jetpack_full_sync_start', $full_sync_config, $range, $empty );
+
+ $this->continue_enqueuing( $full_sync_config );
+
+ return true;
+ }
+
+ /**
+ * Enqueue the next items to sync.
+ *
+ * @access public
+ *
+ * @param array $configs Full sync configuration for all sync modules.
+ */
+ public function continue_enqueuing( $configs = null ) {
+ // Return early if not in progress.
+ if ( ! $this->get_status_option( 'started' ) || $this->get_status_option( 'queue_finished' ) ) {
+ return;
+ }
+
+ // Attempt to obtain lock.
+ $lock = new Lock();
+ $lock_expiration = $lock->attempt( self::ENQUEUE_LOCK_NAME );
+
+ // Return if unable to obtain lock.
+ if ( false === $lock_expiration ) {
+ return;
+ }
+
+ // enqueue full sync actions.
+ $this->enqueue( $configs );
+
+ // Remove lock.
+ $lock->remove( self::ENQUEUE_LOCK_NAME, $lock_expiration );
+ }
+
+ /**
+ * Get Modules that are configured to Full Sync and haven't finished enqueuing
+ *
+ * @param array $configs Full sync configuration for all sync modules.
+ *
+ * @return array
+ */
+ public function get_remaining_modules_to_enqueue( $configs ) {
+ $enqueue_status = $this->get_enqueue_status();
+ return array_filter(
+ Modules::get_modules(),
+ /**
+ * Select configured and not finished modules.
+ *
+ * @var $module Module
+ * @return bool
+ */
+ function ( $module ) use ( $configs, $enqueue_status ) {
+ // Skip module if not configured for this sync or module is done.
+ if ( ! isset( $configs[ $module->name() ] ) ) {
+ return false;
+ }
+ if ( ! $configs[ $module->name() ] ) {
+ return false;
+ }
+ if ( isset( $enqueue_status[ $module->name() ][2] ) ) {
+ if ( true === $enqueue_status[ $module->name() ][2] ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ );
+ }
+
+ /**
+ * Enqueue the next items to sync.
+ *
+ * @access public
+ *
+ * @param array $configs Full sync configuration for all sync modules.
+ */
+ public function enqueue( $configs = null ) {
+ if ( ! $configs ) {
+ $configs = $this->get_config();
+ }
+
+ $enqueue_status = $this->get_enqueue_status();
+ $full_sync_queue = new Queue( 'full_sync' );
+ $available_queue_slots = Settings::get_setting( 'max_queue_size_full_sync' ) - $full_sync_queue->size();
+
+ if ( $available_queue_slots <= 0 ) {
+ return;
+ }
+
+ $remaining_items_to_enqueue = min( Settings::get_setting( 'max_enqueue_full_sync' ), $available_queue_slots );
+
+ /**
+ * If a module exits early (e.g. because it ran out of full sync queue slots, or we ran out of request time)
+ * then it should exit early
+ */
+ foreach ( $this->get_remaining_modules_to_enqueue( $configs ) as $module ) {
+ list( $items_enqueued, $next_enqueue_state ) = $module->enqueue_full_sync_actions( $configs[ $module->name() ], $remaining_items_to_enqueue, $enqueue_status[ $module->name() ][2] );
+
+ $enqueue_status[ $module->name() ][2] = $next_enqueue_state;
+
+ // If items were processed, subtract them from the limit.
+ if ( $items_enqueued !== null && $items_enqueued > 0 ) {
+ $enqueue_status[ $module->name() ][1] += $items_enqueued;
+ $remaining_items_to_enqueue -= $items_enqueued;
+ }
+
+ if ( 0 >= $remaining_items_to_enqueue || true !== $next_enqueue_state ) {
+ $this->set_enqueue_status( $enqueue_status );
+ return;
+ }
+ }
+
+ $this->queue_full_sync_end( $configs );
+ $this->set_enqueue_status( $enqueue_status );
+ }
+
+ /**
+ * Enqueue 'jetpack_full_sync_end' and update 'queue_finished' status.
+ *
+ * @access public
+ *
+ * @param array $configs Full sync configuration for all sync modules.
+ */
+ public function queue_full_sync_end( $configs ) {
+ $range = $this->get_content_range( $configs );
+
+ /**
+ * Fires when a full sync ends. This action is serialized
+ * and sent to the server.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ * @since-jetpack 7.3.0 Added $range arg.
+ *
+ * @param string $checksum Deprecated since 7.3.0 - @see https://github.com/Automattic/jetpack/pull/11945/
+ * @param array $range Range of the sync items, containing min and max IDs for some item types.
+ */
+ do_action( 'jetpack_full_sync_end', '', $range );
+
+ // Setting autoload to true means that it's faster to check whether we should continue enqueuing.
+ $this->update_status_option( 'queue_finished', time(), true );
+ }
+
+ /**
+ * Get the range (min ID, max ID and total items) of items to sync.
+ *
+ * @access public
+ *
+ * @param string $type Type of sync item to get the range for.
+ * @return array Array of min ID, max ID and total items in the range.
+ */
+ public function get_range( $type ) {
+ global $wpdb;
+ if ( ! in_array( $type, array( 'comments', 'posts' ), true ) ) {
+ return array();
+ }
+
+ switch ( $type ) {
+ case 'posts':
+ $table = $wpdb->posts;
+ $id = 'ID';
+ $where_sql = Settings::get_blacklisted_post_types_sql();
+
+ break;
+ case 'comments':
+ $table = $wpdb->comments;
+ $id = 'comment_ID';
+ $where_sql = Settings::get_comments_filter_sql();
+ break;
+ }
+
+ // TODO: Call $wpdb->prepare on the following query.
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $results = $wpdb->get_results( "SELECT MAX({$id}) as max, MIN({$id}) as min, COUNT({$id}) as count FROM {$table} WHERE {$where_sql}" );
+ if ( isset( $results[0] ) ) {
+ return $results[0];
+ }
+
+ return array();
+ }
+
+ /**
+ * Get the range for content (posts and comments) to sync.
+ *
+ * @access private
+ *
+ * @param array $config Full sync configuration for this all sync modules.
+ * @return array Array of range (min ID, max ID, total items) for all content types.
+ */
+ private function get_content_range( $config ) {
+ $range = array();
+ // Only when we are sending the whole range do we want to send also the range.
+ if ( true === isset( $config['posts'] ) && $config['posts'] ) {
+ $range['posts'] = $this->get_range( 'posts' );
+ }
+
+ if ( true === isset( $config['comments'] ) && $config['comments'] ) {
+ $range['comments'] = $this->get_range( 'comments' );
+ }
+ return $range;
+ }
+
+ /**
+ * Update the progress after sync modules actions have been processed on the server.
+ *
+ * @access public
+ *
+ * @param array $actions Actions that have been processed on the server.
+ */
+ public function update_sent_progress_action( $actions ) {
+ // Quick way to map to first items with an array of arrays.
+ $actions_with_counts = array_count_values( array_filter( array_map( array( $this, 'get_action_name' ), $actions ) ) );
+
+ // Total item counts for each action.
+ $actions_with_total_counts = $this->get_actions_totals( $actions );
+
+ if ( ! $this->is_started() || $this->is_finished() ) {
+ return;
+ }
+
+ if ( isset( $actions_with_counts['jetpack_full_sync_start'] ) ) {
+ $this->update_status_option( 'send_started', time() );
+ }
+
+ foreach ( Modules::get_modules() as $module ) {
+ $module_actions = $module->get_full_sync_actions();
+ $status_option_name = "{$module->name()}_sent";
+ $total_option_name = "{$status_option_name}_total";
+ $items_sent = $this->get_status_option( $status_option_name, 0 );
+ $items_sent_total = $this->get_status_option( $total_option_name, 0 );
+
+ foreach ( $module_actions as $module_action ) {
+ if ( isset( $actions_with_counts[ $module_action ] ) ) {
+ $items_sent += $actions_with_counts[ $module_action ];
+ }
+
+ if ( ! empty( $actions_with_total_counts[ $module_action ] ) ) {
+ $items_sent_total += $actions_with_total_counts[ $module_action ];
+ }
+ }
+
+ if ( $items_sent > 0 ) {
+ $this->update_status_option( $status_option_name, $items_sent );
+ }
+
+ if ( 0 !== $items_sent_total ) {
+ $this->update_status_option( $total_option_name, $items_sent_total );
+ }
+ }
+
+ if ( isset( $actions_with_counts['jetpack_full_sync_end'] ) ) {
+ $this->update_status_option( 'finished', time() );
+ }
+ }
+
+ /**
+ * Returns the progress percentage of a full sync.
+ *
+ * @access public
+ *
+ * @return int|null
+ */
+ public function get_sync_progress_percentage() {
+ if ( ! $this->is_started() || $this->is_finished() ) {
+ return null;
+ }
+ $status = $this->get_status();
+ if ( ! $status['queue'] || ! $status['sent'] || ! $status['total'] ) {
+ return null;
+ }
+ $queued_multiplier = 0.1;
+ $sent_multiplier = 0.9;
+ $count_queued = array_reduce(
+ $status['queue'],
+ function ( $sum, $value ) {
+ return $sum + $value;
+ },
+ 0
+ );
+ $count_sent = array_reduce(
+ $status['sent'],
+ function ( $sum, $value ) {
+ return $sum + $value;
+ },
+ 0
+ );
+ $count_total = array_reduce(
+ $status['total'],
+ function ( $sum, $value ) {
+ return $sum + $value;
+ },
+ 0
+ );
+ $percent_queued = ( $count_queued / $count_total ) * $queued_multiplier * 100;
+ $percent_sent = ( $count_sent / $count_total ) * $sent_multiplier * 100;
+ return ceil( $percent_queued + $percent_sent );
+ }
+
+ /**
+ * Get the name of the action for an item in the sync queue.
+ *
+ * @access public
+ *
+ * @param array $queue_item Item of the sync queue.
+ * @return string|boolean Name of the action, false if queue item is invalid.
+ */
+ public function get_action_name( $queue_item ) {
+ if ( is_array( $queue_item ) && isset( $queue_item[0] ) ) {
+ return $queue_item[0];
+ }
+ return false;
+ }
+
+ /**
+ * Retrieve the total number of items we're syncing in a particular queue item (action).
+ * `$queue_item[1]` is expected to contain chunks of items, and `$queue_item[1][0]`
+ * represents the first (and only) chunk of items to sync in that action.
+ *
+ * @access public
+ *
+ * @param array $queue_item Item of the sync queue that corresponds to a particular action.
+ * @return int Total number of items in the action.
+ */
+ public function get_action_totals( $queue_item ) {
+ if ( is_array( $queue_item ) && isset( $queue_item[1][0] ) ) {
+ if ( is_array( $queue_item[1][0] ) ) {
+ // Let's count the items we sync in this action.
+ return count( $queue_item[1][0] );
+ }
+ // -1 indicates that this action syncs all items by design.
+ return -1;
+ }
+ return 0;
+ }
+
+ /**
+ * Retrieve the total number of items for a set of actions, grouped by action name.
+ *
+ * @access public
+ *
+ * @param array $actions An array of actions.
+ * @return array An array, representing the total number of items, grouped per action.
+ */
+ public function get_actions_totals( $actions ) {
+ $totals = array();
+
+ foreach ( $actions as $action ) {
+ $name = $this->get_action_name( $action );
+ $action_totals = $this->get_action_totals( $action );
+ if ( ! isset( $totals[ $name ] ) ) {
+ $totals[ $name ] = 0;
+ }
+ $totals[ $name ] += $action_totals;
+ }
+
+ return $totals;
+ }
+
+ /**
+ * Whether full sync has started.
+ *
+ * @access public
+ *
+ * @return boolean
+ */
+ public function is_started() {
+ return (bool) $this->get_status_option( 'started' );
+ }
+
+ /**
+ * Whether full sync has finished.
+ *
+ * @access public
+ *
+ * @return boolean
+ */
+ public function is_finished() {
+ return (bool) $this->get_status_option( 'finished' );
+ }
+
+ /**
+ * Retrieve the status of the current full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync status.
+ */
+ public function get_status() {
+ $status = array(
+ 'started' => $this->get_status_option( 'started' ),
+ 'queue_finished' => $this->get_status_option( 'queue_finished' ),
+ 'send_started' => $this->get_status_option( 'send_started' ),
+ 'finished' => $this->get_status_option( 'finished' ),
+ 'sent' => array(),
+ 'sent_total' => array(),
+ 'queue' => array(),
+ 'config' => $this->get_status_option( 'params' ),
+ 'total' => array(),
+ );
+
+ $enqueue_status = $this->get_enqueue_status();
+
+ foreach ( Modules::get_modules() as $module ) {
+ $name = $module->name();
+
+ if ( ! isset( $enqueue_status[ $name ] ) ) {
+ continue;
+ }
+
+ list( $total, $queued ) = $enqueue_status[ $name ];
+
+ if ( $total ) {
+ $status['total'][ $name ] = $total;
+ }
+
+ if ( $queued ) {
+ $status['queue'][ $name ] = $queued;
+ }
+
+ $sent = $this->get_status_option( "{$name}_sent" );
+ if ( $sent ) {
+ $status['sent'][ $name ] = $sent;
+ }
+
+ $sent_total = $this->get_status_option( "{$name}_sent_total" );
+ if ( $sent_total ) {
+ $status['sent_total'][ $name ] = $sent_total;
+ }
+ }
+
+ return $status;
+ }
+
+ /**
+ * Clear all the full sync status options.
+ *
+ * @access public
+ */
+ public function clear_status() {
+ $prefix = self::STATUS_OPTION_PREFIX;
+ \Jetpack_Options::delete_raw_option( "{$prefix}_started" );
+ \Jetpack_Options::delete_raw_option( "{$prefix}_params" );
+ \Jetpack_Options::delete_raw_option( "{$prefix}_queue_finished" );
+ \Jetpack_Options::delete_raw_option( "{$prefix}_send_started" );
+ \Jetpack_Options::delete_raw_option( "{$prefix}_finished" );
+
+ $this->delete_enqueue_status();
+
+ foreach ( Modules::get_modules() as $module ) {
+ \Jetpack_Options::delete_raw_option( "{$prefix}_{$module->name()}_sent" );
+ \Jetpack_Options::delete_raw_option( "{$prefix}_{$module->name()}_sent_total" );
+ }
+ }
+
+ /**
+ * Clear all the full sync data.
+ *
+ * @access public
+ */
+ public function reset_data() {
+ $this->clear_status();
+ $this->delete_config();
+ ( new Lock() )->remove( self::ENQUEUE_LOCK_NAME, true );
+
+ $listener = Listener::get_instance();
+ $listener->get_full_sync_queue()->reset();
+ }
+
+ /**
+ * Get the value of a full sync status option.
+ *
+ * @access private
+ *
+ * @param string $name Name of the option.
+ * @param mixed $default Default value of the option.
+ * @return mixed Option value.
+ */
+ private function get_status_option( $name, $default = null ) {
+ $value = \Jetpack_Options::get_raw_option( self::STATUS_OPTION_PREFIX . "_$name", $default );
+
+ return is_numeric( $value ) ? (int) $value : $value;
+ }
+
+ /**
+ * Update the value of a full sync status option.
+ *
+ * @access private
+ *
+ * @param string $name Name of the option.
+ * @param mixed $value Value of the option.
+ * @param boolean $autoload Whether the option should be autoloaded at the beginning of the request.
+ */
+ private function update_status_option( $name, $value, $autoload = false ) {
+ \Jetpack_Options::update_raw_option( self::STATUS_OPTION_PREFIX . "_$name", $value, $autoload );
+ }
+
+ /**
+ * Set the full sync enqueue status.
+ *
+ * @access private
+ *
+ * @param array $new_status The new full sync enqueue status.
+ */
+ private function set_enqueue_status( $new_status ) {
+ \Jetpack_Options::update_raw_option( 'jetpack_sync_full_enqueue_status', $new_status );
+ }
+
+ /**
+ * Delete full sync enqueue status.
+ *
+ * @access private
+ *
+ * @return boolean Whether the status was deleted.
+ */
+ private function delete_enqueue_status() {
+ return \Jetpack_Options::delete_raw_option( 'jetpack_sync_full_enqueue_status' );
+ }
+
+ /**
+ * Retrieve the current full sync enqueue status.
+ *
+ * @access private
+ *
+ * @return array Full sync enqueue status.
+ */
+ public function get_enqueue_status() {
+ return \Jetpack_Options::get_raw_option( 'jetpack_sync_full_enqueue_status' );
+ }
+
+ /**
+ * Set the full sync enqueue configuration.
+ *
+ * @access private
+ *
+ * @param array $config The new full sync enqueue configuration.
+ */
+ private function set_config( $config ) {
+ \Jetpack_Options::update_raw_option( 'jetpack_sync_full_config', $config );
+ }
+
+ /**
+ * Delete full sync configuration.
+ *
+ * @access private
+ *
+ * @return boolean Whether the configuration was deleted.
+ */
+ private function delete_config() {
+ return \Jetpack_Options::delete_raw_option( 'jetpack_sync_full_config' );
+ }
+
+ /**
+ * Retrieve the current full sync enqueue config.
+ *
+ * @access private
+ *
+ * @return array Full sync enqueue config.
+ */
+ private function get_config() {
+ return \Jetpack_Options::get_raw_option( 'jetpack_sync_full_config' );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-import.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-import.php
new file mode 100644
index 00000000..f5f8543a
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-import.php
@@ -0,0 +1,220 @@
+ 'jetpack_sync_import_start',
+ 'import_done' => 'jetpack_sync_import_end',
+ 'import_end' => 'jetpack_sync_import_end',
+ );
+
+ /**
+ * Sync module name.
+ *
+ * @access public
+ *
+ * @return string
+ */
+ public function name() {
+ return 'import';
+ }
+
+ /**
+ * Initialize imports action listeners.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_listeners( $callable ) {
+ add_action( 'export_wp', $callable );
+ add_action( 'jetpack_sync_import_start', $callable, 10, 2 );
+ add_action( 'jetpack_sync_import_end', $callable, 10, 2 );
+
+ // WordPress.
+ add_action( 'import_start', array( $this, 'sync_import_action' ) );
+
+ // Movable type, RSS, Livejournal.
+ add_action( 'import_done', array( $this, 'sync_import_action' ) );
+
+ // WordPress, Blogger, Livejournal, woo tax rate.
+ add_action( 'import_end', array( $this, 'sync_import_action' ) );
+ }
+
+ /**
+ * Set module defaults.
+ * Define an empty list of synced actions for us to fill later.
+ *
+ * @access public
+ */
+ public function set_defaults() {
+ $this->synced_actions = array();
+ }
+
+ /**
+ * Generic handler for import actions.
+ *
+ * @access public
+ *
+ * @param string $importer Either a string reported by the importer, the class name of the importer, or 'unknown'.
+ */
+ public function sync_import_action( $importer ) {
+ $import_action = current_filter();
+ // Map action to event name.
+ $sync_action = self::$import_sync_action_map[ $import_action ];
+
+ // Only sync each action once per import.
+ if ( array_key_exists( $sync_action, $this->synced_actions ) && $this->synced_actions[ $sync_action ] ) {
+ return;
+ }
+
+ // Mark this action as synced.
+ $this->synced_actions[ $sync_action ] = true;
+
+ // Prefer self-reported $importer value.
+ if ( ! $importer ) {
+ // Fall back to inferring by calling class name.
+ $importer = self::get_calling_importer_class();
+ }
+
+ // Get $importer from known_importers.
+ $known_importers = Settings::get_setting( 'known_importers' );
+ if ( is_string( $importer ) && isset( $known_importers[ $importer ] ) ) {
+ $importer = $known_importers[ $importer ];
+ }
+
+ $importer_name = $this->get_importer_name( $importer );
+
+ switch ( $sync_action ) {
+ case 'jetpack_sync_import_start':
+ /**
+ * Used for syncing the start of an import
+ *
+ * @since 1.6.3
+ * @since-jetpack 7.3.0
+ *
+ * @module sync
+ *
+ * @param string $importer Either a string reported by the importer, the class name of the importer, or 'unknown'.
+ * @param string $importer_name The name reported by the importer, or 'Unknown Importer'.
+ */
+ do_action( 'jetpack_sync_import_start', $importer, $importer_name );
+ break;
+
+ case 'jetpack_sync_import_end':
+ /**
+ * Used for syncing the end of an import
+ *
+ * @since 1.6.3
+ * @since-jetpack 7.3.0
+ *
+ * @module sync
+ *
+ * @param string $importer Either a string reported by the importer, the class name of the importer, or 'unknown'.
+ * @param string $importer_name The name reported by the importer, or 'Unknown Importer'.
+ */
+ do_action( 'jetpack_sync_import_end', $importer, $importer_name );
+ break;
+ }
+ }
+
+ /**
+ * Retrieve the name of the importer.
+ *
+ * @access private
+ *
+ * @param string $importer Either a string reported by the importer, the class name of the importer, or 'unknown'.
+ * @return string Name of the importer, or "Unknown Importer" if importer is unknown.
+ */
+ private function get_importer_name( $importer ) {
+ $importers = get_importers();
+ return isset( $importers[ $importer ] ) ? $importers[ $importer ][0] : 'Unknown Importer';
+ }
+
+ /**
+ * Determine the class that extends `WP_Importer` which is responsible for
+ * the current action. Designed to be used within an action handler.
+ *
+ * @access private
+ * @static
+ *
+ * @return string The name of the calling class, or 'unknown'.
+ */
+ private static function get_calling_importer_class() {
+ // If WP_Importer doesn't exist, neither will any importer that extends it.
+ if ( ! class_exists( 'WP_Importer', false ) ) {
+ return 'unknown';
+ }
+
+ $action = current_filter();
+ $backtrace = debug_backtrace( false ); //phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
+
+ $do_action_pos = -1;
+ $backtrace_len = count( $backtrace );
+ for ( $i = 0; $i < $backtrace_len; $i++ ) {
+ // Find the location in the stack of the calling action.
+ if ( 'do_action' === $backtrace[ $i ]['function'] && $action === $backtrace[ $i ]['args'][0] ) {
+ $do_action_pos = $i;
+ break;
+ }
+ }
+
+ // If the action wasn't called, the calling class is unknown.
+ if ( -1 === $do_action_pos ) {
+ return 'unknown';
+ }
+
+ // Continue iterating the stack looking for a caller that extends WP_Importer.
+ for ( $i = $do_action_pos + 1; $i < $backtrace_len; $i++ ) {
+ // If there is no class on the trace, continue.
+ if ( ! isset( $backtrace[ $i ]['class'] ) ) {
+ continue;
+ }
+
+ $class_name = $backtrace[ $i ]['class'];
+
+ // Check if the class extends WP_Importer.
+ if ( class_exists( $class_name, false ) ) {
+ $parents = class_parents( $class_name, false );
+ if ( $parents && in_array( 'WP_Importer', $parents, true ) ) {
+ return $class_name;
+ }
+ }
+ }
+
+ // If we've exhausted the stack without a match, the calling class is unknown.
+ return 'unknown';
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-menus.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-menus.php
new file mode 100644
index 00000000..bf6c5620
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-menus.php
@@ -0,0 +1,146 @@
+nav_items_just_added[] = $nav_item_id;
+ /**
+ * Helps sync log that a new menu item was added.
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.0.0
+ *
+ * @param int $menu_id ID of the menu.
+ * @param array $menu_data An array of menu data.
+ * @param int $nav_item_id ID of the new menu item.
+ * @param array $nav_item_args Arguments used to add the menu item.
+ */
+ do_action( 'jetpack_sync_updated_nav_menu_add_item', $menu_id, $menu_data, $nav_item_id, $nav_item_args );
+ }
+
+ /**
+ * Nav menu item update handler.
+ *
+ * @access public
+ *
+ * @param int $menu_id ID of the menu.
+ * @param int $nav_item_id ID of the new menu item.
+ * @param array $nav_item_args Arguments used to update the menu item.
+ */
+ public function update_nav_menu_update_item( $menu_id, $nav_item_id, $nav_item_args ) {
+ if ( in_array( $nav_item_id, $this->nav_items_just_added, true ) ) {
+ return;
+ }
+ $menu_data = wp_get_nav_menu_object( $menu_id );
+ /**
+ * Helps sync log that an update to the menu item happened.
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.0.0
+ *
+ * @param int $menu_id ID of the menu.
+ * @param array $menu_data An array of menu data.
+ * @param int $nav_item_id ID of the new menu item.
+ * @param array $nav_item_args Arguments used to update the menu item.
+ */
+ do_action( 'jetpack_sync_updated_nav_menu_update_item', $menu_id, $menu_data, $nav_item_id, $nav_item_args );
+ }
+
+ /**
+ * Remove menu items that have already been saved from the "just added" list.
+ *
+ * @access public
+ *
+ * @param int $nav_item_id ID of the new menu item.
+ * @param \WP_Post $post_after Nav menu item post object after the update.
+ */
+ public function remove_just_added_menu_item( $nav_item_id, $post_after ) {
+ if ( 'nav_menu_item' !== $post_after->post_type ) {
+ return;
+ }
+ $this->nav_items_just_added = array_diff( $this->nav_items_just_added, array( $nav_item_id ) );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-meta.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-meta.php
new file mode 100644
index 00000000..de293a9b
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-meta.php
@@ -0,0 +1,112 @@
+prepare call to use placeholders.
+ *
+ * @param string $object_type The type of object for which we retrieve meta. Either 'post' or 'comment'.
+ * @param array $config Must include 'meta_key' and 'ids' keys.
+ *
+ * @return array
+ */
+ public function get_objects_by_id( $object_type, $config ) {
+ $table = _get_meta_table( $object_type );
+
+ if ( ! $table ) {
+ return array();
+ }
+
+ if ( ! is_array( $config ) ) {
+ return array();
+ }
+
+ $meta_objects = array();
+ foreach ( $config as $item ) {
+ $meta = null;
+ if ( isset( $item['id'] ) && isset( $item['meta_key'] ) ) {
+ $meta = $this->get_object_by_id( $object_type, (int) $item['id'], (string) $item['meta_key'] );
+ }
+ $meta_objects[ $item['id'] . '-' . $item['meta_key'] ] = $meta;
+ }
+
+ return $meta_objects;
+ }
+
+ /**
+ * Get a single Meta Result.
+ *
+ * @param string $object_type post, comment, term, user.
+ * @param null $id Object ID.
+ * @param null $meta_key Meta Key.
+ *
+ * @return mixed|null
+ */
+ public function get_object_by_id( $object_type, $id = null, $meta_key = null ) {
+ global $wpdb;
+
+ if ( ! is_int( $id ) || ! is_string( $meta_key ) ) {
+ return null;
+ }
+
+ $table = _get_meta_table( $object_type );
+ $object_id_column = $object_type . '_id';
+
+ // Sanitize so that the array only has integer values.
+ $meta = $wpdb->get_results(
+ $wpdb->prepare(
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ "SELECT * FROM {$table} WHERE {$object_id_column} = %d AND meta_key = %s",
+ $id,
+ $meta_key
+ ),
+ ARRAY_A
+ );
+
+ $meta_objects = null;
+
+ if ( ! is_wp_error( $meta ) && ! empty( $meta ) ) {
+ foreach ( $meta as $meta_entry ) {
+ if ( 'post' === $object_type && strlen( $meta_entry['meta_value'] ) >= Posts::MAX_POST_META_LENGTH ) {
+ $meta_entry['meta_value'] = '';
+ }
+ $meta_objects[] = array(
+ 'meta_type' => $object_type,
+ 'meta_id' => $meta_entry['meta_id'],
+ 'meta_key' => $meta_key,
+ 'meta_value' => $meta_entry['meta_value'],
+ 'object_id' => $meta_entry[ $object_id_column ],
+ );
+ }
+ }
+
+ return $meta_objects;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-module.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-module.php
new file mode 100644
index 00000000..90ec9ffc
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-module.php
@@ -0,0 +1,603 @@
+recursive_ksort( $values );
+ }
+ return crc32( wp_json_encode( Functions::json_wrap( $values ) ) );
+ }
+
+ /**
+ * Recursively call ksort on an Array
+ *
+ * @param array $values Array.
+ */
+ private function recursive_ksort( &$values ) {
+ ksort( $values );
+ foreach ( $values as &$value ) {
+ if ( is_array( $value ) ) {
+ $this->recursive_ksort( $value );
+ }
+ }
+ }
+
+ /**
+ * Whether a particular checksum in a set of checksums is valid.
+ *
+ * @access protected
+ *
+ * @param array $sums_to_check Array of checksums.
+ * @param string $name Name of the checksum.
+ * @param int $new_sum Checksum to compare against.
+ * @return boolean Whether the checksum is valid.
+ */
+ protected function still_valid_checksum( $sums_to_check, $name, $new_sum ) {
+ if ( isset( $sums_to_check[ $name ] ) && $sums_to_check[ $name ] === $new_sum ) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Enqueue all items of a sync type as an action.
+ *
+ * @access protected
+ *
+ * @param string $action_name Name of the action.
+ * @param string $table_name Name of the database table.
+ * @param string $id_field Name of the ID field in the database.
+ * @param string $where_sql The SQL WHERE clause to filter to the desired items.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue in the same time.
+ * @param boolean $state Whether enqueueing has finished.
+ * @return array Array, containing the number of chunks and TRUE, indicating enqueueing has finished.
+ */
+ protected function enqueue_all_ids_as_action( $action_name, $table_name, $id_field, $where_sql, $max_items_to_enqueue, $state ) {
+ global $wpdb;
+
+ if ( ! $where_sql ) {
+ $where_sql = '1 = 1';
+ }
+
+ $items_per_page = 1000;
+ $page = 1;
+ $chunk_count = 0;
+ $previous_interval_end = $state ? $state : '~0';
+ $listener = Listener::get_instance();
+
+ // Count down from max_id to min_id so we get newest posts/comments/etc first.
+ // phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ while ( $ids = $wpdb->get_col( "SELECT {$id_field} FROM {$table_name} WHERE {$where_sql} AND {$id_field} < {$previous_interval_end} ORDER BY {$id_field} DESC LIMIT {$items_per_page}" ) ) {
+ // Request posts in groups of N for efficiency.
+ $chunked_ids = array_chunk( $ids, self::ARRAY_CHUNK_SIZE );
+
+ // If we hit our row limit, process and return.
+ if ( $chunk_count + count( $chunked_ids ) >= $max_items_to_enqueue ) {
+ $remaining_items_count = $max_items_to_enqueue - $chunk_count;
+ $remaining_items = array_slice( $chunked_ids, 0, $remaining_items_count );
+ $remaining_items_with_previous_interval_end = $this->get_chunks_with_preceding_end( $remaining_items, $previous_interval_end );
+ $listener->bulk_enqueue_full_sync_actions( $action_name, $remaining_items_with_previous_interval_end );
+
+ $last_chunk = end( $remaining_items );
+ return array( $remaining_items_count + $chunk_count, end( $last_chunk ) );
+ }
+ $chunked_ids_with_previous_end = $this->get_chunks_with_preceding_end( $chunked_ids, $previous_interval_end );
+
+ $listener->bulk_enqueue_full_sync_actions( $action_name, $chunked_ids_with_previous_end );
+
+ $chunk_count += count( $chunked_ids );
+ ++$page;
+ // The $ids are ordered in descending order.
+ $previous_interval_end = end( $ids );
+ }
+
+ if ( $wpdb->last_error ) {
+ // return the values that were passed in so all these chunks get retried.
+ return array( $max_items_to_enqueue, $state );
+ }
+
+ return array( $chunk_count, true );
+ }
+
+ /**
+ * Given the Module Full Sync Configuration and Status return the next chunk of items to send.
+ *
+ * @param array $config This module Full Sync configuration.
+ * @param array $status This module Full Sync status.
+ * @param int $chunk_size Chunk size.
+ *
+ * @return array|object|null
+ */
+ public function get_next_chunk( $config, $status, $chunk_size ) {
+ // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ global $wpdb;
+ return $wpdb->get_col(
+ <<id_field()}
+FROM {$wpdb->{$this->table_name()}}
+WHERE {$this->get_where_sql( $config )}
+AND {$this->id_field()} < {$status['last_sent']}
+ORDER BY {$this->id_field()}
+DESC LIMIT {$chunk_size}
+SQL
+ );
+ // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ }
+
+ /**
+ * Return the initial last sent object.
+ *
+ * @return string|array initial status.
+ */
+ public function get_initial_last_sent() {
+ return '~0';
+ }
+
+ /**
+ * Immediately send all items of a sync type as an action.
+ *
+ * @access protected
+ *
+ * @param string $config Full sync configuration for this module.
+ * @param array $status the current module full sync status.
+ * @param float $send_until timestamp until we want this request to send full sync events.
+ *
+ * @return array Status, the module full sync status updated.
+ */
+ public function send_full_sync_actions( $config, $status, $send_until ) {
+ global $wpdb;
+
+ if ( empty( $status['last_sent'] ) ) {
+ $status['last_sent'] = $this->get_initial_last_sent();
+ }
+
+ $limits = Settings::get_setting( 'full_sync_limits' )[ $this->name() ];
+
+ $chunks_sent = 0;
+ // phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition
+ while ( $objects = $this->get_next_chunk( $config, $status, $limits['chunk_size'] ) ) {
+ if ( $chunks_sent++ === $limits['max_chunks'] || microtime( true ) >= $send_until ) {
+ return $status;
+ }
+
+ $result = $this->send_action( 'jetpack_full_sync_' . $this->name(), array( $objects, $status['last_sent'] ) );
+
+ if ( is_wp_error( $result ) || $wpdb->last_error ) {
+ $status['error'] = true;
+ return $status;
+ }
+ // The $ids are ordered in descending order.
+ $status['last_sent'] = end( $objects );
+ $status['sent'] += count( $objects );
+ }
+
+ if ( ! $wpdb->last_error ) {
+ $status['finished'] = true;
+ }
+
+ return $status;
+ }
+
+ /**
+ * Immediately sends a single item without firing or enqueuing it
+ *
+ * @param string $action_name The action.
+ * @param array $data The data associated with the action.
+ */
+ public function send_action( $action_name, $data = null ) {
+ $sender = Sender::get_instance();
+ return $sender->send_action( $action_name, $data );
+ }
+
+ /**
+ * Retrieve chunk IDs with previous interval end.
+ *
+ * @access protected
+ *
+ * @param array $chunks All remaining items.
+ * @param int $previous_interval_end The last item from the previous interval.
+ * @return array Chunk IDs with the previous interval end.
+ */
+ protected function get_chunks_with_preceding_end( $chunks, $previous_interval_end ) {
+ $chunks_with_ends = array();
+ foreach ( $chunks as $chunk ) {
+ $chunks_with_ends[] = array(
+ 'ids' => $chunk,
+ 'previous_end' => $previous_interval_end,
+ );
+ // Chunks are ordered in descending order.
+ $previous_interval_end = end( $chunk );
+ }
+ return $chunks_with_ends;
+ }
+
+ /**
+ * Get metadata of a particular object type within the designated meta key whitelist.
+ *
+ * @access protected
+ *
+ * @todo Refactor to use $wpdb->prepare() on the SQL query.
+ *
+ * @param array $ids Object IDs.
+ * @param string $meta_type Meta type.
+ * @param array $meta_key_whitelist Meta key whitelist.
+ * @return array Unserialized meta values.
+ */
+ protected function get_metadata( $ids, $meta_type, $meta_key_whitelist ) {
+ global $wpdb;
+ $table = _get_meta_table( $meta_type );
+ $id = $meta_type . '_id';
+ if ( ! $table ) {
+ return array();
+ }
+
+ $private_meta_whitelist_sql = "'" . implode( "','", array_map( 'esc_sql', $meta_key_whitelist ) ) . "'";
+
+ return array_map(
+ array( $this, 'unserialize_meta' ),
+ $wpdb->get_results(
+ // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQL.NotPrepared
+ "SELECT $id, meta_key, meta_value, meta_id FROM $table WHERE $id IN ( " . implode( ',', wp_parse_id_list( $ids ) ) . ' )' .
+ " AND meta_key IN ( $private_meta_whitelist_sql ) ",
+ // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQL.NotPrepared
+ OBJECT
+ )
+ );
+ }
+
+ /**
+ * Initialize listeners for the particular meta type.
+ *
+ * @access public
+ *
+ * @param string $meta_type Meta type.
+ * @param callable $callable Action handler callable.
+ */
+ public function init_listeners_for_meta_type( $meta_type, $callable ) {
+ add_action( "added_{$meta_type}_meta", $callable, 10, 4 );
+ add_action( "updated_{$meta_type}_meta", $callable, 10, 4 );
+ add_action( "deleted_{$meta_type}_meta", $callable, 10, 4 );
+ }
+
+ /**
+ * Initialize meta whitelist handler for the particular meta type.
+ *
+ * @access public
+ *
+ * @param string $meta_type Meta type.
+ * @param callable $whitelist_handler Action handler callable.
+ */
+ public function init_meta_whitelist_handler( $meta_type, $whitelist_handler ) {
+ add_filter( "jetpack_sync_before_enqueue_added_{$meta_type}_meta", $whitelist_handler );
+ add_filter( "jetpack_sync_before_enqueue_updated_{$meta_type}_meta", $whitelist_handler );
+ add_filter( "jetpack_sync_before_enqueue_deleted_{$meta_type}_meta", $whitelist_handler );
+ }
+
+ /**
+ * Retrieve the term relationships for the specified object IDs.
+ *
+ * @access protected
+ *
+ * @todo This feels too specific to be in the abstract sync Module class. Move it?
+ *
+ * @param array $ids Object IDs.
+ * @return array Term relationships - object ID and term taxonomy ID pairs.
+ */
+ protected function get_term_relationships( $ids ) {
+ global $wpdb;
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ return $wpdb->get_results( "SELECT object_id, term_taxonomy_id FROM $wpdb->term_relationships WHERE object_id IN ( " . implode( ',', wp_parse_id_list( $ids ) ) . ' )', OBJECT );
+ }
+
+ /**
+ * Unserialize the value of a meta object, if necessary.
+ *
+ * @access public
+ *
+ * @param object $meta Meta object.
+ * @return object Meta object with possibly unserialized value.
+ */
+ public function unserialize_meta( $meta ) {
+ $meta->meta_value = maybe_unserialize( $meta->meta_value );
+ return $meta;
+ }
+
+ /**
+ * Retrieve a set of objects by their IDs.
+ *
+ * @access public
+ *
+ * @param string $object_type Object type.
+ * @param array $ids Object IDs.
+ * @return array Array of objects.
+ */
+ public function get_objects_by_id( $object_type, $ids ) {
+ if ( empty( $ids ) || empty( $object_type ) ) {
+ return array();
+ }
+
+ $objects = array();
+ foreach ( (array) $ids as $id ) {
+ $object = $this->get_object_by_id( $object_type, $id );
+
+ // Only add object if we have the object.
+ if ( $object ) {
+ $objects[ $id ] = $object;
+ }
+ }
+
+ return $objects;
+ }
+
+ /**
+ * Gets a list of minimum and maximum object ids for each batch based on the given batch size.
+ *
+ * @access public
+ *
+ * @param int $batch_size The batch size for objects.
+ * @param string|bool $where_sql The sql where clause minus 'WHERE', or false if no where clause is needed.
+ *
+ * @return array|bool An array of min and max ids for each batch. FALSE if no table can be found.
+ */
+ public function get_min_max_object_ids_for_batches( $batch_size, $where_sql = false ) {
+ global $wpdb;
+
+ if ( ! $this->table_name() ) {
+ return false;
+ }
+
+ $results = array();
+ $table = $wpdb->{$this->table_name()};
+ $current_max = 0;
+ $current_min = 1;
+ $id_field = $this->id_field();
+ $replicastore = new Replicastore();
+
+ $total = $replicastore->get_min_max_object_id(
+ $id_field,
+ $table,
+ $where_sql,
+ false
+ );
+
+ while ( $total->max > $current_max ) {
+ $where = $where_sql ?
+ $where_sql . " AND $id_field > $current_max" :
+ "$id_field > $current_max";
+ $result = $replicastore->get_min_max_object_id(
+ $id_field,
+ $table,
+ $where,
+ $batch_size
+ );
+ if ( empty( $result->min ) && empty( $result->max ) ) {
+ // Our query produced no min and max. We can assume the min from the previous query,
+ // and the total max we found in the initial query.
+ $current_max = (int) $total->max;
+ $result = (object) array(
+ 'min' => $current_min,
+ 'max' => $current_max,
+ );
+ } else {
+ $current_min = (int) $result->min;
+ $current_max = (int) $result->max;
+ }
+ $results[] = $result;
+ }
+
+ return $results;
+ }
+
+ /**
+ * Return Total number of objects.
+ *
+ * @param array $config Full Sync config.
+ *
+ * @return int total
+ */
+ public function total( $config ) {
+ global $wpdb;
+ $table = $wpdb->{$this->table_name()};
+ $where = $this->get_where_sql( $config );
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ return $wpdb->get_var( "SELECT COUNT(*) FROM $table WHERE $where" );
+ }
+
+ /**
+ * Retrieve the WHERE SQL clause based on the module config.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return string WHERE SQL clause, or `null` if no comments are specified in the module config.
+ */
+ public function get_where_sql( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return '1=1';
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-network-options.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-network-options.php
new file mode 100644
index 00000000..4fbfa3be
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-network-options.php
@@ -0,0 +1,251 @@
+network_options_whitelist = Defaults::$default_network_options_whitelist;
+ }
+
+ /**
+ * Enqueue the network options actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue.
+ * @param boolean $state True if full sync has finished enqueueing this module, false otherwise.
+ * @return array Number of actions enqueued, and next module state.
+ */
+ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ /**
+ * Tells the client to sync all options to the server
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param boolean Whether to expand options (should always be true)
+ */
+ do_action( 'jetpack_full_sync_network_options', true );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 1, true );
+ }
+
+ /**
+ * Send the network options actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $send_until The timestamp until the current request can send.
+ * @param array $state This module Full Sync status.
+ *
+ * @return array This module Full Sync status.
+ */
+ public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ // we call this instead of do_action when sending immediately.
+ $this->send_action( 'jetpack_full_sync_network_options', array( true ) );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 'finished' => true );
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return array Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return 1;
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_network_options' );
+ }
+
+ /**
+ * Retrieve all network options as per the current network options whitelist.
+ *
+ * @access public
+ *
+ * @return array All network options.
+ */
+ public function get_all_network_options() {
+ $options = array();
+ foreach ( $this->network_options_whitelist as $option ) {
+ $options[ $option ] = get_site_option( $option );
+ }
+
+ return $options;
+ }
+
+ /**
+ * Set the network options whitelist.
+ *
+ * @access public
+ *
+ * @param array $options The new network options whitelist.
+ */
+ public function set_network_options_whitelist( $options ) {
+ $this->network_options_whitelist = $options;
+ }
+
+ /**
+ * Get the network options whitelist.
+ *
+ * @access public
+ *
+ * @return array The network options whitelist.
+ */
+ public function get_network_options_whitelist() {
+ return $this->network_options_whitelist;
+ }
+
+ /**
+ * Reject non-whitelisted network options.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array|false $args The hook parameters, false if not a whitelisted network option.
+ */
+ public function whitelist_network_options( $args ) {
+ if ( ! $this->is_whitelisted_network_option( $args[0] ) ) {
+ return false;
+ }
+
+ return $args;
+ }
+
+ /**
+ * Whether the option is a whitelisted network option.
+ *
+ * @access public
+ *
+ * @param string $option Option name.
+ * @return boolean True if this is a whitelisted network option.
+ */
+ public function is_whitelisted_network_option( $option ) {
+ return in_array( $option, $this->network_options_whitelist, true );
+ }
+
+ /**
+ * Expand the network options within a hook before they are serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array $args The hook parameters.
+ */
+ public function expand_network_options( $args ) {
+ if ( $args[0] ) {
+ return $this->get_all_network_options();
+ }
+
+ return $args;
+ }
+
+ /**
+ * Return Total number of objects.
+ *
+ * @param array $config Full Sync config.
+ *
+ * @return int total
+ */
+ public function total( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return count( (array) $this->network_options_whitelist );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-options.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-options.php
new file mode 100644
index 00000000..53f9de1d
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-options.php
@@ -0,0 +1,480 @@
+update_options_whitelist();
+ $this->update_options_contentless();
+ }
+
+ /**
+ * Set module defaults at a later time.
+ *
+ * @access public
+ */
+ public function set_late_default() {
+ /** This filter is already documented in json-endpoints/jetpack/class.wpcom-json-api-get-option-endpoint.php */
+ $late_options = apply_filters( 'jetpack_options_whitelist', array() );
+ if ( ! empty( $late_options ) && is_array( $late_options ) ) {
+ $this->options_whitelist = array_merge( $this->options_whitelist, $late_options );
+ }
+ }
+
+ /**
+ * Add old deprecated options to the list of options to keep in sync.
+ *
+ * @since 1.14.0
+ *
+ * @access public
+ *
+ * @param array $options The default list of site options.
+ */
+ public function add_deprecated_options( $options ) {
+ global $wp_version;
+
+ $deprecated_options = array(
+ 'blacklist_keys' => '5.5-alpha', // Replaced by disallowed_keys.
+ 'comment_whitelist' => '5.5-alpha', // Replaced by comment_previously_approved.
+ );
+
+ foreach ( $deprecated_options as $option => $version ) {
+ if ( version_compare( $wp_version, $version, '<=' ) ) {
+ $options[] = $option;
+ }
+ }
+
+ return $options;
+ }
+
+ /**
+ * Enqueue the options actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue.
+ * @param boolean $state True if full sync has finished enqueueing this module, false otherwise.
+ * @return array Number of actions enqueued, and next module state.
+ */
+ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ /**
+ * Tells the client to sync all options to the server
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param boolean Whether to expand options (should always be true)
+ */
+ do_action( 'jetpack_full_sync_options', true );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 1, true );
+ }
+
+ /**
+ * Send the options actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $send_until The timestamp until the current request can send.
+ * @param array $state This module Full Sync status.
+ *
+ * @return array This module Full Sync status.
+ */
+ public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ // we call this instead of do_action when sending immediately.
+ $this->send_action( 'jetpack_full_sync_options', array( true ) );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 'finished' => true );
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return int Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return 1;
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_options' );
+ }
+
+ /**
+ * Retrieve all options as per the current options whitelist.
+ * Public so that we don't have to store so much data all the options twice.
+ *
+ * @access public
+ *
+ * @return array All options.
+ */
+ public function get_all_options() {
+ $options = array();
+ $random_string = wp_generate_password();
+ foreach ( $this->options_whitelist as $option ) {
+ if ( 0 === strpos( $option, Settings::SETTINGS_OPTION_PREFIX ) ) {
+ $option_value = Settings::get_setting( str_replace( Settings::SETTINGS_OPTION_PREFIX, '', $option ) );
+ $options[ $option ] = $option_value;
+ } else {
+ $option_value = get_option( $option, $random_string );
+ if ( $option_value !== $random_string ) {
+ $options[ $option ] = $option_value;
+ }
+ }
+ }
+
+ // Add theme mods.
+ $theme_mods_option = 'theme_mods_' . get_option( 'stylesheet' );
+ $theme_mods_value = get_option( $theme_mods_option, $random_string );
+ if ( $theme_mods_value === $random_string ) {
+ return $options;
+ }
+ $this->filter_theme_mods( $theme_mods_value );
+ $options[ $theme_mods_option ] = $theme_mods_value;
+ return $options;
+ }
+
+ /**
+ * Update the options whitelist to the default one.
+ *
+ * @access public
+ */
+ public function update_options_whitelist() {
+ $this->options_whitelist = Defaults::get_options_whitelist();
+ }
+
+ /**
+ * Set the options whitelist.
+ *
+ * @access public
+ *
+ * @param array $options The new options whitelist.
+ */
+ public function set_options_whitelist( $options ) {
+ $this->options_whitelist = $options;
+ }
+
+ /**
+ * Get the options whitelist.
+ *
+ * @access public
+ *
+ * @return array The options whitelist.
+ */
+ public function get_options_whitelist() {
+ return $this->options_whitelist;
+ }
+
+ /**
+ * Update the contentless options to the defaults.
+ *
+ * @access public
+ */
+ public function update_options_contentless() {
+ $this->options_contentless = Defaults::get_options_contentless();
+ }
+
+ /**
+ * Get the contentless options.
+ *
+ * @access public
+ *
+ * @return array Array of the contentless options.
+ */
+ public function get_options_contentless() {
+ return $this->options_contentless;
+ }
+
+ /**
+ * Reject any options that aren't whitelisted or contentless.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array $args The hook parameters.
+ */
+ public function whitelist_options( $args ) {
+ // Reject non-whitelisted options.
+ if ( ! $this->is_whitelisted_option( $args[0] ) ) {
+ return false;
+ }
+
+ // Filter our weird array( false ) value for theme_mods_*.
+ if ( 'theme_mods_' === substr( $args[0], 0, 11 ) ) {
+ $this->filter_theme_mods( $args[1] );
+ if ( isset( $args[2] ) ) {
+ $this->filter_theme_mods( $args[2] );
+ }
+ }
+
+ // Set value(s) of contentless option to empty string(s).
+ if ( $this->is_contentless_option( $args[0] ) ) {
+ // Create a new array matching length of $args, containing empty strings.
+ $empty = array_fill( 0, count( $args ), '' );
+ $empty[0] = $args[0];
+ return $empty;
+ }
+
+ return $args;
+ }
+
+ /**
+ * Whether a certain option is whitelisted for sync.
+ *
+ * @access public
+ *
+ * @param string $option Option name.
+ * @return boolean Whether the option is whitelisted.
+ */
+ public function is_whitelisted_option( $option ) {
+ return in_array( $option, $this->options_whitelist, true ) || 'theme_mods_' === substr( $option, 0, 11 );
+ }
+
+ /**
+ * Whether a certain option is a contentless one.
+ *
+ * @access private
+ *
+ * @param string $option Option name.
+ * @return boolean Whether the option is contentless.
+ */
+ private function is_contentless_option( $option ) {
+ return in_array( $option, $this->options_contentless, true );
+ }
+
+ /**
+ * Filters out falsy values from theme mod options.
+ *
+ * @access private
+ *
+ * @param array $value Option value.
+ */
+ private function filter_theme_mods( &$value ) {
+ if ( is_array( $value ) && isset( $value[0] ) ) {
+ unset( $value[0] );
+ }
+ }
+
+ /**
+ * Handle changes in the core site icon and sync them.
+ *
+ * @access public
+ */
+ public function jetpack_sync_core_icon() {
+ $url = get_site_icon_url();
+
+ $jetpack_url = \Jetpack_Options::get_option( 'site_icon_url' );
+ if ( defined( 'JETPACK__PLUGIN_DIR' ) ) {
+ if ( ! function_exists( 'jetpack_site_icon_url' ) ) {
+ require_once JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php';
+ }
+ $jetpack_url = jetpack_site_icon_url();
+ }
+
+ // If there's a core icon, maybe update the option. If not, fall back to Jetpack's.
+ if ( ! empty( $url ) && $jetpack_url !== $url ) {
+ // This is the option that is synced with dotcom.
+ \Jetpack_Options::update_option( 'site_icon_url', $url );
+ } elseif ( empty( $url ) ) {
+ \Jetpack_Options::delete_option( 'site_icon_url' );
+ }
+ }
+
+ /**
+ * Expand all options within a hook before they are serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array $args The hook parameters.
+ */
+ public function expand_options( $args ) {
+ if ( $args[0] ) {
+ return $this->get_all_options();
+ }
+
+ return $args;
+ }
+
+ /**
+ * Return Total number of objects.
+ *
+ * @param array $config Full Sync config.
+ *
+ * @return int total
+ */
+ public function total( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return count( Defaults::get_options_whitelist() );
+ }
+
+ /**
+ * Retrieve a set of options by their IDs.
+ *
+ * @access public
+ *
+ * @param string $object_type Object type.
+ * @param array $ids Object IDs.
+ * @return array Array of objects.
+ */
+ public function get_objects_by_id( $object_type, $ids ) {
+ if ( empty( $ids ) || empty( $object_type ) || 'option' !== $object_type ) {
+ return array();
+ }
+
+ $objects = array();
+ foreach ( (array) $ids as $id ) {
+ $object = $this->get_object_by_id( $object_type, $id );
+
+ // Only add object if we have the object.
+ if ( 'OPTION-DOES-NOT-EXIST' !== $object ) {
+ if ( 'all' === $id ) {
+ // If all was requested it contains all options and can simply be returned.
+ return $object;
+ }
+ $objects[ $id ] = $object;
+ }
+ }
+
+ return $objects;
+ }
+
+ /**
+ * Retrieve an option by its name.
+ *
+ * @access public
+ *
+ * @param string $object_type Type of the sync object.
+ * @param string $id ID of the sync object.
+ * @return mixed Value of Option or 'OPTION-DOES-NOT-EXIST' if not found.
+ */
+ public function get_object_by_id( $object_type, $id ) {
+ if ( 'option' === $object_type ) {
+ // Utilize Random string as default value to distinguish between false and not exist.
+ $random_string = wp_generate_password();
+ // Only whitelisted options can be returned.
+ if ( in_array( $id, $this->options_whitelist, true ) ) {
+ if ( 0 === strpos( $id, Settings::SETTINGS_OPTION_PREFIX ) ) {
+ $option_value = Settings::get_setting( str_replace( Settings::SETTINGS_OPTION_PREFIX, '', $id ) );
+ return $option_value;
+ } else {
+ $option_value = get_option( $id, $random_string );
+ if ( $option_value !== $random_string ) {
+ return $option_value;
+ }
+ }
+ } elseif ( 'all' === $id ) {
+ return $this->get_all_options();
+ }
+ }
+
+ return 'OPTION-DOES-NOT-EXIST';
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php
new file mode 100644
index 00000000..2ebe52b3
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php
@@ -0,0 +1,414 @@
+action_handler = $callable;
+
+ add_action( 'deleted_plugin', array( $this, 'deleted_plugin' ), 10, 2 );
+ add_action( 'activated_plugin', $callable, 10, 2 );
+ add_action( 'deactivated_plugin', $callable, 10, 2 );
+ add_action( 'delete_plugin', array( $this, 'delete_plugin' ) );
+ add_filter( 'upgrader_pre_install', array( $this, 'populate_plugins' ), 10, 1 );
+ add_action( 'upgrader_process_complete', array( $this, 'on_upgrader_completion' ), 10, 2 );
+ add_action( 'jetpack_plugin_installed', $callable, 10, 1 );
+ add_action( 'jetpack_plugin_update_failed', $callable, 10, 4 );
+ add_action( 'jetpack_plugins_updated', $callable, 10, 2 );
+ add_action( 'admin_action_update', array( $this, 'check_plugin_edit' ) );
+ add_action( 'jetpack_edited_plugin', $callable, 10, 2 );
+ add_action( 'wp_ajax_edit-theme-plugin-file', array( $this, 'plugin_edit_ajax' ), 0 );
+
+ // Note that we don't simply 'expand_plugin_data' on the 'delete_plugin' action here because the plugin file is deleted when that action finishes.
+ add_filter( 'jetpack_sync_before_enqueue_activated_plugin', array( $this, 'expand_plugin_data' ) );
+ add_filter( 'jetpack_sync_before_enqueue_deactivated_plugin', array( $this, 'expand_plugin_data' ) );
+ }
+
+ /**
+ * Fetch and populate all current plugins before upgrader installation.
+ *
+ * @access public
+ *
+ * @param bool|WP_Error $response Install response, true if successful, WP_Error if not.
+ */
+ public function populate_plugins( $response ) {
+ if ( ! function_exists( 'get_plugins' ) ) {
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
+ }
+ $this->plugins = get_plugins();
+ return $response;
+ }
+
+ /**
+ * Handler for the upgrader success finishes.
+ *
+ * @access public
+ *
+ * @param \WP_Upgrader $upgrader Upgrader instance.
+ * @param array $details Array of bulk item update data.
+ */
+ public function on_upgrader_completion( $upgrader, $details ) {
+ if ( ! isset( $details['type'] ) ) {
+ return;
+ }
+ if ( 'plugin' !== $details['type'] ) {
+ return;
+ }
+
+ if ( ! isset( $details['action'] ) ) {
+ return;
+ }
+
+ $plugins = ( isset( $details['plugins'] ) ? $details['plugins'] : null );
+ if ( empty( $plugins ) ) {
+ $plugins = ( isset( $details['plugin'] ) ? array( $details['plugin'] ) : null );
+ }
+
+ // For plugin installer.
+ if ( empty( $plugins ) && method_exists( $upgrader, 'plugin_info' ) ) {
+ $plugins = array( $upgrader->plugin_info() );
+ }
+
+ if ( empty( $plugins ) ) {
+ return; // We shouldn't be here.
+ }
+
+ switch ( $details['action'] ) {
+ case 'update':
+ $state = array(
+ 'is_autoupdate' => Jetpack_Constants::is_true( 'JETPACK_PLUGIN_AUTOUPDATE' ),
+ );
+ $errors = $this->get_errors( $upgrader->skin );
+ if ( $errors ) {
+ foreach ( $plugins as $slug ) {
+ /**
+ * Sync that a plugin update failed
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.8.0
+ *
+ * @module sync
+ *
+ * @param string $plugin , Plugin slug
+ * @param string Error code
+ * @param string Error message
+ */
+ do_action( 'jetpack_plugin_update_failed', $this->get_plugin_info( $slug ), $errors['code'], $errors['message'], $state );
+ }
+
+ return;
+ }
+ /**
+ * Sync that a plugin update
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.8.0
+ *
+ * @module sync
+ *
+ * @param array () $plugin, Plugin Data
+ */
+ do_action( 'jetpack_plugins_updated', array_map( array( $this, 'get_plugin_info' ), $plugins ), $state );
+ break;
+ case 'install':
+ }
+
+ if ( 'install' === $details['action'] ) {
+ /**
+ * Signals to the sync listener that a plugin was installed and a sync action
+ * reflecting the installation and the plugin info should be sent
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.8.0
+ *
+ * @module sync
+ *
+ * @param array () $plugin, Plugin Data
+ */
+ do_action( 'jetpack_plugin_installed', array_map( array( $this, 'get_plugin_info' ), $plugins ) );
+
+ return;
+ }
+ }
+
+ /**
+ * Retrieve the plugin information by a plugin slug.
+ *
+ * @access private
+ *
+ * @param string $slug Plugin slug.
+ * @return array Plugin information.
+ */
+ private function get_plugin_info( $slug ) {
+ $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 );
+ }
+
+ /**
+ * Retrieve upgrade errors.
+ *
+ * @access private
+ *
+ * @param \Automatic_Upgrader_Skin|\WP_Upgrader_Skin $skin The upgrader skin being used.
+ * @return array|boolean Error on error, false otherwise.
+ */
+ private function get_errors( $skin ) {
+ $errors = method_exists( $skin, 'get_errors' ) ? $skin->get_errors() : null;
+ if ( is_wp_error( $errors ) ) {
+ $error_code = $errors->get_error_code();
+ if ( ! empty( $error_code ) ) {
+ return array(
+ 'code' => $error_code,
+ 'message' => $errors->get_error_message(),
+ );
+ }
+ }
+
+ if ( isset( $skin->result ) ) {
+ $errors = $skin->result;
+ if ( is_wp_error( $errors ) ) {
+ return array(
+ 'code' => $errors->get_error_code(),
+ 'message' => $errors->get_error_message(),
+ );
+ }
+
+ if ( empty( $skin->result ) ) {
+ return array(
+ 'code' => 'unknown',
+ 'message' => __( 'Unknown Plugin Update Failure', 'jetpack-sync' ),
+ );
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Handle plugin edit in the administration.
+ *
+ * @access public
+ *
+ * @todo The `admin_action_update` hook is called only for logged in users, but maybe implement nonce verification?
+ */
+ public function check_plugin_edit() {
+ $screen = get_current_screen();
+ // phpcs:ignore WordPress.Security.NonceVerification.Missing
+ if ( 'plugin-editor' !== $screen->base || ! isset( $_POST['newcontent'] ) || ! isset( $_POST['plugin'] ) ) {
+ return;
+ }
+
+ // 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;
+ }
+
+ /**
+ * Helps Sync log that a plugin was edited
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.9.0
+ *
+ * @param string $plugin, Plugin slug
+ * @param mixed $plugins[ $plugin ], Array of plugin data
+ */
+ do_action( 'jetpack_edited_plugin', $plugin, $plugins[ $plugin ] );
+ }
+
+ /**
+ * Handle plugin ajax edit in the administration.
+ *
+ * @access public
+ *
+ * @todo Update this method to use WP_Filesystem instead of fopen/fclose.
+ */
+ public function plugin_edit_ajax() {
+ // This validation is based on wp_edit_theme_plugin_file().
+ $args = wp_unslash( $_POST );
+ if ( empty( $args['file'] ) ) {
+ return;
+ }
+
+ $file = $args['file'];
+ if ( 0 !== validate_file( $file ) ) {
+ return;
+ }
+
+ if ( ! isset( $args['newcontent'] ) ) {
+ return;
+ }
+
+ if ( ! isset( $args['nonce'] ) ) {
+ return;
+ }
+
+ if ( empty( $args['plugin'] ) ) {
+ return;
+ }
+
+ $plugin = $args['plugin'];
+ if ( ! current_user_can( 'edit_plugins' ) ) {
+ return;
+ }
+
+ if ( ! wp_verify_nonce( $args['nonce'], 'edit-plugin_' . $file ) ) {
+ return;
+ }
+ $plugins = get_plugins();
+ if ( ! array_key_exists( $plugin, $plugins ) ) {
+ return;
+ }
+
+ if ( 0 !== validate_file( $file, get_plugin_files( $plugin ) ) ) {
+ return;
+ }
+
+ $real_file = WP_PLUGIN_DIR . '/' . $file;
+
+ // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_is_writable
+ if ( ! is_writable( $real_file ) ) {
+ return;
+ }
+
+ // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fopen
+ $file_pointer = fopen( $real_file, 'w+' );
+ if ( false === $file_pointer ) {
+ return;
+ }
+ // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose
+ fclose( $file_pointer );
+ /**
+ * This action is documented already in this file
+ */
+ do_action( 'jetpack_edited_plugin', $plugin, $plugins[ $plugin ] );
+ }
+
+ /**
+ * Handle plugin deletion.
+ *
+ * @access public
+ *
+ * @param string $plugin_path Path to the plugin main file.
+ */
+ public function delete_plugin( $plugin_path ) {
+ $full_plugin_path = WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $plugin_path;
+
+ // Checking for file existence because some sync plugin module tests simulate plugin installation and deletion without putting file on disk.
+ if ( file_exists( $full_plugin_path ) ) {
+ $all_plugin_data = get_plugin_data( $full_plugin_path );
+ $data = array(
+ 'name' => $all_plugin_data['Name'],
+ 'version' => $all_plugin_data['Version'],
+ );
+ } else {
+ $data = array(
+ 'name' => $plugin_path,
+ 'version' => 'unknown',
+ );
+ }
+
+ $this->plugin_info[ $plugin_path ] = $data;
+ }
+
+ /**
+ * Invoked after plugin deletion.
+ *
+ * @access public
+ *
+ * @param string $plugin_path Path to the plugin main file.
+ * @param boolean $is_deleted Whether the plugin was deleted successfully.
+ */
+ public function deleted_plugin( $plugin_path, $is_deleted ) {
+ call_user_func( $this->action_handler, $plugin_path, $is_deleted, $this->plugin_info[ $plugin_path ] );
+ unset( $this->plugin_info[ $plugin_path ] );
+ }
+
+ /**
+ * Expand the plugins within a hook before they are serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array $args The expanded hook parameters.
+ */
+ public function expand_plugin_data( $args ) {
+ $plugin_path = $args[0];
+ $plugin_data = array();
+
+ if ( ! function_exists( 'get_plugins' ) ) {
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
+ }
+ $all_plugins = get_plugins();
+ if ( isset( $all_plugins[ $plugin_path ] ) ) {
+ $all_plugin_data = $all_plugins[ $plugin_path ];
+ $plugin_data['name'] = $all_plugin_data['Name'];
+ $plugin_data['version'] = $all_plugin_data['Version'];
+ }
+
+ return array(
+ $args[0],
+ $args[1],
+ $plugin_data,
+ );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php
new file mode 100644
index 00000000..5927b9c3
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php
@@ -0,0 +1,783 @@
+ length.
+ * Current Setting : 5MB.
+ *
+ * @access public
+ *
+ * @var int
+ */
+ const MAX_POST_CONTENT_LENGTH = 5000000;
+
+ /**
+ * Max bytes allowed for post meta_value => length.
+ * Current Setting : 2MB.
+ *
+ * @access public
+ *
+ * @var int
+ */
+ const MAX_POST_META_LENGTH = 2000000;
+
+ /**
+ * Default previous post state.
+ * Used for default previous post status.
+ *
+ * @access public
+ *
+ * @var string
+ */
+ const DEFAULT_PREVIOUS_STATE = 'new';
+
+ /**
+ * Sync module name.
+ *
+ * @access public
+ *
+ * @return string
+ */
+ public function name() {
+ return 'posts';
+ }
+
+ /**
+ * The table in the database.
+ *
+ * @access public
+ *
+ * @return string
+ */
+ public function table_name() {
+ return 'posts';
+ }
+
+ /**
+ * Retrieve a post by its ID.
+ *
+ * @access public
+ *
+ * @param string $object_type Type of the sync object.
+ * @param int $id ID of the sync object.
+ * @return \WP_Post|bool Filtered \WP_Post object, or false if the object is not a post.
+ */
+ public function get_object_by_id( $object_type, $id ) {
+ if ( 'post' === $object_type ) {
+ $post = get_post( (int) $id );
+ if ( $post ) {
+ return $this->filter_post_content_and_add_links( $post );
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Initialize posts action listeners.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_listeners( $callable ) {
+ $this->action_handler = $callable;
+
+ add_action( 'wp_insert_post', array( $this, 'wp_insert_post' ), 11, 3 );
+ add_action( 'wp_after_insert_post', array( $this, 'wp_after_insert_post' ), 11, 2 );
+ add_action( 'jetpack_sync_save_post', $callable, 10, 4 );
+
+ add_action( 'deleted_post', $callable, 10 );
+ add_action( 'jetpack_published_post', $callable, 10, 2 );
+ add_filter( 'jetpack_sync_before_enqueue_deleted_post', array( $this, 'filter_blacklisted_post_types_deleted' ) );
+
+ add_action( 'transition_post_status', array( $this, 'save_published' ), 10, 3 );
+
+ // Listen for meta changes.
+ $this->init_listeners_for_meta_type( 'post', $callable );
+ $this->init_meta_whitelist_handler( 'post', array( $this, 'filter_meta' ) );
+
+ add_filter( 'jetpack_sync_before_enqueue_jetpack_sync_save_post', array( $this, 'filter_jetpack_sync_before_enqueue_jetpack_sync_save_post' ) );
+
+ add_action( 'jetpack_daily_akismet_meta_cleanup_before', array( $this, 'daily_akismet_meta_cleanup_before' ) );
+ add_action( 'jetpack_daily_akismet_meta_cleanup_after', array( $this, 'daily_akismet_meta_cleanup_after' ) );
+ add_action( 'jetpack_post_meta_batch_delete', $callable, 10, 2 );
+ }
+
+ /**
+ * Before Akismet's daily cleanup of spam detection metadata.
+ *
+ * @access public
+ *
+ * @param array $feedback_ids IDs of feedback posts.
+ */
+ public function daily_akismet_meta_cleanup_before( $feedback_ids ) {
+ remove_action( 'deleted_post_meta', $this->action_handler );
+
+ if ( ! is_array( $feedback_ids ) || count( $feedback_ids ) < 1 ) {
+ return;
+ }
+
+ $ids_chunks = array_chunk( $feedback_ids, 100, false );
+ foreach ( $ids_chunks as $chunk ) {
+ /**
+ * Used for syncing deletion of batch post meta
+ *
+ * @since 1.6.3
+ * @since-jetpack 6.1.0
+ *
+ * @module sync
+ *
+ * @param array $feedback_ids feedback post IDs
+ * @param string $meta_key to be deleted
+ */
+ do_action( 'jetpack_post_meta_batch_delete', $chunk, '_feedback_akismet_values' );
+ }
+ }
+
+ /**
+ * After Akismet's daily cleanup of spam detection metadata.
+ *
+ * @access public
+ *
+ * @param array $feedback_ids IDs of feedback posts.
+ */
+ public function daily_akismet_meta_cleanup_after( $feedback_ids ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ add_action( 'deleted_post_meta', $this->action_handler );
+ }
+
+ /**
+ * Initialize posts action listeners for full sync.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_full_sync_listeners( $callable ) {
+ add_action( 'jetpack_full_sync_posts', $callable ); // Also sends post meta.
+ }
+
+ /**
+ * Initialize the module in the sender.
+ *
+ * @access public
+ */
+ public function init_before_send() {
+ // meta.
+ add_filter( 'jetpack_sync_before_send_added_post_meta', array( $this, 'trim_post_meta' ) );
+ add_filter( 'jetpack_sync_before_send_updated_post_meta', array( $this, 'trim_post_meta' ) );
+ add_filter( 'jetpack_sync_before_send_deleted_post_meta', array( $this, 'trim_post_meta' ) );
+ // Full sync.
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_posts', array( $this, 'expand_post_ids' ) );
+ }
+
+ /**
+ * Enqueue the posts actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue.
+ * @param boolean $state True if full sync has finished enqueueing this module, false otherwise.
+ * @return array Number of actions enqueued, and next module state.
+ */
+ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) {
+ global $wpdb;
+
+ return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_posts', $wpdb->posts, 'ID', $this->get_where_sql( $config ), $max_items_to_enqueue, $state );
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @todo Use $wpdb->prepare for the SQL query.
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return array Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) {
+ global $wpdb;
+
+ $query = "SELECT count(*) FROM $wpdb->posts WHERE " . $this->get_where_sql( $config );
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $count = $wpdb->get_var( $query );
+
+ return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
+ }
+
+ /**
+ * Retrieve the WHERE SQL clause based on the module config.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return string WHERE SQL clause, or `null` if no comments are specified in the module config.
+ */
+ public function get_where_sql( $config ) {
+ $where_sql = Settings::get_blacklisted_post_types_sql();
+
+ // Config is a list of post IDs to sync.
+ if ( is_array( $config ) ) {
+ $where_sql .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')';
+ }
+
+ return $where_sql;
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_posts' );
+ }
+
+ /**
+ * Filter meta arguments so that we don't sync meta_values over MAX_POST_META_LENGTH.
+ *
+ * @param array $args action arguments.
+ *
+ * @return array filtered action arguments.
+ */
+ public function trim_post_meta( $args ) {
+ list( $meta_id, $object_id, $meta_key, $meta_value ) = $args;
+ // Explicitly truncate meta_value when it exceeds limit.
+ // Large content will cause OOM issues and break Sync.
+ $serialized_value = maybe_serialize( $meta_value );
+ if ( strlen( $serialized_value ) >= self::MAX_POST_META_LENGTH ) {
+ $meta_value = '';
+ }
+ return array( $meta_id, $object_id, $meta_key, $meta_value );
+ }
+
+ /**
+ * Process content before send.
+ *
+ * @param array $args Arguments of the `wp_insert_post` hook.
+ *
+ * @return array
+ */
+ public function expand_jetpack_sync_save_post( $args ) {
+ list( $post_id, $post, $update, $previous_state ) = $args;
+ return array( $post_id, $this->filter_post_content_and_add_links( $post ), $update, $previous_state );
+ }
+
+ /**
+ * Filter all blacklisted post types and add filtered post content.
+ *
+ * @param array $args Hook arguments.
+ * @return array|false Hook arguments, or false if the post type is a blacklisted one.
+ */
+ public function filter_jetpack_sync_before_enqueue_jetpack_sync_save_post( $args ) {
+ list( $post_id, $post, $update, $previous_state ) = $args;
+
+ if ( in_array( $post->post_type, Settings::get_setting( 'post_types_blacklist' ), true ) ) {
+ return false;
+ }
+
+ return array( $post_id, $this->filter_post_content_and_add_links( $post ), $update, $previous_state );
+ }
+
+ /**
+ * Filter all blacklisted post types.
+ *
+ * @param array $args Hook arguments.
+ * @return array|false Hook arguments, or false if the post type is a blacklisted one.
+ */
+ public function filter_blacklisted_post_types_deleted( $args ) {
+
+ // deleted_post is called after the SQL delete but before cache cleanup.
+ // There is the potential we can't detect post_type at this point.
+ if ( ! $this->is_post_type_allowed( $args[0] ) ) {
+ return false;
+ }
+
+ return $args;
+ }
+
+ /**
+ * Filter all meta that is not blacklisted, or is stored for a disallowed post type.
+ *
+ * @param array $args Hook arguments.
+ * @return array|false Hook arguments, or false if meta was filtered.
+ */
+ public function filter_meta( $args ) {
+ if ( $this->is_post_type_allowed( $args[1] ) && $this->is_whitelisted_post_meta( $args[2] ) ) {
+ return $args;
+ }
+
+ return false;
+ }
+
+ /**
+ * Whether a post meta key is whitelisted.
+ *
+ * @param string $meta_key Meta key.
+ * @return boolean Whether the post meta key is whitelisted.
+ */
+ public function is_whitelisted_post_meta( $meta_key ) {
+ // The _wpas_skip_ meta key is used by Publicize.
+ return in_array( $meta_key, Settings::get_setting( 'post_meta_whitelist' ), true ) || ( 0 === strpos( $meta_key, '_wpas_skip_' ) );
+ }
+
+ /**
+ * Whether a post type is allowed.
+ * A post type will be disallowed if it's present in the post type blacklist.
+ *
+ * @param int $post_id ID of the post.
+ * @return boolean Whether the post type is allowed.
+ */
+ public function is_post_type_allowed( $post_id ) {
+ $post = get_post( (int) $post_id );
+
+ if ( isset( $post->post_type ) ) {
+ return ! in_array( $post->post_type, Settings::get_setting( 'post_types_blacklist' ), true );
+ }
+ return false;
+ }
+
+ /**
+ * Remove the embed shortcode.
+ *
+ * @global $wp_embed
+ */
+ public function remove_embed() {
+ global $wp_embed;
+ remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
+ // remove the embed shortcode since we would do the part later.
+ remove_shortcode( 'embed' );
+ // Attempts to embed all URLs in a post.
+ remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
+ }
+
+ /**
+ * Add the embed shortcode.
+ *
+ * @global $wp_embed
+ */
+ public function add_embed() {
+ global $wp_embed;
+ add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
+ // Shortcode placeholder for strip_shortcodes().
+ add_shortcode( 'embed', '__return_false' );
+ // Attempts to embed all URLs in a post.
+ add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
+ }
+
+ /**
+ * Expands wp_insert_post to include filtered content
+ *
+ * @param \WP_Post $post_object Post object.
+ */
+ public function filter_post_content_and_add_links( $post_object ) {
+ global $post;
+ // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
+ $post = $post_object;
+
+ // Return non existant post.
+ $post_type = get_post_type_object( $post->post_type );
+ if ( empty( $post_type ) || ! is_object( $post_type ) ) {
+ $non_existant_post = new \stdClass();
+ $non_existant_post->ID = $post->ID;
+ $non_existant_post->post_modified = $post->post_modified;
+ $non_existant_post->post_modified_gmt = $post->post_modified_gmt;
+ $non_existant_post->post_status = 'jetpack_sync_non_registered_post_type';
+ $non_existant_post->post_type = $post->post_type;
+
+ return $non_existant_post;
+ }
+ /**
+ * Filters whether to prevent sending post data to .com
+ *
+ * Passing true to the filter will prevent the post data from being sent
+ * to the WordPress.com.
+ * Instead we pass data that will still enable us to do a checksum against the
+ * Jetpacks data but will prevent us from displaying the data on in the API as well as
+ * other services.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param boolean false prevent post data from being synced to WordPress.com
+ * @param mixed $post \WP_Post object
+ */
+ if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) {
+ // We only send the bare necessary object to be able to create a checksum.
+ $blocked_post = new \stdClass();
+ $blocked_post->ID = $post->ID;
+ $blocked_post->post_modified = $post->post_modified;
+ $blocked_post->post_modified_gmt = $post->post_modified_gmt;
+ $blocked_post->post_status = 'jetpack_sync_blocked';
+ $blocked_post->post_type = $post->post_type;
+
+ return $blocked_post;
+ }
+
+ // lets not do oembed just yet.
+ $this->remove_embed();
+
+ if ( 0 < strlen( $post->post_password ) ) {
+ $post->post_password = 'auto-' . wp_generate_password( 10, false );
+ }
+
+ // Explicitly omit post_content when it exceeds limit.
+ // Large content will cause OOM issues and break Sync.
+ if ( strlen( $post->post_content ) >= self::MAX_POST_CONTENT_LENGTH ) {
+ $post->post_content = '';
+ }
+
+ /** This filter is already documented in core. wp-includes/post-template.php */
+ if ( Settings::get_setting( 'render_filtered_content' ) && $post_type->public ) {
+ global $shortcode_tags;
+ /**
+ * Filter prevents some shortcodes from expanding.
+ *
+ * Since we can can expand some type of shortcode better on the .com side and make the
+ * expansion more relevant to contexts. For example [galleries] and subscription emails
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.5.0
+ *
+ * @param array of shortcode tags to remove.
+ */
+ $shortcodes_to_remove = apply_filters(
+ 'jetpack_sync_do_not_expand_shortcodes',
+ array(
+ 'gallery',
+ 'slideshow',
+ )
+ );
+ $removed_shortcode_callbacks = array();
+ foreach ( $shortcodes_to_remove as $shortcode ) {
+ if ( isset( $shortcode_tags[ $shortcode ] ) ) {
+ $removed_shortcode_callbacks[ $shortcode ] = $shortcode_tags[ $shortcode ];
+ }
+ }
+
+ array_map( 'remove_shortcode', array_keys( $removed_shortcode_callbacks ) );
+ /**
+ * Certain modules such as Likes, Related Posts and Sharedaddy are using `Settings::is_syncing`
+ * in order to NOT get rendered in filtered post content.
+ * Since the current method runs now before enqueueing instead of before sending,
+ * we are setting `is_syncing` flag to true in order to preserve the existing functionality.
+ */
+
+ $is_syncing_current = Settings::is_syncing();
+ Settings::set_is_syncing( true );
+ $post->post_content_filtered = apply_filters( 'the_content', $post->post_content );
+ $post->post_excerpt_filtered = apply_filters( 'the_excerpt', $post->post_excerpt );
+ Settings::set_is_syncing( $is_syncing_current );
+
+ foreach ( $removed_shortcode_callbacks as $shortcode => $callback ) {
+ add_shortcode( $shortcode, $callback );
+ }
+ }
+
+ $this->add_embed();
+
+ if ( has_post_thumbnail( $post->ID ) ) {
+ $image_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
+ if ( is_array( $image_attributes ) && isset( $image_attributes[0] ) ) {
+ $post->featured_image = $image_attributes[0];
+ }
+ }
+
+ $post->permalink = get_permalink( $post->ID );
+ $post->shortlink = wp_get_shortlink( $post->ID );
+
+ if ( function_exists( 'amp_get_permalink' ) ) {
+ $post->amp_permalink = amp_get_permalink( $post->ID );
+ }
+
+ return $post;
+ }
+
+ /**
+ * Handle transition from another post status to a published one.
+ *
+ * @param string $new_status New post status.
+ * @param string $old_status Old post status.
+ * @param \WP_Post $post Post object.
+ */
+ public function save_published( $new_status, $old_status, $post ) {
+ if ( 'publish' === $new_status && 'publish' !== $old_status ) {
+ $this->just_published[ $post->ID ] = true;
+ }
+
+ $this->previous_status[ $post->ID ] = $old_status;
+ }
+
+ /**
+ * When publishing or updating a post, the Gutenberg editor sends two requests:
+ * 1. sent to WP REST API endpoint `wp-json/wp/v2/posts/$id`
+ * 2. sent to wp-admin/post.php `?post=$id&action=edit&classic-editor=1&meta_box=1`
+ *
+ * The 2nd request is to update post meta, which is not supported on WP REST API.
+ * When syncing post data, we will include if this was a meta box update.
+ *
+ * @todo Implement nonce verification.
+ *
+ * @return boolean Whether this is a Gutenberg meta box update.
+ */
+ public function is_gutenberg_meta_box_update() {
+ // phpcs:disable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended
+ return (
+ isset( $_POST['action'], $_GET['classic-editor'], $_GET['meta_box'] ) &&
+ 'editpost' === $_POST['action'] &&
+ '1' === $_GET['classic-editor'] &&
+ '1' === $_GET['meta_box']
+ // phpcs:enable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended
+ );
+ }
+
+ /**
+ * Handler for the wp_insert_post hook.
+ * Called upon creation of a new post.
+ *
+ * @param int $post_ID Post ID.
+ * @param \WP_Post $post Post object.
+ * @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 ) || $post === null ) {
+ return;
+ }
+
+ // Workaround for https://github.com/woocommerce/woocommerce/issues/18007.
+ if ( $post && 'shop_order' === $post->post_type ) {
+ $post = get_post( $post_ID );
+ }
+
+ $previous_status = isset( $this->previous_status[ $post_ID ] ) ? $this->previous_status[ $post_ID ] : self::DEFAULT_PREVIOUS_STATE;
+
+ $just_published = isset( $this->just_published[ $post_ID ] ) ? $this->just_published[ $post_ID ] : false;
+
+ $state = array(
+ 'is_auto_save' => (bool) Jetpack_Constants::get_constant( 'DOING_AUTOSAVE' ),
+ 'previous_status' => $previous_status,
+ 'just_published' => $just_published,
+ 'is_gutenberg_meta_box_update' => $this->is_gutenberg_meta_box_update(),
+ );
+ /**
+ * Filter that is used to add to the post flags ( meta data ) when a post gets published
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.8.0
+ *
+ * @param int $post_ID the post ID
+ * @param mixed $post \WP_Post object
+ * @param bool $update Whether this is an existing post being updated or not.
+ * @param mixed $state state
+ *
+ * @module sync
+ */
+ do_action( 'jetpack_sync_save_post', $post_ID, $post, $update, $state );
+ unset( $this->previous_status[ $post_ID ] );
+ }
+
+ /**
+ * Handler for the wp_after_insert_post hook.
+ * Called after creation/update of a new post.
+ *
+ * @param int $post_ID Post ID.
+ * @param \WP_Post $post Post object.
+ **/
+ public function wp_after_insert_post( $post_ID, $post ) {
+ if ( ! is_numeric( $post_ID ) || $post === null ) {
+ return;
+ }
+
+ // Workaround for https://github.com/woocommerce/woocommerce/issues/18007.
+ if ( $post && 'shop_order' === $post->post_type ) {
+ $post = get_post( $post_ID );
+ }
+
+ $this->send_published( $post_ID, $post );
+ }
+
+ /**
+ * Send a published post for sync.
+ *
+ * @param int $post_ID Post ID.
+ * @param \WP_Post $post Post object.
+ */
+ public function send_published( $post_ID, $post ) {
+ if ( ! isset( $this->just_published[ $post_ID ] ) ) {
+ return;
+ }
+
+ // Post revisions cause race conditions where this send_published add the action before the actual post gets synced.
+ if ( wp_is_post_autosave( $post ) || wp_is_post_revision( $post ) ) {
+ return;
+ }
+
+ $post_flags = array(
+ 'post_type' => $post->post_type,
+ );
+
+ $author_user_object = get_user_by( 'id', $post->post_author );
+ if ( $author_user_object ) {
+ $roles = new Roles();
+
+ $post_flags['author'] = array(
+ 'id' => $post->post_author,
+ 'wpcom_user_id' => get_user_meta( $post->post_author, 'wpcom_user_id', true ),
+ 'display_name' => $author_user_object->display_name,
+ 'email' => $author_user_object->user_email,
+ 'translated_role' => $roles->translate_user_to_role( $author_user_object ),
+ );
+ }
+
+ /**
+ * Filter that is used to add to the post flags ( meta data ) when a post gets published
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.4.0
+ *
+ * @param mixed array post flags that are added to the post
+ * @param mixed $post \WP_Post object
+ */
+ $flags = apply_filters( 'jetpack_published_post_flags', $post_flags, $post );
+
+ // Only Send Pulished Post event if post_type is not blacklisted.
+ if ( ! in_array( $post->post_type, Settings::get_setting( 'post_types_blacklist' ), true ) ) {
+
+ // Refreshing the post in the cache site before triggering the publish event.
+ // The true parameter means that it's an update action, not create action.
+ $this->wp_insert_post( $post_ID, $post, true );
+
+ /**
+ * Action that gets synced when a post type gets published.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.4.0
+ *
+ * @param int $post_ID
+ * @param mixed array $flags post flags that are added to the post
+ */
+ do_action( 'jetpack_published_post', $post_ID, $flags );
+ }
+ unset( $this->just_published[ $post_ID ] );
+
+ /**
+ * Send additional sync action for Activity Log when post is a Customizer publish
+ */
+ if ( 'customize_changeset' === $post->post_type ) {
+ $post_content = json_decode( $post->post_content, true );
+ foreach ( $post_content as $key => $value ) {
+ // Skip if it isn't a widget.
+ if ( 'widget_' !== substr( $key, 0, strlen( 'widget_' ) ) ) {
+ continue;
+ }
+ // Change key from "widget_archives[2]" to "archives-2".
+ $key = str_replace( 'widget_', '', $key );
+ $key = str_replace( '[', '-', $key );
+ $key = str_replace( ']', '', $key );
+
+ global $wp_registered_widgets;
+ if ( isset( $wp_registered_widgets[ $key ] ) ) {
+ $widget_data = array(
+ 'name' => $wp_registered_widgets[ $key ]['name'],
+ 'id' => $key,
+ 'title' => $value['value']['title'],
+ );
+ do_action( 'jetpack_widget_edited', $widget_data );
+ }
+ }
+ }
+ }
+
+ /**
+ * Expand post IDs to post objects within a hook before they are serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array $args The expanded hook parameters.
+ */
+ public function expand_post_ids( $args ) {
+ list( $post_ids, $previous_interval_end) = $args;
+
+ $posts = array_filter( array_map( array( 'WP_Post', 'get_instance' ), $post_ids ) );
+ $posts = array_map( array( $this, 'filter_post_content_and_add_links' ), $posts );
+ $posts = array_values( $posts ); // Reindex in case posts were deleted.
+
+ return array(
+ $posts,
+ $this->get_metadata( $post_ids, 'post', Settings::get_setting( 'post_meta_whitelist' ) ),
+ $this->get_term_relationships( $post_ids ),
+ $previous_interval_end,
+ );
+ }
+
+ /**
+ * Gets a list of minimum and maximum object ids for each batch based on the given batch size.
+ *
+ * @access public
+ *
+ * @param int $batch_size The batch size for objects.
+ * @param string|bool $where_sql The sql where clause minus 'WHERE', or false if no where clause is needed.
+ *
+ * @return array|bool An array of min and max ids for each batch. FALSE if no table can be found.
+ */
+ public function get_min_max_object_ids_for_batches( $batch_size, $where_sql = false ) {
+ return parent::get_min_max_object_ids_for_batches( $batch_size, $this->get_where_sql( $where_sql ) );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-protect.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-protect.php
new file mode 100644
index 00000000..fb1ae729
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-protect.php
@@ -0,0 +1,54 @@
+has_login_ability() && ! Jetpack_Constants::is_true( 'XMLRPC_REQUEST' ) ) {
+ do_action( 'jetpack_valid_failed_login_attempt', $failed_attempt );
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php
new file mode 100644
index 00000000..16db3d73
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php
@@ -0,0 +1,1875 @@
+ [ '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.
+ '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(),
+ 'ama_content' => 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 ),
+ 'guest_bio' => array(),
+ 'guest_name' => array(),
+ '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(),
+ 'people_mentioned' => 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 ),
+ 'selected_links' => array(),
+ 'session_transcript' => array(),
+ 'settings' => array(),
+ 'sex' => array(),
+ 'shares_count' => array(),
+ 'show_description' => array( 'searchable_in_all_content' => true ),
+ 'show_page_title' => array(),
+ 'show_notes' => array(),
+ 'show_notes_preview' => 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(),
+
+ // wp.com martketplace search - @see https://wp.me/pdh6GB-Ax#comment-2104
+ '_app_icon' => array(),
+ '_featured_product_video' => array(),
+ 'wpcom_marketplace_org_slug' => array(),
+ '_wc_general_product_dependency_theme' => array(),
+ '_wc_general_product_dependency_plugin' => array(),
+ 'wpcom_marketplace_product_extra_fields' => 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_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(),
+ '_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(),
+ '_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-brand',
+ 'product_brand',
+ 'product-category',
+ 'product_cat',
+ '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',
+ 'audience_type',
+ 'avhec_catgroup',
+ 'bartype',
+ 'baths',
+ 'beds',
+ 'bepro_listing_types',
+ 'blog_category',
+ 'booked_custom_calendars',
+ 'brand',
+ 'brands',
+ 'business',
+ 'business_cat',
+ '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',
+ 'document-type',
+ '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',
+ 'insight-type',
+ '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-type',
+ 'news_type_cat',
+ '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-department',
+ '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-status',
+ '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',
+ 'product_asset_class',
+ 'product_name',
+ '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',
+ 'qualifications',
+ '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',
+ 'webinar_type_cat',
+ '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',
+
+ // wp.com martketplace search - @see https://wp.me/pdh6GB-Ax#comment-2104
+ 'wpcom_marketplace_categories',
+
+ ); // end taxonomies.
+
+ /**
+ * List of options to sync
+ *
+ * @access private
+ * @static
+ *
+ * @var array
+ */
+ private static $options_to_sync = array(
+ 'jetpack_search_ai_prompt_override',
+ '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, static::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, static::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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-stats.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-stats.php
new file mode 100644
index 00000000..83479d1d
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-stats.php
@@ -0,0 +1,68 @@
+ self::MAX_INT,
+ 'term_taxonomy_id' => self::MAX_INT,
+ );
+
+ while ( $limit > 0 ) {
+ /*
+ * SELECT object_id, term_taxonomy_id
+ * FROM $wpdb->term_relationships
+ * WHERE ( object_id = 11 AND term_taxonomy_id < 14 ) OR ( object_id < 11 )
+ * ORDER BY object_id DESC, term_taxonomy_id DESC LIMIT 1000
+ */
+ $objects = $wpdb->get_results( $wpdb->prepare( "SELECT object_id, term_taxonomy_id FROM $wpdb->term_relationships WHERE ( object_id = %d AND term_taxonomy_id < %d ) OR ( object_id < %d ) ORDER BY object_id DESC, term_taxonomy_id DESC LIMIT %d", $last_object_enqueued['object_id'], $last_object_enqueued['term_taxonomy_id'], $last_object_enqueued['object_id'], $limit ), ARRAY_A );
+ // Request term relationships in groups of N for efficiency.
+ $objects_count = is_countable( $objects ) ? count( $objects ) : 0;
+ if ( ! $objects_count ) {
+ return array( $items_enqueued_count, true );
+ }
+ $items = array_chunk( $objects, $term_relationships_full_sync_item_size );
+ $last_object_enqueued = $this->bulk_enqueue_full_sync_term_relationships( $items, $last_object_enqueued );
+ $items_enqueued_count += count( $items );
+ $limit = min( $limit - $objects_count, self::QUERY_LIMIT );
+ }
+
+ // We need to do this extra check in case $max_items_to_enqueue * $term_relationships_full_sync_item_size == relationships objects left.
+ $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships WHERE ( object_id = %d AND term_taxonomy_id < %d ) OR ( object_id < %d ) ORDER BY object_id DESC, term_taxonomy_id DESC LIMIT %d", $last_object_enqueued['object_id'], $last_object_enqueued['term_taxonomy_id'], $last_object_enqueued['object_id'], 1 ) );
+ if ( 0 === (int) $count ) {
+ return array( $items_enqueued_count, true );
+ }
+
+ return array( $items_enqueued_count, $last_object_enqueued );
+ }
+
+ /**
+ * Return the initial last sent object.
+ *
+ * @return string|array initial status.
+ */
+ public function get_initial_last_sent() {
+ return array(
+ 'object_id' => self::MAX_INT,
+ 'term_taxonomy_id' => self::MAX_INT,
+ );
+ }
+
+ /**
+ * Given the Module Full Sync Configuration and Status return the next chunk of items to send.
+ *
+ * @param array $config This module Full Sync configuration.
+ * @param array $status This module Full Sync status.
+ * @param int $chunk_size Chunk size.
+ *
+ * @return array|object|null
+ */
+ public function get_next_chunk( $config, $status, $chunk_size ) {
+ global $wpdb;
+
+ return $wpdb->get_results(
+ $wpdb->prepare(
+ "SELECT object_id, term_taxonomy_id
+ FROM $wpdb->term_relationships
+ WHERE ( object_id = %d AND term_taxonomy_id < %d ) OR ( object_id < %d )
+ ORDER BY object_id DESC, term_taxonomy_id
+ DESC LIMIT %d",
+ $status['last_sent']['object_id'],
+ $status['last_sent']['term_taxonomy_id'],
+ $status['last_sent']['object_id'],
+ $chunk_size
+ ),
+ ARRAY_A
+ );
+ }
+
+ /**
+ *
+ * Enqueue all $items within `jetpack_full_sync_term_relationships` actions.
+ *
+ * @param array $items Groups of objects to sync.
+ * @param array $previous_interval_end Last item enqueued.
+ *
+ * @return array Last enqueued object.
+ */
+ public function bulk_enqueue_full_sync_term_relationships( $items, $previous_interval_end ) {
+ $listener = Listener::get_instance();
+ $items_with_previous_interval_end = $this->get_chunks_with_preceding_end( $items, $previous_interval_end );
+ $listener->bulk_enqueue_full_sync_actions( 'jetpack_full_sync_term_relationships', $items_with_previous_interval_end );
+ $last_item = end( $items );
+ return end( $last_item );
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return int Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ global $wpdb;
+
+ $query = "SELECT COUNT(*) FROM $wpdb->term_relationships";
+
+ // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared
+ $count = $wpdb->get_var( $query );
+
+ return (int) ceil( $count / Settings::get_setting( 'term_relationships_full_sync_item_size' ) );
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_term_relationships' );
+ }
+
+ /**
+ * Expand the term relationships within a hook before they are serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array $args The expanded hook parameters.
+ */
+ public function expand_term_relationships( $args ) {
+ list( $term_relationships, $previous_end ) = $args;
+
+ return array(
+ 'term_relationships' => $term_relationships,
+ 'previous_end' => $previous_end,
+ );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-terms.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-terms.php
new file mode 100644
index 00000000..7b7f605b
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-terms.php
@@ -0,0 +1,313 @@
+get_error_code() === 'invalid_taxonomy' ) {
+ // Fetch raw term.
+ $columns = implode( ', ', array_unique( array_merge( Defaults::$default_term_checksum_columns, array( 'term_group' ) ) ) );
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $object = $wpdb->get_row( $wpdb->prepare( "SELECT $columns FROM $wpdb->terms WHERE term_id = %d", $id ) );
+ }
+ }
+
+ if ( 'term_taxonomy' === $object_type ) {
+ $columns = implode( ', ', array_unique( array_merge( Defaults::$default_term_taxonomy_checksum_columns, array( 'description' ) ) ) );
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $object = $wpdb->get_row( $wpdb->prepare( "SELECT $columns FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = %d", $id ) );
+ }
+
+ if ( 'term_relationships' === $object_type ) {
+ $columns = implode( ', ', Defaults::$default_term_relationships_checksum_columns );
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $objects = $wpdb->get_results( $wpdb->prepare( "SELECT $columns FROM $wpdb->term_relationships WHERE object_id = %d", $id ) );
+ $object = (object) array(
+ 'object_id' => $id,
+ 'relationships' => array_map( array( $this, 'expand_terms_for_relationship' ), $objects ),
+ );
+ }
+
+ return $object ? $object : false;
+ }
+
+ /**
+ * Initialize terms action listeners.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_listeners( $callable ) {
+ add_action( 'created_term', array( $this, 'save_term_handler' ), 10, 3 );
+ add_action( 'edited_term', array( $this, 'save_term_handler' ), 10, 3 );
+ add_action( 'jetpack_sync_save_term', $callable );
+ add_action( 'jetpack_sync_add_term', $callable );
+ add_action( 'delete_term', $callable, 10, 4 );
+ add_action( 'set_object_terms', $callable, 10, 6 );
+ add_action( 'deleted_term_relationships', $callable, 10, 2 );
+ add_filter( 'jetpack_sync_before_enqueue_set_object_terms', array( $this, 'filter_set_object_terms_no_update' ) );
+ add_filter( 'jetpack_sync_before_enqueue_jetpack_sync_save_term', array( $this, 'filter_blacklisted_taxonomies' ) );
+ add_filter( 'jetpack_sync_before_enqueue_jetpack_sync_add_term', array( $this, 'filter_blacklisted_taxonomies' ) );
+ }
+
+ /**
+ * Initialize terms action listeners for full sync.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_full_sync_listeners( $callable ) {
+ add_action( 'jetpack_full_sync_terms', $callable, 10, 2 );
+ }
+
+ /**
+ * Initialize the module in the sender.
+ *
+ * @access public
+ */
+ public function init_before_send() {
+ // Full sync.
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_terms', array( $this, 'expand_term_taxonomy_id' ) );
+ }
+
+ /**
+ * Enqueue the terms actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue.
+ * @param boolean $state True if full sync has finished enqueueing this module, false otherwise.
+ * @return array Number of actions enqueued, and next module state.
+ */
+ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) {
+ global $wpdb;
+ return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_terms', $wpdb->term_taxonomy, 'term_taxonomy_id', $this->get_where_sql( $config ), $max_items_to_enqueue, $state );
+ }
+
+ /**
+ * Retrieve the WHERE SQL clause based on the module config.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return string WHERE SQL clause, or `null` if no comments are specified in the module config.
+ */
+ public function get_where_sql( $config ) {
+ $where_sql = Settings::get_blacklisted_taxonomies_sql();
+
+ if ( is_array( $config ) ) {
+ $where_sql .= ' AND term_taxonomy_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')';
+ }
+
+ return $where_sql;
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return int Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) {
+ global $wpdb;
+
+ $query = "SELECT count(*) FROM $wpdb->term_taxonomy";
+
+ $where_sql = $this->get_where_sql( $config );
+ if ( $where_sql ) {
+ $query .= ' WHERE ' . $where_sql;
+ }
+
+ // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared
+ $count = $wpdb->get_var( $query );
+
+ return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_terms' );
+ }
+
+ /**
+ * Handler for creating and updating terms.
+ *
+ * @access public
+ *
+ * @param int $term_id Term ID.
+ * @param int $tt_id Term taxonomy ID.
+ * @param string $taxonomy Taxonomy slug.
+ */
+ public function save_term_handler( $term_id, $tt_id, $taxonomy ) {
+ if ( class_exists( '\\WP_Term' ) ) {
+ $term_object = \WP_Term::get_instance( $term_id, $taxonomy );
+ } else {
+ $term_object = get_term_by( 'id', $term_id, $taxonomy );
+ }
+
+ $current_filter = current_filter();
+
+ if ( 'created_term' === $current_filter ) {
+ /**
+ * Fires when the client needs to add a new term
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.0.0
+ *
+ * @param object the Term object
+ */
+ do_action( 'jetpack_sync_add_term', $term_object );
+ return;
+ }
+
+ /**
+ * Fires when the client needs to update a term
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param object the Term object
+ */
+ do_action( 'jetpack_sync_save_term', $term_object );
+ }
+
+ /**
+ * Filter blacklisted taxonomies.
+ *
+ * @access public
+ *
+ * @param array $args Hook args.
+ * @return array|boolean False if not whitelisted, the original hook args otherwise.
+ */
+ public function filter_blacklisted_taxonomies( $args ) {
+ $term = $args[0];
+
+ if ( in_array( $term->taxonomy, Settings::get_setting( 'taxonomies_blacklist' ), true ) ) {
+ return false;
+ }
+
+ return $args;
+ }
+
+ /**
+ * Filter out set_object_terms actions where the terms have not changed.
+ *
+ * @param array $args Hook args.
+ * @return array|boolean False if no change in terms, the original hook args otherwise.
+ */
+ public function filter_set_object_terms_no_update( $args ) {
+ // There is potential for other plugins to modify args, therefore lets validate # of and types.
+ // $args[2] is $tt_ids, $args[5] is $old_tt_ids see wp-includes/taxonomy.php L2740.
+ if ( 6 === count( $args ) && is_array( $args[2] ) && is_array( $args[5] ) ) {
+ if ( empty( array_diff( $args[2], $args[5] ) ) && empty( array_diff( $args[5], $args[2] ) ) ) {
+ return false;
+ }
+ }
+ return $args;
+ }
+
+ /**
+ * Expand the term taxonomy IDs to terms within a hook before they are serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array $args The expanded hook parameters.
+ */
+ public function expand_term_taxonomy_id( $args ) {
+ list( $term_taxonomy_ids, $previous_end ) = $args;
+
+ return array(
+ 'terms' => get_terms(
+ array(
+ 'hide_empty' => false,
+ 'term_taxonomy_id' => $term_taxonomy_ids,
+ 'orderby' => 'term_taxonomy_id',
+ 'order' => 'DESC',
+ )
+ ),
+ 'previous_end' => $previous_end,
+ );
+ }
+
+ /**
+ * Gets a term object based on a given row from the term_relationships database table.
+ *
+ * @access public
+ *
+ * @param object $relationship A row object from the term_relationships table.
+ * @return object|bool A term object, or false if term taxonomy doesn't exist.
+ */
+ public function expand_terms_for_relationship( $relationship ) {
+ return get_term_by( 'term_taxonomy_id', $relationship->term_taxonomy_id );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-themes.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-themes.php
new file mode 100644
index 00000000..5a5f02ec
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-themes.php
@@ -0,0 +1,876 @@
+ $widget_object->name,
+ 'id' => $widget_object->id,
+ 'title' => isset( $new_instance['title'] ) ? $new_instance['title'] : '',
+ );
+ /**
+ * Trigger action to alert $callable sync listener that a widget was edited.
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.0.0
+ *
+ * @param string $widget_name , Name of edited widget
+ */
+ do_action( 'jetpack_widget_edited', $widget );
+
+ return $instance;
+ }
+
+ /**
+ * Sync handler for network allowed themes change.
+ *
+ * @access public
+ *
+ * @param string $option Name of the network option.
+ * @param mixed $value Current value of the network option.
+ * @param mixed $old_value Old value of the network option.
+ * @param int $network_id ID of the network.
+ */
+ public function sync_network_allowed_themes_change( $option, $value, $old_value, $network_id ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ $all_enabled_theme_slugs = array_keys( $value );
+ $old_value_count = is_countable( $old_value ) ? count( $old_value ) : 0;
+ $value_count = is_countable( $value ) ? count( $value ) : 0;
+
+ if ( $old_value_count > $value_count ) {
+ // Suppress jetpack_network_disabled_themes sync action when theme is deleted.
+ $delete_theme_call = $this->get_delete_theme_call();
+ if ( ! empty( $delete_theme_call ) ) {
+ return;
+ }
+
+ $newly_disabled_theme_names = array_keys( array_diff_key( $old_value, $value ) );
+ $newly_disabled_themes = $this->get_theme_details_for_slugs( $newly_disabled_theme_names );
+ /**
+ * Trigger action to alert $callable sync listener that network themes were disabled.
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.0.0
+ *
+ * @param mixed $newly_disabled_themes, Array of info about network disabled themes
+ * @param mixed $all_enabled_theme_slugs, Array of slugs of all enabled themes
+ */
+ do_action( 'jetpack_network_disabled_themes', $newly_disabled_themes, $all_enabled_theme_slugs );
+ return;
+ }
+
+ $newly_enabled_theme_names = array_keys( array_diff_key( $value, $old_value ) );
+ $newly_enabled_themes = $this->get_theme_details_for_slugs( $newly_enabled_theme_names );
+ /**
+ * Trigger action to alert $callable sync listener that network themes were enabled
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.0.0
+ *
+ * @param mixed $newly_enabled_themes , Array of info about network enabled themes
+ * @param mixed $all_enabled_theme_slugs, Array of slugs of all enabled themes
+ */
+ do_action( 'jetpack_network_enabled_themes', $newly_enabled_themes, $all_enabled_theme_slugs );
+ }
+
+ /**
+ * Retrieve details for one or more themes by their slugs.
+ *
+ * @access private
+ *
+ * @param array $theme_slugs Theme slugs.
+ * @return array Details for the themes.
+ */
+ private function get_theme_details_for_slugs( $theme_slugs ) {
+ $theme_data = array();
+ foreach ( $theme_slugs as $slug ) {
+ $theme = wp_get_theme( $slug );
+ $theme_data[ $slug ] = array(
+ 'name' => $theme->get( 'Name' ),
+ 'version' => $theme->get( 'Version' ),
+ 'uri' => $theme->get( 'ThemeURI' ),
+ 'slug' => $slug,
+ );
+ }
+ return $theme_data;
+ }
+
+ /**
+ * Detect a theme edit during a redirect.
+ *
+ * @access public
+ *
+ * @param string $redirect_url Redirect URL.
+ * @return string Redirect URL.
+ */
+ public function detect_theme_edit( $redirect_url ) {
+ $url = wp_parse_url( admin_url( $redirect_url ) );
+ $theme_editor_url = wp_parse_url( admin_url( 'theme-editor.php' ) );
+
+ if ( $theme_editor_url['path'] !== $url['path'] ) {
+ return $redirect_url;
+ }
+
+ $query_params = array();
+ wp_parse_str( $url['query'], $query_params );
+ if (
+ ! isset( $_POST['newcontent'] ) ||
+ ! isset( $query_params['file'] ) ||
+ ! isset( $query_params['theme'] ) ||
+ ! isset( $query_params['updated'] )
+ ) {
+ return $redirect_url;
+ }
+ $theme = wp_get_theme( $query_params['theme'] );
+ $theme_data = array(
+ 'name' => $theme->get( 'Name' ),
+ 'version' => $theme->get( 'Version' ),
+ 'uri' => $theme->get( 'ThemeURI' ),
+ );
+
+ /**
+ * Trigger action to alert $callable sync listener that a theme was edited.
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.0.0
+ *
+ * @param string $query_params['theme'], Slug of edited theme
+ * @param string $theme_data, Information about edited them
+ */
+ do_action( 'jetpack_edited_theme', $query_params['theme'], $theme_data );
+
+ return $redirect_url;
+ }
+
+ /**
+ * Handler for AJAX theme editing.
+ *
+ * @todo Refactor to use WP_Filesystem instead of fopen()/fclose().
+ */
+ public function theme_edit_ajax() {
+ $args = wp_unslash( $_POST );
+
+ if ( empty( $args['theme'] ) ) {
+ return;
+ }
+
+ if ( empty( $args['file'] ) ) {
+ return;
+ }
+ $file = $args['file'];
+ if ( 0 !== validate_file( $file ) ) {
+ return;
+ }
+
+ if ( ! isset( $args['newcontent'] ) ) {
+ return;
+ }
+
+ if ( ! isset( $args['nonce'] ) ) {
+ return;
+ }
+
+ $stylesheet = $args['theme'];
+ if ( 0 !== validate_file( $stylesheet ) ) {
+ return;
+ }
+
+ if ( ! current_user_can( 'edit_themes' ) ) {
+ return;
+ }
+
+ $theme = wp_get_theme( $stylesheet );
+ if ( ! $theme->exists() ) {
+ return;
+ }
+
+ if ( ! wp_verify_nonce( $args['nonce'], 'edit-theme_' . $stylesheet . '_' . $file ) ) {
+ return;
+ }
+
+ if ( $theme->errors() && 'theme_no_stylesheet' === $theme->errors()->get_error_code() ) {
+ return;
+ }
+
+ $editable_extensions = wp_get_theme_file_editable_extensions( $theme );
+
+ $allowed_files = array();
+ foreach ( $editable_extensions as $type ) {
+ switch ( $type ) {
+ case 'php':
+ $allowed_files = array_merge( $allowed_files, $theme->get_files( 'php', -1 ) );
+ break;
+ case 'css':
+ $style_files = $theme->get_files( 'css', -1 );
+ $allowed_files['style.css'] = $style_files['style.css'];
+ $allowed_files = array_merge( $allowed_files, $style_files );
+ break;
+ default:
+ $allowed_files = array_merge( $allowed_files, $theme->get_files( $type, -1 ) );
+ break;
+ }
+ }
+
+ $real_file = $theme->get_stylesheet_directory() . '/' . $file;
+ if ( 0 !== validate_file( $real_file, $allowed_files ) ) {
+ return;
+ }
+
+ // Ensure file is real.
+ if ( ! is_file( $real_file ) ) {
+ return;
+ }
+
+ // Ensure file extension is allowed.
+ $extension = null;
+ if ( preg_match( '/\.([^.]+)$/', $real_file, $matches ) ) {
+ $extension = strtolower( $matches[1] );
+ if ( ! in_array( $extension, $editable_extensions, true ) ) {
+ return;
+ }
+ }
+
+ // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_is_writable
+ if ( ! is_writable( $real_file ) ) {
+ return;
+ }
+
+ // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fopen
+ $file_pointer = fopen( $real_file, 'w+' );
+ if ( false === $file_pointer ) {
+ return;
+ }
+ // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose
+ fclose( $file_pointer );
+
+ $theme_data = array(
+ 'name' => $theme->get( 'Name' ),
+ 'version' => $theme->get( 'Version' ),
+ 'uri' => $theme->get( 'ThemeURI' ),
+ );
+
+ /**
+ * This action is documented already in this file.
+ */
+ do_action( 'jetpack_edited_theme', $stylesheet, $theme_data );
+ }
+
+ /**
+ * Detect a theme deletion.
+ *
+ * @access public
+ *
+ * @param string $stylesheet Stylesheet of the theme to delete.
+ * @param bool $deleted Whether the theme deletion was successful.
+ */
+ public function detect_theme_deletion( $stylesheet, $deleted ) {
+ $theme = wp_get_theme( $stylesheet );
+ $theme_data = array(
+ 'name' => $theme->get( 'Name' ),
+ 'version' => $theme->get( 'Version' ),
+ 'uri' => $theme->get( 'ThemeURI' ),
+ 'slug' => $stylesheet,
+ );
+
+ if ( $deleted ) {
+ /**
+ * Signals to the sync listener that a theme was deleted and a sync action
+ * reflecting the deletion and theme slug should be sent
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.0.0
+ *
+ * @param string $stylesheet Theme slug
+ * @param array $theme_data Theme info Since 5.3
+ */
+ do_action( 'jetpack_deleted_theme', $stylesheet, $theme_data );
+ }
+ }
+
+ /**
+ * Handle an upgrader completion action.
+ *
+ * @access public
+ *
+ * @param \WP_Upgrader $upgrader The upgrader instance.
+ * @param array $details Array of bulk item update data.
+ */
+ public function check_upgrader( $upgrader, $details ) {
+ if ( ! isset( $details['type'] ) ||
+ 'theme' !== $details['type'] ||
+ is_wp_error( $upgrader->skin->result ) ||
+ ! method_exists( $upgrader, 'theme_info' )
+ ) {
+ return;
+ }
+
+ if ( 'install' === $details['action'] ) {
+ $theme = $upgrader->theme_info();
+ if ( ! $theme instanceof \WP_Theme ) {
+ return;
+ }
+ $theme_info = array(
+ 'name' => $theme->get( 'Name' ),
+ 'version' => $theme->get( 'Version' ),
+ 'uri' => $theme->get( 'ThemeURI' ),
+ );
+
+ /**
+ * Signals to the sync listener that a theme was installed and a sync action
+ * reflecting the installation and the theme info should be sent
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.9.0
+ *
+ * @param string $theme->theme_root Text domain of the theme
+ * @param mixed $theme_info Array of abbreviated theme info
+ */
+ do_action( 'jetpack_installed_theme', $theme->stylesheet, $theme_info );
+ }
+
+ if ( 'update' === $details['action'] ) {
+ $themes = array();
+
+ if ( empty( $details['themes'] ) && isset( $details['theme'] ) ) {
+ $details['themes'] = array( $details['theme'] );
+ }
+
+ foreach ( $details['themes'] as $theme_slug ) {
+ $theme = wp_get_theme( $theme_slug );
+
+ if ( ! $theme instanceof \WP_Theme ) {
+ continue;
+ }
+
+ $themes[ $theme_slug ] = array(
+ 'name' => $theme->get( 'Name' ),
+ 'version' => $theme->get( 'Version' ),
+ 'uri' => $theme->get( 'ThemeURI' ),
+ 'stylesheet' => $theme->stylesheet,
+ );
+ }
+
+ if ( empty( $themes ) ) {
+ return;
+ }
+
+ /**
+ * Signals to the sync listener that one or more themes was updated and a sync action
+ * reflecting the update and the theme info should be sent
+ *
+ * @since 1.6.3
+ * @since-jetpack 6.2.0
+ *
+ * @param mixed $themes Array of abbreviated theme info
+ */
+ do_action( 'jetpack_updated_themes', $themes );
+ }
+ }
+
+ /**
+ * Initialize themes action listeners for full sync.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_full_sync_listeners( $callable ) {
+ add_action( 'jetpack_full_sync_theme_data', $callable );
+ }
+
+ /**
+ * Handle a theme switch.
+ *
+ * @access public
+ *
+ * @param string $new_name Name of the new theme.
+ * @param \WP_Theme $new_theme The new theme.
+ * @param \WP_Theme $old_theme The previous theme.
+ */
+ public function sync_theme_support( $new_name, $new_theme = null, $old_theme = null ) {
+ $previous_theme = $this->get_theme_info( $old_theme );
+
+ /**
+ * Fires when the client needs to sync theme support info
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param array the theme support array
+ * @param array the previous theme since Jetpack 6.5.0
+ */
+ do_action( 'jetpack_sync_current_theme_support', $this->get_theme_info(), $previous_theme );
+ }
+
+ /**
+ * Enqueue the themes actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue.
+ * @param boolean $state True if full sync has finished enqueueing this module, false otherwise.
+ * @return array Number of actions enqueued, and next module state.
+ */
+ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ /**
+ * Tells the client to sync all theme data to the server
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param boolean Whether to expand theme data (should always be true)
+ */
+ do_action( 'jetpack_full_sync_theme_data', true );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 1, true );
+ }
+
+ /**
+ * Send the themes actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $send_until The timestamp until the current request can send.
+ * @param array $state This module Full Sync status.
+ *
+ * @return array This module Full Sync status.
+ */
+ public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ // we call this instead of do_action when sending immediately.
+ $this->send_action( 'jetpack_full_sync_theme_data', array( true ) );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 'finished' => true );
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return array Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return 1;
+ }
+
+ /**
+ * Initialize the module in the sender.
+ *
+ * @access public
+ */
+ public function init_before_send() {
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_theme_data', array( $this, 'expand_theme_data' ) );
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_theme_data' );
+ }
+
+ /**
+ * Expand the theme within a hook before it is serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @return array Theme data.
+ */
+ public function expand_theme_data() {
+ return array( $this->get_theme_info() );
+ }
+
+ /**
+ * Retrieve the name of the widget by the widget ID.
+ *
+ * @access public
+ * @global $wp_registered_widgets
+ *
+ * @param string $widget_id Widget ID.
+ * @return string Name of the widget, or null if not found.
+ */
+ public function get_widget_name( $widget_id ) {
+ global $wp_registered_widgets;
+ return ( isset( $wp_registered_widgets[ $widget_id ] ) ? $wp_registered_widgets[ $widget_id ]['name'] : null );
+ }
+
+ /**
+ * Retrieve the name of the sidebar by the sidebar ID.
+ *
+ * @access public
+ * @global $wp_registered_sidebars
+ *
+ * @param string $sidebar_id Sidebar ID.
+ * @return string Name of the sidebar, or null if not found.
+ */
+ public function get_sidebar_name( $sidebar_id ) {
+ global $wp_registered_sidebars;
+ return ( isset( $wp_registered_sidebars[ $sidebar_id ] ) ? $wp_registered_sidebars[ $sidebar_id ]['name'] : null );
+ }
+
+ /**
+ * Sync addition of widgets to a sidebar.
+ *
+ * @access public
+ *
+ * @param array $new_widgets New widgets.
+ * @param array $old_widgets Old widgets.
+ * @param string $sidebar Sidebar ID.
+ * @return array All widgets that have been moved to the sidebar.
+ */
+ public function sync_add_widgets_to_sidebar( $new_widgets, $old_widgets, $sidebar ) {
+ $added_widgets = array_diff( $new_widgets, $old_widgets );
+ if ( empty( $added_widgets ) ) {
+ return array();
+ }
+ $moved_to_sidebar = array();
+ $sidebar_name = $this->get_sidebar_name( $sidebar );
+
+ // Don't sync jetpack_widget_added if theme was switched.
+ if ( $this->is_theme_switch() ) {
+ return array();
+ }
+
+ foreach ( $added_widgets as $added_widget ) {
+ $moved_to_sidebar[] = $added_widget;
+ $added_widget_name = $this->get_widget_name( $added_widget );
+ /**
+ * Helps Sync log that a widget got added
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.9.0
+ *
+ * @param string $sidebar, Sidebar id got changed
+ * @param string $added_widget, Widget id got added
+ * @param string $sidebar_name, Sidebar id got changed Since 5.0.0
+ * @param string $added_widget_name, Widget id got added Since 5.0.0
+ */
+ do_action( 'jetpack_widget_added', $sidebar, $added_widget, $sidebar_name, $added_widget_name );
+ }
+ return $moved_to_sidebar;
+ }
+
+ /**
+ * Sync removal of widgets from a sidebar.
+ *
+ * @access public
+ *
+ * @param array $new_widgets New widgets.
+ * @param array $old_widgets Old widgets.
+ * @param string $sidebar Sidebar ID.
+ * @param array $inactive_widgets Current inactive widgets.
+ * @return array All widgets that have been moved to inactive.
+ */
+ public function sync_remove_widgets_from_sidebar( $new_widgets, $old_widgets, $sidebar, $inactive_widgets ) {
+ $removed_widgets = array_diff( $old_widgets, $new_widgets );
+
+ if ( empty( $removed_widgets ) ) {
+ return array();
+ }
+
+ $moved_to_inactive = array();
+ $sidebar_name = $this->get_sidebar_name( $sidebar );
+
+ foreach ( $removed_widgets as $removed_widget ) {
+ // Lets check if we didn't move the widget to in_active_widgets.
+ if ( isset( $inactive_widgets ) && ! in_array( $removed_widget, $inactive_widgets, true ) ) {
+ $removed_widget_name = $this->get_widget_name( $removed_widget );
+ /**
+ * Helps Sync log that a widgte got removed
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.9.0
+ *
+ * @param string $sidebar, Sidebar id got changed
+ * @param string $removed_widget, Widget id got removed
+ * @param string $sidebar_name, Name of the sidebar that changed Since 5.0.0
+ * @param string $removed_widget_name, Name of the widget that got removed Since 5.0.0
+ */
+ do_action( 'jetpack_widget_removed', $sidebar, $removed_widget, $sidebar_name, $removed_widget_name );
+ } else {
+ $moved_to_inactive[] = $removed_widget;
+ }
+ }
+ return $moved_to_inactive;
+ }
+
+ /**
+ * Sync a reorder of widgets within a sidebar.
+ *
+ * @access public
+ *
+ * @todo Refactor serialize() to a json_encode().
+ *
+ * @param array $new_widgets New widgets.
+ * @param array $old_widgets Old widgets.
+ * @param string $sidebar Sidebar ID.
+ */
+ public function sync_widgets_reordered( $new_widgets, $old_widgets, $sidebar ) {
+ $added_widgets = array_diff( $new_widgets, $old_widgets );
+ if ( ! empty( $added_widgets ) ) {
+ return;
+ }
+ $removed_widgets = array_diff( $old_widgets, $new_widgets );
+ if ( ! empty( $removed_widgets ) ) {
+ return;
+ }
+
+ // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize
+ if ( serialize( $old_widgets ) !== serialize( $new_widgets ) ) {
+ $sidebar_name = $this->get_sidebar_name( $sidebar );
+ /**
+ * Helps Sync log that a sidebar id got reordered
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.9.0
+ *
+ * @param string $sidebar, Sidebar id got changed
+ * @param string $sidebar_name, Name of the sidebar that changed Since 5.0.0
+ */
+ do_action( 'jetpack_widget_reordered', $sidebar, $sidebar_name );
+ }
+ }
+
+ /**
+ * Handle the update of the sidebars and widgets mapping option.
+ *
+ * @access public
+ *
+ * @param mixed $old_value The old option value.
+ * @param mixed $new_value The new option value.
+ */
+ public function sync_sidebar_widgets_actions( $old_value, $new_value ) {
+ // Don't really know how to deal with different array_values yet.
+ if (
+ ( isset( $old_value['array_version'] ) && 3 !== $old_value['array_version'] ) ||
+ ( isset( $new_value['array_version'] ) && 3 !== $new_value['array_version'] )
+ ) {
+ return;
+ }
+
+ $moved_to_inactive_ids = array();
+ $moved_to_sidebar = array();
+
+ foreach ( $new_value as $sidebar => $new_widgets ) {
+ if ( in_array( $sidebar, array( 'array_version', 'wp_inactive_widgets' ), true ) ) {
+ continue;
+ }
+ $old_widgets = isset( $old_value[ $sidebar ] )
+ ? $old_value[ $sidebar ]
+ : array();
+
+ if ( ! is_array( $new_widgets ) ) {
+ $new_widgets = array();
+ }
+
+ $moved_to_inactive_recently = $this->sync_remove_widgets_from_sidebar( $new_widgets, $old_widgets, $sidebar, $new_value['wp_inactive_widgets'] );
+ $moved_to_inactive_ids = array_merge( $moved_to_inactive_ids, $moved_to_inactive_recently );
+
+ $moved_to_sidebar_recently = $this->sync_add_widgets_to_sidebar( $new_widgets, $old_widgets, $sidebar );
+ $moved_to_sidebar = array_merge( $moved_to_sidebar, $moved_to_sidebar_recently );
+
+ $this->sync_widgets_reordered( $new_widgets, $old_widgets, $sidebar );
+
+ }
+
+ // Don't sync either jetpack_widget_moved_to_inactive or jetpack_cleared_inactive_widgets if theme was switched.
+ if ( $this->is_theme_switch() ) {
+ return;
+ }
+
+ // Treat inactive sidebar a bit differently.
+ if ( ! empty( $moved_to_inactive_ids ) ) {
+ $moved_to_inactive_name = array_map( array( $this, 'get_widget_name' ), $moved_to_inactive_ids );
+ /**
+ * Helps Sync log that a widgets IDs got moved to in active
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.9.0
+ *
+ * @param array $moved_to_inactive_ids, Array of widgets id that moved to inactive id got changed
+ * @param array $moved_to_inactive_names, Array of widgets names that moved to inactive id got changed Since 5.0.0
+ */
+ do_action( 'jetpack_widget_moved_to_inactive', $moved_to_inactive_ids, $moved_to_inactive_name );
+ } elseif ( empty( $moved_to_sidebar ) && empty( $new_value['wp_inactive_widgets'] ) && ! empty( $old_value['wp_inactive_widgets'] ) ) {
+ /**
+ * Helps Sync log that a got cleared from inactive.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.9.0
+ */
+ do_action( 'jetpack_cleared_inactive_widgets' );
+ }
+ }
+
+ /**
+ * Retrieve the theme data for the current or a specific theme.
+ *
+ * @access private
+ *
+ * @param \WP_Theme $theme Theme object. Optional, will default to the current theme.
+ *
+ * @return array Theme data.
+ */
+ private function get_theme_info( $theme = null ) {
+ $theme_support = array();
+
+ // We are trying to get the current theme info.
+ if ( null === $theme ) {
+ $theme = wp_get_theme();
+ }
+
+ $theme_support['name'] = $theme->get( 'Name' );
+ $theme_support['version'] = $theme->get( 'Version' );
+ $theme_support['slug'] = $theme->get_stylesheet();
+ $theme_support['uri'] = $theme->get( 'ThemeURI' );
+
+ return $theme_support;
+ }
+
+ /**
+ * Whether we've deleted a theme in the current request.
+ *
+ * @access private
+ *
+ * @return boolean True if this is a theme deletion request, false otherwise.
+ */
+ private function get_delete_theme_call() {
+ // Intentional usage of `debug_backtrace()` for production needs.
+ // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
+ $backtrace = debug_backtrace();
+ $delete_theme_call = null;
+ foreach ( $backtrace as $call ) {
+ if ( isset( $call['function'] ) && 'delete_theme' === $call['function'] ) {
+ $delete_theme_call = $call;
+ break;
+ }
+ }
+ return $delete_theme_call;
+ }
+
+ /**
+ * Whether we've switched to another theme in the current request.
+ *
+ * @access private
+ *
+ * @return boolean True if this is a theme switch request, false otherwise.
+ */
+ private function is_theme_switch() {
+ return did_action( 'after_switch_theme' );
+ }
+
+ /**
+ * Return Total number of objects.
+ *
+ * @param array $config Full Sync config.
+ *
+ * @return int total
+ */
+ public function total( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return 1;
+ }
+
+ /**
+ * Retrieve a set of constants by their IDs.
+ *
+ * @access public
+ *
+ * @param string $object_type Object type.
+ * @param array $ids Object IDs.
+ * @return array Array of objects.
+ */
+ public function get_objects_by_id( $object_type, $ids ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ if ( 'theme-info' !== $object_type ) {
+ return array();
+ }
+
+ return array( $this->get_theme_info() );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-updates.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-updates.php
new file mode 100644
index 00000000..570e24a4
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-updates.php
@@ -0,0 +1,589 @@
+updates = array();
+ }
+
+ /**
+ * Sync module name.
+ *
+ * @access public
+ *
+ * @return string
+ */
+ public function name() {
+ return 'updates';
+ }
+
+ /**
+ * Initialize updates action listeners.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_listeners( $callable ) {
+ global $wp_version;
+ $this->old_wp_version = $wp_version;
+ add_action( 'set_site_transient_update_plugins', array( $this, 'validate_update_change' ), 10, 3 );
+ add_action( 'set_site_transient_update_themes', array( $this, 'validate_update_change' ), 10, 3 );
+ add_action( 'set_site_transient_update_core', array( $this, 'validate_update_change' ), 10, 3 );
+
+ add_action( 'jetpack_update_plugins_change', $callable );
+ add_action( 'jetpack_update_themes_change', $callable );
+ add_action( 'jetpack_update_core_change', $callable );
+
+ add_filter(
+ 'jetpack_sync_before_enqueue_jetpack_update_themes_change',
+ array(
+ $this,
+ 'expand_themes',
+ )
+ );
+
+ add_filter(
+ 'jetpack_sync_before_enqueue_jetpack_update_plugins_change',
+ array(
+ $this,
+ 'filter_update_keys',
+ ),
+ 10,
+ 2
+ );
+ add_filter(
+ 'jetpack_sync_before_enqueue_upgrader_process_complete',
+ array(
+ $this,
+ 'filter_upgrader_process_complete',
+ ),
+ 10,
+ 2
+ );
+
+ add_action( 'automatic_updates_complete', $callable );
+
+ if ( is_multisite() ) {
+ add_filter( 'pre_update_site_option_wpmu_upgrade_site', array( $this, 'update_core_network_event' ), 10, 2 );
+ add_action( 'jetpack_sync_core_update_network', $callable, 10, 3 );
+ }
+
+ // Send data when update completes.
+ add_action( '_core_updated_successfully', array( $this, 'update_core' ) );
+ add_action( 'jetpack_sync_core_reinstalled_successfully', $callable );
+ add_action( 'jetpack_sync_core_autoupdated_successfully', $callable, 10, 2 );
+ add_action( 'jetpack_sync_core_updated_successfully', $callable, 10, 2 );
+ }
+
+ /**
+ * Initialize updates action listeners for full sync.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_full_sync_listeners( $callable ) {
+ add_action( 'jetpack_full_sync_updates', $callable );
+ }
+
+ /**
+ * Initialize the module in the sender.
+ *
+ * @access public
+ */
+ public function init_before_send() {
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_updates', array( $this, 'expand_updates' ) );
+ }
+
+ /**
+ * Handle a core network update.
+ *
+ * @access public
+ *
+ * @param int $wp_db_version Current version of the WordPress database.
+ * @param int $old_wp_db_version Old version of the WordPress database.
+ * @return int Current version of the WordPress database.
+ */
+ public function update_core_network_event( $wp_db_version, $old_wp_db_version ) {
+ global $wp_version;
+ /**
+ * Sync event for when core wp network updates to a new db version
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.0.0
+ *
+ * @param int $wp_db_version the latest wp_db_version
+ * @param int $old_wp_db_version previous wp_db_version
+ * @param string $wp_version the latest wp_version
+ */
+ do_action( 'jetpack_sync_core_update_network', $wp_db_version, $old_wp_db_version, $wp_version );
+ return $wp_db_version;
+ }
+
+ /**
+ * Handle a core update.
+ *
+ * @access public
+ *
+ * @todo Implement nonce or refactor to use `admin_post_{$action}` hooks instead.
+ *
+ * @param string $new_wp_version The new WP core version.
+ */
+ public function update_core( $new_wp_version ) {
+ global $pagenow;
+
+ // // phpcs:ignore WordPress.Security.NonceVerification.Recommended
+ if ( isset( $_GET['action'] ) && 'do-core-reinstall' === $_GET['action'] ) {
+ /**
+ * Sync event that fires when core reinstall was successful
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.0.0
+ *
+ * @param string $new_wp_version the updated WordPress version
+ */
+ do_action( 'jetpack_sync_core_reinstalled_successfully', $new_wp_version );
+ return;
+ }
+
+ // Core was autoupdated.
+ if (
+ 'update-core.php' !== $pagenow &&
+ ! Jetpack_Constants::is_true( 'REST_API_REQUEST' ) // WP.com rest api calls should never be marked as a core autoupdate.
+ ) {
+ /**
+ * Sync event that fires when core autoupdate was successful
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.0.0
+ *
+ * @param string $new_wp_version the updated WordPress version
+ * @param string $old_wp_version the previous WordPress version
+ */
+ do_action( 'jetpack_sync_core_autoupdated_successfully', $new_wp_version, $this->old_wp_version );
+ return;
+ }
+ /**
+ * Sync event that fires when core update was successful
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.0.0
+ *
+ * @param string $new_wp_version the updated WordPress version
+ * @param string $old_wp_version the previous WordPress version
+ */
+ do_action( 'jetpack_sync_core_updated_successfully', $new_wp_version, $this->old_wp_version );
+ }
+
+ /**
+ * Retrieve the checksum for an update.
+ *
+ * @access public
+ *
+ * @param object $update The update object.
+ * @param string $transient The transient we're retrieving a checksum for.
+ * @return int The checksum.
+ */
+ public function get_update_checksum( $update, $transient ) {
+ $updates = array();
+ $no_updated = array();
+ switch ( $transient ) {
+ case 'update_plugins':
+ if ( ! empty( $update->response ) && is_array( $update->response ) ) {
+ foreach ( $update->response as $plugin_slug => $response ) {
+ if ( ! empty( $plugin_slug ) && isset( $response->new_version ) ) {
+ $updates[] = array( $plugin_slug => $response->new_version );
+ }
+ }
+ }
+ if ( ! empty( $update->no_update ) ) {
+ $no_updated = array_keys( $update->no_update );
+ }
+
+ if ( ! isset( $no_updated['jetpack/jetpack.php'] ) && isset( $updates['jetpack/jetpack.php'] ) ) {
+ return false;
+ }
+
+ break;
+ case 'update_themes':
+ if ( ! empty( $update->response ) && is_array( $update->response ) ) {
+ foreach ( $update->response as $theme_slug => $response ) {
+ if ( ! empty( $theme_slug ) && isset( $response['new_version'] ) ) {
+ $updates[] = array( $theme_slug => $response['new_version'] );
+ }
+ }
+ }
+
+ if ( ! empty( $update->checked ) ) {
+ $no_updated = $update->checked;
+ }
+
+ break;
+ case 'update_core':
+ if ( ! empty( $update->updates ) && is_array( $update->updates ) ) {
+ foreach ( $update->updates as $response ) {
+ if ( ! empty( $response->response ) && 'latest' === $response->response ) {
+ continue;
+ }
+ if ( ! empty( $response->response ) && isset( $response->packages->full ) ) {
+ $updates[] = array( $response->response => $response->packages->full );
+ }
+ }
+ }
+
+ if ( ! empty( $update->version_checked ) ) {
+ $no_updated = $update->version_checked;
+ }
+
+ if ( empty( $updates ) ) {
+ return false;
+ }
+ break;
+
+ }
+ if ( empty( $updates ) && empty( $no_updated ) ) {
+ return false;
+ }
+ return $this->get_check_sum( array( $no_updated, $updates ) );
+ }
+
+ /**
+ * Validate a change coming from an update before sending for sync.
+ *
+ * @access public
+ *
+ * @param mixed $value Site transient value.
+ * @param int $expiration Time until transient expiration in seconds.
+ * @param string $transient Transient name.
+ */
+ public function validate_update_change( $value, $expiration, $transient ) {
+ $new_checksum = $this->get_update_checksum( $value, $transient );
+
+ if ( false === $new_checksum ) {
+ return;
+ }
+
+ $checksums = get_option( self::UPDATES_CHECKSUM_OPTION_NAME, array() );
+
+ if ( isset( $checksums[ $transient ] ) && $checksums[ $transient ] === $new_checksum ) {
+ return;
+ }
+
+ $checksums[ $transient ] = $new_checksum;
+
+ update_option( self::UPDATES_CHECKSUM_OPTION_NAME, $checksums );
+ if ( 'update_core' === $transient ) {
+ /**
+ * Trigger a change to core update that we want to sync.
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.1.0
+ *
+ * @param array $value Contains info that tells us what needs updating.
+ */
+ do_action( 'jetpack_update_core_change', $value );
+ return;
+ }
+ if ( empty( $this->updates ) ) {
+ // Lets add the shutdown method once and only when the updates move from empty to filled with something.
+ add_action( 'shutdown', array( $this, 'sync_last_event' ), 9 );
+ }
+ if ( ! isset( $this->updates[ $transient ] ) ) {
+ $this->updates[ $transient ] = array();
+ }
+ $this->updates[ $transient ][] = $value;
+ }
+
+ /**
+ * Sync the last update only.
+ *
+ * @access public
+ */
+ public function sync_last_event() {
+ foreach ( $this->updates as $transient => $values ) {
+ $value = end( $values ); // Only send over the last value.
+ /**
+ * Trigger a change to a specific update that we want to sync.
+ * Triggers one of the following actions:
+ * - jetpack_{$transient}_change
+ * - jetpack_update_plugins_change
+ * - jetpack_update_themes_change
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.1.0
+ *
+ * @param array $value Contains info that tells us what needs updating.
+ */
+ do_action( "jetpack_{$transient}_change", $value );
+ }
+ }
+
+ /**
+ * Enqueue the updates actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue.
+ * @param boolean $state True if full sync has finished enqueueing this module, false otherwise.
+ * @return array Number of actions enqueued, and next module state.
+ */
+ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ /**
+ * Tells the client to sync all updates to the server
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param boolean Whether to expand updates (should always be true)
+ */
+ do_action( 'jetpack_full_sync_updates', true );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 1, true );
+ }
+
+ /**
+ * Send the updates actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $send_until The timestamp until the current request can send.
+ * @param array $state This module Full Sync status.
+ *
+ * @return array This module Full Sync status.
+ */
+ public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ // we call this instead of do_action when sending immediately.
+ $this->send_action( 'jetpack_full_sync_updates', array( true ) );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 'finished' => true );
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return array Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return 1;
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_updates' );
+ }
+
+ /**
+ * Retrieve all updates that we're interested in.
+ *
+ * @access public
+ *
+ * @return array All updates.
+ */
+ public function get_all_updates() {
+ return array(
+ 'core' => get_site_transient( 'update_core' ),
+ 'plugins' => get_site_transient( 'update_plugins' ),
+ 'themes' => get_site_transient( 'update_themes' ),
+ );
+ }
+
+ /**
+ * Remove unnecessary keys from synced updates data.
+ *
+ * @access public
+ *
+ * @param array $args Hook arguments.
+ * @return array $args Hook arguments.
+ */
+ public function filter_update_keys( $args ) {
+ $updates = $args[0];
+
+ if ( isset( $updates->no_update ) ) {
+ unset( $updates->no_update );
+ }
+
+ return $args;
+ }
+
+ /**
+ * Filter out upgrader object from the completed upgrader action args.
+ *
+ * @access public
+ *
+ * @param array $args Hook arguments.
+ * @return array $args Filtered hook arguments.
+ */
+ public function filter_upgrader_process_complete( $args ) {
+ array_shift( $args );
+
+ return $args;
+ }
+
+ /**
+ * Expand the updates within a hook before they are serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array $args The hook parameters.
+ */
+ public function expand_updates( $args ) {
+ if ( $args[0] ) {
+ return $this->get_all_updates();
+ }
+
+ return $args;
+ }
+
+ /**
+ * Expand the themes within a hook before they are serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook parameters.
+ * @return array $args The hook parameters.
+ */
+ public function expand_themes( $args ) {
+ if ( ! isset( $args[0]->response ) ) {
+ return $args;
+ }
+ if ( ! is_array( $args[0]->response ) ) {
+ // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error
+ trigger_error( 'Warning: Not an Array as expected but -> ' . wp_json_encode( $args[0]->response ) . ' instead', E_USER_WARNING );
+ return $args;
+ }
+ foreach ( $args[0]->response as $stylesheet => &$theme_data ) {
+ $theme = wp_get_theme( $stylesheet );
+ $theme_data['name'] = $theme->name;
+ }
+ return $args;
+ }
+
+ /**
+ * Perform module cleanup.
+ * Deletes any transients and options that this module uses.
+ * Usually triggered when uninstalling the plugin.
+ *
+ * @access public
+ */
+ public function reset_data() {
+ delete_option( self::UPDATES_CHECKSUM_OPTION_NAME );
+ }
+
+ /**
+ * Return Total number of objects.
+ *
+ * @param array $config Full Sync config.
+ *
+ * @return int total
+ */
+ public function total( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return 3;
+ }
+
+ /**
+ * Retrieve a set of updates by their IDs.
+ *
+ * @access public
+ *
+ * @param string $object_type Object type.
+ * @param array $ids Object IDs.
+ * @return array Array of objects.
+ */
+ public function get_objects_by_id( $object_type, $ids ) {
+ if ( empty( $ids ) || empty( $object_type ) || 'update' !== $object_type ) {
+ return array();
+ }
+
+ $objects = array();
+ foreach ( (array) $ids as $id ) {
+ $object = $this->get_object_by_id( $object_type, $id );
+
+ if ( 'all' === $id ) {
+ // If all was requested it contains all updates and can simply be returned.
+ return $object;
+ }
+ $objects[ $id ] = $object;
+ }
+
+ return $objects;
+ }
+
+ /**
+ * Retrieve a update by its id.
+ *
+ * @access public
+ *
+ * @param string $object_type Type of the sync object.
+ * @param string $id ID of the sync object.
+ * @return mixed Value of Update.
+ */
+ public function get_object_by_id( $object_type, $id ) {
+ if ( 'update' === $object_type ) {
+
+ // Only whitelisted constants can be returned.
+ if ( in_array( $id, array( 'core', 'plugins', 'themes' ), true ) ) {
+ return get_site_transient( 'update_' . $id );
+ } elseif ( 'all' === $id ) {
+ return $this->get_all_updates();
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-users.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-users.php
new file mode 100644
index 00000000..0fe7bd83
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-users.php
@@ -0,0 +1,893 @@
+ 'password_changed',
+ 'user_email' => 'email_changed',
+ 'user_nicename' => 'nicename_changed',
+ 'user_url' => 'url_changed',
+ 'user_registered' => 'registration_date_changed',
+ 'user_activation_key' => 'activation_key_changed',
+ 'display_name' => 'display_name_changed',
+ );
+
+ /**
+ * Sync module name.
+ *
+ * @access public
+ *
+ * @return string
+ */
+ public function name() {
+ return 'users';
+ }
+
+ /**
+ * The table in the database.
+ *
+ * @access public
+ *
+ * @return string
+ */
+ public function table_name() {
+ return 'usermeta';
+ }
+
+ /**
+ * The id field in the database.
+ *
+ * @access public
+ *
+ * @return string
+ */
+ public function id_field() {
+ return 'user_id';
+ }
+
+ /**
+ * Retrieve a user by its ID.
+ * This is here to support the backfill API.
+ *
+ * @access public
+ *
+ * @param string $object_type Type of the sync object.
+ * @param int $id ID of the sync object.
+ * @return \WP_User|bool Filtered \WP_User object, or false if the object is not a user.
+ */
+ public function get_object_by_id( $object_type, $id ) {
+ if ( 'user' === $object_type ) {
+ $user = get_user_by( 'id', (int) $id );
+ if ( $user ) {
+ return $this->sanitize_user_and_expand( $user );
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Initialize users action listeners.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_listeners( $callable ) {
+ // Users.
+ add_action( 'user_register', array( $this, 'user_register_handler' ) );
+ add_action( 'profile_update', array( $this, 'save_user_handler' ), 10, 2 );
+
+ add_action( 'add_user_to_blog', array( $this, 'add_user_to_blog_handler' ) );
+ add_action( 'jetpack_sync_add_user', $callable, 10, 2 );
+
+ add_action( 'jetpack_sync_register_user', $callable, 10, 2 );
+ add_action( 'jetpack_sync_save_user', $callable, 10, 2 );
+
+ add_action( 'jetpack_sync_user_locale', $callable, 10, 2 );
+ add_action( 'jetpack_sync_user_locale_delete', $callable, 10, 1 );
+
+ add_action( 'deleted_user', array( $this, 'deleted_user_handler' ), 10, 2 );
+ add_action( 'jetpack_deleted_user', $callable, 10, 3 );
+ add_action( 'remove_user_from_blog', array( $this, 'remove_user_from_blog_handler' ), 10, 2 );
+ add_action( 'jetpack_removed_user_from_blog', $callable, 10, 2 );
+
+ // User roles.
+ add_action( 'add_user_role', array( $this, 'save_user_role_handler' ), 10, 2 );
+ add_action( 'set_user_role', array( $this, 'save_user_role_handler' ), 10, 3 );
+ add_action( 'remove_user_role', array( $this, 'save_user_role_handler' ), 10, 2 );
+
+ // User capabilities.
+ add_action( 'added_user_meta', array( $this, 'maybe_save_user_meta' ), 10, 4 );
+ add_action( 'updated_user_meta', array( $this, 'maybe_save_user_meta' ), 10, 4 );
+ add_action( 'deleted_user_meta', array( $this, 'maybe_save_user_meta' ), 10, 4 );
+
+ // User authentication.
+ add_filter( 'authenticate', array( $this, 'authenticate_handler' ), 1000, 3 );
+ add_action( 'wp_login', array( $this, 'wp_login_handler' ), 10, 2 );
+
+ add_action( 'jetpack_wp_login', $callable, 10, 3 );
+
+ add_action( 'wp_logout', $callable, 10, 1 );
+ add_action( 'wp_masterbar_logout', $callable, 10, 1 );
+
+ // Add on init.
+ add_filter( 'jetpack_sync_before_enqueue_jetpack_sync_add_user', array( $this, 'expand_action' ) );
+ add_filter( 'jetpack_sync_before_enqueue_jetpack_sync_register_user', array( $this, 'expand_action' ) );
+ add_filter( 'jetpack_sync_before_enqueue_jetpack_sync_save_user', array( $this, 'expand_action' ) );
+ add_filter( 'jetpack_sync_before_enqueue_jetpack_wp_login', array( $this, 'expand_login_username' ), 10, 1 );
+ add_filter( 'jetpack_sync_before_enqueue_wp_logout', array( $this, 'expand_logout_username' ), 10, 1 );
+ }
+
+ /**
+ * Initialize users action listeners for full sync.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_full_sync_listeners( $callable ) {
+ add_action( 'jetpack_full_sync_users', $callable );
+ }
+
+ /**
+ * Initialize the module in the sender.
+ *
+ * @access public
+ */
+ public function init_before_send() {
+ // Full sync.
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_users', array( $this, 'expand_users' ) );
+ }
+
+ /**
+ * Retrieve a user by a user ID or object.
+ *
+ * @access private
+ *
+ * @param mixed $user User object or ID.
+ * @return \WP_User User object, or `null` if user invalid/not found.
+ */
+ private function get_user( $user ) {
+ if ( is_numeric( $user ) ) {
+ $user = get_user_by( 'id', $user );
+ }
+ if ( $user instanceof \WP_User ) {
+ return $user;
+ }
+ return null;
+ }
+
+ /**
+ * Sanitize a user object.
+ * Removes the password from the user object because we don't want to sync it.
+ *
+ * @access public
+ *
+ * @todo Refactor `serialize`/`unserialize` to `wp_json_encode`/`wp_json_decode`.
+ *
+ * @param \WP_User $user User object.
+ * @return \WP_User Sanitized user object.
+ */
+ public function sanitize_user( $user ) {
+ $user = $this->get_user( $user );
+ // This creates a new user object and stops the passing of the object by reference.
+ // // phpcs:disable WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize, WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize
+ $user = unserialize( serialize( $user ) );
+
+ if ( is_object( $user ) && is_object( $user->data ) ) {
+ unset( $user->data->user_pass );
+ }
+ return $user;
+ }
+
+ /**
+ * Expand a particular user.
+ *
+ * @access public
+ *
+ * @param \WP_User $user User object.
+ * @return \WP_User Expanded user object.
+ */
+ public function expand_user( $user ) {
+ if ( ! is_object( $user ) ) {
+ return null;
+ }
+ $user->allowed_mime_types = get_allowed_mime_types( $user );
+ $user->allcaps = $this->get_real_user_capabilities( $user );
+
+ // Only set the user locale if it is different from the site locale.
+ if ( get_locale() !== get_user_locale( $user->ID ) ) {
+ $user->locale = get_user_locale( $user->ID );
+ }
+
+ return $user;
+ }
+
+ /**
+ * Retrieve capabilities we care about for a particular user.
+ *
+ * @access public
+ *
+ * @param \WP_User $user User object.
+ * @return array User capabilities.
+ */
+ public function get_real_user_capabilities( $user ) {
+ $user_capabilities = array();
+ if ( is_wp_error( $user ) ) {
+ return $user_capabilities;
+ }
+ foreach ( Defaults::get_capabilities_whitelist() as $capability ) {
+ if ( user_can( $user, $capability ) ) {
+ $user_capabilities[ $capability ] = true;
+ }
+ }
+ return $user_capabilities;
+ }
+
+ /**
+ * Retrieve, expand and sanitize a user.
+ * Can be directly used in the sync user action handlers.
+ *
+ * @access public
+ *
+ * @param mixed $user User ID or user object.
+ * @return \WP_User Expanded and sanitized user object.
+ */
+ public function sanitize_user_and_expand( $user ) {
+ $user = $this->get_user( $user );
+ $user = $this->expand_user( $user );
+ return $this->sanitize_user( $user );
+ }
+
+ /**
+ * Expand the user within a hook before it is serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook arguments.
+ * @return array $args The hook arguments.
+ */
+ public function expand_action( $args ) {
+ // The first argument is always the user.
+ list( $user ) = $args;
+ if ( $user ) {
+ $args[0] = $this->sanitize_user_and_expand( $user );
+ return $args;
+ }
+
+ return false;
+ }
+
+ /**
+ * Expand the user username at login before enqueuing.
+ *
+ * @access public
+ *
+ * @param array $args The hook arguments.
+ * @return array $args Expanded hook arguments.
+ */
+ public function expand_login_username( $args ) {
+ list( $login, $user, $flags ) = $args;
+ $user = $this->sanitize_user( $user );
+
+ return array( $login, $user, $flags );
+ }
+
+ /**
+ * Expand the user username at logout before enqueuing.
+ *
+ * @access public
+ *
+ * @param array $args The hook arguments.
+ * @return false|array $args Expanded hook arguments or false if we don't have a user.
+ */
+ public function expand_logout_username( $args ) {
+ list( $user_id ) = $args;
+
+ $user = get_userdata( $user_id );
+ $user = $this->sanitize_user( $user );
+
+ $login = '';
+ if ( is_object( $user ) && is_object( $user->data ) ) {
+ $login = $user->data->user_login;
+ }
+
+ // If we don't have a user here lets not enqueue anything.
+ if ( empty( $login ) ) {
+ return false;
+ }
+
+ return array( $login, $user );
+ }
+
+ /**
+ * Additional processing is needed for wp_login so we introduce this wrapper handler.
+ *
+ * @access public
+ *
+ * @param string $user_login The user login.
+ * @param \WP_User $user The user object.
+ */
+ public function wp_login_handler( $user_login, $user ) {
+ /**
+ * Fires when a user is logged into a site.
+ *
+ * @since 1.6.3
+ * @since-jetpack 7.2.0
+ *
+ * @param int $user_id The user ID.
+ * @param \WP_User $user The User Object of the user that currently logged in.
+ * @param array $params Any Flags that have been added during login.
+ */
+ do_action( 'jetpack_wp_login', $user->ID, $user, $this->get_flags( $user->ID ) );
+ $this->clear_flags( $user->ID );
+ }
+
+ /**
+ * A hook for the authenticate event that checks the password strength.
+ *
+ * @access public
+ *
+ * @param \WP_Error|\WP_User $user The user object, or an error.
+ * @param string $username The username.
+ * @param string $password The password used to authenticate.
+ * @return \WP_Error|\WP_User the same object that was passed into the function.
+ */
+ public function authenticate_handler( $user, $username, $password ) {
+ // In case of cookie authentication we don't do anything here.
+ if ( empty( $password ) ) {
+ return $user;
+ }
+
+ // We are only interested in successful authentication events.
+ if ( is_wp_error( $user ) || ! ( $user instanceof \WP_User ) ) {
+ return $user;
+ }
+
+ $password_checker = new Password_Checker( $user->ID );
+
+ $test_results = $password_checker->test( $password, true );
+
+ // If the password passes tests, we don't do anything.
+ if ( empty( $test_results['test_results']['failed'] ) ) {
+ return $user;
+ }
+
+ $this->add_flags(
+ $user->ID,
+ array(
+ 'warning' => 'The password failed at least one strength test.',
+ 'failures' => $test_results['test_results']['failed'],
+ )
+ );
+
+ return $user;
+ }
+
+ /**
+ * Handler for after the user is deleted.
+ *
+ * @access public
+ *
+ * @param int $deleted_user_id ID of the deleted user.
+ * @param int $reassigned_user_id ID of the user the deleted user's posts are reassigned to (if any).
+ */
+ public function deleted_user_handler( $deleted_user_id, $reassigned_user_id = '' ) {
+ $is_multisite = is_multisite();
+ /**
+ * Fires when a user is deleted on a site
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.4.0
+ *
+ * @param int $deleted_user_id - ID of the deleted user.
+ * @param int $reassigned_user_id - ID of the user the deleted user's posts are reassigned to (if any).
+ * @param bool $is_multisite - Whether this site is a multisite installation.
+ */
+ do_action( 'jetpack_deleted_user', $deleted_user_id, $reassigned_user_id, $is_multisite );
+ }
+
+ /**
+ * Handler for user registration.
+ *
+ * @access public
+ *
+ * @param int $user_id ID of the deleted user.
+ */
+ public function user_register_handler( $user_id ) {
+ // Ensure we only sync users who are members of the current blog.
+ if ( ! is_user_member_of_blog( $user_id, get_current_blog_id() ) ) {
+ return;
+ }
+
+ if ( Jetpack_Constants::is_true( 'JETPACK_INVITE_ACCEPTED' ) ) {
+ $this->add_flags( $user_id, array( 'invitation_accepted' => true ) );
+ }
+ /**
+ * Fires when a new user is registered on a site
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.9.0
+ *
+ * @param object The WP_User object
+ */
+ do_action( 'jetpack_sync_register_user', $user_id, $this->get_flags( $user_id ) );
+ $this->clear_flags( $user_id );
+ }
+
+ /**
+ * Handler for user addition to the current blog.
+ *
+ * @access public
+ *
+ * @param int $user_id ID of the user.
+ */
+ public function add_user_to_blog_handler( $user_id ) {
+ // Ensure we only sync users who are members of the current blog.
+ if ( ! is_user_member_of_blog( $user_id, get_current_blog_id() ) ) {
+ return;
+ }
+
+ if ( Jetpack_Constants::is_true( 'JETPACK_INVITE_ACCEPTED' ) ) {
+ $this->add_flags( $user_id, array( 'invitation_accepted' => true ) );
+ }
+
+ /**
+ * Fires when a user is added on a site
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.9.0
+ *
+ * @param object The WP_User object
+ */
+ do_action( 'jetpack_sync_add_user', $user_id, $this->get_flags( $user_id ) );
+ $this->clear_flags( $user_id );
+ }
+
+ /**
+ * Handler for user save.
+ *
+ * @access public
+ *
+ * @param int $user_id ID of the user.
+ * @param \WP_User $old_user_data User object before the changes.
+ */
+ public function save_user_handler( $user_id, $old_user_data = null ) {
+ // Ensure we only sync users who are members of the current blog.
+ if ( ! is_user_member_of_blog( $user_id, get_current_blog_id() ) ) {
+ return;
+ }
+
+ $user = get_user_by( 'id', $user_id );
+
+ // Older versions of WP don't pass the old_user_data in ->data.
+ if ( isset( $old_user_data->data ) ) {
+ $old_user = $old_user_data->data;
+ } else {
+ $old_user = $old_user_data;
+ }
+
+ if ( ! is_object( $old_user ) ) {
+ return;
+ }
+
+ $old_user_array = get_object_vars( $old_user );
+
+ foreach ( $old_user_array as $user_field => $field_value ) {
+ if ( false === $user->has_prop( $user_field ) ) {
+ continue;
+ }
+ if ( $user->$user_field !== $field_value ) {
+ if ( 'user_email' === $user_field ) {
+ /**
+ * The '_new_email' user meta is deleted right after the call to wp_update_user
+ * that got us to this point so if it's still set then this was a user confirming
+ * their new email address.
+ */
+ if ( 1 === (int) get_user_meta( $user->ID, '_new_email', true ) ) {
+ $this->flags[ $user_id ]['email_changed'] = true;
+ }
+ continue;
+ }
+
+ $flag = isset( $this->user_fields_to_flags_mapping[ $user_field ] ) ? $this->user_fields_to_flags_mapping[ $user_field ] : 'unknown_field_changed';
+
+ $this->flags[ $user_id ][ $flag ] = true;
+ }
+ }
+
+ if ( isset( $this->flags[ $user_id ] ) ) {
+
+ /**
+ * Fires when the client needs to sync an updated user.
+ *
+ * @since 1.6.3
+ * @since-jetpack 4.2.0
+ *
+ * @param \WP_User The WP_User object
+ * @param array State - New since 5.8.0
+ */
+ do_action( 'jetpack_sync_save_user', $user_id, $this->get_flags( $user_id ) );
+ $this->clear_flags( $user_id );
+ }
+ }
+
+ /**
+ * Handler for user role change.
+ *
+ * @access public
+ *
+ * @param int $user_id ID of the user.
+ * @param string $role New user role.
+ * @param array $old_roles Previous user roles.
+ */
+ public function save_user_role_handler( $user_id, $role, $old_roles = null ) {
+ $this->add_flags(
+ $user_id,
+ array(
+ 'role_changed' => true,
+ 'previous_role' => $old_roles,
+ )
+ );
+
+ // The jetpack_sync_register_user payload is identical to jetpack_sync_save_user, don't send both.
+ if ( $this->is_create_user() || $this->is_add_user_to_blog() ) {
+ return;
+ }
+ /**
+ * This action is documented already in this file
+ */
+ do_action( 'jetpack_sync_save_user', $user_id, $this->get_flags( $user_id ) );
+ $this->clear_flags( $user_id );
+ }
+
+ /**
+ * Retrieve current flags for a particular user.
+ *
+ * @access public
+ *
+ * @param int $user_id ID of the user.
+ * @return array Current flags of the user.
+ */
+ public function get_flags( $user_id ) {
+ if ( isset( $this->flags[ $user_id ] ) ) {
+ return $this->flags[ $user_id ];
+ }
+ return array();
+ }
+
+ /**
+ * Clear the flags of a particular user.
+ *
+ * @access public
+ *
+ * @param int $user_id ID of the user.
+ */
+ public function clear_flags( $user_id ) {
+ if ( isset( $this->flags[ $user_id ] ) ) {
+ unset( $this->flags[ $user_id ] );
+ }
+ }
+
+ /**
+ * Add flags to a particular user.
+ *
+ * @access public
+ *
+ * @param int $user_id ID of the user.
+ * @param array $flags New flags to add for the user.
+ */
+ public function add_flags( $user_id, $flags ) {
+ $this->flags[ $user_id ] = wp_parse_args( $flags, $this->get_flags( $user_id ) );
+ }
+
+ /**
+ * Save the user meta, if we're interested in it.
+ * Also uses the time to add flags for the user.
+ *
+ * @access public
+ *
+ * @param int $meta_id ID of the meta object.
+ * @param int $user_id ID of the user.
+ * @param string $meta_key Meta key.
+ * @param mixed $value Meta value.
+ */
+ public function maybe_save_user_meta( $meta_id, $user_id, $meta_key, $value ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ if ( 'locale' === $meta_key ) {
+ $this->add_flags( $user_id, array( 'locale_changed' => true ) );
+ }
+
+ $user = get_user_by( 'id', $user_id );
+ if ( isset( $user->cap_key ) && $meta_key === $user->cap_key ) {
+ $this->add_flags( $user_id, array( 'capabilities_changed' => true ) );
+ }
+
+ if ( $this->is_create_user() || $this->is_add_user_to_blog() || $this->is_delete_user() ) {
+ return;
+ }
+
+ if ( isset( $this->flags[ $user_id ] ) ) {
+ /**
+ * This action is documented already in this file
+ */
+ do_action( 'jetpack_sync_save_user', $user_id, $this->get_flags( $user_id ) );
+ }
+ }
+
+ /**
+ * Enqueue the users actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue.
+ * @param boolean $state True if full sync has finished enqueueing this module, false otherwise.
+ * @return array Number of actions enqueued, and next module state.
+ */
+ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) {
+ global $wpdb;
+
+ return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_users', $wpdb->usermeta, 'user_id', $this->get_where_sql( $config ), $max_items_to_enqueue, $state );
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @todo Refactor to prepare the SQL query before executing it.
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return array Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) {
+ global $wpdb;
+
+ $query = "SELECT count(*) FROM $wpdb->usermeta";
+
+ $where_sql = $this->get_where_sql( $config );
+ if ( $where_sql ) {
+ $query .= ' WHERE ' . $where_sql;
+ }
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $count = $wpdb->get_var( $query );
+
+ return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
+ }
+
+ /**
+ * Retrieve the WHERE SQL clause based on the module config.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return string WHERE SQL clause, or `null` if no comments are specified in the module config.
+ */
+ public function get_where_sql( $config ) {
+ global $wpdb;
+
+ $query = "meta_key = '{$wpdb->prefix}user_level' AND meta_value > 0";
+
+ // The $config variable is a list of user IDs to sync.
+ if ( is_array( $config ) ) {
+ $query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')';
+ }
+
+ return $query;
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_users' );
+ }
+
+ /**
+ * Retrieve initial sync user config.
+ *
+ * @access public
+ *
+ * @todo Refactor the SQL query to call $wpdb->prepare() before execution.
+ *
+ * @return array|boolean IDs of users to initially sync, or false if tbe number of users exceed the maximum.
+ */
+ public function get_initial_sync_user_config() {
+ global $wpdb;
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $user_ids = $wpdb->get_col( "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}user_level' AND meta_value > 0 LIMIT " . ( self::MAX_INITIAL_SYNC_USERS + 1 ) );
+ $user_ids_count = is_countable( $user_ids ) ? count( $user_ids ) : 0;
+
+ if ( $user_ids_count <= self::MAX_INITIAL_SYNC_USERS ) {
+ return $user_ids;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Expand the users within a hook before they are serialized and sent to the server.
+ *
+ * @access public
+ *
+ * @param array $args The hook arguments.
+ * @return array $args The hook arguments.
+ */
+ public function expand_users( $args ) {
+ list( $user_ids, $previous_end ) = $args;
+
+ return array(
+ 'users' => array_map(
+ array( $this, 'sanitize_user_and_expand' ),
+ get_users(
+ array(
+ 'include' => $user_ids,
+ 'orderby' => 'ID',
+ 'order' => 'DESC',
+ )
+ )
+ ),
+ 'previous_end' => $previous_end,
+ );
+ }
+
+ /**
+ * Handler for user removal from a particular blog.
+ *
+ * @access public
+ *
+ * @param int $user_id ID of the user.
+ * @param int $blog_id ID of the blog.
+ */
+ public function remove_user_from_blog_handler( $user_id, $blog_id ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ // User is removed on add, see https://github.com/WordPress/WordPress/blob/0401cee8b36df3def8e807dd766adc02b359dfaf/wp-includes/ms-functions.php#L2114.
+ if ( $this->is_add_new_user_to_blog() ) {
+ return;
+ }
+
+ $reassigned_user_id = $this->get_reassigned_network_user_id();
+
+ // Note that we are in the context of the blog the user is removed from, see https://github.com/WordPress/WordPress/blob/473e1ba73bc5c18c72d7f288447503713d518790/wp-includes/ms-functions.php#L233.
+ /**
+ * Fires when a user is removed from a blog on a multisite installation
+ *
+ * @since 1.6.3
+ * @since-jetpack 5.4.0
+ *
+ * @param int $user_id - ID of the removed user
+ * @param int $reassigned_user_id - ID of the user the removed user's posts are reassigned to (if any).
+ */
+ do_action( 'jetpack_removed_user_from_blog', $user_id, $reassigned_user_id );
+ }
+
+ /**
+ * Whether we're adding a new user to a blog in this request.
+ *
+ * @access protected
+ *
+ * @return boolean
+ */
+ protected function is_add_new_user_to_blog() {
+ return $this->is_function_in_backtrace( 'add_new_user_to_blog' );
+ }
+
+ /**
+ * Whether we're adding an existing user to a blog in this request.
+ *
+ * @access protected
+ *
+ * @return boolean
+ */
+ protected function is_add_user_to_blog() {
+ return $this->is_function_in_backtrace( 'add_user_to_blog' );
+ }
+
+ /**
+ * Whether we're removing a user from a blog in this request.
+ *
+ * @access protected
+ *
+ * @return boolean
+ */
+ protected function is_delete_user() {
+ return $this->is_function_in_backtrace( array( 'wp_delete_user', 'remove_user_from_blog' ) );
+ }
+
+ /**
+ * Whether we're creating a user or adding a new user to a blog.
+ *
+ * @access protected
+ *
+ * @return boolean
+ */
+ protected function is_create_user() {
+ $functions = array(
+ 'add_new_user_to_blog', // Used to suppress jetpack_sync_save_user in save_user_cap_handler when user registered on multi site.
+ 'wp_create_user', // Used to suppress jetpack_sync_save_user in save_user_role_handler when user registered on multi site.
+ 'wp_insert_user', // Used to suppress jetpack_sync_save_user in save_user_cap_handler and save_user_role_handler when user registered on single site.
+ );
+
+ return $this->is_function_in_backtrace( $functions );
+ }
+
+ /**
+ * Retrieve the ID of the user the removed user's posts are reassigned to (if any).
+ *
+ * @return int ID of the user that got reassigned as the author of the posts.
+ */
+ protected function get_reassigned_network_user_id() {
+ $backtrace = debug_backtrace( false ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
+ foreach ( $backtrace as $call ) {
+ if (
+ 'remove_user_from_blog' === $call['function'] &&
+ 3 === count( $call['args'] )
+ ) {
+ return $call['args'][2];
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks if one or more function names is in debug_backtrace.
+ *
+ * @access protected
+ *
+ * @param array|string $names Mixed string name of function or array of string names of functions.
+ * @return bool
+ */
+ protected function is_function_in_backtrace( $names ) {
+ $backtrace = debug_backtrace( false ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
+ if ( ! is_array( $names ) ) {
+ $names = array( $names );
+ }
+ $names_as_keys = array_flip( $names );
+
+ $backtrace_functions = array_column( $backtrace, 'function' );
+ $backtrace_functions_as_keys = array_flip( $backtrace_functions );
+ $intersection = array_intersect_key( $backtrace_functions_as_keys, $names_as_keys );
+ return ! empty( $intersection );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-hpos-orders.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-hpos-orders.php
new file mode 100644
index 00000000..66e79902
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-hpos-orders.php
@@ -0,0 +1,355 @@
+order_table_name;
+ }
+
+ /**
+ * Initialize order table data store, returns if the class don't exist (pre WC 6.x)
+ *
+ * @access public
+ */
+ public function __construct() {
+ if ( ! class_exists( OrdersTableDataStore::class ) ) {
+ return;
+ }
+ $this->order_table_name = OrdersTableDataStore::get_orders_table_name();
+ }
+
+ /**
+ * Get order types that we want to sync. Adding a new type here is not enough, we would also need to add its prop in filter_order_data method.
+ *
+ * @access private
+ *
+ * @param bool $prefixed Whether to return prefixed types with shop_ or not.
+ *
+ * @return array Order types to sync.
+ */
+ private function get_order_types_to_sync( $prefixed = false ) {
+ $types = array( 'order', 'order_refund' );
+ if ( $prefixed ) {
+ $types = array_map(
+ function ( $type ) {
+ return "shop_{$type}";
+ },
+ $types
+ );
+ }
+ return $types;
+ }
+
+ /**
+ * Hooks sync listners on order modify events.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_listeners( $callable ) {
+ foreach ( $this->get_order_types_to_sync() as $type ) {
+ add_action( "woocommerce_after_{$type}_object_save", $callable );
+ add_filter( "jetpack_sync_before_enqueue_woocommerce_after_{$type}_object_save", array( $this, 'expand_order_object' ) );
+ }
+ add_action( 'woocommerce_delete_order', $callable );
+ add_filter( 'jetpack_sync_before_enqueue_woocommerce_delete_order', array( $this, 'expand_order_object' ) );
+ add_action( 'woocommerce_trash_order', $callable );
+ add_filter( 'jetpack_sync_before_enqueue_woocommerce_trash_order', array( $this, 'expand_order_object' ) );
+ }
+
+ /**
+ * Hooks the full sync listeners.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_full_sync_listeners( $callable ) {
+ add_action( 'jetpack_full_sync_orders', $callable );
+ add_filter( 'jetpack_sync_before_enqueue_full_sync_orders', array( $this, 'expand_order_objects' ) );
+ }
+
+ /**
+ * Returns the ID field from wc_orders table.
+ *
+ * @access public
+ *
+ * @return string
+ */
+ public function id_field() {
+ return 'id';
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_orders' );
+ }
+
+ /**
+ * Retrieve order data by its ID.
+ *
+ * @access public
+ *
+ * @param string $object_type Type of object to retrieve. Should be `order`.
+ * @param int $id Order ID.
+ *
+ * @return array
+ */
+ public function get_object_by_id( $object_type, $id ) {
+ if ( 'order' !== $object_type ) {
+ return $id;
+ }
+ $order_objects = $this->get_objects_by_id( $object_type, array( $id ) );
+ return isset( $order_objects[ $id ] ) ? $order_objects[ $id ] : false;
+ }
+
+ /**
+ * Retrieves multiple orders data by their ID.
+ *
+ * @access public
+ *
+ * @param string $object_type Type of object to retrieve. Should be `order`.
+ * @param array $ids List of order IDs.
+ *
+ * @return array
+ */
+ public function get_objects_by_id( $object_type, $ids ) {
+ if ( 'order' !== $object_type ) {
+ return $ids;
+ }
+ $orders = wc_get_orders(
+ array(
+ 'include' => $ids,
+ 'type' => $this->get_order_types_to_sync( true ),
+ )
+ );
+ $orders_data = array();
+ foreach ( $orders as $order ) {
+ $orders_data[ $order->get_id() ] = $this->filter_order_data( $order );
+ }
+ return $orders_data;
+ }
+
+ /**
+ * Retrieves multiple orders data by their ID.
+ *
+ * @access public
+ *
+ * @param array $args List of order IDs.
+ *
+ * @return array
+ */
+ public function expand_order_objects( $args ) {
+ $order_ids = $args;
+
+ return $this->get_objects_by_id( 'order', $order_ids );
+ }
+
+ /**
+ * Retrieve order data by its ID.
+ *
+ * @access public
+ *
+ * @param array $args Order ID.
+ *
+ * @return array
+ */
+ public function expand_order_object( $args ) {
+ $order_object = $args[0];
+
+ if ( is_int( $order_object ) ) {
+ $order_object = wc_get_order( $order_object );
+ }
+
+ if ( ! $order_object instanceof \WC_Abstract_Order ) {
+ return false;
+ }
+
+ return $this->filter_order_data( $order_object );
+ }
+
+ /**
+ * Filters only allowed keys from order data. No PII etc information is allowed to be synced.
+ *
+ * @access private
+ *
+ * @param \WC_Abstract_Order $order_object Order object.
+ *
+ * @return array Filtered order data.
+ */
+ private function filter_order_data( $order_object ) {
+ // Filter with allowlist.
+ $allowed_data_keys = WooCommerce::$wc_post_meta_whitelist;
+ $core_table_keys = array(
+ 'id',
+ 'status',
+ 'date_created',
+ 'date_modified',
+ 'parent_id',
+ );
+ $allowed_data_keys = array_merge( $allowed_data_keys, $core_table_keys );
+ $filtered_order_data = array( 'type' => $order_object->get_type() );
+ $order_data = $order_object->get_data();
+ foreach ( $allowed_data_keys as $key ) {
+ $key = trim( $key, '_' );
+ $key_parts = explode( '_', $key );
+
+ if ( in_array( $key_parts[0], array( 'order', 'refund' ), true ) ) {
+ if ( isset( $order_data[ $key_parts[1] ] ) && ! is_array( $order_data[ $key_parts[1] ] ) ) {
+ $filtered_order_data[ $key ] = $order_data[ $key_parts[1] ];
+ continue;
+ }
+ }
+
+ if ( in_array( $key_parts[0], array( 'billing', 'shipping' ), true ) && 2 === count( $key_parts ) ) {
+ if ( isset( $order_data[ $key_parts[0] ][ $key_parts[1] ] ) ) {
+ $filtered_order_data[ $key ] = $order_data[ $key_parts[0] ][ $key_parts[1] ];
+ continue;
+ }
+ }
+
+ if ( isset( $order_data[ $key ] ) ) {
+ $filtered_order_data[ $key ] = $order_data[ $key ];
+ continue;
+ }
+
+ switch ( $key ) {
+ case 'cart_discount':
+ $filtered_order_data[ $key ] = isset( $order_data['discount_total'] ) ? $order_data['discount_total'] : '';
+ break;
+ case 'cart_discount_tax':
+ $filtered_order_data[ $key ] = isset( $order_data['discount_tax'] ) ? $order_data['discount_tax'] : '';
+ break;
+ case 'order_shipping':
+ $filtered_order_data[ $key ] = isset( $order_data['shipping_total'] ) ? $order_data['shipping_total'] : '';
+ break;
+ case 'order_shipping_tax':
+ $filtered_order_data[ $key ] = isset( $order_data['shipping_tax'] ) ? $order_data['shipping_tax'] : '';
+ break;
+ case 'order_tax':
+ $filtered_order_data[ $key ] = isset( $order_data['cart_tax'] ) ? $order_data['cart_tax'] : '';
+ break;
+ case 'order_total':
+ $filtered_order_data[ $key ] = isset( $order_data['total'] ) ? $order_data['total'] : '';
+ break;
+ }
+ }
+ if ( '' === $filtered_order_data['status'] ) {
+ $filtered_order_data['status'] = 'pending';
+ }
+
+ return $filtered_order_data;
+ }
+
+ /**
+ * Returns metadata for order object.
+ *
+ * @access protected
+ *
+ * @param array $ids List of order IDs.
+ * @param string $meta_type Meta type.
+ * @param array $meta_key_whitelist List of allowed meta keys.
+ *
+ * @return array Filtered order metadata.
+ */
+ protected function get_metadata( $ids, $meta_type, $meta_key_whitelist ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- returning empty meta is intentional.
+ return array(); // don't sync metadata, all allow-listed core data is available in the order object.
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return array Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- We return all order count for full sync, so confit is not required.
+ global $wpdb;
+
+ $query = "SELECT count(*) FROM {$this->table_name()} WHERE {$this->get_where_sql( $config ) }";
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Hardcoded query, no user variable
+ $count = $wpdb->get_var( $query );
+
+ return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
+ }
+
+ /**
+ * Enqueue the WooCommerce HPOS orders actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue.
+ * @param boolean $state True if full sync has finished enqueueing this module, false otherwise.
+ * @return array Number of actions enqueued, and next module state.
+ */
+ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) {
+ return $this->enqueue_all_ids_as_action( 'full_sync_orders', $this->table_name(), 'id', $this->get_where_sql( $config ), $max_items_to_enqueue, $state );
+ }
+
+ /**
+ * Get where SQL for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ *
+ * @return string WHERE SQL clause, or `null` if no comments are specified in the module config.
+ */
+ public function get_where_sql( $config ) {
+ global $wpdb;
+ $parent_where = parent::get_where_sql( $config );
+ $order_types = $this->get_order_types_to_sync( true );
+ $order_type_placeholder = implode( ', ', array_fill( 0, count( $order_types ), '%s' ) );
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Query is prepared.
+ $where_sql = $wpdb->prepare( "type IN ( $order_type_placeholder )", $order_types );
+ return "{$parent_where} AND {$where_sql}";
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php
new file mode 100644
index 00000000..f5cbd801
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php
@@ -0,0 +1,614 @@
+order_item_table_name;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @global $wpdb
+ *
+ * @todo Should we refactor this to use $this->set_defaults() instead?
+ */
+ public function __construct() {
+ global $wpdb;
+ $this->order_item_table_name = $wpdb->prefix . 'woocommerce_order_items';
+
+ // Options, constants and post meta whitelists.
+ add_filter( 'jetpack_sync_options_whitelist', array( $this, 'add_woocommerce_options_whitelist' ), 10 );
+ add_filter( 'jetpack_sync_constants_whitelist', array( $this, 'add_woocommerce_constants_whitelist' ), 10 );
+ add_filter( 'jetpack_sync_post_meta_whitelist', array( $this, 'add_woocommerce_post_meta_whitelist' ), 10 );
+ add_filter( 'jetpack_sync_comment_meta_whitelist', array( $this, 'add_woocommerce_comment_meta_whitelist' ), 10 );
+
+ add_filter( 'jetpack_sync_before_enqueue_woocommerce_new_order_item', array( $this, 'filter_order_item' ) );
+ add_filter( 'jetpack_sync_before_enqueue_woocommerce_update_order_item', array( $this, 'filter_order_item' ) );
+ add_filter( 'jetpack_sync_whitelisted_comment_types', array( $this, 'add_review_comment_types' ) );
+
+ // Blacklist Action Scheduler comment types.
+ add_filter( 'jetpack_sync_prevent_sending_comment_data', array( $this, 'filter_action_scheduler_comments' ), 10, 2 );
+ }
+
+ /**
+ * Sync module name.
+ *
+ * @access public
+ *
+ * @return string
+ */
+ public function name() {
+ return 'woocommerce';
+ }
+
+ /**
+ * Initialize WooCommerce action listeners.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_listeners( $callable ) {
+ // Attributes.
+ add_action( 'woocommerce_attribute_added', $callable, 10, 2 );
+ add_action( 'woocommerce_attribute_updated', $callable, 10, 3 );
+ add_action( 'woocommerce_attribute_deleted', $callable, 10, 3 );
+
+ // Orders.
+ add_action( 'woocommerce_new_order', $callable, 10, 1 );
+ add_action( 'woocommerce_order_status_changed', $callable, 10, 3 );
+ add_action( 'woocommerce_payment_complete', $callable, 10, 1 );
+
+ // Order items.
+ add_action( 'woocommerce_new_order_item', $callable, 10, 4 );
+ add_action( 'woocommerce_update_order_item', $callable, 10, 4 );
+ add_action( 'woocommerce_delete_order_item', $callable, 10, 1 );
+ $this->init_listeners_for_meta_type( 'order_item', $callable );
+
+ // Payment tokens.
+ add_action( 'woocommerce_new_payment_token', $callable, 10, 1 );
+ add_action( 'woocommerce_payment_token_deleted', $callable, 10, 2 );
+ add_action( 'woocommerce_payment_token_updated', $callable, 10, 1 );
+ $this->init_listeners_for_meta_type( 'payment_token', $callable );
+
+ // Product downloads.
+ add_action( 'woocommerce_downloadable_product_download_log_insert', $callable, 10, 1 );
+ add_action( 'woocommerce_grant_product_download_access', $callable, 10, 1 );
+
+ // Tax rates.
+ add_action( 'woocommerce_tax_rate_added', $callable, 10, 2 );
+ add_action( 'woocommerce_tax_rate_updated', $callable, 10, 2 );
+ add_action( 'woocommerce_tax_rate_deleted', $callable, 10, 1 );
+
+ // Webhooks.
+ add_action( 'woocommerce_new_webhook', $callable, 10, 1 );
+ add_action( 'woocommerce_webhook_deleted', $callable, 10, 2 );
+ add_action( 'woocommerce_webhook_updated', $callable, 10, 1 );
+ }
+
+ /**
+ * Initialize WooCommerce action listeners for full sync.
+ *
+ * @access public
+ *
+ * @param callable $callable Action handler callable.
+ */
+ public function init_full_sync_listeners( $callable ) {
+ add_action( 'jetpack_full_sync_woocommerce_order_items', $callable ); // Also sends post meta.
+ }
+
+ /**
+ * Retrieve the actions that will be sent for this module during a full sync.
+ *
+ * @access public
+ *
+ * @return array Full sync actions of this module.
+ */
+ public function get_full_sync_actions() {
+ return array( 'jetpack_full_sync_woocommerce_order_items' );
+ }
+
+ /**
+ * Initialize the module in the sender.
+ *
+ * @access public
+ */
+ public function init_before_send() {
+ // Full sync.
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_woocommerce_order_items', array( $this, 'expand_order_item_ids' ) );
+ }
+
+ /**
+ * Expand the order items properly.
+ *
+ * @access public
+ *
+ * @param array $args The hook arguments.
+ * @return array $args The hook arguments.
+ */
+ public function filter_order_item( $args ) {
+ // Make sure we always have all the data - prior to WooCommerce 3.0 we only have the user supplied data in the second argument and not the full details.
+ $args[1] = $this->build_order_item( $args[0] );
+ return $args;
+ }
+
+ /**
+ * Expand order item IDs to order items and their meta.
+ *
+ * @access public
+ *
+ * @todo Refactor table name to use a $wpdb->prepare placeholder.
+ *
+ * @param array $args The hook arguments.
+ * @return array $args Expanded order items with meta.
+ */
+ public function expand_order_item_ids( $args ) {
+ $order_item_ids = $args[0];
+
+ global $wpdb;
+
+ $order_item_ids_sql = implode( ', ', array_map( 'intval', $order_item_ids ) );
+
+ $order_items = $wpdb->get_results(
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ "SELECT * FROM $this->order_item_table_name WHERE order_item_id IN ( $order_item_ids_sql )"
+ );
+
+ return array(
+ $order_items,
+ $this->get_metadata( $order_item_ids, 'order_item', static::$order_item_meta_whitelist ),
+ );
+ }
+
+ /**
+ * Extract the full order item from the database by its ID.
+ *
+ * @access public
+ *
+ * @todo Refactor table name to use a $wpdb->prepare placeholder.
+ *
+ * @param int $order_item_id Order item ID.
+ * @return object Order item.
+ */
+ public function build_order_item( $order_item_id ) {
+ global $wpdb;
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ return $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $this->order_item_table_name WHERE order_item_id = %d", $order_item_id ) );
+ }
+
+ /**
+ * Enqueue the WooCommerce actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $max_items_to_enqueue Maximum number of items to enqueue.
+ * @param boolean $state True if full sync has finished enqueueing this module, false otherwise.
+ * @return array Number of actions enqueued, and next module state.
+ */
+ public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) {
+ return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_woocommerce_order_items', $this->order_item_table_name, 'order_item_id', $this->get_where_sql( $config ), $max_items_to_enqueue, $state );
+ }
+
+ /**
+ * Retrieve an estimated number of actions that will be enqueued.
+ *
+ * @access public
+ *
+ * @todo Refactor the SQL query to use $wpdb->prepare().
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return array Number of items yet to be enqueued.
+ */
+ public function estimate_full_sync_actions( $config ) {
+ global $wpdb;
+
+ $query = "SELECT count(*) FROM $this->order_item_table_name WHERE " . $this->get_where_sql( $config );
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $count = $wpdb->get_var( $query );
+
+ return (int) ceil( $count / self::ARRAY_CHUNK_SIZE );
+ }
+
+ /**
+ * Retrieve the WHERE SQL clause based on the module config.
+ *
+ * @access private
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @return string WHERE SQL clause.
+ */
+ public function get_where_sql( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ return '1=1';
+ }
+
+ /**
+ * Add WooCommerce options to the options whitelist.
+ *
+ * @param array $list Existing options whitelist.
+ * @return array Updated options whitelist.
+ */
+ public function add_woocommerce_options_whitelist( $list ) {
+ return array_merge( $list, self::$wc_options_whitelist );
+ }
+
+ /**
+ * Add WooCommerce constants to the constants whitelist.
+ *
+ * @param array $list Existing constants whitelist.
+ * @return array Updated constants whitelist.
+ */
+ public function add_woocommerce_constants_whitelist( $list ) {
+ return array_merge( $list, self::$wc_constants_whitelist );
+ }
+
+ /**
+ * Add WooCommerce post meta to the post meta whitelist.
+ *
+ * @param array $list Existing post meta whitelist.
+ * @return array Updated post meta whitelist.
+ */
+ public function add_woocommerce_post_meta_whitelist( $list ) {
+ return array_merge( $list, self::$wc_post_meta_whitelist );
+ }
+
+ /**
+ * Add WooCommerce comment meta to the comment meta whitelist.
+ *
+ * @param array $list Existing comment meta whitelist.
+ * @return array Updated comment meta whitelist.
+ */
+ public function add_woocommerce_comment_meta_whitelist( $list ) {
+ return array_merge( $list, self::$wc_comment_meta_whitelist );
+ }
+
+ /**
+ * Adds 'revew' to the list of comment types so Sync will listen for status changes on 'reviews'.
+ *
+ * @access public
+ *
+ * @param array $comment_types The list of comment types prior to this filter.
+ * return array The list of comment types with 'review' added.
+ */
+ public function add_review_comment_types( $comment_types ) {
+ if ( is_array( $comment_types ) ) {
+ $comment_types[] = 'review';
+ }
+ return $comment_types;
+ }
+
+ /**
+ * Stop comments from the Action Scheduler from being synced.
+ * https://github.com/woocommerce/woocommerce/tree/e7762627c37ec1f7590e6cac4218ba0c6a20024d/includes/libraries/action-scheduler
+ *
+ * @since 1.6.3
+ * @since-jetpack 7.7.0
+ *
+ * @param boolean $can_sync Should we prevent comment data from bing synced to WordPress.com.
+ * @param mixed $comment WP_COMMENT object.
+ *
+ * @return bool
+ */
+ public function filter_action_scheduler_comments( $can_sync, $comment ) {
+ if ( isset( $comment->comment_agent ) && 'ActionScheduler' === $comment->comment_agent ) {
+ return true;
+ }
+ return $can_sync;
+ }
+
+ /**
+ * Whitelist for options we are interested to sync.
+ *
+ * @access private
+ * @static
+ *
+ * @var array
+ */
+ private static $wc_options_whitelist = array(
+ 'woocommerce_currency',
+ 'woocommerce_db_version',
+ 'woocommerce_weight_unit',
+ 'woocommerce_version',
+ 'woocommerce_unforce_ssl_checkout',
+ 'woocommerce_tax_total_display',
+ 'woocommerce_tax_round_at_subtotal',
+ 'woocommerce_tax_display_shop',
+ 'woocommerce_tax_display_cart',
+ 'woocommerce_prices_include_tax',
+ 'woocommerce_price_thousand_sep',
+ 'woocommerce_price_num_decimals',
+ 'woocommerce_price_decimal_sep',
+ 'woocommerce_notify_low_stock',
+ 'woocommerce_notify_low_stock_amount',
+ 'woocommerce_notify_no_stock',
+ 'woocommerce_notify_no_stock_amount',
+ 'woocommerce_manage_stock',
+ 'woocommerce_force_ssl_checkout',
+ 'woocommerce_hide_out_of_stock_items',
+ 'woocommerce_file_download_method',
+ 'woocommerce_enable_signup_and_login_from_checkout',
+ 'woocommerce_enable_shipping_calc',
+ 'woocommerce_enable_review_rating',
+ 'woocommerce_enable_guest_checkout',
+ 'woocommerce_enable_coupons',
+ 'woocommerce_enable_checkout_login_reminder',
+ 'woocommerce_enable_ajax_add_to_cart',
+ 'woocommerce_dimension_unit',
+ 'woocommerce_default_country',
+ 'woocommerce_default_customer_address',
+ 'woocommerce_currency_pos',
+ 'woocommerce_api_enabled',
+ 'woocommerce_allow_tracking',
+ 'woocommerce_task_list_hidden',
+ 'woocommerce_onboarding_profile',
+ 'woocommerce_cod_settings',
+ );
+
+ /**
+ * Whitelist for constants we are interested to sync.
+ *
+ * @access private
+ * @static
+ *
+ * @var array
+ */
+ private static $wc_constants_whitelist = array(
+ // WooCommerce constants.
+ 'WC_PLUGIN_FILE',
+ 'WC_ABSPATH',
+ 'WC_PLUGIN_BASENAME',
+ 'WC_VERSION',
+ 'WOOCOMMERCE_VERSION',
+ 'WC_ROUNDING_PRECISION',
+ 'WC_DISCOUNT_ROUNDING_MODE',
+ 'WC_TAX_ROUNDING_MODE',
+ 'WC_DELIMITER',
+ 'WC_LOG_DIR',
+ 'WC_SESSION_CACHE_GROUP',
+ 'WC_TEMPLATE_DEBUG_MODE',
+ );
+
+ /**
+ * Whitelist for post meta we are interested to sync.
+ *
+ * @access private
+ * @static
+ *
+ * @var array
+ */
+ public static $wc_post_meta_whitelist = array(
+ // WooCommerce products.
+ // See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-product-data-store-cpt.php#L21 .
+ '_visibility',
+ '_sku',
+ '_price',
+ '_regular_price',
+ '_sale_price',
+ '_sale_price_dates_from',
+ '_sale_price_dates_to',
+ 'total_sales',
+ '_tax_status',
+ '_tax_class',
+ '_manage_stock',
+ '_backorders',
+ '_sold_individually',
+ '_weight',
+ '_length',
+ '_width',
+ '_height',
+ '_upsell_ids',
+ '_crosssell_ids',
+ '_purchase_note',
+ '_default_attributes',
+ '_product_attributes',
+ '_virtual',
+ '_downloadable',
+ '_download_limit',
+ '_download_expiry',
+ '_featured',
+ '_downloadable_files',
+ '_wc_rating_count',
+ '_wc_average_rating',
+ '_wc_review_count',
+ '_variation_description',
+ '_thumbnail_id',
+ '_file_paths',
+ '_product_image_gallery',
+ '_product_version',
+ '_wp_old_slug',
+
+ // Woocommerce orders.
+ // See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-order-data-store-cpt.php#L27 .
+ '_order_key',
+ '_order_currency',
+ // '_billing_first_name', do not sync these as they contain personal data
+ // '_billing_last_name',
+ // '_billing_company',
+ // '_billing_address_1',
+ // '_billing_address_2',
+ '_billing_city',
+ '_billing_state',
+ '_billing_postcode',
+ '_billing_country',
+ // '_billing_email', do not sync these as they contain personal data.
+ // '_billing_phone',
+ // '_shipping_first_name',
+ // '_shipping_last_name',
+ // '_shipping_company',
+ // '_shipping_address_1',
+ // '_shipping_address_2',
+ '_shipping_city',
+ '_shipping_state',
+ '_shipping_postcode',
+ '_shipping_country',
+ '_completed_date',
+ '_paid_date',
+ '_cart_discount',
+ '_cart_discount_tax',
+ '_order_shipping',
+ '_order_shipping_tax',
+ '_order_tax',
+ '_order_total',
+ '_payment_method',
+ '_payment_method_title',
+ // '_transaction_id', do not sync these as they contain personal data.
+ // '_customer_ip_address',
+ // '_customer_user_agent',
+ '_created_via',
+ '_order_version',
+ '_prices_include_tax',
+ '_date_completed',
+ '_date_paid',
+ '_payment_tokens',
+ '_billing_address_index',
+ '_shipping_address_index',
+ '_recorded_sales',
+ '_recorded_coupon_usage_counts',
+ // See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-order-data-store-cpt.php#L539 .
+ '_download_permissions_granted',
+ // See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-order-data-store-cpt.php#L594 .
+ '_order_stock_reduced',
+
+ // Woocommerce order refunds.
+ // See https://github.com/woocommerce/woocommerce/blob/b8a2815ae546c836467008739e7ff5150cb08e93/includes/data-stores/class-wc-order-refund-data-store-cpt.php#L20 .
+ '_order_currency',
+ '_refund_amount',
+ '_refunded_by',
+ '_refund_reason',
+ '_order_shipping',
+ '_order_shipping_tax',
+ '_order_tax',
+ '_order_total',
+ '_order_version',
+ '_prices_include_tax',
+ '_payment_tokens',
+ );
+
+ /**
+ * Whitelist for comment meta we are interested to sync.
+ *
+ * @access private
+ * @static
+ *
+ * @var array
+ */
+ private static $wc_comment_meta_whitelist = array(
+ 'rating',
+ );
+
+ /**
+ * Return a list of objects by their type and IDs
+ *
+ * @param string $object_type Object type.
+ * @param array $ids IDs of objects to return.
+ *
+ * @access public
+ *
+ * @return array|object|WP_Error|null
+ */
+ public function get_objects_by_id( $object_type, $ids ) {
+ switch ( $object_type ) {
+ case 'order_item':
+ return $this->get_order_item_by_ids( $ids );
+ }
+
+ return new WP_Error( 'unsupported_object_type', 'Unsupported object type' );
+ }
+
+ /**
+ * Returns a list of order_item objects by their IDs.
+ *
+ * @param array $ids List of order_item IDs to fetch.
+ *
+ * @access public
+ *
+ * @return array|object|null
+ */
+ public function get_order_item_by_ids( $ids ) {
+ global $wpdb;
+
+ if ( ! is_array( $ids ) ) {
+ return array();
+ }
+
+ // Make sure the IDs are numeric and are non-zero.
+ $ids = array_filter( array_map( 'intval', $ids ) );
+
+ if ( empty( $ids ) ) {
+ return array();
+ }
+
+ // Prepare the placeholders for the prepared query below.
+ $placeholders = implode( ',', array_fill( 0, count( $ids ), '%d' ) );
+
+ $query = "SELECT * FROM {$this->order_item_table_name} WHERE order_item_id IN ( $placeholders )";
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ return $wpdb->get_results( $wpdb->prepare( $query, $ids ), ARRAY_A );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-wp-super-cache.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-wp-super-cache.php
new file mode 100644
index 00000000..af4aec41
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-wp-super-cache.php
@@ -0,0 +1,156 @@
+set_defaults() instead?
+ */
+ public function __construct() {
+ add_filter( 'jetpack_sync_constants_whitelist', array( $this, 'add_wp_super_cache_constants_whitelist' ), 10 );
+ add_filter( 'jetpack_sync_callable_whitelist', array( $this, 'add_wp_super_cache_callable_whitelist' ), 10 );
+ }
+
+ /**
+ * Whitelist for constants we are interested to sync.
+ *
+ * @access public
+ * @static
+ *
+ * @var array
+ */
+ public static $wp_super_cache_constants = array(
+ 'WPLOCKDOWN',
+ 'WPSC_DISABLE_COMPRESSION',
+ 'WPSC_DISABLE_LOCKING',
+ 'WPSC_DISABLE_HTACCESS_UPDATE',
+ 'ADVANCEDCACHEPROBLEM',
+ );
+
+ /**
+ * Container for the whitelist for WP_Super_Cache callables we are interested to sync.
+ *
+ * @access public
+ * @static
+ *
+ * @var array
+ */
+ public static $wp_super_cache_callables = array(
+ 'wp_super_cache_globals' => array( __CLASS__, 'get_wp_super_cache_globals' ),
+ );
+
+ /**
+ * Sync module name.
+ *
+ * @access public
+ *
+ * @return string
+ */
+ public function name() {
+ return 'wp-super-cache';
+ }
+
+ /**
+ * Retrieve all WP_Super_Cache callables we are interested to sync.
+ *
+ * @access public
+ *
+ * @global $wp_cache_mod_rewrite;
+ * @global $cache_enabled;
+ * @global $super_cache_enabled;
+ * @global $ossdlcdn;
+ * @global $cache_rebuild_files;
+ * @global $wp_cache_mobile;
+ * @global $wp_super_cache_late_init;
+ * @global $wp_cache_anon_only;
+ * @global $wp_cache_not_logged_in;
+ * @global $wp_cache_clear_on_post_edit;
+ * @global $wp_cache_mobile_enabled;
+ * @global $wp_super_cache_debug;
+ * @global $cache_max_time;
+ * @global $wp_cache_refresh_single_only;
+ * @global $wp_cache_mfunc_enabled;
+ * @global $wp_supercache_304;
+ * @global $wp_cache_no_cache_for_get;
+ * @global $wp_cache_mutex_disabled;
+ * @global $cache_jetpack;
+ * @global $cache_domain_mapping;
+ *
+ * @return array All WP_Super_Cache callables.
+ */
+ public static function get_wp_super_cache_globals() {
+ global $wp_cache_mod_rewrite;
+ global $cache_enabled;
+ global $super_cache_enabled;
+ global $ossdlcdn;
+ global $cache_rebuild_files;
+ global $wp_cache_mobile;
+ global $wp_super_cache_late_init;
+ global $wp_cache_anon_only;
+ global $wp_cache_not_logged_in;
+ global $wp_cache_clear_on_post_edit;
+ global $wp_cache_mobile_enabled;
+ global $wp_super_cache_debug;
+ global $cache_max_time;
+ global $wp_cache_refresh_single_only;
+ global $wp_cache_mfunc_enabled;
+ global $wp_supercache_304;
+ global $wp_cache_no_cache_for_get;
+ global $wp_cache_mutex_disabled;
+ global $cache_jetpack;
+ global $cache_domain_mapping;
+
+ return array(
+ 'wp_cache_mod_rewrite' => $wp_cache_mod_rewrite,
+ 'cache_enabled' => $cache_enabled,
+ 'super_cache_enabled' => $super_cache_enabled,
+ 'ossdlcdn' => $ossdlcdn,
+ 'cache_rebuild_files' => $cache_rebuild_files,
+ 'wp_cache_mobile' => $wp_cache_mobile,
+ 'wp_super_cache_late_init' => $wp_super_cache_late_init,
+ 'wp_cache_anon_only' => $wp_cache_anon_only,
+ 'wp_cache_not_logged_in' => $wp_cache_not_logged_in,
+ 'wp_cache_clear_on_post_edit' => $wp_cache_clear_on_post_edit,
+ 'wp_cache_mobile_enabled' => $wp_cache_mobile_enabled,
+ 'wp_super_cache_debug' => $wp_super_cache_debug,
+ 'cache_max_time' => $cache_max_time,
+ 'wp_cache_refresh_single_only' => $wp_cache_refresh_single_only,
+ 'wp_cache_mfunc_enabled' => $wp_cache_mfunc_enabled,
+ 'wp_supercache_304' => $wp_supercache_304,
+ 'wp_cache_no_cache_for_get' => $wp_cache_no_cache_for_get,
+ 'wp_cache_mutex_disabled' => $wp_cache_mutex_disabled,
+ 'cache_jetpack' => $cache_jetpack,
+ 'cache_domain_mapping' => $cache_domain_mapping,
+ );
+ }
+
+ /**
+ * Add WP_Super_Cache constants to the constants whitelist.
+ *
+ * @param array $list Existing constants whitelist.
+ * @return array Updated constants whitelist.
+ */
+ public function add_wp_super_cache_constants_whitelist( $list ) {
+ return array_merge( $list, self::$wp_super_cache_constants );
+ }
+
+ /**
+ * Add WP_Super_Cache callables to the callables whitelist.
+ *
+ * @param array $list Existing callables whitelist.
+ * @return array Updated callables whitelist.
+ */
+ public function add_wp_super_cache_callable_whitelist( $list ) {
+ return array_merge( $list, self::$wp_super_cache_callables );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-usermeta.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-usermeta.php
new file mode 100644
index 00000000..20f686a6
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-usermeta.php
@@ -0,0 +1,208 @@
+build_filter_statement( $range_from, $range_to );
+
+ $query = "
+ SELECT
+ DISTINCT {$this->table}.{$this->range_field}
+ FROM
+ {$this->table}
+ JOIN {$wpdb->usermeta} as um_table ON um_table.user_id = {$this->table}.ID
+ WHERE
+ {$range_filter_statement}
+ AND um_table.meta_key = '{$wpdb->prefix}user_level'
+ AND um_table.meta_value > 0
+ ";
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $user_ids = $wpdb->get_col( $query );
+
+ // Chunk the array down to make sure we don't overload the database with queries that are too large.
+ $chunked_user_ids = array_chunk( $user_ids, 500 );
+
+ $checksum_entries = array();
+
+ foreach ( $chunked_user_ids as $user_ids_chunk ) {
+ $user_objects = $this->get_user_objects_by_ids( $user_ids_chunk );
+
+ foreach ( $user_objects as $user_object ) {
+ // expand and sanitize desired meta based on WP.com logic.
+ $user_object = $this->expand_and_sanitize_user_meta( $user_object );
+
+ // Generate checksum entry based on the serialized value if not empty.
+ $checksum_entry = 0;
+ if ( ! empty( $user_object->roles ) ) {
+ $checksum_entry = crc32( implode( '#', array( $this->salt, 'roles', maybe_serialize( $user_object->roles ) ) ) );
+ }
+
+ // Meta only persisted if user is connected to WP.com.
+ if ( ( new Manager( 'jetpack' ) )->is_user_connected( $user_object->ID ) ) {
+ if ( ! empty( $user_object->allcaps ) ) {
+ $checksum_entry += crc32(
+ implode(
+ '#',
+ array(
+ $this->salt,
+ 'capabilities',
+ maybe_serialize( $user_object->allcaps ),
+ )
+ )
+ );
+ }
+ // Explicitly check that locale is not same as site locale.
+ if ( ! empty( $user_object->locale ) && get_locale() !== $user_object->locale ) {
+ $checksum_entry += crc32(
+ implode(
+ '#',
+ array(
+ $this->salt,
+ 'locale',
+ maybe_serialize( $user_object->locale ),
+ )
+ )
+ );
+ }
+ if ( ! empty( $user_object->allowed_mime_types ) ) {
+ $checksum_entry += crc32(
+ implode(
+ '#',
+ array(
+ $this->salt,
+ 'allowed_mime_types',
+ maybe_serialize( $user_object->allowed_mime_types ),
+ )
+ )
+ );
+ }
+ }
+
+ $checksum_entries[ $user_object->ID ] = '' . $checksum_entry;
+ }
+ }
+
+ // Non-granular results need only to sum the different entries.
+ if ( ! $granular_result ) {
+ $checksum_sum = 0;
+ foreach ( $checksum_entries as $entry ) {
+ $checksum_sum += intval( $entry );
+ }
+
+ if ( $simple_return_value ) {
+ return '' . $checksum_sum;
+ }
+
+ return array(
+ 'range' => $range_from . '-' . $range_to,
+ 'checksum' => '' . $checksum_sum,
+ );
+
+ }
+
+ // Granular results.
+ $response = $checksum_entries;
+
+ // Sort the return value for easier comparisons and code flows further down the line.
+ ksort( $response );
+
+ return $response;
+ }
+
+ /**
+ * Expand the User Object with additional meta santized by WP.com logic.
+ *
+ * @param mixed $user_object User Object from WP_User_Query.
+ *
+ * @return mixed $user_object expanded User Object.
+ */
+ protected function expand_and_sanitize_user_meta( $user_object ) {
+ $user_module = Modules::get_module( 'users' );
+ // Expand User Objects based on Sync logic.
+ $user_object = $user_module->expand_user( $user_object );
+
+ // Sanitize location.
+ if ( ! empty( $user_object->locale ) ) {
+ $user_object->locale = wp_strip_all_tags( $user_object->locale, true );
+ }
+
+ // Sanitize allcaps.
+ if ( ! empty( $user_object->allcaps ) ) {
+ $user_object->allcaps = array_map(
+ function ( $cap ) {
+ return (bool) $cap;
+ },
+ $user_object->allcaps
+ );
+ }
+
+ // Sanitize allowed_mime_types.
+ $allowed_mime_types = $user_object->allowed_mime_types;
+ foreach ( $allowed_mime_types as $allowed_mime_type_short => $allowed_mime_type_long ) {
+ $allowed_mime_type_short = wp_strip_all_tags( (string) $allowed_mime_type_short, true );
+ $allowed_mime_type_long = wp_strip_all_tags( (string) $allowed_mime_type_long, true );
+ $allowed_mime_types[ $allowed_mime_type_short ] = $allowed_mime_type_long;
+ }
+ $user_object->allowed_mime_types = $allowed_mime_types;
+
+ // Sanitize roles.
+ if ( is_array( $user_object->roles ) ) {
+ $user_object->roles = array_map( 'sanitize_text_field', $user_object->roles );
+ }
+ return $user_object;
+ }
+
+ /**
+ * Gets a list of `WP_User` objects by their IDs
+ *
+ * @param array $ids List of IDs to fetch.
+ *
+ * @return array
+ */
+ protected function get_user_objects_by_ids( $ids ) {
+ $user_query = new WP_User_Query( array( 'include' => $ids ) );
+
+ return $user_query->get_results();
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-users.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-users.php
new file mode 100644
index 00000000..a6024c25
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-users.php
@@ -0,0 +1,183 @@
+prepare( '%s', $this->salt );
+
+ // Prepare the compound key.
+ $key_fields = array();
+
+ // Prefix the fields with the table name, to avoid clashes in queries with sub-queries (e.g. meta tables).
+ foreach ( $this->key_fields as $field ) {
+ $key_fields[] = $this->table . '.' . $field;
+ }
+
+ $key_fields = implode( ',', $key_fields );
+
+ // Prepare the checksum fields.
+ $checksum_fields = array();
+ // Prefix the fields with the table name, to avoid clashes in queries with sub-queries (e.g. meta tables).
+ foreach ( $this->checksum_fields as $field ) {
+ $checksum_fields[] = $this->table . '.' . $field;
+ }
+ // Apply latin1 conversion if enabled.
+ if ( $this->perform_text_conversion ) {
+ // Convert text fields to allow for encoding discrepancies as WP.com is latin1.
+ foreach ( $this->checksum_text_fields as $field ) {
+ $checksum_fields[] = 'CONVERT(' . $this->table . '.' . $field . ' using latin1 )';
+ }
+ } else {
+ // Conversion disabled, default to table prefixing.
+ foreach ( $this->checksum_text_fields as $field ) {
+ $checksum_fields[] = $this->table . '.' . $field;
+ }
+ }
+
+ $checksum_fields_string = implode( ',', array_merge( $checksum_fields, array( $salt ) ) );
+
+ $additional_fields = '';
+ if ( $granular_result ) {
+ // TODO uniq the fields as sometimes(most) range_index is the key and there's no need to select the same field twice.
+ $additional_fields = "
+ {$this->table}.{$this->range_field} as range_index,
+ {$key_fields},
+ ";
+ }
+
+ $filter_stamenet = $this->build_filter_statement( $range_from, $range_to, $filter_values );
+
+ // usermeta join to limit on user_level.
+ $join_statement = "JOIN {$wpdb->usermeta} as um_table ON um_table.user_id = {$this->table}.ID";
+
+ $query = "
+ SELECT
+ {$additional_fields}
+ SUM(
+ CRC32(
+ CONCAT_WS( '#', {$salt}, {$checksum_fields_string} )
+ )
+ ) AS checksum
+ FROM
+ {$this->table}
+ {$join_statement}
+ WHERE
+ {$filter_stamenet}
+ AND um_table.meta_key = '{$wpdb->prefix}user_level'
+ AND um_table.meta_value > 0
+ ";
+
+ /**
+ * We need the GROUP BY only for compound keys.
+ */
+ if ( $granular_result ) {
+ $query .= "
+ GROUP BY {$key_fields}
+ LIMIT 9999999
+ ";
+ }
+
+ return $query;
+ }
+
+ /**
+ * Obtain the min-max values (edges) of the range.
+ *
+ * @param int|null $range_from The start of the range.
+ * @param int|null $range_to The end of the range.
+ * @param int|null $limit How many values to return.
+ *
+ * @return array|object|void
+ * @throws Exception Throws an exception if validation fails on the internal function calls.
+ */
+ public function get_range_edges( $range_from = null, $range_to = null, $limit = null ) {
+ global $wpdb;
+
+ $this->validate_fields( array( $this->range_field ) );
+
+ // `trim()` to make sure we don't add the statement if it's empty.
+ $filters = trim( $this->build_filter_statement( $range_from, $range_to ) );
+
+ $filter_statement = '';
+ if ( ! empty( $filters ) ) {
+ $filter_statement = "
+ JOIN {$wpdb->usermeta} as um_table ON um_table.user_id = {$this->table}.ID
+ WHERE
+ {$filters}
+ AND um_table.meta_key = '{$wpdb->prefix}user_level'
+ AND um_table.meta_value > 0
+ ";
+ }
+
+ $query = "
+ SELECT
+ MIN({$this->range_field}) as min_range,
+ MAX({$this->range_field}) as max_range,
+ COUNT( {$this->range_field} ) as item_count
+ FROM
+ ";
+
+ /**
+ * If `$limit` is not specified, we can directly use the table.
+ */
+ if ( ! $limit ) {
+ $query .= "
+ {$this->table}
+ {$filter_statement}
+ ";
+ } else {
+ /**
+ * If there is `$limit` specified, we can't directly use `MIN/MAX()` as they don't work with `LIMIT`.
+ * That's why we will alter the query for this case.
+ */
+ $limit = intval( $limit );
+
+ $query .= "
+ (
+ SELECT
+ {$this->range_field}
+ FROM
+ {$this->table}
+ {$filter_statement}
+ ORDER BY
+ {$this->range_field} ASC
+ LIMIT {$limit}
+ ) as ids_query
+ ";
+ }
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $result = $wpdb->get_row( $query, ARRAY_A );
+
+ if ( ! $result || ! is_array( $result ) ) {
+ throw new Exception( 'Unable to get range edges' );
+ }
+
+ return $result;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum.php
new file mode 100644
index 00000000..95782dd4
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum.php
@@ -0,0 +1,880 @@
+salt = $salt;
+
+ $this->default_tables = $this->get_default_tables();
+
+ $this->perform_text_conversion = $perform_text_conversion;
+
+ // TODO change filters to allow the array format.
+ // TODO add get_fields or similar method to get things out of the table.
+ // TODO extract this configuration in a better way, still make it work with `$wpdb` names.
+ // TODO take over the replicastore functions and move them over to this class.
+ // TODO make the API work.
+
+ $this->allowed_tables = apply_filters( 'jetpack_sync_checksum_allowed_tables', $this->default_tables );
+
+ $this->table = $this->validate_table_name( $table );
+ $this->table_configuration = $this->allowed_tables[ $table ];
+
+ $this->prepare_fields( $this->table_configuration );
+
+ // Run any callbacks to check if a table is enabled or not.
+ if (
+ is_callable( $this->is_table_enabled_callback )
+ && ! call_user_func( $this->is_table_enabled_callback, $table )
+ ) {
+ throw new Exception( "Unable to use table name: $table" );
+ }
+ }
+
+ /**
+ * Get Default Table configurations.
+ *
+ * @return array
+ */
+ protected function get_default_tables() {
+ global $wpdb;
+
+ return array(
+ 'posts' => array(
+ 'table' => $wpdb->posts,
+ 'range_field' => 'ID',
+ 'key_fields' => array( 'ID' ),
+ 'checksum_fields' => array( 'post_modified_gmt' ),
+ 'filter_values' => Sync\Settings::get_disallowed_post_types_structured(),
+ 'is_table_enabled_callback' => function () {
+ return false !== Sync\Modules::get_module( 'posts' );
+ },
+ ),
+ 'postmeta' => array(
+ 'table' => $wpdb->postmeta,
+ 'range_field' => 'post_id',
+ 'key_fields' => array( 'post_id', 'meta_key' ),
+ 'checksum_text_fields' => array( 'meta_key', 'meta_value' ),
+ 'filter_values' => Sync\Settings::get_allowed_post_meta_structured(),
+ 'parent_table' => 'posts',
+ 'parent_join_field' => 'ID',
+ 'table_join_field' => 'post_id',
+ 'is_table_enabled_callback' => function () {
+ return false !== Sync\Modules::get_module( 'posts' );
+ },
+ ),
+ 'comments' => array(
+ 'table' => $wpdb->comments,
+ 'range_field' => 'comment_ID',
+ 'key_fields' => array( 'comment_ID' ),
+ 'checksum_fields' => array( 'comment_date_gmt' ),
+ 'filter_values' => array(
+ 'comment_type' => array(
+ 'operator' => 'IN',
+ 'values' => apply_filters(
+ 'jetpack_sync_whitelisted_comment_types',
+ array( '', 'comment', 'trackback', 'pingback', 'review' )
+ ),
+ ),
+ 'comment_approved' => array(
+ 'operator' => 'NOT IN',
+ 'values' => array( 'spam' ),
+ ),
+ ),
+ 'is_table_enabled_callback' => function () {
+ return false !== Sync\Modules::get_module( 'comments' );
+ },
+ ),
+ 'commentmeta' => array(
+ 'table' => $wpdb->commentmeta,
+ 'range_field' => 'comment_id',
+ 'key_fields' => array( 'comment_id', 'meta_key' ),
+ 'checksum_text_fields' => array( 'meta_key', 'meta_value' ),
+ 'filter_values' => Sync\Settings::get_allowed_comment_meta_structured(),
+ 'parent_table' => 'comments',
+ 'parent_join_field' => 'comment_ID',
+ 'table_join_field' => 'comment_id',
+ 'is_table_enabled_callback' => function () {
+ return false !== Sync\Modules::get_module( 'comments' );
+ },
+ ),
+ 'terms' => array(
+ 'table' => $wpdb->terms,
+ 'range_field' => 'term_id',
+ 'key_fields' => array( 'term_id' ),
+ 'checksum_fields' => array( 'term_id' ),
+ 'checksum_text_fields' => array( 'name', 'slug' ),
+ 'parent_table' => 'term_taxonomy',
+ 'is_table_enabled_callback' => function () {
+ return false !== Sync\Modules::get_module( 'terms' );
+ },
+ ),
+ 'termmeta' => array(
+ 'table' => $wpdb->termmeta,
+ 'range_field' => 'term_id',
+ 'key_fields' => array( 'term_id', 'meta_key' ),
+ 'checksum_text_fields' => array( 'meta_key', 'meta_value' ),
+ 'parent_table' => 'term_taxonomy',
+ 'is_table_enabled_callback' => function () {
+ return false !== Sync\Modules::get_module( 'terms' );
+ },
+ ),
+ 'term_relationships' => array(
+ 'table' => $wpdb->term_relationships,
+ 'range_field' => 'object_id',
+ 'key_fields' => array( 'object_id' ),
+ 'checksum_fields' => array( 'object_id', 'term_taxonomy_id' ),
+ 'parent_table' => 'term_taxonomy',
+ 'parent_join_field' => 'term_taxonomy_id',
+ 'table_join_field' => 'term_taxonomy_id',
+ 'is_table_enabled_callback' => function () {
+ return false !== Sync\Modules::get_module( 'terms' );
+ },
+ ),
+ 'term_taxonomy' => array(
+ 'table' => $wpdb->term_taxonomy,
+ 'range_field' => 'term_taxonomy_id',
+ 'key_fields' => array( 'term_taxonomy_id' ),
+ 'checksum_fields' => array( 'term_taxonomy_id', 'term_id', 'parent' ),
+ 'checksum_text_fields' => array( 'taxonomy', 'description' ),
+ 'filter_values' => Sync\Settings::get_allowed_taxonomies_structured(),
+ 'is_table_enabled_callback' => function () {
+ return false !== Sync\Modules::get_module( 'terms' );
+ },
+ ),
+ 'links' => $wpdb->links, // TODO describe in the array format or add exceptions.
+ 'options' => $wpdb->options, // TODO describe in the array format or add exceptions.
+ 'woocommerce_order_items' => array(
+ 'table' => "{$wpdb->prefix}woocommerce_order_items",
+ 'range_field' => 'order_item_id',
+ 'key_fields' => array( 'order_item_id' ),
+ 'checksum_fields' => array( 'order_id' ),
+ 'checksum_text_fields' => array( 'order_item_name', 'order_item_type' ),
+ 'is_table_enabled_callback' => array( $this, 'enable_woocommerce_tables' ),
+ ),
+ 'woocommerce_order_itemmeta' => array(
+ 'table' => "{$wpdb->prefix}woocommerce_order_itemmeta",
+ 'range_field' => 'order_item_id',
+ 'key_fields' => array( 'order_item_id', 'meta_key' ),
+ 'checksum_text_fields' => array( 'meta_key', 'meta_value' ),
+ 'filter_values' => Sync\Settings::get_allowed_order_itemmeta_structured(),
+ 'parent_table' => 'woocommerce_order_items',
+ 'parent_join_field' => 'order_item_id',
+ 'table_join_field' => 'order_item_id',
+ 'is_table_enabled_callback' => array( $this, 'enable_woocommerce_tables' ),
+ ),
+ 'wc_orders' => array(
+ 'table' => "{$wpdb->prefix}wc_orders",
+ 'range_field' => 'id',
+ 'key_fields' => array( 'id' ),
+ 'checksum_text_fields' => array( 'type', 'status', 'payment_method_title' ),
+ 'filter_values' => array(),
+ 'is_table_enabled_callback' => array( $this, 'enable_woocommerce_tables' ),
+ ),
+ 'wc_order_addresses' => array(
+ 'table' => "{$wpdb->prefix}wc_order_addresses",
+ 'range_field' => 'order_id',
+ 'key_fields' => array( 'order_id', 'address_type' ),
+ 'checksum_text_fields' => array( 'address_type' ),
+ 'filter_values' => array(),
+ 'is_table_enabled_callback' => array( $this, 'enable_woocommerce_tables' ),
+ ),
+ 'wc_order_operational_data' => array(
+ 'table' => "{$wpdb->prefix}wc_order_operational_data",
+ 'range_field' => 'order_id',
+ 'key_fields' => array( 'order_id' ),
+ 'checksum_text_fields' => array( 'order_key', 'cart_hash' ),
+ 'filter_values' => array(),
+ 'is_table_enabled_callback' => array( $this, 'enable_woocommerce_tables' ),
+ ),
+ 'users' => array(
+ 'table' => $wpdb->users,
+ 'range_field' => 'ID',
+ 'key_fields' => array( 'ID' ),
+ 'checksum_text_fields' => array( 'user_login', 'user_nicename', 'user_email', 'user_url', 'user_registered', 'user_status', 'display_name' ),
+ 'filter_values' => array(),
+ 'is_table_enabled_callback' => function () {
+ return false !== Sync\Modules::get_module( 'users' );
+ },
+ ),
+
+ /**
+ * Usermeta is a special table, as it needs to use a custom override flow,
+ * as the user roles, capabilities, locale, mime types can be filtered by plugins.
+ * This prevents us from doing a direct comparison in the database.
+ */
+ 'usermeta' => array(
+ 'table' => $wpdb->users,
+ /**
+ * Range field points to ID, which in this case is the `WP_User` ID,
+ * since we're querying the whole WP_User objects, instead of meta entries in the DB.
+ */
+ 'range_field' => 'ID',
+ 'key_fields' => array(),
+ 'checksum_fields' => array(),
+ 'is_table_enabled_callback' => function () {
+ return false !== Sync\Modules::get_module( 'users' );
+ },
+ ),
+ );
+ }
+
+ /**
+ * Prepare field params based off provided configuration.
+ *
+ * @param array $table_configuration The table configuration array.
+ */
+ protected function prepare_fields( $table_configuration ) {
+ $this->key_fields = $table_configuration['key_fields'];
+ $this->range_field = $table_configuration['range_field'];
+ $this->checksum_fields = isset( $table_configuration['checksum_fields'] ) ? $table_configuration['checksum_fields'] : array();
+ $this->checksum_text_fields = isset( $table_configuration['checksum_text_fields'] ) ? $table_configuration['checksum_text_fields'] : array();
+ $this->filter_values = isset( $table_configuration['filter_values'] ) ? $table_configuration['filter_values'] : null;
+ $this->additional_filter_sql = ! empty( $table_configuration['filter_sql'] ) ? $table_configuration['filter_sql'] : '';
+ $this->parent_table = isset( $table_configuration['parent_table'] ) ? $table_configuration['parent_table'] : null;
+ $this->parent_join_field = isset( $table_configuration['parent_join_field'] ) ? $table_configuration['parent_join_field'] : $table_configuration['range_field'];
+ $this->table_join_field = isset( $table_configuration['table_join_field'] ) ? $table_configuration['table_join_field'] : $table_configuration['range_field'];
+ $this->is_table_enabled_callback = isset( $table_configuration['is_table_enabled_callback'] ) ? $table_configuration['is_table_enabled_callback'] : false;
+ }
+
+ /**
+ * Verify provided table name is valid for checksum processing.
+ *
+ * @param string $table Table name to validate.
+ *
+ * @return mixed|string
+ * @throws Exception Throw an exception on validation failure.
+ */
+ protected function validate_table_name( $table ) {
+ if ( empty( $table ) ) {
+ throw new Exception( 'Invalid table name: empty' );
+ }
+
+ if ( ! array_key_exists( $table, $this->allowed_tables ) ) {
+ throw new Exception( "Invalid table name: $table not allowed" );
+ }
+
+ return $this->allowed_tables[ $table ]['table'];
+ }
+
+ /**
+ * Verify provided fields are proper names.
+ *
+ * @param array $fields Array of field names to validate.
+ *
+ * @throws Exception Throw an exception on failure to validate.
+ */
+ protected function validate_fields( $fields ) {
+ foreach ( $fields as $field ) {
+ if ( ! preg_match( '/^[0-9,a-z,A-Z$_]+$/i', $field ) ) {
+ throw new Exception( "Invalid field name: $field is not allowed" );
+ }
+
+ // TODO other verifications of the field names.
+ }
+ }
+
+ /**
+ * Verify the fields exist in the table.
+ *
+ * @param array $fields Array of fields to validate.
+ *
+ * @return bool
+ * @throws Exception Throw an exception on failure to validate.
+ */
+ protected function validate_fields_against_table( $fields ) {
+ global $wpdb;
+
+ $valid_fields = array();
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $result = $wpdb->get_results( "SHOW COLUMNS FROM {$this->table}", ARRAY_A );
+
+ foreach ( $result as $result_row ) {
+ $valid_fields[] = $result_row['Field'];
+ }
+
+ // Check if the fields are actually contained in the table.
+ foreach ( $fields as $field_to_check ) {
+ if ( ! in_array( $field_to_check, $valid_fields, true ) ) {
+ throw new Exception( "Invalid field name: field '{$field_to_check}' doesn't exist in table {$this->table}" );
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Verify the configured fields.
+ *
+ * @throws Exception Throw an exception on failure to validate in the internal functions.
+ */
+ protected function validate_input() {
+ $fields = array_merge( array( $this->range_field ), $this->key_fields, $this->checksum_fields, $this->checksum_text_fields );
+
+ $this->validate_fields( $fields );
+ $this->validate_fields_against_table( $fields );
+ }
+
+ /**
+ * Prepare filter values as SQL statements to be added to the other filters.
+ *
+ * @param array $filter_values The filter values array.
+ * @param string $table_prefix If the values are going to be used in a sub-query, add a prefix with the table alias.
+ *
+ * @return array|null
+ */
+ protected function prepare_filter_values_as_sql( $filter_values = array(), $table_prefix = '' ) {
+ global $wpdb;
+
+ if ( ! is_array( $filter_values ) ) {
+ return null;
+ }
+
+ $result = array();
+
+ foreach ( $filter_values as $field => $filter ) {
+ $key = ( ! empty( $table_prefix ) ? $table_prefix : $this->table ) . '.' . $field;
+
+ switch ( $filter['operator'] ) {
+ case 'IN':
+ case 'NOT IN':
+ $filter_values_count = is_countable( $filter['values'] ) ? count( $filter['values'] ) : 0;
+ $values_placeholders = implode( ',', array_fill( 0, $filter_values_count, '%s' ) );
+ $statement = "{$key} {$filter['operator']} ( $values_placeholders )";
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $prepared_statement = $wpdb->prepare( $statement, $filter['values'] );
+
+ $result[] = $prepared_statement;
+ break;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Build the filter query baased off range fields and values and the additional sql.
+ *
+ * @param int|null $range_from Start of the range.
+ * @param int|null $range_to End of the range.
+ * @param array|null $filter_values Additional filter values. Not used at the moment.
+ * @param string $table_prefix Table name to be prefixed to the columns. Used in sub-queries where columns can clash.
+ *
+ * @return string
+ */
+ public function build_filter_statement( $range_from = null, $range_to = null, $filter_values = null, $table_prefix = '' ) {
+ global $wpdb;
+
+ // If there is a field prefix that we want to use with table aliases.
+ $parent_prefix = ( ! empty( $table_prefix ) ? $table_prefix : $this->table ) . '.';
+
+ /**
+ * Prepare the ranges.
+ */
+
+ $filter_array = array( '1 = 1' );
+ if ( null !== $range_from ) {
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $filter_array[] = $wpdb->prepare( "{$parent_prefix}{$this->range_field} >= %d", array( intval( $range_from ) ) );
+ }
+ if ( null !== $range_to ) {
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $filter_array[] = $wpdb->prepare( "{$parent_prefix}{$this->range_field} <= %d", array( intval( $range_to ) ) );
+ }
+
+ /**
+ * End prepare the ranges.
+ */
+
+ /**
+ * Prepare data filters.
+ */
+
+ // Default filters.
+ if ( $this->filter_values ) {
+ $prepared_values_statements = $this->prepare_filter_values_as_sql( $this->filter_values, $table_prefix );
+ if ( $prepared_values_statements ) {
+ $filter_array = array_merge( $filter_array, $prepared_values_statements );
+ }
+ }
+
+ // Additional filters.
+ if ( ! empty( $filter_values ) ) {
+ // Prepare filtering.
+ $prepared_values_statements = $this->prepare_filter_values_as_sql( $filter_values, $table_prefix );
+ if ( $prepared_values_statements ) {
+ $filter_array = array_merge( $filter_array, $prepared_values_statements );
+ }
+ }
+
+ // Add any additional filters via direct SQL statement.
+ // Currently used only because we haven't converted all filtering to happen via `filter_values`.
+ // This SQL is NOT prefixed and column clashes can occur when used in sub-queries.
+ if ( $this->additional_filter_sql ) {
+ $filter_array[] = $this->additional_filter_sql;
+ }
+
+ /**
+ * End prepare data filters.
+ */
+ return implode( ' AND ', $filter_array );
+ }
+
+ /**
+ * Returns the checksum query. All validation of fields and configurations are expected to occur prior to usage.
+ *
+ * @param int|null $range_from The start of the range.
+ * @param int|null $range_to The end of the range.
+ * @param array|null $filter_values Additional filter values. Not used at the moment.
+ * @param bool $granular_result If the function should return a granular result.
+ *
+ * @return string
+ *
+ * @throws Exception Throws an exception if validation fails in the internal function calls.
+ */
+ protected function build_checksum_query( $range_from = null, $range_to = null, $filter_values = null, $granular_result = false ) {
+ global $wpdb;
+
+ // Escape the salt.
+ $salt = $wpdb->prepare( '%s', $this->salt );
+
+ // Prepare the compound key.
+ $key_fields = array();
+
+ // Prefix the fields with the table name, to avoid clashes in queries with sub-queries (e.g. meta tables).
+ foreach ( $this->key_fields as $field ) {
+ $key_fields[] = $this->table . '.' . $field;
+ }
+
+ $key_fields = implode( ',', $key_fields );
+
+ // Prepare the checksum fields.
+ $checksum_fields = array();
+ // Prefix the fields with the table name, to avoid clashes in queries with sub-queries (e.g. meta tables).
+ foreach ( $this->checksum_fields as $field ) {
+ $checksum_fields[] = $this->table . '.' . $field;
+ }
+ // Apply latin1 conversion if enabled.
+ if ( $this->perform_text_conversion ) {
+ // Convert text fields to allow for encoding discrepancies as WP.com is latin1.
+ foreach ( $this->checksum_text_fields as $field ) {
+ $checksum_fields[] = 'CONVERT(' . $this->table . '.' . $field . ' using latin1 )';
+ }
+ } else {
+ // Conversion disabled, default to table prefixing.
+ foreach ( $this->checksum_text_fields as $field ) {
+ $checksum_fields[] = $this->table . '.' . $field;
+ }
+ }
+
+ $checksum_fields_string = implode( ',', array_merge( $checksum_fields, array( $salt ) ) );
+
+ $additional_fields = '';
+ if ( $granular_result ) {
+ // TODO uniq the fields as sometimes(most) range_index is the key and there's no need to select the same field twice.
+ $additional_fields = "
+ {$this->table}.{$this->range_field} as range_index,
+ {$key_fields},
+ ";
+ }
+
+ $filter_stamenet = $this->build_filter_statement( $range_from, $range_to, $filter_values );
+
+ $join_statement = '';
+ if ( $this->parent_table ) {
+ $parent_table_obj = new Table_Checksum( $this->parent_table );
+ $parent_filter_query = $parent_table_obj->build_filter_statement( null, null, null, 'parent_table' );
+
+ // It is possible to have the GROUP By cause multiple rows to be returned for the same row for term_taxonomy.
+ // To get distinct entries we use a correlatd subquery back on the parent table using the primary key.
+ $additional_unique_clause = '';
+ if ( 'term_taxonomy' === $this->parent_table ) {
+ $additional_unique_clause = "
+ AND parent_table.{$parent_table_obj->range_field} = (
+ SELECT min( parent_table_cs.{$parent_table_obj->range_field} )
+ FROM {$parent_table_obj->table} as parent_table_cs
+ WHERE parent_table_cs.{$this->parent_join_field} = {$this->table}.{$this->table_join_field}
+ )
+ ";
+ }
+
+ $join_statement = "
+ INNER JOIN {$parent_table_obj->table} as parent_table
+ ON (
+ {$this->table}.{$this->table_join_field} = parent_table.{$this->parent_join_field}
+ AND {$parent_filter_query}
+ $additional_unique_clause
+ )
+ ";
+ }
+
+ $query = "
+ SELECT
+ {$additional_fields}
+ SUM(
+ CRC32(
+ CONCAT_WS( '#', {$salt}, {$checksum_fields_string} )
+ )
+ ) AS checksum
+ FROM
+ {$this->table}
+ {$join_statement}
+ WHERE
+ {$filter_stamenet}
+ ";
+
+ /**
+ * We need the GROUP BY only for compound keys.
+ */
+ if ( $granular_result ) {
+ $query .= "
+ GROUP BY {$key_fields}
+ LIMIT 9999999
+ ";
+ }
+
+ return $query;
+ }
+
+ /**
+ * Obtain the min-max values (edges) of the range.
+ *
+ * @param int|null $range_from The start of the range.
+ * @param int|null $range_to The end of the range.
+ * @param int|null $limit How many values to return.
+ *
+ * @return array|object|void
+ * @throws Exception Throws an exception if validation fails on the internal function calls.
+ */
+ public function get_range_edges( $range_from = null, $range_to = null, $limit = null ) {
+ global $wpdb;
+
+ $this->validate_fields( array( $this->range_field ) );
+
+ // Performance :: When getting the postmeta range we do not want to filter by the whitelist.
+ // The reason for this is that it leads to a non-performant query that can timeout.
+ // Instead lets get the range based on posts regardless of meta.
+ $filter_values = $this->filter_values;
+ if ( 'postmeta' === $this->table ) {
+ $this->filter_values = null;
+ }
+
+ // `trim()` to make sure we don't add the statement if it's empty.
+ $filters = trim( $this->build_filter_statement( $range_from, $range_to ) );
+
+ // Reset Post meta filter.
+ if ( 'postmeta' === $this->table ) {
+ $this->filter_values = $filter_values;
+ }
+
+ $filter_statement = '';
+ if ( ! empty( $filters ) ) {
+ $filter_statement = "
+ WHERE
+ {$filters}
+ ";
+ }
+
+ // Only make the distinct count when we know there can be multiple entries for the range column.
+ $distinct_count = '';
+ if ( count( $this->key_fields ) > 1 || $wpdb->terms === $this->table || $wpdb->term_relationships === $this->table ) {
+ $distinct_count = 'DISTINCT';
+ }
+
+ $query = "
+ SELECT
+ MIN({$this->range_field}) as min_range,
+ MAX({$this->range_field}) as max_range,
+ COUNT( {$distinct_count} {$this->range_field}) as item_count
+ FROM
+ ";
+
+ /**
+ * If `$limit` is not specified, we can directly use the table.
+ */
+ if ( ! $limit ) {
+ $query .= "
+ {$this->table}
+ {$filter_statement}
+ ";
+ } else {
+ /**
+ * If there is `$limit` specified, we can't directly use `MIN/MAX()` as they don't work with `LIMIT`.
+ * That's why we will alter the query for this case.
+ */
+ $limit = intval( $limit );
+
+ $query .= "
+ (
+ SELECT
+ {$distinct_count} {$this->range_field}
+ FROM
+ {$this->table}
+ {$filter_statement}
+ ORDER BY
+ {$this->range_field} ASC
+ LIMIT {$limit}
+ ) as ids_query
+ ";
+ }
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $result = $wpdb->get_row( $query, ARRAY_A );
+
+ if ( ! $result || ! is_array( $result ) ) {
+ throw new Exception( 'Unable to get range edges' );
+ }
+
+ return $result;
+ }
+
+ /**
+ * Update the results to have key/checksum format.
+ *
+ * @param array $results Prepare the results for output of granular results.
+ */
+ protected function prepare_results_for_output( &$results ) {
+ // get the compound key.
+ // only return range and compound key for granular results.
+
+ $return_value = array();
+
+ foreach ( $results as &$result ) {
+ // Working on reference to save memory here.
+
+ $key = array();
+ foreach ( $this->key_fields as $field ) {
+ $key[] = $result[ $field ];
+ }
+
+ $return_value[ implode( '-', $key ) ] = $result['checksum'];
+ }
+
+ return $return_value;
+ }
+
+ /**
+ * Calculate the checksum based on provided range and filters.
+ *
+ * @param int|null $range_from The start of the range.
+ * @param int|null $range_to The end of the range.
+ * @param array|null $filter_values Additional filter values. Not used at the moment.
+ * @param bool $granular_result If the returned result should be granular or only the checksum.
+ * @param bool $simple_return_value If we want to use a simple return value for non-granular results (return only the checksum, without wrappers).
+ *
+ * @return array|mixed|object|WP_Error|null
+ */
+ public function calculate_checksum( $range_from = null, $range_to = null, $filter_values = null, $granular_result = false, $simple_return_value = true ) {
+
+ if ( ! Sync\Settings::is_checksum_enabled() ) {
+ return new WP_Error( 'checksum_disabled', 'Checksums are currently disabled.' );
+ }
+
+ try {
+ $this->validate_input();
+ } catch ( Exception $ex ) {
+ return new WP_Error( 'invalid_input', $ex->getMessage() );
+ }
+
+ $query = $this->build_checksum_query( $range_from, $range_to, $filter_values, $granular_result );
+
+ global $wpdb;
+
+ if ( ! $granular_result ) {
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $result = $wpdb->get_row( $query, ARRAY_A );
+
+ if ( ! is_array( $result ) ) {
+ return new WP_Error( 'invalid_query', "Result wasn't an array" );
+ }
+
+ if ( $simple_return_value ) {
+ return $result['checksum'];
+ }
+
+ return array(
+ 'range' => $range_from . '-' . $range_to,
+ 'checksum' => $result['checksum'],
+ );
+ } else {
+ // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $result = $wpdb->get_results( $query, ARRAY_A );
+ return $this->prepare_results_for_output( $result );
+ }
+ }
+
+ /**
+ * Make sure the WooCommerce tables should be enabled for Checksum/Fix.
+ *
+ * @return bool
+ */
+ protected function enable_woocommerce_tables() {
+ /**
+ * On WordPress.com, we can't directly check if the site has support for WooCommerce.
+ * Having the option to override the functionality here helps with syncing WooCommerce tables.
+ *
+ * @since 10.1
+ *
+ * @param bool If we should we force-enable WooCommerce tables support.
+ */
+ $force_woocommerce_support = apply_filters( 'jetpack_table_checksum_force_enable_woocommerce', false );
+
+ // If we're forcing WooCommerce tables support, there's no need to check further.
+ // This is used on WordPress.com.
+ if ( $force_woocommerce_support ) {
+ return true;
+ }
+
+ // No need to proceed if WooCommerce is not available.
+ if ( ! class_exists( 'WooCommerce' ) ) {
+ return false;
+ }
+
+ // TODO more checks if needed. Probably query the DB to make sure the tables exist.
+
+ return true;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-options.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-options.php
new file mode 100644
index 00000000..73421389
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-options.php
@@ -0,0 +1,291 @@
+queue_id = $queue_id;
+ }
+
+ /**
+ * Insert an item in the queue.
+ *
+ * @param string $item_id The item ID.
+ * @param string $item Serialized item data.
+ *
+ * @return bool If the item was added.
+ */
+ public function insert_item( $item_id, $item ) {
+ global $wpdb;
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery
+ $rows_added = $wpdb->query(
+ $wpdb->prepare(
+ "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES (%s, %s,%s)",
+ $item_id,
+ $item,
+ 'no'
+ )
+ );
+
+ return ( 0 !== $rows_added );
+ }
+
+ /**
+ * Fetch items from the queue.
+ *
+ * @param int|null $item_count How many items to fetch from the queue.
+ * The parameter is null-able, if no limit on the amount of items.
+ *
+ * @return array|object|\stdClass[]|null
+ */
+ public function fetch_items( $item_count ) {
+ global $wpdb;
+
+ // TODO make it more simple for the $item_count
+ if ( $item_count ) {
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery
+ $items = $wpdb->get_results(
+ $wpdb->prepare(
+ "SELECT option_name AS id, option_value AS value FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_name ASC LIMIT %d",
+ "jpsq_{$this->queue_id}-%",
+ $item_count
+ ),
+ OBJECT
+ );
+ } else {
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery
+ $items = $wpdb->get_results(
+ $wpdb->prepare(
+ "SELECT option_name AS id, option_value AS value FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_name ASC",
+ "jpsq_{$this->queue_id}-%"
+ ),
+ OBJECT
+ );
+ }
+
+ return $items;
+ }
+
+ /**
+ * Fetches items with specific IDs from the Queue.
+ *
+ * @param array $items_ids Items IDs to fetch from the queue.
+ *
+ * @return \stdClass[]|null
+ */
+ public function fetch_items_by_ids( $items_ids ) {
+ global $wpdb;
+
+ // return early if $items_ids is empty or not an array.
+ if ( empty( $items_ids ) || ! is_array( $items_ids ) ) {
+ return array();
+ }
+
+ $ids_placeholders = implode( ', ', array_fill( 0, count( $items_ids ), '%s' ) );
+
+ $query_with_placeholders = "SELECT option_name AS id, option_value AS value
+ FROM $wpdb->options
+ WHERE option_name IN ( $ids_placeholders )";
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery
+ $items = $wpdb->get_results(
+ $wpdb->prepare(
+ $query_with_placeholders, // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $items_ids
+ ),
+ OBJECT
+ );
+
+ return $items;
+ }
+
+ /**
+ * Clear out the queue.
+ *
+ * @return bool|int|\mysqli_result|resource|null
+ */
+ public function clear_queue() {
+ global $wpdb;
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery
+ return $wpdb->query(
+ $wpdb->prepare(
+ "DELETE FROM $wpdb->options WHERE option_name LIKE %s",
+ "jpsq_{$this->queue_id}-%"
+ )
+ );
+ }
+
+ /**
+ * Check how many items are in the queue.
+ *
+ * @return int
+ */
+ public function get_item_count() {
+ global $wpdb;
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery
+ return (int) $wpdb->get_var(
+ $wpdb->prepare(
+ "SELECT count(*) FROM $wpdb->options WHERE option_name LIKE %s",
+ "jpsq_{$this->queue_id}-%"
+ )
+ );
+ }
+
+ /**
+ * Return the lag amount for the queue.
+ *
+ * @param float|int|null $now A timestamp to use as starting point when calculating the lag.
+ *
+ * @return float|int The lag amount.
+ */
+ public function get_lag( $now = null ) {
+ global $wpdb;
+
+ // TODO replace with peek and a flag to fetch only the name.
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery
+ $first_item_name = $wpdb->get_var(
+ $wpdb->prepare(
+ "SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_name ASC LIMIT 1",
+ "jpsq_{$this->queue_id}-%"
+ )
+ );
+
+ if ( ! $first_item_name ) {
+ return 0;
+ }
+
+ if ( null === $now ) {
+ $now = microtime( true );
+ }
+
+ // Break apart the item name to get the timestamp.
+ $matches = null;
+ if ( preg_match( '/^jpsq_' . $this->queue_id . '-(\d+\.\d+)-/', $first_item_name, $matches ) ) {
+ return $now - (float) $matches[1];
+ } else {
+ return 0;
+ }
+ }
+
+ /**
+ * Add multiple items to the queue at once.
+ *
+ * @param array $items Array of items to add.
+ * @param string $id_prefix Prefix to use for all the items.
+ *
+ * @return bool|int|\mysqli_result|resource|null
+ */
+ public function add_all( $items, $id_prefix ) {
+ global $wpdb;
+
+ $query = "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES ";
+
+ $rows = array();
+ $count_items = count( $items );
+ for ( $i = 0; $i < $count_items; ++$i ) {
+ // skip empty items.
+ if ( empty( $items[ $i ] ) ) {
+ continue;
+ }
+ try {
+ $option_name = esc_sql( $id_prefix . '-' . $i );
+ $option_value = esc_sql( serialize( $items[ $i ] ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize
+ $rows[] = "('$option_name', '$option_value', 'no')";
+ } catch ( \Exception $e ) {
+ // Item cannot be serialized so skip.
+ continue;
+ }
+ }
+
+ $rows_added = $wpdb->query( $query . implode( ',', $rows ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
+
+ return $rows_added;
+ }
+
+ /**
+ * Return $max_count items from the queue, including their value string length.
+ *
+ * @param int $max_count How many items to fetch from the queue.
+ *
+ * @return \stdClass[]|null
+ */
+ public function get_items_ids_with_size( $max_count ) {
+ global $wpdb;
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery
+ return $wpdb->get_results(
+ $wpdb->prepare(
+ "SELECT option_name AS id, LENGTH(option_value) AS value_size FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_name ASC LIMIT %d",
+ "jpsq_{$this->queue_id}-%",
+ $max_count
+ ),
+ OBJECT
+ );
+ }
+
+ /**
+ * Delete items with specific IDs from the queue.
+ *
+ * @param array $ids IDs of the items to remove from the queue.
+ *
+ * @return bool|int|\mysqli_result|resource|null
+ */
+ public function delete_items_by_ids( $ids ) {
+ global $wpdb;
+
+ if ( ! is_array( $ids ) || empty( $ids ) ) {
+ return false;
+ }
+
+ // TODO check if it's working properly - no need to delete all options in the table if the params are not right
+ $ids_placeholders = implode( ', ', array_fill( 0, count( $ids ), '%s' ) );
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery
+ return $wpdb->query(
+ $wpdb->prepare(
+ /**
+ * Ignoring the linting warning, as there's still no placeholder replacement for DB field name,
+ * in this case this is `$ids_placeholders`, as we're preparing them above and are a dynamic count.
+ */
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare
+ "DELETE FROM {$wpdb->options} WHERE option_name IN ( $ids_placeholders )",
+ $ids
+ )
+ );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-table.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-table.php
new file mode 100644
index 00000000..09089f65
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-table.php
@@ -0,0 +1,663 @@
+queue_id = $queue_id;
+
+ // Initialize the `table_name` property with the correct prefix for easier usage in the class.
+ $this->table_name = $wpdb->prefix . $this->table_name_no_prefix;
+ }
+
+ /**
+ * Creates the new table and updates the options to work with
+ * the new table if it was created successfully.
+ *
+ * @return void
+ */
+ protected function create_table() {
+ global $wpdb;
+
+ require_once ABSPATH . '/wp-admin/includes/upgrade.php';
+
+ $charset_collate = $wpdb->get_charset_collate();
+
+ $table_definition = "CREATE TABLE {$this->table_name} (
+ `ID` bigint(20) NOT NULL AUTO_INCREMENT,
+ `queue_id` varchar(50) NOT NULL,
+ `event_id` varchar(100) NOT NULL,
+ `event_payload` longtext NOT NULL,
+ `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
+ PRIMARY KEY (`ID`),
+ KEY `event_id` (`event_id`),
+ KEY `queue_id` (`queue_id`),
+ KEY `queue_id_event_id` (queue_id, event_id),
+ KEY `timestamp` (`timestamp`)
+ ) $charset_collate;";
+
+ /**
+ * The function dbDelta will only return the differences. If the table exists, the result will be empty,
+ * so let's run a check afterward to see if the table exists and is healthy.
+ */
+ \dbDelta( $table_definition );
+ }
+
+ /**
+ * Check if the Custom table actually exists.
+ *
+ * @return bool
+ */
+ protected function custom_table_exists() {
+ global $wpdb;
+
+ // Check if the table exists
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $result = $wpdb->get_row(
+ $wpdb->prepare( 'SHOW TABLES LIKE %s', $this->table_name ),
+ ARRAY_N
+ );
+
+ if ( empty( $result ) || count( $result ) !== 1 || $result[0] !== $this->table_name ) {
+ return false;
+ }
+
+ return true;
+ }
+ /**
+ * Check if the table is healthy, and we can read and write from/to it.
+ *
+ * @return true|\WP_Error If the custom table is available, and we can read and write from/to it.
+ */
+ protected function is_custom_table_healthy() {
+ global $wpdb;
+
+ if ( ! $this->custom_table_exists() ) {
+ return new \WP_Error( 'custom_table_not_exist', 'Jetpack Sync Custom table: Table does not exist' );
+ }
+
+ // Try to read from the table
+
+ // Ignore the interpolated table name
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $query = $wpdb->query( "SELECT count(`ID`) FROM {$this->table_name}" );
+
+ if ( $query === false ) {
+ // The query failed to select anything from the table, so there must be an issue reading from it.
+ return new \WP_Error( 'custom_table_unable_to_read', 'Jetpack Sync Custom table: Unable to read from table' );
+ }
+
+ if ( $wpdb->last_error ) {
+ // There was an error reading, that's not necessarily failing the query.
+ // TODO check if we need this error check.
+ // TODO add more information about the erorr in the return value.
+ return new \WP_Error( 'custom_table_unable_to_read_sql_error', 'Jetpack Sync Custom table: Unable to read from table - SQL error' );
+ }
+
+ // Check if we can write in the table
+ if ( ! $this->insert_item( 'test', 'test' ) ) {
+ return new \WP_Error( 'custom_table_unable_to_writeread', 'Jetpack Sync Custom table: Unable to write into table' );
+ }
+
+ // See if we can read the item back
+ $items = $this->fetch_items_by_ids( array( 'test' ) );
+ if ( empty( $items ) || ! is_object( $items[0] ) || $items[0]->value !== 'test' ) {
+ return new \WP_Error( 'custom_table_unable_to_writeread', 'Jetpack Sync Custom table: Unable to read item after writing' );
+ }
+
+ // Try to insert an item, read it back and then delete it.
+ $this->delete_items_by_ids( array( 'test' ) );
+
+ // Try to fetch the item back. It should not exist.
+ $items = $this->fetch_items_by_ids( array( 'test' ) );
+ if ( ! empty( $items ) ) {
+ return new \WP_Error( 'custom_table_unable_to_writeread', 'Jetpack Sync Custom table: Unable to delete from table' );
+ }
+
+ return true;
+ }
+
+ /**
+ * Drop the custom table as part of cleanup.
+ *
+ * @return bool If the table is cleared.
+ */
+ public function drop_table() {
+ global $wpdb;
+
+ if ( $this->custom_table_exists() ) {
+ // Ignoring the linting warning, as there's still no placeholder replacement for DB field name.
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.SchemaChange
+ return (bool) $wpdb->query( "DROP TABLE {$this->table_name}" );
+ }
+ }
+
+ /**
+ * Queue API implementation
+ */
+
+ /**
+ * Insert an item in the queue.
+ *
+ * @param string $item_id The item ID.
+ * @param string $item Serialized item data.
+ *
+ * @return bool If the item was added.
+ */
+ public function insert_item( $item_id, $item ) {
+ global $wpdb;
+
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $rows_added = $wpdb->query(
+ $wpdb->prepare(
+ /**
+ * Ignoring the linting warning, as there's still no placeholder replacement for DB field name,
+ * in this case this is `$this->table_name`
+ */
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ "INSERT INTO {$this->table_name} (queue_id, event_id, event_payload) VALUES (%s, %s,%s)",
+ $this->queue_id,
+ $item_id,
+ $item
+ )
+ );
+
+ return ( 0 !== $rows_added );
+ }
+
+ /**
+ * Fetch items from the queue.
+ *
+ * @param int|null $item_count How many items to fetch from the queue.
+ * The parameter is null-able, if no limit on the amount of items.
+ *
+ * @return array|object|stdClass[]|null
+ */
+ public function fetch_items( $item_count ) {
+ global $wpdb;
+
+ /**
+ * Ignoring the linting warning, as there's still no placeholder replacement for DB field name,
+ * in this case this is `$this->table_name`
+ */
+ // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+
+ // TODO make it more simple for the $item_count
+ if ( $item_count ) {
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $items = $wpdb->get_results(
+ $wpdb->prepare(
+ "
+ SELECT
+ event_id AS id,
+ event_payload AS value
+ FROM {$this->table_name}
+ WHERE queue_id LIKE %s
+ ORDER BY event_id ASC
+ LIMIT %d
+ ",
+ $this->queue_id,
+ $item_count
+ )
+ );
+ } else {
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $items = $wpdb->get_results(
+ $wpdb->prepare(
+ "
+ SELECT
+ event_id AS id,
+ event_payload AS value
+ FROM {$this->table_name}
+ WHERE queue_id LIKE %s
+ ORDER BY event_id ASC
+ ",
+ $this->queue_id
+ )
+ );
+ }
+
+ // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+
+ return $items;
+ }
+
+ /**
+ * Fetches items with specific IDs from the Queue.
+ *
+ * @param array $items_ids Items IDs to fetch from the queue.
+ *
+ * @return array|object|stdClass[]|null
+ */
+ public function fetch_items_by_ids( $items_ids ) {
+ global $wpdb;
+
+ // return early if $items_ids is empty or not an array.
+ if ( empty( $items_ids ) || ! is_array( $items_ids ) ) {
+ return array();
+ }
+
+ $ids_placeholders = implode( ', ', array_fill( 0, count( $items_ids ), '%s' ) );
+ $query_with_placeholders = "SELECT event_id AS id, event_payload AS value
+ FROM {$this->table_name}
+ WHERE queue_id = %s AND event_id IN ( $ids_placeholders )";
+
+ $replacement_values = array_merge( array( $this->queue_id ), $items_ids );
+
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $items = $wpdb->get_results(
+ $wpdb->prepare(
+ $query_with_placeholders, // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
+ $replacement_values
+ ),
+ OBJECT
+ );
+
+ return $items;
+ }
+
+ /**
+ * Check how many items are in the queue.
+ *
+ * @return int
+ */
+ public function get_item_count() {
+ global $wpdb;
+
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ return (int) $wpdb->get_var(
+ $wpdb->prepare(
+ /**
+ * Ignoring the linting warning, as there's still no placeholder replacement for DB field name,
+ * in this case this is `$this->table_name`
+ */
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ "SELECT count(*) FROM {$this->table_name} WHERE queue_id = %s",
+ $this->queue_id
+ )
+ );
+ }
+
+ /**
+ * Clear out the queue.
+ *
+ * @return bool|int|\mysqli_result|resource|null
+ */
+ public function clear_queue() {
+ global $wpdb;
+
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ return $wpdb->query(
+ $wpdb->prepare(
+ /**
+ * Ignoring the linting warning, as there's still no placeholder replacement for DB field name,
+ * in this case this is `$this->table_name`
+ */
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ "DELETE FROM {$this->table_name} WHERE queue_id = %s",
+ $this->queue_id
+ )
+ );
+ }
+
+ /**
+ * Return the lag amount for the queue.
+ *
+ * @param float|int|null $now A timestamp to use as starting point when calculating the lag.
+ *
+ * @return float|int The lag amount.
+ */
+ public function get_lag( $now = null ) {
+ global $wpdb;
+
+ // TODO replace with peek and a flag to fetch only the name.
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $first_item_name = $wpdb->get_var(
+ $wpdb->prepare(
+ /**
+ * Ignoring the linting warning, as there's still no placeholder replacement for DB field name,
+ * in this case this is `$this->table_name`
+ */
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ "SELECT event_id FROM {$this->table_name} WHERE queue_id = %s ORDER BY event_id ASC LIMIT 1",
+ $this->queue_id
+ )
+ );
+
+ if ( ! $first_item_name ) {
+ return 0;
+ }
+
+ if ( null === $now ) {
+ $now = microtime( true );
+ }
+
+ // Break apart the item name to get the timestamp.
+ $matches = null;
+ if ( preg_match( '/^jpsq_' . $this->queue_id . '-(\d+\.\d+)-/', $first_item_name, $matches ) ) {
+ return $now - (float) $matches[1];
+ } else {
+ return 0;
+ }
+ }
+
+ /**
+ * Add multiple items to the queue at once.
+ *
+ * @param array $items Array of items to add.
+ * @param string $id_prefix Prefix to use for all the items.
+ *
+ * @return bool|int|\mysqli_result|resource|null
+ */
+ public function add_all( $items, $id_prefix ) {
+ global $wpdb;
+
+ $query = "INSERT INTO {$this->table_name} (queue_id, event_id, event_payload ) VALUES ";
+
+ $rows = array();
+ $count_items = count( $items );
+ for ( $i = 0; $i < $count_items; ++$i ) {
+ // skip empty items.
+ if ( empty( $items[ $i ] ) ) {
+ continue;
+ }
+ try {
+ $event_id = esc_sql( $id_prefix . '-' . $i );
+ $event_payload = esc_sql( serialize( $items[ $i ] ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize
+ $rows[] = "('{$this->queue_id}', '$event_id','$event_payload')";
+ } catch ( \Exception $e ) {
+ // Item cannot be serialized so skip.
+ continue;
+ }
+ }
+
+ $rows_added = $wpdb->query( $query . implode( ',', $rows ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
+
+ return $rows_added;
+ }
+
+ /**
+ * Return $max_count items from the queue, including their value string length.
+ *
+ * @param int $max_count How many items to fetch from the queue.
+ *
+ * @return array|object|stdClass[]|null
+ */
+ public function get_items_ids_with_size( $max_count ) {
+ global $wpdb;
+
+ // TODO optimize the fetch to happen by queue name not by the IDs as it can be issue cross-queues.
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ return $wpdb->get_results(
+ $wpdb->prepare(
+ /**
+ * Ignoring the linting warning, as there's still no placeholder replacement for DB field name,
+ * in this case this is `$this->table_name`
+ */
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ "SELECT event_id AS id, LENGTH( event_payload ) AS value_size FROM {$this->table_name} WHERE queue_id = %s ORDER BY event_id ASC LIMIT %d",
+ $this->queue_id,
+ $max_count
+ ),
+ OBJECT
+ );
+ }
+
+ /**
+ * Delete items with specific IDs from the queue.
+ *
+ * @param array $ids IDs of the items to remove from the queue.
+ *
+ * @return bool|int|\mysqli_result|resource|null
+ */
+ public function delete_items_by_ids( $ids ) {
+ global $wpdb;
+ $ids_placeholders = implode( ', ', array_fill( 0, count( $ids ), '%s' ) );
+
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ return $wpdb->query(
+ $wpdb->prepare(
+ /**
+ * Ignoring the linting warning, as there's still no placeholder replacement for DB field name,
+ * in this case this is `$this->table_name`
+ */
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ "DELETE FROM {$this->table_name} WHERE queue_id = %s AND event_id IN ( $ids_placeholders )",
+ array_merge( array( $this->queue_id ), $ids )
+ )
+ );
+ }
+
+ /**
+ * Table initialization
+ */
+ public static function initialize_custom_sync_table() {
+ /**
+ * Initialize an instance of the class with a test name, so we can use table prefix and then test if the table is healthy.
+ */
+ $custom_table_instance = new Queue_Storage_Table( 'test_queue' );
+
+ // Check if the table exists
+ if ( ! $custom_table_instance->custom_table_exists() ) {
+ $custom_table_instance->create_table();
+ }
+
+ return $custom_table_instance->is_custom_table_healthy();
+ }
+
+ /**
+ * Migrates the existing Sync events from the options table to the Custom table
+ *
+ * @return bool
+ */
+ public static function migrate_from_options_table_to_custom_table() {
+ global $wpdb;
+
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching
+ $count_result = $wpdb->get_row(
+ "
+ SELECT
+ COUNT(*) as item_count
+ FROM
+ {$wpdb->options}
+ WHERE
+ option_name LIKE 'jpsq_%'
+ "
+ );
+
+ $item_count = $count_result->item_count;
+
+ $limit = 100;
+ $offset = 0;
+
+ do {
+ // get all the records from the options table
+ $query = "
+ SELECT
+ option_name as event_id,
+ option_value as event_payload
+ FROM
+ {$wpdb->options}
+ WHERE
+ option_name LIKE 'jpsq_%'
+ ORDER BY
+ option_name ASC
+ LIMIT $offset, $limit
+ ";
+
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared
+ $rows = $wpdb->get_results( $query );
+
+ $insert_rows = array();
+
+ foreach ( $rows as $event ) {
+ $event_id = $event->event_id;
+
+ // Parse the event
+ if (
+ preg_match(
+ '!jpsq_(?P[^-]+)-(?P[^-]+)-.+!',
+ $event_id,
+ $events_matches
+ )
+ ) {
+ $queue_id = $events_matches['queue_id'];
+ $timestamp = $events_matches['timestamp'];
+
+ $insert_rows[] = $wpdb->prepare(
+ '(%s, %s, %s, %s)',
+ array(
+ $queue_id,
+ $event_id,
+ $event->event_payload,
+ (int) $timestamp,
+ )
+ );
+ }
+ }
+
+ // Instantiate table storage, so we can get the table name. Queue ID is just a placeholder here.
+ $queue_table_storage = new Queue_Storage_Table( 'test_queue' );
+
+ if ( ! empty( $insert_rows ) ) {
+ $insert_query = 'INSERT INTO ' . $queue_table_storage->table_name . ' (queue_id, event_id, event_payload, timestamp) VALUES ';
+
+ $insert_query .= implode( ',', $insert_rows );
+
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared
+ $wpdb->query( $insert_query );
+ }
+
+ $offset += $limit;
+ } while ( $offset < $item_count );
+
+ // Clear out the options queue
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared
+ $wpdb->query(
+ $wpdb->prepare(
+ "DELETE FROM $wpdb->options WHERE option_name LIKE %s",
+ 'jpsq_%-%'
+ )
+ );
+
+ return true;
+ }
+
+ /**
+ * Migrates the existing Sync events from the Custom table to the Options table
+ *
+ * @return void
+ */
+ public static function migrate_from_custom_table_to_options_table() {
+ global $wpdb;
+
+ // Instantiate table storage, so we can get the table name. Queue ID is just a placeholder here.
+ $queue_table_storage = new Queue_Storage_Table( 'test_queue' );
+ $custom_table_name = $queue_table_storage->table_name;
+
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $count_result = $wpdb->get_row( "SELECT COUNT(*) as item_count FROM {$custom_table_name}" );
+
+ $item_count = $count_result->item_count;
+
+ $limit = 100;
+ $offset = 0;
+
+ do {
+ // get all the records from the options table
+ $query = "
+ SELECT
+ event_id,
+ event_payload
+ FROM
+ {$custom_table_name}
+ ORDER BY
+ event_id ASC
+ LIMIT $offset, $limit
+ ";
+
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared
+ $rows = $wpdb->get_results( $query );
+
+ $insert_rows = array();
+
+ foreach ( $rows as $event ) {
+ $insert_rows[] = $wpdb->prepare(
+ '(%s, %s, "no")',
+ array(
+ $event->event_id,
+ $event->event_payload,
+ )
+ );
+ }
+
+ if ( ! empty( $insert_rows ) ) {
+ $insert_query = "INSERT INTO {$wpdb->options} (option_name, option_value, autoload) VALUES ";
+
+ $insert_query .= implode( ',', $insert_rows );
+
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared
+ $wpdb->query( $insert_query );
+ }
+
+ $offset += $limit;
+ } while ( $offset < $item_count );
+
+ // Clear the custom table
+ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ $wpdb->query( "DELETE FROM {$custom_table_name}" );
+
+ // TODO should we drop the table here instead?
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/CHANGELOG.md
new file mode 100644
index 00000000..59d1f535
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/CHANGELOG.md
@@ -0,0 +1,48 @@
+# 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.6] - 2023-10-19
+### Changed
+- Updated package dependencies. [#32605]
+
+### Fixed
+- Fix helper script upload for sites without direct file system access. [#32102]
+
+## [0.1.5] - 2023-07-06
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+
+## [0.1.4] - 2023-03-29
+### Changed
+- Minor internal updates.
+
+## [0.1.3] - 2023-01-25
+### Changed
+- Use `WP_Filesystem` more consistently in `Helper_Script_Manager`. [#28198]
+
+## [0.1.2] - 2022-12-05
+### Changed
+- Updated package dependencies. [#27688]
+
+## [0.1.1] - 2022-11-30
+### Changed
+- Updated package dependencies. [#27043]
+
+## 0.1.0 - 2022-11-01
+### Added
+- Adding the initial empty package
+- Duplicate helper script code to a dedicated package
+
+### Changed
+- Updated package dependencies.
+
+[0.1.6]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.5...v0.1.6
+[0.1.5]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.4...v0.1.5
+[0.1.4]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.3...v0.1.4
+[0.1.3]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.2...v0.1.3
+[0.1.2]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.1...v0.1.2
+[0.1.1]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.0...v0.1.1
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/SECURITY.md
new file mode 100644
index 00000000..98f48dd1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/SECURITY.md
@@ -0,0 +1,47 @@
+# 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 and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions.
+
+## Reporting a Vulnerability
+
+Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure:
+
+* [Jetpack](https://jetpack.com/)
+* Jetpack Backup
+* Jetpack Boost
+* Jetpack CRM
+* Jetpack Protect
+* Jetpack Search
+* Jetpack Social
+* Jetpack VideoPress
+
+**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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/actions.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/actions.php
new file mode 100644
index 00000000..96ffd1af
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/actions.php
@@ -0,0 +1,32 @@
+ $accepted_args,
+ 'function' => $cb,
+ );
+ };
+ $add_action = $add_filter;
+}
+
+// Clean up expired Jetpack Helper Scripts from a scheduled event.
+$add_action( 'jetpack_cleanup_helper_scripts', array( 'Automattic\\Jetpack\\Transport_Helper\\Helper_Script_Manager', 'cleanup_expired_helper_scripts' ) );
+
+// Register REST routes.
+$add_action( 'rest_api_init', array( 'Automattic\\Jetpack\\Transport_Helper\\REST_Controller', 'register_rest_routes' ) );
+
+// Set up package version hook.
+$add_filter( 'jetpack_package_versions', 'Automattic\\Jetpack\\Transport_Helper\\Package_Version::send_package_version_to_tracker' );
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/composer.json
new file mode 100644
index 00000000..db4a7d10
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/composer.json
@@ -0,0 +1,58 @@
+{
+ "name": "automattic/jetpack-transport-helper",
+ "description": "Package to help transport server communication",
+ "type": "jetpack-library",
+ "license": "GPL-2.0-or-later",
+ "require": {
+ "automattic/jetpack-connection": "^1.58.2"
+ },
+ "require-dev": {
+ "yoast/phpunit-polyfills": "1.1.0",
+ "automattic/jetpack-changelogger": "^3.3.11",
+ "automattic/wordbless": "dev-master"
+ },
+ "suggest": {
+ "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
+ },
+ "autoload": {
+ "files": [
+ "actions.php"
+ ],
+ "classmap": [
+ "src/"
+ ]
+ },
+ "scripts": {
+ "phpunit": [
+ "./vendor/phpunit/phpunit/phpunit --colors=always"
+ ],
+ "test-php": [
+ "@composer phpunit"
+ ],
+ "build-production": "echo 'Add your build step to composer.json, please!'",
+ "build-development": "echo 'Add your build step to composer.json, please!'",
+ "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy",
+ "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy"
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "extra": {
+ "mirror-repo": "Automattic/jetpack-transport-helper",
+ "version-constants": {
+ "::PACKAGE_VERSION": "src/class-package-version.php"
+ },
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-transport-helper/compare/v${old}...v${new}"
+ },
+ "autotagger": true,
+ "branch-alias": {
+ "dev-trunk": "0.1.x-dev"
+ },
+ "textdomain": "jetpack-transport-helper"
+ },
+ "config": {
+ "allow-plugins": {
+ "roots/wordpress-core-installer": true
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/src/class-helper-script-manager.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/src/class-helper-script-manager.php
new file mode 100644
index 00000000..d61a5d11
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/src/class-helper-script-manager.php
@@ -0,0 +1,384 @@
+ self::MAX_FILESIZE ) {
+ return new \WP_Error( 'invalid_helper', 'Invalid Helper Script size' );
+ }
+
+ // Replace '[wp_path]' in the Helper Script with the WordPress installation location. Allows the Helper Script to find WordPress.
+ $script_body = str_replace( '[wp_path]', addslashes( ABSPATH ), $script_body );
+
+ $wp_filesystem = self::get_wp_filesystem();
+ if ( ! $wp_filesystem ) {
+ return new \WP_Error( 'install_failed', 'Failed to install Helper Script' );
+ }
+
+ // Create a jetpack-temp directory for the Helper Script.
+ $temp_directory = self::create_temp_directory();
+ if ( \is_wp_error( $temp_directory ) ) {
+ return $temp_directory;
+ }
+
+ // Generate a random filename, avoid clashes.
+ $max_attempts = 5;
+ for ( $attempt = 0; $attempt < $max_attempts; $attempt++ ) {
+ $file_key = wp_generate_password( 10, false );
+ $file_name = 'jp-helper-' . $file_key . '.php';
+ $file_path = trailingslashit( $temp_directory['path'] ) . $file_name;
+
+ if ( ! $wp_filesystem->exists( $file_path ) ) {
+ // Attempt to write helper script.
+ if ( ! self::put_contents( $file_path, $script_body ) ) {
+ if ( $wp_filesystem->exists( $file_path ) ) {
+ $wp_filesystem->delete( $file_path );
+ }
+
+ continue;
+ }
+
+ // Always schedule a cleanup run shortly after EXPIRY_TIME.
+ \wp_schedule_single_event( time() + self::EXPIRY_TIME + 60, 'jetpack_cleanup_helper_scripts' );
+
+ // Success! Figure out the URL and return the path and URL.
+ return array(
+ 'path' => $file_path,
+ 'url' => trailingslashit( $temp_directory['url'] ) . $file_name,
+ );
+ }
+ }
+
+ return new \WP_Error( 'install_faied', 'Failed to install Helper Script' );
+ }
+
+ /**
+ * Given a path, verify it looks like a helper script and then delete it if so.
+ *
+ * @access public
+ * @static
+ *
+ * @param string $path Path to Helper Script to delete.
+ * @return boolean True if the file is deleted (or does not exist).
+ */
+ public static function delete_helper_script( $path ) {
+ $wp_filesystem = self::get_wp_filesystem();
+ if ( ! $wp_filesystem ) {
+ return false;
+ }
+
+ if ( ! $wp_filesystem->exists( $path ) ) {
+ return true;
+ }
+
+ // Check this file looks like a JPR helper script.
+ if ( ! self::verify_file_header( $path, self::HELPER_HEADER ) ) {
+ return false;
+ }
+
+ return $wp_filesystem->delete( $path );
+ }
+
+ /**
+ * Search for Helper Scripts that are suspiciously old, and clean them out.
+ *
+ * @access public
+ * @static
+ */
+ public static function cleanup_expired_helper_scripts() {
+ self::cleanup_helper_scripts( time() - self::EXPIRY_TIME );
+ }
+
+ /**
+ * Search for and delete all Helper Scripts. Used during uninstallation.
+ *
+ * @access public
+ * @static
+ */
+ public static function delete_all_helper_scripts() {
+ self::cleanup_helper_scripts( null );
+ }
+
+ /**
+ * Search for and delete Helper Scripts. If an $expiry_time is specified, only delete Helper Scripts
+ * with an mtime older than $expiry_time. Otherwise, delete them all.
+ *
+ * @access public
+ * @static
+ *
+ * @param int|null $expiry_time If specified, only delete scripts older than $expiry_time.
+ */
+ public static function cleanup_helper_scripts( $expiry_time = null ) {
+ $wp_filesystem = self::get_wp_filesystem();
+ if ( ! $wp_filesystem ) {
+ return;
+ }
+
+ foreach ( self::get_install_locations() as $directory => $url ) {
+ $temp_dir = trailingslashit( $directory ) . self::TEMP_DIRECTORY;
+
+ if ( $wp_filesystem->is_dir( $temp_dir ) ) {
+ // Find expired helper scripts and delete them.
+ $helper_scripts = $wp_filesystem->dirlist( $temp_dir );
+ if ( is_array( $helper_scripts ) ) {
+ foreach ( $helper_scripts as $entry ) {
+ if ( preg_match( '/^jp-helper-*\.php$/', $entry['name'] ) && ( null === $expiry_time || $entry['lastmodunix'] < $expiry_time ) ) {
+ self::delete_helper_script( trailingslashit( $temp_dir ) . $entry['name'] );
+ }
+ }
+ }
+
+ // Delete the directory if it's empty now.
+ self::delete_empty_helper_directory( $temp_dir );
+ }
+ }
+ }
+
+ /**
+ * Delete a helper script directory if it's empty
+ *
+ * @access public
+ * @static
+ *
+ * @param string $dir Path to Helper Script directory.
+ * @return boolean True if the directory is deleted
+ */
+ private static function delete_empty_helper_directory( $dir ) {
+ $wp_filesystem = self::get_wp_filesystem();
+ if ( ! $wp_filesystem ) {
+ return false;
+ }
+
+ if ( ! $wp_filesystem->is_dir( $dir ) ) {
+ return false;
+ }
+
+ // Tally the files in the target directory, and reject if there are too many.
+ $dir_contents = $wp_filesystem->dirlist( $dir );
+ if ( $dir_contents === false || count( $dir_contents ) > 2 ) {
+ return false;
+ }
+
+ // Check that the only remaining files are a README and index.php generated by this system.
+ $allowed_files = array(
+ 'README' => self::README_LINES[0],
+ 'index.php' => self::INDEX_FILE,
+ );
+
+ foreach ( $dir_contents as $entry ) {
+ $basename = $entry['name'];
+ $path = trailingslashit( $dir ) . $basename;
+ if ( ! isset( $allowed_files[ $basename ] ) ) {
+ return false;
+ }
+
+ // Verify the file starts with the expected contents.
+ if ( ! self::verify_file_header( $path, $allowed_files[ $basename ] ) ) {
+ return false;
+ }
+
+ if ( ! $wp_filesystem->delete( $path ) ) {
+ return false;
+ }
+ }
+
+ // If the directory is now empty, delete it.
+ $dir_contents = $wp_filesystem->dirlist( $dir );
+ if ( $dir_contents === false || count( $dir_contents ) === 0 ) {
+ return $wp_filesystem->rmdir( $dir );
+ }
+
+ return false;
+ }
+
+ /**
+ * Find an appropriate location for a jetpack-temp folder, and create one
+ *
+ * @access public
+ * @static
+ *
+ * @return WP_Error|array Array containing the url and path of the temp directory if successful, WP_Error if not.
+ */
+ private static function create_temp_directory() {
+ $wp_filesystem = self::get_wp_filesystem();
+ if ( ! $wp_filesystem ) {
+ return new \WP_Error( 'temp_directory', 'Failed to create jetpack-temp directory' );
+ }
+
+ foreach ( self::get_install_locations() as $directory => $url ) {
+ // Check if the install location is writeable.
+ if ( ! $wp_filesystem->is_writable( $directory ) ) {
+ continue;
+ }
+
+ // Create if one doesn't already exist.
+ $temp_dir = trailingslashit( $directory ) . self::TEMP_DIRECTORY;
+ if ( ! $wp_filesystem->is_dir( $temp_dir ) ) {
+ if ( ! $wp_filesystem->mkdir( $temp_dir ) ) {
+ continue;
+ }
+
+ // Temp directory created. Drop a README and index.php file in there.
+ self::write_supplementary_temp_files( $temp_dir );
+ }
+
+ return array(
+ 'path' => trailingslashit( $directory ) . self::TEMP_DIRECTORY,
+ 'url' => trailingslashit( $url ) . self::TEMP_DIRECTORY,
+ );
+ }
+
+ return new \WP_Error( 'temp_directory', 'Failed to create jetpack-temp directory' );
+ }
+
+ /**
+ * Write out an index.php file and a README file for a new jetpack-temp directory.
+ *
+ * @access public
+ * @static
+ *
+ * @param string $dir Path to Helper Script directory.
+ */
+ private static function write_supplementary_temp_files( $dir ) {
+ $readme_path = trailingslashit( $dir ) . 'README';
+ self::put_contents( $readme_path, implode( "\n\n", self::README_LINES ) );
+
+ $index_path = trailingslashit( $dir ) . 'index.php';
+ self::put_contents( $index_path, self::INDEX_FILE );
+ }
+
+ /**
+ * Write a file to the specified location with the specified contents.
+ *
+ * @access private
+ * @static
+ *
+ * @param string $file_path Path to write to.
+ * @param string $contents File contents to write.
+ * @return boolean True if successfully written.
+ */
+ private static function put_contents( $file_path, $contents ) {
+ $wp_filesystem = self::get_wp_filesystem();
+ if ( ! $wp_filesystem ) {
+ return false;
+ }
+
+ return $wp_filesystem->put_contents( $file_path, $contents );
+ }
+
+ /**
+ * Checks that a file exists, is readable, and has the expected header.
+ *
+ * @access private
+ * @static
+ *
+ * @param string $file_path File to verify.
+ * @param string $expected_header Header that the file should have.
+ * @return boolean True if the file exists, is readable, and the header matches.
+ */
+ private static function verify_file_header( $file_path, $expected_header ) {
+ $wp_filesystem = self::get_wp_filesystem();
+ if ( ! $wp_filesystem ) {
+ return false;
+ }
+
+ // Verify the file exists and is readable.
+ if ( ! $wp_filesystem->exists( $file_path ) || ! $wp_filesystem->is_readable( $file_path ) ) {
+ return false;
+ }
+
+ // Verify that the file isn't too big or small.
+ $file_size = $wp_filesystem->size( $file_path );
+ if ( $file_size < strlen( $expected_header ) || $file_size > self::MAX_FILESIZE ) {
+ return false;
+ }
+
+ // Read the file and verify its header.
+ $contents = $wp_filesystem->get_contents( $file_path );
+ return ( strncmp( $contents, $expected_header, strlen( $expected_header ) ) === 0 );
+ }
+
+ /**
+ * Gets an associative array of possible places to install a jetpack-temp directory, along with the URL to access each.
+ *
+ * @access private
+ * @static
+ *
+ * @return array Array, with keys specifying the full path of install locations, and values with the equivalent URL.
+ */
+ public static function get_install_locations() {
+ // Include WordPress root and wp-content.
+ $install_locations = array(
+ \ABSPATH => \get_site_url(),
+ \WP_CONTENT_DIR => \WP_CONTENT_URL,
+ );
+
+ // Include uploads folder.
+ $upload_dir_info = \wp_upload_dir();
+ $install_locations[ $upload_dir_info['basedir'] ] = $upload_dir_info['baseurl'];
+
+ return $install_locations;
+ }
+
+ /**
+ * Get the WP_Filesystem.
+ *
+ * @return \WP_Filesystem|null
+ */
+ private static function get_wp_filesystem() {
+ global $wp_filesystem;
+
+ if ( ! $wp_filesystem ) {
+ if ( ! function_exists( '\\WP_Filesystem' ) ) {
+ require_once ABSPATH . 'wp-admin/includes/file.php';
+ }
+
+ $credentials = request_filesystem_credentials( self_admin_url() );
+
+ if ( ! \WP_Filesystem( $credentials ) ) {
+ return null;
+ }
+ }
+
+ return $wp_filesystem;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/src/class-package-version.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/src/class-package-version.php
new file mode 100644
index 00000000..79e1d2c7
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/src/class-package-version.php
@@ -0,0 +1,30 @@
+ WP_REST_Server::CREATABLE,
+ 'callback' => __CLASS__ . '::install_helper_script',
+ 'permission_callback' => __CLASS__ . '::helper_script_permissions_callback',
+ 'args' => array(
+ 'helper' => array(
+ 'description' => __( 'base64 encoded Helper Script body.', 'jetpack-transport-helper' ),
+ 'type' => 'string',
+ 'required' => true,
+ ),
+ ),
+ )
+ );
+
+ // Delete a Helper Script.
+ register_rest_route(
+ 'jetpack/v4',
+ // This route can be generalized once we no longer depend on the backup package
+ '/backup-helper-script',
+ array(
+ 'methods' => WP_REST_Server::DELETABLE,
+ 'callback' => __CLASS__ . '::delete_helper_script',
+ 'permission_callback' => __CLASS__ . '::helper_script_permissions_callback',
+ 'args' => array(
+ 'path' => array(
+ 'description' => __( 'Path to Helper Script', 'jetpack-transport-helper' ),
+ 'type' => 'string',
+ 'required' => true,
+ ),
+ ),
+ )
+ );
+ }
+
+ /**
+ * The Jetpack endpoints should only be available via site-level authentication.
+ * This means that the corresponding endpoints can only be accessible from WPCOM.
+ *
+ * @access public
+ * @static
+ *
+ * @return bool|WP_Error True if a blog token was used to sign the request, WP_Error otherwise.
+ */
+ public static function helper_script_permissions_callback() {
+ if ( Rest_Authentication::is_signed_with_blog_token() ) {
+ return true;
+ }
+
+ $error_msg = esc_html__(
+ 'You are not allowed to perform this action.',
+ 'jetpack-transport-helper'
+ );
+
+ return new WP_Error( 'rest_forbidden', $error_msg, array( 'status' => rest_authorization_required_code() ) );
+ }
+
+ /**
+ * Install the Helper Script.
+ *
+ * @access public
+ * @static
+ *
+ * @param WP_REST_Request $request The request sent to the WP REST API.
+ * @return array|WP_Error Returns the result of Helper Script installation. Returns one of:
+ * - WP_Error on failure, or
+ * - An array with installation info on success:
+ * 'path' (string) The sinstallation path.
+ * 'url' (string) The access url.
+ * 'abspath' (string) The abspath.
+ */
+ public static function install_helper_script( $request ) {
+ $helper_script = $request->get_param( 'helper' );
+
+ // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
+ $helper_script = base64_decode( $helper_script );
+ if ( ! $helper_script ) {
+ return new WP_Error( 'invalid_args', __( 'Helper Script body must be base64 encoded', 'jetpack-transport-helper' ), 400 );
+ }
+
+ $installation_info = Helper_Script_Manager::install_helper_script( $helper_script );
+ Helper_Script_Manager::cleanup_expired_helper_scripts();
+
+ // Include ABSPATH with successful result.
+ if ( ! is_wp_error( $installation_info ) ) {
+ $installation_info['abspath'] = ABSPATH;
+ }
+
+ return rest_ensure_response( $installation_info );
+ }
+
+ /**
+ * Delete a Helper Script.
+ *
+ * @access public
+ * @static
+ *
+ * @param WP_REST_Request $request The request sent to the WP REST API.
+ * @return array An array with 'success' key indicating the result of the delete operation.
+ */
+ public static function delete_helper_script( $request ) {
+ $path_to_helper_script = $request->get_param( 'path' );
+
+ $deleted = Helper_Script_Manager::delete_helper_script( $path_to_helper_script );
+ Helper_Script_Manager::cleanup_expired_helper_scripts();
+
+ return rest_ensure_response(
+ array(
+ 'success' => $deleted,
+ )
+ );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/.phpcs.dir.phpcompatibility.xml b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/.phpcs.dir.phpcompatibility.xml
new file mode 100644
index 00000000..596c8ce5
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/.phpcs.dir.phpcompatibility.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/.phpcsignore b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/.phpcsignore
new file mode 100644
index 00000000..9f4f5a0b
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/.phpcsignore
@@ -0,0 +1 @@
+rules/
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/CHANGELOG.md
new file mode 100644
index 00000000..e12f671a
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/CHANGELOG.md
@@ -0,0 +1,282 @@
+# 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.11.13] - 2023-10-10
+### Fixed
+- Escape email address when output in HTML. [#33536]
+
+## [0.11.12] - 2023-09-28
+### Changed
+- Minor internal updates.
+
+## [0.11.11] - 2023-09-19
+
+- Minor internal updates.
+
+## [0.11.10] - 2023-09-11
+### Changed
+- General: remove backwards-compatible functions now that package relies on WordPress 6.2. [#32772]
+
+## [0.11.9] - 2023-08-28
+### Changed
+- Updated package dependencies. [#32605]
+
+## [0.11.8] - 2023-07-18
+### Changed
+- Add support for running brute force protection in environments that otherwise do not support the WAF. [#31761]
+- Minor performance improvements. [#31684]
+
+## [0.11.7] - 2023-07-17
+### Changed
+- Add support for non-empty server https values. [#31688]
+
+## [0.11.6] - 2023-05-22
+### Added
+- Add integration tests for unsupported environments [#30544]
+
+### Fixed
+- Fix Brute force protection activation when WAF unset [#30544]
+- Fix unavailable endpoint when WAF module is disabled [#30487]
+- Multisite: avoid errors when the package is used in the Protect plugin instead of the Jetpack plugin. [#30767]
+
+## [0.11.5] - 2023-05-15
+### Changed
+- Internal updates.
+
+## [0.11.4] - 2023-04-27
+### Added
+- Fix hardblock issue if user only has Protect installed [#30278]
+
+## [0.11.3] - 2023-04-17
+### Fixed
+- Fix brute force protection not initializing on atomic. [#30113]
+
+## [0.11.2] - 2023-04-10
+### Added
+- Add Jetpack Autoloader package suggestion. [#29988]
+
+## [0.11.1] - 2023-04-03
+### Fixed
+- Return early if we detect the older BFP implementation from the main plugin [#29794]
+
+## [0.11.0] - 2023-03-28
+### Added
+- Added brute force protection to the WAF configuration REST API endpoints [#28401]
+- Move the brute force protection module into the package. [#28401]
+
+### Changed
+- Change "whitelist" to "allow list". [#28401]
+- Move the brute force protection transient cleanup and shared functions to dedicated namespaced classes. [#28401]
+- Use WAF IP allow list option in brute force protection feature. [#28401]
+
+## [0.10.2] - 2023-03-20
+### Changed
+- Updated package dependencies. [#29480]
+
+## [0.10.1] - 2023-03-08
+### Changed
+- Minor internal updates.
+
+## [0.10.0] - 2023-02-28
+### Added
+- Added support for IP ranges in allow and block lists. [#29131]
+
+## [0.9.3] - 2023-02-20
+### Changed
+- Minor internal updates.
+
+## [0.9.2] - 2023-02-15
+### Changed
+- Minor internal updates.
+
+## [0.9.1] - 2023-02-13
+### Fixed
+- Fix an update error that impacted sites using the WAF in standalone mode. [#28844]
+
+## [0.9.0] - 2023-01-25
+### Changed
+- Change the web application firewall to run automatic and manual rules independently. [#27726]
+
+## [0.8.3] - 2023-01-11
+### Fixed
+- Fixed the WAF package's PHP tests and Composer requirements [#28185]
+
+## [0.8.2] - 2023-01-09
+### Fixed
+- Fix firewall activation hooks on first option updates. [#28234]
+
+## [0.8.1] - 2023-01-07
+### Changed
+- Change directory location that stores firewall rules. [#28049]
+
+## [0.8.0] - 2022-12-27
+### Added
+- Add file existance checks before requiring rule files in the WAF. [#28050]
+- Disable Jetpack Firewall on unsupported environments. [#27939]
+
+## [0.7.2] - 2022-12-19
+### Fixed
+- Fix the initialization of the firewall. [#27846]
+
+## [0.7.1] - 2022-12-06
+### Changed
+- html_entity_decode filter now decodes single-quotes too, and uses a Unicode Replacement Character instead of returning empty string on invalid characters. [#27753]
+
+## [0.7.0] - 2022-12-05
+### Added
+- Prepare package for use in the Jetpack Protect standalone plugin. [#27528]
+
+### Changed
+- Updated package dependencies. [#27688]
+
+### Removed
+- Remove has_rules_access plan check in favor of external alternatives [#27600]
+
+## [0.6.10] - 2022-11-28
+### Changed
+- Updated package dependencies. [#27043]
+
+## [0.6.9] - 2022-11-01
+### Fixed
+- Fix bug for cron event not generating IP rules. [#27215]
+
+## [0.6.8] - 2022-10-27
+### Fixed
+- Fixes several invalid action callbacks. [#27106]
+
+## [0.6.7] - 2022-09-20
+### Changed
+- Changing how we load and run the package to avoid actions.php [#24730]
+
+## [0.6.6] - 2022-09-08
+### Fixed
+- Fixed exception namespace. [#25663]
+
+## [0.6.5] - 2022-07-26
+### Changed
+- Updated package dependencies. [#25158]
+
+## [0.6.4] - 2022-07-12
+### Fixed
+- Correct namespacing error. [#24993]
+
+## [0.6.3] - 2022-06-21
+### Changed
+- Renaming master to trunk. [#24661]
+
+## [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.11.13]: https://github.com/Automattic/jetpack-waf/compare/v0.11.12...v0.11.13
+[0.11.12]: https://github.com/Automattic/jetpack-waf/compare/v0.11.11...v0.11.12
+[0.11.11]: https://github.com/Automattic/jetpack-waf/compare/v0.11.10...v0.11.11
+[0.11.10]: https://github.com/Automattic/jetpack-waf/compare/v0.11.9...v0.11.10
+[0.11.9]: https://github.com/Automattic/jetpack-waf/compare/v0.11.8...v0.11.9
+[0.11.8]: https://github.com/Automattic/jetpack-waf/compare/v0.11.7...v0.11.8
+[0.11.7]: https://github.com/Automattic/jetpack-waf/compare/v0.11.6...v0.11.7
+[0.11.6]: https://github.com/Automattic/jetpack-waf/compare/v0.11.5...v0.11.6
+[0.11.5]: https://github.com/Automattic/jetpack-waf/compare/v0.11.4...v0.11.5
+[0.11.4]: https://github.com/Automattic/jetpack-waf/compare/v0.11.3...v0.11.4
+[0.11.3]: https://github.com/Automattic/jetpack-waf/compare/v0.11.2...v0.11.3
+[0.11.2]: https://github.com/Automattic/jetpack-waf/compare/v0.11.1...v0.11.2
+[0.11.1]: https://github.com/Automattic/jetpack-waf/compare/v0.11.0...v0.11.1
+[0.11.0]: https://github.com/Automattic/jetpack-waf/compare/v0.10.2...v0.11.0
+[0.10.2]: https://github.com/Automattic/jetpack-waf/compare/v0.10.1...v0.10.2
+[0.10.1]: https://github.com/Automattic/jetpack-waf/compare/v0.10.0...v0.10.1
+[0.10.0]: https://github.com/Automattic/jetpack-waf/compare/v0.9.3...v0.10.0
+[0.9.3]: https://github.com/Automattic/jetpack-waf/compare/v0.9.2...v0.9.3
+[0.9.2]: https://github.com/Automattic/jetpack-waf/compare/v0.9.1...v0.9.2
+[0.9.1]: https://github.com/Automattic/jetpack-waf/compare/v0.9.0...v0.9.1
+[0.9.0]: https://github.com/Automattic/jetpack-waf/compare/v0.8.3...v0.9.0
+[0.8.3]: https://github.com/Automattic/jetpack-waf/compare/v0.8.2...v0.8.3
+[0.8.2]: https://github.com/Automattic/jetpack-waf/compare/v0.8.1...v0.8.2
+[0.8.1]: https://github.com/Automattic/jetpack-waf/compare/v0.8.0...v0.8.1
+[0.8.0]: https://github.com/Automattic/jetpack-waf/compare/v0.7.2...v0.8.0
+[0.7.2]: https://github.com/Automattic/jetpack-waf/compare/v0.7.1...v0.7.2
+[0.7.1]: https://github.com/Automattic/jetpack-waf/compare/v0.7.0...v0.7.1
+[0.7.0]: https://github.com/Automattic/jetpack-waf/compare/v0.6.10...v0.7.0
+[0.6.10]: https://github.com/Automattic/jetpack-waf/compare/v0.6.9...v0.6.10
+[0.6.9]: https://github.com/Automattic/jetpack-waf/compare/v0.6.8...v0.6.9
+[0.6.8]: https://github.com/Automattic/jetpack-waf/compare/v0.6.7...v0.6.8
+[0.6.7]: https://github.com/Automattic/jetpack-waf/compare/v0.6.6...v0.6.7
+[0.6.6]: https://github.com/Automattic/jetpack-waf/compare/v0.6.5...v0.6.6
+[0.6.5]: https://github.com/Automattic/jetpack-waf/compare/v0.6.4...v0.6.5
+[0.6.4]: https://github.com/Automattic/jetpack-waf/compare/v0.6.3...v0.6.4
+[0.6.3]: https://github.com/Automattic/jetpack-waf/compare/v0.6.2...v0.6.3
+[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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/LICENSE.txt
new file mode 100644
index 00000000..e82774c1
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/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.
+
+
+Copyright (C)
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 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.
+
+, 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/SECURITY.md
new file mode 100644
index 00000000..b4b46c0e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/cli.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/cli.php
new file mode 100644
index 00000000..c62c43f9
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/cli.php
@@ -0,0 +1,12 @@
+can_send_recovery_emails = apply_filters( 'jetpack_protect_can_send_recovery_emails', true );
+ $this->ip_address = $ip_address;
+
+ add_filter( 'wp_authenticate_user', array( $this, 'check_valid_blocked_user' ), 10, 1 );
+ add_filter( 'site_url', array( $this, 'add_args_to_login_post_url' ), 10, 3 );
+ add_filter( 'network_site_url', array( $this, 'add_args_to_login_post_url' ), 10, 3 );
+ add_filter( 'lostpassword_url', array( $this, 'add_args_to_lostpassword_url' ), 10, 2 );
+ add_filter( 'login_url', array( $this, 'add_args_to_login_url' ), 10, 3 );
+ add_filter( 'lostpassword_redirect', array( $this, 'add_args_to_lostpassword_redirect_url' ), 10, 1 );
+ }
+
+ /**
+ * Gets the URL that redirects to the support page on unblocking
+ *
+ * @since 8.5.0
+ *
+ * @return string
+ */
+ public static function get_help_url() {
+ return Redirect::get_url( 'jetpack-support-protect', array( 'anchor' => 'troubleshooting' ) );
+ }
+
+ /**
+ * Add arguments to lost password redirect url.
+ *
+ * @param string $url - the URL.
+ */
+ public function add_args_to_lostpassword_redirect_url( $url ) {
+ if ( $this->valid_blocked_user_id ) {
+ $url = empty( $url ) ? wp_login_url() : $url;
+ $url = add_query_arg(
+ array(
+ 'validate_jetpack_protect_recovery' => isset( $_GET['validate_jetpack_protect_recovery'] ) ? filter_var( wp_unslash( $_GET['validate_jetpack_protect_recovery'] ) ) : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request.
+ 'user_id' => isset( $_GET['user_id'] ) ? (int) $_GET['user_id'] : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request.
+ 'checkemail' => 'confirm',
+ ),
+ $url
+ );
+ }
+
+ return $url;
+ }
+
+ /**
+ * Add arguments to lost password redirect url.
+ *
+ * @param string $url - the URL.
+ * @param string $redirect - where to redirect to.
+ */
+ public function add_args_to_lostpassword_url( $url, $redirect ) {
+ if ( $this->valid_blocked_user_id ) {
+ $args = array(
+ 'validate_jetpack_protect_recovery' => isset( $_GET['validate_jetpack_protect_recovery'] ) ? filter_var( wp_unslash( $_GET['validate_jetpack_protect_recovery'] ) ) : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request.
+ 'user_id' => isset( $_GET['user_id'] ) ? (int) $_GET['user_id'] : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request.
+ 'action' => 'lostpassword',
+ );
+ if ( ! empty( $redirect ) ) {
+ $args['redirect_to'] = $redirect;
+ }
+ $url = add_query_arg( $args, $url );
+ }
+
+ return $url;
+ }
+
+ /**
+ * Add arguments to login post url.
+ *
+ * @param string $url - the URL.
+ * @param string $path - the path.
+ * @param string $scheme -the scheme(?).
+ */
+ public function add_args_to_login_post_url( $url, $path, $scheme ) {
+ if ( $this->valid_blocked_user_id && ( 'login_post' === $scheme || 'login' === $scheme ) ) {
+ $url = add_query_arg(
+ array(
+ 'validate_jetpack_protect_recovery' => isset( $_GET['validate_jetpack_protect_recovery'] ) ? filter_var( wp_unslash( $_GET['validate_jetpack_protect_recovery'] ) ) : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request.
+ 'user_id' => isset( $_GET['user_id'] ) ? (int) $_GET['user_id'] : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request.
+ ),
+ $url
+ );
+
+ }
+
+ return $url;
+ }
+
+ /**
+ * Add arguments to login post url.
+ *
+ * @param string $url - the URL.
+ * @param string $redirect - where we want to redirect to.
+ * @param string $force_reauth -if we're forcing reauthorization.
+ */
+ public function add_args_to_login_url( $url, $redirect, $force_reauth ) {
+ if ( $this->valid_blocked_user_id ) {
+ $args = array(
+ 'validate_jetpack_protect_recovery' => isset( $_GET['validate_jetpack_protect_recovery'] ) ? filter_var( wp_unslash( $_GET['validate_jetpack_protect_recovery'] ) ) : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request.
+ 'user_id' => isset( $_GET['user_id'] ) ? (int) $_GET['user_id'] : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request.
+ );
+
+ if ( ! empty( $redirect ) ) {
+ $args['redirect_to'] = $redirect;
+ }
+
+ if ( ! empty( $force_reauth ) ) {
+ $args['reauth'] = '1';
+ }
+ $url = add_query_arg( $args, $url );
+ }
+
+ return $url;
+ }
+
+ /**
+ * Check if user is blocked.
+ *
+ * @param string $user - the user.
+ */
+ public function check_valid_blocked_user( $user ) {
+ if ( $this->valid_blocked_user_id && $this->valid_blocked_user_id != $user->ID ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseNotEqual
+ return new WP_Error( 'invalid_recovery_token', __( 'The recovery token is not valid for this user.', 'jetpack-waf' ) );
+ }
+
+ return $user;
+ }
+
+ /**
+ * Check if user is valid.
+ */
+ public function is_blocked_user_valid() {
+ if ( ! $this->can_send_recovery_emails ) {
+ return false;
+ }
+
+ if ( $this->valid_blocked_user_id ) {
+ return true;
+ }
+
+ if ( ! isset( $_GET['validate_jetpack_protect_recovery'] ) || ! isset( $_GET['user_id'] ) ) { // phpcs:ignore: WordPress.Security.NonceVerification.Recommended -- no changes made if this isn't set.
+ return false;
+ }
+
+ if ( ! $this->is_valid_protect_recovery_key( filter_var( wp_unslash( $_GET['validate_jetpack_protect_recovery'] ) ), (int) $_GET['user_id'] ) ) { // phpcs:ignore: WordPress.Security.NonceVerification.Recommended -- no changes made if this isn't set.
+ return false;
+ }
+
+ $this->valid_blocked_user_id = (int) $_GET['user_id']; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request.
+
+ return true;
+ }
+
+ /**
+ * Checks if recovery key is valid.
+ *
+ * @param string $key - they recovery key.
+ * @param string $user_id - the User ID.
+ */
+ public function is_valid_protect_recovery_key( $key, $user_id ) {
+
+ $path = sprintf( '/sites/%d/protect/recovery/confirm', Jetpack_Options::get_option( 'id' ) );
+ $response = Client::wpcom_json_api_request_as_blog(
+ $path,
+ '1.1',
+ array(
+ 'method' => 'post',
+ ),
+ array(
+ 'token' => $key,
+ 'user_id' => $user_id,
+ 'ip' => $this->ip_address,
+ )
+ );
+
+ $result = json_decode( wp_remote_retrieve_body( $response ) );
+
+ if ( is_wp_error( $result ) || empty( $result ) || isset( $result->error ) ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Check if we should render the recovery form.
+ */
+ public function render_and_die() {
+ if ( ! $this->can_send_recovery_emails ) {
+ $this->render_blocked_login_message();
+
+ return;
+ }
+
+ if ( isset( $_GET['validate_jetpack_protect_recovery'] ) && ! empty( $_GET['user_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- no site changes, just throws invalid token error.
+ $error = new WP_Error( 'invalid_token', __( "Oops, we couldn't validate the recovery token.", 'jetpack-waf' ) );
+ $this->protect_die( $error );
+
+ return;
+ }
+
+ if (
+ isset( $_GET['jetpack-protect-recovery'] ) &&
+ isset( $_POST['_wpnonce'] ) &&
+ wp_verify_nonce( $_POST['_wpnonce'], 'bypass-protect' ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- WP Core doesn't unstrip or sanitize nonces either.
+ ) {
+ $this->process_recovery_email();
+
+ return;
+ }
+
+ if ( isset( $_GET['loggedout'] ) && 'true' === $_GET['loggedout'] ) {
+ $this->protect_die( __( 'You successfully logged out.', 'jetpack-waf' ) );
+ }
+
+ $this->render_recovery_form();
+ }
+
+ /**
+ * Render the blocked login message.
+ */
+ public function render_blocked_login_message() {
+ $this->protect_die( $this->get_html_blocked_login_message() );
+ }
+
+ /**
+ * Process sending a recovery email.
+ */
+ public function process_recovery_email() {
+ $sent = $this->send_recovery_email();
+ $show_recovery_form = true;
+ if ( is_wp_error( $sent ) ) {
+ if ( 'email_already_sent' === $sent->get_error_code() ) {
+ $show_recovery_form = false;
+ }
+ $this->protect_die( $sent, null, true, $show_recovery_form );
+ } else {
+ $this->render_recovery_success();
+ }
+ }
+
+ /**
+ * Send the recovery form.
+ */
+ public function send_recovery_email() {
+ $email = isset( $_POST['email'] ) ? wp_unslash( $_POST['email'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- only triggered after bypass-protect nonce check is done, and sanitization is checked on the next line.
+ if ( sanitize_email( $email ) !== $email || ! is_email( $email ) ) {
+ return new WP_Error( 'invalid_email', __( "Oops, looks like that's not the right email address. Please try again!", 'jetpack-waf' ) );
+ }
+ $user = get_user_by( 'email', trim( $email ) );
+
+ if ( ! $user ) {
+ return new WP_Error( 'invalid_user', __( "Oops, we couldn't find a user with that email. Please try again!", 'jetpack-waf' ) );
+ }
+ $this->email_address = $email;
+ $path = sprintf( '/sites/%d/protect/recovery/request', Jetpack_Options::get_option( 'id' ) );
+
+ $response = Client::wpcom_json_api_request_as_blog(
+ $path,
+ '1.1',
+ array(
+ 'method' => 'post',
+ ),
+ array(
+ 'user_id' => $user->ID,
+ 'ip' => $this->ip_address,
+ )
+ );
+
+ $code = wp_remote_retrieve_response_code( $response );
+ $result = json_decode( wp_remote_retrieve_body( $response ) );
+
+ if ( self::HTTP_STATUS_CODE_TOO_MANY_REQUESTS === $code ) {
+ // translators: email address the recovery instructions were sent to.
+ return new WP_Error( 'email_already_sent', sprintf( __( 'Recovery instructions were sent to %s. Check your inbox!', 'jetpack-waf' ), esc_html( $this->email_address ) ) );
+ } elseif ( is_wp_error( $result ) || empty( $result ) || isset( $result->error ) ) {
+ return new WP_Error( 'email_send_error', __( 'Oops, we were unable to send a recovery email. Try again.', 'jetpack-waf' ) );
+ }
+
+ return true;
+ }
+
+ /**
+ * Prevent login by locking the login page.
+ *
+ * @param string $content - the content of the page.
+ * @param string $title - the page title.
+ * @param string $back_link - the back link.
+ * @param string $recovery_form - the recovery form.
+ */
+ public function protect_die( $content, $title = null, $back_link = false, $recovery_form = false ) {
+ if ( empty( $title ) ) {
+ $title = __( 'Jetpack has locked your site\'s login page.', 'jetpack-waf' );
+ }
+ if ( is_wp_error( $content ) ) {
+ $svg = '';
+ $content = ' ' . $svg . $content->get_error_message() . '';
+ }
+ $content = '
' . $content . '
';
+
+ // If for some reason the login pop up box show up in the wp-admin.
+ if ( isset( $_GET['interim-login'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- no changes to the site itself, just rendering an error message.
+ $content = '' . $content;
+ }
+ $this->display_page( $title, $content, $back_link, $recovery_form );
+ }
+
+ /**
+ * Render the recovery form.
+ */
+ public function render_recovery_form() {
+ $content = $this->get_html_blocked_login_message();
+ $this->protect_die( $content, null, null, true );
+ }
+
+ /**
+ * Render the recovery instructions.
+ */
+ public function render_recovery_success() {
+ // translators: the email address the recovery email was sent to.
+ $this->protect_die( sprintf( __( 'Recovery instructions were sent to %s. Check your inbox!', 'jetpack-waf' ), $this->email_address ) );
+ }
+
+ /**
+ * Get the HTML for the blocked login message.
+ */
+ public function get_html_blocked_login_message() {
+ $icon = '';
+ $ip = str_replace( 'http://', '', esc_url( 'http://' . $this->ip_address ) );
+ return sprintf(
+ // translators: the IP address that was flagged.
+ __( '
Your IP address %2$s has been flagged for potential security violations. You can unlock your login by sending yourself a special link via email. Learn More
', 'jetpack-waf' ), // phpcs:ignore WordPress.WP.I18n.NoHtmlWrappedStrings
+ $icon,
+ $ip,
+ esc_url( self::get_help_url() )
+ );
+ }
+
+ /**
+ * Get the HTML recovery form.
+ */
+ public function get_html_recovery_form() {
+ ob_start(); ?>
+
+
+ api_key_error = __( 'Your main blog is not connected to WordPress.com. Please connect to get an API key.', 'jetpack-waf' );
+
+ return false;
+ }
+
+ $request = array(
+ 'jetpack_blog_id' => $protect_blog_id,
+ 'bruteprotect_api_key' => get_site_option( 'bruteprotect_api_key' ),
+ 'multisite' => '0',
+ );
+
+ // Send the number of blogs on the network if we are on multisite.
+ if ( is_multisite() ) {
+ $request['multisite'] = get_blog_count();
+ if ( ! $request['multisite'] ) {
+ global $wpdb;
+ $request['multisite'] = $wpdb->get_var( "SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE spam = '0' AND deleted = '0' and archived = '0'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery
+ }
+ }
+
+ // Request the key.
+ $xml = new Jetpack_IXR_Client();
+ $xml->query( 'jetpack.protect.requestKey', $request );
+
+ // Hmm, can't talk to wordpress.com.
+ if ( $xml->isError() ) {
+ $code = $xml->getErrorCode();
+ $message = $xml->getErrorMessage();
+ // Translators: The xml error code, and the xml error message.
+ $this->api_key_error = sprintf( __( 'Error connecting to WordPress.com. Code: %1$s, %2$s', 'jetpack-waf' ), $code, $message );
+
+ return false;
+ }
+
+ $response = $xml->getResponse();
+
+ // Hmm, can't talk to the protect servers ( api.bruteprotect.com ).
+ if ( ! isset( $response['data'] ) ) {
+ $this->api_key_error = __( 'No reply from Jetpack servers', 'jetpack-waf' );
+
+ return false;
+ }
+
+ // There was an issue generating the key.
+ if ( empty( $response['success'] ) ) {
+ $this->api_key_error = $response['data'];
+
+ return false;
+ }
+
+ // Key generation successful!
+ $active_plugins = self::get_active_plugins();
+
+ // We only want to deactivate BruteProtect if we successfully get a key.
+ if ( in_array( 'bruteprotect/bruteprotect.php', $active_plugins, true ) ) {
+ self::deactivate_plugin( 'bruteprotect/bruteprotect.php', 'BruteProtect' );
+ }
+
+ $key = $response['data'];
+ update_site_option( 'jetpack_protect_key', $key );
+
+ return $key;
+ }
+
+ /**
+ * Called via WP action wp_login_failed to log failed attempt with the api
+ *
+ * Fires custom, plugable action jpp_log_failed_attempt with the IP
+ *
+ * @param string $login_user - the user attempting to log in.
+ * @return void
+ */
+ public function log_failed_attempt( $login_user = null ) {
+
+ /**
+ * Fires before every failed login attempt.
+ *
+ * @module protect
+ *
+ * @since 3.4.0
+ *
+ * @param array Information about failed login attempt
+ * [
+ * 'login' => (string) Username or email used in failed login attempt
+ * ]
+ */
+ do_action( 'jpp_log_failed_attempt', array( 'login' => $login_user ) );
+
+ if ( isset( $_COOKIE['jpp_math_pass'] ) ) {
+
+ $transient = $this->get_transient( 'jpp_math_pass_' . sanitize_key( $_COOKIE['jpp_math_pass'] ) );
+ --$transient;
+
+ if ( ! $transient || $transient < 1 ) {
+ $this->delete_transient( 'jpp_math_pass_' . sanitize_key( $_COOKIE['jpp_math_pass'] ) );
+ setcookie( 'jpp_math_pass', 0, time() - DAY_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN, false, true );
+ } else {
+ $this->set_transient( 'jpp_math_pass_' . sanitize_key( $_COOKIE['jpp_math_pass'] ), $transient, DAY_IN_SECONDS );
+ }
+ }
+ $this->protect_call( 'failed_attempt' );
+ }
+
+ /**
+ * Set up the Brute Force Protection configuration page
+ */
+ public function modules_loaded() {
+ add_filter( 'jetpack_module_configurable_protect', '__return_true' );
+ }
+
+ /**
+ * Logs a successful login back to our servers, this allows us to make sure we're not blocking
+ * a busy IP that has a lot of good logins along with some forgotten passwords. Also saves current user's ip
+ * to the ip address allow list
+ *
+ * @param string $user_login - the user loggign in.
+ * @param string $user - the user.
+ */
+ public function log_successful_login( $user_login, $user = null ) {
+ if ( ! $user ) { // For do_action( 'wp_login' ) calls that lacked passing the 2nd arg.
+ $user = get_user_by( 'login', $user_login );
+ }
+
+ $this->protect_call( 'successful_login', array( 'roles' => $user->roles ) );
+ }
+
+ /**
+ * Checks for loginability BEFORE authentication so that bots don't get to go around the log in form.
+ *
+ * If we are using our math fallback, authenticate via math-fallback.php
+ *
+ * @param string $user - the user.
+ * @param string $username - the username.
+ * @param string $password - the password.
+ *
+ * @return string $user
+ */
+ public function check_preauth( $user = 'Not Used By Protect', $username = 'Not Used By Protect', $password = 'Not Used By Protect' ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ $allow_login = $this->check_login_ability( true );
+ $use_math = $this->get_transient( 'brute_use_math' );
+
+ if ( ! $allow_login ) {
+ $this->block_with_math();
+ }
+
+ if ( ( 1 == $use_math || 1 == $this->block_login_with_math ) && isset( $_POST['log'] ) ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual, WordPress.Security.NonceVerification.Missing -- POST request just determines if we use math authentication.
+
+ Brute_Force_Protection_Math_Authenticate::math_authenticate();
+ }
+
+ return $user;
+ }
+
+ /**
+ * Get all IP headers so that we can process on our server...
+ *
+ * @return array
+ */
+ public function get_headers() {
+ $output = array();
+ $ip_related_headers = array(
+ 'GD_PHP_HANDLER',
+ 'HTTP_AKAMAI_ORIGIN_HOP',
+ 'HTTP_CF_CONNECTING_IP',
+ 'HTTP_CLIENT_IP',
+ 'HTTP_FASTLY_CLIENT_IP',
+ 'HTTP_FORWARDED',
+ 'HTTP_FORWARDED_FOR',
+ 'HTTP_INCAP_CLIENT_IP',
+ 'HTTP_TRUE_CLIENT_IP',
+ 'HTTP_X_CLIENTIP',
+ 'HTTP_X_CLUSTER_CLIENT_IP',
+ 'HTTP_X_FORWARDED',
+ 'HTTP_X_FORWARDED_FOR',
+ 'HTTP_X_IP_TRAIL',
+ 'HTTP_X_REAL_IP',
+ 'HTTP_X_VARNISH',
+ 'REMOTE_ADDR',
+ );
+
+ foreach ( $ip_related_headers as $header ) {
+ if ( ! empty( $_SERVER[ $header ] ) ) {
+ $output[ $header ] = wp_unslash( $_SERVER[ $header ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
+ }
+ }
+
+ return $output;
+ }
+
+ /**
+ * Checks if the IP address is in the allow list.
+ *
+ * @deprecated 0.11.0 Use ip_is_allowed()
+ *
+ * @param string $ip - the IP address.
+ */
+ public static function ip_is_whitelisted( $ip ) {
+ _deprecated_function( __METHOD__, 'waf-0.11.0', __CLASS__ . '::ip_is_allowed' );
+ return self::ip_is_allowed( $ip );
+ }
+
+ /**
+ * Checks if the IP address is in the allow list.
+ *
+ * @param string $ip - the IP address.
+ *
+ * @return bool
+ */
+ public function ip_is_allowed( $ip ) {
+ // If we found an exact match in wp-config.
+ if ( defined( 'JETPACK_IP_ADDRESS_OK' ) && JETPACK_IP_ADDRESS_OK === $ip ) {
+ return true;
+ }
+
+ $allow_list = Brute_Force_Protection_Shared_Functions::get_local_allow_list();
+
+ if ( is_multisite() ) {
+ $allow_list = array_merge( $allow_list, get_site_option( 'jetpack_protect_global_whitelist', array() ) );
+ }
+
+ if ( ! empty( $allow_list ) ) :
+ foreach ( $allow_list as $item ) :
+ // If the IPs are an exact match.
+ if ( ! $item->range && isset( $item->ip_address ) && $item->ip_address === $ip ) {
+ return true;
+ }
+
+ if ( $item->range && isset( $item->range_low ) && isset( $item->range_high ) ) {
+ if ( IP_Utils::ip_address_is_in_range( $ip, $item->range_low, $item->range_high ) ) {
+ return true;
+ }
+ }
+ endforeach;
+ endif;
+
+ return false;
+ }
+
+ /**
+ * Checks the status for a given IP. API results are cached as transients
+ *
+ * @param bool $preauth - Whether or not we are checking prior to authorization.
+ *
+ * @return bool Either returns true, fires $this->kill_login, or includes a math fallback and returns false
+ */
+ public function check_login_ability( $preauth = false ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+
+ /**
+ * JETPACK_ALWAYS_PROTECT_LOGIN will always disable the login page, and use a page provided by Jetpack.
+ */
+ if ( Constants::is_true( 'JETPACK_ALWAYS_PROTECT_LOGIN' ) ) {
+ $this->kill_login();
+ }
+
+ if ( $this->is_current_ip_allowed() ) {
+ return true;
+ }
+
+ $status = $this->get_cached_status();
+
+ if ( empty( $status ) ) {
+ // If we've reached this point, this means that the IP isn't cached.
+ // Now we check with the Protect API to see if we should allow login.
+ $response = $this->protect_call( $action = 'check_ip' ); // phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.Found
+
+ if ( isset( $response['math'] ) && ! function_exists( 'brute_math_authenticate' ) ) {
+ new Brute_Force_Protection_Math_Authenticate();
+
+ return false;
+ }
+
+ $status = $response['status'];
+ }
+
+ if ( 'blocked' === $status ) {
+ $this->block_with_math();
+ }
+
+ if ( 'blocked-hard' === $status ) {
+ $this->kill_login();
+ }
+
+ return true;
+ }
+
+ /**
+ * Check if the user's IP is in the allow list.
+ *
+ * @deprecated 0.11.0 Use is_current_ip_allowed()
+ */
+ public static function is_current_ip_whitelisted() {
+ _deprecated_function( __METHOD__, 'waf-0.11.0', __CLASS__ . '::is_current_ip_allowed' );
+ return self::is_current_ip_allowed();
+ }
+
+ /**
+ * Check if the user's IP is in the allow list.
+ */
+ public function is_current_ip_allowed() {
+ $ip = IP_Utils::get_ip();
+
+ // Server is misconfigured and we can't get an IP.
+ if ( ! $ip ) {
+ self::disable();
+ ob_start();
+ ( new CookieState() )->state( 'message', 'protect_misconfigured_ip' );
+ ob_end_clean();
+ return true;
+ }
+
+ /**
+ * Short-circuit check_login_ability.
+ *
+ * If there is an alternate way to validate the current IP such as
+ * a hard-coded list of IP addresses, we can short-circuit the rest
+ * of the login ability checks and return true here.
+ *
+ * @module protect
+ *
+ * @since 4.4.0
+ *
+ * @param bool false Should we allow all logins for the current ip? Default: false
+ */
+ if ( apply_filters( 'jpp_allow_login', false, $ip ) ) {
+ return true;
+ }
+
+ if ( IP_Utils::ip_is_private( $ip ) ) {
+ return true;
+ }
+
+ if ( $this->ip_is_allowed( $ip ) ) {
+ return true;
+ }
+ }
+
+ /**
+ * Check if someone is able to login based on IP.
+ */
+ public function has_login_ability() {
+ if ( $this->is_current_ip_allowed() ) {
+ return true;
+ }
+ $status = $this->get_cached_status();
+ if ( empty( $status ) || 'ok' === $status ) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Check the status of the cached transient.
+ */
+ public function get_cached_status() {
+ $transient_name = $this->get_transient_name();
+ $value = $this->get_transient( $transient_name );
+ if ( isset( $value['status'] ) ) {
+ return $value['status'];
+ }
+ return '';
+ }
+
+ /**
+ * Check if we need to block with a math question to continue logging in.
+ */
+ public function block_with_math() {
+ /**
+ * By default, Protect will allow a user who has been blocked for too
+ * many failed logins to start answering math questions to continue logging in
+ *
+ * For added security, you can disable this.
+ *
+ * @module protect
+ *
+ * @since 3.6.0
+ *
+ * @param bool Whether to allow math for blocked users or not.
+ */
+
+ $this->block_login_with_math = 1;
+ /**
+ * Allow Math fallback for blocked IPs.
+ *
+ * @module protect
+ *
+ * @since 3.6.0
+ *
+ * @param bool true Should we fallback to the Math questions when an IP is blocked. Default to true.
+ */
+ $allow_math_fallback_on_fail = apply_filters( 'jpp_use_captcha_when_blocked', true );
+ if ( ! $allow_math_fallback_on_fail ) {
+ $this->kill_login();
+ }
+
+ new Brute_Force_Protection_Math_Authenticate();
+
+ return false;
+ }
+
+ /**
+ * Kill a login attempt
+ */
+ public function kill_login() {
+ if (
+ isset( $_GET['action'] ) && isset( $_GET['_wpnonce'] ) &&
+ 'logout' === $_GET['action'] &&
+ wp_verify_nonce( $_GET['_wpnonce'], 'log-out' ) && // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
+ wp_get_current_user()
+
+ ) {
+ // Allow users to logout.
+ return;
+ }
+
+ $ip = IP_Utils::get_ip();
+ /**
+ * Fires before every killed login.
+ *
+ * @module protect
+ *
+ * @since 3.4.0
+ *
+ * @param string $ip IP flagged by Protect.
+ */
+ do_action( 'jpp_kill_login', $ip );
+
+ if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) {
+ // translators: variable is the IP address that was flagged.
+ $die_string = sprintf( __( 'Your IP (%1$s) has been flagged for potential security violations.', 'jetpack-waf' ), str_replace( 'http://', '', esc_url( 'http://' . $ip ) ) );
+ wp_die(
+ $die_string, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- esc_url used when forming string.
+ esc_html__( 'Login Blocked by Jetpack', 'jetpack-waf' ),
+ array( 'response' => 403 )
+ );
+ }
+
+ $blocked_login_page = Brute_Force_Protection_Blocked_Login_Page::instance( $ip );
+
+ if ( $blocked_login_page->is_blocked_user_valid() ) {
+ return;
+ }
+
+ $blocked_login_page->render_and_die();
+ }
+
+ /**
+ * Checks if the protect API call has failed, and if so initiates the math captcha fallback.
+ */
+ public function check_use_math() {
+ $use_math = $this->get_transient( 'brute_use_math' );
+ if ( $use_math ) {
+ new Brute_Force_Protection_Math_Authenticate();
+ }
+ }
+
+ /**
+ * If we're in a multisite network, return the blog ID of the primary blog
+ *
+ * @return int
+ */
+ public function get_main_blog_id() {
+ if ( ! is_multisite() ) {
+ return false;
+ }
+
+ global $current_site;
+ $primary_blog_id = $current_site->blog_id;
+
+ return $primary_blog_id;
+ }
+
+ /**
+ * Get jetpack blog id, or the jetpack blog id of the main blog in the main network
+ *
+ * @return int
+ */
+ public function get_main_blog_jetpack_id() {
+ if ( ! is_main_site() ) {
+ switch_to_blog( $this->get_main_blog_id() );
+ $id = Jetpack_Options::get_option( 'id', false );
+ restore_current_blog();
+ } else {
+ $id = Jetpack_Options::get_option( 'id' );
+ }
+
+ return $id;
+ }
+
+ /**
+ * Checks the API key.
+ */
+ public function check_api_key() {
+ $response = $this->protect_call( 'check_key' );
+
+ if ( isset( $response['ckval'] ) ) {
+ return true;
+ }
+
+ if ( isset( $response['error'] ) ) {
+
+ if ( 'Invalid API Key' === $response['error'] ) {
+ $this->api_key_error = __( 'Your API key is invalid', 'jetpack-waf' );
+ }
+
+ if ( 'API Key Required' === $response['error'] ) {
+ $this->api_key_error = __( 'No API key', 'jetpack-waf' );
+ }
+ }
+
+ $this->api_key_error = __( 'There was an error contacting Jetpack servers.', 'jetpack-waf' );
+
+ return false;
+ }
+
+ /**
+ * Calls over to the api using wp_remote_post
+ *
+ * @param string $action - 'check_ip', 'check_key', or 'failed_attempt'.
+ * @param array $request - Any custom data to post to the api.
+ *
+ * @return array
+ */
+ public function protect_call( $action = 'check_ip', $request = array() ) {
+ global $wp_version;
+
+ $api_key = $this->maybe_get_protect_key();
+
+ $user_agent = "WordPress/{$wp_version}";
+
+ $request['action'] = $action;
+ $request['ip'] = IP_Utils::get_ip();
+ $request['host'] = $this->get_local_host();
+ $request['headers'] = wp_json_encode( $this->get_headers() );
+ $request['jetpack_version'] = null;
+ $request['wordpress_version'] = (string) $wp_version;
+ $request['api_key'] = $api_key;
+ $request['multisite'] = '0';
+
+ if ( defined( 'JETPACK__VERSION' ) ) {
+ $request['jetpack_version'] = constant( 'JETPACK__VERSION' );
+ $user_agent .= ' | Jetpack/' . constant( 'JETPACK__VERSION' );
+ }
+
+ if ( defined( 'JETPACK_PROTECT_VERSION' ) && ! defined( 'JETPACK__VERSION' ) ) {
+ $request['jetpack_version'] = '12.1';
+ $user_agent .= ' | JetpackProtect/' . constant( 'JETPACK_PROTECT_VERSION' );
+ }
+
+ if ( is_multisite() ) {
+ $request['multisite'] = get_blog_count();
+ }
+
+ /**
+ * Filter controls maximum timeout in waiting for reponse from Protect servers.
+ *
+ * @module protect
+ *
+ * @since 4.0.4
+ *
+ * @param int $timeout Max time (in seconds) to wait for a response.
+ */
+ $timeout = apply_filters( 'jetpack_protect_connect_timeout', 30 );
+
+ $args = array(
+ 'body' => $request,
+ 'user-agent' => $user_agent,
+ 'httpversion' => '1.0',
+ 'timeout' => absint( $timeout ),
+ );
+
+ Waf_Constants::define_brute_force_api_host();
+
+ $response_json = wp_remote_post( JETPACK_PROTECT__API_HOST, $args );
+ $this->last_response_raw = $response_json;
+
+ $transient_name = $this->get_transient_name();
+ $this->delete_transient( $transient_name );
+
+ if ( is_array( $response_json ) ) {
+ $response = json_decode( $response_json['body'], true );
+ }
+
+ if ( isset( $response['blocked_attempts'] ) && $response['blocked_attempts'] ) {
+ update_site_option( 'jetpack_protect_blocked_attempts', $response['blocked_attempts'] );
+ }
+
+ if ( isset( $response['status'] ) && ! isset( $response['error'] ) ) {
+ $response['expire'] = time() + $response['seconds_remaining'];
+ $this->set_transient( $transient_name, $response, $response['seconds_remaining'] );
+ $this->delete_transient( 'brute_use_math' );
+ } else { // Fallback to Math Captcha if no response from API host.
+ $this->set_transient( 'brute_use_math', 1, 600 );
+ $response['status'] = 'ok';
+ $response['math'] = true;
+ }
+
+ if ( isset( $response['error'] ) ) {
+ update_site_option( 'jetpack_protect_error', $response['error'] );
+ } else {
+ delete_site_option( 'jetpack_protect_error' );
+ }
+
+ return $response;
+ }
+
+ /**
+ * Gets the transient name.
+ */
+ public function get_transient_name() {
+ $headers = $this->get_headers();
+ $header_hash = md5( wp_json_encode( $headers ) );
+
+ return 'jpp_li_' . $header_hash;
+ }
+
+ /**
+ * Wrapper for WordPress set_transient function, our version sets
+ * the transient on the main site in the network if this is a multisite network
+ *
+ * We do it this way (instead of set_site_transient) because of an issue where
+ * sitewide transients are always autoloaded
+ * https://core.trac.wordpress.org/ticket/22846
+ *
+ * @param string $transient Transient name. Expected to not be SQL-escaped. Must be
+ * 45 characters or fewer in length.
+ * @param mixed $value Transient value. Must be serializable if non-scalar.
+ * Expected to not be SQL-escaped.
+ * @param int $expiration Optional. Time until expiration in seconds. Default 0.
+ *
+ * @return bool False if value was not set and true if value was set.
+ */
+ public function set_transient( $transient, $value, $expiration ) {
+ if ( is_multisite() && ! is_main_site() ) {
+ switch_to_blog( $this->get_main_blog_id() );
+ $return = set_transient( $transient, $value, $expiration );
+ restore_current_blog();
+
+ return $return;
+ }
+
+ return set_transient( $transient, $value, $expiration );
+ }
+
+ /**
+ * Wrapper for WordPress delete_transient function, our version deletes
+ * the transient on the main site in the network if this is a multisite network
+ *
+ * @param string $transient Transient name. Expected to not be SQL-escaped.
+ *
+ * @return bool true if successful, false otherwise
+ */
+ public function delete_transient( $transient ) {
+ if ( is_multisite() && ! is_main_site() ) {
+ switch_to_blog( $this->get_main_blog_id() );
+ $return = delete_transient( $transient );
+ restore_current_blog();
+
+ return $return;
+ }
+
+ return delete_transient( $transient );
+ }
+
+ /**
+ * Wrapper for WordPress get_transient function, our version gets
+ * the transient on the main site in the network if this is a multisite network
+ *
+ * @param string $transient Transient name. Expected to not be SQL-escaped.
+ *
+ * @return mixed Value of transient.
+ */
+ public function get_transient( $transient ) {
+ if ( is_multisite() && ! is_main_site() ) {
+ switch_to_blog( $this->get_main_blog_id() );
+ $return = get_transient( $transient );
+ restore_current_blog();
+
+ return $return;
+ }
+
+ return get_transient( $transient );
+ }
+
+ /**
+ * Returns the local host.
+ */
+ public function get_local_host() {
+ if ( isset( $this->local_host ) ) {
+ return $this->local_host;
+ }
+
+ $uri = 'http://' . strtolower( isset( $_SERVER['HTTP_HOST'] ) ? filter_var( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : '' );
+
+ if ( is_multisite() ) {
+ $uri = network_home_url();
+ }
+
+ $uridata = wp_parse_url( $uri );
+
+ $domain = $uridata['host'];
+
+ // If we still don't have the site_url, get it.
+ if ( ! $domain ) {
+ $uri = get_site_url( 1 );
+ $uridata = wp_parse_url( $uri );
+ $domain = $uridata['host'];
+ }
+
+ $this->local_host = $domain;
+
+ return $this->local_host;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-compatibility.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-compatibility.php
new file mode 100644
index 00000000..682a26f8
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-compatibility.php
@@ -0,0 +1,232 @@
+range ) ) {
+ return $ip_object->range_low . '-' . $ip_object->range_high;
+ }
+
+ return $ip_object->ip_address;
+ },
+ $brute_force_allow_list
+ );
+
+ $brute_force_allow_list_string = implode( "\n", $brute_force_allow_list );
+
+ if ( empty( $waf_allow_list ) ) {
+ return $brute_force_allow_list_string;
+ }
+
+ // Return the lists merged into a single string.
+ return "$waf_allow_list\n$brute_force_allow_list_string";
+ }
+
+ /**
+ * Migrate the brute force protection IP allow list option to the WAF option.
+ *
+ * @since 0.11.0
+ *
+ * @return void
+ */
+ public static function migrate_brute_force_protection_ip_allow_list() {
+ // Get the allow list values directly from the database to avoid filters.
+ $brute_force_allow_list = Jetpack_Options::get_raw_option( 'jetpack_protect_whitelist' );
+ $waf_allow_list = Jetpack_Options::get_raw_option( 'jetpack_waf_ip_allow_list' );
+
+ if ( ! empty( $brute_force_allow_list ) ) {
+
+ if ( empty( $waf_allow_list ) ) {
+ $waf_allow_list = '';
+ }
+
+ // Merge the two allow lists.
+ $merged_allow_list = self::merge_ip_allow_lists( $waf_allow_list, $brute_force_allow_list );
+
+ // Update the WAF IP allow list with the merged list.
+ Jetpack_Options::update_raw_option( 'jetpack_waf_ip_allow_list', $merged_allow_list );
+
+ // Delete the old option if the update was successful.
+ // Check the values directly as `update_raw_option()` returns false if the value hasn't changed.
+ if ( Jetpack_Options::get_raw_option( 'jetpack_waf_ip_allow_list' ) === $merged_allow_list ) {
+ delete_option( 'jetpack_protect_whitelist' );
+ }
+ }
+ }
+
+ /**
+ * Filter for Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME's option value.
+ * Merges the deprecated IP allow list from the brute force protection module
+ * with the existing option value, and flags that the WAF needs to be updated.
+ *
+ * @since 0.11.0
+ *
+ * @param array $waf_allow_list The current value of the option.
+ *
+ * @return array The merged IP allow list.
+ */
+ public static function filter_option_waf_ip_allow_list( $waf_allow_list ) {
+ $brute_force_allow_list = Jetpack_Options::get_raw_option( 'jetpack_protect_whitelist', false );
+ if ( false !== $brute_force_allow_list ) {
+ $waf_allow_list = self::merge_ip_allow_lists( $waf_allow_list, $brute_force_allow_list );
+ update_option( Waf_Initializer::NEEDS_UPDATE_OPTION_NAME, 1 );
+ }
+
+ return $waf_allow_list;
+ }
+
+ /**
+ * Default option for when the Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME option is not set.
+ *
+ * @param mixed $default The default value to return if the option does not exist in the database.
+ * @param string $option Option name.
+ * @param bool $passed_default Was get_option() passed a default value.
+ *
+ * @return mixed The default value to return if the option does not exist in the database.
+ */
+ public static function default_option_waf_ip_allow_list( $default, $option, $passed_default ) {
+ // Allow get_option() to override this default value
+ if ( $passed_default ) {
+ return $default;
+ }
+
+ $waf_allow_list = '';
+
+ // If the brute force option exists, use that and flag that the WAF needs to be updated.
+ $brute_force_allow_list = Jetpack_Options::get_raw_option( 'jetpack_protect_whitelist', false );
+ if ( false !== $brute_force_allow_list ) {
+ $waf_allow_list = self::merge_ip_allow_lists( $waf_allow_list, $brute_force_allow_list );
+ update_option( Waf_Initializer::NEEDS_UPDATE_OPTION_NAME, 1 );
+ }
+
+ return $waf_allow_list;
+ }
+
+ /**
+ * Check if the brute force protection code is being run by an older version of Jetpack (< 12.0).
+ *
+ * @since 0.11.1
+ *
+ * @return bool
+ */
+ public static function is_brute_force_running_in_jetpack() {
+ return defined( 'JETPACK__VERSION' ) && version_compare( JETPACK__VERSION, '12', '<' );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-rest-controller.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-rest-controller.php
new file mode 100644
index 00000000..d2ad497e
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-rest-controller.php
@@ -0,0 +1,176 @@
+ WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::waf',
+ 'permission_callback' => __CLASS__ . '::waf_permissions_callback',
+ )
+ );
+
+ register_rest_route(
+ 'jetpack/v4',
+ '/waf',
+ array(
+ 'methods' => WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::update_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',
+ )
+ );
+
+ $routes_registered = true;
+ }
+
+ /**
+ * Update rules endpoint
+ *
+ * @return WP_REST_Response|WP_Error
+ */
+ public static function update_rules() {
+ try {
+ Waf_Rules_Manager::generate_automatic_rules();
+ Waf_Rules_Manager::generate_rules();
+ } catch ( Waf_Exception $e ) {
+ return $e->get_wp_error();
+ }
+
+ return rest_ensure_response(
+ array(
+ 'success' => true,
+ 'message' => __( 'Rules updated succesfully', 'jetpack-waf' ),
+ )
+ );
+ }
+
+ /**
+ * WAF Endpoint
+ *
+ * @return WP_REST_Response
+ */
+ public static function waf() {
+ return rest_ensure_response( Waf_Runner::get_config() );
+ }
+
+ /**
+ * Update WAF Endpoint
+ *
+ * @param WP_REST_Request $request The API request.
+ *
+ * @return WP_REST_Response|WP_Error
+ */
+ public static function update_waf( $request ) {
+ // Automatic Rules Enabled
+ if ( isset( $request[ Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME ] ) ) {
+ update_option( Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME, (bool) $request->get_param( Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME ) );
+ }
+
+ // IP Lists Enabled
+ if ( isset( $request[ Waf_Rules_Manager::IP_LISTS_ENABLED_OPTION_NAME ] ) ) {
+ update_option( Waf_Rules_Manager::IP_LISTS_ENABLED_OPTION_NAME, (bool) $request->get_param( Waf_Rules_Manager::IP_LISTS_ENABLED_OPTION_NAME ) );
+ }
+
+ // IP Block List
+ if ( isset( $request[ Waf_Rules_Manager::IP_BLOCK_LIST_OPTION_NAME ] ) ) {
+ update_option( Waf_Rules_Manager::IP_BLOCK_LIST_OPTION_NAME, $request[ Waf_Rules_Manager::IP_BLOCK_LIST_OPTION_NAME ] );
+ }
+
+ // IP Allow List
+ if ( isset( $request[ Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME ] ) ) {
+ update_option( Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME, $request[ Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME ] );
+ }
+
+ // Share Data
+ if ( isset( $request[ Waf_Runner::SHARE_DATA_OPTION_NAME ] ) ) {
+ update_option( Waf_Runner::SHARE_DATA_OPTION_NAME, (bool) $request[ Waf_Runner::SHARE_DATA_OPTION_NAME ] );
+ }
+
+ // Brute Force Protection
+ if ( isset( $request['brute_force_protection'] ) ) {
+ $enable_brute_force = (bool) $request['brute_force_protection'];
+ $brute_force_protection_toggled =
+ $enable_brute_force
+ ? Brute_Force_Protection::enable()
+ : Brute_Force_Protection::disable();
+
+ if ( ! $brute_force_protection_toggled ) {
+ return new WP_Error(
+ $enable_brute_force
+ ? 'brute_force_protection_activation_failed'
+ : 'brute_force_protection_deactivation_failed',
+ $enable_brute_force
+ ? __( 'Brute force protection could not be activated.', 'jetpack-waf' )
+ : __( 'Brute force protection could not be deactivated.', 'jetpack-waf' ),
+ array( 'status' => 500 )
+ );
+ }
+ }
+
+ // Only attempt to update the WAF if the module is supported
+ if ( Waf_Runner::is_supported_environment() ) {
+ try {
+ Waf_Runner::update_waf();
+ } catch ( Waf_Exception $e ) {
+ return $e->get_wp_error();
+ }
+ }
+
+ return self::waf();
+ }
+
+ /**
+ * 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( 'manage_options' ) ) {
+ return true;
+ }
+
+ return new WP_Error(
+ 'invalid_user_permission_manage_options',
+ REST_Connector::get_user_permissions_error_msg(),
+ array( 'status' => rest_authorization_required_code() )
+ );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-cli.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-cli.php
new file mode 100644
index 00000000..82674ffd
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-cli.php
@@ -0,0 +1,166 @@
+]
+ * : 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
+ *
+ * []
+ * : 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_Rules_Manager::generate_automatic_rules();
+ Waf_Rules_Manager::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::get_waf_file_path( Waf_Rules_Manager::RULES_ENTRYPOINT_FILE )
+ )
+ );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-constants.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-constants.php
new file mode 100644
index 00000000..ed82ce6a
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-constants.php
@@ -0,0 +1,104 @@
+is_atomic_platform();
+ define( 'DISABLE_JETPACK_WAF', $is_wpcom || $is_atomic );
+ }
+ }
+
+ /**
+ * 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( Waf_Runner::MODE_OPTION_NAME );
+ define( 'JETPACK_WAF_MODE', $mode_option );
+ }
+ }
+
+ /**
+ * Set the share data 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( Waf_Runner::SHARE_DATA_OPTION_NAME, false );
+ define( 'JETPACK_WAF_SHARE_DATA', $share_data_option );
+ }
+ }
+
+ /**
+ * Set the brute force protection's API host definition if it has not been set.
+ *
+ * @return void
+ */
+ public static function define_brute_force_api_host() {
+ if ( ! defined( 'JETPACK_PROTECT__API_HOST' ) ) {
+ define( 'JETPACK_PROTECT__API_HOST', 'https://api.bruteprotect.com/' );
+ }
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php
new file mode 100644
index 00000000..11891fe3
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php
@@ -0,0 +1,243 @@
+generate();
+ } catch ( Waf_Exception $e ) {
+ return $e->get_wp_error();
+ }
+
+ return true;
+ }
+
+ /**
+ * Activate the Brute force protection on module activation.
+ *
+ * @return bool True if the Brute force protection activation is successful
+ */
+ public static function on_brute_force_protection_activation() {
+ $brute_force_protection = Brute_Force_Protection::instance();
+ $brute_force_protection->on_activation();
+
+ return true;
+ }
+
+ /**
+ * Deactivate the WAF on module deactivation.
+ *
+ * @return bool|WP_Error True if the WAF deactivation is successful, WP_Error otherwise.
+ */
+ public static function on_waf_deactivation() {
+ try {
+ Waf_Runner::deactivate();
+ } catch ( Waf_Exception $e ) {
+ return $e->get_wp_error();
+ }
+
+ return true;
+ }
+
+ /**
+ * Deactivate the Brute force protection on module deactivation.
+ *
+ * @return bool True if the Brute force protection deactivation is successful.
+ */
+ public static function on_brute_force_protection_deactivation() {
+ $brute_force_protection = Brute_Force_Protection::instance();
+ $brute_force_protection->on_deactivation();
+
+ return true;
+ }
+
+ /**
+ * Updates the WAF after upgrader process is complete.
+ *
+ * @param WP_Upgrader $upgrader WP_Upgrader instance. In other contexts this might be a Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance.
+ * @param array $hook_extra Array of bulk item update data.
+ *
+ * @return void
+ */
+ public static function update_waf_after_plugin_upgrade( $upgrader, $hook_extra ) {
+ $jetpack_text_domains_with_waf = array( 'jetpack', 'jetpack-protect' );
+ $jetpack_plugins_with_waf = array( 'jetpack/jetpack.php', 'jetpack-protect/jetpack-protect.php' );
+
+ // Only run on upgrades affecting plugins
+ if ( 'plugin' !== $hook_extra['type'] ) {
+ return;
+ }
+
+ // Only run on updates and installations
+ if ( 'update' !== $hook_extra['action'] && 'install' !== $hook_extra['action'] ) {
+ return;
+ }
+
+ // Only run when Jetpack plugins were affected
+ if ( 'update' === $hook_extra['action'] &&
+ ! empty( $hook_extra['plugins'] ) &&
+ empty( array_intersect( $jetpack_plugins_with_waf, $hook_extra['plugins'] ) )
+ ) {
+ return;
+ }
+ if ( 'install' === $hook_extra['action'] &&
+ ! empty( $upgrader->new_plugin_data['TextDomain'] ) &&
+ empty( in_array( $upgrader->new_plugin_data['TextDomain'], $jetpack_text_domains_with_waf, true ) )
+ ) {
+ return;
+ }
+
+ update_option( self::NEEDS_UPDATE_OPTION_NAME, 1 );
+ }
+
+ /**
+ * Check for WAF update
+ *
+ * Updates the WAF when the "needs update" option is enabled.
+ *
+ * @return bool|WP_Error True if the WAF is up-to-date or was sucessfully updated, WP_Error if the update failed.
+ */
+ public static function check_for_updates() {
+ if ( get_option( self::NEEDS_UPDATE_OPTION_NAME ) ) {
+ if ( Waf_Runner::is_supported_environment() ) {
+ // Compatiblity patch for cases where an outdated WAF_Constants class has been
+ // autoloaded by the standalone bootstrap execution at the beginning of the current request.
+ if ( ! method_exists( Waf_Constants::class, 'define_mode' ) ) {
+ try {
+ ( new Waf_Standalone_Bootstrap() )->generate();
+ } catch ( Waf_Exception $e ) {
+ return $e->get_wp_error();
+ }
+ }
+
+ Waf_Compatibility::run_compatibility_migrations();
+
+ Waf_Constants::define_mode();
+ if ( ! Waf_Runner::is_allowed_mode( JETPACK_WAF_MODE ) ) {
+ return new WP_Error( 'waf_mode_invalid', 'Invalid firewall mode.' );
+ }
+
+ try {
+ Waf_Rules_Manager::generate_ip_rules();
+ Waf_Rules_Manager::generate_rules();
+ ( new Waf_Standalone_Bootstrap() )->generate();
+ } catch ( Waf_Exception $e ) {
+ return $e->get_wp_error();
+ }
+ } else {
+ // If the site doesn't support the request firewall,
+ // just migrate the IP allow list used by brute force protection.
+ Waf_Compatibility::migrate_brute_force_protection_ip_allow_list();
+ }
+ }
+
+ update_option( self::NEEDS_UPDATE_OPTION_NAME, 0 );
+ return true;
+ }
+
+ /**
+ * Disables the WAF module when on an unsupported platform in Jetpack.
+ *
+ * @param array $modules Filterable value for `jetpack_get_available_modules`.
+ *
+ * @return array Array of module slugs.
+ */
+ public static function remove_module_on_unsupported_environments( $modules ) {
+ if ( ! Waf_Runner::is_supported_environment() ) {
+ // WAF should never be available on unsupported platforms.
+ unset( $modules['waf'] );
+ }
+
+ return $modules;
+ }
+
+ /**
+ * Disables the WAF module when on an unsupported platform in a standalone plugin.
+ *
+ * @param array $modules Filterable value for `jetpack_get_available_standalone_modules`.
+ *
+ * @return array Array of module slugs.
+ */
+ public static function remove_standalone_module_on_unsupported_environments( $modules ) {
+ if ( ! Waf_Runner::is_supported_environment() ) {
+ // WAF should never be available on unsupported platforms.
+ $modules = array_filter(
+ $modules,
+ function ( $module ) {
+ return $module !== 'waf';
+ }
+ );
+
+ }
+
+ return $modules;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-operators.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-operators.php
new file mode 100644
index 00000000..4f111c79
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-operators.php
@@ -0,0 +1,286 @@
+= 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-request.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-request.php
new file mode 100644
index 00000000..91d83d90
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-request.php
@@ -0,0 +1,329 @@
+url = [ 'https://wordpress.com', '/index.php', '?myvar=red' ]
+ * @var array{ 0: string, 1: string, 2: string }|null
+ */
+ protected $url = null;
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Returns the headers that were sent with this request
+ *
+ * @return array{ 0: string, 1: scalar }[]
+ */
+ public function get_headers() {
+ $value = array();
+ $has_content_type = false;
+ $has_content_length = false;
+ foreach ( $_SERVER as $k => $v ) {
+ $k = strtolower( $k );
+ if ( 'http_' === substr( $k, 0, 5 ) ) {
+ $value[] = array( $this->normalize_header_name( substr( $k, 5 ) ), $v );
+ } elseif ( 'content_type' === $k && '' !== $v ) {
+ $has_content_type = true;
+ $value[] = array( 'content-type', $v );
+ } elseif ( 'content_length' === $k && '' !== $v ) {
+ $has_content_length = true;
+ $value[] = array( 'content-length', $v );
+ }
+ }
+ if ( ! $has_content_type ) {
+ // default Content-Type per RFC 7231 section 3.1.5.5.
+ $value[] = array( 'content-type', 'application/octet-stream' );
+ }
+ if ( ! $has_content_length ) {
+ $value[] = array( 'content-length', '0' );
+ }
+
+ return $value;
+ }
+
+ /**
+ * Change a header name to all-lowercase and replace spaces and underscores with dashes.
+ *
+ * @param string $name The header name to normalize.
+ * @return string
+ */
+ public function normalize_header_name( $name ) {
+ return str_replace( array( ' ', '_' ), '-', strtolower( $name ) );
+ }
+
+ /**
+ * Get the method for this request (GET, POST, etc).
+ *
+ * @return string
+ */
+ public function get_method() {
+ return isset( $_SERVER['REQUEST_METHOD'] )
+ ? filter_var( wp_unslash( $_SERVER['REQUEST_METHOD'] ), FILTER_DEFAULT )
+ : '';
+ }
+
+ /**
+ * Get the protocol for this request (HTTP, HTTPS, etc)
+ *
+ * @return string
+ */
+ public function get_protocol() {
+ return isset( $_SERVER['SERVER_PROTOCOL'] )
+ ? filter_var( wp_unslash( $_SERVER['SERVER_PROTOCOL'] ), FILTER_DEFAULT )
+ : '';
+ }
+
+ /**
+ * Returns the URL parts for this request.
+ *
+ * @see $this->url
+ * @return array{ 0: string, 1: string, 2: string }
+ */
+ protected function get_url() {
+ if ( null !== $this->url ) {
+ return $this->url;
+ }
+
+ $uri = isset( $_SERVER['REQUEST_URI'] ) ? filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ), FILTER_DEFAULT ) : '/';
+ if ( false !== strpos( $uri, '?' ) ) {
+ // remove the query string (we'll pull it from elsewhere later)
+ $uri = substr( $uri, 0, strpos( $uri, '?' ) );
+ }
+ $query_string = isset( $_SERVER['QUERY_STRING'] ) ? '?' . filter_var( wp_unslash( $_SERVER['QUERY_STRING'] ), FILTER_DEFAULT ) : '';
+ if ( 1 === preg_match( '/^https?:\/\//', $uri ) ) {
+ // sometimes $_SERVER[REQUEST_URI] already includes the full domain name
+ $uri_host = substr( $uri, 0, strpos( $uri, '/', 8 ) );
+ $uri_path = substr( $uri, strlen( $uri_host ) );
+ $this->url = array( $uri_host, $uri_path, $query_string );
+ } else {
+ // otherwise build the URI manually
+ $uri_scheme = ( ! empty( $_SERVER['HTTPS'] ) && 'off' !== $_SERVER['HTTPS'] )
+ ? 'https'
+ : 'http';
+ $uri_host = isset( $_SERVER['HTTP_HOST'] )
+ ? filter_var( wp_unslash( $_SERVER['HTTP_HOST'] ), FILTER_DEFAULT )
+ : (
+ isset( $_SERVER['SERVER_NAME'] )
+ ? filter_var( wp_unslash( $_SERVER['SERVER_NAME'] ), FILTER_DEFAULT )
+ : ''
+ );
+ $uri_port = isset( $_SERVER['SERVER_PORT'] )
+ ? filter_var( wp_unslash( $_SERVER['SERVER_PORT'] ), FILTER_SANITIZE_NUMBER_INT )
+ : '';
+ // we only need to include the port if it's non-standard
+ if ( $uri_port && ( 'http' === $uri_scheme && '80' !== $uri_port || 'https' === $uri_scheme && '443' !== $uri_port ) ) {
+ $uri_port = ':' . $uri_port;
+ } else {
+ $uri_port = '';
+ }
+ $this->url = array(
+ $uri_scheme . '://' . $uri_host . $uri_port,
+ $uri,
+ $query_string,
+ );
+ }
+ return $this->url;
+ }
+
+ /**
+ * Get the requested URI
+ *
+ * @param boolean $include_host If true, the scheme and domain will be included in the returned string (i.e. 'https://wordpress.com/index.php).
+ * If false, only the requested URI path will be returned (i.e. '/index.php').
+ * @return string
+ */
+ public function get_uri( $include_host = false ) {
+ list( $host, $file, $query ) = $this->get_url();
+
+ return ( $include_host ? $host : '' ) . $file . $query;
+ }
+
+ /**
+ * Return the filename part of the request
+ *
+ * @example for 'https://wordpress.com/some/page?id=5', return '/some/page'
+ * @return string
+ */
+ public function get_filename() {
+ return $this->get_url()[1];
+ }
+
+ /**
+ * Return the query string. If present, it will be prefixed with '?'. Otherwise, it will be an empty string.
+ *
+ * @return string
+ */
+ public function get_query_string() {
+ return $this->get_url()[2];
+ }
+
+ /**
+ * Returns the request body.
+ *
+ * @return string
+ */
+ public function get_body() {
+ $body = file_get_contents( 'php://input' );
+ return false === $body ? '' : $body;
+ }
+
+ /**
+ * Returns the cookies
+ *
+ * @return array
+ */
+ public function get_cookies() {
+ return flatten_array( $_COOKIE );
+ }
+
+ /**
+ * Returns the GET variables
+ *
+ * @return array
+ */
+ public function get_get_vars() {
+ return flatten_array( $_GET );
+ }
+
+ /**
+ * Returns the POST variables
+ *
+ * @return array
+ */
+ public function get_post_vars() {
+ return flatten_array( $_POST );
+ }
+
+ /**
+ * Returns the files that were uploaded with this request (i.e. what's in the $_FILES superglobal)
+ *
+ * @return RequestFile[]
+ */
+ public function get_files() {
+ $files = array();
+ foreach ( $_FILES as $field_name => $arr ) {
+ // flatten the values in case we were given inputs with brackets
+ foreach ( flatten_array( $arr ) as list( $arr_key, $arr_value ) ) {
+ if ( $arr_key === 'name' ) {
+ // if this file was a simple (non-nested) name and unique, then just add it.
+ $files[] = array(
+ 'name' => $field_name,
+ 'filename' => $arr_value,
+ );
+ } elseif ( 'name[' === substr( $arr_key, 0, 5 ) ) {
+ // otherwise this was a file with a nested name and/or multiple files with the same name
+ $files[] = array(
+ 'name' => $field_name . substr( $arr_key, 4 ),
+ 'filename' => $arr_value,
+ );
+ }
+ }
+ }
+ return $files;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-rules-manager.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-rules-manager.php
new file mode 100644
index 00000000..2c9f8901
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-rules-manager.php
@@ -0,0 +1,323 @@
+get_wp_error();
+ }
+
+ update_option( self::RULE_LAST_UPDATED_OPTION_NAME, time() );
+ return true;
+ }
+
+ /**
+ * Re-activate the WAF any time an option is added or updated.
+ *
+ * @return bool|WP_Error True if re-activation is successful, WP_Error on failure.
+ */
+ public static function reactivate_on_rules_option_change() {
+ try {
+ Waf_Runner::activate();
+ } catch ( Waf_Exception $e ) {
+ return $e->get_wp_error();
+ }
+
+ return true;
+ }
+
+ /**
+ * Updates the rule set if rules version has changed
+ *
+ * @throws Waf_Exception If the firewall mode is invalid.
+ * @throws Waf_Exception If the rules update fails.
+ *
+ * @return void
+ */
+ public static function update_rules_if_changed() {
+ Waf_Constants::define_mode();
+ if ( ! Waf_Runner::is_allowed_mode( JETPACK_WAF_MODE ) ) {
+ throw new Waf_Exception( 'Invalid firewall mode.' );
+ }
+ $version = get_option( self::VERSION_OPTION_NAME );
+ if ( self::RULES_VERSION !== $version ) {
+ self::generate_automatic_rules();
+ self::generate_ip_rules();
+ self::generate_rules();
+
+ update_option( self::VERSION_OPTION_NAME, self::RULES_VERSION );
+ }
+ }
+
+ /**
+ * Retrieve rules from the API
+ *
+ * @throws Waf_Exception If site is not registered.
+ * @throws Rules_API_Exception If API did not respond 200.
+ * @throws Rules_API_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 Waf_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 Rules_API_Exception( 'API connection failed.', (int) $response_code );
+ }
+
+ $rules_json = wp_remote_retrieve_body( $response );
+ $rules = json_decode( $rules_json, true );
+
+ if ( empty( $rules['data'] ) ) {
+ throw new Rules_API_Exception( 'Data missing from response.' );
+ }
+
+ return $rules['data'];
+ }
+
+ /**
+ * Wraps a require statement in a file_exists check.
+ *
+ * @param string $required_file The file to check if exists and require.
+ * @param string $return_code The PHP code to execute if the file require returns true. Defaults to 'return;'.
+ *
+ * @return string The wrapped require statement.
+ */
+ private static function wrap_require( $required_file, $return_code = 'return;' ) {
+ return "if ( file_exists( '$required_file' ) ) { if ( require( '$required_file' ) ) { $return_code } }";
+ }
+
+ /**
+ * Generates the rules.php script
+ *
+ * @global \WP_Filesystem_Base $wp_filesystem WordPress filesystem abstraction.
+ *
+ * @throws File_System_Exception If file writing fails initializing rule files.
+ * @throws File_System_Exception If file writing fails writing to the rules entrypoint file.
+ *
+ * @return void
+ */
+ public static function generate_rules() {
+ global $wp_filesystem;
+ Waf_Runner::initialize_filesystem();
+
+ $rules = "is_dir( dirname( $entrypoint_file_path ) ) ) {
+ $wp_filesystem->mkdir( dirname( $entrypoint_file_path ) );
+ }
+
+ // Ensure all potentially required rule files exist
+ $rule_files = array( self::RULES_ENTRYPOINT_FILE, self::AUTOMATIC_RULES_FILE, self::IP_ALLOW_RULES_FILE, self::IP_BLOCK_RULES_FILE );
+ foreach ( $rule_files as $rule_file ) {
+ $rule_file = Waf_Runner::get_waf_file_path( $rule_file );
+ if ( ! $wp_filesystem->is_file( $rule_file ) ) {
+ if ( ! $wp_filesystem->put_contents( $rule_file, "block( 'block', -1, 'ip block list' );" ) . "\n";
+ }
+
+ // Add automatic rules
+ if ( get_option( self::AUTOMATIC_RULES_ENABLED_OPTION_NAME ) ) {
+ $rules .= self::wrap_require( Waf_Runner::get_waf_file_path( self::AUTOMATIC_RULES_FILE ) ) . "\n";
+ }
+
+ // Update the rules file
+ if ( ! $wp_filesystem->put_contents( $entrypoint_file_path, $rules ) ) {
+ throw new File_System_Exception( 'Failed writing rules file to: ' . $entrypoint_file_path );
+ }
+ }
+
+ /**
+ * Generates the automatic-rules.php script
+ *
+ * @global \WP_Filesystem_Base $wp_filesystem WordPress filesystem abstraction.
+ *
+ * @throws Waf_Exception If rules cannot be fetched from the API.
+ * @throws File_System_Exception If file writing fails.
+ *
+ * @return void
+ */
+ public static function generate_automatic_rules() {
+ global $wp_filesystem;
+ Waf_Runner::initialize_filesystem();
+
+ $automatic_rules_file_path = Waf_Runner::get_waf_file_path( self::AUTOMATIC_RULES_FILE );
+
+ // Ensure that the folder exists.
+ if ( ! $wp_filesystem->is_dir( dirname( $automatic_rules_file_path ) ) ) {
+ $wp_filesystem->mkdir( dirname( $automatic_rules_file_path ) );
+ }
+
+ try {
+ $rules = self::get_rules_from_api();
+ } catch ( Waf_Exception $e ) {
+ // Do not throw API exceptions for users who do not have access
+ if ( 401 !== $e->getCode() ) {
+ throw $e;
+ }
+ }
+
+ // If there are no rules available, don't overwrite the existing file.
+ if ( empty( $rules ) ) {
+ return;
+ }
+
+ if ( ! $wp_filesystem->put_contents( $automatic_rules_file_path, $rules ) ) {
+ throw new File_System_Exception( 'Failed writing automatic rules file to: ' . $automatic_rules_file_path );
+ }
+
+ update_option( self::AUTOMATIC_RULES_LAST_UPDATED_OPTION_NAME, time() );
+ }
+
+ /**
+ * Generates the rules.php script
+ *
+ * @global \WP_Filesystem_Base $wp_filesystem WordPress filesystem abstraction.
+ *
+ * @throws File_System_Exception If writing to IP allow list file fails.
+ * @throws File_System_Exception If writing to IP block list file fails.
+ *
+ * @return void
+ */
+ public static function generate_ip_rules() {
+ global $wp_filesystem;
+ Waf_Runner::initialize_filesystem();
+
+ $allow_ip_file_path = Waf_Runner::get_waf_file_path( self::IP_ALLOW_RULES_FILE );
+ $block_ip_file_path = Waf_Runner::get_waf_file_path( self::IP_BLOCK_RULES_FILE );
+
+ // Ensure that the folders exists.
+ if ( ! $wp_filesystem->is_dir( dirname( $allow_ip_file_path ) ) ) {
+ $wp_filesystem->mkdir( dirname( $allow_ip_file_path ) );
+ }
+ if ( ! $wp_filesystem->is_dir( dirname( $block_ip_file_path ) ) ) {
+ $wp_filesystem->mkdir( dirname( $block_ip_file_path ) );
+ }
+
+ $allow_list = IP_Utils::get_ip_addresses_from_string( get_option( self::IP_ALLOW_LIST_OPTION_NAME ) );
+ $block_list = IP_Utils::get_ip_addresses_from_string( get_option( self::IP_BLOCK_LIST_OPTION_NAME ) );
+
+ $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( $allow_ip_file_path, "is_ip_in_array( $waf_block_list );' . "\n";
+
+ if ( ! $wp_filesystem->put_contents( $block_ip_file_path, "is_wpcom_simple() ) {
+ return false;
+ }
+
+ // Do not run on the Atomic platform
+ if ( ( new Host() )->is_atomic_platform() ) {
+ return false;
+ }
+
+ // Do not run on the VIP platform
+ if ( ( new Host() )->is_vip_site() ) {
+ return false;
+ }
+
+ return 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( self::WAF_MODULE_NAME );
+ }
+
+ return true;
+ }
+
+ /**
+ * Enables the WAF module on the site.
+ *
+ * @return bool
+ */
+ public static function enable() {
+ return ( new Modules() )->activate( self::WAF_MODULE_NAME, false, false );
+ }
+
+ /**
+ * Disabled the WAF module on the site.
+ *
+ * @return bool
+ */
+ public static function disable() {
+ return ( new Modules() )->deactivate( self::WAF_MODULE_NAME );
+ }
+
+ /**
+ * Get Config
+ *
+ * @return array The WAF settings and current configuration data.
+ */
+ public static function get_config() {
+ return array(
+ Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME => get_option( Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME ),
+ Waf_Rules_Manager::IP_LISTS_ENABLED_OPTION_NAME => get_option( Waf_Rules_Manager::IP_LISTS_ENABLED_OPTION_NAME ),
+ Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME => get_option( Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME ),
+ Waf_Rules_Manager::IP_BLOCK_LIST_OPTION_NAME => get_option( Waf_Rules_Manager::IP_BLOCK_LIST_OPTION_NAME ),
+ self::SHARE_DATA_OPTION_NAME => get_option( self::SHARE_DATA_OPTION_NAME ),
+ 'bootstrap_path' => self::get_bootstrap_file_path(),
+ 'automatic_rules_available' => (bool) self::automatic_rules_available(),
+ 'brute_force_protection' => (bool) Brute_Force_Protection::is_enabled(),
+ );
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * Get WAF File Path
+ *
+ * @param string $file The file path starting in the WAF directory.
+ * @return string The full file path to the provided file in the WAF directory.
+ */
+ public static function get_waf_file_path( $file ) {
+ Waf_Constants::define_waf_directory();
+
+ // Ensure the file path starts with a slash.
+ if ( '/' !== substr( $file, 0, 1 ) ) {
+ $file = "/$file";
+ }
+
+ return JETPACK_WAF_DIR . $file;
+ }
+
+ /**
+ * 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.
+ $rules_file_path = self::get_waf_file_path( Waf_Rules_Manager::RULES_ENTRYPOINT_FILE );
+ if ( file_exists( $rules_file_path ) ) {
+ // phpcs:ignore
+ include $rules_file_path;
+ }
+ } 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 and WAF directory structure.
+ *
+ * @throws File_System_Exception If filesystem is unavailable.
+ *
+ * @return void
+ */
+ public static function initialize_filesystem() {
+ if ( ! function_exists( '\\WP_Filesystem' ) ) {
+ require_once ABSPATH . 'wp-admin/includes/file.php';
+ }
+
+ if ( ! \WP_Filesystem() ) {
+ throw new File_System_Exception( 'No filesystem available.' );
+ }
+
+ self::initialize_waf_directory();
+ }
+
+ /**
+ * Activates the WAF by generating the rules script and setting the version
+ *
+ * @throws Waf_Exception If the firewall mode is invalid.
+ * @throws Waf_Exception If the activation fails.
+ *
+ * @return void
+ */
+ public static function activate() {
+ Waf_Constants::define_mode();
+ if ( ! self::is_allowed_mode( JETPACK_WAF_MODE ) ) {
+ throw new Waf_Exception( 'Invalid firewall mode.' );
+ }
+
+ $version = get_option( Waf_Rules_Manager::VERSION_OPTION_NAME );
+ if ( ! $version ) {
+ add_option( Waf_Rules_Manager::VERSION_OPTION_NAME, Waf_Rules_Manager::RULES_VERSION );
+ }
+
+ add_option( self::SHARE_DATA_OPTION_NAME, true );
+
+ self::initialize_filesystem();
+
+ Waf_Rules_Manager::generate_automatic_rules();
+ Waf_Rules_Manager::generate_ip_rules();
+ Waf_Rules_Manager::generate_rules();
+
+ self::create_blocklog_table();
+ }
+
+ /**
+ * Ensures that the waf directory is created.
+ *
+ * @throws File_System_Exception If filesystem is unavailable.
+ * @throws File_System_Exception If creating the directory fails.
+ *
+ * @return void
+ */
+ public static function initialize_waf_directory() {
+ WP_Filesystem();
+ Waf_Constants::define_waf_directory();
+
+ global $wp_filesystem;
+ if ( ! $wp_filesystem ) {
+ throw new File_System_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 File_System_Exception( 'Failed creating WAF 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.
+ *
+ * @throws File_System_Exception If file writing fails.
+ *
+ * @return void
+ */
+ public static function deactivate() {
+ delete_option( self::MODE_OPTION_NAME );
+ delete_option( Waf_Rules_Manager::VERSION_OPTION_NAME );
+
+ global $wp_filesystem;
+ self::initialize_filesystem();
+
+ // If the rules file doesn't exist, there's nothing else to do.
+ if ( ! $wp_filesystem->exists( self::get_waf_file_path( Waf_Rules_Manager::RULES_ENTRYPOINT_FILE ) ) ) {
+ return;
+ }
+
+ // Empty the rules entrypoint file.
+ if ( ! $wp_filesystem->put_contents( self::get_waf_file_path( Waf_Rules_Manager::RULES_ENTRYPOINT_FILE ), "generate();
+ }
+
+ /**
+ * Check if an automatic rules file is available
+ *
+ * @return bool False if an automatic rules file is not available, true otherwise
+ */
+ public static function automatic_rules_available() {
+ $automatic_rules_last_updated = get_option( Waf_Rules_Manager::AUTOMATIC_RULES_LAST_UPDATED_OPTION_NAME );
+
+ // If we do not have a automatic rules last updated timestamp cached, return false.
+ if ( ! $automatic_rules_last_updated ) {
+ return false;
+ }
+
+ // Validate that the automatic rules file exists and is not empty.
+ global $wp_filesystem;
+
+ try {
+ self::initialize_filesystem();
+ } catch ( Waf_Exception $e ) {
+ return false;
+ }
+
+ $automatic_rules_file_contents = $wp_filesystem->get_contents( self::get_waf_file_path( Waf_Rules_Manager::AUTOMATIC_RULES_FILE ) );
+
+ // If the automatic rules file was removed or is now empty, return false.
+ if ( ! $automatic_rules_file_contents || "
+ */
+class Waf_Runtime {
+ /**
+ * If used, normalize_array_targets() will just return the number of matching values, instead of the values themselves.
+ */
+ const NORMALIZE_ARRAY_COUNT = 1;
+ /**
+ * If used, normalize_array_targets() will apply "only" and "except" filters to the values of the source array, instead of the keys.
+ */
+ const NORMALIZE_ARRAY_MATCH_VALUES = 2;
+
+ /**
+ * 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;
+
+ /**
+ * The request
+ *
+ * @var Waf_Request
+ */
+ private $request;
+
+ /**
+ * 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.
+ * @param Waf_Request? $request Information about the request.
+ */
+ public function __construct( $transforms, $operators, $request = null ) {
+ $this->transforms = $transforms;
+ $this->operators = $operators;
+ $this->request = null === $request
+ ? new Waf_Request()
+ : $request;
+ }
+
+ /**
+ * 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 TargetBag $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'] );
+ }
+ }
+ unset( $v );
+ // 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;
+ } elseif (
+ ! 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 ] );
+ }
+
+ /**
+ * A cache of metadata about the incoming request.
+ *
+ * @param string $key The type of metadata to request ('headers', 'request_method', etc.).
+ */
+ public function meta( $key ) {
+ if ( ! isset( $this->metadata[ $key ] ) ) {
+ $value = null;
+ switch ( $key ) {
+ case 'headers':
+ $value = $this->request->get_headers();
+ break;
+ case 'headers_names':
+ $value = $this->args_names( $this->meta( 'headers' ) );
+ break;
+ case 'request_method':
+ $value = $this->request->get_method();
+ break;
+ case 'request_protocol':
+ $value = $this->request->get_protocol();
+ break;
+ case 'request_uri':
+ $value = $this->request->get_uri( false );
+ break;
+ case 'request_uri_raw':
+ $value = $this->request->get_uri( true );
+ break;
+ case 'request_filename':
+ $value = $this->request->get_filename();
+ break;
+ case 'request_line':
+ $value = sprintf(
+ '%s %s %s',
+ $this->request->get_method(),
+ $this->request->get_uri( false ),
+ $this->request->get_protocol()
+ );
+ break;
+ case 'request_basename':
+ $value = basename( $this->request->get_filename() );
+ break;
+ case 'request_body':
+ $value = $this->request->get_body();
+ break;
+ case 'query_string':
+ $value = $this->request->get_query_string();
+ break;
+ case 'args_get':
+ $value = $this->request->get_get_vars();
+ break;
+ case 'args_get_names':
+ $value = $this->args_names( $this->meta( 'args_get' ) );
+ break;
+ case 'args_post':
+ $value = $this->request->get_post_vars();
+ break;
+ case 'args_post_names':
+ $value = $this->args_names( $this->meta( 'args_post' ) );
+ break;
+ case 'args':
+ $value = array_merge( $this->meta( 'args_get' ), $this->meta( 'args_post' ) );
+ break;
+ case 'args_names':
+ $value = $this->args_names( $this->meta( 'args' ) );
+ break;
+ case 'request_cookies':
+ $value = $this->request->get_cookies();
+ break;
+ case 'request_cookies_names':
+ $value = $this->args_names( $this->meta( 'request_cookies' ) );
+ break;
+ case 'files':
+ $value = array();
+ foreach ( $this->request->get_files() as $f ) {
+ $value[] = array( $f['name'], $f['filename'] );
+ }
+ break;
+ case 'files_names':
+ $value = $this->args_names( $this->meta( 'files' ) );
+ break;
+ }
+ $this->metadata[ $key ] = $value;
+ }
+
+ return $this->metadata[ $key ];
+ }
+
+ /**
+ * 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 ) );
+ }
+
+ /**
+ * Get match-able values from a collection of targets.
+ *
+ * This function expects an associative array of target items, and returns an array of possible values from those targets that can be used to match against.
+ * The key is the lowercase target name (i.e. `args`, `request_headers`, etc) - see https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual-(v3.x)#Variables
+ * The value is an associative array of options that define how to narrow down the returned values for that target if it's an array (ARGS, for example). The possible options are:
+ * count: If `true`, then the returned value will a count of how many matched targets were found, rather then the actual values of those targets.
+ * For example, &ARGS_GET will return the number of keys the query string.
+ * only: If specified, then only values in that target that match the given key will be returned.
+ * For example, ARGS_GET:id|ARGS_GET:/^name/ will only return the values for `$_GET['id']` and any key in `$_GET` that starts with `name`
+ * except: If specified, then values in that target will be left out from the returned values (even if they were included in an `only` option)
+ * For example, ARGS_GET|!ARGS_GET:z will return every value from `$_GET` except for `$_GET['z']`.
+ *
+ * This function will return an array of associative arrays. Each with:
+ * name: The target name that this value came from (i.e. the key in the input `$targets` argument )
+ * source: For targets that are associative arrays (like ARGS), this will be the target name AND the key in that target (i.e. "args:z" for ARGS:z)
+ * value: The value that was found in the associated target.
+ *
+ * @param TargetBag $targets An assoc. array with keys that are target name(s) and values are options for how to process that target (include/exclude rules, whether to return values or counts).
+ * @return array{ name: string, source: string, value: mixed }
+ */
+ public function normalize_targets( $targets ) {
+ $return = array();
+ foreach ( $targets as $k => $v ) {
+ $count_only = isset( $v['count'] ) ? self::NORMALIZE_ARRAY_COUNT : 0;
+ $only = isset( $v['only'] ) ? $v['only'] : array();
+ $except = isset( $v['except'] ) ? $v['except'] : array();
+ $_k = strtolower( $k );
+ switch ( $_k ) {
+ case 'request_headers':
+ $this->normalize_array_target(
+ // get the headers that came in with this request
+ $this->meta( 'headers' ),
+ // ensure only and exclude filters are normalized
+ array_map( array( $this->request, 'normalize_header_name' ), $only ),
+ array_map( array( $this->request, 'normalize_header_name' ), $except ),
+ $k,
+ $return,
+ // flags
+ $count_only
+ );
+ continue 2;
+ case 'request_headers_names':
+ $this->normalize_array_target( $this->meta( 'headers_names' ), $only, $except, $k, $return, $count_only | self::NORMALIZE_ARRAY_MATCH_VALUES );
+ continue 2;
+ case 'request_method':
+ case 'request_protocol':
+ case 'request_uri':
+ case 'request_uri_raw':
+ case 'request_filename':
+ 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':
+ case 'args':
+ case 'args_get':
+ case 'args_post':
+ case 'files':
+ $this->normalize_array_target( $this->meta( $_k ), $only, $except, $k, $return, $count_only );
+ continue 2;
+ case 'request_cookies_names':
+ case 'args_names':
+ case 'args_get_names':
+ case 'args_post_names':
+ case 'files_names':
+ // get the "full" data (for 'args_names' get data for 'args') and stripe it down to just the key names
+ $data = array_map(
+ function ( $item ) {
+ return $item[0]; },
+ $this->meta( substr( $_k, 0, -6 ) )
+ );
+ $this->normalize_array_target( $data, $only, $except, $k, $return, $count_only | self::NORMALIZE_ARRAY_MATCH_VALUES );
+ continue 2;
+ default:
+ var_dump( 'Unknown target', $k, $v );
+ exit;
+ }
+ $return[] = array(
+ 'name' => $k,
+ 'value' => $v,
+ 'source' => $k,
+ );
+ }
+
+ return $return;
+ }
+
+ /**
+ * Verifies if the IP from the current request is in an array.
+ *
+ * @param array $array Array of IP addresses to verify the request IP against.
+ * @return bool
+ */
+ public function is_ip_in_array( $array ) {
+ $real_ip = $this->request->get_real_user_ip_address();
+ $array_length = count( $array );
+
+ for ( $i = 0; $i < $array_length; $i++ ) {
+ // Check if the IP matches a provided range.
+ $range = explode( '-', $array[ $i ] );
+ if ( count( $range ) === 2 ) {
+ if ( IP_Utils::ip_address_is_in_range( $real_ip, $range[0], $range[1] ) ) {
+ return true;
+ }
+ continue;
+ }
+
+ // Check if the IP is an exact match.
+ if ( $real_ip === $array[ $i ] ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Extract values from an associative array, potentially applying filters and/or counting results.
+ *
+ * @param array{ 0: string, 1: scalar }|scalar[] $source The source assoc. array of values (i.e. $_GET, $_SERVER, etc.).
+ * @param string[] $only Only include the values for these keys in the output.
+ * @param string[] $excl Never include the values for these keys in the output.
+ * @param string $name The name of this target (see https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual-(v3.x)#Variables).
+ * @param array $results Array to add output values to, will be modified by this method.
+ * @param int $flags Any of the NORMALIZE_ARRAY_* constants defined at the top of the class.
+ */
+ private function normalize_array_target( $source, $only, $excl, $name, &$results, $flags = 0 ) {
+ $output = array();
+ $has_only = isset( $only[0] );
+ $has_excl = isset( $excl[0] );
+
+ foreach ( $source as $source_key => $source_val ) {
+ if ( is_array( $source_val ) ) {
+ // if $source_val looks like a tuple from flatten_array(), then use the tuple as the key and value
+ $source_key = $source_val[0];
+ $source_val = $source_val[1];
+ }
+ $filter_match = ( $flags & self::NORMALIZE_ARRAY_MATCH_VALUES ) > 0 ? $source_val : $source_key;
+ // if this key is on the "exclude" list, skip it
+ if ( $has_excl && $this->key_matches( $filter_match, $excl ) ) {
+ continue;
+ }
+ // if this key isn't in our "only" list, then skip it
+ if ( $has_only && ! $this->key_matches( $filter_match, $only ) ) {
+ continue;
+ }
+ // otherwise add this key/value to our output
+ $output[] = array( $source_key, $source_val );
+ }
+
+ if ( ( $flags & self::NORMALIZE_ARRAY_COUNT ) > 0 ) {
+ // If we've been told to just count the values, then just count them.
+ $results[] = array(
+ 'name' => (string) $name,
+ 'value' => count( $output ),
+ 'source' => '&' . $name,
+ );
+ } else {
+ foreach ( $output as list( $item_name, $item_value ) ) {
+ $results[] = array(
+ 'name' => (string) $item_name,
+ 'value' => $item_value,
+ 'source' => "$name:$item_name",
+ );
+ }
+ }
+
+ return $results;
+ }
+
+ /**
+ * Given an array of tuples - probably from flatten_array() - return a new array
+ * consisting of only the first value (the key name) from each tuple.
+ *
+ * @param array{0:string, 1:scalar}[] $flat_array An array of tuples.
+ * @return string[]
+ */
+ private function args_names( $flat_array ) {
+ $names = array_map(
+ function ( $tuple ) {
+ return $tuple[0];
+ },
+ $flat_array
+ );
+ return array_unique( $names );
+ }
+
+ /**
+ * Return whether or not a given $input key matches one of the given $patterns.
+ *
+ * @param string $input Key name to test against patterns.
+ * @param string[] $patterns Patterns to test key name with.
+ * @return bool
+ */
+ private function key_matches( $input, $patterns ) {
+ foreach ( $patterns as $p ) {
+ if ( '/' === $p[0] ) {
+ if ( 1 === preg_match( $p, $input ) ) {
+ return true;
+ }
+ } elseif ( 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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-standalone-bootstrap.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-standalone-bootstrap.php
new file mode 100644
index 00000000..7d12c2ad
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-standalone-bootstrap.php
@@ -0,0 +1,171 @@
+guard_against_missing_abspath();
+ $this->initialize_constants();
+ }
+
+ /**
+ * Ensures that this class is not used unless we are in the right context.
+ *
+ * @throws Waf_Exception If we are outside of WordPress.
+ *
+ * @return void
+ */
+ private function guard_against_missing_abspath() {
+
+ if ( ! defined( 'ABSPATH' ) ) {
+ throw new Waf_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.
+ *
+ * Should only be implemented after the wp_loaded action hook:
+ *
+ * @link https://developer.wordpress.org/reference/functions/wp_filesystem/#more-information
+ *
+ * @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.
+ *
+ * @throws Waf_Exception In case the autoloader file can not be found.
+ *
+ * @return string|null
+ */
+ 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 Waf_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.
+ *
+ * @throws File_System_Exception If the filesystem is not available.
+ * @throws File_System_Exception If the WAF directory can not be created.
+ * @throws File_System_Exception If the bootstrap file can not be created.
+ *
+ * @return string Absolute path to the bootstrap file.
+ */
+ public function generate() {
+
+ $this->initialize_filesystem();
+
+ global $wp_filesystem;
+ if ( ! $wp_filesystem ) {
+ throw new File_System_Exception( 'Can not work without the file system being initialized.' );
+ }
+
+ $autoloader_file = $this->locate_autoloader_file();
+
+ $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 = "is_dir( JETPACK_WAF_DIR ) ) {
+ if ( ! $wp_filesystem->mkdir( JETPACK_WAF_DIR ) ) {
+ throw new File_System_Exception( 'Failed creating WAF standalone bootstrap file directory: ' . JETPACK_WAF_DIR );
+ }
+ }
+
+ if ( ! $wp_filesystem->put_contents( $bootstrap_file, $code ) ) {
+ throw new File_System_Exception( 'Failed writing WAF standalone bootstrap file to: ' . $bootstrap_file );
+ }
+
+ return $bootstrap_file;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-stats.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-stats.php
new file mode 100644
index 00000000..a0bc7bae
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-stats.php
@@ -0,0 +1,68 @@
+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/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-file-system-exception.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-file-system-exception.php
new file mode 100644
index 00000000..59631e8c
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-file-system-exception.php
@@ -0,0 +1,23 @@
+getMessage() );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/functions.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/functions.php
new file mode 100644
index 00000000..554f1053
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/functions.php
@@ -0,0 +1,70 @@
+ [ "x" => [ "y" => "..." ] ] ]
+ * However, modsecurity (and thus our WAF rules) expect the original (non-nested) names.
+ *
+ * Therefore, this method takes an array of any depth and returns a single-depth array with nested
+ * keys translated back to a single string with brackets.
+ *
+ * Because there might be multiple items with the same name, this function will return an array of tuples,
+ * with the first item in the tuple the re-created original field name, and the second item the value.
+ *
+ * @example
+ * flatten_array( [ "field1" => "abc", "field2" => [ "d", "e", "f" ] ] )
+ * => [
+ * [ "field1", "abc" ],
+ * [ "field2[0]", "d" ],
+ * [ "field2[1]", "e" ],
+ * [ "field2[2]", "f" ],
+ * ]
+ *
+ * @param array $array An array that resembles one of the PHP superglobals like $_GET or $_POST.
+ * @param string $key_prefix String that should be prepended to the keys output by this function.
+ * Usually only used internally as part of recursion when flattening a nested array.
+ * @return array{ 0: string, 1: scalar }[] $key_prefix An array of key/value tuples, one for each distinct value in the input array.
+ */
+function flatten_array( $array, $key_prefix = '' ) {
+ $return = array();
+ foreach ( $array as $source_key => $source_value ) {
+ $key = ( '' === $key_prefix )
+ // if this is the first level, the key name isn't enclosed in brackets
+ ? $source_key
+ // for every level after the first, enclose the key name in brackets.
+ : $key_prefix . '[' . $source_key . ']';
+ if ( ! is_array( $source_value ) ) {
+ $return[] = array( $key, $source_value );
+ } else {
+ $return = array_merge( $return, flatten_array( $source_value, $key ) );
+ }
+ }
+ return $return;
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/i18n-map.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/i18n-map.php
new file mode 100644
index 00000000..6d145e0a
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/i18n-map.php
@@ -0,0 +1,64 @@
+ 'jetpack-protect',
+ 'type' => 'plugins',
+ 'packages' => array(
+ 'jetpack-admin-ui' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-admin-ui',
+ 'ver' => '0.2.23',
+ ),
+ 'jetpack-assets' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-assets',
+ 'ver' => '1.18.13',
+ ),
+ 'jetpack-config' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-config',
+ 'ver' => '1.15.4',
+ ),
+ 'jetpack-connection' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-connection',
+ 'ver' => '1.58.2',
+ ),
+ 'jetpack-idc' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-identity-crisis',
+ 'ver' => '0.11.1',
+ ),
+ 'jetpack-ip' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-ip',
+ 'ver' => '0.1.6',
+ ),
+ 'jetpack-jitm' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-jitm',
+ 'ver' => '2.5.1',
+ ),
+ 'jetpack-licensing' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-licensing',
+ 'ver' => '1.8.4',
+ ),
+ 'jetpack-my-jetpack' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-my-jetpack',
+ 'ver' => '3.9.1',
+ ),
+ 'jetpack-password-checker' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-password-checker',
+ 'ver' => '0.2.14',
+ ),
+ 'jetpack-plugins-installer' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-plugins-installer',
+ 'ver' => '0.2.5',
+ ),
+ 'jetpack-sync' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-sync',
+ 'ver' => '1.58.1',
+ ),
+ 'jetpack-transport-helper' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-transport-helper',
+ 'ver' => '0.1.6',
+ ),
+ 'jetpack-waf' => array(
+ 'path' => 'jetpack_vendor/automattic/jetpack-waf',
+ 'ver' => '0.11.13',
+ ),
+ ),
+);
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/readme.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/readme.txt
new file mode 100644
index 00000000..8758dbe8
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/readme.txt
@@ -0,0 +1,167 @@
+=== Jetpack Protect ===
+Contributors: automattic, retrofox, leogermani, renatoagds, bjorsch, ebinnion, fgiannar, zinigor, miguelxavierpenha, dsmart, jeherve, manzoorwanijk, njweller, oskosk, samiff, siddarthan, wpkaren, arsihasi, kraftbj, kev, sermitr, kangzj, pabline, dkmyta
+Tags: jetpack, protect, security, malware, scan
+Requires at least: 6.2
+Requires PHP: 5.6
+Tested up to: 6.3
+Stable tag: 1.4.2
+License: GPLv2 or later
+License URI: http://www.gnu.org/licenses/gpl-2.0.html
+
+Free daily malware scanning and WordPress site security. Jetpack Protect leverages the extensive database of WPScan, an Automattic brand, that has over 25,000 registered malware and vulnerabilities. No configuration required!
+
+== Description ==
+
+== TOTAL SITE SECURITY FROM WORDPRESS EXPERTS ==
+
+Jetpack Protect is a free and essential WordPress security plugin that scans your site and warns you about vulnerabilities, keeping your site one step ahead of security threats. It’s easy to use; setup requires just a few clicks!
+
+By upgrading Protect, you also unlock malware scanning with one-click fixes for most issues and instant notifications when threats are detected. Our automated Web Application Firewall (WAF) also protects your site from bad actors around the clock.
+
+Jetpack Protect is created by WordPress experts; our parent company Automattic is behind Jetpack, WordPress.com, WooCommerce, WPScan, and much more. There is no better company to understand the security needs of WordPress sites.
+
+== WHAT DOES JETPACK PROTECT (FREE) CHECK FOR? ==
+
+Jetpack Protect scans your site on a daily basis and warns you about:
+- The version of WordPress installed, and any associated vulnerabilities
+- What plugins are installed, and any related vulnerabilities
+- What themes are installed, and any associated vulnerabilities
+
+= What are vulnerabilities? Why do I need to scan my site regularly? =
+Site vulnerabilities are flaws in a website's code that weaken the site's overall security. These can be introduced to a site in various ways, in most cases unintentionally.
+
+Some of the ways vulnerabilities can be introduced to a site are:
+- Poorly written site code
+- Plugin and theme bugs
+- WordPress version bugs
+- System misconfigurations
+
+If a bad actor detects a vulnerability on your site, they can exploit it to access sensitive information, update your site, and more to damage your business or brand.
+
+That’s why it’s essential to use a reputable and reliable vulnerability & malware site scanner like Jetpack Protect to safeguard your site.
+
+= Can I use Jetpack Scan to fix a site that is already infected? =
+
+Jetpack Protect (Scan) detects and prevents attacks, but is not designed to fully clean up sites infected before it was active. If your site has malware, take immediate action to clean it up and remove the malicious code.
+
+To clean up your site, we suggest using a malware removal tool, or if possible restore from a backup taken before the infection. We recommend using Jetpack VaultPress Backup in conjunction with Jetpack Scan to secure your website.
+
+[Learn more about cleaning your site](https://jetpack.com/support/scan/how-to-clean-your-hacked-wordpress-site/)
+
+== UPGRADE PROTECT TO REMOVE MALWARE IN ONE CLICK AND BE PROTECTED BY OUR WAF ==
+By upgrading Protect, you unlock total site security from WordPress experts:
+- Automated daily malware scanning in addition to vulnerability checks
+- One-click fixes for most issues
+- Web Application Firewall (WAF) with automatic rule updates
+- Instant email notifications when threats are detected
+- Priority support from WordPress experts
+
+= What is malware? Why do I need to protect against it? =
+Malware is malicious code or software that has been created by bad actors to disrupt, damage, or gain access to your site. There are many ways that malware can get onto your WordPress site. The most common method is through attackers using vulnerable plugins or themes to install malware.
+
+Similar to the vulnerabilities listed above, bad actors can use malware to capture sensitive information, damage your site, and harm your business or brand.
+
+Jetpack Protect instantly notifies you of any threats detected, with one-click fixes for most issues.
+
+= What is a Web Application Firewall (WAF)? =
+A web application firewall blocks traffic and malicious requests to your site from known bad actors.
+
+As threats are detected, new rules are added to Jetpack Protect’s firewall, which provides around-the-clock protection for your WordPress site.
+
+== OVER 38,393 REGISTERED VULNERABILITIES IN OUR DATABASE ==
+
+WordPress security is something that evolves over time. Jetpack Protect leverages the extensive database of WPScan, an Automattic brand. All vulnerabilities are entered into our database by dedicated WordPress security professionals and updated constantly as new information becomes available.
+
+== JETPACK PROTECT IS EASY TO SETUP AND USE ==
+
+There’s nothing to configure – the setup process is as easy as:
+1. Install and activate the plugin
+2. Set up it with one click.
+
+After you activate the plugin, Jetpack Protect will run daily automatic malware scans on your WordPress site and update you on vulnerabilities associated with your installed plugins, themes, and WordPress core.
+
+== WITH 💚 BY JETPACK ==
+
+This is just the start!
+
+We are working hard to bring more features and improvements to Jetpack Protect. Let us know your thoughts and ideas!
+
+== FURTHER READING ==
+
+- [Jetpack: Security, performance, and growth tools made for WordPress sites by the WordPress experts.](https://jetpack.com/)
+- You can follow the [Jetpack Twitter](https://twitter.com/jetpack?lang=en) account to catch up on our latest WordPress security recommendations and updates.
+- [WordPress Security: How to Protect Your Site From Hackers](https://jetpack.com/blog/category/security/page/3/)
+- [Should You Use Jetpack for WordPress Security?](https://jetpack.com/blog/should-you-use-jetpack-for-wordpress-security/)
+- [Jetpack Acquires WordPress Vulnerability Database WPScan](https://jetpack.com/blog/jetpack-acquires-wordpress-vulnerability-database-wpscan/#more-139339)
+
+== FAQ ==
+
+= How does Jetpack Protect help your WordPress Site security? =
+
+Protect is a free WordPress security and malware scanner plugin that scans your site and lets you know possible malware and security threats on your installed plugins, themes, and core files.
+
+The free plan scans your site for WordPress version, plugin, and theme vulnerabilities from our extensive vulnerability database (38,393) that is powered by WPScan.
+
+By upgrading Protect, you gain access to WordPress malware scanning with one-click fixes, instant threat notifications, and our Web application Firewall (WAF) that protects your site around the clock.
+
+= Does this plugin require the Jetpack plugin to work? =
+
+Jetpack Protect does not require the Jetpack plugin to run and secure your site.
+
+= What are the differences between Jetpack Protect, Jetpack Scan, and WPScan plugins? =
+
+Jetpack Protect is a new WordPress security plugin from Jetpack containing our security features only. You can start with Jetpack Protect’s free vulnerability scanning features and upgrade Jetpack Protect to access automated malware scanning and our web application firewall. By upgrading Protect, you are enabling Jetpack Scan to the plugin.
+
+Jetpack Scan is a product that can be purchased for use in conjunction with the main Jetpack plugin or Jetpack Protect. Jetpack Scan includes automated malware scanning and our web application firewall but does not contain the vulnerability scanning feature from the Protect plugin. If you purchase Jetpack Security or Jetpack Complete, Jetpack Scan is also included in those bundles.
+
+If you are already a Jetpack Scan, Jetpack Security, or Jetpack Complete customer, you can also take advantage of Jetpack Protect’s vulnerability scanning feature by installing the Jetpack Protect plugin.
+
+WPScan is an enterprise vulnerability scanning solution. It is not recommended for small to medium-sized businesses. If you are an enterprise company looking for custom WordPress site protection solutions, please visit: https://wpscan.com/
+
+For small to medium-sized businesses, you can access our vulnerability scanning solution in the Jetpack Protect plugin.
+
+= Will Jetpack Protect work on my local site?
+
+Jetpack Protect requires a publicly accessible site to perform the vulnerability scan.
+
+= How will I know if Jetpack Protect has found WordPress security vulnerabilities and malware? =
+
+You can visit Jetpack Protect dashboard in your WordPress admin panel to see the security threats and malware found by the integrated malware scanner.
+
+= What do I do if Jetpack Protect finds a security threat? =
+
+When the vulnerability scanner finds a security threat, you can view the recommended actions on the Jetpack Protect dashboard to secure your sites.
+
+If you have upgraded Protect, your site will also be automatically scanned for malware each day, and you will be notified instantly via email if any threats are detected. You will be able to fix most issues in one click.
+
+= Can I set the time of the daily security scan? =
+
+It is not possible to set a time for the automated daily scans run by the integrated malware scanner.
+
+= Why do I need WordPress security and malware scan? =
+
+A hacked WordPress site can cause serious damage to your business revenue and reputation. Jetpack Protect scans your site and lets you know possible malware and security threats on your installed plugins, themes, and core files.
+
+= Where can I learn more about WordPress security and malware threats? =
+
+To learn how to achieve better WordPress security, [see this guide](https://jetpack.com/blog/guide-to-wordpress-security/). On the [Jetpack Blog](https://jetpack.com/blog/category/security/), you can find many more articles written by the top WordPress security experts.
+
+= Is Jetpack Protect the same thing as the Protect feature in the Jetpack plugin?
+
+The new Jetpack Protect plugin is different from the Jetpack feature formerly known as [Protect](https://jetpack.com/support/protect/) (now renamed [Brute Force Attack Protection](https://jetpack.com/support/protect/)).
+
+== Screenshots ==
+
+1. Focus on running your business while Jetpack Protect automatically scans your site.
+2. Keep your site one step ahead of security threats and malware.
+3. View all the found vulnerabilities in your site and learn how to fix them.
+4. The Jetpack Firewall is a web application firewall (known as WAF) designed to protect your WordPress site from malicious requests.
+
+== Changelog ==
+### 1.4.2 - 2023-10-19
+#### Changed
+- General: update WordPress version requirements to WordPress 6.2. [#32762]
+- Updated Jetpack submenu sort order so individual features are alpha-sorted.
+- Updated method used to render Connection initial state.
+- Updated package dependencies.
+
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-credentials.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-credentials.php
new file mode 100644
index 00000000..1e72b467
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-credentials.php
@@ -0,0 +1,55 @@
+is_connected();
+
+ if ( ! $blog_id || ! $is_connected ) {
+ return false;
+ }
+
+ $api_url = sprintf( '/sites/%d/scan', $blog_id );
+
+ $response = Client::wpcom_json_api_request_as_blog(
+ $api_url,
+ '2',
+ array( 'method' => 'GET' ),
+ null,
+ 'wpcom'
+ );
+
+ $response_code = wp_remote_retrieve_response_code( $response );
+
+ if ( is_wp_error( $response ) || 200 !== $response_code ) {
+ return false;
+ }
+
+ $parsed_response = json_decode( $response['body'] );
+
+ if ( ! $parsed_response ) {
+ return false;
+ }
+
+ return isset( $parsed_response->credentials ) ? $parsed_response->credentials : array();
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-jetpack-protect.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-jetpack-protect.php
new file mode 100644
index 00000000..52e2bb30
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-jetpack-protect.php
@@ -0,0 +1,456 @@
+ensure(
+ 'connection',
+ array(
+ 'slug' => JETPACK_PROTECT_SLUG,
+ 'name' => JETPACK_PROTECT_NAME,
+ 'url_info' => JETPACK_PROTECT_URI,
+ )
+ );
+ // Sync package.
+ $config->ensure(
+ 'sync',
+ array(
+ 'jetpack_sync_modules' => array(
+ 'Automattic\\Jetpack\\Sync\\Modules\\Options',
+ 'Automattic\\Jetpack\\Sync\\Modules\\Callables',
+ 'Automattic\\Jetpack\\Sync\\Modules\\Users',
+ ),
+ 'jetpack_sync_callable_whitelist' => array(
+ 'main_network_site' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'main_network_site_url' ),
+ 'get_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins' ),
+ 'get_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_themes' ),
+ 'wp_version' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'wp_version' ),
+ ),
+ 'jetpack_sync_options_contentless' => array(),
+ 'jetpack_sync_options_whitelist' => array(
+ 'active_plugins',
+ 'stylesheet',
+ ),
+ )
+ );
+
+ // Identity crisis package.
+ $config->ensure( 'identity_crisis' );
+
+ // Web application firewall package.
+ $config->ensure( 'waf' );
+ },
+ 1
+ );
+
+ add_filter( 'jetpack_connection_user_has_license', array( $this, 'jetpack_check_user_licenses' ), 10, 3 );
+
+ add_filter( 'jetpack_get_available_standalone_modules', array( $this, 'protect_filter_available_modules' ), 10, 1 );
+ }
+
+ /**
+ * Initialize the plugin
+ *
+ * @return void
+ */
+ public function init() {
+ add_action( 'admin_bar_menu', array( $this, 'admin_bar' ), 65 );
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
+
+ REST_Controller::init();
+ My_Jetpack_Initializer::init();
+ Site_Health::init();
+
+ // Sets up JITMS.
+ JITM::configure();
+ }
+
+ /**
+ * Initialize the admin page resources.
+ */
+ public function admin_page_init() {
+ $total_threats = Status::get_total_threats();
+ $menu_label = _x( 'Protect', 'The Jetpack Protect product name, without the Jetpack prefix', 'jetpack-protect' );
+ if ( $total_threats ) {
+ $menu_label .= sprintf( ' %d', $total_threats );
+ }
+
+ $page_suffix = Admin_Menu::add_menu(
+ __( 'Jetpack Protect', 'jetpack-protect' ),
+ $menu_label,
+ 'manage_options',
+ 'jetpack-protect',
+ array( $this, 'plugin_settings_page' )
+ );
+
+ add_action( 'load-' . $page_suffix, array( $this, 'enqueue_admin_scripts' ) );
+ }
+
+ /**
+ * Enqueues the wp-admin styles (used outside the React app)
+ */
+ public function enqueue_admin_styles() {
+ wp_enqueue_style( 'jetpack-protect-wpadmin', JETPACK_PROTECT_BASE_PLUGIN_URL . '/assets/jetpack-protect.css', array(), JETPACK_PROTECT_VERSION );
+ }
+
+ /**
+ * Enqueue plugin admin scripts and styles.
+ */
+ public function enqueue_admin_scripts() {
+
+ Assets::register_script(
+ 'jetpack-protect',
+ 'build/index.js',
+ JETPACK_PROTECT_ROOT_FILE,
+ array(
+ 'in_footer' => true,
+ 'textdomain' => 'jetpack-protect',
+ )
+ );
+ Assets::enqueue_script( 'jetpack-protect' );
+ // Required for Analytics.
+ wp_enqueue_script( 'jp-tracks', '//stats.wp.com/w.js', array(), gmdate( 'YW' ), true );
+ // Initial JS state including JP Connection data.
+ Connection_Initial_State::render_script( 'jetpack-protect' );
+ wp_add_inline_script( 'jetpack-protect', $this->render_initial_state(), 'before' );
+ }
+
+ /**
+ * Render the initial state into a JavaScript variable.
+ *
+ * @return string
+ */
+ public function render_initial_state() {
+ return 'var jetpackProtectInitialState=JSON.parse(decodeURIComponent("' . rawurlencode( wp_json_encode( $this->initial_state() ) ) . '"));';
+ }
+
+ /**
+ * Get the initial state data for hydrating the React UI.
+ *
+ * @return array
+ */
+ public function initial_state() {
+ global $wp_version;
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
+ $refresh_status_from_wpcom = isset( $_GET['checkPlan'] );
+ $initial_state = array(
+ 'apiRoot' => esc_url_raw( rest_url() ),
+ 'apiNonce' => wp_create_nonce( 'wp_rest' ),
+ 'registrationNonce' => wp_create_nonce( 'jetpack-registration-nonce' ),
+ 'status' => Status::get_status( $refresh_status_from_wpcom ),
+ 'installedPlugins' => Plugins_Installer::get_plugins(),
+ 'installedThemes' => Sync_Functions::get_themes(),
+ 'wpVersion' => $wp_version,
+ 'adminUrl' => 'admin.php?page=jetpack-protect',
+ 'siteSuffix' => ( new Jetpack_Status() )->get_site_suffix(),
+ 'jetpackScan' => My_Jetpack_Products::get_product( 'scan' ),
+ 'hasRequiredPlan' => Plan::has_required_plan(),
+ 'waf' => array(
+ 'wafSupported' => Waf_Runner::is_supported_environment(),
+ 'currentIp' => IP_Utils::get_ip(),
+ 'isSeen' => self::get_waf_seen_status(),
+ 'upgradeIsSeen' => self::get_waf_upgrade_seen_status(),
+ 'displayUpgradeBadge' => self::get_waf_upgrade_badge_display_status(),
+ 'isEnabled' => Waf_Runner::is_enabled(),
+ 'isToggling' => false,
+ 'isUpdating' => false,
+ 'config' => Waf_Runner::get_config(),
+ 'stats' => self::get_waf_stats(),
+ ),
+ );
+
+ $initial_state['jetpackScan']['pricingForUi'] = Plan::get_product( 'jetpack_scan' );
+
+ return $initial_state;
+ }
+ /**
+ * Main plugin settings page.
+ */
+ public function plugin_settings_page() {
+ ?>
+
+ is_connected() ) {
+ self::activate_modules();
+ }
+ }
+
+ /**
+ * Activates the waf and brute force protection modules and disables the activation option
+ */
+ public static function activate_modules() {
+ delete_option( self::JETPACK_PROTECT_ACTIVATION_OPTION );
+ ( new Modules() )->activate( self::JETPACK_WAF_MODULE_SLUG, false, false );
+ ( new Modules() )->activate( self::JETPACK_BRUTE_FORCE_PROTECTION_MODULE_SLUG, false, false );
+ }
+
+ /**
+ * 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() {
+
+ // Clear Sync data.
+ Sender::get_instance()->uninstall();
+
+ $manager = new Connection_Manager( 'jetpack-protect' );
+ $manager->remove_connection();
+
+ Status::delete_option();
+ }
+
+ /**
+ * Create a shortcut on Admin Bar to show the total of threats found.
+ *
+ * @param object $wp_admin_bar The Admin Bar object.
+ * @return void
+ */
+ public function admin_bar( $wp_admin_bar ) {
+ if ( ! current_user_can( 'manage_options' ) ) {
+ return;
+ }
+
+ $total = Status::get_total_threats();
+
+ if ( $total > 0 ) {
+ $args = array(
+ 'id' => 'jetpack-protect',
+ 'title' => '' . $total . '',
+ 'href' => admin_url( 'admin.php?page=jetpack-protect' ),
+ 'meta' => array(
+ // translators: %d is the number of threats found.
+ 'title' => sprintf( _n( '%d threat found by Jetpack Protect', '%d threats found by Jetpack Protect', $total, 'jetpack-protect' ), $total ),
+ ),
+ );
+
+ $wp_admin_bar->add_node( $args );
+ }
+ }
+
+ /**
+ * Adds modules to the list of available modules
+ *
+ * @param array $modules The available modules.
+ * @return array
+ */
+ public function protect_filter_available_modules( $modules ) {
+ return array_merge( array( self::JETPACK_WAF_MODULE_SLUG, self::JETPACK_BRUTE_FORCE_PROTECTION_MODULE_SLUG ), $modules );
+ }
+
+ /**
+ * Check if the user has an available license that includes Jetpack Scan.
+ *
+ * @param boolean $has_license Whether a license was already found.
+ * @param object[] $licenses Unattached licenses belonging to the user.
+ * @param string $plugin_slug Slug of the plugin that initiated the flow.
+ *
+ * @return boolean
+ */
+ public static function jetpack_check_user_licenses( $has_license, $licenses, $plugin_slug ) {
+ if ( $plugin_slug !== JETPACK_PROTECT_SLUG || $has_license ) {
+ return $has_license;
+ }
+
+ $license_found = false;
+
+ foreach ( $licenses as $license ) {
+ if ( $license->attached_at || $license->revoked_at ) {
+ continue;
+ }
+
+ if ( in_array( $license->product_id, self::JETPACK_SCAN_PRODUCT_IDS, true ) ) {
+ $license_found = true;
+ break;
+ }
+ }
+
+ return $license_found;
+ }
+
+ /**
+ * Get WAF "Seen" Status
+ *
+ * @return bool Whether the current user has viewed the WAF screen.
+ */
+ public static function get_waf_seen_status() {
+ return (bool) get_user_meta( get_current_user_id(), 'jetpack_protect_waf_seen', true );
+ }
+
+ /**
+ * Set WAF "Seen" Status
+ *
+ * @return bool True if seen status updated to true, false on failure.
+ */
+ public static function set_waf_seen_status() {
+ return (bool) update_user_meta( get_current_user_id(), 'jetpack_protect_waf_seen', true );
+ }
+
+ /**
+ * Get WAF Upgrade "Seen" Status
+ *
+ * @return bool Whether the current user has dismissed the upgrade popover or enabled the automatic rules feature.
+ */
+ public static function get_waf_upgrade_seen_status() {
+ return (bool) get_user_meta( get_current_user_id(), 'jetpack_protect_waf_upgrade_seen', true );
+ }
+
+ /**
+ * Set WAF Upgrade "Seen" Status
+ *
+ * @return bool True if upgrade seen status updated to true, false on failure.
+ */
+ public static function set_waf_upgrade_seen_status() {
+ self::set_waf_upgrade_badge_timestamp();
+ return (bool) update_user_meta( get_current_user_id(), 'jetpack_protect_waf_upgrade_seen', true );
+ }
+
+ /**
+ * Get WAF Upgrade Badge Timestamp
+ *
+ * @return integer The timestamp for the when the upgrade seen status was first set to true.
+ */
+ public static function get_waf_upgrade_badge_timestamp() {
+ return (int) get_user_meta( get_current_user_id(), 'jetpack_protect_waf_upgrade_badge_timestamp', true );
+ }
+
+ /**
+ * Set WAF Upgrade Badge Timestamp
+ *
+ * @return bool True if upgrade badge timestamp to set to the current time, false on failure.
+ */
+ public static function set_waf_upgrade_badge_timestamp() {
+ return (bool) update_user_meta( get_current_user_id(), 'jetpack_protect_waf_upgrade_badge_timestamp', time() );
+ }
+
+ /**
+ * Get WAF Upgrade Badge Display Status
+ *
+ * @return bool True if upgrade badge timestamp is set and less than 7 days ago, otherwise false.
+ */
+ public static function get_waf_upgrade_badge_display_status() {
+ $badge_timestamp_exists = metadata_exists( 'user', get_current_user_id(), 'jetpack_protect_waf_upgrade_badge_timestamp' );
+ if ( ! $badge_timestamp_exists ) {
+ return true;
+ }
+
+ $badge_timestamp = self::get_waf_upgrade_badge_timestamp();
+ $seven_days = strtotime( '-7 days' );
+ if ( $badge_timestamp > $seven_days ) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Get WAF stats
+ *
+ * @return bool|array False if WAF is not enabled, otherwise an array of stats.
+ */
+ public static function get_waf_stats() {
+ if ( ! Waf_Runner::is_enabled() ) {
+ return false;
+ }
+
+ return array(
+ 'ipAllowListCount' => Waf_Stats::get_ip_allow_list_count(),
+ 'ipBlockListCount' => Waf_Stats::get_ip_block_list_count(),
+ 'rulesVersion' => Waf_Stats::get_rules_version(),
+ 'automaticRulesLastUpdated' => Waf_Stats::get_automatic_rules_last_updated(),
+ );
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-plan.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-plan.php
new file mode 100644
index 00000000..936f2885
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-plan.php
@@ -0,0 +1,111 @@
+ ( self::CACHE_VALIDITY_PERIOD );
+ }
+
+ /**
+ * Gets the product list from the user cache
+ */
+ private static function get_product_from_cache() {
+ return get_user_meta( get_current_user_id(), self::CACHE_META_NAME, true );
+ }
+
+ /**
+ * Gets the product data
+ *
+ * @param string $wpcom_product The product slug.
+ * @return array
+ */
+ public static function get_product( $wpcom_product = 'jetpack_scan' ) {
+ if ( ! self::is_cache_old() ) {
+ return self::get_product_from_cache();
+ }
+
+ $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 ) );
+
+ // Pick the desired product...
+ $product = $products->{$wpcom_product};
+
+ // ... and store it into the cache.
+ update_user_meta( get_current_user_id(), self::CACHE_DATE_META_NAME, time() );
+ update_user_meta( get_current_user_id(), self::CACHE_META_NAME, $product );
+
+ return $product;
+ }
+
+ return new \WP_Error(
+ 'failed_to_fetch_data',
+ esc_html__( 'Unable to fetch the requested data.', 'jetpack-protect' ),
+ array(
+ 'status' => $response_code,
+ 'request' => $wpcom_request,
+ )
+ );
+ }
+
+ /**
+ * Has Required Plan
+ *
+ * @param bool $force_refresh Refresh the local plan cache from wpcom.
+ * @return bool True when the site has a plan or product that supports the paid Protect tier.
+ */
+ public static function has_required_plan( $force_refresh = false ) {
+ static $has_scan = null;
+ if ( null === $has_scan || $force_refresh ) {
+ $products = array_column( Current_Plan::get_products(), 'product_slug' );
+
+ // Check for a plan or product that enables scan.
+ $plan_supports_scan = Current_Plan::supports( 'scan', true );
+ $has_scan_product = count( array_intersect( array( 'jetpack_scan', 'jetpack_scan_monthly' ), $products ) ) > 0;
+ $has_scan = $plan_supports_scan || $has_scan_product;
+ }
+
+ return $has_scan;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-protect-status.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-protect-status.php
new file mode 100644
index 00000000..97d4b3a2
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-protect-status.php
@@ -0,0 +1,258 @@
+ true,
+ 'error_code' => $status->get_error_code(),
+ 'error_message' => $status->get_error_message(),
+ )
+ );
+ } else {
+ $status = self::normalize_protect_report_data( $status );
+ }
+
+ self::$status = $status;
+ return $status;
+ }
+
+ /**
+ * Gets the WPCOM API endpoint
+ *
+ * @return WP_Error|string
+ */
+ public static function get_api_url() {
+ $blog_id = Jetpack_Options::get_option( 'id' );
+ $is_connected = ( new Connection_Manager() )->is_connected();
+
+ if ( ! $blog_id || ! $is_connected ) {
+ return new WP_Error( 'site_not_connected' );
+ }
+
+ $api_url = sprintf( self::REST_API_BASE, $blog_id );
+
+ return $api_url;
+ }
+
+ /**
+ * Fetches the status from WPCOM servers
+ *
+ * @return WP_Error|array
+ */
+ public static function fetch_from_server() {
+ $api_url = self::get_api_url();
+ if ( is_wp_error( $api_url ) ) {
+ return $api_url;
+ }
+
+ $response = Client::wpcom_json_api_request_as_blog(
+ self::get_api_url(),
+ '2',
+ array( 'method' => 'GET' ),
+ null,
+ 'wpcom'
+ );
+
+ $response_code = wp_remote_retrieve_response_code( $response );
+
+ if ( is_wp_error( $response ) || 200 !== $response_code || empty( $response['body'] ) ) {
+ return new WP_Error( 'failed_fetching_status', 'Failed to fetch Protect Status data from server', array( 'status' => $response_code ) );
+ }
+
+ $body = json_decode( wp_remote_retrieve_body( $response ) );
+ self::update_status_option( $body );
+ return $body;
+ }
+
+ /**
+ * Normalize data from the Protect Report data source.
+ *
+ * @param object $report_data Data from the Protect Report.
+ * @return Status_Model
+ */
+ protected static function normalize_protect_report_data( $report_data ) {
+ $status = new Status_Model();
+ $status->data_source = 'protect_report';
+
+ // map report data properties directly into the Status_Model
+ $status->status = isset( $report_data->status ) ? $report_data->status : null;
+ $status->last_checked = isset( $report_data->last_checked ) ? $report_data->last_checked : null;
+ $status->num_threats = isset( $report_data->num_vulnerabilities ) ? $report_data->num_vulnerabilities : null;
+ $status->num_themes_threats = isset( $report_data->num_themes_vulnerabilities ) ? $report_data->num_themes_vulnerabilities : null;
+ $status->num_plugins_threats = isset( $report_data->num_plugins_vulnerabilities ) ? $report_data->num_plugins_vulnerabilities : null;
+
+ // merge plugins from report with all installed plugins before mapping into the Status_Model
+ $installed_plugins = Plugins_Installer::get_plugins();
+ $last_report_plugins = isset( $report_data->plugins ) ? $report_data->plugins : new \stdClass();
+ $status->plugins = self::merge_installed_and_checked_lists( $installed_plugins, $last_report_plugins, array( 'type' => 'plugins' ) );
+
+ // merge themes from report with all installed plugins before mapping into the Status_Model
+ $installed_themes = Sync_Functions::get_themes();
+ $last_report_themes = isset( $report_data->themes ) ? $report_data->themes : new \stdClass();
+ $status->themes = self::merge_installed_and_checked_lists( $installed_themes, $last_report_themes, array( 'type' => 'themes' ) );
+
+ // normalize WordPress core report data and map into Status_Model
+ $status->core = self::normalize_core_information( isset( $report_data->core ) ? $report_data->core : new \stdClass() );
+
+ // check if any installed items (themes, plugins, or core) have not been checked in the report
+ $all_items = array_merge( $status->plugins, $status->themes, array( $status->core ) );
+ $unchecked_items = array_filter(
+ $all_items,
+ function ( $item ) {
+ return ! isset( $item->checked ) || ! $item->checked;
+ }
+ );
+ $status->has_unchecked_items = ! empty( $unchecked_items );
+
+ return $status;
+ }
+
+ /**
+ * Merges the list of installed extensions with the list of extensions that were checked for known vulnerabilities and return a normalized list to be used in the UI
+ *
+ * @param array $installed The list of installed extensions, where each attribute key is the extension slug.
+ * @param object $checked The list of checked extensions.
+ * @param array $append Additional data to append to each result in the list.
+ * @return array Normalized list of extensions.
+ */
+ protected static function merge_installed_and_checked_lists( $installed, $checked, $append ) {
+ $new_list = array();
+ foreach ( array_keys( $installed ) as $slug ) {
+
+ $checked = (object) $checked;
+
+ $extension = new Extension_Model(
+ array_merge(
+ array(
+ 'name' => $installed[ $slug ]['Name'],
+ 'version' => $installed[ $slug ]['Version'],
+ 'slug' => $slug,
+ 'threats' => array(),
+ 'checked' => false,
+ ),
+ $append
+ )
+ );
+
+ if ( isset( $checked->{ $slug } ) && $checked->{ $slug }->version === $installed[ $slug ]['Version'] ) {
+ $extension->version = $checked->{ $slug }->version;
+ $extension->checked = true;
+
+ if ( is_array( $checked->{ $slug }->vulnerabilities ) ) {
+ foreach ( $checked->{ $slug }->vulnerabilities as $threat ) {
+ $extension->threats[] = new Threat_Model(
+ array(
+ 'id' => $threat->id,
+ 'title' => $threat->title,
+ 'fixed_in' => $threat->fixed_in,
+ 'description' => isset( $threat->description ) ? $threat->description : null,
+ 'source' => isset( $threat->id ) ? Redirect::get_url( 'jetpack-protect-vul-info', array( 'path' => $threat->id ) ) : null,
+ )
+ );
+ }
+ }
+ }
+
+ $new_list[] = $extension;
+
+ }
+
+ $new_list = parent::sort_threats( $new_list );
+
+ return $new_list;
+ }
+
+ /**
+ * Check if the WordPress version that was checked matches the current installed version.
+ *
+ * @param object $core_check The object returned by Protect wpcom endpoint.
+ * @return object The object representing the current status of core checks.
+ */
+ protected static function normalize_core_information( $core_check ) {
+ global $wp_version;
+
+ $core = new Extension_Model(
+ array(
+ 'type' => 'core',
+ 'name' => 'WordPress',
+ 'version' => $wp_version,
+ 'checked' => false,
+ )
+ );
+
+ if ( isset( $core_check->version ) && $core_check->version === $wp_version ) {
+ if ( is_array( $core_check->vulnerabilities ) ) {
+ $core->checked = true;
+ $core->set_threats(
+ array_map(
+ function ( $vulnerability ) {
+ $vulnerability->source = isset( $vulnerability->id ) ? Redirect::get_url( 'jetpack-protect-vul-info', array( 'path' => $vulnerability->id ) ) : null;
+ return $vulnerability;
+ },
+ $core_check->vulnerabilities
+ )
+ );
+ }
+ }
+
+ return $core;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-rest-controller.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-rest-controller.php
new file mode 100644
index 00000000..a1f36322
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-rest-controller.php
@@ -0,0 +1,427 @@
+ \WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::api_check_plan',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'status',
+ array(
+ 'methods' => \WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::api_get_status',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'clear-scan-cache',
+ array(
+ 'methods' => \WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::api_clear_scan_cache',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'ignore-threat',
+ array(
+ 'methods' => \WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::api_ignore_threat',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'fix-threats',
+ array(
+ 'methods' => \WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::api_fix_threats',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'fix-threats-status',
+ array(
+ 'methods' => \WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::api_fix_threats_status',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'check-credentials',
+ array(
+ 'methods' => \WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::api_check_credentials',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'scan',
+ array(
+ 'methods' => \WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::api_scan',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'toggle-waf',
+ array(
+ 'methods' => \WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::api_toggle_waf',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'waf',
+ array(
+ 'methods' => \WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::api_get_waf',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'waf-seen',
+ array(
+ 'methods' => \WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::api_get_waf_seen_status',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'waf-seen',
+ array(
+ 'methods' => \WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::api_set_waf_seen_status',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'waf-upgrade-seen',
+ array(
+ 'methods' => \WP_REST_Server::READABLE,
+ 'callback' => __CLASS__ . '::api_get_waf_upgrade_seen_status',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'jetpack-protect/v1',
+ 'waf-upgrade-seen',
+ array(
+ 'methods' => \WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::api_set_waf_upgrade_seen_status',
+ 'permission_callback' => function () {
+ return current_user_can( 'manage_options' );
+ },
+ )
+ );
+ }
+
+ /**
+ * Return site plan data for the API endpoint
+ *
+ * @return WP_REST_Response
+ */
+ public static function api_check_plan() {
+ $has_required_plan = Plan::has_required_plan();
+
+ return rest_ensure_response( $has_required_plan, 200 );
+ }
+
+ /**
+ * Return Protect Status for the API endpoint
+ *
+ * @param WP_REST_Request $request The request object.
+ *
+ * @return WP_REST_Response
+ */
+ public static function api_get_status( $request ) {
+ $status = Status::get_status( $request['hard_refresh'] );
+ return rest_ensure_response( $status, 200 );
+ }
+
+ /**
+ * Clear the Scan_Status cache for the API endpoint
+ *
+ * @return WP_REST_Response
+ */
+ public static function api_clear_scan_cache() {
+ $cache_cleared = Scan_Status::delete_option();
+
+ if ( ! $cache_cleared ) {
+ return new WP_REST_Response( 'An error occured while attempting to clear the Jetpack Scan cache.', 500 );
+ }
+
+ return new WP_REST_Response( 'Jetpack Scan cache cleared.' );
+ }
+
+ /**
+ * Ignores a threat for the API endpoint
+ *
+ * @param WP_REST_Request $request The request object.
+ *
+ * @return WP_REST_Response
+ */
+ public static function api_ignore_threat( $request ) {
+ if ( ! $request['threat_id'] ) {
+ return new WP_REST_Response( 'Missing threat ID.', 400 );
+ }
+
+ $threat_ignored = Threats::ignore_threat( $request['threat_id'] );
+
+ if ( ! $threat_ignored ) {
+ return new WP_REST_Response( 'An error occured while attempting to ignore the threat.', 500 );
+ }
+
+ return new WP_REST_Response( 'Threat ignored.' );
+ }
+
+ /**
+ * Fixes threats for the API endpoint
+ *
+ * @param WP_REST_Request $request The request object.
+ *
+ * @return WP_REST_Response
+ */
+ public static function api_fix_threats( $request ) {
+ if ( empty( $request['threat_ids'] ) ) {
+ return new WP_REST_Response( 'Missing threat IDs.', 400 );
+ }
+
+ $threats_fixed = Threats::fix_threats( $request['threat_ids'] );
+
+ if ( ! $threats_fixed ) {
+ return new WP_REST_Response( 'An error occured while attempting to fix the threat.', 500 );
+ }
+
+ return new WP_REST_Response( $threats_fixed );
+ }
+
+ /**
+ * Fixes threats for the API endpoint
+ *
+ * @param WP_REST_Request $request The request object.
+ *
+ * @return WP_REST_Response
+ */
+ public static function api_fix_threats_status( $request ) {
+ if ( empty( $request['threat_ids'] ) ) {
+ return new WP_REST_Response( 'Missing threat IDs.', 400 );
+ }
+
+ $threats_fixed = Threats::fix_threats_status( $request['threat_ids'] );
+
+ if ( ! $threats_fixed ) {
+ return new WP_REST_Response( 'An error occured while attempting to get the fixer status of the threats.', 500 );
+ }
+
+ return new WP_REST_Response( $threats_fixed );
+ }
+
+ /**
+ * Checks if the site has credentials configured
+ *
+ * @return WP_REST_Response
+ */
+ public static function api_check_credentials() {
+ $credential_array = Credentials::get_credential_array();
+
+ if ( ! isset( $credential_array ) ) {
+ return new WP_REST_Response( 'An error occured while attempting to fetch the credentials array', 500 );
+ }
+
+ return new WP_REST_Response( $credential_array );
+ }
+
+ /**
+ * Enqueues a scan for the API endpoint
+ *
+ * @return WP_REST_Response
+ */
+ public static function api_scan() {
+ $scan_enqueued = Threats::scan();
+
+ if ( ! $scan_enqueued ) {
+ return new WP_REST_Response( 'An error occured while attempting to enqueue the scan.', 500 );
+ }
+
+ return new WP_REST_Response( 'Scan enqueued.' );
+ }
+
+ /**
+ * Toggles the WAF module on or off for the API endpoint
+ *
+ * @return WP_REST_Response|WP_Error
+ */
+ public static function api_toggle_waf() {
+ if ( Waf_Runner::is_enabled() ) {
+ $disabled = Waf_Runner::disable();
+ if ( ! $disabled ) {
+ return new WP_Error(
+ 'waf_disable_failed',
+ __( 'An error occured disabling the firewall.', 'jetpack-protect' ),
+ array( 'status' => 500 )
+ );
+ }
+
+ return rest_ensure_response( true );
+ }
+
+ $enabled = Waf_Runner::enable();
+ if ( ! $enabled ) {
+ return new WP_Error(
+ 'waf_enable_failed',
+ __( 'An error occured enabling the firewall.', 'jetpack-protect' ),
+ array( 'status' => 500 )
+ );
+ }
+
+ return rest_ensure_response( true );
+ }
+
+ /**
+ * Get WAF data for the API endpoint
+ *
+ * @return WP_Rest_Response
+ */
+ public static function api_get_waf() {
+ // Ensure plugin activation has been performed so WAF module is available.
+ Jetpack_Protect::do_plugin_activation_activities();
+
+ return new WP_REST_Response(
+ array(
+ 'is_seen' => Jetpack_Protect::get_waf_seen_status(),
+ 'is_enabled' => Waf_Runner::is_enabled(),
+ 'config' => Waf_Runner::get_config(),
+ 'stats' => Jetpack_Protect::get_waf_stats(),
+ )
+ );
+ }
+
+ /**
+ * Get WAF "Seen" status for the API endpoint
+ *
+ * @return bool Whether the current user has viewed the WAF screen.
+ */
+ public static function api_get_waf_seen_status() {
+ return Jetpack_Protect::get_waf_seen_status();
+ }
+
+ /**
+ * Set WAF "Seen" status for the API endpoint
+ *
+ * @return bool True if seen status updated to true, false on failure.
+ */
+ public static function api_set_waf_seen_status() {
+ return Jetpack_Protect::set_waf_seen_status();
+ }
+
+ /**
+ * Get WAF Upgrade "Seen" Status for the API endpoint
+ *
+ * @return bool Whether the current user has dismissed the upgrade popover or enabled the automatic rules feature.
+ */
+ public static function api_get_waf_upgrade_seen_status() {
+ return Jetpack_Protect::get_waf_upgrade_seen_status();
+ }
+
+ /**
+ * Set WAF Upgrade "Seen" Status for the API endpoint
+ *
+ * @return bool True if upgrade seen status updated to true, false on failure.
+ */
+ public static function api_set_waf_upgrade_seen_status() {
+ return Jetpack_Protect::set_waf_upgrade_seen_status();
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-scan-status.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-scan-status.php
new file mode 100644
index 00000000..125bf550
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-scan-status.php
@@ -0,0 +1,359 @@
+ true,
+ 'error_code' => $status->get_error_code(),
+ 'error_message' => $status->get_error_message(),
+ )
+ );
+ } else {
+ $status = self::normalize_api_data( $status );
+ }
+
+ self::$status = $status;
+ return $status;
+ }
+
+ /**
+ * Gets the Scan API endpoint
+ *
+ * @return WP_Error|string
+ */
+ public static function get_api_url() {
+ $blog_id = Jetpack_Options::get_option( 'id' );
+ $is_connected = ( new Connection_Manager() )->is_connected();
+
+ if ( ! $blog_id || ! $is_connected ) {
+ return new WP_Error( 'site_not_connected' );
+ }
+
+ $api_url = sprintf( self::SCAN_API_BASE, $blog_id );
+
+ return $api_url;
+ }
+
+ /**
+ * Fetches the status data from the Scan API
+ *
+ * @return WP_Error|array
+ */
+ public static function fetch_from_api() {
+ $api_url = self::get_api_url();
+ if ( is_wp_error( $api_url ) ) {
+ return $api_url;
+ }
+
+ $response = Client::wpcom_json_api_request_as_blog(
+ self::get_api_url(),
+ '2',
+ array( 'method' => 'GET' ),
+ null,
+ 'wpcom'
+ );
+
+ $response_code = wp_remote_retrieve_response_code( $response );
+
+ if ( is_wp_error( $response ) || 200 !== $response_code || empty( $response['body'] ) ) {
+ return new WP_Error( 'failed_fetching_status', 'Failed to fetch Scan data from the server', array( 'status' => $response_code ) );
+ }
+
+ $body = json_decode( wp_remote_retrieve_body( $response ) );
+ self::update_status_option( $body );
+ return $body;
+ }
+
+ /**
+ * Normalize API Data
+ * Formats the payload from the Scan API into an instance of Status_Model.
+ *
+ * @param object $scan_data The data returned by the scan API.
+ *
+ * @return Status_Model
+ */
+ private static function normalize_api_data( $scan_data ) {
+ global $wp_version;
+
+ $status = new Status_Model();
+ $status->data_source = 'scan_api';
+ $status->status = isset( $scan_data->state ) ? $scan_data->state : null;
+ $status->num_threats = 0;
+ $status->num_themes_threats = 0;
+ $status->num_plugins_threats = 0;
+ $status->has_unchecked_items = false;
+ $status->current_progress = isset( $scan_data->current->progress ) ? $scan_data->current->progress : null;
+
+ if ( ! empty( $scan_data->most_recent->timestamp ) ) {
+ $date = new \DateTime( $scan_data->most_recent->timestamp );
+ if ( $date ) {
+ $status->last_checked = $date->format( 'Y-m-d H:i:s' );
+ }
+ }
+
+ $status->core = new Extension_Model(
+ array(
+ 'type' => 'core',
+ 'name' => 'WordPress',
+ 'version' => $wp_version,
+ 'checked' => true, // to do: default to false once Scan API has manifest
+ )
+ );
+
+ if ( isset( $scan_data->threats ) && is_array( $scan_data->threats ) ) {
+ foreach ( $scan_data->threats as $threat ) {
+ if ( isset( $threat->extension->type ) ) {
+ if ( 'plugin' === $threat->extension->type ) {
+ // add the extension if it does not yet exist in the status
+ if ( ! isset( $status->plugins[ $threat->extension->slug ] ) ) {
+ $status->plugins[ $threat->extension->slug ] = new Extension_Model(
+ array(
+ 'name' => isset( $threat->extension->name ) ? $threat->extension->name : null,
+ 'slug' => isset( $threat->extension->slug ) ? $threat->extension->slug : null,
+ 'version' => isset( $threat->extension->version ) ? $threat->extension->version : null,
+ 'type' => 'plugin',
+ 'checked' => true,
+ 'threats' => array(),
+ )
+ );
+ }
+
+ $status->plugins[ $threat->extension->slug ]->threats[] = new Threat_Model(
+ array(
+ 'id' => isset( $threat->id ) ? $threat->id : null,
+ 'signature' => isset( $threat->signature ) ? $threat->signature : null,
+ 'title' => isset( $threat->title ) ? $threat->title : null,
+ 'description' => isset( $threat->description ) ? $threat->description : null,
+ 'vulnerability_description' => isset( $threat->vulnerability_description ) ? $threat->vulnerability_description : null,
+ 'fix_description' => isset( $threat->fix_description ) ? $threat->fix_description : null,
+ 'payload_subtitle' => isset( $threat->payload_subtitle ) ? $threat->payload_subtitle : null,
+ 'payload_description' => isset( $threat->payload_description ) ? $threat->payload_description : null,
+ 'first_detected' => isset( $threat->first_detected ) ? $threat->first_detected : null,
+ 'fixed_in' => isset( $threat->fixer->fixer ) && 'update' === $threat->fixer->fixer ? $threat->fixer->target : null,
+ 'severity' => isset( $threat->severity ) ? $threat->severity : null,
+ 'fixable' => isset( $threat->fixer ) ? $threat->fixer : null,
+ 'status' => isset( $threat->status ) ? $threat->status : null,
+ 'filename' => isset( $threat->filename ) ? $threat->filename : null,
+ 'context' => isset( $threat->context ) ? $threat->context : null,
+ 'source' => isset( $threat->source ) ? $threat->source : null,
+ )
+ );
+ ++$status->num_threats;
+ ++$status->num_plugins_threats;
+ continue;
+ }
+
+ if ( 'theme' === $threat->extension->type ) {
+ // add the extension if it does not yet exist in the status
+ if ( ! isset( $status->themes[ $threat->extension->slug ] ) ) {
+ $status->themes[ $threat->extension->slug ] = new Extension_Model(
+ array(
+ 'name' => isset( $threat->extension->name ) ? $threat->extension->name : null,
+ 'slug' => isset( $threat->extension->slug ) ? $threat->extension->slug : null,
+ 'version' => isset( $threat->extension->version ) ? $threat->extension->version : null,
+ 'type' => 'theme',
+ 'checked' => true,
+ 'threats' => array(),
+ )
+ );
+ }
+
+ $status->themes[ $threat->extension->slug ]->threats[] = new Threat_Model(
+ array(
+ 'id' => isset( $threat->id ) ? $threat->id : null,
+ 'signature' => isset( $threat->signature ) ? $threat->signature : null,
+ 'title' => isset( $threat->title ) ? $threat->title : null,
+ 'description' => isset( $threat->description ) ? $threat->description : null,
+ 'vulnerability_description' => isset( $threat->vulnerability_description ) ? $threat->vulnerability_description : null,
+ 'fix_description' => isset( $threat->fix_description ) ? $threat->fix_description : null,
+ 'payload_subtitle' => isset( $threat->payload_subtitle ) ? $threat->payload_subtitle : null,
+ 'payload_description' => isset( $threat->payload_description ) ? $threat->payload_description : null,
+ 'first_detected' => isset( $threat->first_detected ) ? $threat->first_detected : null,
+ 'fixed_in' => isset( $threat->fixer->fixer ) && 'update' === $threat->fixer->fixer ? $threat->fixer->target : null,
+ 'severity' => isset( $threat->severity ) ? $threat->severity : null,
+ 'fixable' => isset( $threat->fixer ) ? $threat->fixer : null,
+ 'status' => isset( $threat->status ) ? $threat->status : null,
+ 'filename' => isset( $threat->filename ) ? $threat->filename : null,
+ 'context' => isset( $threat->context ) ? $threat->context : null,
+ 'source' => isset( $threat->source ) ? $threat->source : null,
+ )
+ );
+ ++$status->num_threats;
+ ++$status->num_themes_threats;
+ continue;
+ }
+ }
+
+ if ( isset( $threat->signature ) && 'Vulnerable.WP.Core' === $threat->signature ) {
+ if ( $threat->version !== $wp_version ) {
+ continue;
+ }
+
+ $status->core->threats[] = new Threat_Model(
+ array(
+ 'id' => $threat->id,
+ 'signature' => $threat->signature,
+ 'title' => $threat->title,
+ 'description' => $threat->description,
+ 'first_detected' => $threat->first_detected,
+ 'severity' => $threat->severity,
+ )
+ );
+ ++$status->num_threats;
+
+ continue;
+ }
+
+ if ( ! empty( $threat->filename ) ) {
+ $status->files[] = new Threat_Model( $threat );
+ ++$status->num_threats;
+ continue;
+ }
+
+ if ( ! empty( $threat->table ) ) {
+ $status->database[] = new Threat_Model( $threat );
+ ++$status->num_threats;
+ continue;
+ }
+ }
+ }
+
+ $installed_plugins = Plugins_Installer::get_plugins();
+ $status->plugins = self::merge_installed_and_checked_lists( $installed_plugins, $status->plugins, array( 'type' => 'plugins' ), true );
+
+ $installed_themes = Sync_Functions::get_themes();
+ $status->themes = self::merge_installed_and_checked_lists( $installed_themes, $status->themes, array( 'type' => 'themes' ), true );
+
+ foreach ( array_merge( $status->themes, $status->plugins ) as $extension ) {
+ if ( ! $extension->checked ) {
+ $status->has_unchecked_items = true;
+ break;
+ }
+ }
+
+ return $status;
+ }
+
+ /**
+ * Merges the list of installed extensions with the list of extensions that were checked for known vulnerabilities and return a normalized list to be used in the UI
+ *
+ * @param array $installed The list of installed extensions, where each attribute key is the extension slug.
+ * @param object $checked The list of checked extensions.
+ * @param array $append Additional data to append to each result in the list.
+ * @return array Normalized list of extensions.
+ */
+ protected static function merge_installed_and_checked_lists( $installed, $checked, $append ) {
+ $new_list = array();
+ $checked = (object) $checked;
+
+ foreach ( array_keys( $installed ) as $slug ) {
+ /**
+ * Extension Type Map
+ *
+ * @var array $extension_type_map Key value pairs of extension types and their corresponding
+ * identifier used by the Scan API data source.
+ */
+ $extension_type_map = array(
+ 'themes' => 'r1',
+ 'plugins' => 'r2',
+ );
+
+ $version = $installed[ $slug ]['Version'];
+ $short_slug = str_replace( '.php', '', explode( '/', $slug )[0] );
+ $scanifest_slug = $extension_type_map[ $append['type'] ] . ":$short_slug@$version";
+
+ $extension = new Extension_Model(
+ array_merge(
+ array(
+ 'name' => $installed[ $slug ]['Name'],
+ 'version' => $version,
+ 'slug' => $slug,
+ 'threats' => array(),
+ 'checked' => false,
+ ),
+ $append
+ )
+ );
+
+ if ( ! isset( $checked->extensions ) // no extension data available from Scan API
+ || is_array( $checked->extensions ) && in_array( $scanifest_slug, $checked->extensions, true ) // extension data matches Scan API
+ ) {
+ $extension->checked = true;
+ if ( isset( $checked->{ $short_slug }->threats ) ) {
+ $extension->threats = $checked->{ $short_slug }->threats;
+ }
+ }
+
+ $new_list[] = $extension;
+
+ }
+
+ $new_list = parent::sort_threats( $new_list );
+
+ return $new_list;
+ }
+}
diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-site-health.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-site-health.php
new file mode 100644
index 00000000..9c62ea01
--- /dev/null
+++ b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-site-health.php
@@ -0,0 +1,111 @@
+ __( 'Jetpack Protect checks', 'jetpack-protect' ),
+ 'test' => array( __CLASS__, 'do_checks' ),
+ );
+
+ return $checks;
+ }
+
+ /**
+ * Do site-health page checks
+ *
+ * @access public
+ * @return array
+ */
+ public static function do_checks() {
+ $total_threats = Status::get_total_threats();
+ $threats = Status::get_all_threats();
+ $threats = array_map(
+ function ( $v ) {
+ return $v->title;
+ },
+ $threats
+ );
+
+ /**
+ * Default, no threats found
+ */
+ $result = array(
+ 'label' => __( 'No known threats found', 'jetpack-protect' ),
+ 'status' => 'good',
+ 'badge' => array(
+ 'label' => __( 'Security', 'jetpack-protect' ),
+ 'color' => 'gray',
+ ),
+ 'description' => sprintf(
+ '
%s
',
+ __( 'Jetpack Protect did not find any known threats in your site. Threats can be exploited by hackers and cause harm to your website.', 'jetpack-protect' )
+ ),
+ 'actions' => '',
+ 'test' => 'jetpack_protect_checks',
+ );
+
+ /**
+ * If threats found.
+ */
+ if ( $total_threats ) {
+ $result['status'] = 'critical';
+ /* translators: $d is the number of threats found. */
+ $result['label'] = sprintf( _n( 'Your site is affected by %d security threat', 'Your site is affected by %d security threats', $total_threats, 'jetpack-protect' ), $total_threats );
+ $result['description'] = __( 'Jetpack Protect detected the following security threats in your site:', 'jetpack-protect' );
+
+ foreach ( $threats as $threat ) {
+ $result['description'] .= '