Version Description
Download this release
Release Info
Developer | creativethemeshq |
Plugin | Blocksy Companion |
Version | 1.8.51 |
Comparing to | |
See all releases |
Code changes from version 1.8.49 to 1.8.51
- blocksy-companion.php +1 -1
- framework/extensions/cookies-consent/helpers.php +1 -1
- framework/extensions/cookies-consent/static/bundle/main.min.css +1 -1
- framework/extensions/newsletter-subscribe/ct-newsletter-subscribe/view.php +2 -2
- framework/extensions/newsletter-subscribe/helpers.php +2 -2
- framework/extensions/newsletter-subscribe/static/bundle/main.min.css +1 -1
- framework/extensions/product-reviews/static/bundle/main-admin.min.css +1 -1
- framework/extensions/product-reviews/static/bundle/main.min.css +1 -1
- framework/extensions/trending/static/bundle/main.min.css +1 -1
- framework/extensions/widgets/static/bundle/main.min.css +1 -1
- framework/features/header/modal/login.php +2 -1
- framework/features/header/modal/register.php +9 -1
- languages/blocksy-companion-ru_RU.po +2 -2
- languages/blocksy-companion-uk.po +1 -1
- languages/blocksy-companion.pot +7 -7
- readme.txt +5 -1
- static/bundle/account-lazy.min.css +1 -1
- static/bundle/account.js +1 -1
- static/bundle/dashboard.min.css +1 -1
- static/bundle/options.min.css +1 -1
- static/bundle/sticky.js +1 -1
- static/js/frontend/account.js +8 -0
- static/js/frontend/account/captcha.js +5 -1
- static/js/frontend/sticky/auto-hide.js +1 -1
- static/js/frontend/sticky/shrink-utils.js +5 -1
- static/sass/account-lazy.scss +0 -3
blocksy-companion.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
Plugin Name: Blocksy Companion
|
5 |
Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
|
6 |
-
Version: 1.8.
|
7 |
Author: CreativeThemes
|
8 |
Author URI: https://creativethemes.com
|
9 |
Text Domain: blocksy-companion
|
3 |
/*
|
4 |
Plugin Name: Blocksy Companion
|
5 |
Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
|
6 |
+
Version: 1.8.51
|
7 |
Author: CreativeThemes
|
8 |
Author URI: https://creativethemes.com
|
9 |
Text Domain: blocksy-companion
|
framework/extensions/cookies-consent/helpers.php
CHANGED
@@ -85,7 +85,7 @@ function blocksy_ext_cookies_checkbox($prefix = '') {
|
|
85 |
?>
|
86 |
|
87 |
<p class="gdpr-confirm-policy">
|
88 |
-
<input id="gdprconfirm<?php echo $prefix ?>" class="ct-checkbox" name="gdprconfirm" type="checkbox" required
|
89 |
</p>
|
90 |
|
91 |
<?php
|
85 |
?>
|
86 |
|
87 |
<p class="gdpr-confirm-policy">
|
88 |
+
<input id="gdprconfirm<?php echo $prefix ?>" class="ct-checkbox" name="gdprconfirm" type="checkbox" required><label for="gdprconfirm<?php echo $prefix ?>"><?php echo $message ?></label>
|
89 |
</p>
|
90 |
|
91 |
<?php
|
framework/extensions/cookies-consent/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.51
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
framework/extensions/newsletter-subscribe/ct-newsletter-subscribe/view.php
CHANGED
@@ -101,10 +101,10 @@ echo $before_title . wp_kses_post($title) . $after_title;
|
|
101 |
<?php echo $skip_submit_output ?>>
|
102 |
|
103 |
<?php if ($has_name) { ?>
|
104 |
-
<input type="text" name="FNAME" placeholder="<?php esc_attr_e($name_label, 'blocksy-companion'); ?>" title="<?php echo __('Name', 'blocksy') ?>"
|
105 |
<?php } ?>
|
106 |
|
107 |
-
<input type="email" name="EMAIL" placeholder="<?php esc_attr_e($email_label, 'blocksy-companion'); ?> *" title="<?php echo __('Email', 'blocksy') ?>" required
|
108 |
|
109 |
<?php
|
110 |
if (function_exists('blocksy_ext_cookies_checkbox')) {
|
101 |
<?php echo $skip_submit_output ?>>
|
102 |
|
103 |
<?php if ($has_name) { ?>
|
104 |
+
<input type="text" name="FNAME" placeholder="<?php esc_attr_e($name_label, 'blocksy-companion'); ?>" title="<?php echo __('Name', 'blocksy') ?>">
|
105 |
<?php } ?>
|
106 |
|
107 |
+
<input type="email" name="EMAIL" placeholder="<?php esc_attr_e($email_label, 'blocksy-companion'); ?> *" title="<?php echo __('Email', 'blocksy') ?>" required>
|
108 |
|
109 |
<?php
|
110 |
if (function_exists('blocksy_ext_cookies_checkbox')) {
|
framework/extensions/newsletter-subscribe/helpers.php
CHANGED
@@ -162,10 +162,10 @@ function blc_ext_newsletter_subscribe_output_form($args = []) {
|
|
162 |
<?php echo $skip_submit_output ?>>
|
163 |
|
164 |
<?php if ($has_name) { ?>
|
165 |
-
<input type="text" name="FNAME" placeholder="<?php esc_attr_e($args['name_label'], 'blocksy-companion'); ?>" aria-label="<?php echo __('First name', 'blocksy-companion') ?>"
|
166 |
<?php } ?>
|
167 |
|
168 |
-
<input type="email" name="EMAIL" placeholder="<?php esc_attr_e($args['email_label'], 'blocksy-companion'); ?> *" aria-label="<?php echo __('Email address', 'blocksy-companion') ?>" required
|
169 |
|
170 |
<?php
|
171 |
if (function_exists('blocksy_ext_cookies_checkbox')) {
|
162 |
<?php echo $skip_submit_output ?>>
|
163 |
|
164 |
<?php if ($has_name) { ?>
|
165 |
+
<input type="text" name="FNAME" placeholder="<?php esc_attr_e($args['name_label'], 'blocksy-companion'); ?>" aria-label="<?php echo __('First name', 'blocksy-companion') ?>">
|
166 |
<?php } ?>
|
167 |
|
168 |
+
<input type="email" name="EMAIL" placeholder="<?php esc_attr_e($args['email_label'], 'blocksy-companion'); ?> *" aria-label="<?php echo __('Email address', 'blocksy-companion') ?>" required>
|
169 |
|
170 |
<?php
|
171 |
if (function_exists('blocksy_ext_cookies_checkbox')) {
|
framework/extensions/newsletter-subscribe/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.51
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
framework/extensions/product-reviews/static/bundle/main-admin.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.51
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
framework/extensions/product-reviews/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.51
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
framework/extensions/trending/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.51
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
framework/extensions/widgets/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.51
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
framework/features/header/modal/login.php
CHANGED
@@ -29,9 +29,10 @@ if (! $forgot_password_inline) {
|
|
29 |
<input type="text" name="log" id="user_login" class="input" value="" size="20">
|
30 |
</p>
|
31 |
|
32 |
-
<p class="login-password">
|
33 |
<label for="user_pass"><?php echo __('Password', 'blocksy-companion') ?></label>
|
34 |
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20">
|
|
|
35 |
</p>
|
36 |
|
37 |
<p class="login-remember col-2">
|
29 |
<input type="text" name="log" id="user_login" class="input" value="" size="20">
|
30 |
</p>
|
31 |
|
32 |
+
<p class="login-password-input">
|
33 |
<label for="user_pass"><?php echo __('Password', 'blocksy-companion') ?></label>
|
34 |
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20">
|
35 |
+
<span class="show-password-input"></span>
|
36 |
</p>
|
37 |
|
38 |
<p class="login-remember col-2">
|
framework/features/header/modal/register.php
CHANGED
@@ -38,9 +38,10 @@ if (
|
|
38 |
</p>
|
39 |
|
40 |
<?php if ($has_password) { ?>
|
41 |
-
<p>
|
42 |
<label for="user_pass_register"><?php echo __('Password', 'blocksy-companion') ?></label>
|
43 |
<input type="password" name="user_pass" id="user_pass_register" class="input" value="" size="20" autocapitalize="off" autocomplete="new-password">
|
|
|
44 |
</p>
|
45 |
<?php } ?>
|
46 |
|
@@ -51,6 +52,13 @@ if (
|
|
51 |
}
|
52 |
}
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
do_action('register_form');
|
55 |
do_action('woocommerce_register_form');
|
56 |
?>
|
38 |
</p>
|
39 |
|
40 |
<?php if ($has_password) { ?>
|
41 |
+
<p class="register-password-input">
|
42 |
<label for="user_pass_register"><?php echo __('Password', 'blocksy-companion') ?></label>
|
43 |
<input type="password" name="user_pass" id="user_pass_register" class="input" value="" size="20" autocapitalize="off" autocomplete="new-password">
|
44 |
+
<span class="show-password-input"></span>
|
45 |
</p>
|
46 |
<?php } ?>
|
47 |
|
52 |
}
|
53 |
}
|
54 |
|
55 |
+
if (class_exists('LoginNocaptcha')) {
|
56 |
+
remove_action(
|
57 |
+
'woocommerce_register_form',
|
58 |
+
array('LoginNocaptcha', 'nocaptcha_form')
|
59 |
+
);
|
60 |
+
}
|
61 |
+
|
62 |
do_action('register_form');
|
63 |
do_action('woocommerce_register_form');
|
64 |
?>
|
languages/blocksy-companion-ru_RU.po
CHANGED
@@ -2294,7 +2294,7 @@ msgstr "Выберите список..."
|
|
2294 |
|
2295 |
#: framework/extensions/newsletter-subscribe/dashboard-static/js/EditCredentials.js:125
|
2296 |
msgid "This option is available only in Blocksy premium %sversion%s."
|
2297 |
-
msgstr "Эта опция доступна только в премиальной %s
|
2298 |
|
2299 |
#: framework/extensions/newsletter-subscribe/dashboard-static/js/EditCredentials.js:141
|
2300 |
msgid "More info on how to generate an API key for Mailchimp can be found %shere%s."
|
@@ -5426,7 +5426,7 @@ msgstr "Анонимизация IP"
|
|
5426 |
#: framework/features/google-analytics.php:102,
|
5427 |
#: build_tmp/build/framework/features/google-analytics.php:102
|
5428 |
msgid "Enable Google Analytics IP Anonymization for enhanced privacy. More info and instructions can be found %shere%s."
|
5429 |
-
msgstr "Анонимность IP-адресов для Google Analytics
|
5430 |
|
5431 |
#: framework/features/opengraph-meta-data.php:17,
|
5432 |
#: build_tmp/build/framework/features/opengraph-meta-data.php:17
|
2294 |
|
2295 |
#: framework/extensions/newsletter-subscribe/dashboard-static/js/EditCredentials.js:125
|
2296 |
msgid "This option is available only in Blocksy premium %sversion%s."
|
2297 |
+
msgstr "Эта опция доступна только в премиальной %sв��рсии%s Blocksy."
|
2298 |
|
2299 |
#: framework/extensions/newsletter-subscribe/dashboard-static/js/EditCredentials.js:141
|
2300 |
msgid "More info on how to generate an API key for Mailchimp can be found %shere%s."
|
5426 |
#: framework/features/google-analytics.php:102,
|
5427 |
#: build_tmp/build/framework/features/google-analytics.php:102
|
5428 |
msgid "Enable Google Analytics IP Anonymization for enhanced privacy. More info and instructions can be found %shere%s."
|
5429 |
+
msgstr "Анонимность IP-адресов для Google Analytics ��ля повышения конфиденциальности. Подробная информация и инструкции %sздесь%s."
|
5430 |
|
5431 |
#: framework/features/opengraph-meta-data.php:17,
|
5432 |
#: build_tmp/build/framework/features/opengraph-meta-data.php:17
|
languages/blocksy-companion-uk.po
CHANGED
@@ -6136,7 +6136,7 @@ msgstr "Опис"
|
|
6136 |
#: build_tmp/build/framework/extensions/newsletter-subscribe/ct-newsletter-subscribe/options.php:33,
|
6137 |
#: build_tmp/build/framework/extensions/newsletter-subscribe/ct-newsletter-subscribe/view.php:16
|
6138 |
msgid "Enter your email address below to subscribe to our newsletter"
|
6139 |
-
msgstr "Введіть свою
|
6140 |
|
6141 |
#: framework/extensions/newsletter-subscribe/customizer.php:42,
|
6142 |
#: framework/extensions/newsletter-subscribe/ct-newsletter-subscribe/options.php:46,
|
6136 |
#: build_tmp/build/framework/extensions/newsletter-subscribe/ct-newsletter-subscribe/options.php:33,
|
6137 |
#: build_tmp/build/framework/extensions/newsletter-subscribe/ct-newsletter-subscribe/view.php:16
|
6138 |
msgid "Enter your email address below to subscribe to our newsletter"
|
6139 |
+
msgstr "Введіть свою електронну адресу нижче, щоб підписатися на нашу розсилку"
|
6140 |
|
6141 |
#: framework/extensions/newsletter-subscribe/customizer.php:42,
|
6142 |
#: framework/extensions/newsletter-subscribe/ct-newsletter-subscribe/options.php:46,
|
languages/blocksy-companion.pot
CHANGED
@@ -7,7 +7,7 @@ msgstr ""
|
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
-
"POT-Creation-Date: 2022-
|
11 |
"Project-Id-Version: undefined\n"
|
12 |
"X-Poedit-Basepath: ..\n"
|
13 |
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;"
|
@@ -2071,15 +2071,15 @@ msgstr ""
|
|
2071 |
msgid "Password"
|
2072 |
msgstr ""
|
2073 |
|
2074 |
-
#: framework/features/header/modal/login.php:
|
2075 |
msgid "Remember Me"
|
2076 |
msgstr ""
|
2077 |
|
2078 |
-
#: framework/features/header/modal/login.php:
|
2079 |
msgid "Forgot Password?"
|
2080 |
msgstr ""
|
2081 |
|
2082 |
-
#: framework/features/header/modal/login.php:
|
2083 |
msgid "Log In"
|
2084 |
msgstr ""
|
2085 |
|
@@ -2100,11 +2100,11 @@ msgstr ""
|
|
2100 |
msgid "Email"
|
2101 |
msgstr ""
|
2102 |
|
2103 |
-
#: framework/features/header/modal/register.php:
|
2104 |
msgid "Registration confirmation will be emailed to you"
|
2105 |
msgstr ""
|
2106 |
|
2107 |
-
#: framework/features/header/modal/register.php:
|
2108 |
msgid "Register"
|
2109 |
msgstr ""
|
2110 |
|
@@ -4433,7 +4433,7 @@ msgstr ""
|
|
4433 |
msgid "Read Time"
|
4434 |
msgstr ""
|
4435 |
|
4436 |
-
#: framework/premium/extensions/post-types-extra/includes/estimated-read-time.php:
|
4437 |
msgid "%s min"
|
4438 |
msgid_plural "%s mins"
|
4439 |
msgstr[0] ""
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
+
"POT-Creation-Date: 2022-10-07 12:37+0000\n"
|
11 |
"Project-Id-Version: undefined\n"
|
12 |
"X-Poedit-Basepath: ..\n"
|
13 |
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;"
|
2071 |
msgid "Password"
|
2072 |
msgstr ""
|
2073 |
|
2074 |
+
#: framework/features/header/modal/login.php:41
|
2075 |
msgid "Remember Me"
|
2076 |
msgstr ""
|
2077 |
|
2078 |
+
#: framework/features/header/modal/login.php:45
|
2079 |
msgid "Forgot Password?"
|
2080 |
msgstr ""
|
2081 |
|
2082 |
+
#: framework/features/header/modal/login.php:63
|
2083 |
msgid "Log In"
|
2084 |
msgstr ""
|
2085 |
|
2100 |
msgid "Email"
|
2101 |
msgstr ""
|
2102 |
|
2103 |
+
#: framework/features/header/modal/register.php:67
|
2104 |
msgid "Registration confirmation will be emailed to you"
|
2105 |
msgstr ""
|
2106 |
|
2107 |
+
#: framework/features/header/modal/register.php:72
|
2108 |
msgid "Register"
|
2109 |
msgstr ""
|
2110 |
|
4433 |
msgid "Read Time"
|
4434 |
msgstr ""
|
4435 |
|
4436 |
+
#: framework/premium/extensions/post-types-extra/includes/estimated-read-time.php:116
|
4437 |
msgid "%s min"
|
4438 |
msgid_plural "%s mins"
|
4439 |
msgstr[0] ""
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Requires PHP: 7.0
|
|
5 |
Tested up to: 6.0
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
Stable tag: 1.8.
|
9 |
|
10 |
== Description ==
|
11 |
|
@@ -23,6 +23,10 @@ It runs and adds its enhancements only if the Blocksy theme is installed and act
|
|
23 |
2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
|
24 |
|
25 |
== Changelog ==
|
|
|
|
|
|
|
|
|
26 |
1.8.49: 2022-09-22
|
27 |
- Improvement: Better schema.org output for product reviews price and currency
|
28 |
|
5 |
Tested up to: 6.0
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
+
Stable tag: 1.8.51
|
9 |
|
10 |
== Description ==
|
11 |
|
23 |
2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
|
24 |
|
25 |
== Changelog ==
|
26 |
+
1.8.51: 2022-10-07
|
27 |
+
- Improvement: Account modal - add show/hide password button in password field
|
28 |
+
- Fix: Double captcha appears on register modal
|
29 |
+
|
30 |
1.8.49: 2022-09-22
|
31 |
- Improvement: Better schema.org output for product reviews price and currency
|
32 |
|
static/bundle/account-lazy.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.51
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
static/bundle/account.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){"use strict";var e={n:function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function(t,r){for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.ctEvents,r=e.n(t),o=window.ctFrontend;function n(e){return n="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},n(e)}function c(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var i=function(e){c(e.querySelectorAll(".g-recaptcha, .anr_captcha_field")).map((function(e){e.classList.contains("anr_captcha_field")?grecaptcha.reset(parseFloat(e.firstElementChild.id.replace("anr_captcha_field_",""))-1):grecaptcha.reset(e.gID)}))},l=function(e){return new Promise((function(t){(function(e,t){return!(!window.WFLSVars||!parseInt(WFLSVars.useCAPTCHA)||(function(e,t){var r=function(e){var t=jQuery();return c(e.querySelectorAll("input")).map((function(e){t=t.add(e)})),t}(t);if("object"===("undefined"==typeof grecaptcha?"undefined":n(grecaptcha)))grecaptcha.ready((function(){grecaptcha.execute(WFLSVars.recaptchasitekey,{action:"login"}).then((function(t){var o=jQuery("#wfls-captcha-token");o.length?o.val(t):r.length&&((o=jQuery('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />')).val(t),r.parent().append(o)),"function"==typeof e&&e(!0)}))}));else{var o=jQuery("#wfls-captcha-token");o.length?o.val("grecaptcha-missing"):r.length&&((o=jQuery('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />')).val("grecaptcha-missing"),r.parent().append(o)),"function"==typeof e&&e(!0)}}((function(){return e()}),t),0))})(t,e)||t()}))},s=function(e){var t=e.querySelector('[name*="submit"]');t&&t.classList.add("ct-loading")},u=function(e){var t=e.querySelector('[name*="submit"]');t&&t.classList.remove("ct-loading")},f=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector(".ct-".concat(o,"-form"))||(o="login"),e.querySelector("ul")&&e.querySelector("ul .ct-".concat(o))&&(e.querySelector("ul .active").classList.remove("active"),e.querySelector("ul .ct-".concat(o)).classList.add("active")),e.querySelector('[class*="-form"].active').classList.remove("active"),e.querySelector(".ct-".concat(o,"-form")).classList.add("active"),e.querySelector(".ct-".concat(o,"-form form"))&&e.querySelector(".ct-".concat(o,"-form form")).reset(),e.querySelector(".ct-account-form").classList.remove("ct-error");var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-form-notification");n&&n.remove();var a=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-form-notification-error");a&&a.remove(),function(e){c(e.querySelectorAll(".g-recaptcha, .anr_captcha_field")).map((function(e){e.innerHTML="",grecaptcha.render(e)}))}(e)},d=function(e,t){var r=e.querySelector(".ct-form-notification-error");r&&r.remove(),e.closest(".ct-account-form").classList.remove("ct-error"),t&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-form-notification-error">'.concat(t,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")})))},m=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector("#login_error"),n="";return o&&(n=o.innerHTML),d(e,n),{hasError:!!o,doc:r}},p=function(e,t){var r=e.querySelector(".ct-form-notification");r&&r.remove(),e.closest(".ct-account-form").classList.remove("ct-error"),t&&e.insertAdjacentHTML("afterbegin",'<div class="ct-form-notification">'.concat(t,"</div>"))},y=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector(".message"),n="";return o&&(n=o.innerHTML),p(e,n),{doc:r}},h="";(0,o.registerDynamicChunk)("blocksy_account",{mount:function(e,t){var n=t.event;if(n.preventDefault(),!h){var c=document.querySelector("#account-modal");if(!c)return void(location=document.querySelector('[data-id="account"]')?document.querySelector('[data-id="account"]').href:e.href);h=c.innerHTML,c.remove()}var a=document.querySelector(".ct-drawer-canvas").lastElementChild;a.id="account-modal";var v=ct_localizations.dynamic_styles_selectors.find((function(e){return a.matches(e.selector)})),g=function(){a.innerHTML=h,function(e){if(e&&!e.hasListeners){e.hasListeners=!0;var t=e.querySelector('[name="loginform"]'),o=e.querySelector('[name="registerform"]'),n=e.querySelector('[name="lostpasswordform"]');e.addEventListener("click",(function(r){r.target.href&&r.target.href.indexOf("lostpassword")>-1&&(f(e,{screen:"forgot-password"}),r.preventDefault()),r.target.href&&r.target.classList.contains("showlogin")&&(f(e,{screen:"login"}),r.preventDefault()),r.target.href&&(r.target.href.indexOf("wp-login")>-1||t&&r.target.href===t.action)&&-1===r.target.href.indexOf("lostpassword")&&(f(e,{screen:"login"}),r.preventDefault())}),!0),t&&t.addEventListener("submit",(function(e){if(e.preventDefault(),!window.ct_customizer_localizations){s(t);var r=new FormData(t),o="".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login");if(window.WFLSVars&&!t.loginProceed)return r.append("action","wordfence_ls_authenticate"),o=WFLSVars.ajaxurl,void l(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.json()})).then((function(e){u(t);var r=!!e.error,o=t.closest(".ct-login-form"),n=t.closest(".ct-login-form").querySelector("form");if(r&&d(o,e.error),e.message&&p(n,e.message),e.login)if(e.jwt){if(!jQuery("#wfls-token").length){var c=jQuery('<div id="wfls-prompt-overlay-blocksy"></div>'),a=jQuery('<div id="wfls-prompt-wrapper"></div>'),l=jQuery('<label for="wfls-token">2FA Code <a href="javascript:void(0)" class="wfls-2fa-code-help wfls-tooltip-trigger" title="The 2FA Code can be found within the authenticator app you used when first activating two-factor authentication. You may also use one of your recovery codes."><i class="dashicons dashicons-editor-help"></i></a></label>'),s=jQuery('<input type="text" name="wfls-token" id="wfls-token" aria-describedby="wfls-token-error" class="input" value="" size="6" autocomplete="off"/>'),f=jQuery('<label for="wfls-remember-device"><input name="wfls-remember-device" type="checkbox" id="wfls-remember-device" class="ct-checkbox" value="1" /> Remember for 30 days</label>');a.append(l),a.append(s),parseInt(WFLSVars.allowremember)&&a.append(f),c.append(a),jQuery(n).prepend(c),new jQuery.Zebra_Tooltips(jQuery(".wfls-tooltip-trigger"))}var m=jQuery("#wfls-token-jwt");m.length||(m=jQuery('<input type="hidden" name="wfls-token-jwt" id="wfls-token-jwt" value=""/>'),jQuery("#wfls-prompt-overlay-blocksy").append(m)),jQuery("#wfls-token-jwt").val(e.jwt)}else fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){location=t.querySelector('[name="redirect_to"]').value}));e.combined&&(t.loginProceed=!0,fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){location=t.querySelector('[name="redirect_to"]').value}))),(!r||r&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(t.closest(".ct-login-form"))}))}));l(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.text()})).then((function(e){u(t);var r=m(t.closest(".ct-login-form"),e),o=(r.doc,r.hasError);o||setTimeout((function(){location=t.querySelector('[name="redirect_to"]').value}),2e3),(!o||o&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(t.closest(".ct-login-form"))}))}))}})),o&&o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||(s(o),l(o).then((function(){return fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_registration"),{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=m(o.closest(".ct-register-form"),e),n=(t.doc,t.hasError);u(o),n||y(o.closest(".ct-register-form"),e),r().trigger("blocksy:account:register:".concat(n?"error":"success")),(!n||n&&-1===o.closest(".ct-register-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(o.closest(".ct-register-form"))}))})))})),n&&n.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||(s(n),fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_lostpassword"),{method:n.method,body:new FormData(n)}).then((function(e){return e.text()})).then((function(e){var t=m(n.closest(".ct-forgot-password-form"),e),r=(t.doc,t.hasError);u(n),r||y(n.closest(".ct-forgot-password-form"),e),(!r||r&&-1===n.closest(".ct-forgot-password-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(n.closest(".ct-forgot-password-form"))})))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),f(e,{screen:t})})),r.addEventListener("keyup",(function(r){13===r.keyCode&&(r.preventDefault(),f(e,{screen:t}))}))}))}))}}(a),f(a,{screen:e.dataset.view||"login"}),window.anr_onloadCallback&&window.anr_onloadCallback(),r().trigger("ct:overlay:handle-click",{e:n,href:"#account-modal",options:{openStrategy:"skip",isModal:!0}})};v?(0,o.loadStyle)(v.url).then((function(){g()})):g()}}),r().on("ct:modal:closed",(function(e){e.closest("#account-modal")&&e.remove()}))}();
|
1 |
+
!function(){"use strict";var e={n:function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function(t,r){for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.ctEvents,r=e.n(t),o=window.ctFrontend;function n(e){return n="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},n(e)}function c(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var i=function(e){c(e.querySelectorAll(".g-recaptcha, .anr_captcha_field")).map((function(e){e.classList.contains("anr_captcha_field")?grecaptcha.reset(parseFloat(e.firstElementChild.id.replace("anr_captcha_field_",""))-1):grecaptcha.reset(e.gID)}))},l=function(e){return new Promise((function(t){(function(e,t){return!(!window.WFLSVars||!parseInt(WFLSVars.useCAPTCHA)||(function(e,t){var r=function(e){var t=jQuery();return c(e.querySelectorAll("input")).map((function(e){t=t.add(e)})),t}(t);if("object"===("undefined"==typeof grecaptcha?"undefined":n(grecaptcha)))grecaptcha.ready((function(){grecaptcha.execute(WFLSVars.recaptchasitekey,{action:"login"}).then((function(t){var o=jQuery("#wfls-captcha-token");o.length?o.val(t):r.length&&((o=jQuery('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />')).val(t),r.parent().append(o)),"function"==typeof e&&e(!0)}))}));else{var o=jQuery("#wfls-captcha-token");o.length?o.val("grecaptcha-missing"):r.length&&((o=jQuery('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />')).val("grecaptcha-missing"),r.parent().append(o)),"function"==typeof e&&e(!0)}}((function(){return e()}),t),0))})(t,e)||t()}))};function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var u=function(e){var t=e.querySelector('[name*="submit"]');t&&t.classList.add("ct-loading")},f=function(e){var t=e.querySelector('[name*="submit"]');t&&t.classList.remove("ct-loading")},d=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector(".ct-".concat(o,"-form"))||(o="login"),e.querySelector("ul")&&e.querySelector("ul .ct-".concat(o))&&(e.querySelector("ul .active").classList.remove("active"),e.querySelector("ul .ct-".concat(o)).classList.add("active")),e.querySelector('[class*="-form"].active').classList.remove("active"),e.querySelector(".ct-".concat(o,"-form")).classList.add("active"),e.querySelector(".ct-".concat(o,"-form form"))&&e.querySelector(".ct-".concat(o,"-form form")).reset(),e.querySelector(".ct-account-form").classList.remove("ct-error");var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-form-notification");n&&n.remove();var a=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-form-notification-error");a&&a.remove(),function(e){c(e.querySelectorAll(".g-recaptcha, .anr_captcha_field")).map((function(e){e.gID||(e.innerHTML="",e.gID=grecaptcha.render(e))}))}(e)},m=function(e,t){var r=e.querySelector(".ct-form-notification-error");r&&r.remove(),e.closest(".ct-account-form").classList.remove("ct-error"),t&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-form-notification-error">'.concat(t,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")})))},p=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector("#login_error"),n="";return o&&(n=o.innerHTML),m(e,n),{hasError:!!o,doc:r}},y=function(e,t){var r=e.querySelector(".ct-form-notification");r&&r.remove(),e.closest(".ct-account-form").classList.remove("ct-error"),t&&e.insertAdjacentHTML("afterbegin",'<div class="ct-form-notification">'.concat(t,"</div>"))},h=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector(".message"),n="";return o&&(n=o.innerHTML),y(e,n),{doc:r}},v="";(0,o.registerDynamicChunk)("blocksy_account",{mount:function(e,t){var n=t.event;if(n.preventDefault(),!v){var c=document.querySelector("#account-modal");if(!c)return void(location=document.querySelector('[data-id="account"]')?document.querySelector('[data-id="account"]').href:e.href);v=c.innerHTML,c.remove()}var a=document.querySelector(".ct-drawer-canvas").lastElementChild;a.id="account-modal";var g=ct_localizations.dynamic_styles_selectors.find((function(e){return a.matches(e.selector)})),w=function(){a.innerHTML=v,function(e){if(e&&!e.hasListeners){e.hasListeners=!0;var t=e.querySelector('[name="loginform"]'),o=e.querySelector('[name="registerform"]'),n=e.querySelector('[name="lostpasswordform"]');e.addEventListener("click",(function(r){r.target.href&&r.target.href.indexOf("lostpassword")>-1&&(d(e,{screen:"forgot-password"}),r.preventDefault()),r.target.href&&r.target.classList.contains("showlogin")&&(d(e,{screen:"login"}),r.preventDefault()),r.target.href&&(r.target.href.indexOf("wp-login")>-1||t&&r.target.href===t.action)&&-1===r.target.href.indexOf("lostpassword")&&(d(e,{screen:"login"}),r.preventDefault())}),!0),(c=e.querySelectorAll(".show-password-input"),function(e){if(Array.isArray(e))return s(e)}(c)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(c)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){e.addEventListener("click",(function(t){e.previousElementSibling.type="password"===e.previousElementSibling.type?"text":"password"}))})),t&&t.addEventListener("submit",(function(e){if(e.preventDefault(),!window.ct_customizer_localizations){u(t);var r=new FormData(t),o="".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login");if(window.WFLSVars&&!t.loginProceed)return r.append("action","wordfence_ls_authenticate"),o=WFLSVars.ajaxurl,void l(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.json()})).then((function(e){f(t);var r=!!e.error,o=t.closest(".ct-login-form"),n=t.closest(".ct-login-form").querySelector("form");if(r&&m(o,e.error),e.message&&y(n,e.message),e.login)if(e.jwt){if(!jQuery("#wfls-token").length){var c=jQuery('<div id="wfls-prompt-overlay-blocksy"></div>'),a=jQuery('<div id="wfls-prompt-wrapper"></div>'),l=jQuery('<label for="wfls-token">2FA Code <a href="javascript:void(0)" class="wfls-2fa-code-help wfls-tooltip-trigger" title="The 2FA Code can be found within the authenticator app you used when first activating two-factor authentication. You may also use one of your recovery codes."><i class="dashicons dashicons-editor-help"></i></a></label>'),s=jQuery('<input type="text" name="wfls-token" id="wfls-token" aria-describedby="wfls-token-error" class="input" value="" size="6" autocomplete="off"/>'),u=jQuery('<label for="wfls-remember-device"><input name="wfls-remember-device" type="checkbox" id="wfls-remember-device" class="ct-checkbox" value="1" /> Remember for 30 days</label>');a.append(l),a.append(s),parseInt(WFLSVars.allowremember)&&a.append(u),c.append(a),jQuery(n).prepend(c),new jQuery.Zebra_Tooltips(jQuery(".wfls-tooltip-trigger"))}var d=jQuery("#wfls-token-jwt");d.length||(d=jQuery('<input type="hidden" name="wfls-token-jwt" id="wfls-token-jwt" value=""/>'),jQuery("#wfls-prompt-overlay-blocksy").append(d)),jQuery("#wfls-token-jwt").val(e.jwt)}else fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){location=t.querySelector('[name="redirect_to"]').value}));e.combined&&(t.loginProceed=!0,fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){location=t.querySelector('[name="redirect_to"]').value}))),(!r||r&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(t.closest(".ct-login-form"))}))}));l(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.text()})).then((function(e){f(t);var r=p(t.closest(".ct-login-form"),e),o=(r.doc,r.hasError);o||setTimeout((function(){location=t.querySelector('[name="redirect_to"]').value}),2e3),(!o||o&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(t.closest(".ct-login-form"))}))}))}})),o&&o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||(u(o),l(o).then((function(){return fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_registration"),{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=p(o.closest(".ct-register-form"),e),n=(t.doc,t.hasError);f(o),n||h(o.closest(".ct-register-form"),e),r().trigger("blocksy:account:register:".concat(n?"error":"success")),(!n||n&&-1===o.closest(".ct-register-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(o.closest(".ct-register-form"))}))})))})),n&&n.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||(u(n),fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_lostpassword"),{method:n.method,body:new FormData(n)}).then((function(e){return e.text()})).then((function(e){var t=p(n.closest(".ct-forgot-password-form"),e),r=(t.doc,t.hasError);f(n),r||h(n.closest(".ct-forgot-password-form"),e),(!r||r&&-1===n.closest(".ct-forgot-password-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&i(n.closest(".ct-forgot-password-form"))})))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),d(e,{screen:t})})),r.addEventListener("keyup",(function(r){13===r.keyCode&&(r.preventDefault(),d(e,{screen:t}))}))}))}))}var c}(a),d(a,{screen:e.dataset.view||"login"}),window.anr_onloadCallback&&window.anr_onloadCallback(),r().trigger("ct:overlay:handle-click",{e:n,href:"#account-modal",options:{openStrategy:"skip",isModal:!0}})};g?(0,o.loadStyle)(g.url).then((function(){w()})):w()}}),r().on("ct:modal:closed",(function(e){e.closest("#account-modal")&&e.remove()}))}();
|
static/bundle/dashboard.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.51
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
static/bundle/options.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.51
|
3 |
*
|
4 |
* Copyright (c) 2022
|
5 |
* Licensed GPLv2+
|
static/bundle/sticky.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){"use strict";var t={n:function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.ctEvents,n=t.n(e),r=window.ctFrontend,i=function(t,e,n){return Math.max(t,Math.min(e,n))},o=function(t,e,n){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(n-t[0])},a=function(t){if(t.blcInitialHeight)return t.blcInitialHeight;var e=t.firstElementChild;t.firstElementChild.firstElementChild&&(e=t.firstElementChild.firstElementChild);var n=e.getBoundingClientRect().height;return t.blcInitialHeight=n,n},c=function(t){if(t.blcStickyHeight)return t.blcStickyHeight;var e=a(t),n=getComputedStyle(t),r=getComputedStyle(t.firstElementChild);if(t.closest('[data-sticky*="yes"]')){var i=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),o=t.getBoundingClientRect().height-i;if(o!==e)return t.blcStickyHeight=t.getBoundingClientRect().height,o}var c=100;return t.dataset.row.includes("middle")&&(c=n.getPropertyValue("--sticky-shrink")),c&&(e*=parseFloat(c)/100),e},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return 0},e=document.querySelector(".ct-floating-bar");e&&e.style.setProperty("--header-sticky-height-animated",t())};function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var u=null,d=function(){u=null},y=function(t){var e,n=t.stickyContainer,r=t.startPosition;(e=n.querySelectorAll('[data-row*="middle"]'),function(t){if(Array.isArray(t))return l(t)}(e)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),n=function(t){var e=t.logo,n=t.row;if(u)return u;var r=parseFloat(getComputedStyle(e).getPropertyValue("--logo-max-height")||50),i=parseFloat(getComputedStyle(e).getPropertyValue("--logo-sticky-shrink").toString().replace(",",".")||1),o=a(n),s=c(n);return u={initialHeight:r,stickyShrink:i,rowInitialHeight:o,rowStickyHeight:s}}({logo:e,row:t}),s=n.initialHeight,l=n.stickyShrink,d=n.rowInitialHeight,y=n.rowStickyHeight,f=s*l;1!==l&&e.style.setProperty("--logo-shrink-height","".concat(o([r,r+Math.abs(d===y?s-f:d-y)],[1,l],i(r,r+Math.abs(d===y?s-f:d-y),scrollY))*s,"px"))}}))},f=null,h=function(){f=null},m=function(t){var e=t.stickyContainer,n=(t.containerInitialHeight,t.startPosition);e.querySelector('[data-row*="middle"]')&&[e.querySelector('[data-row*="middle"]')].map((function(t){var e=function(t){var e=t.row;if(f)return f;var n=a(e),r=c(e);return f={rowInitialHeight:n,rowStickyHeight:r}}({row:t}),r=e.rowInitialHeight,s=e.rowStickyHeight;if(r!==s){var l;l=o([n,n+Math.abs(r-s)],[r,s],i(n,n+Math.abs(r-s),scrollY)),t.style.setProperty("--shrink-height","".concat(l,"px"))}}))};function p(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function k(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return b(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var v=function(t){var e=t.stickyContainer,n=k(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+c(e)}),0);return{stickyContainerHeight:n,stickyContainerHeightAbsolute:n+parseFloat(getComputedStyle(e).top)}},w=null;function S(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return A(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function C(t){return function(t){if(Array.isArray(t))return O(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return O(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var x=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(t.querySelectorAll("[data-row][data-transparent-row]")).map((function(t){t.dataset.transparentRow=e}))},I=null,j=null,H=null,P=null;n().on("blocksy:sticky:compute",(function(){setTimeout((function(){h(),d(),I=null,j=null,H=null,P=null,Y=null,q()}),100)})),window.wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(t){setTimeout((function(){h(),d(),I=null,j=null,H=null,P=null,Y=null,q()}),500)}));var Y=null,q=function(){if(Y!==scrollY){var t=document.querySelector('[data-device="'.concat((0,r.getCurrentScreen)(),'"] [data-sticky]'));if(t){var e=j;e||(e=j=Array.from(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0),t.parentNode.style.height="".concat(e,"px"));var n=I;null===n&&(n=function(t){if(-1===t.dataset.sticky.indexOf("shrink")&&-1===t.dataset.sticky.indexOf("auto-hide"))return t.parentNode.getBoundingClientRect().height+200;var e=t.closest("header").getBoundingClientRect().top+scrollY;if(e>0){var n=document.elementFromPoint(0,3);n&&function(t){for(var e=[];t&&t!==document;t=t.parentNode)e.push(t);return e}(n).map((function(t){return getComputedStyle(t).position})).indexOf("fixed")>-1&&(e-=n.getBoundingClientRect().height)}var r=t.parentNode,i=getComputedStyle(document.body),o=parseFloat(i.getPropertyValue("--header-sticky-offset")||0);if(o+=parseFloat(i.getPropertyValue("--frame-size"))||0,1===r.parentNode.children.length||r.parentNode.children[0].classList.contains("ct-sticky-container"))return e>0?e-o:e;var a=Array.from(r.parentNode.children).reduce((function(t,e,n){return t.indexOf(0)>-1||!e.dataset.row?[].concat(C(t),[0]):[].concat(C(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),e);return a>0?a-o:a}(t),I=n);var i=H;null===i&&(i=t.closest("[data-device]").getBoundingClientRect().height,H=i);var o=P,a=t.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t&&"fixed"!==t}));o||(o=parseInt(t.getBoundingClientRect().height),P=parseInt(o),s((function(){return-1===a.indexOf("auto-hide")?"".concat(C(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+c(e)}),0),"px"):"0px"})));var l=n>0&&Math.abs(window.scrollY-n)<5||window.scrollY>n;a.indexOf("shrink")>-1&&(l=n>0?window.scrollY>=n:window.scrollY>0),setTimeout((function(){l&&-1===document.body.dataset.header.indexOf("shrink")&&(document.body.dataset.header="".concat(document.body.dataset.header,":shrink")),!l&&document.body.dataset.header.indexOf("shrink")>-1&&(document.body.dataset.header=document.body.dataset.header.replace(":shrink",""))}),300);var u=scrollY;a.indexOf("shrink")>-1&&function(t){var e=t.containerInitialHeight,n=t.stickyContainer,r=t.isSticky,i=t.startPosition,o=t.stickyComponents;if(0===i&&0===window.scrollY&&(n.dataset.sticky=["fixed"].concat(p(o)).join(":")),r){if(o.indexOf("yes")>-1)return;-1===n.dataset.sticky.indexOf("yes")&&(x(n,"no"),n.dataset.sticky=["yes"].concat(p(o)).join(":")),y({stickyContainer:n,startPosition:i}),m({stickyContainer:n,containerInitialHeight:e,startPosition:i})}else Array.from(n.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(n.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),x(n,"yes"),0===i&&window.scrollY<=0?n.dataset.sticky=["fixed"].concat(p(o)).join(":"):n.dataset.sticky=o.join(":")}({stickyContainer:t,stickyContainerHeight:o,containerInitialHeight:e,isSticky:l,startPosition:n,stickyComponents:a}),a.indexOf("auto-hide")>-1&&function(t){var e=t.currentScrollY,n=t.stickyContainer,r=t.containerInitialHeight,i=t.headerInitialHeight,o=t.startPosition,a=t.isSticky,c=t.stickyComponents;a&&e-t.prevScrollY==0&&s((function(){return"0px"})),a?-1===n.dataset.sticky.indexOf("yes")&&e>2*i+o&&(n.dataset.sticky=["yes"].concat(k(c)).join(":"),y({stickyContainer:n,startPosition:o}),m({stickyContainer:n,containerInitialHeight:r,startPosition:o}),x(n,"no"),document.body.removeAttribute("style")):(Array.from(n.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(n.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),n.dataset.sticky=k(c).join(":"),x(n,"yes"),s((function(){return"0px"})),w=null),null===w&&(w=1e3);var l=w+t.prevScrollY-e,u=0;if(e>2*i+o||n.dataset.sticky.indexOf("yes")>-1){if(e<=o)u=0;else if(e>t.prevScrollY){var d=v({stickyContainer:n}).stickyContainerHeightAbsolute;u=Math.abs(l)>d?-d:l}else u=l>0?0:l;n.style.transform="translateY(".concat(u,"px)"),w=u}else n.removeAttribute("style");n.dataset.sticky.indexOf("yes")>-1&&(e<=o||e>t.prevScrollY||(y({stickyContainer:n,startPosition:o}),m({stickyContainer:n,containerInitialHeight:r,startPosition:o}))),s((function(){var t=v({stickyContainer:n}).stickyContainerHeight;return"".concat(t-Math.abs(u),"px")}))}({stickyContainer:t,isSticky:l,startPosition:n,stickyComponents:a,containerInitialHeight:e,stickyContainerHeight:o,headerInitialHeight:i,currentScrollY:u,prevScrollY:Y}),(a.indexOf("slide")>-1||a.indexOf("fade")>-1)&&function(t){var e=t.stickyContainer,n=t.startPosition,r=t.stickyComponents;t.isSticky?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(S(r)).join(":"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}),1)),x(e,"no")):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-n)>10?(e.dataset.sticky=r.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),x(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(S(r)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=r.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),x(e,"yes")}),200)}))))}({stickyContainer:t,isSticky:l,startPosition:n,stickyComponents:a}),Y=u}}},E=function(){document.querySelector("header [data-sticky]")&&(window.addEventListener("resize",(function(t){q(t),n().trigger("ct:header:update")}),!1),window.addEventListener("orientationchange",(function(t){q(t),n().trigger("ct:header:update")})),window.addEventListener("scroll",q,!1),window.addEventListener("load",q,!1),q())};document.body.className.indexOf("e-preview")>-1?setTimeout((function(){E()}),500):E(),(0,r.registerDynamicChunk)("blocksy_sticky_header",{mount:function(t){}})}();
|
1 |
+
!function(){"use strict";var t={n:function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.ctEvents,n=t.n(e),r=window.ctFrontend,i=function(t,e,n){return Math.max(t,Math.min(e,n))},o=function(t,e,n){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(n-t[0])},a=function(t){if(t.blcInitialHeight)return t.blcInitialHeight;var e=t.firstElementChild;t.firstElementChild.firstElementChild&&(e=t.firstElementChild.firstElementChild);var n=e.getBoundingClientRect().height;return t.blcInitialHeight=n,n},c=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t.blcStickyHeight)return t.blcStickyHeight;var n=a(t),r=getComputedStyle(t),i=getComputedStyle(t.firstElementChild);if(t.closest('[data-sticky*="yes"]')){var o=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth)+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);e||(o=0);var c=t.getBoundingClientRect().height-o;if(c!==n)return t.blcStickyHeight=t.getBoundingClientRect().height,c}var s=100;return t.dataset.row.includes("middle")&&(s=r.getPropertyValue("--sticky-shrink")),s&&(n*=parseFloat(s)/100),n},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return 0},e=document.querySelector(".ct-floating-bar");e&&e.style.setProperty("--header-sticky-height-animated",t())};function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var u=null,d=function(){u=null},y=function(t){var e,n=t.stickyContainer,r=t.startPosition;(e=n.querySelectorAll('[data-row*="middle"]'),function(t){if(Array.isArray(t))return l(t)}(e)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),n=function(t){var e=t.logo,n=t.row;if(u)return u;var r=parseFloat(getComputedStyle(e).getPropertyValue("--logo-max-height")||50),i=parseFloat(getComputedStyle(e).getPropertyValue("--logo-sticky-shrink").toString().replace(",",".")||1),o=a(n),s=c(n);return u={initialHeight:r,stickyShrink:i,rowInitialHeight:o,rowStickyHeight:s}}({logo:e,row:t}),s=n.initialHeight,l=n.stickyShrink,d=n.rowInitialHeight,y=n.rowStickyHeight,f=s*l;1!==l&&e.style.setProperty("--logo-shrink-height","".concat(o([r,r+Math.abs(d===y?s-f:d-y)],[1,l],i(r,r+Math.abs(d===y?s-f:d-y),scrollY))*s,"px"))}}))},f=null,h=function(){f=null},m=function(t){var e=t.stickyContainer,n=(t.containerInitialHeight,t.startPosition);e.querySelector('[data-row*="middle"]')&&[e.querySelector('[data-row*="middle"]')].map((function(t){var e=function(t){var e=t.row;if(f)return f;var n=a(e),r=c(e);return f={rowInitialHeight:n,rowStickyHeight:r}}({row:t}),r=e.rowInitialHeight,s=e.rowStickyHeight;if(r!==s){var l;l=o([n,n+Math.abs(r-s)],[r,s],i(n,n+Math.abs(r-s),scrollY)),t.style.setProperty("--shrink-height","".concat(l,"px"))}}))};function p(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function k(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var b=function(t){var e=t.stickyContainer,n=k(e.querySelectorAll("[data-row]")).reduce((function(t,e){return t+c(e,!1)}),0);return{stickyContainerHeight:n,stickyContainerHeightAbsolute:n+parseFloat(getComputedStyle(e).top)}},w=null;function S(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return A(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function C(t){return function(t){if(Array.isArray(t))return O(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return O(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var x=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(t.querySelectorAll("[data-row][data-transparent-row]")).map((function(t){t.dataset.transparentRow=e}))},I=null,j=null,H=null,P=null;n().on("blocksy:sticky:compute",(function(){setTimeout((function(){h(),d(),I=null,j=null,H=null,P=null,Y=null,q()}),100)})),window.wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(t){setTimeout((function(){h(),d(),I=null,j=null,H=null,P=null,Y=null,q()}),500)}));var Y=null,q=function(){if(Y!==scrollY){var t=document.querySelector('[data-device="'.concat((0,r.getCurrentScreen)(),'"] [data-sticky]'));if(t){var e=j;e||(e=j=Array.from(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0),t.parentNode.style.height="".concat(e,"px"));var n=I;null===n&&(n=function(t){if(-1===t.dataset.sticky.indexOf("shrink")&&-1===t.dataset.sticky.indexOf("auto-hide"))return t.parentNode.getBoundingClientRect().height+200;var e=t.closest("header").getBoundingClientRect().top+scrollY;if(e>0){var n=document.elementFromPoint(0,3);n&&function(t){for(var e=[];t&&t!==document;t=t.parentNode)e.push(t);return e}(n).map((function(t){return getComputedStyle(t).position})).indexOf("fixed")>-1&&(e-=n.getBoundingClientRect().height)}var r=t.parentNode,i=getComputedStyle(document.body),o=parseFloat(i.getPropertyValue("--header-sticky-offset")||0);if(o+=parseFloat(i.getPropertyValue("--frame-size"))||0,1===r.parentNode.children.length||r.parentNode.children[0].classList.contains("ct-sticky-container"))return e>0?e-o:e;var a=Array.from(r.parentNode.children).reduce((function(t,e,n){return t.indexOf(0)>-1||!e.dataset.row?[].concat(C(t),[0]):[].concat(C(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),e);return a>0?a-o:a}(t),I=n);var i=H;null===i&&(i=t.closest("[data-device]").getBoundingClientRect().height,H=i);var o=P,a=t.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t&&"fixed"!==t}));o||(o=parseInt(t.getBoundingClientRect().height),P=parseInt(o),s((function(){return-1===a.indexOf("auto-hide")?"".concat(C(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+c(e)}),0),"px"):"0px"})));var l=n>0&&Math.abs(window.scrollY-n)<5||window.scrollY>n;a.indexOf("shrink")>-1&&(l=n>0?window.scrollY>=n:window.scrollY>0),setTimeout((function(){l&&-1===document.body.dataset.header.indexOf("shrink")&&(document.body.dataset.header="".concat(document.body.dataset.header,":shrink")),!l&&document.body.dataset.header.indexOf("shrink")>-1&&(document.body.dataset.header=document.body.dataset.header.replace(":shrink",""))}),300);var u=scrollY;a.indexOf("shrink")>-1&&function(t){var e=t.containerInitialHeight,n=t.stickyContainer,r=t.isSticky,i=t.startPosition,o=t.stickyComponents;if(0===i&&0===window.scrollY&&(n.dataset.sticky=["fixed"].concat(p(o)).join(":")),r){if(o.indexOf("yes")>-1)return;-1===n.dataset.sticky.indexOf("yes")&&(x(n,"no"),n.dataset.sticky=["yes"].concat(p(o)).join(":")),y({stickyContainer:n,startPosition:i}),m({stickyContainer:n,containerInitialHeight:e,startPosition:i})}else Array.from(n.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(n.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),x(n,"yes"),0===i&&window.scrollY<=0?n.dataset.sticky=["fixed"].concat(p(o)).join(":"):n.dataset.sticky=o.join(":")}({stickyContainer:t,stickyContainerHeight:o,containerInitialHeight:e,isSticky:l,startPosition:n,stickyComponents:a}),a.indexOf("auto-hide")>-1&&function(t){var e=t.currentScrollY,n=t.stickyContainer,r=t.containerInitialHeight,i=t.headerInitialHeight,o=t.startPosition,a=t.isSticky,c=t.stickyComponents;a&&e-t.prevScrollY==0&&s((function(){return"0px"})),a?-1===n.dataset.sticky.indexOf("yes")&&e>2*i+o&&(n.dataset.sticky=["yes"].concat(k(c)).join(":"),y({stickyContainer:n,startPosition:o}),m({stickyContainer:n,containerInitialHeight:r,startPosition:o}),x(n,"no"),document.body.removeAttribute("style")):(Array.from(n.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(n.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),n.dataset.sticky=k(c).join(":"),x(n,"yes"),s((function(){return"0px"})),w=null),null===w&&(w=1e3);var l=w+t.prevScrollY-e,u=0;if(e>2*i+o||n.dataset.sticky.indexOf("yes")>-1){if(e<=o)u=0;else if(e>t.prevScrollY){var d=b({stickyContainer:n}).stickyContainerHeightAbsolute;u=Math.abs(l)>d?-d:l}else u=l>0?0:l;n.style.transform="translateY(".concat(u,"px)"),w=u}else n.removeAttribute("style");n.dataset.sticky.indexOf("yes")>-1&&(e<=o||e>t.prevScrollY||(y({stickyContainer:n,startPosition:o}),m({stickyContainer:n,containerInitialHeight:r,startPosition:o}))),s((function(){var t=b({stickyContainer:n}).stickyContainerHeight;return"".concat(t-Math.abs(u),"px")}))}({stickyContainer:t,isSticky:l,startPosition:n,stickyComponents:a,containerInitialHeight:e,stickyContainerHeight:o,headerInitialHeight:i,currentScrollY:u,prevScrollY:Y}),(a.indexOf("slide")>-1||a.indexOf("fade")>-1)&&function(t){var e=t.stickyContainer,n=t.startPosition,r=t.stickyComponents;t.isSticky?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(S(r)).join(":"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}),1)),x(e,"no")):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-n)>10?(e.dataset.sticky=r.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),x(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(S(r)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=r.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),x(e,"yes")}),200)}))))}({stickyContainer:t,isSticky:l,startPosition:n,stickyComponents:a}),Y=u}}},E=function(){document.querySelector("header [data-sticky]")&&(window.addEventListener("resize",(function(t){q(t),n().trigger("ct:header:update")}),!1),window.addEventListener("orientationchange",(function(t){q(t),n().trigger("ct:header:update")})),window.addEventListener("scroll",q,!1),window.addEventListener("load",q,!1),q())};document.body.className.indexOf("e-preview")>-1?setTimeout((function(){E()}),500):E(),(0,r.registerDynamicChunk)("blocksy_sticky_header",{mount:function(t){}})}();
|
static/js/frontend/account.js
CHANGED
@@ -183,6 +183,14 @@ export const handleAccountModal = (el) => {
|
|
183 |
},
|
184 |
true
|
185 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
|
187 |
if (maybeLogin) {
|
188 |
maybeLogin.addEventListener('submit', (e) => {
|
183 |
},
|
184 |
true
|
185 |
)
|
186 |
+
;[...el.querySelectorAll('.show-password-input')].map((eye) => {
|
187 |
+
eye.addEventListener('click', (e) => {
|
188 |
+
eye.previousElementSibling.type =
|
189 |
+
eye.previousElementSibling.type === 'password'
|
190 |
+
? 'text'
|
191 |
+
: 'password'
|
192 |
+
})
|
193 |
+
})
|
194 |
|
195 |
if (maybeLogin) {
|
196 |
maybeLogin.addEventListener('submit', (e) => {
|
static/js/frontend/account/captcha.js
CHANGED
@@ -81,7 +81,11 @@ export const resetCaptchaFor = (container) => {
|
|
81 |
|
82 |
export const reCreateCaptchaFor = (el) => {
|
83 |
;[...el.querySelectorAll('.g-recaptcha, .anr_captcha_field')].map((el) => {
|
|
|
|
|
|
|
|
|
84 |
el.innerHTML = ''
|
85 |
-
grecaptcha.render(el)
|
86 |
})
|
87 |
}
|
81 |
|
82 |
export const reCreateCaptchaFor = (el) => {
|
83 |
;[...el.querySelectorAll('.g-recaptcha, .anr_captcha_field')].map((el) => {
|
84 |
+
if (el.gID) {
|
85 |
+
return
|
86 |
+
}
|
87 |
+
|
88 |
el.innerHTML = ''
|
89 |
+
el.gID = grecaptcha.render(el)
|
90 |
})
|
91 |
}
|
static/js/frontend/sticky/auto-hide.js
CHANGED
@@ -12,7 +12,7 @@ import { shrinkHandleMiddleRow } from './shrink-handle-middle-row'
|
|
12 |
const getData = ({ stickyContainer }) => {
|
13 |
const stickyContainerHeight = [
|
14 |
...stickyContainer.querySelectorAll('[data-row]'),
|
15 |
-
].reduce((res, row) => res + getRowStickyHeight(row), 0)
|
16 |
|
17 |
return {
|
18 |
stickyContainerHeight,
|
12 |
const getData = ({ stickyContainer }) => {
|
13 |
const stickyContainerHeight = [
|
14 |
...stickyContainer.querySelectorAll('[data-row]'),
|
15 |
+
].reduce((res, row) => res + getRowStickyHeight(row, false), 0)
|
16 |
|
17 |
return {
|
18 |
stickyContainerHeight,
|
static/js/frontend/sticky/shrink-utils.js
CHANGED
@@ -27,7 +27,7 @@ export const getRowInitialHeight = (el) => {
|
|
27 |
return initialHeight
|
28 |
}
|
29 |
|
30 |
-
export const getRowStickyHeight = (el) => {
|
31 |
if (el.blcStickyHeight) {
|
32 |
return el.blcStickyHeight
|
33 |
}
|
@@ -44,6 +44,10 @@ export const getRowStickyHeight = (el) => {
|
|
44 |
parseFloat(containerStyles.borderTopWidth) +
|
45 |
parseFloat(containerStyles.borderBottomWidth)
|
46 |
|
|
|
|
|
|
|
|
|
47 |
let stickyHeight = el.getBoundingClientRect().height - borderHeight
|
48 |
|
49 |
if (stickyHeight !== rowStickyHeight) {
|
27 |
return initialHeight
|
28 |
}
|
29 |
|
30 |
+
export const getRowStickyHeight = (el, hasBorder = true) => {
|
31 |
if (el.blcStickyHeight) {
|
32 |
return el.blcStickyHeight
|
33 |
}
|
44 |
parseFloat(containerStyles.borderTopWidth) +
|
45 |
parseFloat(containerStyles.borderBottomWidth)
|
46 |
|
47 |
+
if (!hasBorder) {
|
48 |
+
borderHeight = 0
|
49 |
+
}
|
50 |
+
|
51 |
let stickyHeight = el.getBoundingClientRect().height - borderHeight
|
52 |
|
53 |
if (stickyHeight !== rowStickyHeight) {
|
static/sass/account-lazy.scss
CHANGED
@@ -2,9 +2,6 @@
|
|
2 |
|
3 |
// account modal
|
4 |
#account-modal {
|
5 |
-
// --horizontal-alignment: center;
|
6 |
-
// --vertical-alignment: center;
|
7 |
-
|
8 |
background-color: rgba(18, 21, 25, 0.6);
|
9 |
}
|
10 |
|
2 |
|
3 |
// account modal
|
4 |
#account-modal {
|
|
|
|
|
|
|
5 |
background-color: rgba(18, 21, 25, 0.6);
|
6 |
}
|
7 |
|