Version Description
- 09.12.2022 =
- Pro : Option for display V3 on all pages
- Update : BWS Panel section was updated.
- Bugfix : Minor bugs fixed.
Download this release
Release Info
Developer | bestwebsoft |
Plugin | Google Captcha (reCAPTCHA) by BestWebSoft |
Version | 1.70 |
Comparing to | |
See all releases |
Code changes from version 1.68 to 1.70
- bws_menu/bws_functions.php +8 -5
- bws_menu/bws_menu.php +12 -4
- bws_menu/class-bws-settings.php +8 -8
- bws_menu/css/codemirror.css +0 -275
- bws_menu/js/codemirror.js +0 -5
- bws_menu/product_list.php +5 -5
- google-captcha.php +2 -2
- includes/allowlist.php +152 -114
- includes/class-gglcptch-settings-tabs.php +262 -194
- includes/forms.php +72 -57
- includes/pro_banners.php +152 -92
- js/script.js +8 -0
- languages/google-captcha-ru_RU.mo +0 -0
- languages/google-captcha-ru_RU.po +302 -322
- languages/google-captcha-uk.mo +0 -0
- languages/google-captcha-uk.po +302 -323
- readme.txt +29 -13
bws_menu/bws_functions.php
CHANGED
@@ -828,6 +828,10 @@ if ( ! function_exists( 'bws_admin_enqueue_scripts' ) ) {
|
|
828 |
}
|
829 |
}
|
830 |
|
|
|
|
|
|
|
|
|
831 |
if ( ! empty( $bws_shortcode_list ) ) {
|
832 |
/* TinyMCE Shortcode Plugin */
|
833 |
$script = "var bws_shortcode_button = {
|
@@ -909,7 +913,10 @@ if ( ! function_exists( 'bws_plugins_admin_head' ) ) {
|
|
909 |
*/
|
910 |
if ( ! function_exists( 'bws_plugins_admin_footer' ) ) {
|
911 |
function bws_plugins_admin_footer() {
|
912 |
-
|
|
|
|
|
|
|
913 |
}
|
914 |
}
|
915 |
|
@@ -924,11 +931,7 @@ if ( ! function_exists( 'bws_plugins_include_codemirror' ) ) {
|
|
924 |
if ( version_compare( $wp_version, '4.9.0', '>=' ) ) {
|
925 |
wp_enqueue_style( 'wp-codemirror' );
|
926 |
wp_enqueue_script( 'wp-codemirror' );
|
927 |
-
} else {
|
928 |
-
wp_enqueue_style( 'codemirror.css', bws_menu_url( 'css/codemirror.css' ), array(), '2.4.2' );
|
929 |
-
wp_enqueue_script( 'codemirror.js', bws_menu_url( 'js/codemirror.js' ), array( 'jquery' ), '2.4.2' );
|
930 |
}
|
931 |
-
|
932 |
}
|
933 |
}
|
934 |
|
828 |
}
|
829 |
}
|
830 |
|
831 |
+
if ( 'multilanguage-languages.php' === $page ) {
|
832 |
+
wp_enqueue_style( 'bws-modal-css', bws_menu_url( 'css/modal.css' ) );
|
833 |
+
}
|
834 |
+
|
835 |
if ( ! empty( $bws_shortcode_list ) ) {
|
836 |
/* TinyMCE Shortcode Plugin */
|
837 |
$script = "var bws_shortcode_button = {
|
913 |
*/
|
914 |
if ( ! function_exists( 'bws_plugins_admin_footer' ) ) {
|
915 |
function bws_plugins_admin_footer() {
|
916 |
+
$screen = get_current_screen();
|
917 |
+
if ( $screen->parent_base == 'edit' ) {
|
918 |
+
bws_shortcode_media_button_popup();
|
919 |
+
}
|
920 |
}
|
921 |
}
|
922 |
|
931 |
if ( version_compare( $wp_version, '4.9.0', '>=' ) ) {
|
932 |
wp_enqueue_style( 'wp-codemirror' );
|
933 |
wp_enqueue_script( 'wp-codemirror' );
|
|
|
|
|
|
|
934 |
}
|
|
|
935 |
}
|
936 |
}
|
937 |
|
bws_menu/bws_menu.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Function for displaying BestWebSoft menu
|
4 |
-
* Version: 2.4.
|
5 |
*/
|
6 |
|
7 |
if ( ! function_exists( 'bws_admin_enqueue_scripts' ) ) {
|
@@ -567,8 +567,12 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
|
|
567 |
}
|
568 |
|
569 |
$key_plugin_explode = explode( '/', $key_plugin );
|
|
|
|
|
|
|
|
|
|
|
570 |
|
571 |
-
$icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-256x256.png';
|
572 |
$is_pro_isset = isset( $value_plugin['pro_version'] );
|
573 |
$is_installed = array_key_exists( $key_plugin, $all_plugins );
|
574 |
$is_active = in_array( $key_plugin, $active_plugins ) || isset( $sitewide_active_plugins[ $key_plugin ] );
|
@@ -584,7 +588,11 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
|
|
584 |
continue;
|
585 |
}
|
586 |
|
587 |
-
|
|
|
|
|
|
|
|
|
588 |
|
589 |
$nothing_found = false;
|
590 |
?>
|
@@ -841,7 +849,7 @@ if ( ! function_exists( 'bws_get_banner_array' ) ) {
|
|
841 |
array( 'zndskhc_hide_banner_on_plugin_page', 'zendesk-help-center/zendesk-help-center.php', '1.0.0' ),
|
842 |
array( 'gglcptch_hide_banner_on_plugin_page', 'google-captcha/google-captcha.php', '1.18' ),
|
843 |
array( 'mltlngg_hide_banner_on_plugin_page', 'multilanguage/multilanguage.php', '1.1.1' ),
|
844 |
-
array( 'adsns_hide_banner_on_plugin_page', 'adsense-
|
845 |
array( 'vstrsnln_hide_banner_on_plugin_page', 'visitors-online/visitors-online.php', '0.2' ),
|
846 |
array( 'cstmsrch_hide_banner_on_plugin_page', 'custom-search-plugin/custom-search-plugin.php', '1.28' ),
|
847 |
array( 'prtfl_hide_banner_on_plugin_page', 'portfolio/portfolio.php', '2.33' ),
|
1 |
<?php
|
2 |
/**
|
3 |
* Function for displaying BestWebSoft menu
|
4 |
+
* Version: 2.4.3
|
5 |
*/
|
6 |
|
7 |
if ( ! function_exists( 'bws_admin_enqueue_scripts' ) ) {
|
567 |
}
|
568 |
|
569 |
$key_plugin_explode = explode( '/', $key_plugin );
|
570 |
+
if ( in_array( $key_plugin_explode[0], array( 'car-rental', 'contact-form-multi', 'custom-admin-page', 'adsense-plugin', 'zendesk-help-center', 'bws-adsense' ) ) ) {
|
571 |
+
$icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-256x256.png';
|
572 |
+
} else {
|
573 |
+
$icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-256x256.gif';
|
574 |
+
}
|
575 |
|
|
|
576 |
$is_pro_isset = isset( $value_plugin['pro_version'] );
|
577 |
$is_installed = array_key_exists( $key_plugin, $all_plugins );
|
578 |
$is_active = in_array( $key_plugin, $active_plugins ) || isset( $sitewide_active_plugins[ $key_plugin ] );
|
588 |
continue;
|
589 |
}
|
590 |
|
591 |
+
if ( is_multisite() ) {
|
592 |
+
$link_attr = isset( $value_plugin['install_url'] ) ? 'href="' . esc_url( $value_plugin['install_url'] ) . '" target="_blank"' : 'href="' . esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $key_plugin_explode[0] . '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal"';
|
593 |
+
} else {
|
594 |
+
$link_attr = isset( $value_plugin['install_url'] ) ? 'href="' . esc_url( $value_plugin['install_url'] ) . '" target="_blank"' : 'href="' . esc_url( self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $key_plugin_explode[0] . '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal"';
|
595 |
+
}
|
596 |
|
597 |
$nothing_found = false;
|
598 |
?>
|
849 |
array( 'zndskhc_hide_banner_on_plugin_page', 'zendesk-help-center/zendesk-help-center.php', '1.0.0' ),
|
850 |
array( 'gglcptch_hide_banner_on_plugin_page', 'google-captcha/google-captcha.php', '1.18' ),
|
851 |
array( 'mltlngg_hide_banner_on_plugin_page', 'multilanguage/multilanguage.php', '1.1.1' ),
|
852 |
+
array( 'adsns_hide_banner_on_plugin_page', 'bws-adsense/bws-adsense.php', '1.36' ),
|
853 |
array( 'vstrsnln_hide_banner_on_plugin_page', 'visitors-online/visitors-online.php', '0.2' ),
|
854 |
array( 'cstmsrch_hide_banner_on_plugin_page', 'custom-search-plugin/custom-search-plugin.php', '1.28' ),
|
855 |
array( 'prtfl_hide_banner_on_plugin_page', 'portfolio/portfolio.php', '2.33' ),
|
bws_menu/class-bws-settings.php
CHANGED
@@ -178,7 +178,7 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
178 |
<div id="misc-publishing-actions">
|
179 |
<?php
|
180 |
/**
|
181 |
-
* Action - Display additional content for #misc-publishing-
|
182 |
*/
|
183 |
do_action( __CLASS__ . '_information_postbox_top' );
|
184 |
?>
|
@@ -222,15 +222,15 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
222 |
</div><!-- .misc-pub-section -->
|
223 |
<?php
|
224 |
/**
|
225 |
-
* Action - Display additional content for #misc-publishing-
|
226 |
*/
|
227 |
do_action( __CLASS__ . '_information_postbox_bottom' );
|
228 |
?>
|
229 |
</div>
|
230 |
<div class="clear"></div>
|
231 |
</div>
|
232 |
-
<div id="major-publishing-
|
233 |
-
<div id="publishing-
|
234 |
<input type="hidden" name="<?php echo esc_attr( $this->prefix ); ?>_form_submit" value="submit" />
|
235 |
<input id="bws-submit-button" type="submit" class="button button-primary button-large" value="<?php esc_html_e( 'Save Changes', 'bestwebsoft' ); ?>" />
|
236 |
<?php wp_nonce_field( $this->plugin_basename, 'bws_nonce_name' ); ?>
|
@@ -526,12 +526,12 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
526 |
* @access private
|
527 |
*/
|
528 |
private function tab_custom_code() {
|
529 |
-
global $
|
530 |
?>
|
531 |
<h3 class="bws_tab_label"><?php esc_html_e( 'Custom Code', 'bestwebsoft' ); ?></h3>
|
532 |
<?php
|
533 |
$this->help_phrase();
|
534 |
-
$bws_hide_premium = bws_hide_premium_options_check( $
|
535 |
?>
|
536 |
<hr>
|
537 |
<h4><?php esc_html_e( 'The ability to add custom code is available in the Pro version. If the Pro version is not available please contact us via Help Center', 'bestwebsoft' ); ?> (<a href="<?php echo esc_url( 'https://support.bestwebsoft.com/hc/en-us/requests/new' ); ?>"><?php echo esc_url( 'https://support.bestwebsoft.com/hc/en-us/requests/new' ); ?></a>)</h4>
|
@@ -603,7 +603,7 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
603 |
</div>
|
604 |
</div>
|
605 |
<div class="bws_pro_version_tooltip">
|
606 |
-
<a class="bws_button" href="<?php echo esc_url( $this->plugins_info['PluginURI'] ); ?>?k=<?php echo esc_attr( $this->link_key ); ?>&pn=<?php echo esc_attr( $this->link_pn ); ?>&v=<?php echo esc_attr( $this->plugins_info['Version'] ); ?>&wp_v=<?php echo esc_attr( $wp_version ); ?>" target="_blank" title="
|
607 |
<div class="clear"></div>
|
608 |
</div>
|
609 |
</div>
|
@@ -611,7 +611,7 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
|
|
611 |
} else {
|
612 |
?>
|
613 |
<div class="bws_pro_version_tooltip">
|
614 |
-
<a class="bws_button" href="<?php echo esc_url( $this->plugins_info['PluginURI'] ); ?>?k=<?php echo esc_attr( $this->link_key ); ?>&pn=<?php echo esc_attr( $this->link_pn ); ?>&v=<?php echo esc_attr( $this->plugins_info['Version'] ); ?>&wp_v=<?php echo esc_attr( $wp_version ); ?>" target="_blank" title="
|
615 |
<div class="clear"></div>
|
616 |
</div>
|
617 |
<?php
|
178 |
<div id="misc-publishing-actions">
|
179 |
<?php
|
180 |
/**
|
181 |
+
* Action - Display additional content for #misc-publishing-actions
|
182 |
*/
|
183 |
do_action( __CLASS__ . '_information_postbox_top' );
|
184 |
?>
|
222 |
</div><!-- .misc-pub-section -->
|
223 |
<?php
|
224 |
/**
|
225 |
+
* Action - Display additional content for #misc-publishing-actions
|
226 |
*/
|
227 |
do_action( __CLASS__ . '_information_postbox_bottom' );
|
228 |
?>
|
229 |
</div>
|
230 |
<div class="clear"></div>
|
231 |
</div>
|
232 |
+
<div id="major-publishing-actions">
|
233 |
+
<div id="publishing-action">
|
234 |
<input type="hidden" name="<?php echo esc_attr( $this->prefix ); ?>_form_submit" value="submit" />
|
235 |
<input id="bws-submit-button" type="submit" class="button button-primary button-large" value="<?php esc_html_e( 'Save Changes', 'bestwebsoft' ); ?>" />
|
236 |
<?php wp_nonce_field( $this->plugin_basename, 'bws_nonce_name' ); ?>
|
526 |
* @access private
|
527 |
*/
|
528 |
private function tab_custom_code() {
|
529 |
+
global $bstwbsftwppdtplgns_options, $wp_version;
|
530 |
?>
|
531 |
<h3 class="bws_tab_label"><?php esc_html_e( 'Custom Code', 'bestwebsoft' ); ?></h3>
|
532 |
<?php
|
533 |
$this->help_phrase();
|
534 |
+
$bws_hide_premium = bws_hide_premium_options_check( $bstwbsftwppdtplgns_options );
|
535 |
?>
|
536 |
<hr>
|
537 |
<h4><?php esc_html_e( 'The ability to add custom code is available in the Pro version. If the Pro version is not available please contact us via Help Center', 'bestwebsoft' ); ?> (<a href="<?php echo esc_url( 'https://support.bestwebsoft.com/hc/en-us/requests/new' ); ?>"><?php echo esc_url( 'https://support.bestwebsoft.com/hc/en-us/requests/new' ); ?></a>)</h4>
|
603 |
</div>
|
604 |
</div>
|
605 |
<div class="bws_pro_version_tooltip">
|
606 |
+
<a class="bws_button" href="<?php echo esc_url( $this->plugins_info['PluginURI'] ); ?>?k=<?php echo esc_attr( $this->link_key ); ?>&pn=<?php echo esc_attr( $this->link_pn ); ?>&v=<?php echo esc_attr( $this->plugins_info['Version'] ); ?>&wp_v=<?php echo esc_attr( $wp_version ); ?>" target="_blank" title="<?php echo $this->plugins_info["Name"]; ?>">Upgrade to Pro</a>
|
607 |
<div class="clear"></div>
|
608 |
</div>
|
609 |
</div>
|
611 |
} else {
|
612 |
?>
|
613 |
<div class="bws_pro_version_tooltip">
|
614 |
+
<a class="bws_button" href="<?php echo esc_url( $this->plugins_info['PluginURI'] ); ?>?k=<?php echo esc_attr( $this->link_key ); ?>&pn=<?php echo esc_attr( $this->link_pn ); ?>&v=<?php echo esc_attr( $this->plugins_info['Version'] ); ?>&wp_v=<?php echo esc_attr( $wp_version ); ?>" target="_blank" title="<?php echo $this->plugins_info["Name"]; ?>">Upgrade to Pro</a>
|
615 |
<div class="clear"></div>
|
616 |
</div>
|
617 |
<?php
|
bws_menu/css/codemirror.css
DELETED
@@ -1,275 +0,0 @@
|
|
1 |
-
/* custom */
|
2 |
-
.CodeMirror span.bws-readonly {
|
3 |
-
color: #aaa;
|
4 |
-
}
|
5 |
-
/* BASICS */
|
6 |
-
|
7 |
-
.CodeMirror {
|
8 |
-
/* Set height, width, borders, and global font properties here */
|
9 |
-
font-family: monospace;
|
10 |
-
height: 500px;
|
11 |
-
border: 1px solid #ddd;
|
12 |
-
}
|
13 |
-
.CodeMirror-scroll {
|
14 |
-
/* Set scrolling behaviour here */
|
15 |
-
overflow: auto;
|
16 |
-
}
|
17 |
-
|
18 |
-
/* PADDING */
|
19 |
-
|
20 |
-
.CodeMirror-lines {
|
21 |
-
padding: 4px 0; /* Vertical padding around content */
|
22 |
-
}
|
23 |
-
.CodeMirror pre {
|
24 |
-
padding: 0 4px; /* Horizontal padding of content */
|
25 |
-
}
|
26 |
-
|
27 |
-
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
28 |
-
background-color: white; /* The little square between H and V scrollbars */
|
29 |
-
}
|
30 |
-
|
31 |
-
/* GUTTER */
|
32 |
-
|
33 |
-
.CodeMirror-gutters {
|
34 |
-
border-right: 1px solid #ddd;
|
35 |
-
background-color: #f7f7f7;
|
36 |
-
white-space: nowrap;
|
37 |
-
}
|
38 |
-
.CodeMirror-linenumbers {}
|
39 |
-
.CodeMirror-linenumber {
|
40 |
-
padding: 0 3px 0 5px;
|
41 |
-
min-width: 20px;
|
42 |
-
text-align: right;
|
43 |
-
color: #999;
|
44 |
-
-moz-box-sizing: content-box;
|
45 |
-
box-sizing: content-box;
|
46 |
-
}
|
47 |
-
|
48 |
-
/* CURSOR */
|
49 |
-
|
50 |
-
.CodeMirror div.CodeMirror-cursor {
|
51 |
-
border-left: 1px solid black;
|
52 |
-
}
|
53 |
-
/* Shown when moving in bi-directional text */
|
54 |
-
.CodeMirror div.CodeMirror-secondarycursor {
|
55 |
-
border-left: 1px solid silver;
|
56 |
-
}
|
57 |
-
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
|
58 |
-
width: auto;
|
59 |
-
border: 0;
|
60 |
-
background: #7e7;
|
61 |
-
}
|
62 |
-
/* Can style cursor different in overwrite (non-insert) mode */
|
63 |
-
div.CodeMirror-overwrite div.CodeMirror-cursor {}
|
64 |
-
|
65 |
-
.cm-tab { display: inline-block; }
|
66 |
-
|
67 |
-
.CodeMirror-ruler {
|
68 |
-
border-left: 1px solid #ccc;
|
69 |
-
position: absolute;
|
70 |
-
}
|
71 |
-
|
72 |
-
/* DEFAULT THEME */
|
73 |
-
|
74 |
-
.cm-s-default .cm-keyword {color: #708;}
|
75 |
-
.cm-s-default .cm-atom {color: #219;}
|
76 |
-
.cm-s-default .cm-number {color: #164;}
|
77 |
-
.cm-s-default .cm-def {color: #00f;}
|
78 |
-
.cm-s-default .cm-variable {color: black;}
|
79 |
-
.cm-s-default .cm-variable-2 {color: #05a;}
|
80 |
-
.cm-s-default .cm-variable-3 {color: #085;}
|
81 |
-
.cm-s-default .cm-property {color: black;}
|
82 |
-
.cm-s-default .cm-operator {color: black;}
|
83 |
-
.cm-s-default .cm-comment {color: #a50;}
|
84 |
-
.cm-s-default .cm-string {color: #a11;}
|
85 |
-
.cm-s-default .cm-string-2 {color: #f50;}
|
86 |
-
.cm-s-default .cm-meta {color: #555;}
|
87 |
-
.cm-s-default .cm-qualifier {color: #555;}
|
88 |
-
.cm-s-default .cm-builtin {color: #30a;}
|
89 |
-
.cm-s-default .cm-bracket {color: #997;}
|
90 |
-
.cm-s-default .cm-tag {color: #170;}
|
91 |
-
.cm-s-default .cm-attribute {color: #00c;}
|
92 |
-
.cm-s-default .cm-header {color: blue;}
|
93 |
-
.cm-s-default .cm-quote {color: #090;}
|
94 |
-
.cm-s-default .cm-hr {color: #999;}
|
95 |
-
.cm-s-default .cm-link {color: #00c;}
|
96 |
-
|
97 |
-
.cm-negative {color: #d44;}
|
98 |
-
.cm-positive {color: #292;}
|
99 |
-
.cm-header, .cm-strong {font-weight: bold;}
|
100 |
-
.cm-em {font-style: italic;}
|
101 |
-
.cm-link {text-decoration: underline;}
|
102 |
-
|
103 |
-
.cm-s-default .cm-error {color: #f00;}
|
104 |
-
.cm-invalidchar {color: #f00;}
|
105 |
-
|
106 |
-
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
107 |
-
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
108 |
-
.CodeMirror-activeline-background {background: #e8f2ff;}
|
109 |
-
|
110 |
-
/* STOP */
|
111 |
-
|
112 |
-
/* The rest of this file contains styles related to the mechanics of
|
113 |
-
the editor. You probably shouldn't touch them. */
|
114 |
-
|
115 |
-
.CodeMirror {
|
116 |
-
line-height: 1;
|
117 |
-
position: relative;
|
118 |
-
overflow: hidden;
|
119 |
-
background: white;
|
120 |
-
color: black;
|
121 |
-
}
|
122 |
-
|
123 |
-
.CodeMirror-scroll {
|
124 |
-
/* 30px is the magic margin used to hide the element's real scrollbars */
|
125 |
-
/* See overflow: hidden in .CodeMirror */
|
126 |
-
margin-bottom: -30px; margin-right: -30px;
|
127 |
-
padding-bottom: 30px;
|
128 |
-
height: 100%;
|
129 |
-
outline: none; /* Prevent dragging from highlighting the element */
|
130 |
-
position: relative;
|
131 |
-
-moz-box-sizing: content-box;
|
132 |
-
box-sizing: content-box;
|
133 |
-
}
|
134 |
-
.CodeMirror-sizer {
|
135 |
-
position: relative;
|
136 |
-
border-right: 30px solid transparent;
|
137 |
-
-moz-box-sizing: content-box;
|
138 |
-
box-sizing: content-box;
|
139 |
-
}
|
140 |
-
|
141 |
-
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
142 |
-
before actuall scrolling happens, thus preventing shaking and
|
143 |
-
flickering artifacts. */
|
144 |
-
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
145 |
-
position: absolute;
|
146 |
-
z-index: 6;
|
147 |
-
display: none;
|
148 |
-
}
|
149 |
-
.CodeMirror-vscrollbar {
|
150 |
-
right: 0; top: 0;
|
151 |
-
overflow-x: hidden;
|
152 |
-
overflow-y: scroll;
|
153 |
-
}
|
154 |
-
.CodeMirror-hscrollbar {
|
155 |
-
bottom: 0; left: 0;
|
156 |
-
overflow-y: hidden;
|
157 |
-
overflow-x: scroll;
|
158 |
-
}
|
159 |
-
.CodeMirror-scrollbar-filler {
|
160 |
-
right: 0; bottom: 0;
|
161 |
-
}
|
162 |
-
.CodeMirror-gutter-filler {
|
163 |
-
left: 0; bottom: 0;
|
164 |
-
}
|
165 |
-
|
166 |
-
.CodeMirror-gutters {
|
167 |
-
position: absolute; left: 0; top: 0;
|
168 |
-
padding-bottom: 30px;
|
169 |
-
z-index: 3;
|
170 |
-
}
|
171 |
-
.CodeMirror-gutter {
|
172 |
-
white-space: normal;
|
173 |
-
height: 100%;
|
174 |
-
-moz-box-sizing: content-box;
|
175 |
-
box-sizing: content-box;
|
176 |
-
padding-bottom: 30px;
|
177 |
-
margin-bottom: -32px;
|
178 |
-
display: inline-block;
|
179 |
-
/* Hack to make IE7 behave */
|
180 |
-
*zoom:1;
|
181 |
-
*display:inline;
|
182 |
-
}
|
183 |
-
.CodeMirror-gutter-elt {
|
184 |
-
position: absolute;
|
185 |
-
cursor: default;
|
186 |
-
z-index: 4;
|
187 |
-
}
|
188 |
-
|
189 |
-
.CodeMirror-lines {
|
190 |
-
cursor: text;
|
191 |
-
}
|
192 |
-
.CodeMirror pre {
|
193 |
-
/* Reset some styles that the rest of the page might have set */
|
194 |
-
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
195 |
-
border-width: 0;
|
196 |
-
background: transparent;
|
197 |
-
font-family: inherit;
|
198 |
-
font-size: inherit;
|
199 |
-
margin: 0;
|
200 |
-
white-space: pre;
|
201 |
-
word-wrap: normal;
|
202 |
-
line-height: inherit;
|
203 |
-
color: inherit;
|
204 |
-
z-index: 2;
|
205 |
-
position: relative;
|
206 |
-
overflow: visible;
|
207 |
-
}
|
208 |
-
.CodeMirror-wrap pre {
|
209 |
-
word-wrap: break-word;
|
210 |
-
white-space: pre-wrap;
|
211 |
-
word-break: normal;
|
212 |
-
}
|
213 |
-
|
214 |
-
.CodeMirror-linebackground {
|
215 |
-
position: absolute;
|
216 |
-
left: 0; right: 0; top: 0; bottom: 0;
|
217 |
-
z-index: 0;
|
218 |
-
}
|
219 |
-
|
220 |
-
.CodeMirror-linewidget {
|
221 |
-
position: relative;
|
222 |
-
z-index: 2;
|
223 |
-
overflow: auto;
|
224 |
-
}
|
225 |
-
|
226 |
-
.CodeMirror-widget {}
|
227 |
-
|
228 |
-
.CodeMirror-wrap .CodeMirror-scroll {
|
229 |
-
overflow-x: hidden;
|
230 |
-
}
|
231 |
-
|
232 |
-
.CodeMirror-measure {
|
233 |
-
position: absolute;
|
234 |
-
width: 100%;
|
235 |
-
height: 0;
|
236 |
-
overflow: hidden;
|
237 |
-
visibility: hidden;
|
238 |
-
}
|
239 |
-
.CodeMirror-measure pre { position: static; }
|
240 |
-
|
241 |
-
.CodeMirror div.CodeMirror-cursor {
|
242 |
-
position: absolute;
|
243 |
-
border-right: none;
|
244 |
-
width: 0;
|
245 |
-
}
|
246 |
-
|
247 |
-
div.CodeMirror-cursors {
|
248 |
-
visibility: hidden;
|
249 |
-
position: relative;
|
250 |
-
z-index: 1;
|
251 |
-
}
|
252 |
-
.CodeMirror-focused div.CodeMirror-cursors {
|
253 |
-
visibility: visible;
|
254 |
-
}
|
255 |
-
|
256 |
-
.CodeMirror-selected { background: #d9d9d9; }
|
257 |
-
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
258 |
-
|
259 |
-
.cm-searching {
|
260 |
-
background: #ffa;
|
261 |
-
background: rgba(255, 255, 0, .4);
|
262 |
-
}
|
263 |
-
|
264 |
-
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
265 |
-
.CodeMirror span { *vertical-align: text-bottom; }
|
266 |
-
|
267 |
-
/* Used to force a border model for a node */
|
268 |
-
.cm-force-border { padding-right: .1px; }
|
269 |
-
|
270 |
-
@media print {
|
271 |
-
/* Hide the cursor when printing */
|
272 |
-
.CodeMirror div.CodeMirror-cursors {
|
273 |
-
visibility: hidden;
|
274 |
-
}
|
275 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bws_menu/js/codemirror.js
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
!function(a){if("object"==typeof exports&&"object"==typeof module)module.exports=a();else{if("function"==typeof define&&define.amd)return define([],a);this.CodeMirror=a()}}(function(){"use strict";function z(a,c){if(!(this instanceof z))return new z(a,c);this.options=c=c||{},Fg($d,c,!1),N(c);var d=c.value;"string"==typeof d&&(d=new zf(d,c.mode)),this.doc=d;var e=this.display=new A(a,d);e.wrapper.CodeMirror=this,J(this),H(this),c.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),c.autofocus&&!r&&Rc(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new vg},b&&setTimeout(Gg(Qc,this,!0),20),Uc(this);var f=this;Ac(this,function(){f.curOp.forceUpdate=!0,Df(f,d),c.autofocus&&!r||Rg()==e.input?setTimeout(Gg(vd,f),20):wd(f);for(var a in _d)_d.hasOwnProperty(a)&&_d[a](f,c[a],be);for(var b=0;b<fe.length;++b)fe[b](f)})}function A(a,b){var d=this,e=d.input=Mg("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");h?e.style.width="1000px":e.setAttribute("wrap","off"),q&&(e.style.border="1px solid black"),e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck","false"),d.inputDiv=Mg("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),d.scrollbarH=Mg("div",[Mg("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar"),d.scrollbarV=Mg("div",[Mg("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),d.scrollbarFiller=Mg("div",null,"CodeMirror-scrollbar-filler"),d.gutterFiller=Mg("div",null,"CodeMirror-gutter-filler"),d.lineDiv=Mg("div",null,"CodeMirror-code"),d.selectionDiv=Mg("div",null,null,"position: relative; z-index: 1"),d.cursorDiv=Mg("div",null,"CodeMirror-cursors"),d.measure=Mg("div",null,"CodeMirror-measure"),d.lineMeasure=Mg("div",null,"CodeMirror-measure"),d.lineSpace=Mg("div",[d.measure,d.lineMeasure,d.selectionDiv,d.cursorDiv,d.lineDiv],null,"position: relative; outline: none"),d.mover=Mg("div",[Mg("div",[d.lineSpace],"CodeMirror-lines")],null,"position: relative"),d.sizer=Mg("div",[d.mover],"CodeMirror-sizer"),d.heightForcer=Mg("div",null,null,"position: absolute; height: "+qg+"px; width: 1px;"),d.gutters=Mg("div",null,"CodeMirror-gutters"),d.lineGutter=null,d.scroller=Mg("div",[d.sizer,d.heightForcer,d.gutters],"CodeMirror-scroll"),d.scroller.setAttribute("tabIndex","-1"),d.wrapper=Mg("div",[d.inputDiv,d.scrollbarH,d.scrollbarV,d.scrollbarFiller,d.gutterFiller,d.scroller],"CodeMirror"),c&&(d.gutters.style.zIndex=-1,d.scroller.style.paddingRight=0),q&&(e.style.width="0px"),h||(d.scroller.draggable=!0),m&&(d.inputDiv.style.height="1px",d.inputDiv.style.position="absolute"),c&&(d.scrollbarH.style.minHeight=d.scrollbarV.style.minWidth="18px"),a.appendChild?a.appendChild(d.wrapper):a(d.wrapper),d.viewFrom=d.viewTo=b.first,d.view=[],d.externalMeasured=null,d.viewOffset=0,d.lastSizeC=0,d.updateLineNumbers=null,d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null,d.prevInput="",d.alignWidgets=!1,d.pollingFast=!1,d.poll=new vg,d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null,d.inaccurateSelection=!1,d.maxLine=null,d.maxLineLength=0,d.maxLineChanged=!1,d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null,d.shift=!1}function B(a){a.doc.mode=z.getMode(a.options,a.doc.modeOption),C(a)}function C(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),a.doc.frontier=a.doc.first,Tb(a,100),a.state.modeGen++,a.curOp&&Gc(a)}function D(a){a.options.lineWrapping?(Ug(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth=""):(Tg(a.display.wrapper,"CodeMirror-wrap"),M(a)),F(a),Gc(a),jc(a),setTimeout(function(){P(a)},100)}function E(a){var b=vc(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/wc(a.display)-3);return function(e){if(Ve(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;g<e.widgets.length;g++)e.widgets[g].height&&(f+=e.widgets[g].height);return c?f+(Math.ceil(e.text.length/d)||1)*b:f+b}}function F(a){var b=a.doc,c=E(a);b.iter(function(a){var b=c(a);b!=a.height&&Hf(a,b)})}function G(a){var b=ke[a.options.keyMap],c=b.style;a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(c?" cm-keymap-"+c:"")}function H(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),jc(a)}function I(a){J(a),Gc(a),setTimeout(function(){R(a)},20)}function J(a){var b=a.display.gutters,c=a.options.gutters;Og(b);for(var d=0;d<c.length;++d){var e=c[d],f=b.appendChild(Mg("div",null,"CodeMirror-gutter "+e));"CodeMirror-linenumbers"==e&&(a.display.lineGutter=f,f.style.width=(a.display.lineNumWidth||1)+"px")}b.style.display=d?"":"none",K(a)}function K(a){var b=a.display.gutters.offsetWidth;a.display.sizer.style.marginLeft=b+"px",a.display.scrollbarH.style.left=a.options.fixedGutter?b+"px":0}function L(a){if(0==a.height)return 0;for(var c,b=a.text.length,d=a;c=Oe(d);){var e=c.find(0,!0);d=e.from.line,b+=e.from.ch-e.to.ch}for(d=a;c=Pe(d);){var e=c.find(0,!0);b-=d.text.length-e.from.ch,d=e.to.line,b+=d.text.length-e.to.ch}return b}function M(a){var b=a.display,c=a.doc;b.maxLine=Ef(c,c.first),b.maxLineLength=L(b.maxLine),b.maxLineChanged=!0,c.iter(function(a){var c=L(a);c>b.maxLineLength&&(b.maxLineLength=c,b.maxLine=a)})}function N(a){var b=Cg(a.gutters,"CodeMirror-linenumbers");-1==b&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):b>-1&&!a.lineNumbers&&(a.gutters=a.gutters.slice(0),a.gutters.splice(b,1))}function O(a){var b=a.display.scroller;return{clientHeight:b.clientHeight,barHeight:a.display.scrollbarV.clientHeight,scrollWidth:b.scrollWidth,clientWidth:b.clientWidth,barWidth:a.display.scrollbarH.clientWidth,docHeight:Math.round(a.doc.height+Yb(a.display))}}function P(a,b){b||(b=O(a));var c=a.display,d=b.docHeight+qg,e=b.scrollWidth>b.clientWidth,f=d>b.clientHeight;if(f?(c.scrollbarV.style.display="block",c.scrollbarV.style.bottom=e?Yg(c.measure)+"px":"0",c.scrollbarV.firstChild.style.height=Math.max(0,d-b.clientHeight+(b.barHeight||c.scrollbarV.clientHeight))+"px"):(c.scrollbarV.style.display="",c.scrollbarV.firstChild.style.height="0"),e?(c.scrollbarH.style.display="block",c.scrollbarH.style.right=f?Yg(c.measure)+"px":"0",c.scrollbarH.firstChild.style.width=b.scrollWidth-b.clientWidth+(b.barWidth||c.scrollbarH.clientWidth)+"px"):(c.scrollbarH.style.display="",c.scrollbarH.firstChild.style.width="0"),e&&f?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=c.scrollbarFiller.style.width=Yg(c.measure)+"px"):c.scrollbarFiller.style.display="",e&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=Yg(c.measure)+"px",c.gutterFiller.style.width=c.gutters.offsetWidth+"px"):c.gutterFiller.style.display="",n&&0===Yg(c.measure)){c.scrollbarV.style.minWidth=c.scrollbarH.style.minHeight=o?"18px":"12px";var g=function(b){dg(b)!=c.scrollbarV&&dg(b)!=c.scrollbarH&&Bc(a,Xc)(b)};fg(c.scrollbarV,"mousedown",g),fg(c.scrollbarH,"mousedown",g)}}function Q(a,b,c){var d=c&&null!=c.top?c.top:a.scroller.scrollTop;d=Math.floor(d-Xb(a));var e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight,f=Jf(b,d),g=Jf(b,e);if(c&&c.ensure){var h=c.ensure.from.line,i=c.ensure.to.line;if(f>h)return{from:h,to:Jf(b,Kf(Ef(b,h))+a.wrapper.clientHeight)};if(Math.min(i,b.lastLine())>=g)return{from:Jf(b,Kf(Ef(b,i))-a.wrapper.clientHeight),to:i}}return{from:f,to:g}}function R(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var d=U(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g<c.length;g++)if(!c[g].hidden){a.options.fixedGutter&&c[g].gutter&&(c[g].gutter.style.left=f);var h=c[g].alignable;if(h)for(var i=0;i<h.length;i++)h[i].style.left=f}a.options.fixedGutter&&(b.gutters.style.left=d+e+"px")}}function S(a){if(!a.options.lineNumbers)return!1;var b=a.doc,c=T(a.options,b.first+b.size-1),d=a.display;if(c.length!=d.lineNumChars){var e=d.measure.appendChild(Mg("div",[Mg("div",c)],"CodeMirror-linenumber CodeMirror-gutter-elt")),f=e.firstChild.offsetWidth,g=e.offsetWidth-f;return d.lineGutter.style.width="",d.lineNumInnerWidth=Math.max(f,d.lineGutter.offsetWidth-g),d.lineNumWidth=d.lineNumInnerWidth+g,d.lineNumChars=d.lineNumInnerWidth?c.length:-1,d.lineGutter.style.width=d.lineNumWidth+"px",K(a),!0}return!1}function T(a,b){return String(a.lineNumberFormatter(b+a.firstLineNumber))}function U(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function V(a,b,c){for(var f,d=a.display.viewFrom,e=a.display.viewTo,g=Q(a.display,a.doc,b),i=!0;;i=!1){var j=a.display.scroller.clientWidth;if(!W(a,g,c))break;f=!0,a.display.maxLineChanged&&!a.options.lineWrapping&&X(a);var k=O(a);if(Pb(a),Y(a,k),P(a,k),h&&a.options.lineWrapping&&Z(a,k),i&&a.options.lineWrapping&&j!=a.display.scroller.clientWidth)c=!0;else if(c=!1,b&&null!=b.top&&(b={top:Math.min(k.docHeight-qg-k.clientHeight,b.top)}),g=Q(a.display,a.doc,b),g.from>=a.display.viewFrom&&g.to<=a.display.viewTo)break}return a.display.updateLineNumbers=null,f&&(kg(a,"update",a),(a.display.viewFrom!=d||a.display.viewTo!=e)&&kg(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo)),f}function W(a,b,c){var d=a.display,e=a.doc;if(!d.wrapper.offsetWidth)return Ic(a),void 0;if(!(!c&&b.from>=d.viewFrom&&b.to<=d.viewTo&&0==Mc(a))){S(a)&&Ic(a);var f=ab(a),g=e.first+e.size,h=Math.max(b.from-a.options.viewportMargin,e.first),i=Math.min(g,b.to+a.options.viewportMargin);d.viewFrom<h&&h-d.viewFrom<20&&(h=Math.max(e.first,d.viewFrom)),d.viewTo>i&&d.viewTo-i<20&&(i=Math.min(g,d.viewTo)),y&&(h=Te(a.doc,h),i=Ue(a.doc,i));var j=h!=d.viewFrom||i!=d.viewTo||d.lastSizeC!=d.wrapper.clientHeight;Lc(a,h,i),d.viewOffset=Kf(Ef(a.doc,d.viewFrom)),a.display.mover.style.top=d.viewOffset+"px";var k=Mc(a);if(j||0!=k||c){var l=Rg();return k>4&&(d.lineDiv.style.display="none"),bb(a,d.updateLineNumbers,f),k>4&&(d.lineDiv.style.display=""),l&&Rg()!=l&&l.offsetHeight&&l.focus(),Og(d.cursorDiv),Og(d.selectionDiv),j&&(d.lastSizeC=d.wrapper.clientHeight,Tb(a,400)),$(a),!0}}}function X(a){var b=a.display,c=bc(a,b.maxLine,b.maxLine.text.length).left;b.maxLineChanged=!1;var d=Math.max(0,c+3),e=Math.max(0,b.sizer.offsetLeft+d+qg-b.scroller.clientWidth);b.sizer.style.minWidth=d+"px",e<a.doc.scrollLeft&&hd(a,Math.min(b.scroller.scrollLeft,e),!0)}function Y(a,b){a.display.sizer.style.minHeight=a.display.heightForcer.style.top=b.docHeight+"px",a.display.gutters.style.height=Math.max(b.docHeight,b.clientHeight-qg)+"px"}function Z(a,b){a.display.sizer.offsetWidth+a.display.gutters.offsetWidth<a.display.scroller.clientWidth-1&&(a.display.sizer.style.minHeight=a.display.heightForcer.style.top="0px",a.display.gutters.style.height=b.docHeight+"px")}function $(a){for(var b=a.display,d=b.lineDiv.offsetTop,e=0;e<b.view.length;e++){var g,f=b.view[e];if(!f.hidden){if(c){var h=f.node.offsetTop+f.node.offsetHeight;g=h-d,d=h}else{var i=f.node.getBoundingClientRect();g=i.bottom-i.top}var j=f.line.height-g;if(2>g&&(g=vc(b)),(j>.001||-.001>j)&&(Hf(f.line,g),_(f.line),f.rest))for(var k=0;k<f.rest.length;k++)_(f.rest[k])}}}function _(a){if(a.widgets)for(var b=0;b<a.widgets.length;++b)a.widgets[b].height=a.widgets[b].node.offsetHeight}function ab(a){for(var b=a.display,c={},d={},e=b.gutters.firstChild,f=0;e;e=e.nextSibling,++f)c[a.options.gutters[f]]=e.offsetLeft,d[a.options.gutters[f]]=e.offsetWidth;return{fixedPos:U(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:c,gutterWidth:d,wrapperWidth:b.wrapper.clientWidth}}function bb(a,b,c){function i(b){var c=b.nextSibling;return h&&s&&a.display.currentWheelTarget==b?b.style.display="none":b.parentNode.removeChild(b),c}for(var d=a.display,e=a.options.lineNumbers,f=d.lineDiv,g=f.firstChild,j=d.view,k=d.viewFrom,l=0;l<j.length;l++){var m=j[l];if(m.hidden);else if(m.node){for(;g!=m.node;)g=i(g);var o=e&&null!=b&&k>=b&&m.lineNumber;m.changes&&(Cg(m.changes,"gutter")>-1&&(o=!1),cb(a,m,k,c)),o&&(Og(m.lineNumber),m.lineNumber.appendChild(document.createTextNode(T(a.options,k)))),g=m.node.nextSibling}else{var n=kb(a,m,k,c);f.insertBefore(n,g)}k+=m.size}for(;g;)g=i(g)}function cb(a,b,c,d){for(var e=0;e<b.changes.length;e++){var f=b.changes[e];"text"==f?gb(a,b):"gutter"==f?ib(a,b,c,d):"class"==f?hb(b):"widget"==f&&jb(b,d)}b.changes=null}function db(a){return a.node==a.text&&(a.node=Mg("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),c&&(a.node.style.zIndex=2)),a.node}function eb(a){var b=a.bgClass?a.bgClass+" "+(a.line.bgClass||""):a.line.bgClass;if(b&&(b+=" CodeMirror-linebackground"),a.background)b?a.background.className=b:(a.background.parentNode.removeChild(a.background),a.background=null);else if(b){var c=db(a);a.background=c.insertBefore(Mg("div",null,b),c.firstChild)}}function fb(a,b){var c=a.display.externalMeasured;return c&&c.line==b.line?(a.display.externalMeasured=null,b.measure=c.measure,c.built):nf(a,b)}function gb(a,b){var c=b.text.className,d=fb(a,b);b.text==b.node&&(b.node=d.pre),b.text.parentNode.replaceChild(d.pre,b.text),b.text=d.pre,d.bgClass!=b.bgClass||d.textClass!=b.textClass?(b.bgClass=d.bgClass,b.textClass=d.textClass,hb(b)):c&&(b.text.className=c)}function hb(a){eb(a),a.line.wrapClass?db(a).className=a.line.wrapClass:a.node!=a.text&&(a.node.className="");var b=a.textClass?a.textClass+" "+(a.line.textClass||""):a.line.textClass;a.text.className=b||""}function ib(a,b,c,d){b.gutter&&(b.node.removeChild(b.gutter),b.gutter=null);var e=b.line.gutterMarkers;if(a.options.lineNumbers||e){var f=db(b),g=b.gutter=f.insertBefore(Mg("div",null,"CodeMirror-gutter-wrapper","position: absolute; left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px"),b.text);if(!a.options.lineNumbers||e&&e["CodeMirror-linenumbers"]||(b.lineNumber=g.appendChild(Mg("div",T(a.options,c),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),e)for(var h=0;h<a.options.gutters.length;++h){var i=a.options.gutters[h],j=e.hasOwnProperty(i)&&e[i];j&&g.appendChild(Mg("div",[j],"CodeMirror-gutter-elt","left: "+d.gutterLeft[i]+"px; width: "+d.gutterWidth[i]+"px"))}}}function jb(a,b){a.alignable&&(a.alignable=null);for(var d,c=a.node.firstChild;c;c=d){var d=c.nextSibling;"CodeMirror-linewidget"==c.className&&a.node.removeChild(c)}lb(a,b)}function kb(a,b,c,d){var e=fb(a,b);return b.text=b.node=e.pre,e.bgClass&&(b.bgClass=e.bgClass),e.textClass&&(b.textClass=e.textClass),hb(b),ib(a,b,c,d),lb(b,d),b.node}function lb(a,b){if(mb(a.line,a,b,!0),a.rest)for(var c=0;c<a.rest.length;c++)mb(a.rest[c],a,b,!1)}function mb(a,b,c,d){if(a.widgets)for(var e=db(b),f=0,g=a.widgets;f<g.length;++f){var h=g[f],i=Mg("div",[h.node],"CodeMirror-linewidget");h.handleMouseEvents||(i.ignoreEvents=!0),nb(h,i,b,c),d&&h.above?e.insertBefore(i,b.gutter||b.text):e.appendChild(i),kg(h,"redraw")}}function nb(a,b,c,d){if(a.noHScroll){(c.alignable||(c.alignable=[])).push(b);var e=d.wrapperWidth;b.style.left=d.fixedPos+"px",a.coverGutter||(e-=d.gutterTotalWidth,b.style.paddingLeft=d.gutterTotalWidth+"px"),b.style.width=e+"px"}a.coverGutter&&(b.style.zIndex=5,b.style.position="relative",a.noHScroll||(b.style.marginLeft=-d.gutterTotalWidth+"px"))}function qb(a){return ob(a.line,a.ch)}function rb(a,b){return pb(a,b)<0?b:a}function sb(a,b){return pb(a,b)<0?a:b}function tb(a,b){this.ranges=a,this.primIndex=b}function ub(a,b){this.anchor=a,this.head=b}function vb(a,b){var c=a[b];a.sort(function(a,b){return pb(a.from(),b.from())}),b=Cg(a,c);for(var d=1;d<a.length;d++){var e=a[d],f=a[d-1];if(pb(f.to(),e.from())>=0){var g=sb(f.from(),e.from()),h=rb(f.to(),e.to()),i=f.empty()?e.from()==e.head:f.from()==f.head;b>=d&&--b,a.splice(--d,2,new ub(i?h:g,i?g:h))}}return new tb(a,b)}function wb(a,b){return new tb([new ub(a,b||a)],0)}function xb(a,b){return Math.max(a.first,Math.min(b,a.first+a.size-1))}function yb(a,b){if(b.line<a.first)return ob(a.first,0);var c=a.first+a.size-1;return b.line>c?ob(c,Ef(a,c).text.length):zb(b,Ef(a,b.line).text.length)}function zb(a,b){var c=a.ch;return null==c||c>b?ob(a.line,b):0>c?ob(a.line,0):a}function Ab(a,b){return b>=a.first&&b<a.first+a.size}function Bb(a,b){for(var c=[],d=0;d<b.length;d++)c[d]=yb(a,b[d]);return c}function Cb(a,b,c,d){if(a.cm&&a.cm.display.shift||a.extend){var e=b.anchor;if(d){var f=pb(c,e)<0;f!=pb(d,e)<0?(e=c,c=d):f!=pb(c,d)<0&&(c=d)}return new ub(e,c)}return new ub(d||c,c)}function Db(a,b,c,d){Jb(a,new tb([Cb(a,a.sel.primary(),b,c)],0),d)}function Eb(a,b,c){for(var d=[],e=0;e<a.sel.ranges.length;e++)d[e]=Cb(a,a.sel.ranges[e],b[e],null);var f=vb(d,a.sel.primIndex);Jb(a,f,c)}function Fb(a,b,c,d){var e=a.sel.ranges.slice(0);e[b]=c,Jb(a,vb(e,a.sel.primIndex),d)}function Gb(a,b,c,d){Jb(a,wb(b,c),d)}function Hb(a,b){var c={ranges:b.ranges,update:function(b){this.ranges=[];for(var c=0;c<b.length;c++)this.ranges[c]=new ub(yb(a,b[c].anchor),yb(a,b[c].head))}};return hg(a,"beforeSelectionChange",a,c),a.cm&&hg(a.cm,"beforeSelectionChange",a.cm,c),c.ranges!=b.ranges?vb(c.ranges,c.ranges.length-1):b}function Ib(a,b,c){var d=a.history.done,e=Ag(d);e&&e.ranges?(d[d.length-1]=b,Kb(a,b,c)):Jb(a,b,c)}function Jb(a,b,c){Kb(a,b,c),Sf(a,a.sel,a.cm?a.cm.curOp.id:0/0,c)}function Kb(a,b,c){(og(a,"beforeSelectionChange")||a.cm&&og(a.cm,"beforeSelectionChange"))&&(b=Hb(a,b));var d=pb(b.primary().head,a.sel.primary().head)<0?-1:1;Lb(a,Nb(a,b,d,!0)),c&&c.scroll===!1||!a.cm||Sd(a.cm)}function Lb(a,b){b.equals(a.sel)||(a.sel=b,a.cm&&(a.cm.curOp.updateInput=a.cm.curOp.selectionChanged=!0,ng(a.cm)),kg(a,"cursorActivity",a))}function Mb(a){Lb(a,Nb(a,a.sel,null,!1),sg)}function Nb(a,b,c,d){for(var e,f=0;f<b.ranges.length;f++){var g=b.ranges[f],h=Ob(a,g.anchor,c,d),i=Ob(a,g.head,c,d);(e||h!=g.anchor||i!=g.head)&&(e||(e=b.ranges.slice(0,f)),e[f]=new ub(h,i))}return e?vb(e,b.primIndex):b}function Ob(a,b,c,d){var e=!1,f=b,g=c||1;a.cantEdit=!1;a:for(;;){var h=Ef(a,f.line);if(h.markedSpans)for(var i=0;i<h.markedSpans.length;++i){var j=h.markedSpans[i],k=j.marker;if((null==j.from||(k.inclusiveLeft?j.from<=f.ch:j.from<f.ch))&&(null==j.to||(k.inclusiveRight?j.to>=f.ch:j.to>f.ch))){if(d&&(hg(k,"beforeCursorEnter"),k.explicitlyCleared)){if(h.markedSpans){--i;continue}break}if(!k.atomic)continue;var l=k.find(0>g?-1:1);if(0==pb(l,f)&&(l.ch+=g,l.ch<0?l=l.line>a.first?yb(a,ob(l.line-1)):null:l.ch>h.text.length&&(l=l.line<a.first+a.size-1?ob(l.line+1,0):null),!l)){if(e)return d?(a.cantEdit=!0,ob(a.first,0)):Ob(a,b,c,!0);e=!0,l=b,g=-g}f=l;continue a}}return f}}function Pb(a){for(var b=a.display,c=a.doc,d=document.createDocumentFragment(),e=document.createDocumentFragment(),f=0;f<c.sel.ranges.length;f++){var g=c.sel.ranges[f],h=g.empty();(h||a.options.showCursorWhenSelecting)&&Qb(a,g,d),h||Rb(a,g,e)}if(a.options.moveInputWithCursor){var i=pc(a,c.sel.primary().head,"div"),j=b.wrapper.getBoundingClientRect(),k=b.lineDiv.getBoundingClientRect(),l=Math.max(0,Math.min(b.wrapper.clientHeight-10,i.top+k.top-j.top)),m=Math.max(0,Math.min(b.wrapper.clientWidth-10,i.left+k.left-j.left));b.inputDiv.style.top=l+"px",b.inputDiv.style.left=m+"px"}Pg(b.cursorDiv,d),Pg(b.selectionDiv,e)}function Qb(a,b,c){var d=pc(a,b.head,"div"),e=c.appendChild(Mg("div","\xa0","CodeMirror-cursor"));if(e.style.left=d.left+"px",e.style.top=d.top+"px",e.style.height=Math.max(0,d.bottom-d.top)*a.options.cursorHeight+"px",d.other){var f=c.appendChild(Mg("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));f.style.display="",f.style.left=d.other.left+"px",f.style.top=d.other.top+"px",f.style.height=.85*(d.other.bottom-d.other.top)+"px"}}function Rb(a,b,c){function j(a,b,c,d){0>b&&(b=0),b=Math.round(b),d=Math.round(d),f.appendChild(Mg("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?i-a:c)+"px; height: "+(d-b)+"px"))}function k(b,c,d){function m(c,d){return oc(a,ob(b,c),"div",f,d)}var k,l,f=Ef(e,b),g=f.text.length;return fh(Lf(f),c||0,null==d?g:d,function(a,b,e){var n,o,p,f=m(a,"left");if(a==b)n=f,o=p=f.left;else{if(n=m(b-1,"right"),"rtl"==e){var q=f;f=n,n=q}o=f.left,p=n.right}null==c&&0==a&&(o=h),n.top-f.top>3&&(j(o,f.top,null,f.bottom),o=h,f.bottom<n.top&&j(o,f.bottom,null,n.top)),null==d&&b==g&&(p=i),(!k||f.top<k.top||f.top==k.top&&f.left<k.left)&&(k=f),(!l||n.bottom>l.bottom||n.bottom==l.bottom&&n.right>l.right)&&(l=n),h+1>o&&(o=h),j(o,n.top,p-o,n.bottom)}),{start:k,end:l}}var d=a.display,e=a.doc,f=document.createDocumentFragment(),g=Zb(a.display),h=g.left,i=d.lineSpace.offsetWidth-g.right,l=b.from(),m=b.to();if(l.line==m.line)k(l.line,l.ch,m.ch);else{var n=Ef(e,l.line),o=Ef(e,m.line),p=Re(n)==Re(o),q=k(l.line,l.ch,p?n.text.length+1:null).end,r=k(m.line,p?0:null,m.ch).start;p&&(q.top<r.top-2?(j(q.right,q.top,null,q.bottom),j(h,r.top,r.left,r.bottom)):j(q.right,q.top,r.left-q.right,q.bottom)),q.bottom<r.top&&j(h,q.bottom,null,r.top)}c.appendChild(f)}function Sb(a){if(a.state.focused){var b=a.display;clearInterval(b.blinker);var c=!0;b.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0&&(b.blinker=setInterval(function(){b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate))}}function Tb(a,b){a.doc.mode.startState&&a.doc.frontier<a.display.viewTo&&a.state.highlight.set(b,Gg(Ub,a))}function Ub(a){var b=a.doc;if(b.frontier<b.first&&(b.frontier=b.first),!(b.frontier>=a.display.viewTo)){var c=+new Date+a.options.workTime,d=he(b.mode,Wb(a,b.frontier));Ac(a,function(){b.iter(b.frontier,Math.min(b.first+b.size,a.display.viewTo+500),function(e){if(b.frontier>=a.display.viewFrom){var f=e.styles,g=gf(a,e,d,!0);e.styles=g.styles,g.classes?e.styleClasses=g.classes:e.styleClasses&&(e.styleClasses=null);for(var h=!f||f.length!=e.styles.length,i=0;!h&&i<f.length;++i)h=f[i]!=e.styles[i];h&&Hc(a,b.frontier,"text"),e.stateAfter=he(b.mode,d)}else jf(a,e.text,d),e.stateAfter=0==b.frontier%5?he(b.mode,d):null;return++b.frontier,+new Date>c?(Tb(a,a.options.workDelay),!0):void 0})})}}function Vb(a,b,c){for(var d,e,f=a.doc,g=c?-1:b-(a.doc.mode.innerMode?1e3:100),h=b;h>g;--h){if(h<=f.first)return f.first;var i=Ef(f,h-1);if(i.stateAfter&&(!c||h<=f.frontier))return h;var j=wg(i.text,null,a.options.tabSize);(null==e||d>j)&&(e=h-1,d=j)}return e}function Wb(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=Vb(a,b,c),g=f>d.first&&Ef(d,f-1).stateAfter;return g=g?he(d.mode,g):ie(d.mode),d.iter(f,b,function(c){jf(a,c.text,g);var h=f==b-1||0==f%5||f>=e.viewFrom&&f<e.viewTo;c.stateAfter=h?he(d.mode,g):null,++f}),c&&(d.frontier=f),g}function Xb(a){return a.lineSpace.offsetTop}function Yb(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Zb(a){if(a.cachedPaddingH)return a.cachedPaddingH;var b=Pg(a.measure,Mg("pre","x")),c=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle,d={left:parseInt(c.paddingLeft),right:parseInt(c.paddingRight)};return isNaN(d.left)||isNaN(d.right)||(a.cachedPaddingH=d),d}function $b(a,b,c){var d=a.options.lineWrapping,e=d&&a.display.scroller.clientWidth;if(!b.measure.heights||d&&b.measure.width!=e){var f=b.measure.heights=[];if(d){b.measure.width=e;for(var g=b.text.firstChild.getClientRects(),h=0;h<g.length-1;h++){var i=g[h],j=g[h+1];Math.abs(i.bottom-j.bottom)>2&&f.push((i.bottom+j.top)/2-c.top)}}f.push(c.bottom-c.top)}}function _b(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;d<a.rest.length;d++)if(a.rest[d]==b)return{map:a.measure.maps[d],cache:a.measure.caches[d]};for(var d=0;d<a.rest.length;d++)if(If(a.rest[d])>c)return{map:a.measure.maps[d],cache:a.measure.caches[d],before:!0}}function ac(a,b){b=Re(b);var c=If(b),d=a.display.externalMeasured=new Ec(a.doc,b,c);d.lineN=c;var e=d.built=nf(a,d);return d.text=e.pre,Pg(a.display.lineMeasure,e.pre),d}function bc(a,b,c,d){return ec(a,dc(a,b),c,d)}function cc(a,b){if(b>=a.display.viewFrom&&b<a.display.viewTo)return a.display.view[Jc(a,b)];var c=a.display.externalMeasured;return c&&b>=c.lineN&&b<c.lineN+c.size?c:void 0}function dc(a,b){var c=If(b),d=cc(a,c);d&&!d.text?d=null:d&&d.changes&&cb(a,d,c,ab(a)),d||(d=ac(a,b));var e=_b(d,b,c);return{line:b,view:d,rect:null,map:e.map,cache:e.cache,before:e.before,hasHeights:!1}}function ec(a,b,c,d){b.before&&(c=-1);var f,e=c+(d||"");return b.cache.hasOwnProperty(e)?f=b.cache[e]:(b.rect||(b.rect=b.view.text.getBoundingClientRect()),b.hasHeights||($b(a,b.view,b.rect),b.hasHeights=!0),f=gc(a,b,c,d),f.bogus||(b.cache[e]=f)),{left:f.left,right:f.right,top:f.top,bottom:f.bottom}}function gc(a,b,c,e){for(var h,i,j,k,f=b.map,l=0;l<f.length;l+=3){var m=f[l],n=f[l+1];if(m>c?(i=0,j=1,k="left"):n>c?(i=c-m,j=i+1):(l==f.length-3||c==n&&f[l+3]>c)&&(j=n-m,i=j-1,c>=n&&(k="right")),null!=i){if(h=f[l+2],m==n&&e==(h.insertLeft?"left":"right")&&(k=e),"left"==e&&0==i)for(;l&&f[l-2]==f[l-3]&&f[l-1].insertLeft;)h=f[(l-=3)+2],k="left";if("right"==e&&i==n-m)for(;l<f.length-3&&f[l+3]==f[l+4]&&!f[l+5].insertLeft;)h=f[(l+=3)+2],k="right";break}}var o;if(3==h.nodeType){for(;i&&Lg(b.line.text.charAt(m+i));)--i;for(;n>m+j&&Lg(b.line.text.charAt(m+j));)++j;if(d&&0==i&&j==n-m)o=h.parentNode.getBoundingClientRect();else if(g&&a.options.lineWrapping){var p=Ng(h,i,j).getClientRects();o=p.length?p["right"==e?p.length-1:0]:fc}else o=Ng(h,i,j).getBoundingClientRect()}else{i>0&&(k=e="right");var p;o=a.options.lineWrapping&&(p=h.getClientRects()).length>1?p["right"==e?p.length-1:0]:h.getBoundingClientRect()}if(d&&!i&&(!o||!o.left&&!o.right)){var q=h.parentNode.getClientRects()[0];o=q?{left:q.left,right:q.left+wc(a.display),top:q.top,bottom:q.bottom}:fc}for(var r,s=(o.bottom+o.top)/2-b.rect.top,t=b.view.measure.heights,l=0;l<t.length-1&&!(s<t[l]);l++);r=l?t[l-1]:0,s=t[l];var u={left:("right"==k?o.right:o.left)-b.rect.left,right:("left"==k?o.left:o.right)-b.rect.left,top:r,bottom:s};return o.left||o.right||(u.bogus=!0),u}function hc(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var b=0;b<a.rest.length;b++)a.measure.caches[b]={}}function ic(a){a.display.externalMeasure=null,Og(a.display.lineMeasure);for(var b=0;b<a.display.view.length;b++)hc(a.display.view[b])}function jc(a){ic(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function kc(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function lc(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function mc(a,b,c,d){if(b.widgets)for(var e=0;e<b.widgets.length;++e)if(b.widgets[e].above){var f=Ze(b.widgets[e]);c.top+=f,c.bottom+=f}if("line"==d)return c;d||(d="local");var g=Kf(b);if("local"==d?g+=Xb(a.display):g-=a.display.viewOffset,"page"==d||"window"==d){var h=a.display.lineSpace.getBoundingClientRect();g+=h.top+("window"==d?0:lc());var i=h.left+("window"==d?0:kc());c.left+=i,c.right+=i}return c.top+=g,c.bottom+=g,c}function nc(a,b,c){if("div"==c)return b;var d=b.left,e=b.top;if("page"==c)d-=kc(),e-=lc();else if("local"==c||!c){var f=a.display.sizer.getBoundingClientRect();d+=f.left,e+=f.top}var g=a.display.lineSpace.getBoundingClientRect();return{left:d-g.left,top:e-g.top}}function oc(a,b,c,d,e){return d||(d=Ef(a.doc,b.line)),mc(a,d,bc(a,d,b.ch,e),c)}function pc(a,b,c,d,e){function f(b,f){var g=ec(a,e,b,f?"right":"left");return f?g.left=g.right:g.right=g.left,mc(a,d,g,c)}function g(a,b){var c=h[b],d=c.level%2;return a==gh(c)&&b&&c.level<h[b-1].level?(c=h[--b],a=hh(c)-(c.level%2?0:1),d=!0):a==hh(c)&&b<h.length-1&&c.level<h[b+1].level&&(c=h[++b],a=gh(c)-c.level%2,d=!1),d&&a==c.to&&a>c.from?f(a-1):f(a,d)}d=d||Ef(a.doc,b.line),e||(e=dc(a,d));var h=Lf(d),i=b.ch;if(!h)return f(i);var j=oh(h,i),k=g(i,j);return null!=nh&&(k.other=g(i,nh)),k}function qc(a,b){var c=0,b=yb(a.doc,b);a.options.lineWrapping||(c=wc(a.display)*b.ch);var d=Ef(a.doc,b.line),e=Kf(d)+Xb(a.display);return{left:c,right:c,top:e,bottom:e+d.height}}function rc(a,b,c,d){var e=ob(a,b);return e.xRel=d,c&&(e.outside=!0),e}function sc(a,b,c){var d=a.doc;if(c+=a.display.viewOffset,0>c)return rc(d.first,0,!0,-1);var e=Jf(d,c),f=d.first+d.size-1;if(e>f)return rc(d.first+d.size-1,Ef(d,f).text.length,!0,1);0>b&&(b=0);for(var g=Ef(d,e);;){var h=tc(a,g,e,b,c),i=Pe(g),j=i&&i.find(0,!0);if(!i||!(h.ch>j.from.ch||h.ch==j.from.ch&&h.xRel>0))return h;e=If(g=j.to.line)}}function tc(a,b,c,d,e){function j(d){var e=pc(a,ob(c,d),"line",b,i);return g=!0,f>e.bottom?e.left-h:f<e.top?e.left+h:(g=!1,e.left)}var f=e-Kf(b),g=!1,h=2*a.display.wrapper.clientWidth,i=dc(a,b),k=Lf(b),l=b.text.length,m=ih(b),n=jh(b),o=j(m),p=g,q=j(n),r=g;if(d>q)return rc(c,n,r,1);for(;;){if(k?n==m||n==qh(b,m,1):1>=n-m){for(var s=o>d||q-d>=d-o?m:n,t=d-(s==m?o:q);Lg(b.text.charAt(s));)++s;var u=rc(c,s,s==m?p:r,-1>t?-1:t>1?1:0);return u}var v=Math.ceil(l/2),w=m+v;if(k){w=m;for(var x=0;v>x;++x)w=qh(b,w,1)}var y=j(w);y>d?(n=w,q=y,(r=g)&&(q+=1e3),l=v):(m=w,o=y,p=g,l-=v)}}function vc(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==uc){uc=Mg("pre");for(var b=0;49>b;++b)uc.appendChild(document.createTextNode("x")),uc.appendChild(Mg("br"));uc.appendChild(document.createTextNode("x"))}Pg(a.measure,uc);var c=uc.offsetHeight/50;return c>3&&(a.cachedTextHeight=c),Og(a.measure),c||1}function wc(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=Mg("span","xxxxxxxxxx"),c=Mg("pre",[b]);Pg(a.measure,c);var d=b.getBoundingClientRect(),e=(d.right-d.left)/10;return e>2&&(a.cachedCharWidth=e),e||10}function yc(a){a.curOp={viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++xc},jg++||(ig=[])}function zc(a){var b=a.curOp,c=a.doc,d=a.display;if(a.curOp=null,b.updateMaxLine&&M(a),b.viewChanged||b.forceUpdate||null!=b.scrollTop||b.scrollToPos&&(b.scrollToPos.from.line<d.viewFrom||b.scrollToPos.to.line>=d.viewTo)||d.maxLineChanged&&a.options.lineWrapping){var e=V(a,{top:b.scrollTop,ensure:b.scrollToPos},b.forceUpdate);a.display.scroller.offsetHeight&&(a.doc.scrollTop=a.display.scroller.scrollTop)}if(!e&&b.selectionChanged&&Pb(a),e||b.startHeight==a.doc.height||P(a),null!=b.scrollTop&&d.scroller.scrollTop!=b.scrollTop){var f=Math.max(0,Math.min(d.scroller.scrollHeight-d.scroller.clientHeight,b.scrollTop));d.scroller.scrollTop=d.scrollbarV.scrollTop=c.scrollTop=f}if(null!=b.scrollLeft&&d.scroller.scrollLeft!=b.scrollLeft){var g=Math.max(0,Math.min(d.scroller.scrollWidth-d.scroller.clientWidth,b.scrollLeft));d.scroller.scrollLeft=d.scrollbarH.scrollLeft=c.scrollLeft=g,R(a)}if(b.scrollToPos){var h=Od(a,yb(a.doc,b.scrollToPos.from),yb(a.doc,b.scrollToPos.to),b.scrollToPos.margin);b.scrollToPos.isCursor&&a.state.focused&&Nd(a,h)}b.selectionChanged&&Sb(a),a.state.focused&&b.updateInput&&Qc(a,b.typing);var i=b.maybeHiddenMarkers,j=b.maybeUnhiddenMarkers;if(i)for(var k=0;k<i.length;++k)i[k].lines.length||hg(i[k],"hide");if(j)for(var k=0;k<j.length;++k)j[k].lines.length&&hg(j[k],"unhide");var l;if(--jg||(l=ig,ig=null),b.changeObjs&&hg(a,"changes",a,b.changeObjs),l)for(var k=0;k<l.length;++k)l[k]();if(b.cursorActivityHandlers)for(var k=0;k<b.cursorActivityHandlers.length;k++)b.cursorActivityHandlers[k](a)}function Ac(a,b){if(a.curOp)return b();yc(a);try{return b()}finally{zc(a)}}function Bc(a,b){return function(){if(a.curOp)return b.apply(a,arguments);yc(a);try{return b.apply(a,arguments)}finally{zc(a)}}}function Cc(a){return function(){if(this.curOp)return a.apply(this,arguments);yc(this);try{return a.apply(this,arguments)}finally{zc(this)}}}function Dc(a){return function(){var b=this.cm;if(!b||b.curOp)return a.apply(this,arguments);yc(b);try{return a.apply(this,arguments)}finally{zc(b)}}}function Ec(a,b,c){this.line=b,this.rest=Se(b),this.size=this.rest?If(Ag(this.rest))-c+1:1,this.node=this.text=null,this.hidden=Ve(a,b)
|
2 |
-
}function Fc(a,b,c){for(var e,d=[],f=b;c>f;f=e){var g=new Ec(a.doc,Ef(a.doc,f),f);e=f+g.size,d.push(g)}return d}function Gc(a,b,c,d){null==b&&(b=a.doc.first),null==c&&(c=a.doc.first+a.doc.size),d||(d=0);var e=a.display;if(d&&c<e.viewTo&&(null==e.updateLineNumbers||e.updateLineNumbers>b)&&(e.updateLineNumbers=b),a.curOp.viewChanged=!0,b>=e.viewTo)y&&Te(a.doc,b)<e.viewTo&&Ic(a);else if(c<=e.viewFrom)y&&Ue(a.doc,c+d)>e.viewFrom?Ic(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)Ic(a);else if(b<=e.viewFrom){var f=Kc(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):Ic(a)}else if(c>=e.viewTo){var f=Kc(a,b,b,-1);f?(e.view=e.view.slice(0,f.index),e.viewTo=f.lineN):Ic(a)}else{var g=Kc(a,b,b,-1),h=Kc(a,c,c+d,1);g&&h?(e.view=e.view.slice(0,g.index).concat(Fc(a,g.lineN,h.lineN)).concat(e.view.slice(h.index)),e.viewTo+=d):Ic(a)}var i=e.externalMeasured;i&&(c<i.lineN?i.lineN+=d:b<i.lineN+i.size&&(e.externalMeasured=null))}function Hc(a,b,c){a.curOp.viewChanged=!0;var d=a.display,e=a.display.externalMeasured;if(e&&b>=e.lineN&&b<e.lineN+e.size&&(d.externalMeasured=null),!(b<d.viewFrom||b>=d.viewTo)){var f=d.view[Jc(a,b)];if(null!=f.node){var g=f.changes||(f.changes=[]);-1==Cg(g,c)&&g.push(c)}}}function Ic(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Jc(a,b){if(b>=a.display.viewTo)return null;if(b-=a.display.viewFrom,0>b)return null;for(var c=a.display.view,d=0;d<c.length;d++)if(b-=c[d].size,0>b)return d}function Kc(a,b,c,d){var f,e=Jc(a,b),g=a.display.view;if(!y)return{index:e,lineN:c};for(var h=0,i=a.display.viewFrom;e>h;h++)i+=g[h].size;if(i!=b){if(d>0){if(e==g.length-1)return null;f=i+g[e].size-b,e++}else f=i-b;b+=f,c+=f}for(;Te(a.doc,c)!=c;){if(e==(0>d?0:g.length-1))return null;c+=d*g[e-(0>d?1:0)].size,e+=d}return{index:e,lineN:c}}function Lc(a,b,c){var d=a.display,e=d.view;0==e.length||b>=d.viewTo||c<=d.viewFrom?(d.view=Fc(a,b,c),d.viewFrom=b):(d.viewFrom>b?d.view=Fc(a,b,d.viewFrom).concat(d.view):d.viewFrom<b&&(d.view=d.view.slice(Jc(a,b))),d.viewFrom=b,d.viewTo<c?d.view=d.view.concat(Fc(a,d.viewTo,c)):d.viewTo>c&&(d.view=d.view.slice(0,Jc(a,c)))),d.viewTo=c}function Mc(a){for(var b=a.display.view,c=0,d=0;d<b.length;d++){var e=b[d];e.hidden||e.node&&!e.changes||++c}return c}function Nc(a){a.display.pollingFast||a.display.poll.set(a.options.pollInterval,function(){Pc(a),a.state.focused&&Nc(a)})}function Oc(a){function c(){var d=Pc(a);d||b?(a.display.pollingFast=!1,Nc(a)):(b=!0,a.display.poll.set(60,c))}var b=!1;a.display.pollingFast=!0,a.display.poll.set(20,c)}function Pc(a){var b=a.display.input,c=a.display.prevInput,e=a.doc;if(!a.state.focused||ch(b)&&!c||Tc(a)||a.options.disableInput)return!1;a.state.pasteIncoming&&a.state.fakedLastChar&&(b.value=b.value.substring(0,b.value.length-1),a.state.fakedLastChar=!1);var f=b.value;if(f==c&&!a.somethingSelected())return!1;if(g&&!d&&a.display.inputHasSelection===f)return Qc(a),!1;var h=!a.curOp;h&&yc(a),a.display.shift=!1;for(var i=0,j=Math.min(c.length,f.length);j>i&&c.charCodeAt(i)==f.charCodeAt(i);)++i;for(var k=f.slice(i),l=bh(k),m=a.state.pasteIncoming&&l.length>1&&e.sel.ranges.length==l.length,n=e.sel.ranges.length-1;n>=0;n--){var o=e.sel.ranges[n],p=o.from(),q=o.to();i<c.length?p=ob(p.line,p.ch-(c.length-i)):a.state.overwrite&&o.empty()&&!a.state.pasteIncoming&&(q=ob(q.line,Math.min(Ef(e,q.line).text.length,q.ch+Ag(l).length)));var r=a.curOp.updateInput,s={from:p,to:q,text:m?[l[n]]:l,origin:a.state.pasteIncoming?"paste":a.state.cutIncoming?"cut":"+input"};if(Gd(a.doc,s),kg(a,"inputRead",a,s),k&&!a.state.pasteIncoming&&a.options.electricChars&&a.options.smartIndent&&o.head.ch<100&&(!n||e.sel.ranges[n-1].head.line!=o.head.line)){var t=a.getModeAt(o.head);if(t.electricChars){for(var u=0;u<t.electricChars.length;u++)if(k.indexOf(t.electricChars.charAt(u))>-1){Ud(a,o.head.line,"smart");break}}else if(t.electricInput){var v=Ad(s);t.electricInput.test(Ef(e,v.line).text.slice(0,v.ch))&&Ud(a,o.head.line,"smart")}}}return Sd(a),a.curOp.updateInput=r,a.curOp.typing=!0,f.length>1e3||f.indexOf("\n")>-1?b.value=a.display.prevInput="":a.display.prevInput=f,h&&zc(a),a.state.pasteIncoming=a.state.cutIncoming=!1,!0}function Qc(a,b){var c,e,f=a.doc;if(a.somethingSelected()){a.display.prevInput="";var h=f.sel.primary();c=dh&&(h.to().line-h.from().line>100||(e=a.getSelection()).length>1e3);var i=c?"-":e||a.getSelection();a.display.input.value=i,a.state.focused&&Bg(a.display.input),g&&!d&&(a.display.inputHasSelection=i)}else b||(a.display.prevInput=a.display.input.value="",g&&!d&&(a.display.inputHasSelection=null));a.display.inaccurateSelection=c}function Rc(a){"nocursor"==a.options.readOnly||r&&Rg()==a.display.input||a.display.input.focus()}function Sc(a){a.state.focused||(Rc(a),vd(a))}function Tc(a){return a.options.readOnly||a.doc.cantEdit}function Uc(a){function e(){a.state.focused&&setTimeout(Gg(Rc,a),0)}function i(){null==f&&(f=setTimeout(function(){f=null,c.cachedCharWidth=c.cachedTextHeight=c.cachedPaddingH=Xg=null,a.setSize()},100))}function j(){Qg(document.body,c.wrapper)?setTimeout(j,5e3):gg(window,"resize",i)}function k(b){mg(a,b)||cg(b)}function l(b){if(a.somethingSelected())c.inaccurateSelection&&(c.prevInput="",c.inaccurateSelection=!1,c.input.value=a.getSelection(),Bg(c.input));else{for(var d="",e=[],f=0;f<a.doc.sel.ranges.length;f++){var g=a.doc.sel.ranges[f].head.line,h={anchor:ob(g,0),head:ob(g+1,0)};e.push(h),d+=a.getRange(h.anchor,h.head)}"cut"==b.type?a.setSelections(e,null,sg):(c.prevInput="",c.input.value=d,Bg(c.input))}"cut"==b.type&&(a.state.cutIncoming=!0)}var c=a.display;fg(c.scroller,"mousedown",Bc(a,Xc)),b?fg(c.scroller,"dblclick",Bc(a,function(b){if(!mg(a,b)){var c=Wc(a,b);if(c&&!cd(a,b)&&!Vc(a.display,b)){_f(b);var d=Zd(a.doc,c);Db(a.doc,d.anchor,d.head)}}})):fg(c.scroller,"dblclick",function(b){mg(a,b)||_f(b)}),fg(c.lineSpace,"selectstart",function(a){Vc(c,a)||_f(a)}),w||fg(c.scroller,"contextmenu",function(b){yd(a,b)}),fg(c.scroller,"scroll",function(){c.scroller.clientHeight&&(gd(a,c.scroller.scrollTop),hd(a,c.scroller.scrollLeft,!0),hg(a,"scroll",a))}),fg(c.scrollbarV,"scroll",function(){c.scroller.clientHeight&&gd(a,c.scrollbarV.scrollTop)}),fg(c.scrollbarH,"scroll",function(){c.scroller.clientHeight&&hd(a,c.scrollbarH.scrollLeft)}),fg(c.scroller,"mousewheel",function(b){kd(a,b)}),fg(c.scroller,"DOMMouseScroll",function(b){kd(a,b)}),fg(c.scrollbarH,"mousedown",e),fg(c.scrollbarV,"mousedown",e),fg(c.wrapper,"scroll",function(){c.wrapper.scrollTop=c.wrapper.scrollLeft=0});var f;fg(window,"resize",i),setTimeout(j,5e3),fg(c.input,"keyup",Bc(a,td)),fg(c.input,"input",function(){g&&!d&&a.display.inputHasSelection&&(a.display.inputHasSelection=null),Oc(a)}),fg(c.input,"keydown",Bc(a,rd)),fg(c.input,"keypress",Bc(a,ud)),fg(c.input,"focus",Gg(vd,a)),fg(c.input,"blur",Gg(wd,a)),a.options.dragDrop&&(fg(c.scroller,"dragstart",function(b){fd(a,b)}),fg(c.scroller,"dragenter",k),fg(c.scroller,"dragover",k),fg(c.scroller,"drop",Bc(a,ed))),fg(c.scroller,"paste",function(b){Vc(c,b)||(a.state.pasteIncoming=!0,Rc(a),Oc(a))}),fg(c.input,"paste",function(){if(h&&!a.state.fakedLastChar&&!(new Date-a.state.lastMiddleDown<200)){var b=c.input.selectionStart,d=c.input.selectionEnd;c.input.value+="$",c.input.selectionStart=b,c.input.selectionEnd=d,a.state.fakedLastChar=!0}a.state.pasteIncoming=!0,Oc(a)}),fg(c.input,"cut",l),fg(c.input,"copy",l),m&&fg(c.sizer,"mouseup",function(){Rg()==c.input&&c.input.blur(),Rc(a)})}function Vc(a,b){for(var c=dg(b);c!=a.wrapper;c=c.parentNode)if(!c||c.ignoreEvents||c.parentNode==a.sizer&&c!=a.mover)return!0}function Wc(a,b,c,d){var e=a.display;if(!c){var f=dg(b);if(f==e.scrollbarH||f==e.scrollbarV||f==e.scrollbarFiller||f==e.gutterFiller)return null}var g,h,i=e.lineSpace.getBoundingClientRect();try{g=b.clientX-i.left,h=b.clientY-i.top}catch(b){return null}var k,j=sc(a,g,h);if(d&&1==j.xRel&&(k=Ef(a.doc,j.line).text).length==j.ch){var l=wg(k,k.length,a.options.tabSize)-k.length;j=ob(j.line,Math.round((g-Zb(a.display).left)/wc(a.display))-l)}return j}function Xc(a){if(!mg(this,a)){var b=this,c=b.display;if(c.shift=a.shiftKey,Vc(c,a))return h||(c.scroller.draggable=!1,setTimeout(function(){c.scroller.draggable=!0},100)),void 0;if(!cd(b,a)){var d=Wc(b,a);switch(window.focus(),eg(a)){case 1:d?$c(b,a,d):dg(a)==c.scroller&&_f(a);break;case 2:h&&(b.state.lastMiddleDown=+new Date),d&&Db(b.doc,d),setTimeout(Gg(Rc,b),20),_f(a);break;case 3:w&&yd(b,a)}}}}function $c(a,b,c){setTimeout(Gg(Sc,a),0);var e,d=+new Date;Zc&&Zc.time>d-400&&0==pb(Zc.pos,c)?e="triple":Yc&&Yc.time>d-400&&0==pb(Yc.pos,c)?(e="double",Zc={time:d,pos:c}):(e="single",Yc={time:d,pos:c});var f=a.doc.sel,g=s?b.metaKey:b.ctrlKey;a.options.dragDrop&&Wg&&!g&&!Tc(a)&&"single"==e&&f.contains(c)>-1&&f.somethingSelected()?_c(a,b,c):ad(a,b,c,e,g)}function _c(a,c,e){var f=a.display,g=Bc(a,function(i){h&&(f.scroller.draggable=!1),a.state.draggingText=!1,gg(document,"mouseup",g),gg(f.scroller,"drop",g),Math.abs(c.clientX-i.clientX)+Math.abs(c.clientY-i.clientY)<10&&(_f(i),Db(a.doc,e),Rc(a),b&&!d&&setTimeout(function(){document.body.focus(),Rc(a)},20))});h&&(f.scroller.draggable=!0),a.state.draggingText=g,f.scroller.dragDrop&&f.scroller.dragDrop(),fg(document,"mouseup",g),fg(f.scroller,"drop",g)}function ad(a,b,c,d,f){function p(b){if(0!=pb(o,b))if(o=b,"rect"==d){for(var e=[],f=a.options.tabSize,g=wg(Ef(i,c.line).text,c.ch,f),h=wg(Ef(i,b.line).text,b.ch,f),m=Math.min(g,h),n=Math.max(g,h),p=Math.min(c.line,b.line),q=Math.min(a.lastLine(),Math.max(c.line,b.line));q>=p;p++){var r=Ef(i,p).text,s=xg(r,m,f);m==n?e.push(new ub(ob(p,s),ob(p,s))):r.length>s&&e.push(new ub(ob(p,s),ob(p,xg(r,n,f))))}e.length||e.push(new ub(c,c)),Jb(i,vb(l.ranges.slice(0,k).concat(e),k),tg)}else{var t=j,u=t.anchor,v=b;if("single"!=d){if("double"==d)var w=Zd(i,b);else var w=new ub(ob(b.line,0),yb(i,ob(b.line+1,0)));pb(w.anchor,u)>0?(v=w.head,u=sb(t.from(),w.anchor)):(v=w.anchor,u=rb(t.to(),w.head))}var e=l.ranges.slice(0);e[k]=new ub(yb(i,u),v),Jb(i,vb(e,k),tg)}}function s(b){var c=++r,e=Wc(a,b,!0,"rect"==d);if(e)if(0!=pb(e,o)){Sc(a),p(e);var f=Q(h,i);(e.line>=f.to||e.line<f.from)&&setTimeout(Bc(a,function(){r==c&&s(b)}),150)}else{var g=b.clientY<q.top?-20:b.clientY>q.bottom?20:0;g&&setTimeout(Bc(a,function(){r==c&&(h.scroller.scrollTop+=g,s(b))}),50)}}function t(b){r=1/0,_f(b),Rc(a),gg(document,"mousemove",u),gg(document,"mouseup",v),i.history.lastSelOrigin=null}var h=a.display,i=a.doc;_f(b);var j,k,l=i.sel;if(f?(k=i.sel.contains(c),j=k>-1?i.sel.ranges[k]:new ub(c,c)):j=i.sel.primary(),b.altKey)d="rect",f||(j=new ub(c,c)),c=Wc(a,b,!0,!0),k=-1;else if("double"==d){var m=Zd(i,c);j=a.display.shift||i.extend?Cb(i,j,m.anchor,m.head):m}else if("triple"==d){var n=new ub(ob(c.line,0),yb(i,ob(c.line+1,0)));j=a.display.shift||i.extend?Cb(i,j,n.anchor,n.head):n}else j=Cb(i,j,c);f?k>-1?Fb(i,k,j,tg):(k=i.sel.ranges.length,Jb(i,vb(i.sel.ranges.concat([j]),k),{scroll:!1,origin:"*mouse"})):(k=0,Jb(i,new tb([j],0),tg));var o=c,q=h.wrapper.getBoundingClientRect(),r=0,u=Bc(a,function(a){(g&&!e?a.buttons:eg(a))?s(a):t(a)}),v=Bc(a,t);fg(document,"mousemove",u),fg(document,"mouseup",v)}function bd(a,b,c,d,e){try{var f=b.clientX,g=b.clientY}catch(b){return!1}if(f>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&_f(b);var h=a.display,i=h.lineDiv.getBoundingClientRect();if(g>i.bottom||!og(a,c))return bg(b);g-=i.top-h.viewOffset;for(var j=0;j<a.options.gutters.length;++j){var k=h.gutters.childNodes[j];if(k&&k.getBoundingClientRect().right>=f){var l=Jf(a.doc,g),m=a.options.gutters[j];return e(a,c,a,l,m,b),bg(b)}}}function cd(a,b){return bd(a,b,"gutterClick",!0,kg)}function ed(a){var c=this;if(!mg(c,a)&&!Vc(c.display,a)){_f(a),b&&(dd=+new Date);var d=Wc(c,a,!0),e=a.dataTransfer.files;if(d&&!Tc(c))if(e&&e.length&&window.FileReader&&window.File)for(var f=e.length,g=Array(f),h=0,i=function(a,b){var e=new FileReader;e.onload=Bc(c,function(){if(g[b]=e.result,++h==f){d=yb(c.doc,d);var a={from:d,to:d,text:bh(g.join("\n")),origin:"paste"};Gd(c.doc,a),Ib(c.doc,wb(d,Ad(a)))}}),e.readAsText(a)},j=0;f>j;++j)i(e[j],j);else{if(c.state.draggingText&&c.doc.sel.contains(d)>-1)return c.state.draggingText(a),setTimeout(Gg(Rc,c),20),void 0;try{var g=a.dataTransfer.getData("Text");if(g){var k=c.state.draggingText&&c.listSelections();if(Kb(c.doc,wb(d,d)),k)for(var j=0;j<k.length;++j)Md(c.doc,"",k[j].anchor,k[j].head,"drag");c.replaceSelection(g,"around","paste"),Rc(c)}}catch(a){}}}}function fd(a,c){if(b&&(!a.state.draggingText||+new Date-dd<100))return cg(c),void 0;if(!mg(a,c)&&!Vc(a.display,c)&&(c.dataTransfer.setData("Text",a.getSelection()),c.dataTransfer.setDragImage&&!l)){var d=Mg("img",null,null,"position: fixed; left: 0; top: 0;");d.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",k&&(d.width=d.height=1,a.display.wrapper.appendChild(d),d._top=d.offsetTop),c.dataTransfer.setDragImage(d,0,0),k&&d.parentNode.removeChild(d)}}function gd(b,c){Math.abs(b.doc.scrollTop-c)<2||(b.doc.scrollTop=c,a||V(b,{top:c}),b.display.scroller.scrollTop!=c&&(b.display.scroller.scrollTop=c),b.display.scrollbarV.scrollTop!=c&&(b.display.scrollbarV.scrollTop=c),a&&V(b),Tb(b,100))}function hd(a,b,c){(c?b==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-b)<2)||(b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth),a.doc.scrollLeft=b,R(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbarH.scrollLeft!=b&&(a.display.scrollbarH.scrollLeft=b))}function kd(b,c){var d=c.wheelDeltaX,e=c.wheelDeltaY;null==d&&c.detail&&c.axis==c.HORIZONTAL_AXIS&&(d=c.detail),null==e&&c.detail&&c.axis==c.VERTICAL_AXIS?e=c.detail:null==e&&(e=c.wheelDelta);var f=b.display,g=f.scroller;if(d&&g.scrollWidth>g.clientWidth||e&&g.scrollHeight>g.clientHeight){if(e&&s&&h)a:for(var i=c.target,j=f.view;i!=g;i=i.parentNode)for(var l=0;l<j.length;l++)if(j[l].node==i){b.display.currentWheelTarget=i;break a}if(d&&!a&&!k&&null!=jd)return e&&gd(b,Math.max(0,Math.min(g.scrollTop+e*jd,g.scrollHeight-g.clientHeight))),hd(b,Math.max(0,Math.min(g.scrollLeft+d*jd,g.scrollWidth-g.clientWidth))),_f(c),f.wheelStartX=null,void 0;if(e&&null!=jd){var m=e*jd,n=b.doc.scrollTop,o=n+f.wrapper.clientHeight;0>m?n=Math.max(0,n+m-50):o=Math.min(b.doc.height,o+m+50),V(b,{top:n,bottom:o})}20>id&&(null==f.wheelStartX?(f.wheelStartX=g.scrollLeft,f.wheelStartY=g.scrollTop,f.wheelDX=d,f.wheelDY=e,setTimeout(function(){if(null!=f.wheelStartX){var a=g.scrollLeft-f.wheelStartX,b=g.scrollTop-f.wheelStartY,c=b&&f.wheelDY&&b/f.wheelDY||a&&f.wheelDX&&a/f.wheelDX;f.wheelStartX=f.wheelStartY=null,c&&(jd=(jd*id+c)/(id+1),++id)}},200)):(f.wheelDX+=d,f.wheelDY+=e))}}function ld(a,b,c){if("string"==typeof b&&(b=je[b],!b))return!1;a.display.pollingFast&&Pc(a)&&(a.display.pollingFast=!1);var d=a.display.shift,e=!1;try{Tc(a)&&(a.state.suppressEdits=!0),c&&(a.display.shift=!1),e=b(a)!=rg}finally{a.display.shift=d,a.state.suppressEdits=!1}return e}function md(a){var b=a.state.keyMaps.slice(0);return a.options.extraKeys&&b.push(a.options.extraKeys),b.push(a.options.keyMap),b}function od(a,b){var c=le(a.options.keyMap),d=c.auto;clearTimeout(nd),d&&!ne(b)&&(nd=setTimeout(function(){le(a.options.keyMap)==c&&(a.options.keyMap=d.call?d.call(null,a):d,G(a))},50));var e=oe(b,!0),f=!1;if(!e)return!1;var g=md(a);return f=b.shiftKey?me("Shift-"+e,g,function(b){return ld(a,b,!0)})||me(e,g,function(b){return("string"==typeof b?/^go[A-Z]/.test(b):b.motion)?ld(a,b):void 0}):me(e,g,function(b){return ld(a,b)}),f&&(_f(b),Sb(a),kg(a,"keyHandled",a,e,b)),f}function pd(a,b,c){var d=me("'"+c+"'",md(a),function(b){return ld(a,b,!0)});return d&&(_f(b),Sb(a),kg(a,"keyHandled",a,"'"+c+"'",b)),d}function rd(a){var c=this;if(Sc(c),!mg(c,a)){b&&27==a.keyCode&&(a.returnValue=!1);var d=a.keyCode;c.display.shift=16==d||a.shiftKey;var e=od(c,a);k&&(qd=e?d:null,!e&&88==d&&!dh&&(s?a.metaKey:a.ctrlKey)&&c.replaceSelection("",null,"cut")),18!=d||/\bCodeMirror-crosshair\b/.test(c.display.lineDiv.className)||sd(c)}}function sd(a){function c(a){18!=a.keyCode&&a.altKey||(Tg(b,"CodeMirror-crosshair"),gg(document,"keyup",c),gg(document,"mouseover",c))}var b=a.display.lineDiv;Ug(b,"CodeMirror-crosshair"),fg(document,"keyup",c),fg(document,"mouseover",c)}function td(a){mg(this,a)||16==a.keyCode&&(this.doc.sel.shift=!1)}function ud(a){var b=this;if(!mg(b,a)){var c=a.keyCode,e=a.charCode;if(k&&c==qd)return qd=null,_f(a),void 0;if(!(k&&(!a.which||a.which<10)||m)||!od(b,a)){var f=String.fromCharCode(null==e?c:e);pd(b,a,f)||(g&&!d&&(b.display.inputHasSelection=null),Oc(b))}}}function vd(a){"nocursor"!=a.options.readOnly&&(a.state.focused||(hg(a,"focus",a),a.state.focused=!0,Ug(a.display.wrapper,"CodeMirror-focused"),a.curOp||"\u200b"==a.display.prevInput||(Qc(a),h&&setTimeout(Gg(Qc,a,!0),0))),Nc(a),Sb(a))}function wd(a){a.state.focused&&(hg(a,"blur",a),a.state.focused=!1,Tg(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150)}function yd(a,b){function j(){if(null!=c.input.selectionStart){var b=c.input.value="\u200b"+(a.somethingSelected()?c.input.value:"");c.prevInput="\u200b",c.input.selectionStart=1,c.input.selectionEnd=b.length}}function l(){if(c.inputDiv.style.position="relative",c.input.style.cssText=i,d&&(c.scrollbarV.scrollTop=c.scroller.scrollTop=f),Nc(a),null!=c.input.selectionStart){(!g||d)&&j(),clearTimeout(xd);var b=0,e=function(){"\u200b"==c.prevInput&&0==c.input.selectionStart?Bc(a,je.selectAll)(a):b++<10?xd=setTimeout(e,500):Qc(a)};xd=setTimeout(e,200)}}if(!mg(a,b,"contextmenu")){var c=a.display;if(!Vc(c,b)&&!zd(a,b)){var e=Wc(a,b),f=c.scroller.scrollTop;if(e&&!k){var h=a.options.resetSelectionOnContextMenu;h&&-1==a.doc.sel.contains(e)&&Bc(a,Jb)(a.doc,wb(e),sg);var i=c.input.style.cssText;if(c.inputDiv.style.position="absolute",c.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(b.clientY-5)+"px; left: "+(b.clientX-5)+"px; z-index: 1000; background: "+(g?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",Rc(a),Qc(a),a.somethingSelected()||(c.input.value=c.prevInput=" "),g&&!d&&j(),w){cg(b);var m=function(){gg(window,"mouseup",m),setTimeout(l,20)};fg(window,"mouseup",m)}else setTimeout(l,50)}}}}function zd(a,b){return og(a,"gutterContextMenu")?bd(a,b,"gutterContextMenu",!1,hg):!1}function Bd(a,b){if(pb(a,b.from)<0)return a;if(pb(a,b.to)<=0)return Ad(b);var c=a.line+b.text.length-(b.to.line-b.from.line)-1,d=a.ch;return a.line==b.to.line&&(d+=Ad(b).ch-b.to.ch),ob(c,d)}function Cd(a,b){for(var c=[],d=0;d<a.sel.ranges.length;d++){var e=a.sel.ranges[d];c.push(new ub(Bd(e.anchor,b),Bd(e.head,b)))}return vb(c,a.sel.primIndex)}function Dd(a,b,c){return a.line==b.line?ob(c.line,a.ch-b.ch+c.ch):ob(c.line+(a.line-b.line),a.ch)}function Ed(a,b,c){for(var d=[],e=ob(a.first,0),f=e,g=0;g<b.length;g++){var h=b[g],i=Dd(h.from,e,f),j=Dd(Ad(h),e,f);if(e=h.to,f=j,"around"==c){var k=a.sel.ranges[g],l=pb(k.head,k.anchor)<0;d[g]=new ub(l?j:i,l?i:j)}else d[g]=new ub(i,i)}return new tb(d,a.sel.primIndex)}function Fd(a,b,c){var d={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,cancel:function(){this.canceled=!0}};return c&&(d.update=function(b,c,d,e){b&&(this.from=yb(a,b)),c&&(this.to=yb(a,c)),d&&(this.text=d),void 0!==e&&(this.origin=e)}),hg(a,"beforeChange",a,d),a.cm&&hg(a.cm,"beforeChange",a.cm,d),d.canceled?null:{from:d.from,to:d.to,text:d.text,origin:d.origin}}function Gd(a,b,c){if(a.cm){if(!a.cm.curOp)return Bc(a.cm,Gd)(a,b,c);if(a.cm.state.suppressEdits)return}if(!(og(a,"beforeChange")||a.cm&&og(a.cm,"beforeChange"))||(b=Fd(a,b,!0))){var d=x&&!c&&He(a,b.from,b.to);if(d)for(var e=d.length-1;e>=0;--e)Hd(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else Hd(a,b)}}function Hd(a,b){if(1!=b.text.length||""!=b.text[0]||0!=pb(b.from,b.to)){var c=Cd(a,b);Qf(a,b,c,a.cm?a.cm.curOp.id:0/0),Kd(a,b,c,Ee(a,b));var d=[];Cf(a,function(a,c){c||-1!=Cg(d,a.history)||($f(a.history,b),d.push(a.history)),Kd(a,b,null,Ee(a,b))})}}function Id(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var e,d=a.history,f=a.sel,g="undo"==b?d.done:d.undone,h="undo"==b?d.undone:d.done,i=0;i<g.length&&(e=g[i],c?!e.ranges||e.equals(a.sel):e.ranges);i++);if(i!=g.length){for(d.lastOrigin=d.lastSelOrigin=null;e=g.pop(),e.ranges;){if(Tf(e,h),c&&!e.equals(a.sel))return Jb(a,e,{clearRedo:!1}),void 0;f=e}var j=[];Tf(f,h),h.push({changes:j,generation:d.generation}),d.generation=e.generation||++d.maxGeneration;for(var k=og(a,"beforeChange")||a.cm&&og(a.cm,"beforeChange"),i=e.changes.length-1;i>=0;--i){var l=e.changes[i];if(l.origin=b,k&&!Fd(a,l,!1))return g.length=0,void 0;j.push(Nf(a,l));var m=i?Cd(a,l,null):Ag(g);Kd(a,l,m,Ge(a,l)),a.cm&&Sd(a.cm);var n=[];Cf(a,function(a,b){b||-1!=Cg(n,a.history)||($f(a.history,l),n.push(a.history)),Kd(a,l,null,Ge(a,l))})}}}}function Jd(a,b){a.first+=b,a.sel=new tb(Dg(a.sel.ranges,function(a){return new ub(ob(a.anchor.line+b,a.anchor.ch),ob(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm&&Gc(a.cm,a.first,a.first-b,b)}function Kd(a,b,c,d){if(a.cm&&!a.cm.curOp)return Bc(a.cm,Kd)(a,b,c,d);if(b.to.line<a.first)return Jd(a,b.text.length-1-(b.to.line-b.from.line)),void 0;if(!(b.from.line>a.lastLine())){if(b.from.line<a.first){var e=b.text.length-1-(a.first-b.from.line);Jd(a,e),b={from:ob(a.first,0),to:ob(b.to.line+e,b.to.ch),text:[Ag(b.text)],origin:b.origin}}var f=a.lastLine();b.to.line>f&&(b={from:b.from,to:ob(f,Ef(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=Ff(a,b.from,b.to),c||(c=Cd(a,b,null)),a.cm?Ld(a.cm,b,d):vf(a,b,d),Kb(a,c,sg)}}function Ld(a,b,c){var d=a.doc,e=a.display,f=b.from,g=b.to,h=!1,i=f.line;a.options.lineWrapping||(i=If(Re(Ef(d,f.line))),d.iter(i,g.line+1,function(a){return a==e.maxLine?(h=!0,!0):void 0})),d.sel.contains(b.from,b.to)>-1&&ng(a),vf(d,b,c,E(a)),a.options.lineWrapping||(d.iter(i,f.line+b.text.length,function(a){var b=L(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,h=!1)}),h&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,f.line),Tb(a,400);var j=b.text.length-(g.line-f.line)-1;f.line!=g.line||1!=b.text.length||uf(a.doc,b)?Gc(a,f.line,g.line+1,j):Hc(a,f.line,"text");var k=og(a,"changes"),l=og(a,"change");if(l||k){var m={from:f,to:g,text:b.text,removed:b.removed,origin:b.origin};l&&kg(a,"change",a,m),k&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(m)}}function Md(a,b,c,d,e){if(d||(d=c),pb(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=bh(b)),Gd(a,{from:c,to:d,text:b,origin:e})}function Nd(a,b){var c=a.display,d=c.sizer.getBoundingClientRect(),e=null;if(b.top+d.top<0?e=!0:b.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!p){var f=Mg("div","\u200b",null,"position: absolute; top: "+(b.top-c.viewOffset-Xb(a.display))+"px; height: "+(b.bottom-b.top+qg)+"px; left: "+b.left+"px; width: 2px;");a.display.lineSpace.appendChild(f),f.scrollIntoView(e),a.display.lineSpace.removeChild(f)}}function Od(a,b,c,d){for(null==d&&(d=0);;){var e=!1,f=pc(a,b),g=c&&c!=b?pc(a,c):f,h=Qd(a,Math.min(f.left,g.left),Math.min(f.top,g.top)-d,Math.max(f.left,g.left),Math.max(f.bottom,g.bottom)+d),i=a.doc.scrollTop,j=a.doc.scrollLeft;if(null!=h.scrollTop&&(gd(a,h.scrollTop),Math.abs(a.doc.scrollTop-i)>1&&(e=!0)),null!=h.scrollLeft&&(hd(a,h.scrollLeft),Math.abs(a.doc.scrollLeft-j)>1&&(e=!0)),!e)return f}}function Pd(a,b,c,d,e){var f=Qd(a,b,c,d,e);null!=f.scrollTop&&gd(a,f.scrollTop),null!=f.scrollLeft&&hd(a,f.scrollLeft)}function Qd(a,b,c,d,e){var f=a.display,g=vc(a.display);0>c&&(c=0);var h=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:f.scroller.scrollTop,i=f.scroller.clientHeight-qg,j={},k=a.doc.height+Yb(f),l=g>c,m=e>k-g;if(h>c)j.scrollTop=l?0:c;else if(e>h+i){var n=Math.min(c,(m?k:e)-i);n!=h&&(j.scrollTop=n)}var o=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:f.scroller.scrollLeft,p=f.scroller.clientWidth-qg;b+=f.gutters.offsetWidth,d+=f.gutters.offsetWidth;var q=f.gutters.offsetWidth,r=q+10>b;return o+q>b||r?(r&&(b=0),j.scrollLeft=Math.max(0,b-10-q)):d>p+o-3&&(j.scrollLeft=d+10-p),j}function Rd(a,b,c){(null!=b||null!=c)&&Td(a),null!=b&&(a.curOp.scrollLeft=(null==a.curOp.scrollLeft?a.doc.scrollLeft:a.curOp.scrollLeft)+b),null!=c&&(a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+c)}function Sd(a){Td(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?ob(b.line,b.ch-1):b,d=ob(b.line,b.ch+1)),a.curOp.scrollToPos={from:c,to:d,margin:a.options.cursorScrollMargin,isCursor:!0}}function Td(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=qc(a,b.from),d=qc(a,b.to),e=Qd(a,Math.min(c.left,d.left),Math.min(c.top,d.top)-b.margin,Math.max(c.right,d.right),Math.max(c.bottom,d.bottom)+b.margin);a.scrollTo(e.scrollLeft,e.scrollTop)}}function Ud(a,b,c,d){var f,e=a.doc;null==c&&(c="add"),"smart"==c&&(a.doc.mode.indent?f=Wb(a,b):c="prev");var g=a.options.tabSize,h=Ef(e,b),i=wg(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var k,j=h.text.match(/^\s*/)[0];if(d||/\S/.test(h.text)){if("smart"==c&&(k=a.doc.mode.indent(f,h.text.slice(j.length),h.text),k==rg)){if(!d)return;c="prev"}}else k=0,c="not";"prev"==c?k=b>e.first?wg(Ef(e,b-1).text,null,g):0:"add"==c?k=i+a.options.indentUnit:"subtract"==c?k=i-a.options.indentUnit:"number"==typeof c&&(k=i+c),k=Math.max(0,k);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(k/g);n;--n)m+=g,l+=" ";if(k>m&&(l+=zg(k-m)),l!=j)Md(a.doc,l,ob(b,0),ob(b,j.length),"+input");else for(var n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];if(o.head.line==b&&o.head.ch<j.length){var m=ob(b,j.length);Fb(e,n,new ub(m,m));break}}h.stateAfter=null}function Vd(a,b,c,d){var e=b,f=b,g=a.doc;return"number"==typeof b?f=Ef(g,xb(g,b)):e=If(b),null==e?null:(d(f,e)&&Hc(a,e,c),f)}function Wd(a,b){for(var c=a.doc.sel.ranges,d=[],e=0;e<c.length;e++){for(var f=b(c[e]);d.length&&pb(f.from,Ag(d).to)<=0;){var g=d.pop();if(pb(g.from,f.from)<0){f.from=g.from;break}}d.push(f)}Ac(a,function(){for(var b=d.length-1;b>=0;b--)Md(a.doc,"",d[b].from,d[b].to,"+delete");Sd(a)})}function Xd(a,b,c,d,e){function k(){var b=f+c;return b<a.first||b>=a.first+a.size?j=!1:(f=b,i=Ef(a,b))}function l(a){var b=(e?qh:rh)(i,g,c,!0);if(null==b){if(a||!k())return j=!1;g=e?(0>c?jh:ih)(i):0>c?i.text.length:0}else g=b;return!0}var f=b.line,g=b.ch,h=c,i=Ef(a,f),j=!0;if("char"==d)l();else if("column"==d)l(!0);else if("word"==d||"group"==d)for(var m=null,n="group"==d,o=!0;!(0>c)||l(!o);o=!1){var p=i.text.charAt(g)||"\n",q=Ig(p)?"w":n&&"\n"==p?"n":!n||/\s/.test(p)?null:"p";if(!n||o||q||(q="s"),m&&m!=q){0>c&&(c=1,l());break}if(q&&(m=q),c>0&&!l(!o))break}var r=Ob(a,ob(f,g),h,!0);return j||(r.hitSide=!0),r}function Yd(a,b,c,d){var g,e=a.doc,f=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);g=b.top+c*(h-(0>c?1.5:.5)*vc(a.display))}else"line"==d&&(g=c>0?b.bottom+3:b.top-3);for(;;){var i=sc(a,f,g);if(!i.outside)break;if(0>c?0>=g:g>=e.height){i.hitSide=!0;break}g+=5*c}return i}function Zd(a,b){var c=Ef(a,b.line).text,d=b.ch,e=b.ch;if(c){(b.xRel<0||e==c.length)&&d?--d:++e;for(var f=c.charAt(d),g=Ig(f)?Ig:/\s/.test(f)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!Ig(a)};d>0&&g(c.charAt(d-1));)--d;for(;e<c.length&&g(c.charAt(e));)++e}return new ub(ob(b.line,d),ob(b.line,e))}function ae(a,b,c,d){z.defaults[a]=b,c&&(_d[a]=d?function(a,b,d){d!=be&&c(a,b,d)}:c)}function le(a){return"string"==typeof a?ke[a]:a}function se(a,b,c,d,e){if(d&&d.shared)return ue(a,b,c,d,e);if(a.cm&&!a.cm.curOp)return Bc(a.cm,se)(a,b,c,d,e);var f=new qe(a,e),g=pb(b,c);if(d&&Fg(d,f,!1),g>0||0==g&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=Mg("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||(f.widgetNode.ignoreEvents=!0),d.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(Qe(a,b.line,b,c,f)||b.line!=c.line&&Qe(a,c.line,b,c,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");y=!0}f.addToHistory&&Qf(a,{from:b,to:c,origin:"markText"},a.sel,0/0);var j,h=b.line,i=a.cm;if(a.iter(h,c.line+1,function(a){i&&f.collapsed&&!i.options.lineWrapping&&Re(a)==i.display.maxLine&&(j=!0),f.collapsed&&h!=b.line&&Hf(a,0),Be(a,new ye(f,h==b.line?b.ch:null,h==c.line?c.ch:null)),++h}),f.collapsed&&a.iter(b.line,c.line+1,function(b){Ve(a,b)&&Hf(b,0)}),f.clearOnEnter&&fg(f,"beforeCursorEnter",function(){f.clear()}),f.readOnly&&(x=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory()),f.collapsed&&(f.id=++re,f.atomic=!0),i){if(j&&(i.curOp.updateMaxLine=!0),f.collapsed)Gc(i,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle)for(var k=b.line;k<=c.line;k++)Hc(i,k,"text");f.atomic&&Mb(i.doc),kg(i,"markerAdded",i,f)}return f}function ue(a,b,c,d,e){d=Fg(d),d.shared=!1;var f=[se(a,b,c,d,e)],g=f[0],h=d.widgetNode;return Cf(a,function(a){h&&(d.widgetNode=h.cloneNode(!0)),f.push(se(a,yb(a,b),yb(a,c),d,e));for(var i=0;i<a.linked.length;++i)if(a.linked[i].isParent)return;g=Ag(f)}),new te(f,g)}function ve(a){return a.findMarks(ob(a.first,0),a.clipPos(ob(a.lastLine())),function(a){return a.parent})}function we(a,b){for(var c=0;c<b.length;c++){var d=b[c],e=d.find(),f=a.clipPos(e.from),g=a.clipPos(e.to);if(pb(f,g)){var h=se(a,f,g,d.primary,d.primary.type);d.markers.push(h),h.parent=d}}}function xe(a){for(var b=0;b<a.length;b++){var c=a[b],d=[c.primary.doc];Cf(c.primary.doc,function(a){d.push(a)});for(var e=0;e<c.markers.length;e++){var f=c.markers[e];-1==Cg(d,f.doc)&&(f.parent=null,c.markers.splice(e--,1))}}}function ye(a,b,c){this.marker=a,this.from=b,this.to=c}function ze(a,b){if(a)for(var c=0;c<a.length;++c){var d=a[c];if(d.marker==b)return d}}function Ae(a,b){for(var c,d=0;d<a.length;++d)a[d]!=b&&(c||(c=[])).push(a[d]);return c}function Be(a,b){a.markedSpans=a.markedSpans?a.markedSpans.concat([b]):[b],b.marker.attachLine(a)}function Ce(a,b,c){if(a)for(var e,d=0;d<a.length;++d){var f=a[d],g=f.marker,h=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);if(h||f.from==b&&"bookmark"==g.type&&(!c||!f.marker.insertLeft)){var i=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);(e||(e=[])).push(new ye(g,f.from,i?null:f.to))}}return e}function De(a,b,c){if(a)for(var e,d=0;d<a.length;++d){var f=a[d],g=f.marker,h=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);if(h||f.from==b&&"bookmark"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);(e||(e=[])).push(new ye(g,i?null:f.from-b,null==f.to?null:f.to-b))}}return e}function Ee(a,b){var c=Ab(a,b.from.line)&&Ef(a,b.from.line).markedSpans,d=Ab(a,b.to.line)&&Ef(a,b.to.line).markedSpans;if(!c&&!d)return null;var e=b.from.ch,f=b.to.ch,g=0==pb(b.from,b.to),h=Ce(c,e,g),i=De(d,f,g),j=1==b.text.length,k=Ag(b.text).length+(j?e:0);if(h)for(var l=0;l<h.length;++l){var m=h[l];if(null==m.to){var n=ze(i,m.marker);n?j&&(m.to=null==n.to?null:n.to+k):m.to=e}}if(i)for(var l=0;l<i.length;++l){var m=i[l];if(null!=m.to&&(m.to+=k),null==m.from){var n=ze(h,m.marker);n||(m.from=k,j&&(h||(h=[])).push(m))}else m.from+=k,j&&(h||(h=[])).push(m)}h&&(h=Fe(h)),i&&i!=h&&(i=Fe(i));var o=[h];if(!j){var q,p=b.text.length-2;if(p>0&&h)for(var l=0;l<h.length;++l)null==h[l].to&&(q||(q=[])).push(new ye(h[l].marker,null,null));for(var l=0;p>l;++l)o.push(q);o.push(i)}return o}function Fe(a){for(var b=0;b<a.length;++b){var c=a[b];null!=c.from&&c.from==c.to&&c.marker.clearWhenEmpty!==!1&&a.splice(b--,1)}return a.length?a:null}function Ge(a,b){var c=Wf(a,b),d=Ee(a,b);if(!c)return d;if(!d)return c;for(var e=0;e<c.length;++e){var f=c[e],g=d[e];if(f&&g)a:for(var h=0;h<g.length;++h){for(var i=g[h],j=0;j<f.length;++j)if(f[j].marker==i.marker)continue a;f.push(i)}else g&&(c[e]=g)}return c}function He(a,b,c){var d=null;if(a.iter(b.line,c.line+1,function(a){if(a.markedSpans)for(var b=0;b<a.markedSpans.length;++b){var c=a.markedSpans[b].marker;!c.readOnly||d&&-1!=Cg(d,c)||(d||(d=[])).push(c)}}),!d)return null;for(var e=[{from:b,to:c}],f=0;f<d.length;++f)for(var g=d[f],h=g.find(0),i=0;i<e.length;++i){var j=e[i];
|
3 |
-
if(!(pb(j.to,h.from)<0||pb(j.from,h.to)>0)){var k=[i,1],l=pb(j.from,h.from),m=pb(j.to,h.to);(0>l||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(m>0||!g.inclusiveRight&&!m)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-1}}return e}function Ie(a){var b=a.markedSpans;if(b){for(var c=0;c<b.length;++c)b[c].marker.detachLine(a);a.markedSpans=null}}function Je(a,b){if(b){for(var c=0;c<b.length;++c)b[c].marker.attachLine(a);a.markedSpans=b}}function Ke(a){return a.inclusiveLeft?-1:0}function Le(a){return a.inclusiveRight?1:0}function Me(a,b){var c=a.lines.length-b.lines.length;if(0!=c)return c;var d=a.find(),e=b.find(),f=pb(d.from,e.from)||Ke(a)-Ke(b);if(f)return-f;var g=pb(d.to,e.to)||Le(a)-Le(b);return g?g:b.id-a.id}function Ne(a,b){var d,c=y&&a.markedSpans;if(c)for(var e,f=0;f<c.length;++f)e=c[f],e.marker.collapsed&&null==(b?e.from:e.to)&&(!d||Me(d,e.marker)<0)&&(d=e.marker);return d}function Oe(a){return Ne(a,!0)}function Pe(a){return Ne(a,!1)}function Qe(a,b,c,d,e){var f=Ef(a,b),g=y&&f.markedSpans;if(g)for(var h=0;h<g.length;++h){var i=g[h];if(i.marker.collapsed){var j=i.marker.find(0),k=pb(j.from,c)||Ke(i.marker)-Ke(e),l=pb(j.to,d)||Le(i.marker)-Le(e);if(!(k>=0&&0>=l||0>=k&&l>=0)&&(0>=k&&(pb(j.to,c)||Le(i.marker)-Ke(e))>0||k>=0&&(pb(j.from,d)||Ke(i.marker)-Le(e))<0))return!0}}}function Re(a){for(var b;b=Oe(a);)a=b.find(-1,!0).line;return a}function Se(a){for(var b,c;b=Pe(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function Te(a,b){var c=Ef(a,b),d=Re(c);return c==d?b:If(d)}function Ue(a,b){if(b>a.lastLine())return b;var d,c=Ef(a,b);if(!Ve(a,c))return b;for(;d=Pe(c);)c=d.find(1,!0).line;return If(c)+1}function Ve(a,b){var c=y&&b.markedSpans;if(c)for(var d,e=0;e<c.length;++e)if(d=c[e],d.marker.collapsed){if(null==d.from)return!0;if(!d.marker.widgetNode&&0==d.from&&d.marker.inclusiveLeft&&We(a,b,d))return!0}}function We(a,b,c){if(null==c.to){var d=c.marker.find(1,!0);return We(a,d.line,ze(d.line.markedSpans,c.marker))}if(c.marker.inclusiveRight&&c.to==b.text.length)return!0;for(var e,f=0;f<b.markedSpans.length;++f)if(e=b.markedSpans[f],e.marker.collapsed&&!e.marker.widgetNode&&e.from==c.to&&(null==e.to||e.to!=c.from)&&(e.marker.inclusiveLeft||c.marker.inclusiveRight)&&We(a,b,e))return!0}function Ye(a,b,c){Kf(b)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&Rd(a,null,c)}function Ze(a){return null!=a.height?a.height:(Qg(document.body,a.node)||Pg(a.cm.display.measure,Mg("div",[a.node],null,"position: relative")),a.height=a.node.offsetHeight)}function $e(a,b,c,d){var e=new Xe(a,c,d);return e.noHScroll&&(a.display.alignWidgets=!0),Vd(a,b,"widget",function(b){var c=b.widgets||(b.widgets=[]);if(null==e.insertAt?c.push(e):c.splice(Math.min(c.length-1,Math.max(0,e.insertAt)),0,e),e.line=b,!Ve(a.doc,b)){var d=Kf(b)<a.doc.scrollTop;Hf(b,b.height+Ze(e)),d&&Rd(a,null,e.height),a.curOp.forceUpdate=!0}return!0}),e}function af(a,b,c,d){a.text=b,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),null!=a.order&&(a.order=null),Ie(a),Je(a,c);var e=d?d(a):1;e!=a.height&&Hf(a,e)}function bf(a){a.parent=null,Ie(a)}function cf(a,b){if(a)for(;;){var c=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!c)break;a=a.slice(0,c.index)+a.slice(c.index+c[0].length);var d=c[1]?"bgClass":"textClass";null==b[d]?b[d]=c[2]:new RegExp("(?:^|s)"+c[2]+"(?:$|s)").test(b[d])||(b[d]+=" "+c[2])}return a}function df(a,b){if(a.blankLine)return a.blankLine(b);if(a.innerMode){var c=z.innerMode(a,b);return c.mode.blankLine?c.mode.blankLine(c.state):void 0}}function ef(a,b,c){var d=a.token(b,c);if(b.pos<=b.start)throw new Error("Mode "+a.name+" failed to advance stream.");return d}function ff(a,b,c,d,e,f,g){var h=c.flattenSpans;null==h&&(h=a.options.flattenSpans);var l,i=0,j=null,k=new pe(b,a.options.tabSize);for(""==b&&cf(df(c,d),f);!k.eol();){if(k.pos>a.options.maxHighlightLength?(h=!1,g&&jf(a,b,d,k.pos),k.pos=b.length,l=null):l=cf(ef(c,k,d),f),a.options.addModeClass){var m=z.innerMode(c,d).mode.name;m&&(l="m-"+(l?m+" "+l:m))}h&&j==l||(i<k.start&&e(k.start,j),i=k.start,j=l),k.start=k.pos}for(;i<k.pos;){var n=Math.min(k.pos,i+5e4);e(n,j),i=n}}function gf(a,b,c,d){var e=[a.state.modeGen],f={};ff(a,b.text,a.doc.mode,c,function(a,b){e.push(a,b)},f,d);for(var g=0;g<a.state.overlays.length;++g){var h=a.state.overlays[g],i=1,j=0;ff(a,b.text,h.mode,!0,function(a,b){for(var c=i;a>j;){var d=e[i];d>a&&e.splice(i,1,a,e[i+1],d),i+=2,j=Math.min(a,d)}if(b)if(h.opaque)e.splice(c,i-c,a,"cm-overlay "+b),i=c+2;else for(;i>c;c+=2){var f=e[c+1];e[c+1]=(f?f+" ":"")+"cm-overlay "+b}},f)}return{styles:e,classes:f.bgClass||f.textClass?f:null}}function hf(a,b){if(!b.styles||b.styles[0]!=a.state.modeGen){var c=gf(a,b,b.stateAfter=Wb(a,If(b)));b.styles=c.styles,c.classes?b.styleClasses=c.classes:b.styleClasses&&(b.styleClasses=null)}return b.styles}function jf(a,b,c,d){var e=a.doc.mode,f=new pe(b,a.options.tabSize);for(f.start=f.pos=d||0,""==b&&df(e,c);!f.eol()&&f.pos<=a.options.maxHighlightLength;)ef(e,f,c),f.start=f.pos}function mf(a,b){if(!a||/^\s*$/.test(a))return null;var c=b.addModeClass?lf:kf;return c[a]||(c[a]=a.replace(/\S+/g,"cm-$&"))}function nf(a,b){var c=Mg("span",null,null,h?"padding-right: .1px":null),d={pre:Mg("pre",[c]),content:c,col:0,pos:0,cm:a};b.measure={};for(var e=0;e<=(b.rest?b.rest.length:0);e++){var i,f=e?b.rest[e-1]:b.line;d.pos=0,d.addToken=pf,(g||h)&&a.getOption("lineWrapping")&&(d.addToken=qf(d.addToken)),ah(a.display.measure)&&(i=Lf(f))&&(d.addToken=rf(d.addToken,i)),d.map=[],tf(f,d,hf(a,f)),f.styleClasses&&(f.styleClasses.bgClass&&(d.bgClass=Vg(f.styleClasses.bgClass,d.bgClass||"")),f.styleClasses.textClass&&(d.textClass=Vg(f.styleClasses.textClass,d.textClass||""))),0==d.map.length&&d.map.push(0,0,d.content.appendChild($g(a.display.measure))),0==e?(b.measure.map=d.map,b.measure.cache={}):((b.measure.maps||(b.measure.maps=[])).push(d.map),(b.measure.caches||(b.measure.caches=[])).push({}))}return hg(a,"renderLine",a,b.line,d.pre),d}function of(a){var b=Mg("span","\u2022","cm-invalidchar");return b.title="\\u"+a.charCodeAt(0).toString(16),b}function pf(a,b,c,e,f,g){if(b){var h=a.cm.options.specialChars,i=!1;if(h.test(b))for(var j=document.createDocumentFragment(),k=0;;){h.lastIndex=k;var l=h.exec(b),m=l?l.index-k:b.length-k;if(m){var n=document.createTextNode(b.slice(k,k+m));d?j.appendChild(Mg("span",[n])):j.appendChild(n),a.map.push(a.pos,a.pos+m,n),a.col+=m,a.pos+=m}if(!l)break;if(k+=m+1," "==l[0]){var o=a.cm.options.tabSize,p=o-a.col%o,n=j.appendChild(Mg("span",zg(p),"cm-tab"));a.col+=p}else{var n=a.cm.options.specialCharPlaceholder(l[0]);d?j.appendChild(Mg("span",[n])):j.appendChild(n),a.col+=1}a.map.push(a.pos,a.pos+1,n),a.pos++}else{a.col+=b.length;var j=document.createTextNode(b);a.map.push(a.pos,a.pos+b.length,j),d&&(i=!0),a.pos+=b.length}if(c||e||f||i){var q=c||"";e&&(q+=e),f&&(q+=f);var r=Mg("span",[j],q);return g&&(r.title=g),a.content.appendChild(r)}a.content.appendChild(j)}}function qf(a){function b(a){for(var b=" ",c=0;c<a.length-2;++c)b+=c%2?" ":"\xa0";return b+=" "}return function(c,d,e,f,g,h){a(c,d.replace(/ {3,}/g,b),e,f,g,h)}}function rf(a,b){return function(c,d,e,f,g,h){e=e?e+" cm-force-border":"cm-force-border";for(var i=c.pos,j=i+d.length;;){for(var k=0;k<b.length;k++){var l=b[k];if(l.to>i&&l.from<=i)break}if(l.to>=j)return a(c,d,e,f,g,h);a(c,d.slice(0,l.to-i),e,f,null,h),f=null,d=d.slice(l.to-i),i=l.to}}}function sf(a,b,c,d){var e=!d&&c.widgetNode;e&&(a.map.push(a.pos,a.pos+b,e),a.content.appendChild(e)),a.pos+=b}function tf(a,b,c){var d=a.markedSpans,e=a.text,f=0;if(d)for(var k,m,n,o,p,q,h=e.length,i=0,g=1,j="",l=0;;){if(l==i){m=n=o=p="",q=null,l=1/0;for(var r=[],s=0;s<d.length;++s){var t=d[s],u=t.marker;t.from<=i&&(null==t.to||t.to>i)?(null!=t.to&&l>t.to&&(l=t.to,n=""),u.className&&(m+=" "+u.className),u.startStyle&&t.from==i&&(o+=" "+u.startStyle),u.endStyle&&t.to==l&&(n+=" "+u.endStyle),u.title&&!p&&(p=u.title),u.collapsed&&(!q||Me(q.marker,u)<0)&&(q=t)):t.from>i&&l>t.from&&(l=t.from),"bookmark"==u.type&&t.from==i&&u.widgetNode&&r.push(u)}if(q&&(q.from||0)==i&&(sf(b,(null==q.to?h+1:q.to)-i,q.marker,null==q.from),null==q.to))return;if(!q&&r.length)for(var s=0;s<r.length;++s)sf(b,0,r[s])}if(i>=h)break;for(var v=Math.min(h,l);;){if(j){var w=i+j.length;if(!q){var x=w>v?j.slice(0,v-i):j;b.addToken(b,x,k?k+m:m,o,i+x.length==l?n:"",p)}if(w>=v){j=j.slice(v-i),i=v;break}i=w,o=""}j=e.slice(f,f=c[g++]),k=mf(c[g++],b.cm.options)}}else for(var g=1;g<c.length;g+=2)b.addToken(b,e.slice(f,f=c[g]),mf(c[g+1],b.cm.options))}function uf(a,b){return 0==b.from.ch&&0==b.to.ch&&""==Ag(b.text)&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function vf(a,b,c,d){function e(a){return c?c[a]:null}function f(a,c,e){af(a,c,e,d),kg(a,"change",a,b)}var g=b.from,h=b.to,i=b.text,j=Ef(a,g.line),k=Ef(a,h.line),l=Ag(i),m=e(i.length-1),n=h.line-g.line;if(uf(a,b)){for(var o=0,p=[];o<i.length-1;++o)p.push(new _e(i[o],e(o),d));f(k,k.text,m),n&&a.remove(g.line,n),p.length&&a.insert(g.line,p)}else if(j==k)if(1==i.length)f(j,j.text.slice(0,g.ch)+l+j.text.slice(h.ch),m);else{for(var p=[],o=1;o<i.length-1;++o)p.push(new _e(i[o],e(o),d));p.push(new _e(l+j.text.slice(h.ch),m,d)),f(j,j.text.slice(0,g.ch)+i[0],e(0)),a.insert(g.line+1,p)}else if(1==i.length)f(j,j.text.slice(0,g.ch)+i[0]+k.text.slice(h.ch),e(0)),a.remove(g.line+1,n);else{f(j,j.text.slice(0,g.ch)+i[0],e(0)),f(k,l+k.text.slice(h.ch),m);for(var o=1,p=[];o<i.length-1;++o)p.push(new _e(i[o],e(o),d));n>1&&a.remove(g.line+1,n-1),a.insert(g.line+1,p)}kg(a,"change",a,b)}function wf(a){this.lines=a,this.parent=null;for(var b=0,c=0;b<a.length;++b)a[b].parent=this,c+=a[b].height;this.height=c}function xf(a){this.children=a;for(var b=0,c=0,d=0;d<a.length;++d){var e=a[d];b+=e.chunkSize(),c+=e.height,e.parent=this}this.size=b,this.height=c,this.parent=null}function Cf(a,b,c){function d(a,e,f){if(a.linked)for(var g=0;g<a.linked.length;++g){var h=a.linked[g];if(h.doc!=e){var i=f&&h.sharedHist;(!c||i)&&(b(h.doc,i),d(h.doc,a,i))}}}d(a,null,!0)}function Df(a,b){if(b.cm)throw new Error("This document is already in use.");a.doc=b,b.cm=a,F(a),B(a),a.options.lineWrapping||M(a),a.options.mode=b.modeOption,Gc(a)}function Ef(a,b){if(b-=a.first,0>b||b>=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(f>b){c=e;break}b-=f}return c.lines[b]}function Ff(a,b,c){var d=[],e=b.line;return a.iter(b.line,c.line+1,function(a){var f=a.text;e==c.line&&(f=f.slice(0,c.ch)),e==b.line&&(f=f.slice(b.ch)),d.push(f),++e}),d}function Gf(a,b,c){var d=[];return a.iter(b,c,function(a){d.push(a.text)}),d}function Hf(a,b){var c=b-a.height;if(c)for(var d=a;d;d=d.parent)d.height+=c}function If(a){if(null==a.parent)return null;for(var b=a.parent,c=Cg(b.lines,a),d=b.parent;d;b=d,d=d.parent)for(var e=0;d.children[e]!=b;++e)c+=d.children[e].chunkSize();return c+b.first}function Jf(a,b){var c=a.first;a:do{for(var d=0;d<a.children.length;++d){var e=a.children[d],f=e.height;if(f>b){a=e;continue a}b-=f,c+=e.chunkSize()}return c}while(!a.lines);for(var d=0;d<a.lines.length;++d){var g=a.lines[d],h=g.height;if(h>b)break;b-=h}return c+d}function Kf(a){a=Re(a);for(var b=0,c=a.parent,d=0;d<c.lines.length;++d){var e=c.lines[d];if(e==a)break;b+=e.height}for(var f=c.parent;f;c=f,f=c.parent)for(var d=0;d<f.children.length;++d){var g=f.children[d];if(g==c)break;b+=g.height}return b}function Lf(a){var b=a.order;return null==b&&(b=a.order=sh(a.text)),b}function Mf(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function Nf(a,b){var c={from:qb(b.from),to:Ad(b),text:Ff(a,b.from,b.to)};return Uf(a,c,b.from.line,b.to.line+1),Cf(a,function(a){Uf(a,c,b.from.line,b.to.line+1)},!0),c}function Of(a){for(;a.length;){var b=Ag(a);if(!b.ranges)break;a.pop()}}function Pf(a,b){return b?(Of(a.done),Ag(a.done)):a.done.length&&!Ag(a.done).ranges?Ag(a.done):a.done.length>1&&!a.done[a.done.length-2].ranges?(a.done.pop(),Ag(a.done)):void 0}function Qf(a,b,c,d){var e=a.history;e.undone.length=0;var g,f=+new Date;if((e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>f-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))&&(g=Pf(e,e.lastOp==d))){var h=Ag(g.changes);0==pb(b.from,b.to)&&0==pb(b.from,h.to)?h.to=Ad(b):g.changes.push(Nf(a,b))}else{var i=Ag(e.done);for(i&&i.ranges||Tf(a.sel,e.done),g={changes:[Nf(a,b)],generation:e.generation},e.done.push(g);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift()}e.done.push(c),e.generation=++e.maxGeneration,e.lastModTime=e.lastSelTime=f,e.lastOp=d,e.lastOrigin=e.lastSelOrigin=b.origin,h||hg(a,"historyAdded")}function Rf(a,b,c,d){var e=b.charAt(0);return"*"==e||"+"==e&&c.ranges.length==d.ranges.length&&c.somethingSelected()==d.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function Sf(a,b,c,d){var e=a.history,f=d&&d.origin;c==e.lastOp||f&&e.lastSelOrigin==f&&(e.lastModTime==e.lastSelTime&&e.lastOrigin==f||Rf(a,f,Ag(e.done),b))?e.done[e.done.length-1]=b:Tf(b,e.done),e.lastSelTime=+new Date,e.lastSelOrigin=f,e.lastOp=c,d&&d.clearRedo!==!1&&Of(e.undone)}function Tf(a,b){var c=Ag(b);c&&c.ranges&&c.equals(a)||b.push(a)}function Uf(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans),++f})}function Vf(a){if(!a)return null;for(var c,b=0;b<a.length;++b)a[b].marker.explicitlyCleared?c||(c=a.slice(0,b)):c&&c.push(a[b]);return c?c.length?c:null:a}function Wf(a,b){var c=b["spans_"+a.id];if(!c)return null;for(var d=0,e=[];d<b.text.length;++d)e.push(Vf(c[d]));return e}function Xf(a,b,c){for(var d=0,e=[];d<a.length;++d){var f=a[d];if(f.ranges)e.push(c?tb.prototype.deepCopy.call(f):f);else{var g=f.changes,h=[];e.push({changes:h});for(var i=0;i<g.length;++i){var k,j=g[i];if(h.push({from:j.from,to:j.to,text:j.text}),b)for(var l in j)(k=l.match(/^spans_(\d+)$/))&&Cg(b,Number(k[1]))>-1&&(Ag(h)[l]=j[l],delete j[l])}}}return e}function Yf(a,b,c,d){c<a.line?a.line+=d:b<a.line&&(a.line=b,a.ch=0)}function Zf(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e],g=!0;if(f.ranges){f.copied||(f=a[e]=f.deepCopy(),f.copied=!0);for(var h=0;h<f.ranges.length;h++)Yf(f.ranges[h].anchor,b,c,d),Yf(f.ranges[h].head,b,c,d)}else{for(var h=0;h<f.changes.length;++h){var i=f.changes[h];if(c<i.from.line)i.from=ob(i.from.line+d,i.from.ch),i.to=ob(i.to.line+d,i.to.ch);else if(b<=i.to.line){g=!1;break}}g||(a.splice(0,e+1),e=0)}}}function $f(a,b){var c=b.from.line,d=b.to.line,e=b.text.length-(d-c)-1;Zf(a.done,c,d,e),Zf(a.undone,c,d,e)}function bg(a){return null!=a.defaultPrevented?a.defaultPrevented:0==a.returnValue}function dg(a){return a.target||a.srcElement}function eg(a){var b=a.which;return null==b&&(1&a.button?b=1:2&a.button?b=3:4&a.button&&(b=2)),s&&a.ctrlKey&&1==b&&(b=3),b}function kg(a,b){function e(a){return function(){a.apply(null,d)}}var c=a._handlers&&a._handlers[b];if(c){var d=Array.prototype.slice.call(arguments,2);ig||(++jg,ig=[],setTimeout(lg,0));for(var f=0;f<c.length;++f)ig.push(e(c[f]))}}function lg(){--jg;var a=ig;ig=null;for(var b=0;b<a.length;++b)a[b]()}function mg(a,b,c){return hg(a,c||b.type,a,b),bg(b)||b.codemirrorIgnore}function ng(a){var b=a._handlers&&a._handlers.cursorActivity;if(b)for(var c=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),d=0;d<b.length;++d)-1==Cg(c,b[d])&&c.push(b[d])}function og(a,b){var c=a._handlers&&a._handlers[b];return c&&c.length>0}function pg(a){a.prototype.on=function(a,b){fg(this,a,b)},a.prototype.off=function(a,b){gg(this,a,b)}}function vg(){this.id=null}function xg(a,b,c){for(var d=0,e=0;;){var f=a.indexOf(" ",d);-1==f&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}}function zg(a){for(;yg.length<=a;)yg.push(Ag(yg)+" ");return yg[a]}function Ag(a){return a[a.length-1]}function Cg(a,b){for(var c=0;c<a.length;++c)if(a[c]==b)return c;return-1}function Dg(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=b(a[d],d);return c}function Eg(a,b){var c;if(Object.create)c=Object.create(a);else{var d=function(){};d.prototype=a,c=new d}return b&&Fg(b,c),c}function Fg(a,b,c){b||(b={});for(var d in a)!a.hasOwnProperty(d)||c===!1&&b.hasOwnProperty(d)||(b[d]=a[d]);return b}function Gg(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function Jg(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function Lg(a){return a.charCodeAt(0)>=768&&Kg.test(a)}function Mg(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f<b.length;++f)e.appendChild(b[f]);return e}function Og(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild);return a}function Pg(a,b){return Og(a).appendChild(b)}function Qg(a,b){if(a.contains)return a.contains(b);for(;b=b.parentNode;)if(b==a)return!0}function Rg(){return document.activeElement}function Sg(a){return new RegExp("\\b"+a+"\\b\\s*")}function Tg(a,b){var c=Sg(b);c.test(a.className)&&(a.className=a.className.replace(c,""))}function Ug(a,b){Sg(b).test(a.className)||(a.className+=" "+b)}function Vg(a,b){for(var c=a.split(" "),d=0;d<c.length;d++)c[d]&&!Sg(c[d]).test(b)&&(b+=" "+c[d]);return b}function Yg(a){if(null!=Xg)return Xg;var b=Mg("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return Pg(a,b),b.offsetWidth&&(Xg=b.offsetHeight-b.clientHeight),Xg||0}function $g(a){if(null==Zg){var b=Mg("span","\u200b");Pg(a,Mg("span",[b,document.createTextNode("x")])),0!=a.firstChild.offsetHeight&&(Zg=b.offsetWidth<=1&&b.offsetHeight>2&&!c)}return Zg?Mg("span","\u200b"):Mg("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px")}function ah(a){if(null!=_g)return _g;var b=Pg(a,document.createTextNode("A\u062eA")),c=Ng(b,0,1).getBoundingClientRect();if(c.left==c.right)return!1;var d=Ng(b,1,2).getBoundingClientRect();return _g=d.right-c.right<3}function fh(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;f<a.length;++f){var g=a[f];(g.from<c&&g.to>b||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function gh(a){return a.level%2?a.to:a.from}function hh(a){return a.level%2?a.from:a.to}function ih(a){var b=Lf(a);return b?gh(b[0]):0}function jh(a){var b=Lf(a);return b?hh(Ag(b)):a.text.length}function kh(a,b){var c=Ef(a.doc,b),d=Re(c);d!=c&&(b=If(d));var e=Lf(d),f=e?e[0].level%2?jh(d):ih(d):0;return ob(b,f)}function lh(a,b){for(var c,d=Ef(a.doc,b);c=Pe(d);)d=c.find(1,!0).line,b=null;var e=Lf(d),f=e?e[0].level%2?ih(d):jh(d):d.text.length;return ob(null==b?If(d):b,f)}function mh(a,b,c){var d=a[0].level;return b==d?!0:c==d?!1:c>b}function oh(a,b){nh=null;for(var d,c=0;c<a.length;++c){var e=a[c];if(e.from<b&&e.to>b)return c;if(e.from==b||e.to==b){if(null!=d)return mh(a,e.level,a[d].level)?(e.from!=e.to&&(nh=d),c):(e.from!=e.to&&(nh=c),d);d=c}}return d}function ph(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&Lg(a.text.charAt(b)));return b}function qh(a,b,c,d){var e=Lf(a);if(!e)return rh(a,b,c,d);for(var f=oh(e,b),g=e[f],h=ph(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h<g.to)return h;if(h==g.from||h==g.to)return oh(e,h)==f?h:(g=e[f+=c],c>0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?ph(a,g.to,-1,d):ph(a,g.from,1,d)}}function rh(a,b,c,d){var e=b+c;if(d)for(;e>0&&Lg(a.text.charAt(e));)e+=c;return 0>e||e>a.text.length?null:e}var a=/gecko\/\d/i.test(navigator.userAgent),b=/MSIE \d/.test(navigator.userAgent),c=b&&(null==document.documentMode||document.documentMode<8),d=b&&(null==document.documentMode||document.documentMode<9),e=b&&(null==document.documentMode||document.documentMode<10),f=/Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent),g=b||f,h=/WebKit\//.test(navigator.userAgent),i=h&&/Qt\/\d+\.\d+/.test(navigator.userAgent),j=/Chrome\//.test(navigator.userAgent),k=/Opera\//.test(navigator.userAgent),l=/Apple Computer/.test(navigator.vendor),m=/KHTML\//.test(navigator.userAgent),n=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent),o=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),p=/PhantomJS/.test(navigator.userAgent),q=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),r=q||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),s=q||/Mac/.test(navigator.platform),t=/win/i.test(navigator.platform),u=k&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);u&&(u=Number(u[1])),u&&u>=15&&(k=!1,h=!0);var v=s&&(i||k&&(null==u||12.11>u)),w=a||g&&!d,x=!1,y=!1,ob=z.Pos=function(a,b){return this instanceof ob?(this.line=a,this.ch=b,void 0):new ob(a,b)},pb=z.cmpPos=function(a,b){return a.line-b.line||a.ch-b.ch};tb.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b<this.ranges.length;b++){var c=this.ranges[b],d=a.ranges[b];if(0!=pb(c.anchor,d.anchor)||0!=pb(c.head,d.head))return!1}return!0},deepCopy:function(){for(var a=[],b=0;b<this.ranges.length;b++)a[b]=new ub(qb(this.ranges[b].anchor),qb(this.ranges[b].head));return new tb(a,this.primIndex)},somethingSelected:function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},contains:function(a,b){b||(b=a);for(var c=0;c<this.ranges.length;c++){var d=this.ranges[c];if(pb(b,d.from())>=0&&pb(a,d.to())<=0)return c}return-1}},ub.prototype={from:function(){return sb(this.anchor,this.head)},to:function(){return rb(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var uc,Yc,Zc,fc={left:0,right:0,top:0,bottom:0},xc=0,dd=0,id=0,jd=null;g?jd=-.53:a?jd=15:j?jd=-.7:l&&(jd=-1/3);var nd,xd,qd=null,Ad=z.changeEnd=function(a){return a.text?ob(a.from.line+a.text.length-1,Ag(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};z.prototype={constructor:z,focus:function(){window.focus(),Rc(this),Oc(this)},setOption:function(a,b){var c=this.options,d=c[a];(c[a]!=b||"mode"==a)&&(c[a]=b,_d.hasOwnProperty(a)&&Bc(this,_d[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](a)},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;c<b.length;++c)if(b[c]==a||"string"!=typeof b[c]&&b[c].name==a)return b.splice(c,1),!0},addOverlay:Cc(function(a,b){var c=a.token?a:z.getMode(this.options,a);if(c.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:c,modeSpec:a,opaque:b&&b.opaque}),this.state.modeGen++,Gc(this)}),removeOverlay:Cc(function(a){for(var b=this.state.overlays,c=0;c<b.length;++c){var d=b[c].modeSpec;if(d==a||"string"==typeof a&&d.name==a)return b.splice(c,1),this.state.modeGen++,Gc(this),void 0}}),indentLine:Cc(function(a,b,c){"string"!=typeof b&&"number"!=typeof b&&(b=null==b?this.options.smartIndent?"smart":"prev":b?"add":"subtract"),Ab(this.doc,a)&&Ud(this,a,b,c)}),indentSelection:Cc(function(a){for(var b=this.doc.sel.ranges,c=-1,d=0;d<b.length;d++){var e=b[d];if(e.empty())e.head.line>c&&(Ud(this,e.head.line,a,!0),c=e.head.line,d==this.doc.sel.primIndex&&Sd(this));else{var f=Math.max(c,e.from().line),g=e.to();c=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var h=f;c>h;++h)Ud(this,h,a)}}}),getTokenAt:function(a,b){var c=this.doc;a=yb(c,a);for(var d=Wb(this,a.line,b),e=this.doc.mode,f=Ef(c,a.line),g=new pe(f.text,this.options.tabSize);g.pos<a.ch&&!g.eol();){g.start=g.pos;var h=ef(e,g,d)}return{start:g.start,end:g.pos,string:g.current(),type:h||null,state:d}},getTokenTypeAt:function(a){a=yb(this.doc,a);var f,b=hf(this,Ef(this.doc,a.line)),c=0,d=(b.length-1)/2,e=a.ch;if(0==e)f=b[2];else for(;;){var g=c+d>>1;if((g?b[2*g-1]:0)>=e)d=g;else{if(!(b[2*g+1]<e)){f=b[2*g+2];break}c=g+1}}var h=f?f.indexOf("cm-overlay "):-1;return 0>h?f:0==h?null:f.slice(0,h-1)},getModeAt:function(a){var b=this.doc.mode;return b.innerMode?z.innerMode(b,this.getTokenAt(a).state).mode:b},getHelper:function(a,b){return this.getHelpers(a,b)[0]},getHelpers:function(a,b){var c=[];if(!ge.hasOwnProperty(b))return ge;var d=ge[b],e=this.getModeAt(a);if("string"==typeof e[b])d[e[b]]&&c.push(d[e[b]]);else if(e[b])for(var f=0;f<e[b].length;f++){var g=d[e[b][f]];g&&c.push(g)}else e.helperType&&d[e.helperType]?c.push(d[e.helperType]):d[e.name]&&c.push(d[e.name]);for(var f=0;f<d._global.length;f++){var h=d._global[f];h.pred(e,this)&&-1==Cg(c,h.val)&&c.push(h.val)}return c},getStateAfter:function(a,b){var c=this.doc;return a=xb(c,null==a?c.first+c.size-1:a),Wb(this,a+1,b)},cursorCoords:function(a,b){var c,d=this.doc.sel.primary();return c=null==a?d.head:"object"==typeof a?yb(this.doc,a):a?d.from():d.to(),pc(this,c,b||"page")},charCoords:function(a,b){return oc(this,yb(this.doc,a),b||"page")},coordsChar:function(a,b){return a=nc(this,a,b||"page"),sc(this,a.left,a.top)},lineAtHeight:function(a,b){return a=nc(this,{top:a,left:0},b||"page").top,Jf(this.doc,a+this.display.viewOffset)},heightAtLine:function(a,b){var c=!1,d=this.doc.first+this.doc.size-1;a<this.doc.first?a=this.doc.first:a>d&&(a=d,c=!0);var e=Ef(this.doc,a);return mc(this,e,{top:0,left:0},b||"page").top+(c?this.doc.height-Kf(e):0)},defaultTextHeight:function(){return vc(this.display)},defaultCharWidth:function(){return wc(this.display)},setGutterMarker:Cc(function(a,b,c){return Vd(this,a,"gutter",function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&Jg(d)&&(a.gutterMarkers=null),!0})}),clearGutter:Cc(function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,Hc(b,d,"gutter"),Jg(c.gutterMarkers)&&(c.gutterMarkers=null)),++d})}),addLineClass:Cc(function(a,b,c){return Vd(this,a,"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"wrapClass";if(a[d]){if(new RegExp("(?:^|\\s)"+c+"(?:$|\\s)").test(a[d]))return!1;a[d]+=" "+c}else a[d]=c;return!0})}),removeLineClass:Cc(function(a,b,c){return Vd(this,a,"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"wrapClass",e=a[d];if(!e)return!1;if(null==c)a[d]=null;else{var f=e.match(new RegExp("(?:^|\\s+)"+c+"(?:$|\\s+)"));if(!f)return!1;var g=f.index+f[0].length;a[d]=e.slice(0,f.index)+(f.index&&g!=e.length?" ":"")+e.slice(g)||null}return!0})}),addLineWidget:Cc(function(a,b,c){return $e(this,a,b,c)}),removeLineWidget:function(a){a.clear()},lineInfo:function(a){if("number"==typeof a){if(!Ab(this.doc,a))return null;var b=a;if(a=Ef(this.doc,a),!a)return null}else{var b=If(a);if(null==b)return null}return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=pc(this,yb(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&Pd(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:Cc(rd),triggerOnKeyPress:Cc(ud),triggerOnKeyUp:Cc(td),execCommand:function(a){return je.hasOwnProperty(a)?je[a](this):void 0},findPosH:function(a,b,c,d){var e=1;0>b&&(e=-1,b=-b);for(var f=0,g=yb(this.doc,a);b>f&&(g=Xd(this.doc,g,e,c,d),!g.hitSide);++f);return g},moveH:Cc(function(a,b){var c=this;c.extendSelectionsBy(function(d){return c.display.shift||c.doc.extend||d.empty()?Xd(c.doc,d.head,a,b,c.options.rtlMoveVisually):0>a?d.from():d.to()},ug)}),deleteH:Cc(function(a,b){var c=this.doc.sel,d=this.doc;c.somethingSelected()?d.replaceSelection("",null,"+delete"):Wd(this,function(c){var e=Xd(d,c.head,a,b,!1);return 0>a?{from:e,to:c.head}:{from:c.head,to:e}})}),findPosV:function(a,b,c,d){var e=1,f=d;0>b&&(e=-1,b=-b);for(var g=0,h=yb(this.doc,a);b>g;++g){var i=pc(this,h,"div");if(null==f?f=i.left:i.left=f,h=Yd(this,i,e,c),h.hitSide)break}return h},moveV:Cc(function(a,b){var c=this,d=this.doc,e=[],f=!c.display.shift&&!d.extend&&d.sel.somethingSelected();if(d.extendSelectionsBy(function(g){if(f)return 0>a?g.from():g.to();var h=pc(c,g.head,"div");null!=g.goalColumn&&(h.left=g.goalColumn),e.push(h.left);var i=Yd(c,h,a,b);return"page"==b&&g==d.sel.primary()&&Rd(c,null,oc(c,i,"div").top-h.top),i},ug),e.length)for(var g=0;g<d.sel.ranges.length;g++)d.sel.ranges[g].goalColumn=e[g]}),toggleOverwrite:function(a){(null==a||a!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?Ug(this.display.cursorDiv,"CodeMirror-overwrite"):Tg(this.display.cursorDiv,"CodeMirror-overwrite"),hg(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return Rg()==this.display.input},scrollTo:Cc(function(a,b){(null!=a||null!=b)&&Td(this),null!=a&&(this.curOp.scrollLeft=a),null!=b&&(this.curOp.scrollTop=b)}),getScrollInfo:function(){var a=this.display.scroller,b=qg;return{left:a.scrollLeft,top:a.scrollTop,height:a.scrollHeight-b,width:a.scrollWidth-b,clientHeight:a.clientHeight-b,clientWidth:a.clientWidth-b}},scrollIntoView:Cc(function(a,b){if(null==a?(a={from:this.doc.sel.primary().head,to:null},null==b&&(b=this.options.cursorScrollMargin)):"number"==typeof a?a={from:ob(a,0),to:null}:null==a.from&&(a={from:a,to:null}),a.to||(a.to=a.from),a.margin=b||0,null!=a.from.line)Td(this),this.curOp.scrollToPos=a;else{var c=Qd(this,Math.min(a.from.left,a.to.left),Math.min(a.from.top,a.to.top)-a.margin,Math.max(a.from.right,a.to.right),Math.max(a.from.bottom,a.to.bottom)+a.margin);this.scrollTo(c.scrollLeft,c.scrollTop)}}),setSize:Cc(function(a,b){function c(a){return"number"==typeof a||/^\d+$/.test(String(a))?a+"px":a}null!=a&&(this.display.wrapper.style.width=c(a)),null!=b&&(this.display.wrapper.style.height=c(b)),this.options.lineWrapping&&ic(this),this.curOp.forceUpdate=!0,hg(this,"refresh",this)}),operation:function(a){return Ac(this,a)},refresh:Cc(function(){var a=this.display.cachedTextHeight;Gc(this),this.curOp.forceUpdate=!0,jc(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),K(this),(null==a||Math.abs(a-vc(this.display))>.5)&&F(this),hg(this,"refresh",this)}),swapDoc:Cc(function(a){var b=this.doc;return b.cm=null,Df(this,a),jc(this),Qc(this),this.scrollTo(a.scrollLeft,a.scrollTop),kg(this,"swapDoc",this,b),b}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},pg(z);var $d=z.defaults={},_d=z.optionHandlers={},be=z.Init={toString:function(){return"CodeMirror.Init"}};ae("value","",function(a,b){a.setValue(b)},!0),ae("mode",null,function(a,b){a.doc.modeOption=b,B(a)},!0),ae("indentUnit",2,B,!0),ae("indentWithTabs",!1),ae("smartIndent",!0),ae("tabSize",4,function(a){C(a),jc(a),Gc(a)},!0),ae("specialChars",/[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/g,function(a,b){a.options.specialChars=new RegExp(b.source+(b.test(" ")?"":"| "),"g"),a.refresh()},!0),ae("specialCharPlaceholder",of,function(a){a.refresh()},!0),ae("electricChars",!0),ae("rtlMoveVisually",!t),ae("wholeLineUpdateBefore",!0),ae("theme","default",function(a){H(a),I(a)},!0),ae("keyMap","default",G),ae("extraKeys",null),ae("lineWrapping",!1,D,!0),ae("gutters",[],function(a){N(a.options),I(a)},!0),ae("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?U(a.display)+"px":"0",a.refresh()
|
4 |
-
},!0),ae("coverGutterNextToScrollbar",!1,P,!0),ae("lineNumbers",!1,function(a){N(a.options),I(a)},!0),ae("firstLineNumber",1,I,!0),ae("lineNumberFormatter",function(a){return a},I,!0),ae("showCursorWhenSelecting",!1,Pb,!0),ae("resetSelectionOnContextMenu",!0),ae("readOnly",!1,function(a,b){"nocursor"==b?(wd(a),a.display.input.blur(),a.display.disabled=!0):(a.display.disabled=!1,b||Qc(a))}),ae("disableInput",!1,function(a,b){b||Qc(a)},!0),ae("dragDrop",!0),ae("cursorBlinkRate",530),ae("cursorScrollMargin",0),ae("cursorHeight",1),ae("workTime",100),ae("workDelay",100),ae("flattenSpans",!0,C,!0),ae("addModeClass",!1,C,!0),ae("pollInterval",100),ae("undoDepth",200,function(a,b){a.doc.history.undoDepth=b}),ae("historyEventDelay",1250),ae("viewportMargin",10,function(a){a.refresh()},!0),ae("maxHighlightLength",1e4,C,!0),ae("moveInputWithCursor",!0,function(a,b){b||(a.display.inputDiv.style.top=a.display.inputDiv.style.left=0)}),ae("tabindex",null,function(a,b){a.display.input.tabIndex=b||""}),ae("autofocus",null);var ce=z.modes={},de=z.mimeModes={};z.defineMode=function(a,b){if(z.defaults.mode||"null"==a||(z.defaults.mode=a),arguments.length>2){b.dependencies=[];for(var c=2;c<arguments.length;++c)b.dependencies.push(arguments[c])}ce[a]=b},z.defineMIME=function(a,b){de[a]=b},z.resolveMode=function(a){if("string"==typeof a&&de.hasOwnProperty(a))a=de[a];else if(a&&"string"==typeof a.name&&de.hasOwnProperty(a.name)){var b=de[a.name];"string"==typeof b&&(b={name:b}),a=Eg(b,a),a.name=b.name}else if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return z.resolveMode("application/xml");return"string"==typeof a?{name:a}:a||{name:"null"}},z.getMode=function(a,b){var b=z.resolveMode(b),c=ce[b.name];if(!c)return z.getMode(a,"text/plain");var d=c(a,b);if(ee.hasOwnProperty(b.name)){var e=ee[b.name];for(var f in e)e.hasOwnProperty(f)&&(d.hasOwnProperty(f)&&(d["_"+f]=d[f]),d[f]=e[f])}if(d.name=b.name,b.helperType&&(d.helperType=b.helperType),b.modeProps)for(var f in b.modeProps)d[f]=b.modeProps[f];return d},z.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),z.defineMIME("text/plain","null");var ee=z.modeExtensions={};z.extendMode=function(a,b){var c=ee.hasOwnProperty(a)?ee[a]:ee[a]={};Fg(b,c)},z.defineExtension=function(a,b){z.prototype[a]=b},z.defineDocExtension=function(a,b){zf.prototype[a]=b},z.defineOption=ae;var fe=[];z.defineInitHook=function(a){fe.push(a)};var ge=z.helpers={};z.registerHelper=function(a,b,c){ge.hasOwnProperty(a)||(ge[a]=z[a]={_global:[]}),ge[a][b]=c},z.registerGlobalHelper=function(a,b,c,d){z.registerHelper(a,b,d),ge[a]._global.push({pred:c,val:d})};var he=z.copyState=function(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c},ie=z.startState=function(a,b,c){return a.startState?a.startState(b,c):!0};z.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state,a=c.mode}return c||{mode:a,state:b}};var je=z.commands={selectAll:function(a){a.setSelection(ob(a.firstLine(),0),ob(a.lastLine()),sg)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),sg)},killLine:function(a){Wd(a,function(b){if(b.empty()){var c=Ef(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line<a.lastLine()?{from:b.head,to:ob(b.head.line+1,0)}:{from:b.head,to:ob(b.head.line,c)}}return{from:b.from(),to:b.to()}})},deleteLine:function(a){Wd(a,function(b){return{from:ob(b.from().line,0),to:yb(a.doc,ob(b.to().line+1,0))}})},delLineLeft:function(a){Wd(a,function(a){return{from:ob(a.from().line,0),to:a.from()}})},undo:function(a){a.undo()},redo:function(a){a.redo()},undoSelection:function(a){a.undoSelection()},redoSelection:function(a){a.redoSelection()},goDocStart:function(a){a.extendSelection(ob(a.firstLine(),0))},goDocEnd:function(a){a.extendSelection(ob(a.lastLine()))},goLineStart:function(a){a.extendSelectionsBy(function(b){return kh(a,b.head.line)},ug)},goLineStartSmart:function(a){a.extendSelectionsBy(function(b){var c=kh(a,b.head.line),d=a.getLineHandle(c.line),e=Lf(d);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.head.line==c.line&&b.head.ch<=f&&b.head.ch;return ob(c.line,g?0:f)}return c},ug)},goLineEnd:function(a){a.extendSelectionsBy(function(b){return lh(a,b.head.line)},ug)},goLineRight:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div")},ug)},goLineLeft:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:0,top:c},"div")},ug)},goLineUp:function(a){a.moveV(-1,"line")},goLineDown:function(a){a.moveV(1,"line")},goPageUp:function(a){a.moveV(-1,"page")},goPageDown:function(a){a.moveV(1,"page")},goCharLeft:function(a){a.moveH(-1,"char")},goCharRight:function(a){a.moveH(1,"char")},goColumnLeft:function(a){a.moveH(-1,"column")},goColumnRight:function(a){a.moveH(1,"column")},goWordLeft:function(a){a.moveH(-1,"word")},goGroupRight:function(a){a.moveH(1,"group")},goGroupLeft:function(a){a.moveH(-1,"group")},goWordRight:function(a){a.moveH(1,"word")},delCharBefore:function(a){a.deleteH(-1,"char")},delCharAfter:function(a){a.deleteH(1,"char")},delWordBefore:function(a){a.deleteH(-1,"word")},delWordAfter:function(a){a.deleteH(1,"word")},delGroupBefore:function(a){a.deleteH(-1,"group")},delGroupAfter:function(a){a.deleteH(1,"group")},indentAuto:function(a){a.indentSelection("smart")},indentMore:function(a){a.indentSelection("add")},indentLess:function(a){a.indentSelection("subtract")},insertTab:function(a){a.replaceSelection(" ")},insertSoftTab:function(a){for(var b=[],c=a.listSelections(),d=a.options.tabSize,e=0;e<c.length;e++){var f=c[e].from(),g=wg(a.getLine(f.line),f.ch,d);b.push(new Array(d-g%d+1).join(" "))}a.replaceSelections(b)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){Ac(a,function(){for(var b=a.listSelections(),c=0;c<b.length;c++){var d=b[c].head,e=Ef(a.doc,d.line).text;d.ch>0&&d.ch<e.length-1&&a.replaceRange(e.charAt(d.ch)+e.charAt(d.ch-1),ob(d.line,d.ch-1),ob(d.line,d.ch+1))}})},newlineAndIndent:function(a){Ac(a,function(){for(var b=a.listSelections().length,c=0;b>c;c++){var d=a.listSelections()[c];a.replaceRange("\n",d.anchor,d.head,"+input"),a.indentLine(d.from().line+1,null,!0),Sd(a)}})},toggleOverwrite:function(a){a.toggleOverwrite()}},ke=z.keyMap={};ke.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ke.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ke.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delLineLeft","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection",fallthrough:["basic","emacsy"]},ke.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},ke["default"]=s?ke.macDefault:ke.pcDefault;var me=z.lookupKey=function(a,b,c){function d(b){b=le(b);var e=b[a];if(e===!1)return"stop";if(null!=e&&c(e))return!0;if(b.nofallthrough)return"stop";var f=b.fallthrough;if(null==f)return!1;if("[object Array]"!=Object.prototype.toString.call(f))return d(f);for(var g=0;g<f.length;++g){var h=d(f[g]);if(h)return h}return!1}for(var e=0;e<b.length;++e){var f=d(b[e]);if(f)return"stop"!=f}},ne=z.isModifierKey=function(a){var b=eh[a.keyCode];return"Ctrl"==b||"Alt"==b||"Shift"==b||"Mod"==b},oe=z.keyName=function(a,b){if(k&&34==a.keyCode&&a["char"])return!1;var c=eh[a.keyCode];return null==c||a.altGraphKey?!1:(a.altKey&&(c="Alt-"+c),(v?a.metaKey:a.ctrlKey)&&(c="Ctrl-"+c),(v?a.ctrlKey:a.metaKey)&&(c="Cmd-"+c),!b&&a.shiftKey&&(c="Shift-"+c),c)};z.fromTextArea=function(a,b){function d(){a.value=i.getValue()}if(b||(b={}),b.value=a.value,!b.tabindex&&a.tabindex&&(b.tabindex=a.tabindex),!b.placeholder&&a.placeholder&&(b.placeholder=a.placeholder),null==b.autofocus){var c=Rg();b.autofocus=c==a||null!=a.getAttribute("autofocus")&&c==document.body}if(a.form&&(fg(a.form,"submit",d),!b.leaveSubmitMethodAlone)){var e=a.form,f=e.submit;try{var g=e.submit=function(){d(),e.submit=f,e.submit(),e.submit=g}}catch(h){}}a.style.display="none";var i=z(function(b){a.parentNode.insertBefore(b,a.nextSibling)},b);return i.save=d,i.getTextArea=function(){return a},i.toTextArea=function(){d(),a.parentNode.removeChild(i.getWrapperElement()),a.style.display="",a.form&&(gg(a.form,"submit",d),"function"==typeof a.form.submit&&(a.form.submit=f))},i};var pe=z.StringStream=function(a,b){this.pos=this.start=0,this.string=a,this.tabSize=b||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};pe.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(a){var b=this.string.charAt(this.pos);if("string"==typeof a)var c=b==a;else var c=b&&(a.test?a.test(b):a(b));return c?(++this.pos,b):void 0},eatWhile:function(a){for(var b=this.pos;this.eat(a););return this.pos>b},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);return b>-1?(this.pos=b,!0):void 0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=wg(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?wg(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return wg(this.string,null,this.tabSize)-(this.lineStart?wg(this.string,this.lineStart,this.tabSize):0)},match:function(a,b,c){if("string"!=typeof a){var f=this.string.slice(this.pos).match(a);return f&&f.index>0?null:(f&&b!==!1&&(this.pos+=f[0].length),f)}var d=function(a){return c?a.toLowerCase():a},e=this.string.substr(this.pos,a.length);return d(e)==d(a)?(b!==!1&&(this.pos+=a.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}};var qe=z.TextMarker=function(a,b){this.lines=[],this.type=b,this.doc=a};pg(qe),qe.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;if(b&&yc(a),og(this,"clear")){var c=this.find();c&&kg(this,"clear",c.from,c.to)}for(var d=null,e=null,f=0;f<this.lines.length;++f){var g=this.lines[f],h=ze(g.markedSpans,this);a&&!this.collapsed?Hc(a,If(g),"text"):a&&(null!=h.to&&(e=If(g)),null!=h.from&&(d=If(g))),g.markedSpans=Ae(g.markedSpans,h),null==h.from&&this.collapsed&&!Ve(this.doc,g)&&a&&Hf(g,vc(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var f=0;f<this.lines.length;++f){var i=Re(this.lines[f]),j=L(i);j>a.display.maxLineLength&&(a.display.maxLine=i,a.display.maxLineLength=j,a.display.maxLineChanged=!0)}null!=d&&a&&this.collapsed&&Gc(a,d,e+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Mb(a.doc)),a&&kg(a,"markerCleared",a,this),b&&zc(a),this.parent&&this.parent.clear()}},qe.prototype.find=function(a,b){null==a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;e<this.lines.length;++e){var f=this.lines[e],g=ze(f.markedSpans,this);if(null!=g.from&&(c=ob(b?f:If(f),g.from),-1==a))return c;if(null!=g.to&&(d=ob(b?f:If(f),g.to),1==a))return d}return c&&{from:c,to:d}},qe.prototype.changed=function(){var a=this.find(-1,!0),b=this,c=this.doc.cm;a&&c&&Ac(c,function(){var d=a.line,e=If(a.line),f=cc(c,e);if(f&&(hc(f),c.curOp.selectionChanged=c.curOp.forceUpdate=!0),c.curOp.updateMaxLine=!0,!Ve(b.doc,d)&&null!=b.height){var g=b.height;b.height=null;var h=Ze(b)-g;h&&Hf(d,d.height+h)}})},qe.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;b.maybeHiddenMarkers&&-1!=Cg(b.maybeHiddenMarkers,this)||(b.maybeUnhiddenMarkers||(b.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},qe.prototype.detachLine=function(a){if(this.lines.splice(Cg(this.lines,a),1),!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;(b.maybeHiddenMarkers||(b.maybeHiddenMarkers=[])).push(this)}};var re=0,te=z.SharedTextMarker=function(a,b){this.markers=a,this.primary=b;for(var c=0;c<a.length;++c)a[c].parent=this};pg(te),te.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();kg(this,"clear")}},te.prototype.find=function(a,b){return this.primary.find(a,b)};var Xe=z.LineWidget=function(a,b,c){if(c)for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d]);this.cm=a,this.node=b};pg(Xe),Xe.prototype.clear=function(){var a=this.cm,b=this.line.widgets,c=this.line,d=If(c);if(null!=d&&b){for(var e=0;e<b.length;++e)b[e]==this&&b.splice(e--,1);b.length||(c.widgets=null);var f=Ze(this);Ac(a,function(){Ye(a,c,-f),Hc(a,d,"widget"),Hf(c,Math.max(0,c.height-f))})}},Xe.prototype.changed=function(){var a=this.height,b=this.cm,c=this.line;this.height=null;var d=Ze(this)-a;d&&Ac(b,function(){b.curOp.forceUpdate=!0,Ye(b,c,d),Hf(c,c.height+d)})};var _e=z.Line=function(a,b,c){this.text=a,Je(this,b),this.height=c?c(this):1};pg(_e),_e.prototype.lineNo=function(){return If(this)};var kf={},lf={};wf.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,b){for(var c=a,d=a+b;d>c;++c){var e=this.lines[c];this.height-=e.height,bf(e),kg(e,"delete")}this.lines.splice(a,b)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,b,c){this.height+=c,this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));for(var d=0;d<b.length;++d)b[d].parent=this},iterN:function(a,b,c){for(var d=a+b;d>a;++a)if(c(this.lines[a]))return!0}},xf.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var c=0;c<this.children.length;++c){var d=this.children[c],e=d.chunkSize();if(e>a){var f=Math.min(b,e-a),g=d.height;if(d.removeInner(a,f),this.height-=g-d.height,e==f&&(this.children.splice(c--,1),d.parent=null),0==(b-=f))break;a=0}else a-=e}if(this.size-b<25&&(this.children.length>1||!(this.children[0]instanceof wf))){var h=[];this.collapse(h),this.children=[new wf(h)],this.children[0].parent=this}},collapse:function(a){for(var b=0;b<this.children.length;++b)this.children[b].collapse(a)},insertInner:function(a,b,c){this.size+=b.length,this.height+=c;for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(f>=a){if(e.insertInner(a,b,c),e.lines&&e.lines.length>50){for(;e.lines.length>50;){var g=e.lines.splice(e.lines.length-25,25),h=new wf(g);e.height-=h.height,this.children.splice(d+1,0,h),h.parent=this}this.maybeSpill()}break}a-=f}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new xf(b);if(a.parent){a.size-=c.size,a.height-=c.height;var e=Cg(a.parent.children,a);a.parent.children.splice(e+1,0,c)}else{var d=new xf(a.children);d.parent=a,a.children=[d,c],a=d}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(f>a){var g=Math.min(b,f-a);if(e.iterN(a,g,c))return!0;if(0==(b-=g))break;a=0}else a-=f}}};var yf=0,zf=z.Doc=function(a,b,c){if(!(this instanceof zf))return new zf(a,b,c);null==c&&(c=0),xf.call(this,[new wf([new _e("",null)])]),this.first=c,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=c;var d=ob(c,0);this.sel=wb(d),this.history=new Mf(null),this.id=++yf,this.modeOption=b,"string"==typeof a&&(a=bh(a)),vf(this,{from:d,to:d,text:a}),Jb(this,wb(d),sg)};zf.prototype=Eg(xf.prototype,{constructor:zf,iter:function(a,b,c){c?this.iterN(a-this.first,b-a,c):this.iterN(this.first,this.first+this.size,a)},insert:function(a,b){for(var c=0,d=0;d<b.length;++d)c+=b[d].height;this.insertInner(a-this.first,b,c)},remove:function(a,b){this.removeInner(a-this.first,b)},getValue:function(a){var b=Gf(this,this.first,this.first+this.size);return a===!1?b:b.join(a||"\n")},setValue:Dc(function(a){var b=ob(this.first,0),c=this.first+this.size-1;Gd(this,{from:b,to:ob(c,Ef(this,c).text.length),text:bh(a),origin:"setValue"},!0),Jb(this,wb(b))}),replaceRange:function(a,b,c,d){b=yb(this,b),c=c?yb(this,c):b,Md(this,a,b,c,d)},getRange:function(a,b,c){var d=Ff(this,yb(this,a),yb(this,b));return c===!1?d:d.join(c||"\n")},getLine:function(a){var b=this.getLineHandle(a);return b&&b.text},getLineHandle:function(a){return Ab(this,a)?Ef(this,a):void 0},getLineNumber:function(a){return If(a)},getLineHandleVisualStart:function(a){return"number"==typeof a&&(a=Ef(this,a)),Re(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return yb(this,a)},getCursor:function(a){var c,b=this.sel.primary();return c=null==a||"head"==a?b.head:"anchor"==a?b.anchor:"end"==a||"to"==a||a===!1?b.to():b.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Dc(function(a,b,c){Gb(this,yb(this,"number"==typeof a?ob(a,b||0):a),null,c)}),setSelection:Dc(function(a,b,c){Gb(this,yb(this,a),yb(this,b||a),c)}),extendSelection:Dc(function(a,b,c){Db(this,yb(this,a),b&&yb(this,b),c)}),extendSelections:Dc(function(a,b){Eb(this,Bb(this,a,b))}),extendSelectionsBy:Dc(function(a,b){Eb(this,Dg(this.sel.ranges,a),b)}),setSelections:Dc(function(a,b,c){if(a.length){for(var d=0,e=[];d<a.length;d++)e[d]=new ub(yb(this,a[d].anchor),yb(this,a[d].head));null==b&&(b=Math.min(a.length-1,this.sel.primIndex)),Jb(this,vb(e,b),c)}}),addSelection:Dc(function(a,b,c){var d=this.sel.ranges.slice(0);d.push(new ub(yb(this,a),yb(this,b||a))),Jb(this,vb(d,d.length-1),c)}),getSelection:function(a){for(var c,b=this.sel.ranges,d=0;d<b.length;d++){var e=Ff(this,b[d].from(),b[d].to());c=c?c.concat(e):e}return a===!1?c:c.join(a||"\n")},getSelections:function(a){for(var b=[],c=this.sel.ranges,d=0;d<c.length;d++){var e=Ff(this,c[d].from(),c[d].to());a!==!1&&(e=e.join(a||"\n")),b[d]=e}return b},replaceSelection:Dc(function(a,b,c){for(var d=[],e=0;e<this.sel.ranges.length;e++)d[e]=a;this.replaceSelections(d,b,c||"+input")}),replaceSelections:function(a,b,c){for(var d=[],e=this.sel,f=0;f<e.ranges.length;f++){var g=e.ranges[f];d[f]={from:g.from(),to:g.to(),text:bh(a[f]),origin:c}}for(var h=b&&"end"!=b&&Ed(this,d,b),f=d.length-1;f>=0;f--)Gd(this,d[f]);h?Ib(this,h):this.cm&&Sd(this.cm)},undo:Dc(function(){Id(this,"undo")}),redo:Dc(function(){Id(this,"redo")}),undoSelection:Dc(function(){Id(this,"undo",!0)}),redoSelection:Dc(function(){Id(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d<a.done.length;d++)a.done[d].ranges||++b;for(var d=0;d<a.undone.length;d++)a.undone[d].ranges||++c;return{undo:b,redo:c}},clearHistory:function(){this.history=new Mf(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:Xf(this.history.done),undone:Xf(this.history.undone)}},setHistory:function(a){var b=this.history=new Mf(this.history.maxGeneration);b.done=Xf(a.done.slice(0),null,!0),b.undone=Xf(a.undone.slice(0),null,!0)},markText:function(a,b,c){return se(this,yb(this,a),yb(this,b),c,"range")},setBookmark:function(a,b){var c={replacedWith:b&&(null==b.nodeType?b.widget:b),insertLeft:b&&b.insertLeft,clearWhenEmpty:!1,shared:b&&b.shared};return a=yb(this,a),se(this,a,a,c,"bookmark")},findMarksAt:function(a){a=yb(this,a);var b=[],c=Ef(this,a.line).markedSpans;if(c)for(var d=0;d<c.length;++d){var e=c[d];(null==e.from||e.from<=a.ch)&&(null==e.to||e.to>=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=yb(this,a),b=yb(this,b);var d=[],e=a.line;return this.iter(a.line,b.line+1,function(f){var g=f.markedSpans;if(g)for(var h=0;h<g.length;h++){var i=g[h];e==a.line&&a.ch>i.to||null==i.from&&e!=a.line||e==b.line&&i.from>b.ch||c&&!c(i.marker)||d.push(i.marker.parent||i.marker)}++e}),d},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;d<c.length;++d)null!=c[d].from&&a.push(c[d].marker)}),a},posFromIndex:function(a){var b,c=this.first;return this.iter(function(d){var e=d.text.length+1;return e>a?(b=a,!0):(a-=e,++c,void 0)}),yb(this,ob(c,b))},indexFromPos:function(a){a=yb(this,a);var b=a.ch;return a.line<this.first||a.ch<0?0:(this.iter(this.first,a.line,function(a){b+=a.text.length+1}),b)},copy:function(a){var b=new zf(Gf(this,this.first,this.first+this.size),this.modeOption,this.first);return b.scrollTop=this.scrollTop,b.scrollLeft=this.scrollLeft,b.sel=this.sel,b.extend=!1,a&&(b.history.undoDepth=this.history.undoDepth,b.setHistory(this.getHistory())),b},linkedDoc:function(a){a||(a={});var b=this.first,c=this.first+this.size;null!=a.from&&a.from>b&&(b=a.from),null!=a.to&&a.to<c&&(c=a.to);var d=new zf(Gf(this,b,c),a.mode||this.modeOption,b);return a.sharedHist&&(d.history=this.history),(this.linked||(this.linked=[])).push({doc:d,sharedHist:a.sharedHist}),d.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],we(d,ve(this)),d},unlinkDoc:function(a){if(a instanceof z&&(a=a.doc),this.linked)for(var b=0;b<this.linked.length;++b){var c=this.linked[b];if(c.doc==a){this.linked.splice(b,1),a.unlinkDoc(this),xe(ve(this));break}}if(a.history==this.history){var d=[a.id];Cf(a,function(a){d.push(a.id)},!0),a.history=new Mf(null),a.history.done=Xf(this.history.done,d),a.history.undone=Xf(this.history.undone,d)}},iterLinkedDocs:function(a){Cf(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),zf.prototype.eachLine=zf.prototype.iter;var Af="iter insert remove copy getEditor".split(" ");for(var Bf in zf.prototype)zf.prototype.hasOwnProperty(Bf)&&Cg(Af,Bf)<0&&(z.prototype[Bf]=function(a){return function(){return a.apply(this.doc,arguments)}}(zf.prototype[Bf]));pg(zf);var ig,_f=z.e_preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},ag=z.e_stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},cg=z.e_stop=function(a){_f(a),ag(a)},fg=z.on=function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var d=a._handlers||(a._handlers={}),e=d[b]||(d[b]=[]);e.push(c)}},gg=z.off=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else{var d=a._handlers&&a._handlers[b];if(!d)return;for(var e=0;e<d.length;++e)if(d[e]==c){d.splice(e,1);break}}},hg=z.signal=function(a,b){var c=a._handlers&&a._handlers[b];if(c)for(var d=Array.prototype.slice.call(arguments,2),e=0;e<c.length;++e)c[e].apply(null,d)},jg=0,qg=30,rg=z.Pass={toString:function(){return"CodeMirror.Pass"}},sg={scroll:!1},tg={origin:"*mouse"},ug={origin:"+move"};vg.prototype.set=function(a,b){clearTimeout(this.id),this.id=setTimeout(b,a)};var wg=z.countColumn=function(a,b,c,d,e){null==b&&(b=a.search(/[^\s\u00a0]/),-1==b&&(b=a.length));for(var f=d||0,g=e||0;;){var h=a.indexOf(" ",f);if(0>h||h>=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}},yg=[""],Bg=function(a){a.select()};q?Bg=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:g&&(Bg=function(a){try{a.select()}catch(b){}}),[].indexOf&&(Cg=function(a,b){return a.indexOf(b)}),[].map&&(Dg=function(a,b){return a.map(b)});var Ng,Hg=/[\u00df\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ig=z.isWordChar=function(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||Hg.test(a))},Kg=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Ng=document.createRange?function(a,b,c){var d=document.createRange();return d.setEnd(a,c),d.setStart(a,b),d}:function(a,b,c){var d=document.body.createTextRange();return d.moveToElementText(a.parentNode),d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d},b&&(Rg=function(){try{return document.activeElement}catch(a){return document.body}});var Xg,Zg,_g,Wg=function(){if(d)return!1;var a=Mg("div");return"draggable"in a||"dragDrop"in a}(),bh=z.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;d>=b;){var e=a.indexOf("\n",b);-1==e&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");-1!=g?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},ch=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?0!=b.compareEndPoints("StartToEnd",b):!1},dh=function(){var a=Mg("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),eh={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};z.keyNames=eh,function(){for(var a=0;10>a;a++)eh[a+48]=eh[a+96]=String(a);for(var a=65;90>=a;a++)eh[a]=String.fromCharCode(a);for(var a=1;12>=a;a++)eh[a+111]=eh[a+63235]="F"+a}();var nh,sh=function(){function c(c){return 247>=c?a.charAt(c):c>=1424&&1524>=c?"R":c>=1536&&1773>=c?b.charAt(c-1536):c>=1774&&2220>=c?"r":c>=8192&&8203>=c?"w":8204==c?"b":"L"}function j(a,b,c){this.level=a,this.from=b,this.to=c}var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",b="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,f=/[LRr]/,g=/[Lb1n]/,h=/[1n]/,i="L";return function(a){if(!d.test(a))return!1;for(var m,b=a.length,k=[],l=0;b>l;++l)k.push(m=c(a.charCodeAt(l)));for(var l=0,n=i;b>l;++l){var m=k[l];"m"==m?k[l]=n:n=m}for(var l=0,o=i;b>l;++l){var m=k[l];"1"==m&&"r"==o?k[l]="n":f.test(m)&&(o=m,"r"==m&&(k[l]="R"))}for(var l=1,n=k[0];b-1>l;++l){var m=k[l];"+"==m&&"1"==n&&"1"==k[l+1]?k[l]="1":","!=m||n!=k[l+1]||"1"!=n&&"n"!=n||(k[l]=n),n=m}for(var l=0;b>l;++l){var m=k[l];if(","==m)k[l]="N";else if("%"==m){for(var p=l+1;b>p&&"%"==k[p];++p);for(var q=l&&"!"==k[l-1]||b>p&&"1"==k[p]?"1":"N",r=l;p>r;++r)k[r]=q;l=p-1}}for(var l=0,o=i;b>l;++l){var m=k[l];"L"==o&&"1"==m?k[l]="L":f.test(m)&&(o=m)}for(var l=0;b>l;++l)if(e.test(k[l])){for(var p=l+1;b>p&&e.test(k[p]);++p);for(var s="L"==(l?k[l-1]:i),t="L"==(b>p?k[p]:i),q=s||t?"L":"R",r=l;p>r;++r)k[r]=q;l=p-1}for(var v,u=[],l=0;b>l;)if(g.test(k[l])){var w=l;for(++l;b>l&&g.test(k[l]);++l);u.push(new j(0,w,l))}else{var x=l,y=u.length;for(++l;b>l&&"L"!=k[l];++l);for(var r=x;l>r;)if(h.test(k[r])){r>x&&u.splice(y,0,new j(1,x,r));var z=r;for(++r;l>r&&h.test(k[r]);++r);u.splice(y,0,new j(2,z,r)),x=r}else++r;l>x&&u.splice(y,0,new j(1,x,l))}return 1==u[0].level&&(v=a.match(/^\s+/))&&(u[0].from=v[0].length,u.unshift(new j(0,0,v[0].length))),1==Ag(u).level&&(v=a.match(/\s+$/))&&(Ag(u).to-=v[0].length,u.push(new j(0,b-v[0].length,b))),u[0].level!=Ag(u).level&&u.push(new j(u[0].level,b,b)),u}}();return z.version="4.0.4",z}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=0;c<a.length;++c)b[a[c]]=!0;return b}function q(a,b){for(var d,c=!1;null!=(d=a.next());){if(c&&"/"==d){b.tokenize=null;
|
5 |
-
break}c="*"==d}return["comment","comment"]}function r(a,b){return a.skipTo("-->")?(a.match("-->"),b.tokenize=null):a.skipToEnd(),["comment","comment"]}a.defineMode("css",function(b,c){function p(a,b){return n=b,a}function q(a,b){var c=a.next();if(e[c]){var d=e[c](a,b);if(d!==!1)return d}return"@"==c?(a.eatWhile(/[\w\\\-]/),p("def",a.current())):"="==c||("~"==c||"|"==c)&&a.eat("=")?p(null,"compare"):'"'==c||"'"==c?(b.tokenize=r(c),b.tokenize(a,b)):"#"==c?(a.eatWhile(/[\w\\\-]/),p("atom","hash")):"!"==c?(a.match(/^\s*\w*/),p("keyword","important")):/\d/.test(c)||"."==c&&a.eat(/\d/)?(a.eatWhile(/[\w.%]/),p("number","unit")):"-"!==c?/[,+>*\/]/.test(c)?p(null,"select-op"):"."==c&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?p("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(c)?p(null,c):"u"==c&&a.match("rl(")?(a.backUp(1),b.tokenize=s,p("property","word")):/[\w\\\-]/.test(c)?(a.eatWhile(/[\w\\\-]/),p("property","word")):p(null,null):/[\d.]/.test(a.peek())?(a.eatWhile(/[\w.%]/),p("number","unit")):a.match(/^[^-]+-/)?p("meta","meta"):void 0}function r(a){return function(b,c){for(var e,d=!1;null!=(e=b.next());){if(e==a&&!d){")"==a&&b.backUp(1);break}d=!d&&"\\"==e}return(e==a||!d&&")"!=a)&&(c.tokenize=null),p("string","string")}}function s(a,b){return a.next(),b.tokenize=a.match(/\s*[\"\')]/,!1)?null:r(")"),p(null,"(")}function t(a,b,c){this.type=a,this.indent=b,this.prev=c}function u(a,b,c){return a.context=new t(c,b.indentation()+d,a.context),c}function v(a){return a.context=a.context.prev,a.context.type}function w(a,b,c){return z[c.context.type](a,b,c)}function x(a,b,c,d){for(var e=d||1;e>0;e--)c.context=c.context.prev;return w(a,b,c)}function y(a){var b=a.current().toLowerCase();o=k.hasOwnProperty(b)?"atom":j.hasOwnProperty(b)?"keyword":"variable"}c.propertyKeywords||(c=a.resolveMode("text/css"));var n,o,d=b.indentUnit,e=c.tokenHooks,f=c.mediaTypes||{},g=c.mediaFeatures||{},h=c.propertyKeywords||{},i=c.nonStandardPropertyKeywords||{},j=c.colorKeywords||{},k=c.valueKeywords||{},l=c.fontProperties||{},m=c.allowNested,z={};return z.top=function(a,b,c){if("{"==a)return u(c,b,"block");if("}"==a&&c.context.prev)return v(c);if("@media"==a)return u(c,b,"media");if("@font-face"==a)return"font_face_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(a))return"keyframes";if(a&&"@"==a.charAt(0))return u(c,b,"at");if("hash"==a)o="builtin";else if("word"==a)o="tag";else{if("variable-definition"==a)return"maybeprop";if("interpolation"==a)return u(c,b,"interpolation");if(":"==a)return"pseudo";if(m&&"("==a)return u(c,b,"params")}return c.context.type},z.block=function(a,b,c){if("word"==a){var d=b.current().toLowerCase();return h.hasOwnProperty(d)?(o="property","maybeprop"):i.hasOwnProperty(d)?(o="string-2","maybeprop"):m?(o=b.match(/^\s*:/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==a?"block":m||"hash"!=a&&"qualifier"!=a?z.top(a,b,c):(o="error","block")},z.maybeprop=function(a,b,c){return":"==a?u(c,b,"prop"):w(a,b,c)},z.prop=function(a,b,c){if(";"==a)return v(c);if("{"==a&&m)return u(c,b,"propBlock");if("}"==a||"{"==a)return x(a,b,c);if("("==a)return u(c,b,"parens");if("hash"!=a||/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(b.current())){if("word"==a)y(b);else if("interpolation"==a)return u(c,b,"interpolation")}else o+=" error";return"prop"},z.propBlock=function(a,b,c){return"}"==a?v(c):"word"==a?(o="property","maybeprop"):c.context.type},z.parens=function(a,b,c){return"{"==a||"}"==a?x(a,b,c):")"==a?v(c):"parens"},z.pseudo=function(a,b,c){return"word"==a?(o="variable-3",c.context.type):w(a,b,c)},z.media=function(a,b,c){if("("==a)return u(c,b,"media_parens");if("}"==a)return x(a,b,c);if("{"==a)return v(c)&&u(c,b,m?"block":"top");if("word"==a){var d=b.current().toLowerCase();o="only"==d||"not"==d||"and"==d?"keyword":f.hasOwnProperty(d)?"attribute":g.hasOwnProperty(d)?"property":"error"}return c.context.type},z.media_parens=function(a,b,c){return")"==a?v(c):"{"==a||"}"==a?x(a,b,c,2):z.media(a,b,c)},z.font_face_before=function(a,b,c){return"{"==a?u(c,b,"font_face"):w(a,b,c)},z.font_face=function(a,b,c){return"}"==a?v(c):"word"==a?(o=l.hasOwnProperty(b.current().toLowerCase())?"property":"error","maybeprop"):"font_face"},z.keyframes=function(a,b,c){return"word"==a?(o="variable","keyframes"):"{"==a?u(c,b,"top"):w(a,b,c)},z.at=function(a,b,c){return";"==a?v(c):"{"==a||"}"==a?x(a,b,c):("word"==a?o="tag":"hash"==a&&(o="builtin"),"at")},z.interpolation=function(a,b,c){return"}"==a?v(c):"{"==a||";"==a?x(a,b,c):("variable"!=a&&(o="error"),"interpolation")},z.params=function(a,b,c){return")"==a?v(c):"{"==a||"}"==a?x(a,b,c):("word"==a&&y(b),"params")},{startState:function(a){return{tokenize:null,state:"top",context:new t("top",a||0,null)}},token:function(a,b){if(!b.tokenize&&a.eatSpace())return null;var c=(b.tokenize||q)(a,b);return c&&"object"==typeof c&&(n=c[1],c=c[0]),o=c,b.state=z[b.state](n,a,b),o},indent:function(a,b){var c=a.context,e=b&&b.charAt(0),f=c.indent;return"prop"==c.type&&"}"==e&&(c=c.prev),!c.prev||("}"!=e||"block"!=c.type&&"top"!=c.type&&"interpolation"!=c.type&&"font_face"!=c.type)&&(")"!=e||"parens"!=c.type&&"params"!=c.type&&"media_parens"!=c.type)&&("{"!=e||"at"!=c.type&&"media"!=c.type)||(f=c.indent-d,c=c.prev),f},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var c=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],d=b(c),e=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"],f=b(e),g=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-inside","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-profile","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","kerning","text-anchor","writing-mode"],h=b(g),i=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],i=b(i),j=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],k=b(j),l=["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","keep-all","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"],m=b(l),n=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],o=b(n),p=c.concat(e).concat(g).concat(i).concat(j).concat(l);a.registerHelper("hintWords","css",p),a.defineMIME("text/css",{mediaTypes:d,mediaFeatures:f,propertyKeywords:h,nonStandardPropertyKeywords:i,colorKeywords:k,valueKeywords:m,fontProperties:o,tokenHooks:{"<":function(a,b){return a.match("!--")?(b.tokenize=r,r(a,b)):!1},"/":function(a,b){return a.eat("*")?(b.tokenize=q,q(a,b)):!1}},name:"css"}),a.defineMIME("text/x-scss",{mediaTypes:d,mediaFeatures:f,propertyKeywords:h,nonStandardPropertyKeywords:i,colorKeywords:k,valueKeywords:m,fontProperties:o,allowNested:!0,tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=q,q(a,b)):["operator","operator"]},":":function(a){return a.match(/\s*{/)?[null,"{"]:!1},$:function(a){return a.match(/^[\w-]+/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(a){return a.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),a.defineMIME("text/x-less",{mediaTypes:d,mediaFeatures:f,propertyKeywords:h,nonStandardPropertyKeywords:i,colorKeywords:k,valueKeywords:m,fontProperties:o,allowNested:!0,tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=q,q(a,b)):["operator","operator"]},"@":function(a){return a.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(a.eatWhile(/[\w\\\-]/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function d(a){for(var d=0;d<a.state.activeLines.length;d++)a.removeLineClass(a.state.activeLines[d],"wrap",b),a.removeLineClass(a.state.activeLines[d],"background",c)}function e(a,b){if(a.length!=b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function f(a,f){for(var g=[],h=0;h<f.length;h++){var i=a.getLineHandleVisualStart(f[h].head.line);g[g.length-1]!=i&&g.push(i)}e(a.state.activeLines,g)||a.operation(function(){d(a);for(var e=0;e<g.length;e++)a.addLineClass(g[e],"wrap",b),a.addLineClass(g[e],"background",c);a.state.activeLines=g})}function g(a,b){f(a,b.ranges)}var b="CodeMirror-activeline",c="CodeMirror-activeline-background";a.defineOption("styleActiveLine",!1,function(b,c,e){var h=e&&e!=a.Init;c&&!h?(b.state.activeLines=[],f(b,b.listSelections()),b.on("beforeSelectionChange",g)):!c&&h&&(b.off("beforeSelectionChange",g),d(b),delete b.state.activeLines)})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function e(a,b,e,g){var h=a.getLineHandle(b.line),i=b.ch-1,j=i>=0&&d[h.text.charAt(i)]||d[h.text.charAt(++i)];if(!j)return null;var k=">"==j.charAt(1)?1:-1;if(e&&k>0!=(i==b.ch))return null;var l=a.getTokenTypeAt(c(b.line,i+1)),m=f(a,c(b.line,i+(k>0?1:0)),k,l||null,g);return null==m?null:{from:c(b.line,i),to:m&&m.pos,match:m&&m.ch==j.charAt(0),forward:k>0}}function f(a,b,e,f,g){for(var h=g&&g.maxScanLineLength||1e4,i=g&&g.maxScanLines||1e3,j=[],k=g&&g.bracketRegex?g.bracketRegex:/[(){}[\]]/,l=e>0?Math.min(b.line+i,a.lastLine()+1):Math.max(a.firstLine()-1,b.line-i),m=b.line;m!=l;m+=e){var n=a.getLine(m);if(n){var o=e>0?0:n.length-1,p=e>0?n.length:-1;if(!(n.length>h))for(m==b.line&&(o=b.ch-(0>e?1:0));o!=p;o+=e){var q=n.charAt(o);if(k.test(q)&&(void 0===f||a.getTokenTypeAt(c(m,o+1))==f)){var r=d[q];if(">"==r.charAt(1)==e>0)j.push(q);else{if(!j.length)return{pos:c(m,o),ch:q};j.pop()}}}}}return m-e==(e>0?a.lastLine():a.firstLine())?!1:null}function g(a,d,f){for(var g=a.state.matchBrackets.maxHighlightLineLength||1e3,h=[],i=a.listSelections(),j=0;j<i.length;j++){var k=i[j].empty()&&e(a,i[j].head,!1,f);if(k&&a.getLine(k.from.line).length<=g){var l=k.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";h.push(a.markText(k.from,c(k.from.line,k.from.ch+1),{className:l})),k.to&&a.getLine(k.to.line).length<=g&&h.push(a.markText(k.to,c(k.to.line,k.to.ch+1),{className:l}))}}if(h.length){b&&a.state.focused&&a.display.input.focus();var m=function(){a.operation(function(){for(var a=0;a<h.length;a++)h[a].clear()})};if(!d)return m;setTimeout(m,800)}}function i(a){a.operation(function(){h&&(h(),h=null),h=g(a,!1,a.state.matchBrackets)})}var b=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),c=a.Pos,d={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},h=null;a.defineOption("matchBrackets",!1,function(b,c,d){d&&d!=a.Init&&b.off("cursorActivity",i),c&&(b.state.matchBrackets="object"==typeof c?c:{},b.on("cursorActivity",i))}),a.defineExtension("matchBrackets",function(){g(this,!0)}),a.defineExtension("findMatchingBracket",function(a,b,c){return e(this,a,b,c)}),a.defineExtension("scanForBracket",function(a,b,c,d){return f(this,a,b,c,d)})});
|
|
|
|
|
|
|
|
|
|
bws_menu/product_list.php
CHANGED
@@ -153,14 +153,14 @@ $bws_plugins = array(
|
|
153 |
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/google-2-step-verification/buy/?k=b5605ea9bb3628682cfa416e70e78410&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
154 |
'pro_settings' => 'admin.php?page=google-2-step-verification-pro.php',
|
155 |
),
|
156 |
-
'adsense-
|
157 |
'category' => array( 'marketing' ),
|
158 |
-
'name' => '
|
159 |
'description' => __( 'Add Adsense ads to WordPress website pages, posts, custom posts, search results, categories, tags, and widgets.', 'bestwebsoft' ),
|
160 |
-
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/google-adsense/?k=
|
161 |
-
'settings' => 'admin.php?page=adsense
|
162 |
'pro_version' => 'adsense-pro/adsense-pro.php',
|
163 |
-
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/google-adsense/buy/?k=
|
164 |
'pro_settings' => 'admin.php?page=adsense-pro.php',
|
165 |
),
|
166 |
'bws-google-analytics/bws-google-analytics.php' => array(
|
153 |
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/google-2-step-verification/buy/?k=b5605ea9bb3628682cfa416e70e78410&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
154 |
'pro_settings' => 'admin.php?page=google-2-step-verification-pro.php',
|
155 |
),
|
156 |
+
'bws-adsense/bws-adsense.php' => array(
|
157 |
'category' => array( 'marketing' ),
|
158 |
+
'name' => 'AdS',
|
159 |
'description' => __( 'Add Adsense ads to WordPress website pages, posts, custom posts, search results, categories, tags, and widgets.', 'bestwebsoft' ),
|
160 |
+
'link' => 'https://bestwebsoft.com/products/wordpress/plugins/google-adsense/?k=9d719e415eee289845b00843e8847bc9&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
161 |
+
'settings' => 'admin.php?page=bws-adsense.php',
|
162 |
'pro_version' => 'adsense-pro/adsense-pro.php',
|
163 |
+
'purchase' => 'https://bestwebsoft.com/products/wordpress/plugins/google-adsense/buy/?k=60e3979921e354feb0347e88e7d7b73d&pn=' . $bws_plugin_info['id'] . '&v=' . $bws_plugin_info['version'] . '&wp_v=' . $wp_version,
|
164 |
'pro_settings' => 'admin.php?page=adsense-pro.php',
|
165 |
),
|
166 |
'bws-google-analytics/bws-google-analytics.php' => array(
|
google-captcha.php
CHANGED
@@ -6,7 +6,7 @@ Description: Protect WordPress website forms from spam entries with Google Captc
|
|
6 |
Author: BestWebSoft
|
7 |
Text Domain: google-captcha
|
8 |
Domain Path: /languages
|
9 |
-
Version: 1.
|
10 |
Author URI: https://bestwebsoft.com/
|
11 |
License: GPLv3 or later
|
12 |
*/
|
@@ -557,7 +557,7 @@ if ( ! function_exists( 'gglcptch_is_recaptcha_required' ) ) {
|
|
557 |
}
|
558 |
|
559 |
$result =
|
560 |
-
|
561 |
(
|
562 |
! empty( $gglcptch_options[ $form_slug ] ) &&
|
563 |
( ! $is_user_logged_in || ! gglcptch_is_hidden_for_role() )
|
6 |
Author: BestWebSoft
|
7 |
Text Domain: google-captcha
|
8 |
Domain Path: /languages
|
9 |
+
Version: 1.70
|
10 |
Author URI: https://bestwebsoft.com/
|
11 |
License: GPLv3 or later
|
12 |
*/
|
557 |
}
|
558 |
|
559 |
$result =
|
560 |
+
isset( $gglcptch_options[ $form_slug ] ) &&
|
561 |
(
|
562 |
! empty( $gglcptch_options[ $form_slug ] ) &&
|
563 |
( ! $is_user_logged_in || ! gglcptch_is_hidden_for_role() )
|
includes/allowlist.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Display content of "Allow List" tab on settings page
|
|
|
4 |
* @subpackage reCaptcha
|
5 |
* @since 1.27
|
6 |
* @version 1.0.0
|
@@ -8,7 +9,7 @@
|
|
8 |
|
9 |
if ( ! class_exists( 'Gglcptch_Allowlist' ) ) {
|
10 |
if ( ! class_exists( 'WP_List_Table' ) ) {
|
11 |
-
require_once
|
12 |
}
|
13 |
|
14 |
class Gglcptch_Allowlist extends WP_List_Table {
|
@@ -21,44 +22,47 @@ if ( ! class_exists( 'Gglcptch_Allowlist' ) ) {
|
|
21 |
$s;
|
22 |
|
23 |
/**
|
24 |
-
|
25 |
-
|
26 |
-
function __construct( $plugin_basename ) {
|
27 |
global $gglcptch_options;
|
28 |
if ( empty( $gglcptch_options ) ) {
|
29 |
$gglcptch_options = get_option( 'gglcptch_options' );
|
30 |
}
|
31 |
-
parent::__construct(
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
35 |
)
|
36 |
);
|
37 |
-
$this->basename
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
* Display content
|
|
|
42 |
* @return void
|
43 |
*/
|
44 |
-
function display_content() {
|
45 |
global $gglcptch_options; ?>
|
46 |
-
<h1 class="wp-heading-inline"><?php
|
47 |
<?php if ( ! ( isset( $_REQUEST['gglcptch_show_allowlist_form'] ) || isset( $_REQUEST['gglcptch_add_to_allowlist'] ) ) ) { ?>
|
48 |
<form method="post" action="admin.php?page=google-captcha-allowlist.php" style="display: inline;">
|
49 |
-
<button class="page-title-action" name="gglcptch_show_allowlist_form" value="on"<?php echo ( isset( $_POST['gglcptch_add_to_allowlist'] ) ) ? ' style="display: none;"' : ''; ?>><?php
|
50 |
</form>
|
51 |
-
|
|
|
52 |
|
53 |
if ( isset( $_SERVER ) ) {
|
54 |
$sever_vars = array( 'REMOTE_ADDR', 'HTTP_X_REAL_IP', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR' );
|
55 |
foreach ( $sever_vars as $var ) {
|
56 |
if ( ! empty( $_SERVER[ $var ] ) ) {
|
57 |
-
if ( filter_var( $_SERVER[ $var ], FILTER_VALIDATE_IP ) ) {
|
58 |
-
$my_ip = $_SERVER[ $var ];
|
59 |
break;
|
60 |
} else { /* if proxy */
|
61 |
-
$ip_array = explode( ',', $_SERVER[ $var ] );
|
62 |
if ( is_array( $ip_array ) && ! empty( $ip_array ) && filter_var( $ip_array[0], FILTER_VALIDATE_IP ) ) {
|
63 |
$my_ip = $ip_array[0];
|
64 |
break;
|
@@ -69,54 +73,68 @@ if ( ! class_exists( 'Gglcptch_Allowlist' ) ) {
|
|
69 |
}
|
70 |
|
71 |
$this->display_notices();
|
72 |
-
$this->prepare_items();
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
<br />
|
76 |
<input type="text" maxlength="31" name="gglcptch_add_to_allowlist" />
|
77 |
<?php if ( isset( $my_ip ) ) { ?>
|
78 |
<br />
|
79 |
<label id="gglcptch_add_my_ip">
|
80 |
<input type="checkbox" name="gglcptch_add_to_allowlist_my_ip" value="1" />
|
81 |
-
<?php
|
82 |
-
<input type="hidden" name="gglcptch_add_to_allowlist_my_ip_value" value="<?php echo $my_ip; ?>" />
|
83 |
</label>
|
84 |
<?php } ?>
|
85 |
<div>
|
86 |
-
<span class="bws_info" style="line-height: 2;"><?php
|
87 |
<br/>
|
88 |
-
<span class="bws_info" style="line-height: 2;"><?php
|
89 |
</div>
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
100 |
<p>
|
101 |
-
<input type="submit" name="gglcptch_submit_add_to_allowlist" class="button-secondary" value="<?php
|
102 |
<?php wp_nonce_field( $this->basename, 'gglcptch_nonce_name' ); ?>
|
103 |
</p>
|
104 |
</form>
|
105 |
<form id="gglcptch_allowlist_search" method="post" action="admin.php?page=google-captcha-allowlist.php">
|
106 |
-
<?php
|
107 |
-
|
|
|
|
|
108 |
</form>
|
109 |
<form id="gglcptch_allowlist" method="post" action="admin.php?page=google-captcha-allowlist.php">
|
110 |
-
<?php
|
111 |
-
|
|
|
|
|
112 |
</form>
|
113 |
-
|
|
|
114 |
|
115 |
/**
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
|
|
120 |
if ( isset( $_GET['orderby'] ) && in_array( $_GET['orderby'], array_keys( $this->get_sortable_columns() ) ) ) {
|
121 |
switch ( $_GET['orderby'] ) {
|
122 |
case 'ip':
|
@@ -129,16 +147,16 @@ if ( ! class_exists( 'Gglcptch_Allowlist' ) ) {
|
|
129 |
$this->order_by = 'ip_to_int';
|
130 |
break;
|
131 |
default:
|
132 |
-
$this->order_by = esc_sql( $_GET['orderby'] );
|
133 |
break;
|
134 |
}
|
135 |
} else {
|
136 |
$this->order_by = 'add_time';
|
137 |
}
|
138 |
-
$this->order
|
139 |
-
$this->paged
|
140 |
-
$this->s
|
141 |
-
$this->per_page
|
142 |
|
143 |
$columns = $this->get_columns();
|
144 |
$hidden = array();
|
@@ -146,47 +164,53 @@ if ( ! class_exists( 'Gglcptch_Allowlist' ) ) {
|
|
146 |
$primary = 'ip';
|
147 |
$this->_column_headers = array( $columns, $hidden, $sortable, $primary );
|
148 |
$this->items = $this->get_content();
|
149 |
-
$this->set_pagination_args(
|
|
|
150 |
'total_items' => $this->get_items_number(),
|
151 |
'per_page' => 20,
|
152 |
)
|
153 |
);
|
154 |
}
|
155 |
/**
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
|
|
|
|
|
|
163 |
|
164 |
-
function get_columns() {
|
165 |
$columns = array(
|
166 |
-
'cb'
|
167 |
-
'ip'
|
168 |
-
'add_time'
|
169 |
);
|
170 |
return $columns;
|
171 |
}
|
172 |
/**
|
173 |
* Get a list of sortable columns.
|
|
|
174 |
* @return array list of sortable columns
|
175 |
*/
|
176 |
-
function get_sortable_columns() {
|
177 |
$sortable_columns = array(
|
178 |
-
'ip'
|
179 |
-
'add_time' => array( 'add_time', false )
|
180 |
);
|
181 |
return $sortable_columns;
|
182 |
}
|
183 |
/**
|
184 |
* Fires when the default column output is displayed for a single row.
|
185 |
-
*
|
186 |
-
* @param
|
|
|
187 |
* @return void
|
188 |
*/
|
189 |
-
function column_default( $item, $column_name ) {
|
190 |
switch ( $column_name ) {
|
191 |
case 'ip':
|
192 |
case 'add_time':
|
@@ -198,66 +222,72 @@ if ( ! class_exists( 'Gglcptch_Allowlist' ) ) {
|
|
198 |
}
|
199 |
/**
|
200 |
* Function to manage content of column with checboxes
|
201 |
-
*
|
|
|
202 |
* @return string with html-structure of <input type=['checkbox']>
|
203 |
*/
|
204 |
-
function column_cb( $item ) {
|
205 |
/* customize displaying cb collumn */
|
206 |
return sprintf(
|
207 |
-
'<input type="checkbox" name="id[]" value="%s"/>',
|
|
|
208 |
);
|
209 |
}
|
210 |
/**
|
211 |
* Function to manage content of column with IP-adresses
|
212 |
-
*
|
|
|
213 |
* @return string with html-structure of <input type=['checkbox']>
|
214 |
*/
|
215 |
-
function column_ip( $item ) {
|
216 |
$order_by = empty( $this->order_by ) ? '' : "&orderby={$this->order_by}";
|
217 |
-
$order = empty( $this->order )
|
218 |
-
$paged = empty( $this->paged )
|
219 |
-
$s = empty( $this->s )
|
220 |
$url = "?page=google-captcha-allowlist.php&gglcptch_remove={$item['id']}{$order_by}{$order}{$paged}{$s}";
|
221 |
-
$actions
|
222 |
-
'delete' => '<a href="' . wp_nonce_url( $url, "gglcptch_nonce_remove_{$item['id']}" ) . '">' . __( 'Delete', 'google-captcha' ) . '</a>'
|
223 |
);
|
224 |
-
return sprintf('%1$s %2$s', $item['ip'], $this->row_actions( $actions ) );
|
225 |
}
|
226 |
/**
|
227 |
* List with bulk action for IP
|
|
|
228 |
* @return array $actions
|
229 |
*/
|
230 |
-
function get_bulk_actions() {
|
231 |
/* adding bulk action */
|
232 |
-
return array( 'gglcptch_remove'=> __( 'Delete', 'google-captcha' ) );
|
233 |
}
|
234 |
/**
|
235 |
* Get content for table
|
|
|
236 |
* @return array
|
237 |
*/
|
238 |
-
function get_content() {
|
239 |
global $wpdb;
|
240 |
|
241 |
if ( empty( $this->s ) ) {
|
242 |
$where = '';
|
243 |
} else {
|
244 |
$ip_int = filter_var( $this->s, FILTER_VALIDATE_IP ) ? sprintf( '%u', ip2long( $this->s ) ) : 0;
|
245 |
-
$where
|
246 |
-
0
|
247 |
?
|
248 |
" WHERE `ip` LIKE '%{$this->s}%'"
|
249 |
:
|
250 |
" WHERE ( `ip_from_int` <= {$ip_int} AND `ip_to_int` >= {$ip_int} )";
|
251 |
}
|
252 |
$order_by = empty( $this->order_by ) ? '' : " ORDER BY `{$this->order_by}`";
|
253 |
-
$order = empty( $this->order )
|
254 |
-
$offset = empty( $this->paged )
|
255 |
|
256 |
return $wpdb->get_results( "SELECT * FROM `{$wpdb->prefix}gglcptch_allowlist`{$where}{$order_by}{$order} LIMIT {$this->per_page}{$offset}", ARRAY_A );
|
257 |
}
|
258 |
|
259 |
/**
|
260 |
* Get number of all IPs which were added to database
|
|
|
261 |
* @since 1.6.9
|
262 |
* @param void
|
263 |
* @return int the number of IPs
|
@@ -268,8 +298,8 @@ if ( ! class_exists( 'Gglcptch_Allowlist' ) ) {
|
|
268 |
$where = '';
|
269 |
} else {
|
270 |
$ip_int = filter_var( $this->s, FILTER_VALIDATE_IP ) ? sprintf( '%u', ip2long( $this->s ) ) : 0;
|
271 |
-
$where
|
272 |
-
0
|
273 |
?
|
274 |
" WHERE `ip` LIKE '%{$this->s}%'"
|
275 |
:
|
@@ -280,15 +310,16 @@ if ( ! class_exists( 'Gglcptch_Allowlist' ) ) {
|
|
280 |
|
281 |
/**
|
282 |
* Handle necessary reqquests and display notices
|
|
|
283 |
* @return void
|
284 |
*/
|
285 |
-
function display_notices() {
|
286 |
global $wpdb, $gglcptch_options;
|
287 |
$error = $message = '';
|
288 |
|
289 |
-
$bulk_action = isset( $_REQUEST['action'] ) && 'gglcptch_remove'
|
290 |
if ( ! $bulk_action ) {
|
291 |
-
$bulk_action = isset( $_REQUEST['action2'] ) && 'gglcptch_remove'
|
292 |
}
|
293 |
|
294 |
/* Add IP to the database */
|
@@ -297,23 +328,23 @@ if ( ! class_exists( 'Gglcptch_Allowlist' ) ) {
|
|
297 |
( ! empty( $_POST['gglcptch_add_to_allowlist'] ) || isset( $_POST['gglcptch_add_to_allowlist_my_ip'] ) ) &&
|
298 |
check_admin_referer( $this->basename, 'gglcptch_nonce_name' )
|
299 |
) {
|
300 |
-
$add_ip = isset( $_POST['gglcptch_add_to_allowlist_my_ip'] ) ? sanitize_text_field( $_POST['gglcptch_add_to_allowlist_my_ip_value'] ) : sanitize_text_field( $_POST['gglcptch_add_to_allowlist'] );
|
301 |
|
302 |
$valid_ip = filter_var( stripslashes( trim( $add_ip ) ), FILTER_VALIDATE_IP );
|
303 |
|
304 |
if ( $valid_ip ) {
|
305 |
$ip_int = sprintf( '%u', ip2long( $valid_ip ) );
|
306 |
-
$id
|
307 |
/* check if IP already in database */
|
308 |
if ( is_null( $id ) ) {
|
309 |
$time = current_time( 'mysql' );
|
310 |
$wpdb->insert(
|
311 |
-
$wpdb->prefix .
|
312 |
array(
|
313 |
'ip' => $valid_ip,
|
314 |
'ip_from_int' => $ip_int,
|
315 |
'ip_to_int' => $ip_int,
|
316 |
-
'add_time' => $time
|
317 |
)
|
318 |
);
|
319 |
if ( ! $wpdb->last_error ) {
|
@@ -331,31 +362,34 @@ if ( ! class_exists( 'Gglcptch_Allowlist' ) ) {
|
|
331 |
$gglcptch_options['allowlist_is_empty'] = false;
|
332 |
update_option( 'gglcptch_options', $gglcptch_options );
|
333 |
}
|
334 |
-
|
335 |
} elseif ( $bulk_action && check_admin_referer( $this->basename, 'gglcptch_nonce_name' ) ) {
|
336 |
if ( ! empty( $_REQUEST['id'] ) ) {
|
337 |
foreach ( $_REQUEST['id'] as $key => $value ) {
|
338 |
-
$_REQUEST['id'][ $key ] =
|
339 |
-
}
|
340 |
$list = implode( ',', $_REQUEST['id'] );
|
341 |
-
$result = $wpdb->query(
|
342 |
-
|
343 |
if ( ! $wpdb->last_error ) {
|
344 |
-
$message
|
345 |
$gglcptch_options['allowlist_is_empty'] = is_null( $wpdb->get_var( "SELECT `id` FROM `{$wpdb->prefix}gglcptch_allowlist` LIMIT 1" ) ) ? true : false;
|
346 |
update_option( 'gglcptch_options', $gglcptch_options );
|
347 |
} else {
|
348 |
$error = __( 'Some errors occurred.', 'google-captcha' );
|
349 |
}
|
350 |
}
|
351 |
-
} elseif ( isset( $_GET['gglcptch_remove'] ) && check_admin_referer( 'gglcptch_nonce_remove_' . $_GET['gglcptch_remove'] ) ) {
|
352 |
-
|
353 |
-
$wpdb->delete(
|
354 |
-
|
|
|
|
|
|
|
355 |
);
|
356 |
-
|
357 |
if ( ! $wpdb->last_error ) {
|
358 |
-
$message
|
359 |
$gglcptch_options['allowlist_is_empty'] = is_null( $wpdb->get_var( "SELECT `id` FROM `{$wpdb->prefix}gglcptch_allowlist` LIMIT 1" ) ) ? true : false;
|
360 |
update_option( 'gglcptch_options', $gglcptch_options );
|
361 |
} else {
|
@@ -364,18 +398,22 @@ if ( ! class_exists( 'Gglcptch_Allowlist' ) ) {
|
|
364 |
} elseif ( isset( $_POST['gglcptch_submit_add_to_allowlist'] ) && empty( $_POST['gglcptch_add_to_allowlist'] ) ) {
|
365 |
$error = __( 'You have not entered any IP.', 'google-captcha' );
|
366 |
} elseif ( isset( $_REQUEST['s'] ) ) {
|
367 |
-
if ( ''
|
368 |
$error = __( 'You have not entered any IP in to the search form.', 'google-captcha' );
|
369 |
} else {
|
370 |
-
$message = __( 'Search results for', 'google-captcha' ) . ' : ' . sanitize_text_field( $_REQUEST['s'] );
|
371 |
}
|
372 |
}
|
373 |
-
if ( ! empty( $message ) ) {
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
|
|
|
|
|
|
|
|
379 |
}
|
380 |
}
|
381 |
-
}
|
1 |
<?php
|
2 |
/**
|
3 |
* Display content of "Allow List" tab on settings page
|
4 |
+
*
|
5 |
* @subpackage reCaptcha
|
6 |
* @since 1.27
|
7 |
* @version 1.0.0
|
9 |
|
10 |
if ( ! class_exists( 'Gglcptch_Allowlist' ) ) {
|
11 |
if ( ! class_exists( 'WP_List_Table' ) ) {
|
12 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
|
13 |
}
|
14 |
|
15 |
class Gglcptch_Allowlist extends WP_List_Table {
|
22 |
$s;
|
23 |
|
24 |
/**
|
25 |
+
* Constructor of class
|
26 |
+
*/
|
27 |
+
public function __construct( $plugin_basename ) {
|
28 |
global $gglcptch_options;
|
29 |
if ( empty( $gglcptch_options ) ) {
|
30 |
$gglcptch_options = get_option( 'gglcptch_options' );
|
31 |
}
|
32 |
+
parent::__construct(
|
33 |
+
array(
|
34 |
+
'singular' => 'IP',
|
35 |
+
'plural' => 'IP',
|
36 |
+
'ajax' => true,
|
37 |
)
|
38 |
);
|
39 |
+
$this->basename = $plugin_basename;
|
40 |
}
|
41 |
|
42 |
/**
|
43 |
* Display content
|
44 |
+
*
|
45 |
* @return void
|
46 |
*/
|
47 |
+
public function display_content() {
|
48 |
global $gglcptch_options; ?>
|
49 |
+
<h1 class="wp-heading-inline"><?php esc_html_e( 'reCaptcha Allow List', 'google-captcha' ); ?></h1>
|
50 |
<?php if ( ! ( isset( $_REQUEST['gglcptch_show_allowlist_form'] ) || isset( $_REQUEST['gglcptch_add_to_allowlist'] ) ) ) { ?>
|
51 |
<form method="post" action="admin.php?page=google-captcha-allowlist.php" style="display: inline;">
|
52 |
+
<button class="page-title-action" name="gglcptch_show_allowlist_form" value="on"<?php echo ( isset( $_POST['gglcptch_add_to_allowlist'] ) ) ? ' style="display: none;"' : ''; ?>><?php esc_html_e( 'Add New', 'google-captcha' ); ?></button>
|
53 |
</form>
|
54 |
+
<?php
|
55 |
+
}
|
56 |
|
57 |
if ( isset( $_SERVER ) ) {
|
58 |
$sever_vars = array( 'REMOTE_ADDR', 'HTTP_X_REAL_IP', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR' );
|
59 |
foreach ( $sever_vars as $var ) {
|
60 |
if ( ! empty( $_SERVER[ $var ] ) ) {
|
61 |
+
if ( filter_var( sanitize_text_field( wp_unslash( $_SERVER[ $var ] ) ), FILTER_VALIDATE_IP ) ) {
|
62 |
+
$my_ip = sanitize_text_field( wp_unslash( $_SERVER[ $var ] ) );
|
63 |
break;
|
64 |
} else { /* if proxy */
|
65 |
+
$ip_array = explode( ',', sanitize_text_field( wp_unslash( $_SERVER[ $var ] ) ) );
|
66 |
if ( is_array( $ip_array ) && ! empty( $ip_array ) && filter_var( $ip_array[0], FILTER_VALIDATE_IP ) ) {
|
67 |
$my_ip = $ip_array[0];
|
68 |
break;
|
73 |
}
|
74 |
|
75 |
$this->display_notices();
|
76 |
+
$this->prepare_items();
|
77 |
+
?>
|
78 |
+
<form class="form-table gglcptch_allowlist_form" method="post" action="admin.php?page=google-captcha-allowlist.php"
|
79 |
+
<?php
|
80 |
+
if ( ! ( isset( $_REQUEST['gglcptch_show_allowlist_form'] ) || isset( $_REQUEST['gglcptch_add_to_allowlist'] ) ) ) {
|
81 |
+
echo ' style="display: none;"';}
|
82 |
+
?>
|
83 |
+
>
|
84 |
+
<label><?php esc_html_e( 'IP to Allow List', 'google-captcha' ); ?></label>
|
85 |
<br />
|
86 |
<input type="text" maxlength="31" name="gglcptch_add_to_allowlist" />
|
87 |
<?php if ( isset( $my_ip ) ) { ?>
|
88 |
<br />
|
89 |
<label id="gglcptch_add_my_ip">
|
90 |
<input type="checkbox" name="gglcptch_add_to_allowlist_my_ip" value="1" />
|
91 |
+
<?php esc_html_e( 'My IP', 'google-captcha' ); ?>
|
92 |
+
<input type="hidden" name="gglcptch_add_to_allowlist_my_ip_value" value="<?php echo esc_attr( $my_ip ); ?>" />
|
93 |
</label>
|
94 |
<?php } ?>
|
95 |
<div>
|
96 |
+
<span class="bws_info" style="line-height: 2;"><?php esc_html_e( 'Allowed formats', 'google-captcha' ); ?>: <code>192.168.0.1</code></span>
|
97 |
<br/>
|
98 |
+
<span class="bws_info" style="line-height: 2;"><?php esc_html_e( 'Allowed diapason', 'google-captcha' ); ?>: <code>0.0.0.0 - 255.255.255.255</code></span>
|
99 |
</div>
|
100 |
+
<!-- pls -->
|
101 |
+
<?php
|
102 |
+
if ( isset( $_POST['bws_hide_premium_options'] ) ) {
|
103 |
+
$gglcptch_options['hide_premium_options'][0] = 1;
|
104 |
+
update_option( 'gglcptch_options', $gglcptch_options );
|
105 |
+
}
|
106 |
+
$display_pro_options_for_allowlist = get_option( 'gglcptch_options' );
|
107 |
+
if ( empty( $display_pro_options_for_allowlist['hide_premium_options'][0] ) ) {
|
108 |
+
gglcptch_pro_block( 'gglcptch_allowlist_banner' );
|
109 |
+
}
|
110 |
+
?>
|
111 |
+
<!-- end pls -->
|
112 |
<p>
|
113 |
+
<input type="submit" name="gglcptch_submit_add_to_allowlist" class="button-secondary" value="<?php esc_html_e( 'Add IP to Allow List', 'google-captcha' ); ?>" />
|
114 |
<?php wp_nonce_field( $this->basename, 'gglcptch_nonce_name' ); ?>
|
115 |
</p>
|
116 |
</form>
|
117 |
<form id="gglcptch_allowlist_search" method="post" action="admin.php?page=google-captcha-allowlist.php">
|
118 |
+
<?php
|
119 |
+
$this->search_box( __( 'Search IP', 'google-captcha' ), 'search_allowlisted_ip' );
|
120 |
+
wp_nonce_field( $this->basename, 'gglcptch_nonce_name' );
|
121 |
+
?>
|
122 |
</form>
|
123 |
<form id="gglcptch_allowlist" method="post" action="admin.php?page=google-captcha-allowlist.php">
|
124 |
+
<?php
|
125 |
+
$this->display();
|
126 |
+
wp_nonce_field( $this->basename, 'gglcptch_nonce_name' );
|
127 |
+
?>
|
128 |
</form>
|
129 |
+
<?php
|
130 |
+
}
|
131 |
|
132 |
/**
|
133 |
+
* Function to prepare data before display
|
134 |
+
*
|
135 |
+
* @return void
|
136 |
+
*/
|
137 |
+
public function prepare_items() {
|
138 |
if ( isset( $_GET['orderby'] ) && in_array( $_GET['orderby'], array_keys( $this->get_sortable_columns() ) ) ) {
|
139 |
switch ( $_GET['orderby'] ) {
|
140 |
case 'ip':
|
147 |
$this->order_by = 'ip_to_int';
|
148 |
break;
|
149 |
default:
|
150 |
+
$this->order_by = esc_sql( sanitize_text_field( wp_unslash( $_GET['orderby'] ) ) );
|
151 |
break;
|
152 |
}
|
153 |
} else {
|
154 |
$this->order_by = 'add_time';
|
155 |
}
|
156 |
+
$this->order = isset( $_REQUEST['order'] ) && in_array( strtoupper( sanitize_text_field( wp_unslash( $_REQUEST['order'] ) ) ), array( 'ASC', 'DESC' ), true ) ? sanitize_text_field( wp_unslash( $_REQUEST['order'] ) ) : '';
|
157 |
+
$this->paged = isset( $_REQUEST['paged'] ) && is_numeric( $_REQUEST['paged'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['paged'] ) ) : '';
|
158 |
+
$this->s = isset( $_REQUEST['s'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ) : '';
|
159 |
+
$this->per_page = $this->get_items_per_page( 'gglcptch_per_page', 20 );
|
160 |
|
161 |
$columns = $this->get_columns();
|
162 |
$hidden = array();
|
164 |
$primary = 'ip';
|
165 |
$this->_column_headers = array( $columns, $hidden, $sortable, $primary );
|
166 |
$this->items = $this->get_content();
|
167 |
+
$this->set_pagination_args(
|
168 |
+
array(
|
169 |
'total_items' => $this->get_items_number(),
|
170 |
'per_page' => 20,
|
171 |
)
|
172 |
);
|
173 |
}
|
174 |
/**
|
175 |
+
* Function to show message if empty list
|
176 |
+
*
|
177 |
+
* @return void
|
178 |
+
*/
|
179 |
+
public function no_items() {
|
180 |
+
$label = isset( $_REQUEST['s'] ) ? __( 'Nothing found', 'google-captcha' ) : __( 'No IP in the Allow List', 'google-captcha' );
|
181 |
+
?>
|
182 |
+
<p><?php echo esc_html( $label ); ?></p>
|
183 |
+
<?php
|
184 |
+
}
|
185 |
|
186 |
+
public function get_columns() {
|
187 |
$columns = array(
|
188 |
+
'cb' => '<input type="checkbox" />',
|
189 |
+
'ip' => __( 'IP Address', 'google-captcha' ),
|
190 |
+
'add_time' => __( 'Date Added', 'google-captcha' ),
|
191 |
);
|
192 |
return $columns;
|
193 |
}
|
194 |
/**
|
195 |
* Get a list of sortable columns.
|
196 |
+
*
|
197 |
* @return array list of sortable columns
|
198 |
*/
|
199 |
+
public function get_sortable_columns() {
|
200 |
$sortable_columns = array(
|
201 |
+
'ip' => array( 'ip', true ),
|
202 |
+
'add_time' => array( 'add_time', false ),
|
203 |
);
|
204 |
return $sortable_columns;
|
205 |
}
|
206 |
/**
|
207 |
* Fires when the default column output is displayed for a single row.
|
208 |
+
*
|
209 |
+
* @param string $column_name The custom column's name.
|
210 |
+
* @param array $item The cuurrent letter data.
|
211 |
* @return void
|
212 |
*/
|
213 |
+
public function column_default( $item, $column_name ) {
|
214 |
switch ( $column_name ) {
|
215 |
case 'ip':
|
216 |
case 'add_time':
|
222 |
}
|
223 |
/**
|
224 |
* Function to manage content of column with checboxes
|
225 |
+
*
|
226 |
+
* @param array $item The cuurrent letter data.
|
227 |
* @return string with html-structure of <input type=['checkbox']>
|
228 |
*/
|
229 |
+
public function column_cb( $item ) {
|
230 |
/* customize displaying cb collumn */
|
231 |
return sprintf(
|
232 |
+
'<input type="checkbox" name="id[]" value="%s"/>',
|
233 |
+
$item['id']
|
234 |
);
|
235 |
}
|
236 |
/**
|
237 |
* Function to manage content of column with IP-adresses
|
238 |
+
*
|
239 |
+
* @param array $item The cuurrent letter data.
|
240 |
* @return string with html-structure of <input type=['checkbox']>
|
241 |
*/
|
242 |
+
public function column_ip( $item ) {
|
243 |
$order_by = empty( $this->order_by ) ? '' : "&orderby={$this->order_by}";
|
244 |
+
$order = empty( $this->order ) ? '' : "&order={$this->order}";
|
245 |
+
$paged = empty( $this->paged ) ? '' : "&paged={$this->paged}";
|
246 |
+
$s = empty( $this->s ) ? '' : "&s={$this->s}";
|
247 |
$url = "?page=google-captcha-allowlist.php&gglcptch_remove={$item['id']}{$order_by}{$order}{$paged}{$s}";
|
248 |
+
$actions = array(
|
249 |
+
'delete' => '<a href="' . wp_nonce_url( $url, "gglcptch_nonce_remove_{$item['id']}" ) . '">' . __( 'Delete', 'google-captcha' ) . '</a>',
|
250 |
);
|
251 |
+
return sprintf( '%1$s %2$s', $item['ip'], $this->row_actions( $actions ) );
|
252 |
}
|
253 |
/**
|
254 |
* List with bulk action for IP
|
255 |
+
*
|
256 |
* @return array $actions
|
257 |
*/
|
258 |
+
public function get_bulk_actions() {
|
259 |
/* adding bulk action */
|
260 |
+
return array( 'gglcptch_remove' => __( 'Delete', 'google-captcha' ) );
|
261 |
}
|
262 |
/**
|
263 |
* Get content for table
|
264 |
+
*
|
265 |
* @return array
|
266 |
*/
|
267 |
+
public function get_content() {
|
268 |
global $wpdb;
|
269 |
|
270 |
if ( empty( $this->s ) ) {
|
271 |
$where = '';
|
272 |
} else {
|
273 |
$ip_int = filter_var( $this->s, FILTER_VALIDATE_IP ) ? sprintf( '%u', ip2long( $this->s ) ) : 0;
|
274 |
+
$where =
|
275 |
+
0 === $ip_int
|
276 |
?
|
277 |
" WHERE `ip` LIKE '%{$this->s}%'"
|
278 |
:
|
279 |
" WHERE ( `ip_from_int` <= {$ip_int} AND `ip_to_int` >= {$ip_int} )";
|
280 |
}
|
281 |
$order_by = empty( $this->order_by ) ? '' : " ORDER BY `{$this->order_by}`";
|
282 |
+
$order = empty( $this->order ) ? '' : strtoupper( " {$this->order}" );
|
283 |
+
$offset = empty( $this->paged ) ? '' : ' OFFSET ' . ( $this->per_page * ( absint( $this->paged ) - 1 ) );
|
284 |
|
285 |
return $wpdb->get_results( "SELECT * FROM `{$wpdb->prefix}gglcptch_allowlist`{$where}{$order_by}{$order} LIMIT {$this->per_page}{$offset}", ARRAY_A );
|
286 |
}
|
287 |
|
288 |
/**
|
289 |
* Get number of all IPs which were added to database
|
290 |
+
*
|
291 |
* @since 1.6.9
|
292 |
* @param void
|
293 |
* @return int the number of IPs
|
298 |
$where = '';
|
299 |
} else {
|
300 |
$ip_int = filter_var( $this->s, FILTER_VALIDATE_IP ) ? sprintf( '%u', ip2long( $this->s ) ) : 0;
|
301 |
+
$where =
|
302 |
+
0 === $ip_int
|
303 |
?
|
304 |
" WHERE `ip` LIKE '%{$this->s}%'"
|
305 |
:
|
310 |
|
311 |
/**
|
312 |
* Handle necessary reqquests and display notices
|
313 |
+
*
|
314 |
* @return void
|
315 |
*/
|
316 |
+
public function display_notices() {
|
317 |
global $wpdb, $gglcptch_options;
|
318 |
$error = $message = '';
|
319 |
|
320 |
+
$bulk_action = isset( $_REQUEST['action'] ) && 'gglcptch_remove' === $_REQUEST['action'] ? true : false;
|
321 |
if ( ! $bulk_action ) {
|
322 |
+
$bulk_action = isset( $_REQUEST['action2'] ) && 'gglcptch_remove' === $_REQUEST['action2'] ? true : false;
|
323 |
}
|
324 |
|
325 |
/* Add IP to the database */
|
328 |
( ! empty( $_POST['gglcptch_add_to_allowlist'] ) || isset( $_POST['gglcptch_add_to_allowlist_my_ip'] ) ) &&
|
329 |
check_admin_referer( $this->basename, 'gglcptch_nonce_name' )
|
330 |
) {
|
331 |
+
$add_ip = isset( $_POST['gglcptch_add_to_allowlist_my_ip'] ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_add_to_allowlist_my_ip_value'] ) ) : sanitize_text_field( wp_unslash( $_POST['gglcptch_add_to_allowlist'] ) );
|
332 |
|
333 |
$valid_ip = filter_var( stripslashes( trim( $add_ip ) ), FILTER_VALIDATE_IP );
|
334 |
|
335 |
if ( $valid_ip ) {
|
336 |
$ip_int = sprintf( '%u', ip2long( $valid_ip ) );
|
337 |
+
$id = $wpdb->get_var( $wpdb->prepare( 'SELECT `id` FROM ' . $wpdb->prefix . 'gglcptch_allowlist WHERE ( `ip_from_int` <= %d AND `ip_to_int` >= %d ) OR `ip` LIKE %s LIMIT 1;', $ip_int, $ip_int, $valid_ip ) );
|
338 |
/* check if IP already in database */
|
339 |
if ( is_null( $id ) ) {
|
340 |
$time = current_time( 'mysql' );
|
341 |
$wpdb->insert(
|
342 |
+
$wpdb->prefix . 'gglcptch_allowlist',
|
343 |
array(
|
344 |
'ip' => $valid_ip,
|
345 |
'ip_from_int' => $ip_int,
|
346 |
'ip_to_int' => $ip_int,
|
347 |
+
'add_time' => $time,
|
348 |
)
|
349 |
);
|
350 |
if ( ! $wpdb->last_error ) {
|
362 |
$gglcptch_options['allowlist_is_empty'] = false;
|
363 |
update_option( 'gglcptch_options', $gglcptch_options );
|
364 |
}
|
365 |
+
/* Remove IP from database */
|
366 |
} elseif ( $bulk_action && check_admin_referer( $this->basename, 'gglcptch_nonce_name' ) ) {
|
367 |
if ( ! empty( $_REQUEST['id'] ) ) {
|
368 |
foreach ( $_REQUEST['id'] as $key => $value ) {
|
369 |
+
$_REQUEST['id'][ $key ] = absint( $value );
|
370 |
+
}
|
371 |
$list = implode( ',', $_REQUEST['id'] );
|
372 |
+
$result = $wpdb->query( 'DELETE FROM `' . $wpdb->prefix . 'gglcptch_allowlist` WHERE `id` IN (' . $list . ');' );
|
373 |
+
|
374 |
if ( ! $wpdb->last_error ) {
|
375 |
+
$message = sprintf( _n( '%s IP was deleted successfully.', '%s IPs were deleted successfully.', $result, 'google-captcha' ), $result );
|
376 |
$gglcptch_options['allowlist_is_empty'] = is_null( $wpdb->get_var( "SELECT `id` FROM `{$wpdb->prefix}gglcptch_allowlist` LIMIT 1" ) ) ? true : false;
|
377 |
update_option( 'gglcptch_options', $gglcptch_options );
|
378 |
} else {
|
379 |
$error = __( 'Some errors occurred.', 'google-captcha' );
|
380 |
}
|
381 |
}
|
382 |
+
} elseif ( isset( $_GET['gglcptch_remove'] ) && check_admin_referer( 'gglcptch_nonce_remove_' . sanitize_text_field( wp_unslash( $_GET['gglcptch_remove'] ) ) ) ) {
|
383 |
+
|
384 |
+
$wpdb->delete(
|
385 |
+
$wpdb->prefix . 'gglcptch_allowlist',
|
386 |
+
array(
|
387 |
+
'id' => absint( sanitize_text_field( wp_unslash( $_GET['gglcptch_remove'] ) ) )
|
388 |
+
)
|
389 |
);
|
390 |
+
|
391 |
if ( ! $wpdb->last_error ) {
|
392 |
+
$message = __( 'One IP was deleted successfully.', 'google-captcha' );
|
393 |
$gglcptch_options['allowlist_is_empty'] = is_null( $wpdb->get_var( "SELECT `id` FROM `{$wpdb->prefix}gglcptch_allowlist` LIMIT 1" ) ) ? true : false;
|
394 |
update_option( 'gglcptch_options', $gglcptch_options );
|
395 |
} else {
|
398 |
} elseif ( isset( $_POST['gglcptch_submit_add_to_allowlist'] ) && empty( $_POST['gglcptch_add_to_allowlist'] ) ) {
|
399 |
$error = __( 'You have not entered any IP.', 'google-captcha' );
|
400 |
} elseif ( isset( $_REQUEST['s'] ) ) {
|
401 |
+
if ( '' === sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ) ) {
|
402 |
$error = __( 'You have not entered any IP in to the search form.', 'google-captcha' );
|
403 |
} else {
|
404 |
+
$message = __( 'Search results for', 'google-captcha' ) . ' : ' . sanitize_text_field( wp_unslash( $_REQUEST['s'] ) );
|
405 |
}
|
406 |
}
|
407 |
+
if ( ! empty( $message ) ) {
|
408 |
+
?>
|
409 |
+
<div class="updated fade below-h2"><p><strong><?php echo esc_html( $message ); ?></strong></p></div>
|
410 |
+
<?php
|
411 |
+
}
|
412 |
+
if ( ! empty( $error ) ) {
|
413 |
+
?>
|
414 |
+
<div class="error below-h2"><p><strong><?php echo esc_html( $error ); ?></strong></p></div>
|
415 |
+
<?php
|
416 |
+
}
|
417 |
}
|
418 |
}
|
419 |
+
}
|
includes/class-gglcptch-settings-tabs.php
CHANGED
@@ -19,64 +19,63 @@ if ( ! class_exists( 'Gglcptch_Settings_Tabs' ) ) {
|
|
19 |
global $gglcptch_options, $gglcptch_plugin_info;
|
20 |
|
21 |
$tabs = array(
|
22 |
-
'settings'
|
23 |
-
'misc'
|
24 |
-
'custom_code'
|
25 |
-
|
26 |
-
'license' => array( 'label' => __( 'License Key', 'google-captcha' ) )
|
27 |
-
/* pls*/
|
28 |
);
|
29 |
|
30 |
-
parent::__construct(
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
)
|
45 |
|
46 |
$this->all_plugins = get_plugins();
|
47 |
|
48 |
/* Private and public keys */
|
49 |
$this->keys = array(
|
50 |
-
'public'
|
51 |
-
'display_name'
|
52 |
-
'form_name'
|
53 |
-
'error_msg'
|
54 |
),
|
55 |
'private' => array(
|
56 |
-
'display_name'
|
57 |
-
'form_name'
|
58 |
-
'error_msg'
|
59 |
),
|
60 |
);
|
61 |
|
62 |
$this->versions = array(
|
63 |
-
'v2'
|
64 |
-
|
65 |
-
'invisible'
|
66 |
);
|
67 |
|
68 |
/* Supported forms */
|
69 |
-
$this->forms
|
70 |
$this->sections = gglcptch_get_sections();
|
71 |
|
72 |
add_action( get_parent_class( $this ) . '_display_custom_messages', array( $this, 'display_custom_messages' ) );
|
73 |
-
|
74 |
add_action( get_parent_class( $this ) . '_display_metabox', array( $this, 'display_metabox' ) );
|
75 |
-
add_action( get_parent_class( $this ) .'_information_postbox_bottom', array( $this, 'information_postbox_bottom' ) );
|
76 |
}
|
77 |
|
78 |
/**
|
79 |
* Save plugin options to the database
|
|
|
80 |
* @access public
|
81 |
* @param void
|
82 |
* @return array The action results
|
@@ -85,153 +84,194 @@ if ( ! class_exists( 'Gglcptch_Settings_Tabs' ) ) {
|
|
85 |
|
86 |
$message = $notice = $error = '';
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
$error = __( "WARNING: The captcha will not be displayed until you fill key fields.", 'google-captcha' );
|
92 |
} else {
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
|
|
130 |
}
|
131 |
-
}
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
|
|
|
136 |
|
137 |
return compact( 'message', 'notice', 'error' );
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
* Displays 'settings' menu-tab
|
|
|
142 |
* @access public
|
143 |
-
* @param void
|
144 |
* @return void
|
145 |
*/
|
146 |
public function tab_settings() { ?>
|
147 |
-
<h3 class="bws_tab_label"><?php
|
148 |
<?php $this->help_phrase(); ?>
|
149 |
<hr>
|
150 |
-
<div class="bws_tab_sub_label"><?php
|
151 |
<table class="form-table">
|
152 |
<tr valign="top">
|
153 |
-
<th scope="row"><?php
|
154 |
<td>
|
155 |
<fieldset>
|
156 |
<?php foreach ( $this->versions as $version => $version_name ) { ?>
|
157 |
<label>
|
158 |
-
<input type="radio" name="gglcptch_recaptcha_version" value="<?php echo $version; ?>" <?php checked( $version, $this->options['recaptcha_version'] ); ?>> <?php echo $version_name; ?>
|
159 |
</label>
|
160 |
<br/>
|
161 |
<?php } ?>
|
162 |
</fieldset>
|
163 |
</td>
|
164 |
</tr>
|
165 |
-
|
166 |
-
|
167 |
-
<div class="bws_info gglcptch_settings_form"
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
|
|
174 |
</div>
|
175 |
-
<div class="bws_info
|
176 |
<?php
|
177 |
printf(
|
178 |
-
|
179 |
'<a target="_blank" href="https://bestwebsoft.com/products/wordpress/plugins/captcha/?k=dcf21edcd5cc9374f5e15c8055e40797">',
|
180 |
'</a>'
|
181 |
);
|
182 |
?>
|
183 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
<?php foreach ( $this->keys as $key => $fields ) { ?>
|
185 |
<tr>
|
186 |
-
<th><?php echo $fields['display_name']; ?></th>
|
187 |
<td>
|
188 |
-
<input class="regular-text" type="text" name="<?php echo $fields['form_name']; ?>" value="<?php echo $this->options[ $key . '_key' ] ?>" maxlength="200" />
|
189 |
-
<label class="gglcptch_error_msg error"><?php echo $fields['error_msg']; ?></label>
|
190 |
-
<span class="dashicons dashicons-yes gglcptch_verified
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
</td>
|
192 |
</tr>
|
193 |
-
|
|
|
|
|
|
|
194 |
<tr class="hide-if-no-js">
|
195 |
<th></th>
|
196 |
<td>
|
197 |
<div id="gglcptch-test-keys">
|
198 |
-
<a class="button button-secondary" href="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
</div>
|
200 |
</td>
|
201 |
</tr>
|
202 |
<?php } ?>
|
203 |
-
|
204 |
-
<th scope="row"><?php
|
205 |
<td>
|
206 |
<!--[if !IE]> -->
|
207 |
<div class="gglcptch-settings-accordion">
|
208 |
<!-- <![endif]-->
|
209 |
-
<?php
|
|
|
210 |
|
211 |
if ( empty( $section['name'] ) || empty( $section['forms'] ) || ! is_array( $section['forms'] ) ) {
|
212 |
continue;
|
213 |
}
|
214 |
|
215 |
-
$section_notice = ! empty( $section['section_notice'] ) ? $section['section_notice'] : '';
|
|
|
216 |
<p class="gglcptch_section_header">
|
217 |
-
<i><?php echo $section['name']; ?></i>
|
218 |
<?php if ( ! empty( $section_notice ) ) { ?>
|
219 |
-
<span class="bws_info"><?php echo $section_notice; ?></span>
|
220 |
<?php } ?><br />
|
221 |
</p>
|
222 |
<fieldset class="gglcptch_section_forms">
|
223 |
-
<?php
|
|
|
224 |
$form_notice = $this->forms[ $form_slug ]['form_notice'];
|
225 |
-
$form_atts
|
226 |
-
if ( ''
|
227 |
$form_atts .= disabled( 1, 1, false );
|
228 |
}
|
229 |
-
$form_atts .= checked( ! empty( $this->options[ $form_slug ] ), true, false );
|
|
|
230 |
<label>
|
231 |
-
<input type="checkbox"<?php echo $form_atts; ?> name="gglcptch_<?php echo $form_slug; ?>" value="1" /> <?php echo $this->forms[ $form_slug ]['form_name']; ?>
|
232 |
</label>
|
233 |
-
<?php if ( ''
|
234 |
-
<span class="bws_info"><?php echo $form_notice; ?></span>
|
235 |
<?php } ?>
|
236 |
<br />
|
237 |
<?php } ?>
|
@@ -244,186 +284,214 @@ if ( ! class_exists( 'Gglcptch_Settings_Tabs' ) ) {
|
|
244 |
</td>
|
245 |
</tr>
|
246 |
</table>
|
247 |
-
|
248 |
<?php if ( ! $this->hide_pro_tabs ) { ?>
|
249 |
<div class="bws_pro_version_bloc">
|
250 |
<div class="bws_pro_version_table_bloc">
|
251 |
-
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php
|
252 |
<div class="bws_table_bg"></div>
|
253 |
<?php gglcptch_supported_plugins_banner(); ?>
|
254 |
</div>
|
255 |
<?php $this->bws_pro_block_links(); ?>
|
256 |
</div>
|
257 |
<?php } ?>
|
258 |
-
|
259 |
<table class="form-table">
|
260 |
<tr valign="top">
|
261 |
-
|
262 |
-
<?php
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
<?php
|
271 |
</div>
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
<?php if ( ! $this->hide_pro_tabs ) { ?>
|
277 |
<div class="bws_pro_version_bloc">
|
278 |
<div class="bws_pro_version_table_bloc">
|
279 |
-
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php
|
280 |
<div class="bws_table_bg"></div>
|
281 |
<?php gglcptch_additional_settings_banner_general(); ?>
|
282 |
</div>
|
283 |
<?php $this->bws_pro_block_links(); ?>
|
284 |
</div>
|
285 |
<?php } ?>
|
286 |
-
|
287 |
|
288 |
-
<div class="bws_tab_sub_label"><?php
|
289 |
<table class="form-table">
|
290 |
<tr class="gglcptch_theme_v2" valign="top">
|
291 |
<th scope="row">
|
292 |
-
<?php
|
293 |
</th>
|
294 |
<td>
|
295 |
<select name="gglcptch_theme_v2">
|
296 |
-
<option value="light" <?php selected( 'light', $this->options['theme_v2'] ); ?>><?php
|
297 |
-
<option value="dark" <?php selected( 'dark', $this->options['theme_v2'] ); ?>><?php
|
298 |
</select>
|
299 |
</td>
|
300 |
</tr>
|
301 |
</table>
|
302 |
<!-- pls -->
|
303 |
<?php if ( ! $this->hide_pro_tabs ) { ?>
|
304 |
-
<div class="bws_pro_version_bloc">
|
305 |
<div class="bws_pro_version_table_bloc">
|
306 |
-
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php
|
307 |
<div class="bws_table_bg"></div>
|
308 |
<?php gglcptch_additional_settings_banner_appearance(); ?>
|
309 |
</div>
|
310 |
<?php $this->bws_pro_block_links(); ?>
|
311 |
</div>
|
312 |
<?php } ?>
|
313 |
-
|
314 |
<table class="form-table">
|
315 |
<tr class="gglcptch_badge_v3" valign="top">
|
316 |
-
|
317 |
-
<?php
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
<?php
|
323 |
</span>
|
324 |
-
|
325 |
-
|
326 |
</table>
|
327 |
|
328 |
-
<div class="bws_tab_sub_label"><?php
|
329 |
<table class="form-table">
|
330 |
<tr class="gglcptch_score_v3" valign="top">
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
<tr valign="top">
|
341 |
-
<th scope="row"><?php
|
342 |
<td>
|
343 |
<fieldset>
|
344 |
-
<?php
|
|
|
345 |
foreach ( get_editable_roles() as $role => $fields ) {
|
346 |
printf(
|
347 |
'<label><input type="checkbox" name="%1$s" value="%2$s" %3$s> %4$s</label><br/>',
|
348 |
-
'gglcptch_' . $role,
|
349 |
-
$role,
|
350 |
checked( ! empty( $this->options[ $role ] ), true, false ),
|
351 |
translate_user_role( $fields['name'] )
|
352 |
);
|
353 |
}
|
354 |
-
}
|
|
|
355 |
</fieldset>
|
356 |
</td>
|
357 |
</tr>
|
358 |
<tr valign="top">
|
359 |
-
<th scope="row"><?php
|
360 |
<td>
|
361 |
-
<textarea name="gglcptch_allowlist_message"><?php echo $this->options['allowlist_message']; ?></textarea>
|
362 |
-
<div class="bws_info"><?php
|
363 |
</td>
|
364 |
</tr>
|
365 |
<tr valign="top">
|
366 |
-
<th scope="row"><?php
|
367 |
<td>
|
368 |
-
<input<?php echo $this->change_permission_attr; ?> id="gglcptch_disable_submit" type="checkbox" <?php checked( ! empty( $this->options[
|
369 |
<span class="bws_info">
|
370 |
-
<?php
|
371 |
</span>
|
372 |
</td>
|
373 |
</tr>
|
374 |
-
|
375 |
-
|
376 |
-
<?php
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
<?php
|
382 |
</span>
|
383 |
-
|
384 |
-
|
385 |
</table>
|
386 |
-
|
|
|
|
|
387 |
|
388 |
/**
|
389 |
* Display custom error\message\notice
|
|
|
390 |
* @access public
|
391 |
* @return void
|
392 |
*/
|
393 |
public function display_custom_messages() {
|
394 |
-
if ( ! empty( $this->options['need_keys_verified_check'] ) ) {
|
395 |
-
|
396 |
-
|
|
|
|
|
397 |
}
|
398 |
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
|
411 |
/**
|
412 |
* Display custom metabox
|
|
|
413 |
* @access public
|
414 |
* @param void
|
415 |
-
* @return
|
416 |
*/
|
417 |
-
public function display_metabox() {
|
|
|
418 |
<div class="postbox">
|
419 |
<h3 class="hndle">
|
420 |
-
<?php
|
421 |
</h3>
|
422 |
<div class="inside">
|
423 |
-
<?php
|
424 |
<?php bws_shortcode_output( '[bws_google_captcha]' ); ?>
|
425 |
</div>
|
426 |
</div>
|
427 |
-
|
|
|
428 |
}
|
429 |
-
}
|
19 |
global $gglcptch_options, $gglcptch_plugin_info;
|
20 |
|
21 |
$tabs = array(
|
22 |
+
'settings' => array( 'label' => __( 'Settings', 'google-captcha' ) ),
|
23 |
+
'misc' => array( 'label' => __( 'Misc', 'google-captcha' ) ),
|
24 |
+
'custom_code' => array( 'label' => __( 'Custom Code', 'google-captcha' ) ),
|
25 |
+
'license' => array( 'label' => __( 'License Key', 'google-captcha' ) ),
|
|
|
|
|
26 |
);
|
27 |
|
28 |
+
parent::__construct(
|
29 |
+
array(
|
30 |
+
'plugin_basename' => $plugin_basename,
|
31 |
+
'plugins_info' => $gglcptch_plugin_info,
|
32 |
+
'prefix' => 'gglcptch',
|
33 |
+
'default_options' => gglcptch_get_default_options(),
|
34 |
+
'options' => $gglcptch_options,
|
35 |
+
'tabs' => $tabs,
|
36 |
+
'doc_link' => 'https://bestwebsoft.com/documentation/recaptcha/recaptcha-user-guide/',
|
37 |
+
'doc_video_link' => 'https://www.youtube.com/watch?v=ZFv6txtic0Y/',
|
38 |
+
'wp_slug' => 'google-captcha',
|
39 |
+
'link_key' => 'b850d949ccc1239cab0da315c3c822ab',
|
40 |
+
'link_pn' => '109',
|
41 |
+
)
|
42 |
+
);
|
43 |
|
44 |
$this->all_plugins = get_plugins();
|
45 |
|
46 |
/* Private and public keys */
|
47 |
$this->keys = array(
|
48 |
+
'public' => array(
|
49 |
+
'display_name' => __( 'Site Key', 'google-captcha' ),
|
50 |
+
'form_name' => 'gglcptch_public_key',
|
51 |
+
'error_msg' => '',
|
52 |
),
|
53 |
'private' => array(
|
54 |
+
'display_name' => __( 'Secret Key', 'google-captcha' ),
|
55 |
+
'form_name' => 'gglcptch_private_key',
|
56 |
+
'error_msg' => '',
|
57 |
),
|
58 |
);
|
59 |
|
60 |
$this->versions = array(
|
61 |
+
'v2' => sprintf( '%s 2', __( 'Version', 'google-captcha' ) ),
|
62 |
+
'v3' => sprintf( '%s 3', __( 'Version', 'google-captcha' ) ),
|
63 |
+
'invisible' => __( 'Invisible', 'google-captcha' ),
|
64 |
);
|
65 |
|
66 |
/* Supported forms */
|
67 |
+
$this->forms = gglcptch_get_forms();
|
68 |
$this->sections = gglcptch_get_sections();
|
69 |
|
70 |
add_action( get_parent_class( $this ) . '_display_custom_messages', array( $this, 'display_custom_messages' ) );
|
71 |
+
add_action( get_parent_class( $this ) . '_additional_misc_options', array( $this, 'additional_misc_options' ) );
|
72 |
add_action( get_parent_class( $this ) . '_display_metabox', array( $this, 'display_metabox' ) );
|
73 |
+
add_action( get_parent_class( $this ) . '_information_postbox_bottom', array( $this, 'information_postbox_bottom' ) );
|
74 |
}
|
75 |
|
76 |
/**
|
77 |
* Save plugin options to the database
|
78 |
+
*
|
79 |
* @access public
|
80 |
* @param void
|
81 |
* @return array The action results
|
84 |
|
85 |
$message = $notice = $error = '';
|
86 |
|
87 |
+
if ( ! isset( $_POST['gglcptch_save_field'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['gglcptch_save_field'] ) ), 'gglcptch_save_action' ) ) {
|
88 |
+
print esc_html__( 'Sorry, your nonce did not verify.', 'google-captcha' );
|
89 |
+
exit;
|
|
|
90 |
} else {
|
91 |
+
/* Save data for settings page */
|
92 |
+
if ( empty( $_POST['gglcptch_public_key'] ) ) {
|
93 |
+
$this->keys['public']['error_msg'] = __( 'Enter site key', 'google-captcha' );
|
94 |
+
$error = __( 'WARNING: The captcha will not be displayed until you fill key fields.', 'google-captcha' );
|
95 |
+
} else {
|
96 |
+
$this->keys['public']['error_msg'] = '';
|
97 |
+
}
|
98 |
|
99 |
+
if ( empty( $_POST['gglcptch_private_key'] ) ) {
|
100 |
+
$this->keys['private']['error_msg'] = __( 'Enter secret key', 'google-captcha' );
|
101 |
+
$error = __( 'WARNING: The captcha will not be displayed until you fill key fields.', 'google-captcha' );
|
102 |
+
} else {
|
103 |
+
$this->keys['private']['error_msg'] = '';
|
104 |
+
}
|
105 |
|
106 |
+
if ( sanitize_text_field( wp_unslash( $_POST['gglcptch_public_key'] ) ) !== $this->options['public_key'] || sanitize_text_field( wp_unslash( $_POST['gglcptch_private_key'] ) ) !== $this->options['private_key'] ) {
|
107 |
+
$this->options['keys_verified'] = false;
|
108 |
+
}
|
109 |
|
110 |
+
if ( isset( $_POST['gglcptch_recaptcha_version'] ) && sanitize_text_field( wp_unslash( $_POST['gglcptch_recaptcha_version'] ) ) !== $this->options['recaptcha_version'] ) {
|
111 |
+
$this->options['keys_verified'] = false;
|
112 |
+
$this->options['need_keys_verified_check'] = true;
|
113 |
+
}
|
114 |
|
115 |
+
$this->options['allowlist_message'] = isset( $_POST['gglcptch_allowlist_message'] ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_allowlist_message'] ) ) : '';
|
116 |
+
$this->options['public_key'] = isset( $_POST['gglcptch_public_key'] ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_public_key'] ) ) : '';
|
117 |
+
$this->options['private_key'] = isset( $_POST['gglcptch_private_key'] ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_private_key'] ) ) : '';
|
118 |
+
$this->options['recaptcha_version'] = in_array( sanitize_text_field( wp_unslash( $_POST['gglcptch_recaptcha_version'] ) ), array( 'v2', 'invisible', 'v3' ), true ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_recaptcha_version'] ) ) : $this->options['recaptcha_version'];
|
119 |
+
$this->options['theme_v2'] = isset( $_POST['gglcptch_theme_v2'] ) && in_array( sanitize_text_field( wp_unslash( $_POST['gglcptch_theme_v2'] ) ), array( 'light', 'dark' ), true ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_theme_v2'] ) ) : $this->options['theme_v2'];
|
120 |
+
$this->options['score_v3'] = isset( $_POST['gglcptch_score_v3'] ) ? (float) sanitize_text_field( wp_unslash( $_POST['gglcptch_score_v3'] ) ) : 0.5;
|
121 |
+
$this->options['disable_submit'] = isset( $_POST['gglcptch_disable_submit'] ) ? 1 : 0;
|
122 |
+
$this->options['hide_badge'] = isset( $_POST['gglcptch_hide_badge'] ) ? 1 : 0;
|
123 |
+
$this->options['disable_submit_button'] = isset( $_POST['gglcptch_disable_submit_button'] ) ? 1 : 0;
|
124 |
+
$this->options['use_globally'] = isset( $_POST['gglcptch_use_globally'] ) ? intval( sanitize_text_field( wp_unslash( $_POST['gglcptch_use_globally'] ) ) ) : 0;
|
125 |
|
126 |
+
foreach ( $this->forms as $form_slug => $form_data ) {
|
127 |
+
$this->options[ $form_slug ] = isset( $_POST[ 'gglcptch_' . $form_slug ] ) ? 1 : 0;
|
128 |
+
}
|
129 |
|
130 |
+
if ( function_exists( 'get_editable_roles' ) ) {
|
131 |
+
foreach ( get_editable_roles() as $role => $fields ) {
|
132 |
+
$this->options[ $role ] = isset( $_POST[ 'gglcptch_' . $role ] ) ? 1 : 0;
|
133 |
+
}
|
134 |
}
|
|
|
135 |
|
136 |
+
$this->options = apply_filters( 'gglcptch_before_save_options', $this->options );
|
137 |
+
update_option( 'gglcptch_options', $this->options );
|
138 |
+
$message = __( 'Settings saved.', 'google-captcha' );
|
139 |
+
}
|
140 |
|
141 |
return compact( 'message', 'notice', 'error' );
|
142 |
}
|
143 |
|
144 |
/**
|
145 |
* Displays 'settings' menu-tab
|
146 |
+
*
|
147 |
* @access public
|
|
|
148 |
* @return void
|
149 |
*/
|
150 |
public function tab_settings() { ?>
|
151 |
+
<h3 class="bws_tab_label"><?php esc_html_e( 'reCaptcha Settings', 'google-captcha' ); ?></h3>
|
152 |
<?php $this->help_phrase(); ?>
|
153 |
<hr>
|
154 |
+
<div class="bws_tab_sub_label"><?php esc_html_e( 'General', 'google-captcha' ); ?></div>
|
155 |
<table class="form-table">
|
156 |
<tr valign="top">
|
157 |
+
<th scope="row"><?php esc_html_e( 'reCaptcha Version', 'google-captcha' ); ?></th>
|
158 |
<td>
|
159 |
<fieldset>
|
160 |
<?php foreach ( $this->versions as $version => $version_name ) { ?>
|
161 |
<label>
|
162 |
+
<input type="radio" name="gglcptch_recaptcha_version" value="<?php echo esc_attr( $version ); ?>" <?php checked( $version, $this->options['recaptcha_version'] ); ?>> <?php echo esc_html( $version_name ); ?>
|
163 |
</label>
|
164 |
<br/>
|
165 |
<?php } ?>
|
166 |
</fieldset>
|
167 |
</td>
|
168 |
</tr>
|
169 |
+
</table>
|
170 |
+
<table class="form-table gglcptch_settings_form">
|
171 |
+
<div class="bws_info gglcptch_settings_form">
|
172 |
+
<?php
|
173 |
+
printf(
|
174 |
+
esc_html__( 'Register your domain name with Google reCaptcha service and add the keys to the fields below. %1$s Get the API Keys. %2$s', 'google-captcha' ),
|
175 |
+
'<a target="_blank" href="https://www.google.com/recaptcha/admin#list">',
|
176 |
+
'</a>'
|
177 |
+
)
|
178 |
+
?>
|
179 |
</div>
|
180 |
+
<div class="bws_info gglcptch_settings_form">
|
181 |
<?php
|
182 |
printf(
|
183 |
+
esc_html__( 'If you do not want to create API keys use %1$sCaptcha by BestWebSoft%2$s plugin.', 'google-captcha' ),
|
184 |
'<a target="_blank" href="https://bestwebsoft.com/products/wordpress/plugins/captcha/?k=dcf21edcd5cc9374f5e15c8055e40797">',
|
185 |
'</a>'
|
186 |
);
|
187 |
?>
|
188 |
</div>
|
189 |
+
<div class="bws_info warning gglcptch_settings_form">
|
190 |
+
<?php
|
191 |
+
printf(
|
192 |
+
esc_html__( 'The Google reCaptcha block loads the webfont "Roboto" from fonts.googleapis.com. If you do not want to load this font use %1$sCaptcha by BestWebSoft%2$s plugin.', 'google-captcha-pro' ),
|
193 |
+
'<a target="_blank" href="https://bestwebsoft.com/products/wordpress/plugins/captcha/?k=dcf21edcd5cc9374f5e15c8055e40797">',
|
194 |
+
'</a>'
|
195 |
+
);
|
196 |
+
?>
|
197 |
+
</div>
|
198 |
<?php foreach ( $this->keys as $key => $fields ) { ?>
|
199 |
<tr>
|
200 |
+
<th><?php echo esc_html( $fields['display_name'] ); ?></th>
|
201 |
<td>
|
202 |
+
<input class="regular-text" type="text" name="<?php echo esc_attr( $fields['form_name'] ); ?>" value="<?php echo esc_attr( $this->options[ $key . '_key' ] ); ?>" maxlength="200" />
|
203 |
+
<label class="gglcptch_error_msg error"><?php echo esc_html( $fields['error_msg'] ); ?></label>
|
204 |
+
<span class="dashicons dashicons-yes gglcptch_verified
|
205 |
+
<?php
|
206 |
+
if ( ! isset( $this->options['keys_verified'] ) || true !== $this->options['keys_verified'] ) {
|
207 |
+
echo esc_attr( 'hidden' );
|
208 |
+
}
|
209 |
+
?>
|
210 |
+
"></span>
|
211 |
</td>
|
212 |
</tr>
|
213 |
+
<?php
|
214 |
+
}
|
215 |
+
if ( ! empty( $this->options['public_key'] ) && ! empty( $this->options['private_key'] ) ) {
|
216 |
+
?>
|
217 |
<tr class="hide-if-no-js">
|
218 |
<th></th>
|
219 |
<td>
|
220 |
<div id="gglcptch-test-keys">
|
221 |
+
<a class="button button-secondary" href="
|
222 |
+
<?php
|
223 |
+
echo esc_url(
|
224 |
+
add_query_arg(
|
225 |
+
array(
|
226 |
+
'_wpnonce' => wp_create_nonce( 'gglcptch-test-keys' ),
|
227 |
+
'action' => 'gglcptch-test-keys',
|
228 |
+
'is_network' => $this->is_network_options ? '1' : '0',
|
229 |
+
),
|
230 |
+
admin_url( 'admin-ajax.php' )
|
231 |
+
)
|
232 |
+
);
|
233 |
+
?>
|
234 |
+
"><?php esc_html_e( 'Test reCaptcha', 'google-captcha' ); ?></a>
|
235 |
</div>
|
236 |
</td>
|
237 |
</tr>
|
238 |
<?php } ?>
|
239 |
+
<tr valign="top">
|
240 |
+
<th scope="row"><?php esc_html_e( 'Enable reCaptcha for', 'google-captcha' ); ?></th>
|
241 |
<td>
|
242 |
<!--[if !IE]> -->
|
243 |
<div class="gglcptch-settings-accordion">
|
244 |
<!-- <![endif]-->
|
245 |
+
<?php
|
246 |
+
foreach ( $this->sections as $section_slug => $section ) {
|
247 |
|
248 |
if ( empty( $section['name'] ) || empty( $section['forms'] ) || ! is_array( $section['forms'] ) ) {
|
249 |
continue;
|
250 |
}
|
251 |
|
252 |
+
$section_notice = ! empty( $section['section_notice'] ) ? $section['section_notice'] : '';
|
253 |
+
?>
|
254 |
<p class="gglcptch_section_header">
|
255 |
+
<i><?php echo esc_html( $section['name'] ); ?></i>
|
256 |
<?php if ( ! empty( $section_notice ) ) { ?>
|
257 |
+
<span class="bws_info"><?php echo esc_html( $section_notice ); ?></span>
|
258 |
<?php } ?><br />
|
259 |
</p>
|
260 |
<fieldset class="gglcptch_section_forms">
|
261 |
+
<?php
|
262 |
+
foreach ( $section['forms'] as $form_slug ) {
|
263 |
$form_notice = $this->forms[ $form_slug ]['form_notice'];
|
264 |
+
$form_atts = '';
|
265 |
+
if ( '' !== $form_notice || '' !== $section_notice ) {
|
266 |
$form_atts .= disabled( 1, 1, false );
|
267 |
}
|
268 |
+
$form_atts .= checked( ! empty( $this->options[ $form_slug ] ), true, false );
|
269 |
+
?>
|
270 |
<label>
|
271 |
+
<input type="checkbox"<?php echo wp_kses_post( $form_atts ); ?> name="gglcptch_<?php echo esc_attr( $form_slug ); ?>" value="1" /> <?php echo esc_html( $this->forms[ $form_slug ]['form_name'] ); ?>
|
272 |
</label>
|
273 |
+
<?php if ( '' !== $form_notice ) { ?>
|
274 |
+
<span class="bws_info"><?php echo wp_kses_post( $form_notice ); ?></span>
|
275 |
<?php } ?>
|
276 |
<br />
|
277 |
<?php } ?>
|
284 |
</td>
|
285 |
</tr>
|
286 |
</table>
|
287 |
+
<!-- pls -->
|
288 |
<?php if ( ! $this->hide_pro_tabs ) { ?>
|
289 |
<div class="bws_pro_version_bloc">
|
290 |
<div class="bws_pro_version_table_bloc">
|
291 |
+
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php esc_html_e( 'Close', 'google-captcha' ); ?>"></button>
|
292 |
<div class="bws_table_bg"></div>
|
293 |
<?php gglcptch_supported_plugins_banner(); ?>
|
294 |
</div>
|
295 |
<?php $this->bws_pro_block_links(); ?>
|
296 |
</div>
|
297 |
<?php } ?>
|
298 |
+
<!-- end pls -->
|
299 |
<table class="form-table">
|
300 |
<tr valign="top">
|
301 |
+
<th scope="row">
|
302 |
+
<?php esc_html_e( 'reCaptcha Domain', 'google-captcha' ); ?>
|
303 |
+
</th>
|
304 |
+
<td>
|
305 |
+
<select <?php echo wp_kses_post( $this->change_permission_attr ); ?> name="gglcptch_use_globally">
|
306 |
+
<option value="0" <?php selected( $this->options['use_globally'], 0 ); ?>>google.com</option>
|
307 |
+
<option value="1" <?php selected( $this->options['use_globally'], 1 ); ?>>recaptcha.net</option>
|
308 |
+
</select>
|
309 |
+
<div class="bws_info">
|
310 |
+
<?php esc_html_e( 'If Google is not accessible or blocked in your country select other one.', 'google-captcha' ); ?>
|
311 |
</div>
|
312 |
+
</td>
|
313 |
+
</tr>
|
314 |
+
</table>
|
315 |
+
<!-- pls -->
|
316 |
<?php if ( ! $this->hide_pro_tabs ) { ?>
|
317 |
<div class="bws_pro_version_bloc">
|
318 |
<div class="bws_pro_version_table_bloc">
|
319 |
+
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php esc_html_e( 'Close', 'google-captcha' ); ?>"></button>
|
320 |
<div class="bws_table_bg"></div>
|
321 |
<?php gglcptch_additional_settings_banner_general(); ?>
|
322 |
</div>
|
323 |
<?php $this->bws_pro_block_links(); ?>
|
324 |
</div>
|
325 |
<?php } ?>
|
326 |
+
<!-- end pls -->
|
327 |
|
328 |
+
<div class="bws_tab_sub_label"><?php esc_html_e( 'Appearance', 'google-captcha' ); ?></div>
|
329 |
<table class="form-table">
|
330 |
<tr class="gglcptch_theme_v2" valign="top">
|
331 |
<th scope="row">
|
332 |
+
<?php esc_html_e( 'Theme', 'google-captcha' ); ?>
|
333 |
</th>
|
334 |
<td>
|
335 |
<select name="gglcptch_theme_v2">
|
336 |
+
<option value="light" <?php selected( 'light', $this->options['theme_v2'] ); ?>><?php esc_html_e( 'Light', 'google-captcha' ); ?></option>
|
337 |
+
<option value="dark" <?php selected( 'dark', $this->options['theme_v2'] ); ?>><?php esc_html_e( 'Dark', 'google-captcha' ); ?></option>
|
338 |
</select>
|
339 |
</td>
|
340 |
</tr>
|
341 |
</table>
|
342 |
<!-- pls -->
|
343 |
<?php if ( ! $this->hide_pro_tabs ) { ?>
|
344 |
+
<div class="bws_pro_version_bloc gglcptch_theme_v2">
|
345 |
<div class="bws_pro_version_table_bloc">
|
346 |
+
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php esc_html_e( 'Close', 'google-captcha' ); ?>"></button>
|
347 |
<div class="bws_table_bg"></div>
|
348 |
<?php gglcptch_additional_settings_banner_appearance(); ?>
|
349 |
</div>
|
350 |
<?php $this->bws_pro_block_links(); ?>
|
351 |
</div>
|
352 |
<?php } ?>
|
353 |
+
<!-- end pls -->
|
354 |
<table class="form-table">
|
355 |
<tr class="gglcptch_badge_v3" valign="top">
|
356 |
+
<th scope="row">
|
357 |
+
<?php esc_html_e( 'Hide reCaptcha Badge', 'google-captcha' ); ?>
|
358 |
+
</th>
|
359 |
+
<td>
|
360 |
+
<input<?php echo wp_kses_post( $this->change_permission_attr ); ?> id="gglcptch_hide_badge" type="checkbox" <?php checked( ! empty( $this->options['hide_badge'] ) ); ?> name="gglcptch_hide_badge" value="1" />
|
361 |
+
<span class="bws_info">
|
362 |
+
<?php esc_html_e( 'Enable to hide reCaptcha Badge for Version 3 and Invisible reCaptcha.', 'google-captcha' ); ?>
|
363 |
</span>
|
364 |
+
</td>
|
365 |
+
</tr>
|
366 |
</table>
|
367 |
|
368 |
+
<div class="bws_tab_sub_label"><?php esc_html_e( 'Additional Protective Measures', 'google-captcha' ); ?></div>
|
369 |
<table class="form-table">
|
370 |
<tr class="gglcptch_score_v3" valign="top">
|
371 |
+
<th scope="row">
|
372 |
+
<?php esc_html_e( 'Score', 'google-captcha' ); ?>
|
373 |
+
</th>
|
374 |
+
<td>
|
375 |
+
<input name="gglcptch_score_v3" id="gglcptch_score_v3" type="range" list="gglcptch_score_v3_rangeList" min="0" max="1.0" step="0.1" value="<?php echo esc_attr( $this->options['score_v3'] ); ?>">
|
376 |
+
<output id="gglcptch_score_out_v3" for="gglcptch_score_v3"></output>
|
377 |
+
<span class="bws_info" style="display: block;"><?php printf( esc_html__( 'Set the minimum verification score from %1$s to %2$s (default is %3$s).', 'google-captcha' ), 0, 1, 0.5 ); ?></span>
|
378 |
+
</td>
|
379 |
+
</tr>
|
380 |
+
</table>
|
381 |
+
<?php if ( ! $this->hide_pro_tabs ) { ?>
|
382 |
+
<div class="bws_pro_version_bloc gglcptch_badge_v3">
|
383 |
+
<div class="bws_pro_version_table_bloc">
|
384 |
+
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php esc_html_e( 'Close', 'google-captcha' ); ?>"></button>
|
385 |
+
<div class="bws_table_bg"></div>
|
386 |
+
<?php gglcptch_additional_settings_banner_display(); ?>
|
387 |
+
</div>
|
388 |
+
<?php $this->bws_pro_block_links(); ?>
|
389 |
+
</div>
|
390 |
+
<?php } ?>
|
391 |
+
<table class="form-table">
|
392 |
<tr valign="top">
|
393 |
+
<th scope="row"><?php esc_html_e( 'Hide reCaptcha for', 'google-captcha' ); ?></th>
|
394 |
<td>
|
395 |
<fieldset>
|
396 |
+
<?php
|
397 |
+
if ( function_exists( 'get_editable_roles' ) ) {
|
398 |
foreach ( get_editable_roles() as $role => $fields ) {
|
399 |
printf(
|
400 |
'<label><input type="checkbox" name="%1$s" value="%2$s" %3$s> %4$s</label><br/>',
|
401 |
+
'gglcptch_' . esc_attr( $role ),
|
402 |
+
esc_attr( $role ),
|
403 |
checked( ! empty( $this->options[ $role ] ), true, false ),
|
404 |
translate_user_role( $fields['name'] )
|
405 |
);
|
406 |
}
|
407 |
+
}
|
408 |
+
?>
|
409 |
</fieldset>
|
410 |
</td>
|
411 |
</tr>
|
412 |
<tr valign="top">
|
413 |
+
<th scope="row"><?php esc_html_e( 'Allow List Notification', 'google-captcha' ); ?></th>
|
414 |
<td>
|
415 |
+
<textarea name="gglcptch_allowlist_message"><?php echo esc_html( $this->options['allowlist_message'] ); ?></textarea>
|
416 |
+
<div class="bws_info"><?php esc_html_e( 'This message will be displayed instead of the reCaptcha.', 'google-captcha' ); ?></div>
|
417 |
</td>
|
418 |
</tr>
|
419 |
<tr valign="top">
|
420 |
+
<th scope="row"><?php esc_html_e( 'Advanced Protection', 'google-captcha' ); ?></th>
|
421 |
<td>
|
422 |
+
<input<?php echo wp_kses_post( $this->change_permission_attr ); ?> id="gglcptch_disable_submit" type="checkbox" <?php checked( ! empty( $this->options['disable_submit'] ) ); ?> name="gglcptch_disable_submit" value="1" />
|
423 |
<span class="bws_info">
|
424 |
+
<?php esc_html_e( 'Enable to keep submit button disabled until reCaptcha is loaded (do not use this option if you see "Failed to load Google reCaptcha" message).', 'google-captcha' ); ?>
|
425 |
</span>
|
426 |
</td>
|
427 |
</tr>
|
428 |
+
<tr class="gglcptch_submit_v2" valign="top">
|
429 |
+
<th scope="row">
|
430 |
+
<?php esc_html_e( 'Disabled Submit Button', 'google-captcha' ); ?>
|
431 |
+
</th>
|
432 |
+
<td>
|
433 |
+
<input<?php echo wp_kses_post( $this->change_permission_attr ); ?> id="gglcptch_disable_submit_button" type="checkbox" <?php checked( ! empty( $this->options['disable_submit_button'] ) ); ?> name="gglcptch_disable_submit_button" value="1" />
|
434 |
+
<span class="bws_info">
|
435 |
+
<?php esc_html_e( 'Enable to keep submit button disabled until user passes the reCaptcha test (for Version 2).', 'google-captcha' ); ?>
|
436 |
</span>
|
437 |
+
</td>
|
438 |
+
</tr>
|
439 |
</table>
|
440 |
+
<?php
|
441 |
+
wp_nonce_field( 'gglcptch_save_action', 'gglcptch_save_field' );
|
442 |
+
}
|
443 |
|
444 |
/**
|
445 |
* Display custom error\message\notice
|
446 |
+
*
|
447 |
* @access public
|
448 |
* @return void
|
449 |
*/
|
450 |
public function display_custom_messages() {
|
451 |
+
if ( ! empty( $this->options['need_keys_verified_check'] ) ) {
|
452 |
+
?>
|
453 |
+
<div class="updated inline bws-notice"><p><strong><?php esc_html_e( 'reCaptcha version was changed. Please submit "Test reCaptcha" and regenerate Site and Secret keys if necessary.', 'google-captcha' ); ?></strong></p></div>
|
454 |
+
<?php
|
455 |
+
}
|
456 |
}
|
457 |
|
458 |
+
public function additional_misc_options() {
|
459 |
+
do_action( 'gglcptch_settings_page_misc_action', $this->options );
|
460 |
+
}
|
461 |
|
462 |
+
public function information_postbox_bottom() {
|
463 |
+
?>
|
464 |
+
<div class="misc-pub-section">
|
465 |
+
<?php
|
466 |
+
printf(
|
467 |
+
esc_html__( 'ReCaptcha plugin is fully compliant with GDPR. %1$s Learn more %2$s', 'google-captcha' ),
|
468 |
+
'<a target="_blank" href="https://support.bestwebsoft.com/hc/en-us/articles/4406398670097">',
|
469 |
+
'</a>'
|
470 |
+
);
|
471 |
+
?>
|
472 |
+
</div>
|
473 |
+
<?php
|
474 |
+
}
|
475 |
|
476 |
/**
|
477 |
* Display custom metabox
|
478 |
+
*
|
479 |
* @access public
|
480 |
* @param void
|
481 |
+
* @return void
|
482 |
*/
|
483 |
+
public function display_metabox() {
|
484 |
+
?>
|
485 |
<div class="postbox">
|
486 |
<h3 class="hndle">
|
487 |
+
<?php esc_html_e( 'reCaptcha Shortcode', 'google-captcha' ); ?>
|
488 |
</h3>
|
489 |
<div class="inside">
|
490 |
+
<?php esc_html_e( 'Add reCaptcha to your posts or pages using the following shortcode:', 'google-captcha' ); ?>
|
491 |
<?php bws_shortcode_output( '[bws_google_captcha]' ); ?>
|
492 |
</div>
|
493 |
</div>
|
494 |
+
<?php
|
495 |
+
}
|
496 |
}
|
497 |
+
}
|
includes/forms.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Contains the extending functionality
|
|
|
4 |
* @since 1.32
|
5 |
*/
|
6 |
if ( ! function_exists( 'gglcptch_get_forms' ) ) {
|
@@ -8,15 +9,15 @@ if ( ! function_exists( 'gglcptch_get_forms' ) ) {
|
|
8 |
global $gglcptch_forms;
|
9 |
|
10 |
$default_forms = array(
|
11 |
-
'login_form'
|
12 |
-
'registration_form'
|
13 |
-
'reset_pwd_form'
|
14 |
-
'comments_form'
|
15 |
-
'contact_form'
|
16 |
-
'testimonials'
|
17 |
);
|
18 |
|
19 |
-
$custom_forms
|
20 |
$gglcptch_forms = array_merge( $default_forms, $custom_forms );
|
21 |
|
22 |
foreach ( $gglcptch_forms as $form_slug => $form_data ) {
|
@@ -35,26 +36,31 @@ if ( ! function_exists( 'gglcptch_get_sections' ) ) {
|
|
35 |
|
36 |
$default_sections = array(
|
37 |
'standard' => array(
|
38 |
-
'name'
|
39 |
'forms' => array(
|
40 |
'login_form',
|
41 |
'registration_form',
|
42 |
'reset_pwd_form',
|
43 |
-
'comments_form'
|
44 |
-
)
|
45 |
),
|
46 |
'external' => array(
|
47 |
-
'name'
|
48 |
'forms' => array(
|
49 |
'contact_form',
|
50 |
-
'testimonials'
|
51 |
-
)
|
52 |
-
)
|
53 |
);
|
54 |
|
55 |
$custom_forms = apply_filters( 'gglcptch_add_custom_form', array() );
|
56 |
|
57 |
-
$custom_sections
|
|
|
|
|
|
|
|
|
|
|
58 |
$gglcptch_sections = array_merge( $default_sections, $custom_sections );
|
59 |
|
60 |
foreach ( $gglcptch_sections as $section_slug => $section_data ) {
|
@@ -74,17 +80,17 @@ if ( ! function_exists( 'gglcptch_add_lmtttmpts_forms' ) ) {
|
|
74 |
$forms = array();
|
75 |
}
|
76 |
|
77 |
-
$forms[
|
78 |
-
'name'
|
79 |
-
'forms'
|
80 |
);
|
81 |
|
82 |
$recaptcha_forms = gglcptch_get_forms();
|
83 |
|
84 |
foreach ( $recaptcha_forms as $form_slug => $form_data ) {
|
85 |
-
$forms[
|
86 |
if ( empty( $form_data['form_notice'] ) ) {
|
87 |
-
$forms[
|
88 |
}
|
89 |
}
|
90 |
|
@@ -94,28 +100,29 @@ if ( ! function_exists( 'gglcptch_add_lmtttmpts_forms' ) ) {
|
|
94 |
|
95 |
/**
|
96 |
* Display section notice
|
|
|
97 |
* @access public
|
98 |
-
* @param $section_slug
|
99 |
* @return array The action results
|
100 |
*/
|
101 |
if ( ! function_exists( 'gglcptch_get_section_notice' ) ) {
|
102 |
function gglcptch_get_section_notice( $section_slug = '' ) {
|
103 |
-
$section_notice =
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
$plugins = apply_filters( 'gglcptch_custom_plugin_section_notice', $plugins );
|
109 |
|
110 |
$is_network_admin = is_network_admin();
|
111 |
|
112 |
if ( isset( $plugins[ $section_slug ] ) ) {
|
113 |
-
$slug
|
114 |
-
$slug
|
115 |
$plugin_info = gglcptch_plugin_status( $plugins[ $section_slug ], get_plugins(), $is_network_admin );
|
116 |
-
if ( 'deactivated'
|
117 |
$section_notice = '<a href="' . self_admin_url( 'plugins.php' ) . '">' . __( 'Activate', 'google-captcha' ) . '</a>';
|
118 |
-
} elseif ( 'not_installed'
|
119 |
$section_notice = sprintf( '<a href="http://wordpress.org/plugins/%s/" target="_blank">%s</a>', $slug, __( 'Install Now', 'google-captcha' ) );
|
120 |
}
|
121 |
}
|
@@ -127,24 +134,24 @@ if ( ! function_exists( 'gglcptch_get_section_notice' ) ) {
|
|
127 |
if ( ! function_exists( 'gglcptch_get_form_notice' ) ) {
|
128 |
function gglcptch_get_form_notice( $form_slug = '' ) {
|
129 |
global $wp_version, $gglcptch_plugin_info;
|
130 |
-
$form_notice =
|
131 |
|
132 |
$plugins = array(
|
133 |
-
'contact_form'
|
134 |
-
'testimonials'
|
135 |
);
|
136 |
|
137 |
if ( isset( $plugins[ $form_slug ] ) ) {
|
138 |
$plugin_info = gglcptch_plugin_status( $plugins[ $form_slug ], get_plugins(), is_network_admin() );
|
139 |
|
140 |
-
if ( 'deactivated'
|
141 |
$form_notice = '<a href="' . self_admin_url( 'plugins.php' ) . '">' . __( 'Activate', 'google-captcha' ) . '</a>';
|
142 |
-
} elseif ( 'not_installed'
|
143 |
-
if ( 'contact_form'
|
144 |
-
$form_notice = '<a href="https://bestwebsoft.com/products/wordpress/plugins/contact-form/?k=fa26df3911ebcd90c3e85117d6dd0ce0&pn=281&v=' . $gglcptch_plugin_info[
|
145 |
} else {
|
146 |
-
$slug
|
147 |
-
$slug
|
148 |
$form_notice = sprintf( '<a href="http://wordpress.org/plugins/%s/" target="_blank">%s</a>', $slug, __( 'Install Now', 'google-captcha' ) );
|
149 |
}
|
150 |
}
|
@@ -219,17 +226,17 @@ if ( ! function_exists( 'gglcptch_login_display' ) ) {
|
|
219 |
global $gglcptch_options;
|
220 |
|
221 |
if ( isset( $gglcptch_options['recaptcha_version'] ) ) {
|
222 |
-
if ( 'v2'
|
223 |
$from_width = 302; ?>
|
224 |
<style type="text/css" media="screen">
|
225 |
.login-action-login #loginform,
|
226 |
.login-action-lostpassword #lostpasswordform,
|
227 |
.login-action-register #registerform {
|
228 |
-
width: <?php echo $from_width; ?>px !important;
|
229 |
}
|
230 |
#login_error,
|
231 |
.message {
|
232 |
-
width: <?php echo $from_width + 20; ?>px !important;
|
233 |
}
|
234 |
.login-action-login #loginform .gglcptch,
|
235 |
.login-action-lostpassword #lostpasswordform .gglcptch,
|
@@ -237,7 +244,8 @@ if ( ! function_exists( 'gglcptch_login_display' ) ) {
|
|
237 |
margin-bottom: 10px;
|
238 |
}
|
239 |
</style>
|
240 |
-
|
|
|
241 |
}
|
242 |
echo gglcptch_display();
|
243 |
return true;
|
@@ -248,22 +256,25 @@ if ( ! function_exists( 'gglcptch_login_display' ) ) {
|
|
248 |
if ( ! function_exists( 'gglcptch_login_check' ) ) {
|
249 |
function gglcptch_login_check( $user ) {
|
250 |
global $gglcptch_check;
|
251 |
-
if ( gglcptch_is_woocommerce_page() )
|
252 |
return $user;
|
253 |
-
|
|
|
254 |
return $user;
|
|
|
255 |
/* Skip check if connecting to XMLRPC */
|
256 |
-
if ( defined( 'XMLRPC_REQUEST' ) )
|
257 |
return $user;
|
|
|
258 |
|
259 |
$gglcptch_check = gglcptch_check( 'login_form' );
|
260 |
|
261 |
if ( ! $gglcptch_check['response'] ) {
|
262 |
-
if ( $gglcptch_check['reason']
|
263 |
wp_clear_auth_cookie();
|
264 |
}
|
265 |
-
$error_code
|
266 |
-
$errors
|
267 |
$gglcptch_errors = $gglcptch_check['errors']->errors;
|
268 |
foreach ( $gglcptch_errors as $code => $messages ) {
|
269 |
foreach ( $messages as $message ) {
|
@@ -280,11 +291,13 @@ if ( ! function_exists( 'gglcptch_login_check' ) ) {
|
|
280 |
/* Check google captcha in registration form */
|
281 |
if ( ! function_exists( 'gglcptch_register_check' ) ) {
|
282 |
function gglcptch_register_check( $allow ) {
|
283 |
-
if ( gglcptch_is_woocommerce_page() )
|
284 |
return $allow;
|
|
|
285 |
/* Skip check if connecting to XMLRPC */
|
286 |
-
if ( defined( 'XMLRPC_REQUEST' ) )
|
287 |
return $allow;
|
|
|
288 |
|
289 |
$gglcptch_check = gglcptch_check( 'registration_form' );
|
290 |
if ( ! $gglcptch_check['response'] ) {
|
@@ -298,8 +311,9 @@ if ( ! function_exists( 'gglcptch_register_check' ) ) {
|
|
298 |
/* Check google captcha in lostpassword form */
|
299 |
if ( ! function_exists( 'gglcptch_lostpassword_check' ) ) {
|
300 |
function gglcptch_lostpassword_check( $allow ) {
|
301 |
-
if ( gglcptch_is_woocommerce_page() || ( isset( $_POST['g-recaptcha-response-check'] ) && true === $_POST['g-recaptcha-response-check'] ) )
|
302 |
return $allow;
|
|
|
303 |
$gglcptch_check = gglcptch_check( 'reset_pwd_form' );
|
304 |
if ( ! $gglcptch_check['response'] ) {
|
305 |
return $gglcptch_check['errors'];
|
@@ -312,10 +326,10 @@ if ( ! function_exists( 'gglcptch_lostpassword_check' ) ) {
|
|
312 |
if ( ! function_exists( 'gglcptch_signup_display' ) ) {
|
313 |
function gglcptch_signup_display( $errors ) {
|
314 |
if ( $error_message = $errors->get_error_message( 'gglcptch_error' ) ) {
|
315 |
-
printf( '<p class="error gglcptch_error">%s</p>', $error_message );
|
316 |
}
|
317 |
if ( $error_message = $errors->get_error_message( 'lmttmpts_error' ) ) {
|
318 |
-
printf( '<p class="error lmttmpts_error">%s</p>', $error_message );
|
319 |
}
|
320 |
echo gglcptch_display();
|
321 |
}
|
@@ -325,8 +339,9 @@ if ( ! function_exists( 'gglcptch_signup_display' ) ) {
|
|
325 |
if ( ! function_exists( 'gglcptch_signup_check' ) ) {
|
326 |
function gglcptch_signup_check( $result ) {
|
327 |
global $current_user;
|
328 |
-
if ( is_admin() && ! defined( 'DOING_AJAX' ) && ! empty( $current_user->data->ID ) )
|
329 |
return $result;
|
|
|
330 |
$gglcptch_check = gglcptch_check( 'registration_form' );
|
331 |
if ( ! $gglcptch_check['response'] ) {
|
332 |
$result['errors'] = $gglcptch_check['errors'];
|
@@ -352,14 +367,14 @@ if ( ! function_exists( 'gglcptch_commentform_check' ) ) {
|
|
352 |
function gglcptch_commentform_check() {
|
353 |
$gglcptch_check = gglcptch_check( 'comments_form' );
|
354 |
if ( ! $gglcptch_check['response'] ) {
|
355 |
-
$message
|
356 |
$error_message = sprintf(
|
357 |
'<strong>%s</strong>: %s %s',
|
358 |
__( 'Error', 'google-captcha' ),
|
359 |
$message,
|
360 |
__( 'Click the BACK button on your browser and try again.', 'google-captcha' )
|
361 |
);
|
362 |
-
wp_die( $error_message );
|
363 |
}
|
364 |
return;
|
365 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
* Contains the extending functionality
|
4 |
+
*
|
5 |
* @since 1.32
|
6 |
*/
|
7 |
if ( ! function_exists( 'gglcptch_get_forms' ) ) {
|
9 |
global $gglcptch_forms;
|
10 |
|
11 |
$default_forms = array(
|
12 |
+
'login_form' => array( 'form_name' => __( 'Login form', 'google-captcha' ) ),
|
13 |
+
'registration_form' => array( 'form_name' => __( 'Registration form', 'google-captcha' ) ),
|
14 |
+
'reset_pwd_form' => array( 'form_name' => __( 'Reset password form', 'google-captcha' ) ),
|
15 |
+
'comments_form' => array( 'form_name' => __( 'Comments form', 'google-captcha' ) ),
|
16 |
+
'contact_form' => array( 'form_name' => 'Contact Form' ),
|
17 |
+
'testimonials' => array( 'form_name' => __( 'Testimonials', 'google-captcha' ) ),
|
18 |
);
|
19 |
|
20 |
+
$custom_forms = apply_filters( 'gglcptch_add_custom_form', array() );
|
21 |
$gglcptch_forms = array_merge( $default_forms, $custom_forms );
|
22 |
|
23 |
foreach ( $gglcptch_forms as $form_slug => $form_data ) {
|
36 |
|
37 |
$default_sections = array(
|
38 |
'standard' => array(
|
39 |
+
'name' => __( 'WordPress default', 'google-captcha' ),
|
40 |
'forms' => array(
|
41 |
'login_form',
|
42 |
'registration_form',
|
43 |
'reset_pwd_form',
|
44 |
+
'comments_form',
|
45 |
+
),
|
46 |
),
|
47 |
'external' => array(
|
48 |
+
'name' => __( 'External Plugins', 'google-captcha' ),
|
49 |
'forms' => array(
|
50 |
'contact_form',
|
51 |
+
'testimonials',
|
52 |
+
),
|
53 |
+
),
|
54 |
);
|
55 |
|
56 |
$custom_forms = apply_filters( 'gglcptch_add_custom_form', array() );
|
57 |
|
58 |
+
$custom_sections = ( empty( $custom_forms ) ) ? array() : array(
|
59 |
+
'custom' => array(
|
60 |
+
'name' => __( 'Custom Forms', 'google-captcha' ),
|
61 |
+
'forms' => array_keys( $custom_forms ),
|
62 |
+
),
|
63 |
+
);
|
64 |
$gglcptch_sections = array_merge( $default_sections, $custom_sections );
|
65 |
|
66 |
foreach ( $gglcptch_sections as $section_slug => $section_data ) {
|
80 |
$forms = array();
|
81 |
}
|
82 |
|
83 |
+
$forms['gglcptch'] = array(
|
84 |
+
'name' => __( 'reCaptcha Plugin', 'google-captcha' ),
|
85 |
+
'forms' => array(),
|
86 |
);
|
87 |
|
88 |
$recaptcha_forms = gglcptch_get_forms();
|
89 |
|
90 |
foreach ( $recaptcha_forms as $form_slug => $form_data ) {
|
91 |
+
$forms['gglcptch']['forms'][ "{$form_slug}_captcha_check" ] = $form_data;
|
92 |
if ( empty( $form_data['form_notice'] ) ) {
|
93 |
+
$forms['gglcptch']['forms'][ "{$form_slug}_captcha_check" ]['form_notice'] = gglcptch_get_section_notice( $form_slug );
|
94 |
}
|
95 |
}
|
96 |
|
100 |
|
101 |
/**
|
102 |
* Display section notice
|
103 |
+
*
|
104 |
* @access public
|
105 |
+
* @param $section_slug string
|
106 |
* @return array The action results
|
107 |
*/
|
108 |
if ( ! function_exists( 'gglcptch_get_section_notice' ) ) {
|
109 |
function gglcptch_get_section_notice( $section_slug = '' ) {
|
110 |
+
$section_notice = '';
|
111 |
+
$plugins = array(
|
112 |
+
/* Example: */
|
113 |
+
/* 'bbpress' => 'bbpress/bbpress.php' */
|
114 |
+
);
|
115 |
$plugins = apply_filters( 'gglcptch_custom_plugin_section_notice', $plugins );
|
116 |
|
117 |
$is_network_admin = is_network_admin();
|
118 |
|
119 |
if ( isset( $plugins[ $section_slug ] ) ) {
|
120 |
+
$slug = explode( '/', $plugins[ $section_slug ] );
|
121 |
+
$slug = $slug[0];
|
122 |
$plugin_info = gglcptch_plugin_status( $plugins[ $section_slug ], get_plugins(), $is_network_admin );
|
123 |
+
if ( 'deactivated' === $plugin_info['status'] ) {
|
124 |
$section_notice = '<a href="' . self_admin_url( 'plugins.php' ) . '">' . __( 'Activate', 'google-captcha' ) . '</a>';
|
125 |
+
} elseif ( 'not_installed' === $plugin_info['status'] ) {
|
126 |
$section_notice = sprintf( '<a href="http://wordpress.org/plugins/%s/" target="_blank">%s</a>', $slug, __( 'Install Now', 'google-captcha' ) );
|
127 |
}
|
128 |
}
|
134 |
if ( ! function_exists( 'gglcptch_get_form_notice' ) ) {
|
135 |
function gglcptch_get_form_notice( $form_slug = '' ) {
|
136 |
global $wp_version, $gglcptch_plugin_info;
|
137 |
+
$form_notice = '';
|
138 |
|
139 |
$plugins = array(
|
140 |
+
'contact_form' => array( 'contact-form-plugin/contact_form.php', 'contact-form-pro/contact_form_pro.php' ),
|
141 |
+
'testimonials' => 'bws-testimonials/bws-testimonials.php',
|
142 |
);
|
143 |
|
144 |
if ( isset( $plugins[ $form_slug ] ) ) {
|
145 |
$plugin_info = gglcptch_plugin_status( $plugins[ $form_slug ], get_plugins(), is_network_admin() );
|
146 |
|
147 |
+
if ( 'deactivated' === $plugin_info['status'] ) {
|
148 |
$form_notice = '<a href="' . self_admin_url( 'plugins.php' ) . '">' . __( 'Activate', 'google-captcha' ) . '</a>';
|
149 |
+
} elseif ( 'not_installed' === $plugin_info['status'] ) {
|
150 |
+
if ( 'contact_form' === $form_slug ) {
|
151 |
+
$form_notice = '<a href="https://bestwebsoft.com/products/wordpress/plugins/contact-form/?k=fa26df3911ebcd90c3e85117d6dd0ce0&pn=281&v=' . $gglcptch_plugin_info['Version'] . '&wp_v=' . $wp_version . '" target="_blank">' . __( 'Install Now', 'google-captcha' ) . '</a>';
|
152 |
} else {
|
153 |
+
$slug = explode( '/', $plugins[ $form_slug ] );
|
154 |
+
$slug = $slug[0];
|
155 |
$form_notice = sprintf( '<a href="http://wordpress.org/plugins/%s/" target="_blank">%s</a>', $slug, __( 'Install Now', 'google-captcha' ) );
|
156 |
}
|
157 |
}
|
226 |
global $gglcptch_options;
|
227 |
|
228 |
if ( isset( $gglcptch_options['recaptcha_version'] ) ) {
|
229 |
+
if ( 'v2' === $gglcptch_options['recaptcha_version'] ) {
|
230 |
$from_width = 302; ?>
|
231 |
<style type="text/css" media="screen">
|
232 |
.login-action-login #loginform,
|
233 |
.login-action-lostpassword #lostpasswordform,
|
234 |
.login-action-register #registerform {
|
235 |
+
width: <?php echo esc_attr( $from_width ); ?>px !important;
|
236 |
}
|
237 |
#login_error,
|
238 |
.message {
|
239 |
+
width: <?php echo absint( esc_attr( $from_width ) ) + 20; ?>px !important;
|
240 |
}
|
241 |
.login-action-login #loginform .gglcptch,
|
242 |
.login-action-lostpassword #lostpasswordform .gglcptch,
|
244 |
margin-bottom: 10px;
|
245 |
}
|
246 |
</style>
|
247 |
+
<?php
|
248 |
+
}
|
249 |
}
|
250 |
echo gglcptch_display();
|
251 |
return true;
|
256 |
if ( ! function_exists( 'gglcptch_login_check' ) ) {
|
257 |
function gglcptch_login_check( $user ) {
|
258 |
global $gglcptch_check;
|
259 |
+
if ( gglcptch_is_woocommerce_page() ) {
|
260 |
return $user;
|
261 |
+
}
|
262 |
+
if ( is_wp_error( $user ) && isset( $user->errors['empty_username'] ) && isset( $user->errors['empty_password'] ) ) {
|
263 |
return $user;
|
264 |
+
}
|
265 |
/* Skip check if connecting to XMLRPC */
|
266 |
+
if ( defined( 'XMLRPC_REQUEST' ) ) {
|
267 |
return $user;
|
268 |
+
}
|
269 |
|
270 |
$gglcptch_check = gglcptch_check( 'login_form' );
|
271 |
|
272 |
if ( ! $gglcptch_check['response'] ) {
|
273 |
+
if ( 'VERIFICATION_FAILED' === $gglcptch_check['reason'] ) {
|
274 |
wp_clear_auth_cookie();
|
275 |
}
|
276 |
+
$error_code = ( is_wp_error( $user ) ) ? $user->get_error_code() : 'incorrect_password';
|
277 |
+
$errors = new WP_Error( $error_code, __( 'Authentication failed.', 'google-captcha' ) );
|
278 |
$gglcptch_errors = $gglcptch_check['errors']->errors;
|
279 |
foreach ( $gglcptch_errors as $code => $messages ) {
|
280 |
foreach ( $messages as $message ) {
|
291 |
/* Check google captcha in registration form */
|
292 |
if ( ! function_exists( 'gglcptch_register_check' ) ) {
|
293 |
function gglcptch_register_check( $allow ) {
|
294 |
+
if ( gglcptch_is_woocommerce_page() ) {
|
295 |
return $allow;
|
296 |
+
}
|
297 |
/* Skip check if connecting to XMLRPC */
|
298 |
+
if ( defined( 'XMLRPC_REQUEST' ) ) {
|
299 |
return $allow;
|
300 |
+
}
|
301 |
|
302 |
$gglcptch_check = gglcptch_check( 'registration_form' );
|
303 |
if ( ! $gglcptch_check['response'] ) {
|
311 |
/* Check google captcha in lostpassword form */
|
312 |
if ( ! function_exists( 'gglcptch_lostpassword_check' ) ) {
|
313 |
function gglcptch_lostpassword_check( $allow ) {
|
314 |
+
if ( gglcptch_is_woocommerce_page() || ( isset( $_POST['g-recaptcha-response-check'] ) && true === $_POST['g-recaptcha-response-check'] ) ) {
|
315 |
return $allow;
|
316 |
+
}
|
317 |
$gglcptch_check = gglcptch_check( 'reset_pwd_form' );
|
318 |
if ( ! $gglcptch_check['response'] ) {
|
319 |
return $gglcptch_check['errors'];
|
326 |
if ( ! function_exists( 'gglcptch_signup_display' ) ) {
|
327 |
function gglcptch_signup_display( $errors ) {
|
328 |
if ( $error_message = $errors->get_error_message( 'gglcptch_error' ) ) {
|
329 |
+
printf( '<p class="error gglcptch_error">%s</p>', wp_kses_post( $error_message ) );
|
330 |
}
|
331 |
if ( $error_message = $errors->get_error_message( 'lmttmpts_error' ) ) {
|
332 |
+
printf( '<p class="error lmttmpts_error">%s</p>', wp_kses_post( $error_message ) );
|
333 |
}
|
334 |
echo gglcptch_display();
|
335 |
}
|
339 |
if ( ! function_exists( 'gglcptch_signup_check' ) ) {
|
340 |
function gglcptch_signup_check( $result ) {
|
341 |
global $current_user;
|
342 |
+
if ( is_admin() && ! defined( 'DOING_AJAX' ) && ! empty( $current_user->data->ID ) ) {
|
343 |
return $result;
|
344 |
+
}
|
345 |
$gglcptch_check = gglcptch_check( 'registration_form' );
|
346 |
if ( ! $gglcptch_check['response'] ) {
|
347 |
$result['errors'] = $gglcptch_check['errors'];
|
367 |
function gglcptch_commentform_check() {
|
368 |
$gglcptch_check = gglcptch_check( 'comments_form' );
|
369 |
if ( ! $gglcptch_check['response'] ) {
|
370 |
+
$message = gglcptch_get_message( $gglcptch_check['reason'] ) . '<br />';
|
371 |
$error_message = sprintf(
|
372 |
'<strong>%s</strong>: %s %s',
|
373 |
__( 'Error', 'google-captcha' ),
|
374 |
$message,
|
375 |
__( 'Click the BACK button on your browser and try again.', 'google-captcha' )
|
376 |
);
|
377 |
+
wp_die( wp_kses_post( $error_message ) );
|
378 |
}
|
379 |
return;
|
380 |
}
|
includes/pro_banners.php
CHANGED
@@ -1,23 +1,25 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Display banners on settings page
|
|
|
4 |
* @package reCaptcha by BestWebSoft
|
5 |
* @since 1.27
|
6 |
*/
|
7 |
|
8 |
/**
|
9 |
* Show ads for PRO
|
10 |
-
*
|
11 |
-
* @
|
|
|
12 |
*/
|
13 |
if ( ! function_exists( 'gglcptch_pro_block' ) ) {
|
14 |
function gglcptch_pro_block( $func, $show_cross = true, $display_always = false ) {
|
15 |
global $gglcptch_plugin_info, $wp_version, $gglcptch_options;
|
16 |
if ( $display_always || ! bws_hide_premium_options_check( $gglcptch_options ) ) { ?>
|
17 |
-
<div class="bws_pro_version_bloc gglcptch_pro_block <?php echo $func
|
18 |
<div class="bws_pro_version_table_bloc">
|
19 |
<?php if ( $show_cross ) { ?>
|
20 |
-
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php
|
21 |
<?php } ?>
|
22 |
<div class="bws_table_bg"></div>
|
23 |
<div class="bws_pro_version">
|
@@ -25,143 +27,176 @@ if ( ! function_exists( 'gglcptch_pro_block' ) ) {
|
|
25 |
</div>
|
26 |
</div>
|
27 |
<div class="bws_pro_version_tooltip">
|
28 |
-
<a class="bws_button" href="https://bestwebsoft.com/products/wordpress/plugins/google-captcha/?k=b850d949ccc1239cab0da315c3c822ab&pn=109&v=<?php echo $gglcptch_plugin_info[
|
29 |
-
<?php
|
30 |
</a>
|
31 |
<div class="clear"></div>
|
32 |
</div>
|
33 |
</div>
|
34 |
-
|
|
|
35 |
}
|
36 |
}
|
37 |
|
38 |
if ( ! function_exists( 'gglcptch_allowlist_banner' ) ) {
|
39 |
-
function gglcptch_allowlist_banner() {
|
40 |
-
|
41 |
-
<div class="bws_info" style="line-height: 2;"><?php
|
42 |
-
<?php
|
|
|
43 |
<textarea disabled></textarea>
|
44 |
-
<div class="bws_info" style="line-height: 2;"><?php
|
45 |
-
|
|
|
46 |
}
|
47 |
|
48 |
if ( ! function_exists( 'gglcptch_supported_plugins_banner' ) ) {
|
49 |
function gglcptch_supported_plugins_banner() {
|
50 |
-
$pro_forms
|
51 |
-
'cf7'
|
52 |
-
'si_contact_form'
|
53 |
-
'jetpack_contact_form'
|
54 |
-
'sbscrbr'
|
55 |
-
'mailchimp'
|
56 |
-
'bbpress_new_topic_form'
|
57 |
-
'bbpress_reply_form'
|
58 |
-
'buddypress_register'
|
59 |
-
'buddypress_comments'
|
60 |
-
'buddypress_group'
|
61 |
-
'woocommerce_login'
|
62 |
-
'woocommerce_register'
|
63 |
-
'woocommerce_lost_password'
|
64 |
-
'woocommerce_checkout'
|
65 |
-
'wpforo_login_form'
|
66 |
-
'wpforo_register_form'
|
67 |
-
'wpforo_new_topic_form'
|
68 |
-
'wpforo_reply_form'
|
69 |
-
|
70 |
-
'divi_contact_form'
|
71 |
-
'divi_login'
|
72 |
-
'gravity_forms'
|
73 |
-
'wpforms'
|
74 |
-
'ultimate_member_login'
|
75 |
-
'ultimate_member_register'
|
76 |
-
'ultimate_member_profile'
|
77 |
-
'caldera_forms'
|
78 |
-
'elementor_contact_form'
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
);
|
80 |
$pro_sections = array(
|
81 |
-
'external'
|
82 |
-
'name'
|
83 |
'forms' => array(
|
84 |
-
'cf7',
|
85 |
'gravity_forms',
|
86 |
-
'
|
87 |
'jetpack_contact_form',
|
88 |
-
'sbscrbr',
|
89 |
'mailchimp',
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
|
|
|
|
95 |
),
|
96 |
-
'woocommerce'
|
97 |
-
'name'
|
98 |
'forms' => array(
|
99 |
'woocommerce_login',
|
100 |
'woocommerce_register',
|
101 |
'woocommerce_lost_password',
|
102 |
-
'woocommerce_checkout'
|
103 |
-
)
|
104 |
),
|
105 |
-
'buddypress'
|
106 |
-
'name'
|
107 |
'forms' => array(
|
108 |
'buddypress_register',
|
109 |
'buddypress_comments',
|
110 |
-
'buddypress_group'
|
111 |
-
)
|
112 |
),
|
113 |
-
'divi'
|
114 |
-
'name'
|
115 |
'forms' => array(
|
116 |
'divi_contact_form',
|
117 |
'divi_login',
|
118 |
-
)
|
119 |
),
|
120 |
-
'bbpress'
|
121 |
-
'name'
|
122 |
'forms' => array(
|
123 |
'bbpress_new_topic_form',
|
124 |
-
'bbpress_reply_form'
|
125 |
-
)
|
126 |
),
|
127 |
-
'wpforo'
|
128 |
-
'name'
|
129 |
'forms' => array(
|
130 |
'wpforo_login_form',
|
131 |
'wpforo_register_form',
|
132 |
'wpforo_new_topic_form',
|
133 |
-
'wpforo_reply_form'
|
134 |
-
)
|
135 |
),
|
136 |
'ultimate_member' => array(
|
137 |
-
'name'
|
138 |
'forms' => array(
|
139 |
'ultimate_member_login',
|
140 |
'ultimate_member_register',
|
141 |
-
'ultimate_member_profile'
|
142 |
-
)
|
143 |
-
)
|
144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
<table class="form-table bws_pro_version" style="margin-right: 10px; width: calc( 100% - 10px );">
|
146 |
<tbody style="display: table-row-group;">
|
147 |
<tr valign="top">
|
148 |
<th scope="row"></th>
|
149 |
<td style="padding-top: 30px;">
|
150 |
-
<?php
|
|
|
151 |
|
152 |
if ( empty( $section['name'] ) || empty( $section['forms'] ) || ! is_array( $section['forms'] ) ) {
|
153 |
continue;
|
154 |
-
}
|
|
|
155 |
<!--[if !IE]> -->
|
156 |
<div class="gglcptch-settings-accordion">
|
157 |
<!-- <![endif]-->
|
158 |
<p class="gglcptch_section_header">
|
159 |
-
<i><?php echo $section['name']; ?></i><br />
|
160 |
</p>
|
161 |
<fieldset class="gglcptch_section_forms">
|
162 |
<?php foreach ( $section['forms'] as $form_slug ) { ?>
|
163 |
<label>
|
164 |
-
<input type="checkbox"<?php disabled( true ); ?> /> <?php echo $pro_forms[ $form_slug ]['form_name']; ?>
|
165 |
</label>
|
166 |
<br />
|
167 |
<?php } ?>
|
@@ -175,14 +210,16 @@ if ( ! function_exists( 'gglcptch_supported_plugins_banner' ) ) {
|
|
175 |
</tr>
|
176 |
</tbody>
|
177 |
</table>
|
178 |
-
|
|
|
179 |
}
|
180 |
|
181 |
if ( ! function_exists( 'gglcptch_additional_settings_banner_general' ) ) {
|
182 |
-
function gglcptch_additional_settings_banner_general() {
|
|
|
183 |
<table class="form-table bws_pro_version">
|
184 |
<tr valign="top">
|
185 |
-
<th scope="row"><?php
|
186 |
<td>
|
187 |
<select disabled="disabled">
|
188 |
<option selected="selected">English</option>
|
@@ -190,30 +227,53 @@ if ( ! function_exists( 'gglcptch_additional_settings_banner_general' ) ) {
|
|
190 |
</td>
|
191 |
</tr>
|
192 |
<tr valign="top">
|
193 |
-
<th scope="row"><?php
|
194 |
<td>
|
195 |
<input disabled="disabled" type="checkbox" />
|
196 |
-
<span class="bws_info"><?php
|
197 |
</td>
|
198 |
</tr>
|
199 |
</table>
|
200 |
-
|
|
|
201 |
}
|
202 |
|
203 |
if ( ! function_exists( 'gglcptch_additional_settings_banner_appearance' ) ) {
|
204 |
-
function gglcptch_additional_settings_banner_appearance() {
|
|
|
205 |
<table class="form-table bws_pro_version">
|
206 |
-
<tr class="
|
207 |
<th scope="row">
|
208 |
-
<?php
|
209 |
</th>
|
210 |
<td>
|
211 |
<fieldset>
|
212 |
-
<label><input disabled="disabled" type="radio" checked><?php
|
213 |
-
<label><input disabled="disabled" type="radio"><?php
|
214 |
</fieldset>
|
215 |
</td>
|
216 |
</tr>
|
217 |
</table>
|
218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
* Display banners on settings page
|
4 |
+
*
|
5 |
* @package reCaptcha by BestWebSoft
|
6 |
* @since 1.27
|
7 |
*/
|
8 |
|
9 |
/**
|
10 |
* Show ads for PRO
|
11 |
+
*
|
12 |
+
* @param string $func function to call
|
13 |
+
* @return void
|
14 |
*/
|
15 |
if ( ! function_exists( 'gglcptch_pro_block' ) ) {
|
16 |
function gglcptch_pro_block( $func, $show_cross = true, $display_always = false ) {
|
17 |
global $gglcptch_plugin_info, $wp_version, $gglcptch_options;
|
18 |
if ( $display_always || ! bws_hide_premium_options_check( $gglcptch_options ) ) { ?>
|
19 |
+
<div class="bws_pro_version_bloc gglcptch_pro_block <?php echo esc_attr( $func ); ?>" title="<?php esc_html_e( 'This options is available in Pro version of plugin', 'google-captcha' ); ?>">
|
20 |
<div class="bws_pro_version_table_bloc">
|
21 |
<?php if ( $show_cross ) { ?>
|
22 |
+
<button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php esc_html_e( 'Close', 'google-captcha' ); ?>" value="1"></button>
|
23 |
<?php } ?>
|
24 |
<div class="bws_table_bg"></div>
|
25 |
<div class="bws_pro_version">
|
27 |
</div>
|
28 |
</div>
|
29 |
<div class="bws_pro_version_tooltip">
|
30 |
+
<a class="bws_button" href="https://bestwebsoft.com/products/wordpress/plugins/google-captcha/?k=b850d949ccc1239cab0da315c3c822ab&pn=109&v=<?php echo esc_attr( $gglcptch_plugin_info['Version'] ); ?>&wp_v=<?php echo esc_attr( $wp_version ); ?>" target="_blank" title="reCaptcha Pro">
|
31 |
+
<?php esc_html_e( 'Upgrade to Pro', 'google-captcha' ); ?>
|
32 |
</a>
|
33 |
<div class="clear"></div>
|
34 |
</div>
|
35 |
</div>
|
36 |
+
<?php
|
37 |
+
}
|
38 |
}
|
39 |
}
|
40 |
|
41 |
if ( ! function_exists( 'gglcptch_allowlist_banner' ) ) {
|
42 |
+
function gglcptch_allowlist_banner() {
|
43 |
+
?>
|
44 |
+
<div class="bws_info" style="line-height: 2;"><?php esc_html_e( 'Allowed formats', 'google-captcha' ); ?>: <code>192.168.0.1, 192.168.0., 192.168., 192., 192.168.0.1/8, 123.126.12.243-185.239.34.54</code></div>
|
45 |
+
<div class="bws_info" style="line-height: 2;"><?php esc_html_e( 'Allowed separators for IPs: a comma', 'google-captcha' ); ?> (<code>,</code>), <?php esc_html_e( 'semicolon', 'google-captcha' ); ?> (<code>;</code>), <?php esc_html_e( 'ordinary space, tab, new line or carriage return.', 'google-captcha' ); ?></div>
|
46 |
+
<?php esc_html_e( 'Reason', 'google-captcha' ); ?><br>
|
47 |
<textarea disabled></textarea>
|
48 |
+
<div class="bws_info" style="line-height: 2;"><?php esc_html_e( 'Allowed separators for reasons: a comma', 'google-captcha' ); ?> (<code>,</code>), <?php esc_html_e( 'semicolon', 'google-captcha' ); ?> (<code>;</code>), <?php esc_html_e( 'tab, new line or carriage return.', 'google-captcha' ); ?></div>
|
49 |
+
<?php
|
50 |
+
}
|
51 |
}
|
52 |
|
53 |
if ( ! function_exists( 'gglcptch_supported_plugins_banner' ) ) {
|
54 |
function gglcptch_supported_plugins_banner() {
|
55 |
+
$pro_forms = array(
|
56 |
+
'cf7' => array( 'form_name' => 'Contact Form 7' ),
|
57 |
+
'si_contact_form' => array( 'form_name' => 'Fast Secure Contact Form' ),
|
58 |
+
'jetpack_contact_form' => array( 'form_name' => __( 'Jetpack Contact Form', 'google-captcha' ) ),
|
59 |
+
'sbscrbr' => array( 'form_name' => 'Subscriber' ),
|
60 |
+
'mailchimp' => array( 'form_name' => 'MailChimp for Wordpress' ),
|
61 |
+
'bbpress_new_topic_form' => array( 'form_name' => __( 'bbPress New Topic form', 'google-captcha' ) ),
|
62 |
+
'bbpress_reply_form' => array( 'form_name' => __( 'bbPress Reply form', 'google-captcha' ) ),
|
63 |
+
'buddypress_register' => array( 'form_name' => __( 'BuddyPress Registration form', 'google-captcha' ) ),
|
64 |
+
'buddypress_comments' => array( 'form_name' => __( 'BuddyPress Comments form', 'google-captcha' ) ),
|
65 |
+
'buddypress_group' => array( 'form_name' => __( 'BuddyPress Add New Group form', 'google-captcha' ) ),
|
66 |
+
'woocommerce_login' => array( 'form_name' => __( 'WooCommerce Login form', 'google-captcha' ) ),
|
67 |
+
'woocommerce_register' => array( 'form_name' => __( 'WooCommerce Registration form', 'google-captcha' ) ),
|
68 |
+
'woocommerce_lost_password' => array( 'form_name' => __( 'WooCommerce Reset password form', 'google-captcha' ) ),
|
69 |
+
'woocommerce_checkout' => array( 'form_name' => __( 'WooCommerce Checkout form', 'google-captcha' ) ),
|
70 |
+
'wpforo_login_form' => array( 'form_name' => __( 'wpForo Login form', 'google-captcha' ) ),
|
71 |
+
'wpforo_register_form' => array( 'form_name' => __( 'wpForo Registration form', 'google-captcha' ) ),
|
72 |
+
'wpforo_new_topic_form' => array( 'form_name' => __( 'wpForo New Topic form', 'google-captcha' ) ),
|
73 |
+
'wpforo_reply_form' => array( 'form_name' => __( 'wpForo Reply form', 'google-captcha' ) ),
|
74 |
+
'ninja_form' => array( 'form_name' => __( 'Ninja Forms', 'google-captcha' ) ),
|
75 |
+
'divi_contact_form' => array( 'form_name' => __( 'Divi Contact Form', 'google-captcha' ) ),
|
76 |
+
'divi_login' => array( 'form_name' => __( 'Divi Login Form', 'google-captcha' ) ),
|
77 |
+
'gravity_forms' => array( 'form_name' => __( 'Gravity Forms', 'google-captcha' ) ),
|
78 |
+
'wpforms' => array( 'form_name' => __( 'WPForms', 'google-captcha' ) ),
|
79 |
+
'ultimate_member_login' => array( 'form_name' => __( 'Ultimate Member Login form', 'google-captcha' ) ),
|
80 |
+
'ultimate_member_register' => array( 'form_name' => __( 'Ultimate Member Registration form', 'google-captcha' ) ),
|
81 |
+
'ultimate_member_profile' => array( 'form_name' => __( 'Ultimate Member Profile form', 'google-captcha' ) ),
|
82 |
+
'caldera_forms' => array( 'form_name' => 'Caldera Forms' ),
|
83 |
+
'elementor_contact_form' => array( 'form_name' => __( 'Elementor Contact Form', 'google-captcha' ) ),
|
84 |
+
'memberpress_checkout' => array( 'form_name' => __( 'MemberPress checkout form', 'google-captcha' ) ),
|
85 |
+
'memberpress_login' => array( 'form_name' => __( 'MemberPress login form', 'google-captcha' ) ),
|
86 |
+
'memberpress_forgot_password' => array( 'form_name' => __( 'MemberPress forgot password form', 'google-captcha' ) ),
|
87 |
+
'learndash_login_form' => array( 'form_name' => __( 'LearnDash login form', 'google-captcha' ) ),
|
88 |
+
'learndash_registration_form' => array( 'form_name' => __( 'LearnDash registration form', 'google-captcha' ) ),
|
89 |
+
'bboss_registration_form' => array( 'form_name' => __( 'BuddyBoss registration form', 'google-captcha' ) ),
|
90 |
);
|
91 |
$pro_sections = array(
|
92 |
+
'external' => array(
|
93 |
+
'name' => __( 'External Plugins', 'google-captcha' ),
|
94 |
'forms' => array(
|
|
|
95 |
'gravity_forms',
|
96 |
+
'ninja_form',
|
97 |
'jetpack_contact_form',
|
|
|
98 |
'mailchimp',
|
99 |
+
'sbscrbr',
|
100 |
+
'wpforms',
|
101 |
+
'cf7',
|
102 |
+
'si_contact_form',
|
103 |
+
'caldera_forms',
|
104 |
+
'elementor_contact_form',
|
105 |
+
),
|
106 |
),
|
107 |
+
'woocommerce' => array(
|
108 |
+
'name' => 'WooCommerce',
|
109 |
'forms' => array(
|
110 |
'woocommerce_login',
|
111 |
'woocommerce_register',
|
112 |
'woocommerce_lost_password',
|
113 |
+
'woocommerce_checkout',
|
114 |
+
),
|
115 |
),
|
116 |
+
'buddypress' => array(
|
117 |
+
'name' => 'BuddyPress',
|
118 |
'forms' => array(
|
119 |
'buddypress_register',
|
120 |
'buddypress_comments',
|
121 |
+
'buddypress_group',
|
122 |
+
),
|
123 |
),
|
124 |
+
'divi' => array(
|
125 |
+
'name' => 'Divi',
|
126 |
'forms' => array(
|
127 |
'divi_contact_form',
|
128 |
'divi_login',
|
129 |
+
),
|
130 |
),
|
131 |
+
'bbpress' => array(
|
132 |
+
'name' => 'bbPress',
|
133 |
'forms' => array(
|
134 |
'bbpress_new_topic_form',
|
135 |
+
'bbpress_reply_form',
|
136 |
+
),
|
137 |
),
|
138 |
+
'wpforo' => array(
|
139 |
+
'name' => 'Forums - wpForo',
|
140 |
'forms' => array(
|
141 |
'wpforo_login_form',
|
142 |
'wpforo_register_form',
|
143 |
'wpforo_new_topic_form',
|
144 |
+
'wpforo_reply_form',
|
145 |
+
),
|
146 |
),
|
147 |
'ultimate_member' => array(
|
148 |
+
'name' => 'Ultimate Member',
|
149 |
'forms' => array(
|
150 |
'ultimate_member_login',
|
151 |
'ultimate_member_register',
|
152 |
+
'ultimate_member_profile',
|
153 |
+
),
|
154 |
+
),
|
155 |
+
'memberpress' => array(
|
156 |
+
'name' => 'MemberPress',
|
157 |
+
'forms' => array(
|
158 |
+
'memberpress_checkout',
|
159 |
+
'memberpress_login',
|
160 |
+
'memberpress_forgot_password',
|
161 |
+
),
|
162 |
+
),
|
163 |
+
'learndash' => array(
|
164 |
+
'name' => 'LearnDash',
|
165 |
+
'forms' => array(
|
166 |
+
'learndash_login_form',
|
167 |
+
'learndash_registration_form',
|
168 |
+
),
|
169 |
+
),
|
170 |
+
'buddyboss' => array(
|
171 |
+
'name' => 'BuddyBoss',
|
172 |
+
'forms' => array(
|
173 |
+
'bboss_registration_form',
|
174 |
+
),
|
175 |
+
),
|
176 |
+
);
|
177 |
+
?>
|
178 |
<table class="form-table bws_pro_version" style="margin-right: 10px; width: calc( 100% - 10px );">
|
179 |
<tbody style="display: table-row-group;">
|
180 |
<tr valign="top">
|
181 |
<th scope="row"></th>
|
182 |
<td style="padding-top: 30px;">
|
183 |
+
<?php
|
184 |
+
foreach ( $pro_sections as $section_slug => $section ) {
|
185 |
|
186 |
if ( empty( $section['name'] ) || empty( $section['forms'] ) || ! is_array( $section['forms'] ) ) {
|
187 |
continue;
|
188 |
+
}
|
189 |
+
?>
|
190 |
<!--[if !IE]> -->
|
191 |
<div class="gglcptch-settings-accordion">
|
192 |
<!-- <![endif]-->
|
193 |
<p class="gglcptch_section_header">
|
194 |
+
<i><?php echo esc_html( $section['name'] ); ?></i><br />
|
195 |
</p>
|
196 |
<fieldset class="gglcptch_section_forms">
|
197 |
<?php foreach ( $section['forms'] as $form_slug ) { ?>
|
198 |
<label>
|
199 |
+
<input type="checkbox" <?php disabled( true ); ?> /> <?php echo esc_html( $pro_forms[ $form_slug ]['form_name'] ); ?>
|
200 |
</label>
|
201 |
<br />
|
202 |
<?php } ?>
|
210 |
</tr>
|
211 |
</tbody>
|
212 |
</table>
|
213 |
+
<?php
|
214 |
+
}
|
215 |
}
|
216 |
|
217 |
if ( ! function_exists( 'gglcptch_additional_settings_banner_general' ) ) {
|
218 |
+
function gglcptch_additional_settings_banner_general() {
|
219 |
+
?>
|
220 |
<table class="form-table bws_pro_version">
|
221 |
<tr valign="top">
|
222 |
+
<th scope="row"><?php esc_html_e( 'Language', 'google-captcha' ); ?></th>
|
223 |
<td>
|
224 |
<select disabled="disabled">
|
225 |
<option selected="selected">English</option>
|
227 |
</td>
|
228 |
</tr>
|
229 |
<tr valign="top">
|
230 |
+
<th scope="row"><?php esc_html_e( 'Multilanguage', 'google-captcha' ); ?></th>
|
231 |
<td>
|
232 |
<input disabled="disabled" type="checkbox" />
|
233 |
+
<span class="bws_info"><?php esc_html_e( 'Enable to switch language automatically on multilingual website using the Multilanguage plugin.', 'google-captcha' ); ?></span>
|
234 |
</td>
|
235 |
</tr>
|
236 |
</table>
|
237 |
+
<?php
|
238 |
+
}
|
239 |
}
|
240 |
|
241 |
if ( ! function_exists( 'gglcptch_additional_settings_banner_appearance' ) ) {
|
242 |
+
function gglcptch_additional_settings_banner_appearance() {
|
243 |
+
?>
|
244 |
<table class="form-table bws_pro_version">
|
245 |
+
<tr class="" valign="top">
|
246 |
<th scope="row">
|
247 |
+
<?php esc_html_e( 'Size', 'google-captcha' ); ?>
|
248 |
</th>
|
249 |
<td>
|
250 |
<fieldset>
|
251 |
+
<label><input disabled="disabled" type="radio" checked><?php esc_html_e( 'Normal', 'google-captcha' ); ?></label><br />
|
252 |
+
<label><input disabled="disabled" type="radio"><?php esc_html_e( 'Compact', 'google-captcha' ); ?></label>
|
253 |
</fieldset>
|
254 |
</td>
|
255 |
</tr>
|
256 |
</table>
|
257 |
+
<?php
|
258 |
+
}
|
259 |
+
}
|
260 |
+
|
261 |
+
if ( ! function_exists( 'gglcptch_additional_settings_banner_display' ) ) {
|
262 |
+
function gglcptch_additional_settings_banner_display() {
|
263 |
+
?>
|
264 |
+
<table class="form-table bws_pro_version">
|
265 |
+
<tr class="gglcptch_score_v3" valign="top">
|
266 |
+
<th scope="row">
|
267 |
+
<?php esc_html_e( 'Display for', 'google-captcha' ); ?>
|
268 |
+
</th>
|
269 |
+
<td>
|
270 |
+
<fieldset>
|
271 |
+
<label><input disabled="disabled" type="radio" checked><?php esc_html_e( 'Only form', 'google-captcha' ); ?></label><br />
|
272 |
+
<label><input disabled="disabled" type="radio"><?php esc_html_e( 'All pages', 'google-captcha' ); ?></label>
|
273 |
+
</fieldset>
|
274 |
+
</td>
|
275 |
+
</tr>
|
276 |
+
</table>
|
277 |
+
<?php
|
278 |
+
}
|
279 |
}
|
js/script.js
CHANGED
@@ -106,6 +106,14 @@
|
|
106 |
// add attribute disable to the submit
|
107 |
if ( 'v2' === gglcptch.options.version && gglcptch.options.disable ) {
|
108 |
$( '#' + container ).closest( 'form' ).find( 'input:submit, button' ).prop( 'disabled', true );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
}
|
110 |
|
111 |
function storeEvents( el ) {
|
106 |
// add attribute disable to the submit
|
107 |
if ( 'v2' === gglcptch.options.version && gglcptch.options.disable ) {
|
108 |
$( '#' + container ).closest( 'form' ).find( 'input:submit, button' ).prop( 'disabled', true );
|
109 |
+
if ( 'setupform' === $( '#' + container ).closest( 'form' ).attr( 'id' ) ) {
|
110 |
+
setTimeout(
|
111 |
+
function(){
|
112 |
+
$( '#' + container ).closest( 'form' ).find( 'input:submit, button' ).prop( 'disabled', true );
|
113 |
+
},
|
114 |
+
200
|
115 |
+
);
|
116 |
+
}
|
117 |
}
|
118 |
|
119 |
function storeEvents( el ) {
|
languages/google-captcha-ru_RU.mo
CHANGED
Binary file
|
languages/google-captcha-ru_RU.po
CHANGED
@@ -2,7 +2,7 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: reCaptcha\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2022-
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: bestwebsoft.com <plugin@bestwebsoft.com>\n"
|
8 |
"Language-Team: the BestWebSoft Team <plugin@bestwebsoft.com>\n"
|
@@ -15,21 +15,20 @@ msgstr ""
|
|
15 |
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
17 |
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
-
"X-Generator: Poedit 3.
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
20 |
"X-Poedit-SearchPathExcluded-0: bws_menu\n"
|
21 |
|
22 |
-
#: google-captcha.php:39 google-captcha.php:49 google-captcha.php:
|
23 |
-
#: includes/class-gglcptch-settings-tabs.php:147
|
24 |
msgid "reCaptcha Settings"
|
25 |
msgstr "Настройки reCaptcha"
|
26 |
|
27 |
-
#: google-captcha.php:50 google-captcha.php:
|
28 |
#: includes/class-gglcptch-settings-tabs.php:22
|
29 |
msgid "Settings"
|
30 |
msgstr "Настройки"
|
31 |
|
32 |
-
#: google-captcha.php:58
|
33 |
msgid "reCaptcha Allow List"
|
34 |
msgstr "Белый cписок reCaptcha"
|
35 |
|
@@ -37,7 +36,7 @@ msgstr "Белый cписок reCaptcha"
|
|
37 |
msgid "Allow List"
|
38 |
msgstr "Доступные диапазоны"
|
39 |
|
40 |
-
#: google-captcha.php:76
|
41 |
msgid "Upgrade to Pro"
|
42 |
msgstr "Обновить до Pro"
|
43 |
|
@@ -57,87 +56,87 @@ msgstr ""
|
|
57 |
msgid "Warning"
|
58 |
msgstr "Внимание"
|
59 |
|
60 |
-
#: google-captcha.php:
|
61 |
msgid "You are in the allow list"
|
62 |
msgstr "Вы в белом списке"
|
63 |
|
64 |
-
#: google-captcha.php:
|
65 |
msgid "Please enable JavaScript in your browser."
|
66 |
msgstr "Пожалуйста, включите поддержку JavaScript в вашем браузере."
|
67 |
|
68 |
-
#: google-captcha.php:
|
69 |
msgid "This site is protected by reCAPTCHA and the Google "
|
70 |
msgstr "Этот сайт защищен reCAPTCHA и применяются "
|
71 |
|
72 |
-
#: google-captcha.php:
|
73 |
msgid "Privacy Policy"
|
74 |
msgstr "Политика конфиденциальности"
|
75 |
|
76 |
-
#: google-captcha.php:
|
77 |
msgid " and "
|
78 |
msgstr " и "
|
79 |
|
80 |
-
#: google-captcha.php:
|
81 |
msgid "Terms of Service"
|
82 |
msgstr "Условия обслуживания"
|
83 |
|
84 |
-
#: google-captcha.php:
|
85 |
msgid " apply."
|
86 |
msgstr " Google."
|
87 |
|
88 |
-
#: google-captcha.php:
|
89 |
msgid "To use reCaptcha you must get the keys from"
|
90 |
msgstr "Чтобы использовать reCaptcha, вам необходимо получить ключи"
|
91 |
|
92 |
-
#: google-captcha.php:
|
93 |
msgid "here"
|
94 |
msgstr "здесь"
|
95 |
|
96 |
-
#: google-captcha.php:
|
97 |
msgid "and enter them on the"
|
98 |
msgstr "и вставить их на"
|
99 |
|
100 |
-
#: google-captcha.php:
|
101 |
msgid "plugin setting page"
|
102 |
msgstr "странице настроек плагина"
|
103 |
|
104 |
-
#: google-captcha.php:
|
105 |
msgid "Response is empty"
|
106 |
msgstr "Ответ отсутствует"
|
107 |
|
108 |
-
#: google-captcha.php:
|
109 |
msgid "Error"
|
110 |
msgstr "Ошибка"
|
111 |
|
112 |
-
#: google-captcha.php:
|
113 |
-
msgid "
|
114 |
-
msgstr "
|
115 |
|
116 |
-
#: google-captcha.php:
|
117 |
msgid "Secret Key is missing."
|
118 |
msgstr "Секретный ключ отсутствует."
|
119 |
|
120 |
-
#: google-captcha.php:
|
121 |
msgid "Secret Key is invalid."
|
122 |
msgstr "Некорректный секретный ключ."
|
123 |
|
124 |
-
#: google-captcha.php:
|
125 |
msgid "Check your domain configurations"
|
126 |
msgstr "Проверьте настройки вашего домена"
|
127 |
|
128 |
-
#: google-captcha.php:
|
129 |
msgid "and enter it again"
|
130 |
msgstr "и введите его снова"
|
131 |
|
132 |
-
#: google-captcha.php:
|
133 |
msgid "User response is invalid"
|
134 |
msgstr "Некорректный ответ пользователя"
|
135 |
|
136 |
-
#: google-captcha.php:
|
137 |
msgid "You have entered an incorrect reCAPTCHA value."
|
138 |
msgstr "Ошибка: Вы ввели неверное значение reCAPTCHA."
|
139 |
|
140 |
-
#: google-captcha.php:
|
141 |
msgid ""
|
142 |
"More than one reCAPTCHA has been found in the current form. Please remove "
|
143 |
"all unnecessary reCAPTCHA fields to make it work properly."
|
@@ -145,113 +144,89 @@ msgstr ""
|
|
145 |
"В текущей форме найдено более одного блока reCAPTCHA. Пожалуйста, удалите "
|
146 |
"все лишние блоки reCAPTCHA для дальнейшей корректной работы."
|
147 |
|
148 |
-
#: google-captcha.php:
|
149 |
msgid "reCaptcha v3 test failed"
|
150 |
msgstr "Тест reCaptcha v3 не пройден"
|
151 |
|
152 |
-
#: google-captcha.php:
|
153 |
msgid "Please submit \"Test verification\""
|
154 |
msgstr "Пожалуйста, нажмите кнопку \"Тестирование проверки\"."
|
155 |
|
156 |
-
#: google-captcha.php:
|
157 |
msgid "Please complete the captcha and submit \"Test verification\""
|
158 |
msgstr ""
|
159 |
"Пожалуйста, заполните капчу и нажмите кнопку \"Тестирование проверки\"."
|
160 |
|
161 |
-
#: google-captcha.php:
|
162 |
msgid "Test verification"
|
163 |
msgstr "Тестирование проверки"
|
164 |
|
165 |
-
#: google-captcha.php:
|
166 |
msgid "The verification is successfully completed."
|
167 |
msgstr "Тестирование проверки успешно завершено."
|
168 |
|
169 |
-
#: google-captcha.php:
|
170 |
msgid "FAQ"
|
171 |
msgstr "FAQ"
|
172 |
|
173 |
-
#: google-captcha.php:
|
174 |
msgid "Support"
|
175 |
msgstr "Поддержка"
|
176 |
|
177 |
-
#: includes/allowlist.php:
|
178 |
-
msgid "Add New"
|
179 |
-
msgstr "Добавить"
|
180 |
-
|
181 |
-
#: includes/allowlist.php:74
|
182 |
-
msgid "IP to Allow List"
|
183 |
-
msgstr "IP в белый список"
|
184 |
-
|
185 |
-
#: includes/allowlist.php:81
|
186 |
-
msgid "My IP"
|
187 |
-
msgstr "Мой IP"
|
188 |
-
|
189 |
-
#: includes/allowlist.php:86 includes/pro_banners.php:40
|
190 |
-
msgid "Allowed formats"
|
191 |
-
msgstr "Доступные форматы"
|
192 |
-
|
193 |
-
#: includes/allowlist.php:88
|
194 |
-
msgid "Allowed diapason"
|
195 |
-
msgstr "Доступные диапазоны"
|
196 |
-
|
197 |
-
#: includes/allowlist.php:101
|
198 |
-
msgid "Add IP to Allow List"
|
199 |
-
msgstr "Добавить IP в белый список"
|
200 |
-
|
201 |
-
#: includes/allowlist.php:106
|
202 |
msgid "Search IP"
|
203 |
msgstr "Искать IP"
|
204 |
|
205 |
-
#: includes/allowlist.php:
|
206 |
msgid "Nothing found"
|
207 |
msgstr "Ничего не найдено"
|
208 |
|
209 |
-
#: includes/allowlist.php:
|
210 |
msgid "No IP in the Allow List"
|
211 |
msgstr "Список IP пуст"
|
212 |
|
213 |
-
#: includes/allowlist.php:
|
214 |
msgid "IP Address"
|
215 |
msgstr "IP Адресс"
|
216 |
|
217 |
-
#: includes/allowlist.php:
|
218 |
msgid "Date Added"
|
219 |
msgstr "Дата добавления"
|
220 |
|
221 |
-
#: includes/allowlist.php:
|
222 |
msgid "Delete"
|
223 |
msgstr "Удалить"
|
224 |
|
225 |
-
#: includes/allowlist.php:
|
226 |
msgid "IP added to the allow list successfully."
|
227 |
msgstr "IP адрес успешно добавлен в белый список."
|
228 |
|
229 |
-
#: includes/allowlist.php:
|
230 |
-
#: includes/allowlist.php:
|
231 |
msgid "Some errors occurred."
|
232 |
msgstr "Возникли некоторые ошибки."
|
233 |
|
234 |
-
#: includes/allowlist.php:
|
235 |
msgid "IP is already in the allow list."
|
236 |
msgstr "IP адрес уже в белом списке."
|
237 |
|
238 |
-
#: includes/allowlist.php:
|
239 |
msgid "Invalid IP. See allowed formats."
|
240 |
msgstr "Неверный IP. Смотите доступные форматы."
|
241 |
|
242 |
-
#: includes/allowlist.php:
|
243 |
msgid "One IP was deleted successfully."
|
244 |
msgstr "Один IP адрес был успешно удален."
|
245 |
|
246 |
-
#: includes/allowlist.php:
|
247 |
msgid "You have not entered any IP."
|
248 |
msgstr "Вы не ввели ни одного IP адреса."
|
249 |
|
250 |
-
#: includes/allowlist.php:
|
251 |
msgid "You have not entered any IP in to the search form."
|
252 |
msgstr "Вы не ввели значения в форму поиска."
|
253 |
|
254 |
-
#: includes/allowlist.php:
|
255 |
msgid "Search results for"
|
256 |
msgstr "Результаты поиска для"
|
257 |
|
@@ -263,394 +238,399 @@ msgstr "Разное"
|
|
263 |
msgid "Custom Code"
|
264 |
msgstr "Пользовательский код"
|
265 |
|
266 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
267 |
msgid "License Key"
|
268 |
msgstr "Лицензионный ключ"
|
269 |
|
270 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
271 |
msgid "Site Key"
|
272 |
msgstr "Ключ сайта"
|
273 |
|
274 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
275 |
msgid "Secret Key"
|
276 |
msgstr "Секретный ключ"
|
277 |
|
278 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
279 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
280 |
msgid "Version"
|
281 |
msgstr "Версия"
|
282 |
|
283 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
284 |
msgid "Invisible"
|
285 |
msgstr "Невидимая"
|
286 |
|
287 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
288 |
msgid "Enter site key"
|
289 |
msgstr "Введите ключ сайта"
|
290 |
|
291 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
292 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
293 |
msgid "WARNING: The captcha will not be displayed until you fill key fields."
|
294 |
msgstr ""
|
295 |
"ПРЕДУПРЕЖДЕНИЕ: Google Captcha не будет отображаться пока вы не заполните "
|
296 |
"поля с ключами."
|
297 |
|
298 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
299 |
msgid "Enter secret key"
|
300 |
msgstr "Введите секретный ключ"
|
301 |
|
302 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
303 |
msgid "Settings saved."
|
304 |
msgstr "Настройки сохранены."
|
305 |
|
306 |
-
#: includes/
|
307 |
-
msgid "General"
|
308 |
-
msgstr "Общее"
|
309 |
-
|
310 |
-
#: includes/class-gglcptch-settings-tabs.php:153
|
311 |
-
msgid "reCaptcha Version"
|
312 |
-
msgstr "Версия reCaptcha"
|
313 |
-
|
314 |
-
#: includes/class-gglcptch-settings-tabs.php:167
|
315 |
-
#, php-format
|
316 |
-
msgid ""
|
317 |
-
"Register your domain name with Google reCaptcha service and add the keys to "
|
318 |
-
"the fields below. %s Get the API Keys. %s"
|
319 |
-
msgstr ""
|
320 |
-
"Зарегистрируйте свой сайт с помощью Google, чтобы получить требуемые API "
|
321 |
-
"ключи и введите их ниже. %s Получить API ключи. %s"
|
322 |
-
|
323 |
-
#: includes/class-gglcptch-settings-tabs.php:171
|
324 |
-
#, php-format
|
325 |
-
msgid ""
|
326 |
-
"If you do not want to create API keys use %s Captcha by BestWebSoft %s "
|
327 |
-
"plugin."
|
328 |
-
msgstr ""
|
329 |
-
"Если вы не хотите создавать API ключи используйте %s Captcha by BestWebSoft "
|
330 |
-
"%s плагин."
|
331 |
-
|
332 |
-
#: includes/class-gglcptch-settings-tabs.php:189
|
333 |
-
msgid "Test reCaptcha"
|
334 |
-
msgstr "Тестировать reCaptcha"
|
335 |
-
|
336 |
-
#: includes/class-gglcptch-settings-tabs.php:195
|
337 |
-
msgid "Enable reCaptcha for"
|
338 |
-
msgstr "Включить reCaptcha для"
|
339 |
-
|
340 |
-
#: includes/class-gglcptch-settings-tabs.php:242
|
341 |
-
#: includes/class-gglcptch-settings-tabs.php:270
|
342 |
-
#: includes/class-gglcptch-settings-tabs.php:297 includes/pro_banners.php:20
|
343 |
-
msgid "Close"
|
344 |
-
msgstr "Закрыть"
|
345 |
-
|
346 |
-
#: includes/class-gglcptch-settings-tabs.php:253
|
347 |
-
msgid "reCaptcha Domain"
|
348 |
-
msgstr "Домен reCaptcha"
|
349 |
-
|
350 |
-
#: includes/class-gglcptch-settings-tabs.php:261
|
351 |
-
msgid ""
|
352 |
-
"If Google is not accessible or blocked in your country select other one."
|
353 |
-
msgstr ""
|
354 |
-
"Если Google недоступен или заблокирован в вашей стране выберите другой пункт."
|
355 |
-
|
356 |
-
#: includes/class-gglcptch-settings-tabs.php:279
|
357 |
-
msgid "Appearance"
|
358 |
-
msgstr "Внешний Вид"
|
359 |
-
|
360 |
-
#: includes/class-gglcptch-settings-tabs.php:283
|
361 |
-
msgid "Theme"
|
362 |
-
msgstr "Тема"
|
363 |
-
|
364 |
-
#: includes/class-gglcptch-settings-tabs.php:287
|
365 |
-
msgid "Light"
|
366 |
-
msgstr "Светлая"
|
367 |
-
|
368 |
-
#: includes/class-gglcptch-settings-tabs.php:288
|
369 |
-
msgid "Dark"
|
370 |
-
msgstr "Тёмная"
|
371 |
-
|
372 |
-
#: includes/class-gglcptch-settings-tabs.php:308
|
373 |
-
msgid "Hide reCaptcha Badge"
|
374 |
-
msgstr "Спрятать значок reCaptcha"
|
375 |
-
|
376 |
-
#: includes/class-gglcptch-settings-tabs.php:313
|
377 |
-
msgid "Enable to hide reCaptcha Badge for Version 3 and Invisible reCaptcha."
|
378 |
-
msgstr ""
|
379 |
-
"Включите, чтобы скрыть значок reCaptcha для версии 3 и Invisible reCaptcha."
|
380 |
-
|
381 |
-
#: includes/class-gglcptch-settings-tabs.php:319
|
382 |
-
msgid "Additional Protective Measures"
|
383 |
-
msgstr "Дополнительные Меры Защиты"
|
384 |
-
|
385 |
-
#: includes/class-gglcptch-settings-tabs.php:323
|
386 |
-
msgid "Score"
|
387 |
-
msgstr "Количество очков"
|
388 |
-
|
389 |
-
#: includes/class-gglcptch-settings-tabs.php:328
|
390 |
-
#, php-format
|
391 |
-
msgid "Set the minimum verification score from %s to %s (default is %s)."
|
392 |
-
msgstr ""
|
393 |
-
"Укажите пороговое значение, при котором проверка будет пройдена от %s до %s "
|
394 |
-
"(по умолчанию %s)."
|
395 |
-
|
396 |
-
#: includes/class-gglcptch-settings-tabs.php:332
|
397 |
-
msgid "Hide reCaptcha for"
|
398 |
-
msgstr "Спрятать reCaptcha для"
|
399 |
-
|
400 |
-
#: includes/class-gglcptch-settings-tabs.php:350
|
401 |
-
msgid "Allow List Notification"
|
402 |
-
msgstr "Уведомление о нахождении в белом списке"
|
403 |
-
|
404 |
-
#: includes/class-gglcptch-settings-tabs.php:353
|
405 |
-
msgid "This message will be displayed instead of the reCaptcha."
|
406 |
-
msgstr "Это сообщение будет отображено вместо поля reCaptcha."
|
407 |
-
|
408 |
-
#: includes/class-gglcptch-settings-tabs.php:357
|
409 |
-
msgid "Advanced Protection"
|
410 |
-
msgstr "Усиленная защита"
|
411 |
-
|
412 |
-
#: includes/class-gglcptch-settings-tabs.php:361
|
413 |
-
msgid ""
|
414 |
-
"Enable to keep submit button disabled until reCaptcha is loaded (do not use "
|
415 |
-
"this option if you see \"Failed to load Google reCaptcha\" message)."
|
416 |
-
msgstr ""
|
417 |
-
"Включите, чтобы кнопка подтверждения оставалась отключенной до тех пор, пока "
|
418 |
-
"не будет загружена reCaptcha (Не используйте эту опцию, если вы видите "
|
419 |
-
"сообщение \"Не удалось загрузить Google reCaptcha\")."
|
420 |
-
|
421 |
-
#: includes/class-gglcptch-settings-tabs.php:367
|
422 |
-
msgid "Disabled Submit Button"
|
423 |
-
msgstr "Отключенная кнопка подтверждения"
|
424 |
-
|
425 |
-
#: includes/class-gglcptch-settings-tabs.php:372
|
426 |
-
msgid ""
|
427 |
-
"Enable to keep submit button disabled until user passes the reCaptcha test "
|
428 |
-
"(for Version 2)."
|
429 |
-
msgstr ""
|
430 |
-
"Включите, чтобы кнопка отправки оставалась отключенной до тех пор, пока "
|
431 |
-
"пользователь не пройдет тест reCaptcha (для версии 2)."
|
432 |
-
|
433 |
-
#: includes/class-gglcptch-settings-tabs.php:386
|
434 |
-
msgid ""
|
435 |
-
"reCaptcha version was changed. Please submit \"Test reCaptcha\" and "
|
436 |
-
"regenerate Site and Secret keys if necessary."
|
437 |
-
msgstr ""
|
438 |
-
"Версия reCaptcha была изменена. Пожалуйста, нажмите \"Тестирование reCaptcha"
|
439 |
-
"\" и при необходимости обновите секретный ключ и ключ сайта."
|
440 |
-
|
441 |
-
#: includes/class-gglcptch-settings-tabs.php:396
|
442 |
-
#, php-format
|
443 |
-
msgid "ReCaptcha plugin is fully compliant with GDPR. %s Learn more %s"
|
444 |
-
msgstr "Плагин ReCaptcha полностью соответствует GDPR. %s Узнать больше %s"
|
445 |
-
|
446 |
-
#: includes/class-gglcptch-settings-tabs.php:411
|
447 |
-
msgid "reCaptcha Shortcode"
|
448 |
-
msgstr "Шорткод reCaptcha"
|
449 |
-
|
450 |
-
#: includes/class-gglcptch-settings-tabs.php:414
|
451 |
-
msgid "Add reCaptcha to your posts or pages using the following shortcode:"
|
452 |
-
msgstr ""
|
453 |
-
"Добавьте reCaptcha в свои записи или страницы, используя следующий шорткод:"
|
454 |
-
|
455 |
-
#: includes/forms.php:11
|
456 |
msgid "Login form"
|
457 |
msgstr "Форма логина"
|
458 |
|
459 |
-
#: includes/forms.php:
|
460 |
msgid "Registration form"
|
461 |
msgstr "Форма регистрации"
|
462 |
|
463 |
-
#: includes/forms.php:
|
464 |
msgid "Reset password form"
|
465 |
msgstr "Форма восстановления пароля"
|
466 |
|
467 |
-
#: includes/forms.php:
|
468 |
msgid "Comments form"
|
469 |
msgstr "Форма комментариев"
|
470 |
|
471 |
-
#: includes/forms.php:
|
472 |
msgid "Testimonials"
|
473 |
msgstr "Testimonials"
|
474 |
|
475 |
-
#: includes/forms.php:
|
476 |
msgid "WordPress default"
|
477 |
msgstr "Стандартных форм WordPress"
|
478 |
|
479 |
-
#: includes/forms.php:
|
480 |
msgid "External Plugins"
|
481 |
msgstr "Внешние плагины"
|
482 |
|
483 |
-
#: includes/forms.php:
|
484 |
msgid "Custom Forms"
|
485 |
msgstr "Пользовательские формы"
|
486 |
|
487 |
-
#: includes/forms.php:
|
488 |
msgid "reCaptcha Plugin"
|
489 |
msgstr "Плагин reCaptcha"
|
490 |
|
491 |
-
#: includes/forms.php:
|
492 |
msgid "Activate"
|
493 |
msgstr "Активировать"
|
494 |
|
495 |
-
#: includes/forms.php:
|
496 |
msgid "Install Now"
|
497 |
msgstr "Установить сейчас"
|
498 |
|
499 |
-
#: includes/forms.php:
|
500 |
msgid "Authentication failed."
|
501 |
msgstr "Ошибка аутентификации."
|
502 |
|
503 |
-
#: includes/forms.php:
|
504 |
msgid "Click the BACK button on your browser and try again."
|
505 |
msgstr "Нажмите кнопку НАЗАД в вашем браузере и попытайтесь снова."
|
506 |
|
507 |
-
#: includes/pro_banners.php:
|
508 |
-
msgid "This options is available in Pro version of plugin"
|
509 |
-
msgstr "Эта опция доступна в Pro версии плагина"
|
510 |
-
|
511 |
-
#: includes/pro_banners.php:41
|
512 |
-
msgid "Allowed separators for IPs: a comma"
|
513 |
-
msgstr "Доступные разделители для IP-адресов: запятая"
|
514 |
-
|
515 |
-
#: includes/pro_banners.php:41 includes/pro_banners.php:44
|
516 |
-
msgid "semicolon"
|
517 |
-
msgstr "точка с запятой"
|
518 |
-
|
519 |
-
#: includes/pro_banners.php:41
|
520 |
-
msgid "ordinary space, tab, new line or carriage return."
|
521 |
-
msgstr "обычный пробел, табуляция, новая строка или возврат каретки."
|
522 |
-
|
523 |
-
#: includes/pro_banners.php:42
|
524 |
-
msgid "Reason"
|
525 |
-
msgstr "Причина"
|
526 |
-
|
527 |
-
#: includes/pro_banners.php:44
|
528 |
-
msgid "Allowed separators for reasons: a comma"
|
529 |
-
msgstr "Доступные разделители для причин: запятая"
|
530 |
-
|
531 |
-
#: includes/pro_banners.php:44
|
532 |
-
msgid "tab, new line or carriage return."
|
533 |
-
msgstr "табуляция, новая строка или возврат каретки."
|
534 |
-
|
535 |
-
#: includes/pro_banners.php:53
|
536 |
msgid "Jetpack Contact Form"
|
537 |
msgstr "Контактная форма плагина Jetpack"
|
538 |
|
539 |
-
#: includes/pro_banners.php:
|
540 |
msgid "bbPress New Topic form"
|
541 |
msgstr "Форма новой темы плагина bbPress"
|
542 |
|
543 |
-
#: includes/pro_banners.php:
|
544 |
msgid "bbPress Reply form"
|
545 |
msgstr "Форма ответа плагина bbPress"
|
546 |
|
547 |
-
#: includes/pro_banners.php:
|
548 |
msgid "BuddyPress Registration form"
|
549 |
msgstr "Форма регистрации плагина BuddyPress"
|
550 |
|
551 |
-
#: includes/pro_banners.php:
|
552 |
msgid "BuddyPress Comments form"
|
553 |
msgstr "Форма комментариев плагина BuddyPress"
|
554 |
|
555 |
-
#: includes/pro_banners.php:
|
556 |
msgid "BuddyPress Add New Group form"
|
557 |
msgstr "Форма добавления новой группы плагина BuddyPress"
|
558 |
|
559 |
-
#: includes/pro_banners.php:
|
560 |
msgid "WooCommerce Login form"
|
561 |
msgstr "Форма логина плагина WooCommerce"
|
562 |
|
563 |
-
#: includes/pro_banners.php:
|
564 |
msgid "WooCommerce Registration form"
|
565 |
msgstr "Форма регистрации плагина WooCommerce"
|
566 |
|
567 |
-
#: includes/pro_banners.php:
|
568 |
msgid "WooCommerce Reset password form"
|
569 |
msgstr "Форма восстановления пароля плагина WooCommerce"
|
570 |
|
571 |
-
#: includes/pro_banners.php:
|
572 |
msgid "WooCommerce Checkout form"
|
573 |
msgstr "Форма оформления заказа плагина WooCommerce"
|
574 |
|
575 |
-
#: includes/pro_banners.php:
|
576 |
msgid "wpForo Login form"
|
577 |
msgstr "Форма логина плагина wpForo"
|
578 |
|
579 |
-
#: includes/pro_banners.php:
|
580 |
msgid "wpForo Registration form"
|
581 |
msgstr "Форма регистрации плагина wpForo"
|
582 |
|
583 |
-
#: includes/pro_banners.php:
|
584 |
msgid "wpForo New Topic form"
|
585 |
msgstr "Форма новой темы плагина wpForo"
|
586 |
|
587 |
-
#: includes/pro_banners.php:
|
588 |
msgid "wpForo Reply form"
|
589 |
msgstr "Форма ответа плагина wpForo"
|
590 |
|
591 |
-
#: includes/pro_banners.php:
|
592 |
msgid "Ninja Forms"
|
593 |
msgstr "Ninja Forms"
|
594 |
|
595 |
-
#: includes/pro_banners.php:
|
596 |
msgid "Divi Contact Form"
|
597 |
msgstr "Контактная форма плагина Divi"
|
598 |
|
599 |
-
#: includes/pro_banners.php:
|
600 |
msgid "Divi Login Form"
|
601 |
msgstr "Форма логина плагина Divi"
|
602 |
|
603 |
-
#: includes/pro_banners.php:
|
604 |
msgid "Gravity Forms"
|
605 |
msgstr "Gravity Forms"
|
606 |
|
607 |
-
#: includes/pro_banners.php:
|
608 |
msgid "WPForms"
|
609 |
msgstr "WPForms"
|
610 |
|
611 |
-
#: includes/pro_banners.php:
|
612 |
msgid "Ultimate Member Login form"
|
613 |
msgstr "Форма логина плагина Ultimate Member"
|
614 |
|
615 |
-
#: includes/pro_banners.php:
|
616 |
msgid "Ultimate Member Registration form"
|
617 |
msgstr "Форма регистрации плагина Ultimate Member"
|
618 |
|
619 |
-
#: includes/pro_banners.php:
|
620 |
msgid "Ultimate Member Profile form"
|
621 |
msgstr "Форма профиля плагина Ultimate Member"
|
622 |
|
623 |
-
#: includes/pro_banners.php:
|
624 |
msgid "Elementor Contact Form"
|
625 |
msgstr "Контактная форма плагина Elementor"
|
626 |
|
627 |
-
#: includes/pro_banners.php:
|
628 |
-
msgid "
|
629 |
-
msgstr "
|
630 |
|
631 |
-
#: includes/pro_banners.php:
|
632 |
-
msgid "
|
633 |
-
msgstr "
|
634 |
|
635 |
-
#: includes/pro_banners.php:
|
636 |
-
msgid ""
|
637 |
-
"
|
638 |
-
|
639 |
-
|
640 |
-
"
|
641 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
|
643 |
-
|
644 |
-
|
645 |
-
msgstr "Размер"
|
646 |
|
647 |
-
|
648 |
-
|
649 |
-
msgstr "Нормальный"
|
650 |
|
651 |
-
|
652 |
-
|
653 |
-
msgstr "Компактный"
|
654 |
|
655 |
#~ msgid "Get the API Keys."
|
656 |
#~ msgstr "Получить API ключи."
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: reCaptcha\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2022-12-09 14:03+0200\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: bestwebsoft.com <plugin@bestwebsoft.com>\n"
|
8 |
"Language-Team: the BestWebSoft Team <plugin@bestwebsoft.com>\n"
|
15 |
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
17 |
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
+
"X-Generator: Poedit 3.1.1\n"
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
20 |
"X-Poedit-SearchPathExcluded-0: bws_menu\n"
|
21 |
|
22 |
+
#: google-captcha.php:39 google-captcha.php:49 google-captcha.php:527
|
|
|
23 |
msgid "reCaptcha Settings"
|
24 |
msgstr "Настройки reCaptcha"
|
25 |
|
26 |
+
#: google-captcha.php:50 google-captcha.php:1125 google-captcha.php:1138
|
27 |
#: includes/class-gglcptch-settings-tabs.php:22
|
28 |
msgid "Settings"
|
29 |
msgstr "Настройки"
|
30 |
|
31 |
+
#: google-captcha.php:58
|
32 |
msgid "reCaptcha Allow List"
|
33 |
msgstr "Белый cписок reCaptcha"
|
34 |
|
36 |
msgid "Allow List"
|
37 |
msgstr "Доступные диапазоны"
|
38 |
|
39 |
+
#: google-captcha.php:76
|
40 |
msgid "Upgrade to Pro"
|
41 |
msgstr "Обновить до Pro"
|
42 |
|
56 |
msgid "Warning"
|
57 |
msgstr "Внимание"
|
58 |
|
59 |
+
#: google-captcha.php:421
|
60 |
msgid "You are in the allow list"
|
61 |
msgstr "Вы в белом списке"
|
62 |
|
63 |
+
#: google-captcha.php:528
|
64 |
msgid "Please enable JavaScript in your browser."
|
65 |
msgstr "Пожалуйста, включите поддержку JavaScript в вашем браузере."
|
66 |
|
67 |
+
#: google-captcha.php:611
|
68 |
msgid "This site is protected by reCAPTCHA and the Google "
|
69 |
msgstr "Этот сайт защищен reCAPTCHA и применяются "
|
70 |
|
71 |
+
#: google-captcha.php:612
|
72 |
msgid "Privacy Policy"
|
73 |
msgstr "Политика конфиденциальности"
|
74 |
|
75 |
+
#: google-captcha.php:613
|
76 |
msgid " and "
|
77 |
msgstr " и "
|
78 |
|
79 |
+
#: google-captcha.php:614
|
80 |
msgid "Terms of Service"
|
81 |
msgstr "Условия обслуживания"
|
82 |
|
83 |
+
#: google-captcha.php:615
|
84 |
msgid " apply."
|
85 |
msgstr " Google."
|
86 |
|
87 |
+
#: google-captcha.php:622
|
88 |
msgid "To use reCaptcha you must get the keys from"
|
89 |
msgstr "Чтобы использовать reCaptcha, вам необходимо получить ключи"
|
90 |
|
91 |
+
#: google-captcha.php:623
|
92 |
msgid "here"
|
93 |
msgstr "здесь"
|
94 |
|
95 |
+
#: google-captcha.php:624
|
96 |
msgid "and enter them on the"
|
97 |
msgstr "и вставить их на"
|
98 |
|
99 |
+
#: google-captcha.php:626
|
100 |
msgid "plugin setting page"
|
101 |
msgstr "странице настроек плагина"
|
102 |
|
103 |
+
#: google-captcha.php:795
|
104 |
msgid "Response is empty"
|
105 |
msgstr "Ответ отсутствует"
|
106 |
|
107 |
+
#: google-captcha.php:896 includes/forms.php:373
|
108 |
msgid "Error"
|
109 |
msgstr "Ошибка"
|
110 |
|
111 |
+
#: google-captcha.php:1025
|
112 |
+
msgid "The reCaptcha verification failed. Please try again."
|
113 |
+
msgstr "Проверка reCaptcha не удалась. Пожалуйста, попробуйте еще раз."
|
114 |
|
115 |
+
#: google-captcha.php:1027
|
116 |
msgid "Secret Key is missing."
|
117 |
msgstr "Секретный ключ отсутствует."
|
118 |
|
119 |
+
#: google-captcha.php:1030
|
120 |
msgid "Secret Key is invalid."
|
121 |
msgstr "Некорректный секретный ключ."
|
122 |
|
123 |
+
#: google-captcha.php:1031
|
124 |
msgid "Check your domain configurations"
|
125 |
msgstr "Проверьте настройки вашего домена"
|
126 |
|
127 |
+
#: google-captcha.php:1032
|
128 |
msgid "and enter it again"
|
129 |
msgstr "и введите его снова"
|
130 |
|
131 |
+
#: google-captcha.php:1034
|
132 |
msgid "User response is invalid"
|
133 |
msgstr "Некорректный ответ пользователя"
|
134 |
|
135 |
+
#: google-captcha.php:1035
|
136 |
msgid "You have entered an incorrect reCAPTCHA value."
|
137 |
msgstr "Ошибка: Вы ввели неверное значение reCAPTCHA."
|
138 |
|
139 |
+
#: google-captcha.php:1036
|
140 |
msgid ""
|
141 |
"More than one reCAPTCHA has been found in the current form. Please remove "
|
142 |
"all unnecessary reCAPTCHA fields to make it work properly."
|
144 |
"В текущей форме найдено более одного блока reCAPTCHA. Пожалуйста, удалите "
|
145 |
"все лишние блоки reCAPTCHA для дальнейшей корректной работы."
|
146 |
|
147 |
+
#: google-captcha.php:1038
|
148 |
msgid "reCaptcha v3 test failed"
|
149 |
msgstr "Тест reCaptcha v3 не пройден"
|
150 |
|
151 |
+
#: google-captcha.php:1076
|
152 |
msgid "Please submit \"Test verification\""
|
153 |
msgstr "Пожалуйста, нажмите кнопку \"Тестирование проверки\"."
|
154 |
|
155 |
+
#: google-captcha.php:1078
|
156 |
msgid "Please complete the captcha and submit \"Test verification\""
|
157 |
msgstr ""
|
158 |
"Пожалуйста, заполните капчу и нажмите кнопку \"Тестирование проверки\"."
|
159 |
|
160 |
+
#: google-captcha.php:1084
|
161 |
msgid "Test verification"
|
162 |
msgstr "Тестирование проверки"
|
163 |
|
164 |
+
#: google-captcha.php:1105
|
165 |
msgid "The verification is successfully completed."
|
166 |
msgstr "Тестирование проверки успешно завершено."
|
167 |
|
168 |
+
#: google-captcha.php:1140
|
169 |
msgid "FAQ"
|
170 |
msgstr "FAQ"
|
171 |
|
172 |
+
#: google-captcha.php:1141
|
173 |
msgid "Support"
|
174 |
msgstr "Поддержка"
|
175 |
|
176 |
+
#: includes/allowlist.php:119
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
msgid "Search IP"
|
178 |
msgstr "Искать IP"
|
179 |
|
180 |
+
#: includes/allowlist.php:180
|
181 |
msgid "Nothing found"
|
182 |
msgstr "Ничего не найдено"
|
183 |
|
184 |
+
#: includes/allowlist.php:180
|
185 |
msgid "No IP in the Allow List"
|
186 |
msgstr "Список IP пуст"
|
187 |
|
188 |
+
#: includes/allowlist.php:189
|
189 |
msgid "IP Address"
|
190 |
msgstr "IP Адресс"
|
191 |
|
192 |
+
#: includes/allowlist.php:190
|
193 |
msgid "Date Added"
|
194 |
msgstr "Дата добавления"
|
195 |
|
196 |
+
#: includes/allowlist.php:249 includes/allowlist.php:260
|
197 |
msgid "Delete"
|
198 |
msgstr "Удалить"
|
199 |
|
200 |
+
#: includes/allowlist.php:351
|
201 |
msgid "IP added to the allow list successfully."
|
202 |
msgstr "IP адрес успешно добавлен в белый список."
|
203 |
|
204 |
+
#: includes/allowlist.php:353 includes/allowlist.php:379
|
205 |
+
#: includes/allowlist.php:396
|
206 |
msgid "Some errors occurred."
|
207 |
msgstr "Возникли некоторые ошибки."
|
208 |
|
209 |
+
#: includes/allowlist.php:356
|
210 |
msgid "IP is already in the allow list."
|
211 |
msgstr "IP адрес уже в белом списке."
|
212 |
|
213 |
+
#: includes/allowlist.php:359
|
214 |
msgid "Invalid IP. See allowed formats."
|
215 |
msgstr "Неверный IP. Смотите доступные форматы."
|
216 |
|
217 |
+
#: includes/allowlist.php:392
|
218 |
msgid "One IP was deleted successfully."
|
219 |
msgstr "Один IP адрес был успешно удален."
|
220 |
|
221 |
+
#: includes/allowlist.php:399
|
222 |
msgid "You have not entered any IP."
|
223 |
msgstr "Вы не ввели ни одного IP адреса."
|
224 |
|
225 |
+
#: includes/allowlist.php:402
|
226 |
msgid "You have not entered any IP in to the search form."
|
227 |
msgstr "Вы не ввели значения в форму поиска."
|
228 |
|
229 |
+
#: includes/allowlist.php:404
|
230 |
msgid "Search results for"
|
231 |
msgstr "Результаты поиска для"
|
232 |
|
238 |
msgid "Custom Code"
|
239 |
msgstr "Пользовательский код"
|
240 |
|
241 |
+
#: includes/class-gglcptch-settings-tabs.php:25
|
242 |
msgid "License Key"
|
243 |
msgstr "Лицензионный ключ"
|
244 |
|
245 |
+
#: includes/class-gglcptch-settings-tabs.php:49
|
246 |
msgid "Site Key"
|
247 |
msgstr "Ключ сайта"
|
248 |
|
249 |
+
#: includes/class-gglcptch-settings-tabs.php:54
|
250 |
msgid "Secret Key"
|
251 |
msgstr "Секретный ключ"
|
252 |
|
253 |
+
#: includes/class-gglcptch-settings-tabs.php:61
|
254 |
+
#: includes/class-gglcptch-settings-tabs.php:62
|
255 |
msgid "Version"
|
256 |
msgstr "Версия"
|
257 |
|
258 |
+
#: includes/class-gglcptch-settings-tabs.php:63
|
259 |
msgid "Invisible"
|
260 |
msgstr "Невидимая"
|
261 |
|
262 |
+
#: includes/class-gglcptch-settings-tabs.php:93
|
263 |
msgid "Enter site key"
|
264 |
msgstr "Введите ключ сайта"
|
265 |
|
266 |
+
#: includes/class-gglcptch-settings-tabs.php:94
|
267 |
+
#: includes/class-gglcptch-settings-tabs.php:101
|
268 |
msgid "WARNING: The captcha will not be displayed until you fill key fields."
|
269 |
msgstr ""
|
270 |
"ПРЕДУПРЕЖДЕНИЕ: Google Captcha не будет отображаться пока вы не заполните "
|
271 |
"поля с ключами."
|
272 |
|
273 |
+
#: includes/class-gglcptch-settings-tabs.php:100
|
274 |
msgid "Enter secret key"
|
275 |
msgstr "Введите секретный ключ"
|
276 |
|
277 |
+
#: includes/class-gglcptch-settings-tabs.php:138
|
278 |
msgid "Settings saved."
|
279 |
msgstr "Настройки сохранены."
|
280 |
|
281 |
+
#: includes/forms.php:12
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
msgid "Login form"
|
283 |
msgstr "Форма логина"
|
284 |
|
285 |
+
#: includes/forms.php:13
|
286 |
msgid "Registration form"
|
287 |
msgstr "Форма регистрации"
|
288 |
|
289 |
+
#: includes/forms.php:14
|
290 |
msgid "Reset password form"
|
291 |
msgstr "Форма восстановления пароля"
|
292 |
|
293 |
+
#: includes/forms.php:15
|
294 |
msgid "Comments form"
|
295 |
msgstr "Форма комментариев"
|
296 |
|
297 |
+
#: includes/forms.php:17
|
298 |
msgid "Testimonials"
|
299 |
msgstr "Testimonials"
|
300 |
|
301 |
+
#: includes/forms.php:39
|
302 |
msgid "WordPress default"
|
303 |
msgstr "Стандартных форм WordPress"
|
304 |
|
305 |
+
#: includes/forms.php:48 includes/pro_banners.php:93
|
306 |
msgid "External Plugins"
|
307 |
msgstr "Внешние плагины"
|
308 |
|
309 |
+
#: includes/forms.php:60
|
310 |
msgid "Custom Forms"
|
311 |
msgstr "Пользовательские формы"
|
312 |
|
313 |
+
#: includes/forms.php:84
|
314 |
msgid "reCaptcha Plugin"
|
315 |
msgstr "Плагин reCaptcha"
|
316 |
|
317 |
+
#: includes/forms.php:124 includes/forms.php:148
|
318 |
msgid "Activate"
|
319 |
msgstr "Активировать"
|
320 |
|
321 |
+
#: includes/forms.php:126 includes/forms.php:151 includes/forms.php:155
|
322 |
msgid "Install Now"
|
323 |
msgstr "Установить сейчас"
|
324 |
|
325 |
+
#: includes/forms.php:277
|
326 |
msgid "Authentication failed."
|
327 |
msgstr "Ошибка аутентификации."
|
328 |
|
329 |
+
#: includes/forms.php:375
|
330 |
msgid "Click the BACK button on your browser and try again."
|
331 |
msgstr "Нажмите кнопку НАЗАД в вашем браузере и попытайтесь снова."
|
332 |
|
333 |
+
#: includes/pro_banners.php:58
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
msgid "Jetpack Contact Form"
|
335 |
msgstr "Контактная форма плагина Jetpack"
|
336 |
|
337 |
+
#: includes/pro_banners.php:61
|
338 |
msgid "bbPress New Topic form"
|
339 |
msgstr "Форма новой темы плагина bbPress"
|
340 |
|
341 |
+
#: includes/pro_banners.php:62
|
342 |
msgid "bbPress Reply form"
|
343 |
msgstr "Форма ответа плагина bbPress"
|
344 |
|
345 |
+
#: includes/pro_banners.php:63
|
346 |
msgid "BuddyPress Registration form"
|
347 |
msgstr "Форма регистрации плагина BuddyPress"
|
348 |
|
349 |
+
#: includes/pro_banners.php:64
|
350 |
msgid "BuddyPress Comments form"
|
351 |
msgstr "Форма комментариев плагина BuddyPress"
|
352 |
|
353 |
+
#: includes/pro_banners.php:65
|
354 |
msgid "BuddyPress Add New Group form"
|
355 |
msgstr "Форма добавления новой группы плагина BuddyPress"
|
356 |
|
357 |
+
#: includes/pro_banners.php:66
|
358 |
msgid "WooCommerce Login form"
|
359 |
msgstr "Форма логина плагина WooCommerce"
|
360 |
|
361 |
+
#: includes/pro_banners.php:67
|
362 |
msgid "WooCommerce Registration form"
|
363 |
msgstr "Форма регистрации плагина WooCommerce"
|
364 |
|
365 |
+
#: includes/pro_banners.php:68
|
366 |
msgid "WooCommerce Reset password form"
|
367 |
msgstr "Форма восстановления пароля плагина WooCommerce"
|
368 |
|
369 |
+
#: includes/pro_banners.php:69
|
370 |
msgid "WooCommerce Checkout form"
|
371 |
msgstr "Форма оформления заказа плагина WooCommerce"
|
372 |
|
373 |
+
#: includes/pro_banners.php:70
|
374 |
msgid "wpForo Login form"
|
375 |
msgstr "Форма логина плагина wpForo"
|
376 |
|
377 |
+
#: includes/pro_banners.php:71
|
378 |
msgid "wpForo Registration form"
|
379 |
msgstr "Форма регистрации плагина wpForo"
|
380 |
|
381 |
+
#: includes/pro_banners.php:72
|
382 |
msgid "wpForo New Topic form"
|
383 |
msgstr "Форма новой темы плагина wpForo"
|
384 |
|
385 |
+
#: includes/pro_banners.php:73
|
386 |
msgid "wpForo Reply form"
|
387 |
msgstr "Форма ответа плагина wpForo"
|
388 |
|
389 |
+
#: includes/pro_banners.php:74
|
390 |
msgid "Ninja Forms"
|
391 |
msgstr "Ninja Forms"
|
392 |
|
393 |
+
#: includes/pro_banners.php:75
|
394 |
msgid "Divi Contact Form"
|
395 |
msgstr "Контактная форма плагина Divi"
|
396 |
|
397 |
+
#: includes/pro_banners.php:76
|
398 |
msgid "Divi Login Form"
|
399 |
msgstr "Форма логина плагина Divi"
|
400 |
|
401 |
+
#: includes/pro_banners.php:77
|
402 |
msgid "Gravity Forms"
|
403 |
msgstr "Gravity Forms"
|
404 |
|
405 |
+
#: includes/pro_banners.php:78
|
406 |
msgid "WPForms"
|
407 |
msgstr "WPForms"
|
408 |
|
409 |
+
#: includes/pro_banners.php:79
|
410 |
msgid "Ultimate Member Login form"
|
411 |
msgstr "Форма логина плагина Ultimate Member"
|
412 |
|
413 |
+
#: includes/pro_banners.php:80
|
414 |
msgid "Ultimate Member Registration form"
|
415 |
msgstr "Форма регистрации плагина Ultimate Member"
|
416 |
|
417 |
+
#: includes/pro_banners.php:81
|
418 |
msgid "Ultimate Member Profile form"
|
419 |
msgstr "Форма профиля плагина Ultimate Member"
|
420 |
|
421 |
+
#: includes/pro_banners.php:83
|
422 |
msgid "Elementor Contact Form"
|
423 |
msgstr "Контактная форма плагина Elementor"
|
424 |
|
425 |
+
#: includes/pro_banners.php:84
|
426 |
+
msgid "MemberPress checkout form"
|
427 |
+
msgstr "Форма оформления заказа плагина MemberPress"
|
428 |
|
429 |
+
#: includes/pro_banners.php:85
|
430 |
+
msgid "MemberPress login form"
|
431 |
+
msgstr "Форма логина плагина MemberPress"
|
432 |
|
433 |
+
#: includes/pro_banners.php:86
|
434 |
+
msgid "MemberPress forgot password form"
|
435 |
+
msgstr "Форма восстановления пароля MemberPress"
|
436 |
+
|
437 |
+
#: includes/pro_banners.php:87
|
438 |
+
msgid "LearnDash login form"
|
439 |
+
msgstr "Форма логина LearnDash"
|
440 |
+
|
441 |
+
#: includes/pro_banners.php:88
|
442 |
+
msgid "LearnDash registration form"
|
443 |
+
msgstr "Форма регистрации LearnDash"
|
444 |
+
|
445 |
+
#: includes/pro_banners.php:89
|
446 |
+
msgid "BuddyBoss registration form"
|
447 |
+
msgstr "Форма регистрации плагина BuddyBoss"
|
448 |
+
|
449 |
+
#~ msgid "User response is missing."
|
450 |
+
#~ msgstr "Ответ пользователя отсутствует."
|
451 |
+
|
452 |
+
#~ msgid "Add New"
|
453 |
+
#~ msgstr "Добавить"
|
454 |
+
|
455 |
+
#~ msgid "IP to Allow List"
|
456 |
+
#~ msgstr "IP в белый список"
|
457 |
+
|
458 |
+
#~ msgid "My IP"
|
459 |
+
#~ msgstr "Мой IP"
|
460 |
+
|
461 |
+
#~ msgid "Allowed formats"
|
462 |
+
#~ msgstr "Доступные форматы"
|
463 |
+
|
464 |
+
#~ msgid "Allowed diapason"
|
465 |
+
#~ msgstr "Доступные диапазоны"
|
466 |
+
|
467 |
+
#~ msgid "Add IP to Allow List"
|
468 |
+
#~ msgstr "Добавить IP в белый список"
|
469 |
+
|
470 |
+
#~ msgid "General"
|
471 |
+
#~ msgstr "Общее"
|
472 |
+
|
473 |
+
#~ msgid "reCaptcha Version"
|
474 |
+
#~ msgstr "Версия reCaptcha"
|
475 |
+
|
476 |
+
#, php-format
|
477 |
+
#~ msgid ""
|
478 |
+
#~ "Register your domain name with Google reCaptcha service and add the keys "
|
479 |
+
#~ "to the fields below. %s Get the API Keys. %s"
|
480 |
+
#~ msgstr ""
|
481 |
+
#~ "Зарегистрируйте свой сайт с помощью Google, чтобы получить требуемые API "
|
482 |
+
#~ "ключи и введите их ниже. %s Получить API ключи. %s"
|
483 |
+
|
484 |
+
#, php-format
|
485 |
+
#~ msgid ""
|
486 |
+
#~ "If you do not want to create API keys use %s Captcha by BestWebSoft %s "
|
487 |
+
#~ "plugin."
|
488 |
+
#~ msgstr ""
|
489 |
+
#~ "Если вы не хотите создавать API ключи используйте %s Captcha by "
|
490 |
+
#~ "BestWebSoft %s плагин."
|
491 |
+
|
492 |
+
#~ msgid "Test reCaptcha"
|
493 |
+
#~ msgstr "Тестировать reCaptcha"
|
494 |
+
|
495 |
+
#~ msgid "Enable reCaptcha for"
|
496 |
+
#~ msgstr "Включить reCaptcha для"
|
497 |
+
|
498 |
+
#~ msgid "Close"
|
499 |
+
#~ msgstr "Закрыть"
|
500 |
+
|
501 |
+
#~ msgid "reCaptcha Domain"
|
502 |
+
#~ msgstr "Домен reCaptcha"
|
503 |
+
|
504 |
+
#~ msgid ""
|
505 |
+
#~ "If Google is not accessible or blocked in your country select other one."
|
506 |
+
#~ msgstr ""
|
507 |
+
#~ "Если Google недоступен или заблокирован в вашей стране выберите другой "
|
508 |
+
#~ "пункт."
|
509 |
+
|
510 |
+
#~ msgid "Appearance"
|
511 |
+
#~ msgstr "Внешний Вид"
|
512 |
+
|
513 |
+
#~ msgid "Theme"
|
514 |
+
#~ msgstr "Тема"
|
515 |
+
|
516 |
+
#~ msgid "Light"
|
517 |
+
#~ msgstr "Светлая"
|
518 |
+
|
519 |
+
#~ msgid "Dark"
|
520 |
+
#~ msgstr "Тёмная"
|
521 |
+
|
522 |
+
#~ msgid "Hide reCaptcha Badge"
|
523 |
+
#~ msgstr "Спрятать значок reCaptcha"
|
524 |
+
|
525 |
+
#~ msgid ""
|
526 |
+
#~ "Enable to hide reCaptcha Badge for Version 3 and Invisible reCaptcha."
|
527 |
+
#~ msgstr ""
|
528 |
+
#~ "Включите, чтобы скрыть значок reCaptcha для версии 3 и Invisible "
|
529 |
+
#~ "reCaptcha."
|
530 |
+
|
531 |
+
#~ msgid "Additional Protective Measures"
|
532 |
+
#~ msgstr "Дополнительные Меры Защиты"
|
533 |
+
|
534 |
+
#~ msgid "Score"
|
535 |
+
#~ msgstr "Количество очков"
|
536 |
+
|
537 |
+
#, php-format
|
538 |
+
#~ msgid "Set the minimum verification score from %s to %s (default is %s)."
|
539 |
+
#~ msgstr ""
|
540 |
+
#~ "Укажите пороговое значение, при котором проверка будет пройдена от %s до "
|
541 |
+
#~ "%s (по умолчанию %s)."
|
542 |
+
|
543 |
+
#~ msgid "Hide reCaptcha for"
|
544 |
+
#~ msgstr "Спрятать reCaptcha для"
|
545 |
+
|
546 |
+
#~ msgid "Allow List Notification"
|
547 |
+
#~ msgstr "Уведомление о нахождении в белом списке"
|
548 |
+
|
549 |
+
#~ msgid "This message will be displayed instead of the reCaptcha."
|
550 |
+
#~ msgstr "Это сообщение будет отображено вместо поля reCaptcha."
|
551 |
+
|
552 |
+
#~ msgid "Advanced Protection"
|
553 |
+
#~ msgstr "Усиленная защита"
|
554 |
+
|
555 |
+
#~ msgid ""
|
556 |
+
#~ "Enable to keep submit button disabled until reCaptcha is loaded (do not "
|
557 |
+
#~ "use this option if you see \"Failed to load Google reCaptcha\" message)."
|
558 |
+
#~ msgstr ""
|
559 |
+
#~ "Включите, чтобы кнопка подтверждения оставалась отключенной до тех пор, "
|
560 |
+
#~ "пока не будет загружена reCaptcha (Не используйте эту опцию, если вы "
|
561 |
+
#~ "видите сообщение \"Не удалось загрузить Google reCaptcha\")."
|
562 |
+
|
563 |
+
#~ msgid "Disabled Submit Button"
|
564 |
+
#~ msgstr "Отключенная кнопка подтверждения"
|
565 |
+
|
566 |
+
#~ msgid ""
|
567 |
+
#~ "Enable to keep submit button disabled until user passes the reCaptcha "
|
568 |
+
#~ "test (for Version 2)."
|
569 |
+
#~ msgstr ""
|
570 |
+
#~ "Включите, чтобы кнопка отправки оставалась отключенной до тех пор, пока "
|
571 |
+
#~ "пользователь не пройдет тест reCaptcha (для версии 2)."
|
572 |
+
|
573 |
+
#~ msgid ""
|
574 |
+
#~ "reCaptcha version was changed. Please submit \"Test reCaptcha\" and "
|
575 |
+
#~ "regenerate Site and Secret keys if necessary."
|
576 |
+
#~ msgstr ""
|
577 |
+
#~ "Версия reCaptcha была изменена. Пожалуйста, нажмите \"Тестирование "
|
578 |
+
#~ "reCaptcha\" и при необходимости обновите секретный ключ и ключ сайта."
|
579 |
+
|
580 |
+
#, php-format
|
581 |
+
#~ msgid "ReCaptcha plugin is fully compliant with GDPR. %s Learn more %s"
|
582 |
+
#~ msgstr "Плагин ReCaptcha полностью соответствует GDPR. %s Узнать больше %s"
|
583 |
+
|
584 |
+
#~ msgid "reCaptcha Shortcode"
|
585 |
+
#~ msgstr "Шорткод reCaptcha"
|
586 |
+
|
587 |
+
#~ msgid "Add reCaptcha to your posts or pages using the following shortcode:"
|
588 |
+
#~ msgstr ""
|
589 |
+
#~ "Добавьте reCaptcha в свои записи или страницы, используя следующий "
|
590 |
+
#~ "шорткод:"
|
591 |
+
|
592 |
+
#~ msgid "This options is available in Pro version of plugin"
|
593 |
+
#~ msgstr "Эта опция доступна в Pro версии плагина"
|
594 |
+
|
595 |
+
#~ msgid "Allowed separators for IPs: a comma"
|
596 |
+
#~ msgstr "Доступные разделители для IP-адресов: запятая"
|
597 |
+
|
598 |
+
#~ msgid "semicolon"
|
599 |
+
#~ msgstr "точка с запятой"
|
600 |
+
|
601 |
+
#~ msgid "ordinary space, tab, new line or carriage return."
|
602 |
+
#~ msgstr "обычный пробел, табуляция, новая строка или возврат каретки."
|
603 |
+
|
604 |
+
#~ msgid "Reason"
|
605 |
+
#~ msgstr "Причина"
|
606 |
+
|
607 |
+
#~ msgid "Allowed separators for reasons: a comma"
|
608 |
+
#~ msgstr "Доступные разделители для причин: запятая"
|
609 |
+
|
610 |
+
#~ msgid "tab, new line or carriage return."
|
611 |
+
#~ msgstr "табуляция, новая строка или возврат каретки."
|
612 |
+
|
613 |
+
#~ msgid "Language"
|
614 |
+
#~ msgstr "Язык"
|
615 |
+
|
616 |
+
#~ msgid "Multilanguage"
|
617 |
+
#~ msgstr "Multilanguage"
|
618 |
+
|
619 |
+
#~ msgid ""
|
620 |
+
#~ "Enable to switch language automatically on multilingual website using the "
|
621 |
+
#~ "Multilanguage plugin."
|
622 |
+
#~ msgstr ""
|
623 |
+
#~ "Включить, чтобы переключить язык автоматически на многоязычном сайте, "
|
624 |
+
#~ "используя плагин Multilanguage."
|
625 |
|
626 |
+
#~ msgid "Size"
|
627 |
+
#~ msgstr "Размер"
|
|
|
628 |
|
629 |
+
#~ msgid "Normal"
|
630 |
+
#~ msgstr "Нормальный"
|
|
|
631 |
|
632 |
+
#~ msgid "Compact"
|
633 |
+
#~ msgstr "Компактный"
|
|
|
634 |
|
635 |
#~ msgid "Get the API Keys."
|
636 |
#~ msgstr "Получить API ключи."
|
languages/google-captcha-uk.mo
CHANGED
Binary file
|
languages/google-captcha-uk.po
CHANGED
@@ -2,7 +2,7 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: reCaptcha\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2022-
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: bestwebsoft.com <plugin@bestwebsoft.com>\n"
|
8 |
"Language-Team: the BestWebSoft Team <plugin@bestwebsoft.com>\n"
|
@@ -15,21 +15,20 @@ msgstr ""
|
|
15 |
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
17 |
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
-
"X-Generator: Poedit 3.
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
20 |
"X-Poedit-SearchPathExcluded-0: bws_menu\n"
|
21 |
|
22 |
-
#: google-captcha.php:39 google-captcha.php:49 google-captcha.php:
|
23 |
-
#: includes/class-gglcptch-settings-tabs.php:147
|
24 |
msgid "reCaptcha Settings"
|
25 |
msgstr "Налаштування reCaptcha"
|
26 |
|
27 |
-
#: google-captcha.php:50 google-captcha.php:
|
28 |
#: includes/class-gglcptch-settings-tabs.php:22
|
29 |
msgid "Settings"
|
30 |
msgstr "Налаштування"
|
31 |
|
32 |
-
#: google-captcha.php:58
|
33 |
msgid "reCaptcha Allow List"
|
34 |
msgstr "Білий список reCaptcha"
|
35 |
|
@@ -37,7 +36,7 @@ msgstr "Білий список reCaptcha"
|
|
37 |
msgid "Allow List"
|
38 |
msgstr "Доступні діапазони"
|
39 |
|
40 |
-
#: google-captcha.php:76
|
41 |
msgid "Upgrade to Pro"
|
42 |
msgstr "Оновити до Pro"
|
43 |
|
@@ -57,87 +56,87 @@ msgstr ""
|
|
57 |
msgid "Warning"
|
58 |
msgstr "Увага"
|
59 |
|
60 |
-
#: google-captcha.php:
|
61 |
msgid "You are in the allow list"
|
62 |
msgstr "Ви знаходитесь в білому списку"
|
63 |
|
64 |
-
#: google-captcha.php:
|
65 |
msgid "Please enable JavaScript in your browser."
|
66 |
msgstr "Будь ласка, увімкніть JavaScript у вашому браузері."
|
67 |
|
68 |
-
#: google-captcha.php:
|
69 |
msgid "This site is protected by reCAPTCHA and the Google "
|
70 |
msgstr "Цей сайт захищений reCAPTCHA і застосовуються "
|
71 |
|
72 |
-
#: google-captcha.php:
|
73 |
msgid "Privacy Policy"
|
74 |
msgstr "Політика конфіденційності"
|
75 |
|
76 |
-
#: google-captcha.php:
|
77 |
msgid " and "
|
78 |
msgstr " та "
|
79 |
|
80 |
-
#: google-captcha.php:
|
81 |
msgid "Terms of Service"
|
82 |
msgstr "Умови обслуговування"
|
83 |
|
84 |
-
#: google-captcha.php:
|
85 |
msgid " apply."
|
86 |
msgstr " Google."
|
87 |
|
88 |
-
#: google-captcha.php:
|
89 |
msgid "To use reCaptcha you must get the keys from"
|
90 |
msgstr "Щоб використовувати reCaptcha, вам необхідно отримати ключі з"
|
91 |
|
92 |
-
#: google-captcha.php:
|
93 |
msgid "here"
|
94 |
msgstr "тут"
|
95 |
|
96 |
-
#: google-captcha.php:
|
97 |
msgid "and enter them on the"
|
98 |
msgstr "і вставте їх у"
|
99 |
|
100 |
-
#: google-captcha.php:
|
101 |
msgid "plugin setting page"
|
102 |
msgstr "сторінку налаштувань плагіну"
|
103 |
|
104 |
-
#: google-captcha.php:
|
105 |
msgid "Response is empty"
|
106 |
msgstr "Відповідь порожня"
|
107 |
|
108 |
-
#: google-captcha.php:
|
109 |
msgid "Error"
|
110 |
msgstr "Помилка"
|
111 |
|
112 |
-
#: google-captcha.php:
|
113 |
-
msgid "
|
114 |
-
msgstr "
|
115 |
|
116 |
-
#: google-captcha.php:
|
117 |
msgid "Secret Key is missing."
|
118 |
msgstr "Секретний ключ відсутній."
|
119 |
|
120 |
-
#: google-captcha.php:
|
121 |
msgid "Secret Key is invalid."
|
122 |
msgstr "Секретний ключ некоректний."
|
123 |
|
124 |
-
#: google-captcha.php:
|
125 |
msgid "Check your domain configurations"
|
126 |
msgstr "Перевірте конфігурацію вашого домену"
|
127 |
|
128 |
-
#: google-captcha.php:
|
129 |
msgid "and enter it again"
|
130 |
msgstr "і введіть його знову"
|
131 |
|
132 |
-
#: google-captcha.php:
|
133 |
msgid "User response is invalid"
|
134 |
msgstr "Некоректна відповідь користувача"
|
135 |
|
136 |
-
#: google-captcha.php:
|
137 |
msgid "You have entered an incorrect reCAPTCHA value."
|
138 |
msgstr "Ви ввели невірне значення reCAPTCHA."
|
139 |
|
140 |
-
#: google-captcha.php:
|
141 |
msgid ""
|
142 |
"More than one reCAPTCHA has been found in the current form. Please remove "
|
143 |
"all unnecessary reCAPTCHA fields to make it work properly."
|
@@ -145,113 +144,89 @@ msgstr ""
|
|
145 |
"В поточній формі знайдено більш ніж один блок reCAPTCHA. Будь-ласка видаліть "
|
146 |
"усі зайві блоки reCAPTCHA для коректної подальшої роботи."
|
147 |
|
148 |
-
#: google-captcha.php:
|
149 |
msgid "reCaptcha v3 test failed"
|
150 |
msgstr "Тест reCaptcha v3 не пройдений"
|
151 |
|
152 |
-
#: google-captcha.php:
|
153 |
msgid "Please submit \"Test verification\""
|
154 |
msgstr "Будь ласка, натисніть кнопку \"Тестування перевірки\""
|
155 |
|
156 |
-
#: google-captcha.php:
|
157 |
msgid "Please complete the captcha and submit \"Test verification\""
|
158 |
msgstr ""
|
159 |
"Будь ласка, заповніть капчу і натисніть кнопку \"Тестування перевірки\""
|
160 |
|
161 |
-
#: google-captcha.php:
|
162 |
msgid "Test verification"
|
163 |
msgstr "Тестування перевірки"
|
164 |
|
165 |
-
#: google-captcha.php:
|
166 |
msgid "The verification is successfully completed."
|
167 |
msgstr "Перевірка завершена успішно."
|
168 |
|
169 |
-
#: google-captcha.php:
|
170 |
msgid "FAQ"
|
171 |
msgstr "FAQ"
|
172 |
|
173 |
-
#: google-captcha.php:
|
174 |
msgid "Support"
|
175 |
msgstr "Техпідтримка"
|
176 |
|
177 |
-
#: includes/allowlist.php:
|
178 |
-
msgid "Add New"
|
179 |
-
msgstr "Додати"
|
180 |
-
|
181 |
-
#: includes/allowlist.php:74
|
182 |
-
msgid "IP to Allow List"
|
183 |
-
msgstr "IP до білого списку"
|
184 |
-
|
185 |
-
#: includes/allowlist.php:81
|
186 |
-
msgid "My IP"
|
187 |
-
msgstr "Мій IP"
|
188 |
-
|
189 |
-
#: includes/allowlist.php:86 includes/pro_banners.php:40
|
190 |
-
msgid "Allowed formats"
|
191 |
-
msgstr "Доступні формати"
|
192 |
-
|
193 |
-
#: includes/allowlist.php:88
|
194 |
-
msgid "Allowed diapason"
|
195 |
-
msgstr "Доступні діапазони"
|
196 |
-
|
197 |
-
#: includes/allowlist.php:101
|
198 |
-
msgid "Add IP to Allow List"
|
199 |
-
msgstr "Додати IP до білого списку"
|
200 |
-
|
201 |
-
#: includes/allowlist.php:106
|
202 |
msgid "Search IP"
|
203 |
msgstr "Шукати IP"
|
204 |
|
205 |
-
#: includes/allowlist.php:
|
206 |
msgid "Nothing found"
|
207 |
msgstr "Нічого не знайдено"
|
208 |
|
209 |
-
#: includes/allowlist.php:
|
210 |
msgid "No IP in the Allow List"
|
211 |
msgstr "Список IP порожній"
|
212 |
|
213 |
-
#: includes/allowlist.php:
|
214 |
msgid "IP Address"
|
215 |
msgstr "IP адреса"
|
216 |
|
217 |
-
#: includes/allowlist.php:
|
218 |
msgid "Date Added"
|
219 |
msgstr "Дата додавання"
|
220 |
|
221 |
-
#: includes/allowlist.php:
|
222 |
msgid "Delete"
|
223 |
msgstr "Видалити"
|
224 |
|
225 |
-
#: includes/allowlist.php:
|
226 |
msgid "IP added to the allow list successfully."
|
227 |
msgstr "IP успішно додано до білого списку."
|
228 |
|
229 |
-
#: includes/allowlist.php:
|
230 |
-
#: includes/allowlist.php:
|
231 |
msgid "Some errors occurred."
|
232 |
msgstr "Відбулися деякі помилки."
|
233 |
|
234 |
-
#: includes/allowlist.php:
|
235 |
msgid "IP is already in the allow list."
|
236 |
msgstr "IP вже знаходиться в білому списку."
|
237 |
|
238 |
-
#: includes/allowlist.php:
|
239 |
msgid "Invalid IP. See allowed formats."
|
240 |
msgstr "Невірний IP. Дивіться доступні формати."
|
241 |
|
242 |
-
#: includes/allowlist.php:
|
243 |
msgid "One IP was deleted successfully."
|
244 |
msgstr "Одну IP було видалено успішно."
|
245 |
|
246 |
-
#: includes/allowlist.php:
|
247 |
msgid "You have not entered any IP."
|
248 |
msgstr "Ви не ввели жодного IP."
|
249 |
|
250 |
-
#: includes/allowlist.php:
|
251 |
msgid "You have not entered any IP in to the search form."
|
252 |
msgstr "Ви не ввели ніякого значення у форму пошуку."
|
253 |
|
254 |
-
#: includes/allowlist.php:
|
255 |
msgid "Search results for"
|
256 |
msgstr "Результати пошуку для"
|
257 |
|
@@ -263,394 +238,398 @@ msgstr "Різне"
|
|
263 |
msgid "Custom Code"
|
264 |
msgstr "Користувацький код"
|
265 |
|
266 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
267 |
msgid "License Key"
|
268 |
msgstr "Ліцензійний ключ"
|
269 |
|
270 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
271 |
msgid "Site Key"
|
272 |
msgstr "Ключ сайту"
|
273 |
|
274 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
275 |
msgid "Secret Key"
|
276 |
msgstr "Секретний ключ"
|
277 |
|
278 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
279 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
280 |
msgid "Version"
|
281 |
msgstr "Версія"
|
282 |
|
283 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
284 |
msgid "Invisible"
|
285 |
msgstr "Невидима"
|
286 |
|
287 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
288 |
msgid "Enter site key"
|
289 |
msgstr "Введіть ключ сайту"
|
290 |
|
291 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
292 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
293 |
msgid "WARNING: The captcha will not be displayed until you fill key fields."
|
294 |
msgstr ""
|
295 |
"УВАГА: Капча не буде відображатись, поки ви не заповните поля з ключами."
|
296 |
|
297 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
298 |
msgid "Enter secret key"
|
299 |
msgstr "Введіть секретний ключ"
|
300 |
|
301 |
-
#: includes/class-gglcptch-settings-tabs.php:
|
302 |
msgid "Settings saved."
|
303 |
msgstr "Налаштування збережені."
|
304 |
|
305 |
-
#: includes/
|
306 |
-
msgid "General"
|
307 |
-
msgstr "Загальне"
|
308 |
-
|
309 |
-
#: includes/class-gglcptch-settings-tabs.php:153
|
310 |
-
msgid "reCaptcha Version"
|
311 |
-
msgstr "Версія reCaptcha"
|
312 |
-
|
313 |
-
#: includes/class-gglcptch-settings-tabs.php:167
|
314 |
-
#, php-format
|
315 |
-
msgid ""
|
316 |
-
"Register your domain name with Google reCaptcha service and add the keys to "
|
317 |
-
"the fields below. %s Get the API Keys. %s"
|
318 |
-
msgstr ""
|
319 |
-
"Зареєструйте свій веб-сайт за допомогою Google reCaptcha, щоб отримати "
|
320 |
-
"необхідні API ключі та введіть їх нижче. %s Отримати API ключі. %s"
|
321 |
-
|
322 |
-
#: includes/class-gglcptch-settings-tabs.php:171
|
323 |
-
#, php-format
|
324 |
-
msgid ""
|
325 |
-
"If you do not want to create API keys use %s Captcha by BestWebSoft %s "
|
326 |
-
"plugin."
|
327 |
-
msgstr ""
|
328 |
-
"Якщо ви не хочете створювати ключі API, використовуйте %s Captcha by "
|
329 |
-
"BestWebSoft %s плагін."
|
330 |
-
|
331 |
-
#: includes/class-gglcptch-settings-tabs.php:189
|
332 |
-
msgid "Test reCaptcha"
|
333 |
-
msgstr "Тестування reCaptcha"
|
334 |
-
|
335 |
-
#: includes/class-gglcptch-settings-tabs.php:195
|
336 |
-
msgid "Enable reCaptcha for"
|
337 |
-
msgstr "Включити reCaptcha для"
|
338 |
-
|
339 |
-
#: includes/class-gglcptch-settings-tabs.php:242
|
340 |
-
#: includes/class-gglcptch-settings-tabs.php:270
|
341 |
-
#: includes/class-gglcptch-settings-tabs.php:297 includes/pro_banners.php:20
|
342 |
-
msgid "Close"
|
343 |
-
msgstr "Закрити"
|
344 |
-
|
345 |
-
#: includes/class-gglcptch-settings-tabs.php:253
|
346 |
-
msgid "reCaptcha Domain"
|
347 |
-
msgstr "reCaptcha Домен"
|
348 |
-
|
349 |
-
#: includes/class-gglcptch-settings-tabs.php:261
|
350 |
-
msgid ""
|
351 |
-
"If Google is not accessible or blocked in your country select other one."
|
352 |
-
msgstr ""
|
353 |
-
"Якщо Google недоступний або заблокований у вашій країні, виберіть інший "
|
354 |
-
"пункт."
|
355 |
-
|
356 |
-
#: includes/class-gglcptch-settings-tabs.php:279
|
357 |
-
msgid "Appearance"
|
358 |
-
msgstr "Зовнішній Вигляд"
|
359 |
-
|
360 |
-
#: includes/class-gglcptch-settings-tabs.php:283
|
361 |
-
msgid "Theme"
|
362 |
-
msgstr "Тема"
|
363 |
-
|
364 |
-
#: includes/class-gglcptch-settings-tabs.php:287
|
365 |
-
msgid "Light"
|
366 |
-
msgstr "Свiтла"
|
367 |
-
|
368 |
-
#: includes/class-gglcptch-settings-tabs.php:288
|
369 |
-
msgid "Dark"
|
370 |
-
msgstr "Темна"
|
371 |
-
|
372 |
-
#: includes/class-gglcptch-settings-tabs.php:308
|
373 |
-
msgid "Hide reCaptcha Badge"
|
374 |
-
msgstr "Сховати знак ReCaptcha"
|
375 |
-
|
376 |
-
#: includes/class-gglcptch-settings-tabs.php:313
|
377 |
-
msgid "Enable to hide reCaptcha Badge for Version 3 and Invisible reCaptcha."
|
378 |
-
msgstr ""
|
379 |
-
"Увімкніть, щоб приховати значок reCaptcha для версії 3 і Invisible reCaptcha."
|
380 |
-
|
381 |
-
#: includes/class-gglcptch-settings-tabs.php:319
|
382 |
-
msgid "Additional Protective Measures"
|
383 |
-
msgstr "Додаткові Захисні Заходи"
|
384 |
-
|
385 |
-
#: includes/class-gglcptch-settings-tabs.php:323
|
386 |
-
msgid "Score"
|
387 |
-
msgstr "Кількість очок"
|
388 |
-
|
389 |
-
#: includes/class-gglcptch-settings-tabs.php:328
|
390 |
-
#, php-format
|
391 |
-
msgid "Set the minimum verification score from %s to %s (default is %s)."
|
392 |
-
msgstr ""
|
393 |
-
"Вкажіть граничне значення, при якому перевірка буде пройдена від %s до %s "
|
394 |
-
"(за замовчуванням %s)."
|
395 |
-
|
396 |
-
#: includes/class-gglcptch-settings-tabs.php:332
|
397 |
-
msgid "Hide reCaptcha for"
|
398 |
-
msgstr "Сховати ReCaptcha для"
|
399 |
-
|
400 |
-
#: includes/class-gglcptch-settings-tabs.php:350
|
401 |
-
msgid "Allow List Notification"
|
402 |
-
msgstr "Повідомлення про знаходження у білому списку"
|
403 |
-
|
404 |
-
#: includes/class-gglcptch-settings-tabs.php:353
|
405 |
-
msgid "This message will be displayed instead of the reCaptcha."
|
406 |
-
msgstr "Це повідомлення буде відображатися замість reCaptcha."
|
407 |
-
|
408 |
-
#: includes/class-gglcptch-settings-tabs.php:357
|
409 |
-
msgid "Advanced Protection"
|
410 |
-
msgstr "Посилений захист"
|
411 |
-
|
412 |
-
#: includes/class-gglcptch-settings-tabs.php:361
|
413 |
-
msgid ""
|
414 |
-
"Enable to keep submit button disabled until reCaptcha is loaded (do not use "
|
415 |
-
"this option if you see \"Failed to load Google reCaptcha\" message)."
|
416 |
-
msgstr ""
|
417 |
-
"Увімкніть, щоб кнопка підтвердження залишалася відключеною до тих пір, поки "
|
418 |
-
"не буде завантажена reCaptcha (Не використовуйте цю опцію, якщо ви бачите "
|
419 |
-
"повідомлення \"Не вдалося завантажити Google reCaptcha\")."
|
420 |
-
|
421 |
-
#: includes/class-gglcptch-settings-tabs.php:367
|
422 |
-
msgid "Disabled Submit Button"
|
423 |
-
msgstr "Відключена кнопка підтвердження"
|
424 |
-
|
425 |
-
#: includes/class-gglcptch-settings-tabs.php:372
|
426 |
-
msgid ""
|
427 |
-
"Enable to keep submit button disabled until user passes the reCaptcha test "
|
428 |
-
"(for Version 2)."
|
429 |
-
msgstr ""
|
430 |
-
"Увімкніть, щоб кнопка відправки залишалася відключеною до тих пір, поки "
|
431 |
-
"користувач не пройде тест reCaptcha (для версії 2)."
|
432 |
-
|
433 |
-
#: includes/class-gglcptch-settings-tabs.php:386
|
434 |
-
msgid ""
|
435 |
-
"reCaptcha version was changed. Please submit \"Test reCaptcha\" and "
|
436 |
-
"regenerate Site and Secret keys if necessary."
|
437 |
-
msgstr ""
|
438 |
-
"Версію reCaptcha було змінено. Будь ласка, натисніть \"Тестування reCaptcha"
|
439 |
-
"\" та оновіть секретний ключ та ключ сайту, якщо це необхідно."
|
440 |
-
|
441 |
-
#: includes/class-gglcptch-settings-tabs.php:396
|
442 |
-
#, php-format
|
443 |
-
msgid "ReCaptcha plugin is fully compliant with GDPR. %s Learn more %s"
|
444 |
-
msgstr "Плагін ReCaptcha повністю відповідає GDPR. %s Докладніше %s"
|
445 |
-
|
446 |
-
#: includes/class-gglcptch-settings-tabs.php:411
|
447 |
-
msgid "reCaptcha Shortcode"
|
448 |
-
msgstr "Шорткод reCaptcha"
|
449 |
-
|
450 |
-
#: includes/class-gglcptch-settings-tabs.php:414
|
451 |
-
msgid "Add reCaptcha to your posts or pages using the following shortcode:"
|
452 |
-
msgstr ""
|
453 |
-
"Додайте reCaptcha до своїх постів або сторінок за допомогою такого шорткоду:"
|
454 |
-
|
455 |
-
#: includes/forms.php:11
|
456 |
msgid "Login form"
|
457 |
msgstr "Форма логіну"
|
458 |
|
459 |
-
#: includes/forms.php:
|
460 |
msgid "Registration form"
|
461 |
msgstr "Форма реєстрації"
|
462 |
|
463 |
-
#: includes/forms.php:
|
464 |
msgid "Reset password form"
|
465 |
msgstr "Форма відновлення паролю"
|
466 |
|
467 |
-
#: includes/forms.php:
|
468 |
msgid "Comments form"
|
469 |
msgstr "Форма коментарів"
|
470 |
|
471 |
-
#: includes/forms.php:
|
472 |
msgid "Testimonials"
|
473 |
msgstr "Testimonials"
|
474 |
|
475 |
-
#: includes/forms.php:
|
476 |
msgid "WordPress default"
|
477 |
msgstr "Стандартних форм WordPress"
|
478 |
|
479 |
-
#: includes/forms.php:
|
480 |
msgid "External Plugins"
|
481 |
msgstr "Зовнішні плагіни"
|
482 |
|
483 |
-
#: includes/forms.php:
|
484 |
msgid "Custom Forms"
|
485 |
msgstr "Користувацькі форми"
|
486 |
|
487 |
-
#: includes/forms.php:
|
488 |
msgid "reCaptcha Plugin"
|
489 |
msgstr "Плагін reCaptcha"
|
490 |
|
491 |
-
#: includes/forms.php:
|
492 |
msgid "Activate"
|
493 |
msgstr "Активувати"
|
494 |
|
495 |
-
#: includes/forms.php:
|
496 |
msgid "Install Now"
|
497 |
msgstr "Встановити зараз"
|
498 |
|
499 |
-
#: includes/forms.php:
|
500 |
msgid "Authentication failed."
|
501 |
msgstr "Помилка аутентифікації."
|
502 |
|
503 |
-
#: includes/forms.php:
|
504 |
msgid "Click the BACK button on your browser and try again."
|
505 |
msgstr "Натисніть кнопку НАЗАД у браузері та спробуйте ще раз."
|
506 |
|
507 |
-
#: includes/pro_banners.php:
|
508 |
-
msgid "This options is available in Pro version of plugin"
|
509 |
-
msgstr "Ця опція доступна в Pro версії плагіну"
|
510 |
-
|
511 |
-
#: includes/pro_banners.php:41
|
512 |
-
msgid "Allowed separators for IPs: a comma"
|
513 |
-
msgstr "Доступні роздільники для IP: кома"
|
514 |
-
|
515 |
-
#: includes/pro_banners.php:41 includes/pro_banners.php:44
|
516 |
-
msgid "semicolon"
|
517 |
-
msgstr "крапка з комою"
|
518 |
-
|
519 |
-
#: includes/pro_banners.php:41
|
520 |
-
msgid "ordinary space, tab, new line or carriage return."
|
521 |
-
msgstr "звичайній пробіл, табуляція, нова строка або повернення каретки."
|
522 |
-
|
523 |
-
#: includes/pro_banners.php:42
|
524 |
-
msgid "Reason"
|
525 |
-
msgstr "Причина"
|
526 |
-
|
527 |
-
#: includes/pro_banners.php:44
|
528 |
-
msgid "Allowed separators for reasons: a comma"
|
529 |
-
msgstr "Доступні роздільники для причин: кома"
|
530 |
-
|
531 |
-
#: includes/pro_banners.php:44
|
532 |
-
msgid "tab, new line or carriage return."
|
533 |
-
msgstr "табуляція, нова строка або повернення каретки."
|
534 |
-
|
535 |
-
#: includes/pro_banners.php:53
|
536 |
msgid "Jetpack Contact Form"
|
537 |
msgstr "Контактна форма Jetpack"
|
538 |
|
539 |
-
#: includes/pro_banners.php:
|
540 |
msgid "bbPress New Topic form"
|
541 |
msgstr "Форма \"Нова тема\" плагіну bbPress"
|
542 |
|
543 |
-
#: includes/pro_banners.php:
|
544 |
msgid "bbPress Reply form"
|
545 |
msgstr "Форма \"Відповісти\" плагіну bbPress"
|
546 |
|
547 |
-
#: includes/pro_banners.php:
|
548 |
msgid "BuddyPress Registration form"
|
549 |
msgstr "Форма реєстрації плагіну BuddyPress"
|
550 |
|
551 |
-
#: includes/pro_banners.php:
|
552 |
msgid "BuddyPress Comments form"
|
553 |
msgstr "Форма коментарів плагіну BuddyPress"
|
554 |
|
555 |
-
#: includes/pro_banners.php:
|
556 |
msgid "BuddyPress Add New Group form"
|
557 |
msgstr "Форма \"Додати нову групу\" плагіну BuddyPress"
|
558 |
|
559 |
-
#: includes/pro_banners.php:
|
560 |
msgid "WooCommerce Login form"
|
561 |
msgstr "Форма логіну плагіна WooCommerce"
|
562 |
|
563 |
-
#: includes/pro_banners.php:
|
564 |
msgid "WooCommerce Registration form"
|
565 |
msgstr "Форма реєстрації плагіна WooCommerce"
|
566 |
|
567 |
-
#: includes/pro_banners.php:
|
568 |
msgid "WooCommerce Reset password form"
|
569 |
msgstr "Форма відновлення пароля плагіна WooCommerce"
|
570 |
|
571 |
-
#: includes/pro_banners.php:
|
572 |
msgid "WooCommerce Checkout form"
|
573 |
msgstr "Форма оформлення замовлення плагіна WooCommerce"
|
574 |
|
575 |
-
#: includes/pro_banners.php:
|
576 |
msgid "wpForo Login form"
|
577 |
msgstr "Форма логіну плагіна wpForo"
|
578 |
|
579 |
-
#: includes/pro_banners.php:
|
580 |
msgid "wpForo Registration form"
|
581 |
msgstr "Форма реєстрації плагина wpForo"
|
582 |
|
583 |
-
#: includes/pro_banners.php:
|
584 |
msgid "wpForo New Topic form"
|
585 |
msgstr "Форма нової теми плагіна wpForo"
|
586 |
|
587 |
-
#: includes/pro_banners.php:
|
588 |
msgid "wpForo Reply form"
|
589 |
msgstr "Форма відповіді плагина wpForo"
|
590 |
|
591 |
-
#: includes/pro_banners.php:
|
592 |
msgid "Ninja Forms"
|
593 |
msgstr "Ninja Forms"
|
594 |
|
595 |
-
#: includes/pro_banners.php:
|
596 |
msgid "Divi Contact Form"
|
597 |
msgstr "Контактна форма плагіна Divi"
|
598 |
|
599 |
-
#: includes/pro_banners.php:
|
600 |
msgid "Divi Login Form"
|
601 |
msgstr "Форма логіну плагіна Divi"
|
602 |
|
603 |
-
#: includes/pro_banners.php:
|
604 |
msgid "Gravity Forms"
|
605 |
msgstr "Gravity Forms"
|
606 |
|
607 |
-
#: includes/pro_banners.php:
|
608 |
msgid "WPForms"
|
609 |
msgstr "WPForms"
|
610 |
|
611 |
-
#: includes/pro_banners.php:
|
612 |
msgid "Ultimate Member Login form"
|
613 |
msgstr "Форма логіну плагіна Ultimate Member"
|
614 |
|
615 |
-
#: includes/pro_banners.php:
|
616 |
msgid "Ultimate Member Registration form"
|
617 |
msgstr "Форма реєстрації плагіна Ultimate Member"
|
618 |
|
619 |
-
#: includes/pro_banners.php:
|
620 |
msgid "Ultimate Member Profile form"
|
621 |
msgstr "Форма профілю плагіна Ultimate Member"
|
622 |
|
623 |
-
#: includes/pro_banners.php:
|
624 |
msgid "Elementor Contact Form"
|
625 |
msgstr "Контактна форма Elementor"
|
626 |
|
627 |
-
#: includes/pro_banners.php:
|
628 |
-
msgid "
|
629 |
-
msgstr "
|
630 |
|
631 |
-
#: includes/pro_banners.php:
|
632 |
-
msgid "
|
633 |
-
msgstr "
|
634 |
|
635 |
-
#: includes/pro_banners.php:
|
636 |
-
msgid ""
|
637 |
-
"
|
638 |
-
|
639 |
-
|
640 |
-
"
|
641 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
|
643 |
-
|
644 |
-
|
645 |
-
msgstr "Розмір"
|
646 |
|
647 |
-
|
648 |
-
|
649 |
-
msgstr "Нормальний"
|
650 |
|
651 |
-
|
652 |
-
|
653 |
-
msgstr "Компактний"
|
654 |
|
655 |
#~ msgid "Get the API Keys."
|
656 |
#~ msgstr "Отримати API ключі."
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: reCaptcha\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2022-12-09 14:11+0200\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: bestwebsoft.com <plugin@bestwebsoft.com>\n"
|
8 |
"Language-Team: the BestWebSoft Team <plugin@bestwebsoft.com>\n"
|
15 |
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
17 |
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
+
"X-Generator: Poedit 3.1.1\n"
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
20 |
"X-Poedit-SearchPathExcluded-0: bws_menu\n"
|
21 |
|
22 |
+
#: google-captcha.php:39 google-captcha.php:49 google-captcha.php:527
|
|
|
23 |
msgid "reCaptcha Settings"
|
24 |
msgstr "Налаштування reCaptcha"
|
25 |
|
26 |
+
#: google-captcha.php:50 google-captcha.php:1125 google-captcha.php:1138
|
27 |
#: includes/class-gglcptch-settings-tabs.php:22
|
28 |
msgid "Settings"
|
29 |
msgstr "Налаштування"
|
30 |
|
31 |
+
#: google-captcha.php:58
|
32 |
msgid "reCaptcha Allow List"
|
33 |
msgstr "Білий список reCaptcha"
|
34 |
|
36 |
msgid "Allow List"
|
37 |
msgstr "Доступні діапазони"
|
38 |
|
39 |
+
#: google-captcha.php:76
|
40 |
msgid "Upgrade to Pro"
|
41 |
msgstr "Оновити до Pro"
|
42 |
|
56 |
msgid "Warning"
|
57 |
msgstr "Увага"
|
58 |
|
59 |
+
#: google-captcha.php:421
|
60 |
msgid "You are in the allow list"
|
61 |
msgstr "Ви знаходитесь в білому списку"
|
62 |
|
63 |
+
#: google-captcha.php:528
|
64 |
msgid "Please enable JavaScript in your browser."
|
65 |
msgstr "Будь ласка, увімкніть JavaScript у вашому браузері."
|
66 |
|
67 |
+
#: google-captcha.php:611
|
68 |
msgid "This site is protected by reCAPTCHA and the Google "
|
69 |
msgstr "Цей сайт захищений reCAPTCHA і застосовуються "
|
70 |
|
71 |
+
#: google-captcha.php:612
|
72 |
msgid "Privacy Policy"
|
73 |
msgstr "Політика конфіденційності"
|
74 |
|
75 |
+
#: google-captcha.php:613
|
76 |
msgid " and "
|
77 |
msgstr " та "
|
78 |
|
79 |
+
#: google-captcha.php:614
|
80 |
msgid "Terms of Service"
|
81 |
msgstr "Умови обслуговування"
|
82 |
|
83 |
+
#: google-captcha.php:615
|
84 |
msgid " apply."
|
85 |
msgstr " Google."
|
86 |
|
87 |
+
#: google-captcha.php:622
|
88 |
msgid "To use reCaptcha you must get the keys from"
|
89 |
msgstr "Щоб використовувати reCaptcha, вам необхідно отримати ключі з"
|
90 |
|
91 |
+
#: google-captcha.php:623
|
92 |
msgid "here"
|
93 |
msgstr "тут"
|
94 |
|
95 |
+
#: google-captcha.php:624
|
96 |
msgid "and enter them on the"
|
97 |
msgstr "і вставте їх у"
|
98 |
|
99 |
+
#: google-captcha.php:626
|
100 |
msgid "plugin setting page"
|
101 |
msgstr "сторінку налаштувань плагіну"
|
102 |
|
103 |
+
#: google-captcha.php:795
|
104 |
msgid "Response is empty"
|
105 |
msgstr "Відповідь порожня"
|
106 |
|
107 |
+
#: google-captcha.php:896 includes/forms.php:373
|
108 |
msgid "Error"
|
109 |
msgstr "Помилка"
|
110 |
|
111 |
+
#: google-captcha.php:1025
|
112 |
+
msgid "The reCaptcha verification failed. Please try again."
|
113 |
+
msgstr "Не вдалося перевірити reCaptcha. Будь ласка спробуйте ще раз."
|
114 |
|
115 |
+
#: google-captcha.php:1027
|
116 |
msgid "Secret Key is missing."
|
117 |
msgstr "Секретний ключ відсутній."
|
118 |
|
119 |
+
#: google-captcha.php:1030
|
120 |
msgid "Secret Key is invalid."
|
121 |
msgstr "Секретний ключ некоректний."
|
122 |
|
123 |
+
#: google-captcha.php:1031
|
124 |
msgid "Check your domain configurations"
|
125 |
msgstr "Перевірте конфігурацію вашого домену"
|
126 |
|
127 |
+
#: google-captcha.php:1032
|
128 |
msgid "and enter it again"
|
129 |
msgstr "і введіть його знову"
|
130 |
|
131 |
+
#: google-captcha.php:1034
|
132 |
msgid "User response is invalid"
|
133 |
msgstr "Некоректна відповідь користувача"
|
134 |
|
135 |
+
#: google-captcha.php:1035
|
136 |
msgid "You have entered an incorrect reCAPTCHA value."
|
137 |
msgstr "Ви ввели невірне значення reCAPTCHA."
|
138 |
|
139 |
+
#: google-captcha.php:1036
|
140 |
msgid ""
|
141 |
"More than one reCAPTCHA has been found in the current form. Please remove "
|
142 |
"all unnecessary reCAPTCHA fields to make it work properly."
|
144 |
"В поточній формі знайдено більш ніж один блок reCAPTCHA. Будь-ласка видаліть "
|
145 |
"усі зайві блоки reCAPTCHA для коректної подальшої роботи."
|
146 |
|
147 |
+
#: google-captcha.php:1038
|
148 |
msgid "reCaptcha v3 test failed"
|
149 |
msgstr "Тест reCaptcha v3 не пройдений"
|
150 |
|
151 |
+
#: google-captcha.php:1076
|
152 |
msgid "Please submit \"Test verification\""
|
153 |
msgstr "Будь ласка, натисніть кнопку \"Тестування перевірки\""
|
154 |
|
155 |
+
#: google-captcha.php:1078
|
156 |
msgid "Please complete the captcha and submit \"Test verification\""
|
157 |
msgstr ""
|
158 |
"Будь ласка, заповніть капчу і натисніть кнопку \"Тестування перевірки\""
|
159 |
|
160 |
+
#: google-captcha.php:1084
|
161 |
msgid "Test verification"
|
162 |
msgstr "Тестування перевірки"
|
163 |
|
164 |
+
#: google-captcha.php:1105
|
165 |
msgid "The verification is successfully completed."
|
166 |
msgstr "Перевірка завершена успішно."
|
167 |
|
168 |
+
#: google-captcha.php:1140
|
169 |
msgid "FAQ"
|
170 |
msgstr "FAQ"
|
171 |
|
172 |
+
#: google-captcha.php:1141
|
173 |
msgid "Support"
|
174 |
msgstr "Техпідтримка"
|
175 |
|
176 |
+
#: includes/allowlist.php:119
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
msgid "Search IP"
|
178 |
msgstr "Шукати IP"
|
179 |
|
180 |
+
#: includes/allowlist.php:180
|
181 |
msgid "Nothing found"
|
182 |
msgstr "Нічого не знайдено"
|
183 |
|
184 |
+
#: includes/allowlist.php:180
|
185 |
msgid "No IP in the Allow List"
|
186 |
msgstr "Список IP порожній"
|
187 |
|
188 |
+
#: includes/allowlist.php:189
|
189 |
msgid "IP Address"
|
190 |
msgstr "IP адреса"
|
191 |
|
192 |
+
#: includes/allowlist.php:190
|
193 |
msgid "Date Added"
|
194 |
msgstr "Дата додавання"
|
195 |
|
196 |
+
#: includes/allowlist.php:249 includes/allowlist.php:260
|
197 |
msgid "Delete"
|
198 |
msgstr "Видалити"
|
199 |
|
200 |
+
#: includes/allowlist.php:351
|
201 |
msgid "IP added to the allow list successfully."
|
202 |
msgstr "IP успішно додано до білого списку."
|
203 |
|
204 |
+
#: includes/allowlist.php:353 includes/allowlist.php:379
|
205 |
+
#: includes/allowlist.php:396
|
206 |
msgid "Some errors occurred."
|
207 |
msgstr "Відбулися деякі помилки."
|
208 |
|
209 |
+
#: includes/allowlist.php:356
|
210 |
msgid "IP is already in the allow list."
|
211 |
msgstr "IP вже знаходиться в білому списку."
|
212 |
|
213 |
+
#: includes/allowlist.php:359
|
214 |
msgid "Invalid IP. See allowed formats."
|
215 |
msgstr "Невірний IP. Дивіться доступні формати."
|
216 |
|
217 |
+
#: includes/allowlist.php:392
|
218 |
msgid "One IP was deleted successfully."
|
219 |
msgstr "Одну IP було видалено успішно."
|
220 |
|
221 |
+
#: includes/allowlist.php:399
|
222 |
msgid "You have not entered any IP."
|
223 |
msgstr "Ви не ввели жодного IP."
|
224 |
|
225 |
+
#: includes/allowlist.php:402
|
226 |
msgid "You have not entered any IP in to the search form."
|
227 |
msgstr "Ви не ввели ніякого значення у форму пошуку."
|
228 |
|
229 |
+
#: includes/allowlist.php:404
|
230 |
msgid "Search results for"
|
231 |
msgstr "Результати пошуку для"
|
232 |
|
238 |
msgid "Custom Code"
|
239 |
msgstr "Користувацький код"
|
240 |
|
241 |
+
#: includes/class-gglcptch-settings-tabs.php:25
|
242 |
msgid "License Key"
|
243 |
msgstr "Ліцензійний ключ"
|
244 |
|
245 |
+
#: includes/class-gglcptch-settings-tabs.php:49
|
246 |
msgid "Site Key"
|
247 |
msgstr "Ключ сайту"
|
248 |
|
249 |
+
#: includes/class-gglcptch-settings-tabs.php:54
|
250 |
msgid "Secret Key"
|
251 |
msgstr "Секретний ключ"
|
252 |
|
253 |
+
#: includes/class-gglcptch-settings-tabs.php:61
|
254 |
+
#: includes/class-gglcptch-settings-tabs.php:62
|
255 |
msgid "Version"
|
256 |
msgstr "Версія"
|
257 |
|
258 |
+
#: includes/class-gglcptch-settings-tabs.php:63
|
259 |
msgid "Invisible"
|
260 |
msgstr "Невидима"
|
261 |
|
262 |
+
#: includes/class-gglcptch-settings-tabs.php:93
|
263 |
msgid "Enter site key"
|
264 |
msgstr "Введіть ключ сайту"
|
265 |
|
266 |
+
#: includes/class-gglcptch-settings-tabs.php:94
|
267 |
+
#: includes/class-gglcptch-settings-tabs.php:101
|
268 |
msgid "WARNING: The captcha will not be displayed until you fill key fields."
|
269 |
msgstr ""
|
270 |
"УВАГА: Капча не буде відображатись, поки ви не заповните поля з ключами."
|
271 |
|
272 |
+
#: includes/class-gglcptch-settings-tabs.php:100
|
273 |
msgid "Enter secret key"
|
274 |
msgstr "Введіть секретний ключ"
|
275 |
|
276 |
+
#: includes/class-gglcptch-settings-tabs.php:138
|
277 |
msgid "Settings saved."
|
278 |
msgstr "Налаштування збережені."
|
279 |
|
280 |
+
#: includes/forms.php:12
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
msgid "Login form"
|
282 |
msgstr "Форма логіну"
|
283 |
|
284 |
+
#: includes/forms.php:13
|
285 |
msgid "Registration form"
|
286 |
msgstr "Форма реєстрації"
|
287 |
|
288 |
+
#: includes/forms.php:14
|
289 |
msgid "Reset password form"
|
290 |
msgstr "Форма відновлення паролю"
|
291 |
|
292 |
+
#: includes/forms.php:15
|
293 |
msgid "Comments form"
|
294 |
msgstr "Форма коментарів"
|
295 |
|
296 |
+
#: includes/forms.php:17
|
297 |
msgid "Testimonials"
|
298 |
msgstr "Testimonials"
|
299 |
|
300 |
+
#: includes/forms.php:39
|
301 |
msgid "WordPress default"
|
302 |
msgstr "Стандартних форм WordPress"
|
303 |
|
304 |
+
#: includes/forms.php:48 includes/pro_banners.php:93
|
305 |
msgid "External Plugins"
|
306 |
msgstr "Зовнішні плагіни"
|
307 |
|
308 |
+
#: includes/forms.php:60
|
309 |
msgid "Custom Forms"
|
310 |
msgstr "Користувацькі форми"
|
311 |
|
312 |
+
#: includes/forms.php:84
|
313 |
msgid "reCaptcha Plugin"
|
314 |
msgstr "Плагін reCaptcha"
|
315 |
|
316 |
+
#: includes/forms.php:124 includes/forms.php:148
|
317 |
msgid "Activate"
|
318 |
msgstr "Активувати"
|
319 |
|
320 |
+
#: includes/forms.php:126 includes/forms.php:151 includes/forms.php:155
|
321 |
msgid "Install Now"
|
322 |
msgstr "Встановити зараз"
|
323 |
|
324 |
+
#: includes/forms.php:277
|
325 |
msgid "Authentication failed."
|
326 |
msgstr "Помилка аутентифікації."
|
327 |
|
328 |
+
#: includes/forms.php:375
|
329 |
msgid "Click the BACK button on your browser and try again."
|
330 |
msgstr "Натисніть кнопку НАЗАД у браузері та спробуйте ще раз."
|
331 |
|
332 |
+
#: includes/pro_banners.php:58
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
msgid "Jetpack Contact Form"
|
334 |
msgstr "Контактна форма Jetpack"
|
335 |
|
336 |
+
#: includes/pro_banners.php:61
|
337 |
msgid "bbPress New Topic form"
|
338 |
msgstr "Форма \"Нова тема\" плагіну bbPress"
|
339 |
|
340 |
+
#: includes/pro_banners.php:62
|
341 |
msgid "bbPress Reply form"
|
342 |
msgstr "Форма \"Відповісти\" плагіну bbPress"
|
343 |
|
344 |
+
#: includes/pro_banners.php:63
|
345 |
msgid "BuddyPress Registration form"
|
346 |
msgstr "Форма реєстрації плагіну BuddyPress"
|
347 |
|
348 |
+
#: includes/pro_banners.php:64
|
349 |
msgid "BuddyPress Comments form"
|
350 |
msgstr "Форма коментарів плагіну BuddyPress"
|
351 |
|
352 |
+
#: includes/pro_banners.php:65
|
353 |
msgid "BuddyPress Add New Group form"
|
354 |
msgstr "Форма \"Додати нову групу\" плагіну BuddyPress"
|
355 |
|
356 |
+
#: includes/pro_banners.php:66
|
357 |
msgid "WooCommerce Login form"
|
358 |
msgstr "Форма логіну плагіна WooCommerce"
|
359 |
|
360 |
+
#: includes/pro_banners.php:67
|
361 |
msgid "WooCommerce Registration form"
|
362 |
msgstr "Форма реєстрації плагіна WooCommerce"
|
363 |
|
364 |
+
#: includes/pro_banners.php:68
|
365 |
msgid "WooCommerce Reset password form"
|
366 |
msgstr "Форма відновлення пароля плагіна WooCommerce"
|
367 |
|
368 |
+
#: includes/pro_banners.php:69
|
369 |
msgid "WooCommerce Checkout form"
|
370 |
msgstr "Форма оформлення замовлення плагіна WooCommerce"
|
371 |
|
372 |
+
#: includes/pro_banners.php:70
|
373 |
msgid "wpForo Login form"
|
374 |
msgstr "Форма логіну плагіна wpForo"
|
375 |
|
376 |
+
#: includes/pro_banners.php:71
|
377 |
msgid "wpForo Registration form"
|
378 |
msgstr "Форма реєстрації плагина wpForo"
|
379 |
|
380 |
+
#: includes/pro_banners.php:72
|
381 |
msgid "wpForo New Topic form"
|
382 |
msgstr "Форма нової теми плагіна wpForo"
|
383 |
|
384 |
+
#: includes/pro_banners.php:73
|
385 |
msgid "wpForo Reply form"
|
386 |
msgstr "Форма відповіді плагина wpForo"
|
387 |
|
388 |
+
#: includes/pro_banners.php:74
|
389 |
msgid "Ninja Forms"
|
390 |
msgstr "Ninja Forms"
|
391 |
|
392 |
+
#: includes/pro_banners.php:75
|
393 |
msgid "Divi Contact Form"
|
394 |
msgstr "Контактна форма плагіна Divi"
|
395 |
|
396 |
+
#: includes/pro_banners.php:76
|
397 |
msgid "Divi Login Form"
|
398 |
msgstr "Форма логіну плагіна Divi"
|
399 |
|
400 |
+
#: includes/pro_banners.php:77
|
401 |
msgid "Gravity Forms"
|
402 |
msgstr "Gravity Forms"
|
403 |
|
404 |
+
#: includes/pro_banners.php:78
|
405 |
msgid "WPForms"
|
406 |
msgstr "WPForms"
|
407 |
|
408 |
+
#: includes/pro_banners.php:79
|
409 |
msgid "Ultimate Member Login form"
|
410 |
msgstr "Форма логіну плагіна Ultimate Member"
|
411 |
|
412 |
+
#: includes/pro_banners.php:80
|
413 |
msgid "Ultimate Member Registration form"
|
414 |
msgstr "Форма реєстрації плагіна Ultimate Member"
|
415 |
|
416 |
+
#: includes/pro_banners.php:81
|
417 |
msgid "Ultimate Member Profile form"
|
418 |
msgstr "Форма профілю плагіна Ultimate Member"
|
419 |
|
420 |
+
#: includes/pro_banners.php:83
|
421 |
msgid "Elementor Contact Form"
|
422 |
msgstr "Контактна форма Elementor"
|
423 |
|
424 |
+
#: includes/pro_banners.php:84
|
425 |
+
msgid "MemberPress checkout form"
|
426 |
+
msgstr "Форма оформлення замовлення плагіна MemberPress"
|
427 |
|
428 |
+
#: includes/pro_banners.php:85
|
429 |
+
msgid "MemberPress login form"
|
430 |
+
msgstr "Форма логіну плагіна MemberPress"
|
431 |
|
432 |
+
#: includes/pro_banners.php:86
|
433 |
+
msgid "MemberPress forgot password form"
|
434 |
+
msgstr "Форма відновлення паролю MemberPress"
|
435 |
+
|
436 |
+
#: includes/pro_banners.php:87
|
437 |
+
msgid "LearnDash login form"
|
438 |
+
msgstr "Форма логіну LearnDash"
|
439 |
+
|
440 |
+
#: includes/pro_banners.php:88
|
441 |
+
msgid "LearnDash registration form"
|
442 |
+
msgstr "Форма реєстрації LearnDash"
|
443 |
+
|
444 |
+
#: includes/pro_banners.php:89
|
445 |
+
msgid "BuddyBoss registration form"
|
446 |
+
msgstr "Форма реєстрації BuddyPress"
|
447 |
+
|
448 |
+
#~ msgid "User response is missing."
|
449 |
+
#~ msgstr "Відповідь користувача відсутня."
|
450 |
+
|
451 |
+
#~ msgid "Add New"
|
452 |
+
#~ msgstr "Додати"
|
453 |
+
|
454 |
+
#~ msgid "IP to Allow List"
|
455 |
+
#~ msgstr "IP до білого списку"
|
456 |
+
|
457 |
+
#~ msgid "My IP"
|
458 |
+
#~ msgstr "Мій IP"
|
459 |
+
|
460 |
+
#~ msgid "Allowed formats"
|
461 |
+
#~ msgstr "Доступні формати"
|
462 |
+
|
463 |
+
#~ msgid "Allowed diapason"
|
464 |
+
#~ msgstr "Доступні діапазони"
|
465 |
+
|
466 |
+
#~ msgid "Add IP to Allow List"
|
467 |
+
#~ msgstr "Додати IP до білого списку"
|
468 |
+
|
469 |
+
#~ msgid "General"
|
470 |
+
#~ msgstr "Загальне"
|
471 |
+
|
472 |
+
#~ msgid "reCaptcha Version"
|
473 |
+
#~ msgstr "Версія reCaptcha"
|
474 |
+
|
475 |
+
#, php-format
|
476 |
+
#~ msgid ""
|
477 |
+
#~ "Register your domain name with Google reCaptcha service and add the keys "
|
478 |
+
#~ "to the fields below. %s Get the API Keys. %s"
|
479 |
+
#~ msgstr ""
|
480 |
+
#~ "Зареєструйте свій веб-сайт за допомогою Google reCaptcha, щоб отримати "
|
481 |
+
#~ "необхідні API ключі та введіть їх нижче. %s Отримати API ключі. %s"
|
482 |
+
|
483 |
+
#, php-format
|
484 |
+
#~ msgid ""
|
485 |
+
#~ "If you do not want to create API keys use %s Captcha by BestWebSoft %s "
|
486 |
+
#~ "plugin."
|
487 |
+
#~ msgstr ""
|
488 |
+
#~ "Якщо ви не хочете створювати ключі API, використовуйте %s Captcha by "
|
489 |
+
#~ "BestWebSoft %s плагін."
|
490 |
+
|
491 |
+
#~ msgid "Test reCaptcha"
|
492 |
+
#~ msgstr "Тестування reCaptcha"
|
493 |
+
|
494 |
+
#~ msgid "Enable reCaptcha for"
|
495 |
+
#~ msgstr "Включити reCaptcha для"
|
496 |
+
|
497 |
+
#~ msgid "Close"
|
498 |
+
#~ msgstr "Закрити"
|
499 |
+
|
500 |
+
#~ msgid "reCaptcha Domain"
|
501 |
+
#~ msgstr "reCaptcha Домен"
|
502 |
+
|
503 |
+
#~ msgid ""
|
504 |
+
#~ "If Google is not accessible or blocked in your country select other one."
|
505 |
+
#~ msgstr ""
|
506 |
+
#~ "Якщо Google недоступний або заблокований у вашій країні, виберіть інший "
|
507 |
+
#~ "пункт."
|
508 |
+
|
509 |
+
#~ msgid "Appearance"
|
510 |
+
#~ msgstr "Зовнішній Вигляд"
|
511 |
+
|
512 |
+
#~ msgid "Theme"
|
513 |
+
#~ msgstr "Тема"
|
514 |
+
|
515 |
+
#~ msgid "Light"
|
516 |
+
#~ msgstr "Свiтла"
|
517 |
+
|
518 |
+
#~ msgid "Dark"
|
519 |
+
#~ msgstr "Темна"
|
520 |
+
|
521 |
+
#~ msgid "Hide reCaptcha Badge"
|
522 |
+
#~ msgstr "Сховати знак ReCaptcha"
|
523 |
+
|
524 |
+
#~ msgid ""
|
525 |
+
#~ "Enable to hide reCaptcha Badge for Version 3 and Invisible reCaptcha."
|
526 |
+
#~ msgstr ""
|
527 |
+
#~ "Увімкніть, щоб приховати значок reCaptcha для версії 3 і Invisible "
|
528 |
+
#~ "reCaptcha."
|
529 |
+
|
530 |
+
#~ msgid "Additional Protective Measures"
|
531 |
+
#~ msgstr "Додаткові Захисні Заходи"
|
532 |
+
|
533 |
+
#~ msgid "Score"
|
534 |
+
#~ msgstr "Кількість очок"
|
535 |
+
|
536 |
+
#, php-format
|
537 |
+
#~ msgid "Set the minimum verification score from %s to %s (default is %s)."
|
538 |
+
#~ msgstr ""
|
539 |
+
#~ "Вкажіть граничне значення, при якому перевірка буде пройдена від %s до %s "
|
540 |
+
#~ "(за замовчуванням %s)."
|
541 |
+
|
542 |
+
#~ msgid "Hide reCaptcha for"
|
543 |
+
#~ msgstr "Сховати ReCaptcha для"
|
544 |
+
|
545 |
+
#~ msgid "Allow List Notification"
|
546 |
+
#~ msgstr "Повідомлення про знаходження у білому списку"
|
547 |
+
|
548 |
+
#~ msgid "This message will be displayed instead of the reCaptcha."
|
549 |
+
#~ msgstr "Це повідомлення буде відображатися замість reCaptcha."
|
550 |
+
|
551 |
+
#~ msgid "Advanced Protection"
|
552 |
+
#~ msgstr "Посилений захист"
|
553 |
+
|
554 |
+
#~ msgid ""
|
555 |
+
#~ "Enable to keep submit button disabled until reCaptcha is loaded (do not "
|
556 |
+
#~ "use this option if you see \"Failed to load Google reCaptcha\" message)."
|
557 |
+
#~ msgstr ""
|
558 |
+
#~ "Увімкніть, щоб кнопка підтвердження залишалася відключеною до тих пір, "
|
559 |
+
#~ "поки не буде завантажена reCaptcha (Не використовуйте цю опцію, якщо ви "
|
560 |
+
#~ "бачите повідомлення \"Не вдалося завантажити Google reCaptcha\")."
|
561 |
+
|
562 |
+
#~ msgid "Disabled Submit Button"
|
563 |
+
#~ msgstr "Відключена кнопка підтвердження"
|
564 |
+
|
565 |
+
#~ msgid ""
|
566 |
+
#~ "Enable to keep submit button disabled until user passes the reCaptcha "
|
567 |
+
#~ "test (for Version 2)."
|
568 |
+
#~ msgstr ""
|
569 |
+
#~ "Увімкніть, щоб кнопка відправки залишалася відключеною до тих пір, поки "
|
570 |
+
#~ "користувач не пройде тест reCaptcha (для версії 2)."
|
571 |
+
|
572 |
+
#~ msgid ""
|
573 |
+
#~ "reCaptcha version was changed. Please submit \"Test reCaptcha\" and "
|
574 |
+
#~ "regenerate Site and Secret keys if necessary."
|
575 |
+
#~ msgstr ""
|
576 |
+
#~ "Версію reCaptcha було змінено. Будь ласка, натисніть \"Тестування "
|
577 |
+
#~ "reCaptcha\" та оновіть секретний ключ та ключ сайту, якщо це необхідно."
|
578 |
+
|
579 |
+
#, php-format
|
580 |
+
#~ msgid "ReCaptcha plugin is fully compliant with GDPR. %s Learn more %s"
|
581 |
+
#~ msgstr "Плагін ReCaptcha повністю відповідає GDPR. %s Докладніше %s"
|
582 |
+
|
583 |
+
#~ msgid "reCaptcha Shortcode"
|
584 |
+
#~ msgstr "Шорткод reCaptcha"
|
585 |
+
|
586 |
+
#~ msgid "Add reCaptcha to your posts or pages using the following shortcode:"
|
587 |
+
#~ msgstr ""
|
588 |
+
#~ "Додайте reCaptcha до своїх постів або сторінок за допомогою такого "
|
589 |
+
#~ "шорткоду:"
|
590 |
+
|
591 |
+
#~ msgid "This options is available in Pro version of plugin"
|
592 |
+
#~ msgstr "Ця опція доступна в Pro версії плагіну"
|
593 |
+
|
594 |
+
#~ msgid "Allowed separators for IPs: a comma"
|
595 |
+
#~ msgstr "Доступні роздільники для IP: кома"
|
596 |
+
|
597 |
+
#~ msgid "semicolon"
|
598 |
+
#~ msgstr "крапка з комою"
|
599 |
+
|
600 |
+
#~ msgid "ordinary space, tab, new line or carriage return."
|
601 |
+
#~ msgstr "звичайній пробіл, табуляція, нова строка або повернення каретки."
|
602 |
+
|
603 |
+
#~ msgid "Reason"
|
604 |
+
#~ msgstr "Причина"
|
605 |
+
|
606 |
+
#~ msgid "Allowed separators for reasons: a comma"
|
607 |
+
#~ msgstr "Доступні роздільники для причин: кома"
|
608 |
+
|
609 |
+
#~ msgid "tab, new line or carriage return."
|
610 |
+
#~ msgstr "табуляція, нова строка або повернення каретки."
|
611 |
+
|
612 |
+
#~ msgid "Language"
|
613 |
+
#~ msgstr "Мова"
|
614 |
+
|
615 |
+
#~ msgid "Multilanguage"
|
616 |
+
#~ msgstr "Multilanguage"
|
617 |
+
|
618 |
+
#~ msgid ""
|
619 |
+
#~ "Enable to switch language automatically on multilingual website using the "
|
620 |
+
#~ "Multilanguage plugin."
|
621 |
+
#~ msgstr ""
|
622 |
+
#~ "Увімкніть, щоб перемкнути мову автоматично на багатомовному сайті, "
|
623 |
+
#~ "використовуючи плагін Multilanguage."
|
624 |
|
625 |
+
#~ msgid "Size"
|
626 |
+
#~ msgstr "Розмір"
|
|
|
627 |
|
628 |
+
#~ msgid "Normal"
|
629 |
+
#~ msgstr "Нормальний"
|
|
|
630 |
|
631 |
+
#~ msgid "Compact"
|
632 |
+
#~ msgstr "Компактний"
|
|
|
633 |
|
634 |
#~ msgid "Get the API Keys."
|
635 |
#~ msgstr "Отримати API ключі."
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: bestwebsoft
|
|
3 |
Donate link: https://bestwebsoft.com/donate/
|
4 |
Tags: anti-spam security, antispam, recaptcha, captcha, captha, Invisible reCaptcha, Invisible captcha, Invisibl reCaptcha, comment, cpatcha, google catcha, Invisible re captcha, recaptcha version3
|
5 |
Requires at least: 5.6
|
6 |
-
Tested up to: 6.
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -278,22 +278,30 @@ Please make sure that the problem hasn't been discussed yet on our forum (<https
|
|
278 |
|
279 |
== Changelog ==
|
280 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
= V1.68 - 05.09.2022 =
|
282 |
* Update : BWS Panel changes.
|
283 |
-
* Pro: The compatibility with BuddyBoss has been added.
|
284 |
-
* Pro: The compatibility with LearnDash registration page has been added.
|
285 |
-
* Bugfix: Minor bugs fixed.
|
286 |
|
287 |
= V1.67 - 20.04.2022 =
|
288 |
* Update : BWS Panel changes.
|
289 |
-
* Pro: Divi Child Theme fixes.
|
290 |
-
* Pro: Jetpack Contact Form Fixes.
|
291 |
-
* Pro: Elementor Popup contact form issue has been fixed.
|
292 |
-
* Bugfix: "User response is missing." message has been fixed.
|
293 |
-
* Pro: WPForms plugin issue with reCaptcha v2 has been fixed.
|
294 |
-
* Pro: Hide reCaptcha for Administrator oprion for Contact Form 7 has been fixed.
|
295 |
-
* Bugfix: Menu issue for WordPress 5.9 as been fixed.
|
296 |
-
* Bugfix: Other minor fixes.
|
297 |
|
298 |
|
299 |
= V1.66 - 22.11.2021 =
|
@@ -595,6 +603,14 @@ Please make sure that the problem hasn't been discussed yet on our forum (<https
|
|
595 |
|
596 |
== Upgrade Notice ==
|
597 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
598 |
= V1.68 =
|
599 |
* Plugin optimization completed.
|
600 |
* New features added.
|
3 |
Donate link: https://bestwebsoft.com/donate/
|
4 |
Tags: anti-spam security, antispam, recaptcha, captcha, captha, Invisible reCaptcha, Invisible captcha, Invisibl reCaptcha, comment, cpatcha, google catcha, Invisible re captcha, recaptcha version3
|
5 |
Requires at least: 5.6
|
6 |
+
Tested up to: 6.1
|
7 |
+
Stable tag: 1.70
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
278 |
|
279 |
== Changelog ==
|
280 |
|
281 |
+
= V1.70 - 09.12.2022 =
|
282 |
+
* Pro : Option for display V3 on all pages
|
283 |
+
* Update : BWS Panel section was updated.
|
284 |
+
* Bugfix : Minor bugs fixed.
|
285 |
+
|
286 |
+
= V1.69 - 10.09.2022 =
|
287 |
+
* Bugfix : Minor bugs fixed.
|
288 |
+
|
289 |
= V1.68 - 05.09.2022 =
|
290 |
* Update : BWS Panel changes.
|
291 |
+
* Pro : The compatibility with BuddyBoss has been added.
|
292 |
+
* Pro : The compatibility with LearnDash registration page has been added.
|
293 |
+
* Bugfix : Minor bugs fixed.
|
294 |
|
295 |
= V1.67 - 20.04.2022 =
|
296 |
* Update : BWS Panel changes.
|
297 |
+
* Pro : Divi Child Theme fixes.
|
298 |
+
* Pro : Jetpack Contact Form Fixes.
|
299 |
+
* Pro : Elementor Popup contact form issue has been fixed.
|
300 |
+
* Bugfix : "User response is missing." message has been fixed.
|
301 |
+
* Pro : WPForms plugin issue with reCaptcha v2 has been fixed.
|
302 |
+
* Pro : Hide reCaptcha for Administrator oprion for Contact Form 7 has been fixed.
|
303 |
+
* Bugfix : Menu issue for WordPress 5.9 as been fixed.
|
304 |
+
* Bugfix : Other minor fixes.
|
305 |
|
306 |
|
307 |
= V1.66 - 22.11.2021 =
|
603 |
|
604 |
== Upgrade Notice ==
|
605 |
|
606 |
+
= V1.70 =
|
607 |
+
* Plugin optimization completed.
|
608 |
+
* New features added.
|
609 |
+
* Bugs fixed.
|
610 |
+
|
611 |
+
= V1.69 =
|
612 |
+
* Bugs fixed.
|
613 |
+
|
614 |
= V1.68 =
|
615 |
* Plugin optimization completed.
|
616 |
* New features added.
|