Version Description
- Resolves issue where post_updated action was not firing after reordering of nested view.
- Adds ability to save a custom URL for pages in the nav menu (Example: outputting an anchor link rather than the page's link). To add a custom link, select quick edit, followed by the "Menu Options" tab. There is a new "Custom URL" input.
- Corrects previous version's Yoast indicator display.
- Fixes bug where padding was not reset correctly when dragging a sub-level item to the primary/main level
Download this release
Release Info
Developer | kylephillips |
Plugin | Nested Pages |
Version | 3.2.0 |
Comparing to | |
See all releases |
Code changes from version 3.1.22 to 3.2.0
- app/Entities/NavMenu/NavMenuFrontEnd.php +20 -4
- app/Entities/NavMenu/NavMenuSyncListing.php +7 -0
- app/Entities/PluginIntegration/YoastSeo.php +9 -3
- app/Entities/Post/PostDataFactory.php +2 -0
- app/Entities/Post/PostUpdateRepository.php +39 -25
- app/Entities/Post/PrivatePostParent.php +1 -0
- app/NestedPages.php +1 -1
- app/Views/forms/quickedit-post.php +4 -0
- app/Views/partials/row.php +2 -5
- assets/css/nestedpages.css +1 -1
- assets/js/lib/nestedpages.formatter.js +3 -0
- assets/js/lib/nestedpages.menu-links.js +1 -1
- assets/js/lib/nestedpages.quickedit-post.js +3 -1
- assets/js/nestedpages.js +1 -1
- assets/js/nestedpages.min.js +1 -1
- nestedpages.php +1 -1
- readme.txt +7 -1
app/Entities/NavMenu/NavMenuFrontEnd.php
CHANGED
@@ -16,18 +16,19 @@ class NavMenuFrontEnd
|
|
16 |
public function __construct()
|
17 |
{
|
18 |
$this->nav_menu_repo = new NavMenuRepository;
|
19 |
-
add_filter('nav_menu_link_attributes', [$this, '
|
|
|
20 |
}
|
21 |
|
22 |
/**
|
23 |
* Filter the link attributes on the generated menu
|
24 |
*/
|
25 |
-
public function
|
26 |
{
|
27 |
if ( get_option('nestedpages_menusync') !== 'sync' ) return $atts;
|
28 |
if ( get_option('nestedpages_disable_menu') == 'true' ) return $atts;
|
29 |
-
|
30 |
if ( $this->nav_menu_repo->getMenuID() == null ) return $atts;
|
|
|
31 |
if ( !isset($args->menu->term_id) ) return $atts;
|
32 |
if ( $args->menu->term_id !== $this->nav_menu_repo->getMenuID() ) return $atts;
|
33 |
|
@@ -37,7 +38,22 @@ class NavMenuFrontEnd
|
|
37 |
if ( $value == $item->object ) unset($atts[$attribute]);
|
38 |
if ( is_numeric($value) ) unset($atts[$attribute]);
|
39 |
}
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
return $atts;
|
42 |
}
|
43 |
}
|
16 |
public function __construct()
|
17 |
{
|
18 |
$this->nav_menu_repo = new NavMenuRepository;
|
19 |
+
add_filter('nav_menu_link_attributes', [$this, 'linkAttribute'], 10, 3);
|
20 |
+
add_filter('nav_menu_link_attributes', [$this, 'hrefAttribute'], 10, 3);
|
21 |
}
|
22 |
|
23 |
/**
|
24 |
* Filter the link attributes on the generated menu
|
25 |
*/
|
26 |
+
public function linkAttribute($atts, $item, $args)
|
27 |
{
|
28 |
if ( get_option('nestedpages_menusync') !== 'sync' ) return $atts;
|
29 |
if ( get_option('nestedpages_disable_menu') == 'true' ) return $atts;
|
|
|
30 |
if ( $this->nav_menu_repo->getMenuID() == null ) return $atts;
|
31 |
+
|
32 |
if ( !isset($args->menu->term_id) ) return $atts;
|
33 |
if ( $args->menu->term_id !== $this->nav_menu_repo->getMenuID() ) return $atts;
|
34 |
|
38 |
if ( $value == $item->object ) unset($atts[$attribute]);
|
39 |
if ( is_numeric($value) ) unset($atts[$attribute]);
|
40 |
}
|
41 |
+
|
42 |
+
return $atts;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Add a custom link if one is set
|
47 |
+
*/
|
48 |
+
public function hrefAttribute($atts, $item, $args)
|
49 |
+
{
|
50 |
+
if ( get_option('nestedpages_menusync') !== 'sync' ) return $atts;
|
51 |
+
if ( get_option('nestedpages_disable_menu') == 'true' ) return $atts;
|
52 |
+
if ( $this->nav_menu_repo->getMenuID() == null ) return $atts;
|
53 |
+
if ( !isset($item->object_id) ) return $atts;
|
54 |
+
$custom_url = get_post_meta($item->object_id, '_np_nav_custom_url', true);
|
55 |
+
if ( !$custom_url ) return $atts;
|
56 |
+
$atts['href'] = $custom_url;
|
57 |
return $atts;
|
58 |
}
|
59 |
}
|
app/Entities/NavMenu/NavMenuSyncListing.php
CHANGED
@@ -123,7 +123,14 @@ class NavMenuSyncListing extends NavMenuSync
|
|
123 |
'menu-item-target' => $this->post->link_target,
|
124 |
'menu-item-description' => $this->nav_menu_repo->getMenuItem($menu_item_id, 'description')
|
125 |
];
|
|
|
126 |
$menu = wp_update_nav_menu_item($this->id, $menu_item_id, $args);
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
return $menu;
|
128 |
}
|
129 |
}
|
123 |
'menu-item-target' => $this->post->link_target,
|
124 |
'menu-item-description' => $this->nav_menu_repo->getMenuItem($menu_item_id, 'description')
|
125 |
];
|
126 |
+
|
127 |
$menu = wp_update_nav_menu_item($this->id, $menu_item_id, $args);
|
128 |
+
|
129 |
+
if ( $this->post->nav_custom_url ) :
|
130 |
+
$url = $this->post->nav_custom_url;
|
131 |
+
update_post_meta( $menu, '_menu_item_url', $this->post->nav_custom_url );
|
132 |
+
endif;
|
133 |
+
|
134 |
return $menu;
|
135 |
}
|
136 |
}
|
app/Entities/PluginIntegration/YoastSeo.php
CHANGED
@@ -21,18 +21,24 @@ class YoastSeo
|
|
21 |
}
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
24 |
public function getScore($post_id)
|
25 |
{
|
26 |
$yoast_score = get_post_meta($post_id, '_yoast_wpseo_meta-robots-noindex', true);
|
27 |
if ( ! $yoast_score ) {
|
28 |
$yoast_score = get_post_meta($post_id, '_yoast_wpseo_linkdex', true);
|
29 |
if ( version_compare(WPSEO_VERSION, '19.5.1', '<') ){
|
30 |
-
|
|
|
31 |
}
|
32 |
$score_icon_helper = YoastSEO()->helpers->score_icon;
|
33 |
-
|
|
|
34 |
} else {
|
35 |
-
return '
|
36 |
}
|
37 |
}
|
38 |
}
|
21 |
}
|
22 |
}
|
23 |
|
24 |
+
/**
|
25 |
+
* Get the Score HTML
|
26 |
+
* @return str|html - Yoast indicator
|
27 |
+
*/
|
28 |
public function getScore($post_id)
|
29 |
{
|
30 |
$yoast_score = get_post_meta($post_id, '_yoast_wpseo_meta-robots-noindex', true);
|
31 |
if ( ! $yoast_score ) {
|
32 |
$yoast_score = get_post_meta($post_id, '_yoast_wpseo_linkdex', true);
|
33 |
if ( version_compare(WPSEO_VERSION, '19.5.1', '<') ){
|
34 |
+
$score = \WPSEO_Utils::translate_score($yoast_score);
|
35 |
+
return '<span class="np-seo-indicator ' . esc_html($score) . '"></span>';
|
36 |
}
|
37 |
$score_icon_helper = YoastSEO()->helpers->score_icon;
|
38 |
+
$score_icon_presenter = $score_icon_helper->for_readability($yoast_score);
|
39 |
+
return $score_icon_presenter->present();
|
40 |
} else {
|
41 |
+
return '<span class="np-seo-indicator no-index"></span>';
|
42 |
}
|
43 |
}
|
44 |
}
|
app/Entities/Post/PostDataFactory.php
CHANGED
@@ -25,6 +25,7 @@ class PostDataFactory
|
|
25 |
*/
|
26 |
public function build($post, $h_taxonomies = null, $f_taxonomies = null)
|
27 |
{
|
|
|
28 |
$this->integrations = new IntegrationFactory;
|
29 |
$this->post_data = new \WP_Post($post);
|
30 |
$this->addPostVars($post);
|
@@ -71,6 +72,7 @@ class PostDataFactory
|
|
71 |
$this->post_data->nav_type = ( isset($meta['_np_nav_menu_item_type'][0]) ) ? $meta['_np_nav_menu_item_type'][0] : null;
|
72 |
$this->post_data->nav_status = ( isset($meta['_np_nav_status'][0]) && $meta['_np_nav_status'][0] == 'hide' ) ? 'hide' : 'show';
|
73 |
$this->post_data->np_status = ( isset($meta['_nested_pages_status'][0]) && $meta['_nested_pages_status'][0] == 'hide' ) ? 'hide' : 'show';
|
|
|
74 |
$this->post_data->template = ( isset($meta['_wp_page_template'][0]) ) ? $meta['_wp_page_template'][0] : false;
|
75 |
|
76 |
// Yoast Score
|
25 |
*/
|
26 |
public function build($post, $h_taxonomies = null, $f_taxonomies = null)
|
27 |
{
|
28 |
+
if ( is_int($post) ) $post = get_post($post);
|
29 |
$this->integrations = new IntegrationFactory;
|
30 |
$this->post_data = new \WP_Post($post);
|
31 |
$this->addPostVars($post);
|
72 |
$this->post_data->nav_type = ( isset($meta['_np_nav_menu_item_type'][0]) ) ? $meta['_np_nav_menu_item_type'][0] : null;
|
73 |
$this->post_data->nav_status = ( isset($meta['_np_nav_status'][0]) && $meta['_np_nav_status'][0] == 'hide' ) ? 'hide' : 'show';
|
74 |
$this->post_data->np_status = ( isset($meta['_nested_pages_status'][0]) && $meta['_nested_pages_status'][0] == 'hide' ) ? 'hide' : 'show';
|
75 |
+
$this->post_data->nav_custom_url = ( isset($meta['_np_nav_custom_url'][0]) && $meta['_np_nav_custom_url'][0] !== '' ) ? $meta['_np_nav_custom_url'][0] : null;
|
76 |
$this->post_data->template = ( isset($meta['_wp_page_template'][0]) ) ? $meta['_wp_page_template'][0] : false;
|
77 |
|
78 |
// Yoast Score
|
app/Entities/Post/PostUpdateRepository.php
CHANGED
@@ -63,34 +63,28 @@ class PostUpdateRepository
|
|
63 |
$post_id = sanitize_text_field($post['id']);
|
64 |
$original_modifed_date = get_post_modified_time('Y-m-d H:i:s', false, $post_id);
|
65 |
$original_modifed_date_gmt = get_post_modified_time('Y-m-d H:i:s', true, $post_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
// Reset the modified date to the last modified date
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
);
|
79 |
-
else : // The posts are filtered, don't update the parent
|
80 |
-
$query = $wpdb->prepare(
|
81 |
-
"UPDATE $wpdb->posts
|
82 |
-
SET menu_order = '%d', post_modified = '%s', post_modified_gmt = '%s'
|
83 |
-
WHERE ID = '%d'",
|
84 |
-
intval($key),
|
85 |
-
$original_modifed_date,
|
86 |
-
$original_modifed_date_gmt,
|
87 |
-
intval($post_id)
|
88 |
-
);
|
89 |
-
endif;
|
90 |
-
|
91 |
-
$wpdb->query( $query );
|
92 |
-
do_action('nestedpages_post_order_updated', $post_id, $parent, $key, $filtered);
|
93 |
|
|
|
94 |
if ( isset($post['children']) ) $this->updateOrder($post['children'], $post_id);
|
95 |
}
|
96 |
do_action('nestedpages_posts_order_updated', $posts, $parent);
|
@@ -168,6 +162,7 @@ class PostUpdateRepository
|
|
168 |
$this->updateLinkTarget($data);
|
169 |
$this->updateTitleAttribute($data);
|
170 |
$this->updateNavCSS($data);
|
|
|
171 |
|
172 |
return true;
|
173 |
}
|
@@ -261,6 +256,25 @@ class PostUpdateRepository
|
|
261 |
}
|
262 |
}
|
263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
/**
|
265 |
* Update Nested Pages Menu Title Attribute
|
266 |
* @since 1.0
|
63 |
$post_id = sanitize_text_field($post['id']);
|
64 |
$original_modifed_date = get_post_modified_time('Y-m-d H:i:s', false, $post_id);
|
65 |
$original_modifed_date_gmt = get_post_modified_time('Y-m-d H:i:s', true, $post_id);
|
66 |
+
$args = [
|
67 |
+
'ID' => $post_id,
|
68 |
+
'menu_order' => intval($key),
|
69 |
+
'post_modified' => $original_modifed_date,
|
70 |
+
'post_modified_gmt' => $original_modifed_date_gmt
|
71 |
+
];
|
72 |
+
if ( !$filtered ) $args['post_parent'] = intval($parent);
|
73 |
+
wp_update_post($args);
|
74 |
|
75 |
// Reset the modified date to the last modified date
|
76 |
+
// We can't use the above update_post, because wp_insert_post defaults to the current time
|
77 |
+
$query = $wpdb->prepare(
|
78 |
+
"UPDATE $wpdb->posts
|
79 |
+
SET post_modified = '%s', post_modified_gmt = '%s'
|
80 |
+
WHERE ID = '%d'",
|
81 |
+
$original_modifed_date,
|
82 |
+
$original_modifed_date_gmt,
|
83 |
+
intval($post_id)
|
84 |
+
);
|
85 |
+
$wpdb->query($query);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
+
do_action('nestedpages_post_order_updated', $post_id, $parent, $key, $filtered);
|
88 |
if ( isset($post['children']) ) $this->updateOrder($post['children'], $post_id);
|
89 |
}
|
90 |
do_action('nestedpages_posts_order_updated', $posts, $parent);
|
162 |
$this->updateLinkTarget($data);
|
163 |
$this->updateTitleAttribute($data);
|
164 |
$this->updateNavCSS($data);
|
165 |
+
$this->updateNavCustomUrl($data);
|
166 |
|
167 |
return true;
|
168 |
}
|
256 |
}
|
257 |
}
|
258 |
|
259 |
+
/**
|
260 |
+
* Update Nested Pages Menu Custom URL
|
261 |
+
* @since 3.2.0
|
262 |
+
* @param array data
|
263 |
+
*/
|
264 |
+
private function updateNavCustomUrl($data)
|
265 |
+
{
|
266 |
+
if ( !current_user_can('edit_post', $data['post_id']) ) return;
|
267 |
+
if ( isset($data['np_nav_custom_url']) ){
|
268 |
+
$url_input = $data['np_nav_custom_url'];
|
269 |
+
$url = ( $url_input == '#' ) ? '#' : esc_url($data['np_nav_custom_url']);
|
270 |
+
update_post_meta(
|
271 |
+
$data['post_id'],
|
272 |
+
'_np_nav_custom_url',
|
273 |
+
$url
|
274 |
+
);
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
/**
|
279 |
* Update Nested Pages Menu Title Attribute
|
280 |
* @since 1.0
|
app/Entities/Post/PrivatePostParent.php
CHANGED
@@ -32,6 +32,7 @@ class PrivatePostParent
|
|
32 |
'echo' => 0,
|
33 |
'post_status' => ['publish', 'private', 'draft'],
|
34 |
];
|
|
|
35 |
|
36 |
$defaults = [
|
37 |
'depth' => 0,
|
32 |
'echo' => 0,
|
33 |
'post_status' => ['publish', 'private', 'draft'],
|
34 |
];
|
35 |
+
$args = apply_filters( 'page_attributes_dropdown_pages_args', $args, $post );
|
36 |
|
37 |
$defaults = [
|
38 |
'depth' => 0,
|
app/NestedPages.php
CHANGED
@@ -12,7 +12,7 @@ class NestedPages
|
|
12 |
$np_env = 'live';
|
13 |
|
14 |
global $np_version;
|
15 |
-
$np_version = '3.
|
16 |
|
17 |
if ( is_admin() ) $app = new NestedPages\Bootstrap;
|
18 |
if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
|
12 |
$np_env = 'live';
|
13 |
|
14 |
global $np_version;
|
15 |
+
$np_version = '3.2.0';
|
16 |
|
17 |
if ( is_admin() ) $app = new NestedPages\Bootstrap;
|
18 |
if ( !is_admin() ) $app = new NestedPages\FrontEndBootstrap;
|
app/Views/forms/quickedit-post.php
CHANGED
@@ -256,6 +256,10 @@ $has_menu_options = ( $this->user->canSortPosts($this->post_type->name) && $this
|
|
256 |
<label><?php _e( 'CSS Classes' ); ?></label>
|
257 |
<input type="text" name="np_nav_css_classes" class="np_nav_css_classes" value="" />
|
258 |
</div>
|
|
|
|
|
|
|
|
|
259 |
</div><!-- .menuoptions-left -->
|
260 |
<div class="right">
|
261 |
<div class="form-control">
|
256 |
<label><?php _e( 'CSS Classes' ); ?></label>
|
257 |
<input type="text" name="np_nav_css_classes" class="np_nav_css_classes" value="" />
|
258 |
</div>
|
259 |
+
<div class="form-control">
|
260 |
+
<label><?php _e( 'Custom URL' ); ?></label>
|
261 |
+
<input type="text" name="np_nav_custom_url" class="np_nav_custom_url" placeholder="<?php _e('Example: #', 'wp-nested-pages'); ?>" value="" />
|
262 |
+
</div>
|
263 |
</div><!-- .menuoptions-left -->
|
264 |
<div class="right">
|
265 |
<div class="form-control">
|
app/Views/partials/row.php
CHANGED
@@ -94,11 +94,7 @@ if ( !$wpml ) $wpml_pages = true;
|
|
94 |
</div>
|
95 |
<?php endif; ?>
|
96 |
|
97 |
-
<?php
|
98 |
-
if ( $this->integrations->plugins->yoast->installed ){
|
99 |
-
echo '<span class="np-seo-indicator ' . esc_html($this->post->score) . '"></span>';
|
100 |
-
}
|
101 |
-
?>
|
102 |
|
103 |
<div class="action-buttons">
|
104 |
|
@@ -252,6 +248,7 @@ if ( !$wpml ) $wpml_pages = true;
|
|
252 |
data-timeformat="<?php echo get_option('time_format'); ?>"
|
253 |
data-ampm="<?php echo date('a', $this->post->date->datepicker); ?>"
|
254 |
data-sticky="<?php if ( in_array($this->post->id, $this->sticky_posts) ) echo 'sticky'; ?>"
|
|
|
255 |
<?php echo $this->custom_fields_repo->dataAttributes($this->post, $this->post_type); ?>
|
256 |
>
|
257 |
<?php _e('Quick Edit', 'wp-nested-pages'); ?>
|
94 |
</div>
|
95 |
<?php endif; ?>
|
96 |
|
97 |
+
<?php if ( $this->integrations->plugins->yoast->installed ) echo $this->post->score; ?>
|
|
|
|
|
|
|
|
|
98 |
|
99 |
<div class="action-buttons">
|
100 |
|
248 |
data-timeformat="<?php echo get_option('time_format'); ?>"
|
249 |
data-ampm="<?php echo date('a', $this->post->date->datepicker); ?>"
|
250 |
data-sticky="<?php if ( in_array($this->post->id, $this->sticky_posts) ) echo 'sticky'; ?>"
|
251 |
+
data-custom-url="<?php echo esc_attr($this->post->nav_custom_url); ?>"
|
252 |
<?php echo $this->custom_fields_repo->dataAttributes($this->post, $this->post_type); ?>
|
253 |
>
|
254 |
<?php _e('Quick Edit', 'wp-nested-pages'); ?>
|
assets/css/nestedpages.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.nestedpages .updated,.nestedpages-dropdown-content ul:after,.nestedpages-listing-title:after,.nestedpages-modal-content .modal-footer:after,.nestedpages-modal-full .modal-header:after,.nestedpages-tools,.nestedpages-tools:after,.nestedpages-top-toggles:after{clear:both}.np-btn{text-decoration:none;color:#555;display:inline-block;background-color:#f7f7f7;border:1px solid #e1e1e1;padding:5px 8px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;vertical-align:top}.np-btn:hover{background-color:#0074a2;color:#fff;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;border-color:#0074a2}.np-btn.disabled,.np-btn:disabled{opacity:.6;cursor:not-allowed}.np-btn.has-icon{padding:0}.np-btn-half{float:left;width:47%;padding:3px 0;text-align:center}.np-btn-half.btn-right{float:right}.np-btn-trash{background-color:#e14d43;border-color:#e14d43;color:#fff}.np-btn-trash:hover{background-color:#ba281e;border-color:#ba281e}.np-quickedit-error,.np-quickedit-info{padding:4px 0 4px 8px;margin-bottom:10px;background-color:#f9f9f9}.np-quickedit-error{border-left:4px solid #dd3d36}.np-quickedit-info{border-left:4px solid #0074a2}.nestedpages-modal-backdrop{position:fixed;width:100%;height:100%;background-color:rgba(0,0,0,.85);top:0;left:0;z-index:9999;visibility:hidden;opacity:0;-webkit-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease}.nestedpages-modal-backdrop.active{visibility:visible;opacity:1;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.nestedpages-modal-content{z-index:99999;position:fixed;top:-200%;width:90%;height:80%;margin:10px auto 0;background-color:#fff;left:5%;-webkit-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease}.nestedpages-modal-content.small{width:400px;left:50%;margin-left:-200px}.nestedpages-modal-content.short{height:auto}.nestedpages-modal-content.active{top:50%;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.nestedpages-modal-content h5{font-size:1.1em}.nestedpages-modal-content .modal-body{position:relative;padding:10px}.nestedpages-modal-content .modal-body.new-child{padding:0}.nestedpages-modal-content .modal-footer{padding:10px;text-align:right;background-color:#404040;zoom:1}.nestedpages-modal-content .modal-footer:after,.nestedpages-modal-content .modal-footer:before{content:" ";display:table}.nestedpages-modal-content .modal-footer .modal-close{float:left}.nestedpages-modal-content .modal-open .modal{overflow-x:hidden;overflow-y:auto}.nestedpages-modal-content .modal-content{position:relative;background-color:#fff;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.nestedpages-modal-full{width:94%;height:94%;-webkit-transform:none;-ms-transform:none;transform:none;left:3%}.nestedpages-modal-full.active{top:3%}.nestedpages-modal-full .modal-header{position:absolute;top:0;left:0;width:100%;height:50px;z-index:4;zoom:1;padding-left:.5em}.nestedpages-modal-full .modal-header:after,.nestedpages-modal-full .modal-header:before{content:" ";display:table}.nestedpages-modal-full .modal-content-interior{padding-top:50px;height:100%}.nestedpages-modal-full .modal-content-interior .modal-content-body{height:100%;max-height:100%}.np-trash-modal{text-align:center}.np-trash-modal .modal-body{padding-bottom:30px}.np-trash-modal .button-primary{margin-left:10px}.clone-modal h3{margin:0;padding:8px;background-color:#e5e5e5}.clone-modal .form-control{margin:0!important;padding:5px 10px}.np-inline-overlay{position:fixed;width:100%;height:100%;background-color:rgba(0,0,0,.4);z-index:998;top:0;right:0;bottom:0;left:0;opacity:0;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.np-inline-overlay.active{opacity:1;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.np-inline-modal{position:relative;z-index:999;background-color:#fff;border-radius:0;-webkit-box-shadow:0 0 4px 0 rgba(0,0,0,.5);box-shadow:0 0 4px 0 rgba(0,0,0,.5)}.nestedpages-listing-title{zoom:1}.nestedpages-listing-title:after,.nestedpages-listing-title:before{content:" ";display:table}.nestedpages-toggleall.np-btn{float:right}.np-toggle-publish{color:#999}.np-toggle-publish.active{color:#333;font-weight:700}.np-sync-menu-cont{float:right;margin:0 15px 0 0}.np-sync-menu-cont button{position:relative;top:-5px;padding:5px 8px}.np-sync-menu-cont label{position:relative;top:4px}.nestedpages-top-toggles{float:right;zoom:1;padding-top:10px}.nestedpages-top-toggles:after,.nestedpages-top-toggles:before{content:" ";display:table}.np-tab-pane{display:none}.nestedpages ul.np-tabs,.ul.np-tabs{background:0 0;text-align:left;list-style-type:none;margin:0 0 10px;padding:0;border-bottom:1px solid #ccc;font-size:0;line-height:0}.nestedpages ul.np-tabs li,.ul.np-tabs li{font-size:13px;line-height:1.4em;display:inline-block;margin:0 0 0 6px;border:0}.nestedpages ul.np-tabs li a,.ul.np-tabs li a{background-color:#e6e6e6;display:block;text-decoration:none;padding:8px 15px;color:#333;border:1px solid #ccc;border-bottom:0}.nestedpages ul.np-tabs li a:hover,.ul.np-tabs li a:hover{background-color:#fff}.nestedpages ul.np-tabs li a:active,.nestedpages ul.np-tabs li a:focus,.ul.np-tabs li a:active,.ul.np-tabs li a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}.nestedpages ul.np-tabs li.active a,.ul.np-tabs li.active a{font-weight:700;position:relative;color:#333;background-color:#fff}.nestedpages ul.np-tabs li.active a:after,.ul.np-tabs li.active a:after{position:absolute;width:100%;height:2px;content:'';background-color:#fff;left:0;bottom:-1px}.nestedpages-datepicker.ui-datepicker{background-color:#fff;font-size:90%;-webkit-box-shadow:0 0 3px 0 rgba(0,0,0,.4);box-shadow:0 0 3px 0 rgba(0,0,0,.4);border-radius:3px;padding:0;width:auto}.nestedpages-datepicker.ui-datepicker .ui-datepicker-next,.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev{position:absolute;color:#fff;top:0;right:0;cursor:pointer;display:block;width:35px;height:35px;font-size:0;background:url(../images/datepicker-arrow-next.png) center;opacity:1;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.nestedpages-datepicker.ui-datepicker .ui-datepicker-next:hover,.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev:hover{opacity:.5;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar{margin:0;border-collapse:collapse}.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev{right:auto;left:0;background:url(../images/datepicker-arrow-prev.png)}.nestedpages-datepicker.ui-datepicker .ui-datepicker-header{padding:0}.nestedpages-datepicker.ui-datepicker .ui-datepicker-title{background-color:#1a1a1a;text-align:center;color:#fff;height:35px;line-height:35px;border-radius:3px 3px 0 0;margin:0}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar table{width:auto}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar td,.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar th{text-align:center;width:30px;height:30px}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar th{background-color:#e6e6e6;text-transform:uppercase;font-size:11px;letter-spacing:1px;padding:0}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar td{border-top:1px solid #ebebeb;border-left:1px solid #ebebeb;padding:0}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar td:first-child{border-left:0}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a{text-align:center;padding:0;text-decoration:none;color:#333;display:block;background-color:#fff;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;width:30px;height:30px;line-height:30px}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a.ui-state-active{background-color:#1a1a1a;color:#fff}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a:hover{background-color:#333;color:#fff;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.nestedpages-dropdown{position:relative;z-index:3;display:inline-block}.nestedpages-dropdown-content{display:none;position:absolute;top:40px;left:0;z-index:2;background-color:#fff;width:250px;text-align:left;border-radius:2px;-webkit-box-shadow:1px 1px 3px 0 rgba(51,51,51,.4);box-shadow:1px 1px 3px 0 rgba(51,51,51,.4)}.nestedpages-dropdown-content.padded{padding:1em}.nestedpages-dropdown-content p{line-height:1.4;margin:0}.nestedpages-dropdown-content.right{left:auto;right:0}.nestedpages-dropdown-content ul{list-style-type:none;margin:0;padding:0;zoom:1}.nestedpages-dropdown-content ul:after,.nestedpages-dropdown-content ul:before{content:" ";display:table}.nestedpages-dropdown-content ul li{float:none;width:100%;margin:0;line-height:1}.nestedpages-dropdown-content ul li a{display:block;color:#333;text-decoration:none}.nestedpages-dropdown-content ul li:first-child a{border:0}.nestedpages-dropdown-content.active{display:block}#nested-loading{display:none;float:right;width:30px;height:30px;margin:0 20px 0 0;position:relative}#nested-loading svg{width:30px;height:30px;-webkit-animation:nestedpagesRotate linear 1.25s infinite;animation:nestedpagesRotate linear 1.25s infinite;position:absolute;left:0;top:0;line-height:.1}#nested-loading svg path{fill:#999}.np-default-loading,.np-menu-search-loading,.np-qe-loading{display:none;float:right;width:25px;height:25px;margin:2px 10px 0 0;position:relative;-webkit-animation:nestedpagesRotate linear 1.25s infinite;animation:nestedpagesRotate linear 1.25s infinite}.np-default-loading svg,.np-menu-search-loading svg,.np-qe-loading svg{position:absolute;left:0;top:0;width:25px;height:25px}.np-default-loading svg path,.np-menu-search-loading svg path,.np-qe-loading svg path{fill:#fff}.np-default-loading{float:none;margin:0}.np-default-loading svg path{fill:#999}@-webkit-keyframes nestedpagesRotate{0%{-webkit-transform:rotate(0);transform:rotate(0);-webkit-transform-origin:center center;transform-origin:center center}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-transform-origin:center center;transform-origin:center center}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg);-webkit-transform-origin:center center;transform-origin:center center}}@keyframes nestedpagesRotate{0%{-webkit-transform:rotate(0);transform:rotate(0);-webkit-transform-origin:center center;transform-origin:center center}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-transform-origin:center center;transform-origin:center center}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg);-webkit-transform-origin:center center;transform-origin:center center}}.nestedpages-tools{zoom:1;margin:20px 0 5px}.nestedpages-tools:after,.nestedpages-tools:before{content:" ";display:table}.nestedpages-tools .subsubsub{margin:0}.nestedpages-tools .np-tools-primary{clear:left;padding-top:8px}.nestedpages-tools .select{float:left;margin-left:5px}.nestedpages-tools .select:first-child{margin-left:0}.nestedpages-tools .np-tools-sort{float:left}.nestedpages-tools .np-tools-search{float:right}.wppages-handle-expand{float:left;background-color:#f2f2f2;font-size:18px;width:46px;height:46px;margin-right:5px;text-align:center;border-right:1px solid #e1e1e1}.wppages-handle-expand div{background-color:#fff;border:1px solid #e1e1e1;width:24px;height:24px;line-height:24px;border-radius:15px;margin-top:9px;cursor:pointer;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.wppages-handle-expand div:hover{background-color:#0074a2;border-color:#0074a2;color:#fff;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.nestedpages{clear:both;border-radius:4px}.nestedpages .ui-sortable-placeholder{display:block!important;position:relative;min-height:46px;border:1px dashed #0074a2!important;background-color:#effaff;margin:0}.nestedpages .ui-sortable-helper{opacity:.8;-webkit-box-shadow:2px 2px 3px 0 rgba(0,0,0,.5);box-shadow:2px 2px 3px 0 rgba(0,0,0,.5)}.nestedpages ol{list-style-type:none;clear:both;margin:0;border:1px solid #e5e5e5;border-radius:3px}.nestedpages ol a{text-decoration:none}.nestedpages ol .page-link .edit-indicator{margin-left:10px;display:none}.nestedpages ol .page-link .edit-indicator i{font-size:12px;margin-right:3px}.nestedpages ol .page-link:hover .edit-indicator{display:inline}.nestedpages ol .np-page-type{color:#333}.nestedpages ol .locked{color:#333;margin-left:10px;padding-left:20px;position:relative}.nestedpages ol .locked svg{position:absolute;left:0;top:-5px;width:15px;height:24px}.nestedpages ol .locked em{font-style:normal}.nestedpages ol .row-status-icon{width:18px;height:18px;display:inline-block;vertical-align:middle;margin-left:5px}.nestedpages ol .row-status-icon .icon{fill:#b3b3b3}.nestedpages ol .np-icon-eye-blocked,.nestedpages ol .status,.nestedpages ol .sticky{color:#999}.nestedpages ol .nav-status{color:#b3b3b3}.nestedpages ol .np-hide{display:none}.nestedpages ol .np-assigned-pt-actions{list-style-type:none;margin:0 0 0 10px;padding:0;display:inline-block;vertical-align:middle}.nestedpages ol .np-assigned-pt-actions li{display:none;background:0 0;border:0}.nestedpages ol .np-assigned-pt-actions li.visible{display:inline-block}.nestedpages ol .np-assigned-pt-actions li a{color:#333;display:block;border-left:1px solid #e1e1e1;padding:0 5px}.nestedpages ol .np-assigned-pt-actions li:first-child a{border:0;padding-left:0}.nestedpages ol .np-seo-indicator{display:block;position:absolute;right:10px;top:50%;margin-top:-6px;width:12px;height:12px;border-radius:50%;background-color:#999}.nestedpages ol .np-seo-indicator.good{background-color:#7ad03a}.nestedpages ol .np-seo-indicator.ok{background-color:#ffba00}.nestedpages ol .np-seo-indicator.poor{background-color:#ee7c1b}.nestedpages ol .np-seo-indicator.bad{background-color:#dd3d36}.nestedpages ol .np-seo-indicator.warn{background-color:maroon}.nestedpages ol .np-seo-indicator.wrong{background-color:red}.nestedpages ol .np-seo-indicator.noindex{background-color:#1e8cbe}.nestedpages ol li{margin:0;border-top:1px solid #e1e1e1;background-color:#0074a2}.nestedpages ol li.first,.nestedpages ol li.no-border,.nestedpages ol li:first-child{border:0}.nestedpages ol ol{display:none;border-radius:0;list-style-type:none;border:0;-webkit-box-shadow:none;box-shadow:none;border-top:1px solid #e1e1e1}.nestedpages .np-search-results .np-hide{display:block}.nestedpages .child-toggle{display:table-cell;width:30px;text-align:left}.nestedpages .child-toggle .child-toggle-spacer{display:inline-block;vertical-align:middle;height:50px;width:1px}.nestedpages .child-toggle a{display:inline-block;text-align:center;vertical-align:middle;width:29px;height:29px;line-height:29px;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)}.nestedpages .child-toggle a.open{-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.nestedpages .child-toggle a:active,.nestedpages .child-toggle a:focus{outline:0}.nestedpages .np-icon-arrow{display:inline-block;vertical-align:middle;width:0;height:0;position:relative;top:-3px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:6px solid #333}.nestedpages .non-indent .child-toggle{width:46px;background-color:#f0f0f0;position:relative}.nestedpages .non-indent .child-toggle .child-toggle-spacer{display:block;height:46px;width:46px}.nestedpages .non-indent .child-toggle a{position:absolute;top:50%;display:inline-block;vertical-align:middle;left:8px;margin-top:-16px;width:28px;height:28px;background-color:#fff;border:1px solid #e1e1e1;border-radius:50%;line-height:28px;color:#333;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)}.nestedpages .non-indent .child-toggle a.open{-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.nestedpages .non-indent .child-toggle a:hover{background-color:#333;border-color:#333}.nestedpages .non-indent .child-toggle a:hover .np-icon-arrow{border-left-color:#fff}.nestedpages .non-indent .np-icon-arrow{border-top-width:4px;border-bottom-width:4px;border-left-width:6px}.nestedpages .handle{display:inline-block;opacity:.4;cursor:move;position:relative;top:-1px;height:20px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.nestedpages .handle:hover,.np-menu-type-selection ul li a{-webkit-transition:all .2s ease;-o-transition:all .2s ease}.nestedpages .handle .bars{fill:#b3b3b3}.nestedpages .np-icon-sub-menu .arrow,.np-wpml-translations-modal .np-qe-loading svg path{fill:#999}.nestedpages .handle:hover{transition:all .2s ease;color:#0074a2}.nestedpages .np-icon-sub-menu{display:none;height:20px}.nestedpages .page-title .link-icon .icon,.np-nav-menu-settings .handle .bars{fill:#b3b3b3}.nestedpages .row.no-sort .page-title{padding-left:10px}.nestedpages .row.no-sort-filtered .page-title{padding-left:34px}.nestedpages .page-title{display:inline-block;vertical-align:middle}.nestedpages .page-title .link-icon{width:20px;height:20px;display:inline;vertical-align:middle;margin-left:8px;position:relative;top:-2px}.nestedpages .np-thumbnail{display:table-cell;width:80px;vertical-align:middle;zoom:1}.nestedpages .np-thumbnail:after,.nestedpages .np-thumbnail:before{content:" ";display:table}.nestedpages .np-thumbnail:after{clear:both}.nestedpages .np-thumbnail img{float:right;width:100%;height:auto}.nestedpages .np-thumbnail.large{width:150px}.nestedpages .np-thumbnail.small{width:50px}.nestedpages .np-thumbnail.link{text-align:center}.nestedpages .np-bulk-checkbox{display:table-cell;width:33px;vertical-align:middle;text-align:center;background-color:#f0f0f0}.nestedpages .np-bulk-checkbox input[type=checkbox]{margin-right:0}.nestedpages .handle,.nestedpages .np-icon-sub-menu{width:30px;text-align:center;vertical-align:middle}.nestedpages .non-indent li ol .row .np-icon-sub-menu{display:inline-block}.nestedpages .non-indent li ol .row .handle,.nestedpages .non-indent li ol .row:hover .np-icon-sub-menu{display:none}.nestedpages .no-sort ol li .row:hover .np-icon-sub-menu,.nestedpages .non-indent li ol .row.no-sort .np-icon-sub-menu,.nestedpages .non-indent li ol .row:hover .handle{display:inline-block}.nestedpages .page-row.hidden{display:none}.nestedpages .row{background-color:#fff;display:table;width:100%}.nestedpages .row.active,.nestedpages .row:hover{background-color:#f0f0f0}.nestedpages .row.active .handle,.nestedpages .row:hover .handle{opacity:1}.nestedpages .row.active .np-assigned-pt-actions li,.nestedpages .row:hover .np-assigned-pt-actions li{display:inline-block}.nestedpages .row.active .cell.custom-column,.nestedpages .row:hover .cell.custom-column{visibility:hidden}.nestedpages .row.np-updated{background-color:#e9f7df;-webkit-transition:background-color .4s ease;-o-transition:background-color .4s ease;transition:background-color .4s ease}.nestedpages .row.np-updated-show{background-color:#fff;-webkit-transition:background-color .4s ease;-o-transition:background-color .4s ease;transition:background-color .4s ease}.nestedpages .row.search .page-title{padding-left:10px}.nestedpages .non-hierarchical-spacer{height:47px}.nestedpages .row-inner{display:table-cell;vertical-align:middle;position:relative}.nestedpages ol li ol .row-inner{padding-left:0}.nestedpages ol li ol li ol .row-inner{padding-left:20px}.nestedpages ol li ol li ol li ol .row-inner{padding-left:40px}.nestedpages ol li ol li ol li ol li ol .row-inner{padding-left:60px}.nestedpages ol li ol li ol li ol li ol li ol .row-inner{padding-left:80px}.nestedpages .np-post-columns{float:right;margin:3px 20px 0 0;zoom:1}.nestedpages .np-post-columns:after,.nestedpages .np-post-columns:before{content:" ";display:table}.nestedpages .np-post-columns:after{clear:both}.nestedpages .np-post-columns ul li{background:0 0;color:gray;border:0;float:left;margin-left:8px;padding-left:8px;border-left:1px solid #ccc}.nestedpages .np-post-columns ul li:first-child{margin-left:0;padding-left:0;border:0}.nestedpages .has-yoast .np-post-columns{margin-right:30px}.nestedpages .has-custom-columns .np-post-columns{display:none}.nestedpages .action-buttons{display:none;position:absolute;right:10px;top:50%;margin-top:-15px}.nestedpages .action-buttons a{margin:0 0 0 -5px;padding:0 .5em;height:30px;line-height:30px}.nestedpages .action-buttons a.np-btn-trash{margin-left:4px}.nestedpages .action-buttons a.np-btn-trash svg{width:20px;height:20px;position:relative;top:4px}.nestedpages .action-buttons a.np-btn-trash svg .icon{fill:#fff}.nestedpages .action-buttons .nestedpages-dropdown{display:inline-block;vertical-align:middle}.nestedpages .action-buttons .nestedpages-dropdown .np-btn.toggle{background:0 0;border:0}.nestedpages .action-buttons .nestedpages-dropdown .np-btn.toggle svg{position:relative;top:4px}.nestedpages .action-buttons .nestedpages-dropdown .np-btn.toggle:active,.nestedpages .action-buttons .nestedpages-dropdown .np-btn.toggle:focus{-webkit-box-shadow:none;box-shadow:none}.nestedpages .action-buttons .nestedpages-dropdown .np-btn.toggle.active{color:gray}.nestedpages .action-buttons .nestedpages-dropdown ul{left:auto;right:5px;width:180px}.nestedpages .action-buttons .nestedpages-dropdown ul li{background-color:#fff}.nestedpages .action-buttons .nestedpages-dropdown ul li a{display:block;color:#333;line-height:1.2;height:auto;margin:0;padding:10px 5px 10px 30px;position:relative}.nestedpages .action-buttons .nestedpages-dropdown ul li a.disabled{opacity:.3}.nestedpages .action-buttons .nestedpages-dropdown ul li a svg{position:absolute;left:0;width:20px;height:20px;top:8px;margin-right:5px;margin-left:5px}.np-search{float:right}.nestedpages-list-header{background-color:#fff;border:1px solid #e1e1e1;border-bottom:0;height:46px;zoom:1}.nestedpages-list-header:after,.nestedpages-list-header:before{content:" ";display:table}.nestedpages-list-header:after{clear:both}.nestedpages-list-header .np-check-all{float:right;width:33px;text-align:center;line-height:46px;background-color:#f0f0f0}.nestedpages-list-header .np-check-all input[type=checkbox]{margin:0}.nestedpages-list-header .np-check-all input[type=checkbox].check-all-partial:checked:before{content:"-";margin:-9px 0 0}.nestedpages-list-header .np-hidden-select-count{display:none;float:right;margin:0 1em 0 0;line-height:46px;font-style:oblique}.nestedpages-list-header .np-bulk-form{padding-right:3px;float:right;margin-right:5px;position:relative;top:9px}.nestedpages-list-header .np-bulk-form input[type=submit],.nestedpages-list-header .np-bulk-form select{display:inline-block}@media (min-width:768px){.nestedpages .row.active .action-buttons,.nestedpages .row:hover .action-buttons{display:block}.nestedpages .row.active .np-post-columns,.nestedpages .row:hover .np-post-columns{display:none}}@media (max-width:767px){.nestedpages ol .page-link{line-height:24px}.nestedpages ol .locked em,.nestedpages ol .page-link:hover span{display:none}.nestedpages .child-toggle{background:0 0}.nestedpages .row{height:auto}.nestedpages .action-buttons{display:none;background-color:#0074a2;float:none;margin:0;padding:8px}.nestedpages .action-buttons a{margin-left:5px}}.nestedpages .new-child .header,.nestedpages .quick-edit .header{padding:10px 0 0;background-color:#f2f2f2;position:relative}.nestedpages .new-child .header h3,.nestedpages .quick-edit .header h3{position:absolute;right:10px;top:15px;font-size:12px}.nestedpages .new-child .header h3 span,.nestedpages .quick-edit .header h3 span{display:inline-block;float:none;margin-left:10px}.nestedpages .new-child .header.no-tabs,.nestedpages .quick-edit .header.no-tabs{zoom:1;padding:10px;border-bottom:1px solid #ccc}.nestedpages .new-child .header.no-tabs:after,.nestedpages .new-child .header.no-tabs:before,.nestedpages .quick-edit .header.no-tabs:after,.nestedpages .quick-edit .header.no-tabs:before{content:" ";display:table}.nestedpages .new-child .header.no-tabs:after,.nestedpages .quick-edit .header.no-tabs:after{clear:both}.nestedpages .new-child .header.no-tabs h3,.nestedpages .quick-edit .header.no-tabs h3{position:relative;top:5px;right:auto;float:right}.nestedpages .new-child .np-menuoptions-description,.nestedpages .quick-edit .np-menuoptions-description{background-color:#f2f2f2;margin-bottom:15px;margin-top:-8px;padding:8px 10px;border:1px solid #e1e1e1}.nestedpages .new-child .np-menuoptions-description p,.nestedpages .quick-edit .np-menuoptions-description p{margin:0 0 2px}.nestedpages .new-child .np-menuoptions-description p.note,.nestedpages .quick-edit .np-menuoptions-description p.note{font-size:.9em;margin:0;opacity:.7}.nestedpages .new-child .form-interior,.nestedpages .quick-edit .form-interior{padding:10px}.nestedpages .new-child h3,.nestedpages .quick-edit h3{margin:0 0 8px;font-size:14px}.nestedpages .new-child h3 span,.nestedpages .quick-edit h3 span{float:right;font-size:12px}.nestedpages .new-child h3 span em,.nestedpages .quick-edit h3 span em{font-weight:400;font-style:normal;color:gray}.nestedpages .new-child .fields,.nestedpages .quick-edit .fields{margin-bottom:10px;background:url(../images/border.png) center repeat-y;zoom:1}.nestedpages .new-child .fields:after,.nestedpages .new-child .fields:before,.nestedpages .quick-edit .fields:after,.nestedpages .quick-edit .fields:before{content:" ";display:table}.nestedpages .new-child .fields:after,.nestedpages .quick-edit .fields:after{clear:both}.nestedpages .new-child .left,.nestedpages .quick-edit .left{float:left;width:48%}.nestedpages .new-child .right,.nestedpages .quick-edit .right{float:right;width:48%}.nestedpages .new-child label,.nestedpages .quick-edit label{font-style:oblique}.nestedpages .new-child .buttons,.nestedpages .quick-edit .buttons{clear:both;zoom:1;background-color:#404040;padding:8px}.nestedpages .new-child .buttons:after,.nestedpages .new-child .buttons:before,.nestedpages .quick-edit .buttons:after,.nestedpages .quick-edit .buttons:before{content:" ";display:table}.nestedpages .new-child .buttons:after,.nestedpages .quick-edit .buttons:after{clear:both}.nestedpages .new-child .form-control,.nestedpages .quick-edit .form-control{clear:both;zoom:1;margin-bottom:5px}.nestedpages .new-child .form-control:after,.nestedpages .new-child .form-control:before,.nestedpages .quick-edit .form-control:after,.nestedpages .quick-edit .form-control:before{content:" ";display:table}.nestedpages .new-child .form-control:after,.nestedpages .quick-edit .form-control:after{clear:both}.nestedpages .new-child .form-control input[type=text],.nestedpages .new-child .form-control input[type=password],.nestedpages .new-child .form-control select,.nestedpages .quick-edit .form-control input[type=text],.nestedpages .quick-edit .form-control input[type=password],.nestedpages .quick-edit .form-control select{float:right;width:75%}.nestedpages .new-child .form-control label,.nestedpages .quick-edit .form-control label{float:left;width:20%}.nestedpages .new-child .form-control.original-link,.nestedpages .quick-edit .form-control.original-link{background-color:#f9f9f9;border:1px solid #e1e1e1;padding:5px;font-style:oblique;margin-bottom:8px}.nestedpages .new-child .form-control.password label,.nestedpages .quick-edit .form-control.password label{width:25%}.nestedpages .new-child .form-control.password input[type=text],.nestedpages .quick-edit .form-control.password input[type=text]{float:left;width:35%}.nestedpages .new-child .form-control.password .private,.nestedpages .quick-edit .form-control.password .private{float:right;width:35%;margin-top:4px}.nestedpages .new-child .form-control.password .private label,.nestedpages .quick-edit .form-control.password .private label{width:auto;float:none}.nestedpages .new-child .form-control.np-datepicker-container .datetime,.nestedpages .quick-edit .form-control.np-datepicker-container .datetime{float:right;width:75%}.nestedpages .new-child .form-control.np-datepicker-container .np-time-container,.nestedpages .quick-edit .form-control.np-datepicker-container .np-time-container{float:left;width:45%;margin:0;position:relative}.nestedpages .new-child .form-control.np-datepicker-container .np-time-container input[type=text],.nestedpages .quick-edit .form-control.np-datepicker-container .np-time-container input[type=text]{float:left;width:55%}.nestedpages .new-child .form-control.np-datepicker-container .np-time-container select,.nestedpages .quick-edit .form-control.np-datepicker-container .np-time-container select{float:right;width:35%}.nestedpages .new-child .form-control.np-datepicker-container .np_datepicker,.nestedpages .quick-edit .form-control.np-datepicker-container .np_datepicker{float:left;width:45%;margin:0}.nestedpages .new-child .form-control.np-datepicker-container .np_datepicker.full,.nestedpages .quick-edit .form-control.np-datepicker-container .np_datepicker.full{width:100%}.nestedpages .new-child .form-control.np-datepicker-container span,.nestedpages .quick-edit .form-control.np-datepicker-container span{float:left;width:10%;display:block;text-align:center;padding-top:3px}.nestedpages .new-child .form-control.full label,.nestedpages .quick-edit .form-control.full label{width:auto}.nestedpages .new-child .form-control.full.checkbox label,.nestedpages .quick-edit .form-control.full.checkbox label{padding:5px 0 5px 25%}.nestedpages .new-child .comments,.nestedpages .quick-edit .comments{float:right;width:75%;margin-bottom:10px;zoom:1}.nestedpages .new-child .comments:after,.nestedpages .new-child .comments:before,.nestedpages .quick-edit .comments:after,.nestedpages .quick-edit .comments:before{content:" ";display:table}.nestedpages .new-child .comments:after,.nestedpages .quick-edit .comments:after{clear:both}.nestedpages .new-child .dates,.nestedpages .quick-edit .dates{float:right;width:75%;margin-bottom:6px}.nestedpages .new-child .dates select,.nestedpages .quick-edit .dates select{width:25%}.nestedpages .new-child .dates input,.nestedpages .quick-edit .dates input{width:12%}.nestedpages .new-child .np-menuoptions,.nestedpages .new-child .np-taxonomies,.nestedpages .quick-edit .np-menuoptions,.nestedpages .quick-edit .np-taxonomies{zoom:1;background-color:#fff}.nestedpages .new-child .np-menuoptions:after,.nestedpages .new-child .np-menuoptions:before,.nestedpages .new-child .np-taxonomies:after,.nestedpages .new-child .np-taxonomies:before,.nestedpages .quick-edit .np-menuoptions:after,.nestedpages .quick-edit .np-menuoptions:before,.nestedpages .quick-edit .np-taxonomies:after,.nestedpages .quick-edit .np-taxonomies:before{content:" ";display:table}.nestedpages .new-child .np-menuoptions:after,.nestedpages .new-child .np-taxonomies:after,.nestedpages .quick-edit .np-menuoptions:after,.nestedpages .quick-edit .np-taxonomies:after{clear:both}.nestedpages .new-child .np-taxonomy,.nestedpages .quick-edit .np-taxonomy{float:left;width:30%;margin-right:3.33%}.nestedpages .new-child .np-taxonomy .title,.nestedpages .quick-edit .np-taxonomy .title{font-weight:700;margin-bottom:4px;display:block}.nestedpages .new-child .np-taxonomy li,.nestedpages .quick-edit .np-taxonomy li{background-color:#fff;border:0}.nestedpages .new-child .np-taxonomy textarea,.nestedpages .quick-edit .np-taxonomy textarea{width:100%;height:6.5em}.nestedpages .new-child .np-menuoptions .left label,.nestedpages .quick-edit .np-menuoptions .left label{width:30%}.nestedpages .new-child .np-menuoptions .left input,.nestedpages .quick-edit .np-menuoptions .left input{width:65%}.nestedpages .new-child .np-menuoptions .right label,.nestedpages .quick-edit .np-menuoptions .right label{margin-bottom:5px;display:block;float:none;width:100%}.nestedpages .new-child .np-hide-options,.nestedpages .quick-edit .np-hide-options{display:none;background-color:#f0f0f0;border-radius:3px;clear:both;padding:6px;-webkit-box-sizing:border-box;box-sizing:border-box}.nestedpages .new-child .np-hide-options p,.nestedpages .quick-edit .np-hide-options p{margin:0}.nestedpages .new-child .np-hide-options label,.nestedpages .quick-edit .np-hide-options label{display:block;margin-top:4px;font-style:normal}.nestedpages .new-child .new-page-titles,.nestedpages .quick-edit .new-page-titles{display:block;border:0}.nestedpages .new-child .new-page-titles li,.nestedpages .quick-edit .new-page-titles li{background:0 0;border:0;padding:4px;zoom:1}.nestedpages .new-child .new-page-titles li:after,.nestedpages .new-child .new-page-titles li:before,.nestedpages .quick-edit .new-page-titles li:after,.nestedpages .quick-edit .new-page-titles li:before{content:" ";display:table}.nestedpages .new-child .new-page-titles li:after,.nestedpages .quick-edit .new-page-titles li:after{clear:both}.nestedpages .new-child .new-page-titles li:nth-child(even),.nestedpages .quick-edit .new-page-titles li:nth-child(even){background-color:#f0f0f0}.nestedpages .new-child .new-page-titles li label,.nestedpages .quick-edit .new-page-titles li label{margin-top:7px}.nestedpages .new-child .new-page-titles .form-control,.nestedpages .quick-edit .new-page-titles .form-control{float:right;width:90%;clear:none}.nestedpages .nestedpages-bulk-edit .np-bulk-footer:after,.nestedpages .new-child .new-page-titles .new-child-row div:after,.nestedpages .quick-edit .new-page-titles .new-child-row div:after,.nestedpages-settings-table .row-container .head:after,.np-link-modal-content .buttons-inner:after,.np-link-modal-content .footer-inner:after,.np-menu-customization .np-menu-customization-header:after,.np-modal-form .buttons,.np-modal-form .form-control:after,.np-modal-form .form-interior:after,.np-nav-menu-settings .menu-item .title:after,.np-nav-menu-settings .menu-item:after,.np-nav-menu-settings .np-extra-options .half,.np-nav-menu-settings .np-extra-options:after{clear:both}.nestedpages .new-child .new-page-titles .np-icon-menu,.nestedpages .quick-edit .new-page-titles .np-icon-menu{float:left;margin-top:0;width:24px;height:24px;position:relative;top:5px}.nestedpages .new-child .new-page-titles .new-child-row div,.nestedpages .quick-edit .new-page-titles .new-child-row div{float:right;width:75%;margin:2px;zoom:1}.nestedpages .new-child .new-page-titles .new-child-row div:after,.nestedpages .new-child .new-page-titles .new-child-row div:before,.nestedpages .quick-edit .new-page-titles .new-child-row div:after,.nestedpages .quick-edit .new-page-titles .new-child-row div:before{content:" ";display:table}.nestedpages .new-child .new-page-titles .new-child-row div input[type=text],.nestedpages .quick-edit .new-page-titles .new-child-row div input[type=text]{float:left;width:80%}.nestedpages .new-child .new-page-titles .new-child-row div a,.nestedpages .quick-edit .new-page-titles .new-child-row div a{float:right}.np-modal.nestedpages .new-child .right .form-control input[type=text],.np-modal.nestedpages .new-child .right .form-control input[type=password],.np-modal.nestedpages .new-child .right .form-control label,.np-modal.nestedpages .new-child .right .form-control select{float:none;width:100%}.np-modal.nestedpages .new-child .right .form-control.full label{padding-left:0}.np-modal.nestedpages .new-child .new-page-titles .form-control{width:85%}.np-modal.nestedpages .new-child .new-page-titles .form-control div{width:100%}.np-modal.nestedpages .new-child .left label{display:none}@media (max-width:767px){.nestedpages .quick-edit .comments,.nestedpages .quick-edit .dates,.nestedpages .quick-edit .form-control input[type=text],.nestedpages .quick-edit .form-control input[type=password],.nestedpages .quick-edit .form-control label,.nestedpages .quick-edit .form-control select,.nestedpages .quick-edit .form-control.np-datepicker-container .datetime,.nestedpages .quick-edit .left,.nestedpages .quick-edit .right{float:none;width:100%}.nestedpages .quick-edit .fields{background:0 0}.nestedpages .quick-edit .form-control{margin-bottom:10px}.nestedpages .quick-edit .form-control label{display:block;margin-bottom:4px}.nestedpages .quick-edit .dates{margin-bottom:6px}}.np-modal-form .form-interior{zoom:1;background:url(../images/border.png) center repeat-y;padding:5px 0}.np-modal-form .form-interior:after,.np-modal-form .form-interior:before{content:" ";display:table}.np-modal-form .form-control{zoom:1;margin-bottom:10px}.np-modal-form .form-control:after,.np-modal-form .form-control:before{content:" ";display:table}.np-modal-form .checkbox{margin-bottom:10px}.np-modal-form .left{float:left;width:45%}.np-modal-form .right{float:right;width:45%;padding-top:18px}.np-modal-form label{display:block}.np-modal-form input[type=text],.np-modal-form select{width:100%}.np-new-child-form.in-modal{padding-bottom:50px}.modal-body.np-menu-item-form{height:100%;padding:0;border-top:1px solid #e1e1e1;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.np-link-modal-content .new-child,.np-link-modal-content .np-tabbed-content{height:100%}.np-link-modal-content .new-child form,.np-link-modal-content .np-tabbed-content form{height:94%}.np-link-modal-content .form-interior,.np-link-modal-content .modal-content{position:relative;height:100%}.np-link-modal-content .form-interior{overflow:auto}.np-link-modal-content .buttons,.np-link-modal-content .modal-footer{position:absolute;left:0;width:100%;bottom:0;padding:0}.np-link-modal-content .buttons{padding:0!important}.np-link-modal-content .buttons-inner,.np-link-modal-content .footer-inner{padding:10px;zoom:1}.np-link-modal-content .buttons-inner:after,.np-link-modal-content .buttons-inner:before,.np-link-modal-content .footer-inner:after,.np-link-modal-content .footer-inner:before{content:" ";display:table}.np-menu-type-selection{overflow:auto;width:35%;padding:15px;background-color:#f9f9f9;border-right:1px solid #e1e1e1;-webkit-box-sizing:border-box;box-sizing:border-box}.np-menu-type-selection ul{list-style-type:none;margin:0;padding:0;border-radius:3px;border:0}.np-menu-type-selection ul li{margin:0;border:1px solid #e5e5e5;border-top:0}.np-menu-type-selection ul li a{background-color:#fff;display:block;text-decoration:none;padding:15px 10px;position:relative;color:#333;font-weight:700;transition:all .2s ease}.np-menu-type-selection ul li a:hover{background-color:#ebebeb;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.np-menu-type-selection ul li a:after{position:absolute;font-family:dashicons;content:"\f140";font-size:18px;right:10px;top:15px;color:gray}.np-menu-type-selection ul li a.active:after{content:"\f142"}.np-menu-type-selection ul li a.np-custom-link:after{content:"\f139"}.np-menu-type-selection ul li a.np-custom-link.active{background-color:#0074a2;color:#fff}.np-menu-type-selection ul li a.np-custom-link.active:after{content:"\f335";color:#fff}.np-menu-type-selection ul li a:active,.np-menu-type-selection ul li a:focus{-webkit-box-shadow:none;box-shadow:none}.np-menu-type-selection ul li a.no-terms{color:#b3b3b3}.np-menu-type-selection ul li a.no-terms span{float:right;font-weight:400;font-style:oblique}.np-menu-type-selection ul li a.no-terms:after{content:''}.np-menu-type-selection ul li a.no-terms:hover{background-color:#fff;cursor:default}.np-menu-type-selection ul li a.no-terms.section{padding:8px 10px;background-color:#333;color:#fff}.np-menu-type-selection ul li:first-child{border-top:1px solid #e5e5e5}.np-menu-type-selection ul li ul{display:none;-webkit-box-shadow:none;box-shadow:none;padding:10px;background-color:#fff}.np-menu-type-selection ul li ul li{border-color:#e0e0e0}.np-menu-type-selection ul li ul li a{padding:8px;background-color:#f9f9f9;font-weight:400}.np-menu-type-selection ul li ul li a:after{content:"\f139";top:8px;right:5px}.np-menu-type-selection ul li ul li a.active{background-color:#0074a2;color:#fff}.np-menu-type-selection ul li ul li a.active:after{content:"\f335";color:#fff}.np-menu-link-object{width:65%;overflow:auto}.np-menu-link-object-placeholder{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);color:#b3b3b3}.np-menu-search{padding:10px;background-color:#f9f9f9}.np-menu-search input[type=text]{width:100%;height:35px}.np-menu-search .np-menu-search-loading{margin-top:5px}.np-menu-link-details h3,.np-menu-link-details p{margin-top:0}.np-menu-search .np-menu-search-noresults{display:none;text-align:center;padding-top:8px;font-style:oblique}.np-menu-link-details{padding:20px}.np-menu-link-details h3 em{float:right;font-size:13px;font-weight:400;font-style:normal;color:gray}.np-menu-link-details .original-link{border:1px solid #e5e5e5;font-size:12px;margin-bottom:15px;padding:5px;font-style:oblique}.np-menu-link-details .fields{background-color:#f9f9f9;padding:15px}.np-menu-link-details .checkbox{margin-bottom:10px}.np-menu-link-details label{display:block}.np-menu-link-details input[type=text]{width:100%}.nestedpages .nestedpages-bulk-edit{display:none;background-color:#fff;margin:0;border:1px solid #e1e1e1;border-bottom:0}.nestedpages .nestedpages-bulk-edit h3{padding:1em;margin:0}.nestedpages .nestedpages-bulk-edit .np-bulk-edit-link-info{padding:0 1em}.nestedpages .nestedpages-bulk-edit .fields{padding:1em;margin:0}.nestedpages .nestedpages-bulk-edit .np-taxonomies{margin:0}.nestedpages .nestedpages-bulk-edit .np-bulk-titles{list-style-type:none;margin:0;background-color:#f9f9f9;border:1px solid #e5e5e5;border-left:0;border-right:0;padding:.5em}.nestedpages .nestedpages-bulk-edit .np-bulk-titles li{padding:0;margin:.5em 0 0}.nestedpages .nestedpages-bulk-edit .np-bulk-titles li:first-child{margin:0}.nestedpages .nestedpages-bulk-edit .np-bulk-titles .np-remove{display:inline-block;background-color:#333;width:22px;height:22px;border-radius:50%;text-align:center;text-decoration:none;color:#fff;line-height:18px;font-size:1.5em;margin-right:.3em}.nestedpages .nestedpages-bulk-edit .np-bulk-titles .np-remove:hover{background-color:gray}.nestedpages .nestedpages-bulk-edit .np-taxonomies{display:block;padding:1em}.nestedpages .nestedpages-bulk-edit .np-bulk-footer{padding:10px;text-align:right;background-color:#404040;zoom:1}.nestedpages .nestedpages-bulk-edit .np-bulk-footer:after,.nestedpages .nestedpages-bulk-edit .np-bulk-footer:before{content:" ";display:table}.nestedpages .nestedpages-bulk-edit .np-bulk-footer .pull-left{float:left}.nestedpages-columns-header{display:table;border-collapse:collapse;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f0f0f0;border:1px solid #e1e1e1;border-bottom:0}.nestedpages-columns-header .cell{font-weight:700;text-align:left;display:table-cell;padding:1em .5em 1em 0;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.nestedpages-columns-header .toggle-spacer span{display:block;width:50px}.nestedpages-columns-header .bulk-spacer span{display:block;width:33px}.nestedpages-columns-header .thumbnail-spacer span{display:block;width:100%}.nestedpages-columns-header .title{width:30%;padding:0 5px}.nestedpages-row-columns{display:table;width:100%;border-collapse:collapse;-webkit-box-sizing:border-box;box-sizing:border-box}.nestedpages-row-columns .cell{text-align:left;display:table-cell;padding:1em .5em 1em 0;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.nestedpages-row-columns .title-cell{width:30%;position:relative}.nestedpages-row-columns .title-cell-spacer{position:absolute;display:block;width:100%}@media (max-width:767px){.nestedpages-columns-header,.nestedpages-row-columns .custom-column{display:none}.nestedpages-row-columns .title-cell.cell{width:100%}}.np-wpml-translations-modal .np-qe-loading{margin:1em 0;text-align:center;float:left}.np-wpml-translations-modal.loading .np-translations-table{display:none}.np-wpml-translations-modal.loading .np-qe-loading{display:block}.np-wpml-translations-modal .np-translations-table{display:table;border-collapse:collapse;width:100%}.np-wpml-translations-modal .np-translations-table tr td{padding:10px;border:1px solid #e1e1e1}.np-wpml-translations-modal .np-translations-table tr td:first-child{border-left:0;padding-left:0}.np-wpml-translations-modal .np-translations-table tr td:last-child{border-right:0}.np-wpml-translations-modal .np-translations-table tr:last-child td{border-bottom:0}.nestedpages-settings-table thead th{background-color:#d9d9d9;padding:5px}.nestedpages-settings-table tbody tr td{padding:5px;border-left:1px solid #e0e0e0}.nestedpages-settings-table tbody tr td:first-child{border:0}.nestedpages-settings-table tbody tr:nth-child(odd) td{background-color:#fff}.nestedpages-settings-table i{font-size:20px}.nestedpages-settings-table .np-btn{cursor:pointer;text-decoration:none;color:#555;display:inline-block;background-color:#f7f7f7;border:1px solid #e1e1e1;padding:5px 8px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.nestedpages-settings-table .np-btn:hover{background-color:#0074a2;color:#fff;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;border-color:#0074a2}.nestedpages-settings-table .np-btn.disabled,.nestedpages-settings-table .np-btn:disabled{opacity:.6;cursor:not-allowed}.nestedpages-settings-table .np-btn-trash{background-color:#e14d43;border-color:#e14d43;color:#fff}.nestedpages-settings-table .np-btn-trash:hover{background-color:#ba281e;border-color:#ba281e}.nestedpages-settings-general-wrapper{padding-top:1em;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.nestedpages-settings-general-wrapper .nestedpages-settings-table{width:67%;border:0}.nestedpages-settings-general-wrapper .nestedpages-settings-table .row{border-left:1px solid #e1e1e1;border-right:1px solid #e1e1e1}.nestedpages-settings-general-wrapper .nestedpages-settings-table .row.submit{border:0}.nestedpages-settings-general-wrapper .nestedpages-settings-support{width:30%;background-color:#fff;text-align:center;border:1px solid #e5e5e5;border-radius:3px}.nestedpages-settings-general-wrapper .nestedpages-settings-support .inner{padding:2em}.nestedpages-settings-general-wrapper .nestedpages-settings-support .or{margin:2em 0}.nestedpages-settings-general-wrapper h3{color:#ff2d20;margin:0 0 3px;font-size:20px}.nestedpages-settings-general-wrapper h4{margin:0}.nestedpages-settings-general-wrapper .support-button{display:block;background-color:rgba(255,45,32,.1);border:1px solid rgba(255,45,32,.15);text-align:center;color:#333;text-decoration:none;padding:1em;border-radius:4px;font-weight:700;font-size:16px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.nestedpages-settings-general-wrapper .support-button svg{display:inline-block;vertical-align:middle;margin-right:8px}.nestedpages-settings-general-wrapper .support-button svg .heart{fill:#ff2d20}.nestedpages-settings-general-wrapper .support-button:hover{background-color:#ff2d20;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;color:#fff}.nestedpages-settings-general-wrapper .support-button:hover svg .heart{fill:#fff}@media (max-width:768px){.nestedpages-settings-general-wrapper{display:block}.nestedpages-settings-general-wrapper .nestedpages-settings-support,.nestedpages-settings-general-wrapper .nestedpages-settings-table{width:100%}}.nestedpages-settings-table{border-collapse:collapse;border:1px solid #e5e5e5;border-radius:3px}.nestedpages-settings-table .row-container{border-bottom:1px solid #e1e1e1}.nestedpages-settings-table .row-container:last-child{border:0}.nestedpages-settings-table .row-container .head{zoom:1;line-height:46px;background-color:#fff;padding-right:10px}.nestedpages-settings-table .row-container .head:after,.nestedpages-settings-table .row-container .head:before{content:" ";display:table}.nestedpages-settings-table .row-container .head .checkbox{float:left;width:46px;height:46px;background-color:rgba(51,51,51,.06);text-align:center;line-height:46px;margin-right:10px}.nestedpages-settings-table .row-container .head label{float:left;line-height:46px;margin:0}.nestedpages-settings-table .row-container .head label em{color:#999}.nestedpages-settings-table .row-container .head .button{float:right;margin-top:10px}.nestedpages-settings-table .row-container.active .head{background-color:#0074a2;color:#fff}.nestedpages-settings-table .row-container .row{display:table;width:100%}.nestedpages-settings-table .row-container .row.submit{display:block}.nestedpages-settings-table .row-container .row.submit p{margin:0}.nestedpages-settings-table .row-container .row .description{display:table-cell;vertical-align:top;width:25%;border-bottom:1px solid #e1e1e1;background-color:#f9f9f9;padding:1em}.nestedpages-settings-table .row-container .row .description p{color:gray;font-size:.9em}.nestedpages-settings-table .row-container .row .description strong{color:#333;font-size:1.2em}.nestedpages-settings-table .row-container .row .field{display:table-cell;vertical-align:top;width:75%;background-color:#fff;border-bottom:1px solid #e1e1e1;border-left:1px solid #e1e1e1;padding:1em}.nestedpages-settings-table .row-container .row .field.padded-sides{padding:1em 2em}.nestedpages-settings-table .row-container .row .field.extra-padding{padding:2em}.nestedpages-settings-table .row-container .row .field label.block{display:block}.nestedpages-settings-table .row-container .row .field input[type=tel],.nestedpages-settings-table .row-container .row .field input[type=text],.nestedpages-settings-table .row-container .row .field select{width:100%}.nestedpages-settings-table .row-container .body{display:none}.nestedpages-settings-table .row-container .body h4{margin:0;padding:10px 0 0 10px}.nestedpages-settings-table .row-container .body .settings-details,.nestedpages-settings-table .row-container .body li{margin:0}.nestedpages-settings-table .row-container .settings-details li:last-child .description,.nestedpages-settings-table .row-container .settings-details li:last-child .field{border-bottom:0}.nestedpages-settings-table .row-container .columns,.nestedpages-settings-table .row-container .custom-fields,.nestedpages-settings-table .row-container .standard-fields{display:none;padding-top:20px}.nestedpages-settings-table .row-container .columns .custom-field-group,.nestedpages-settings-table .row-container .custom-fields .custom-field-group,.nestedpages-settings-table .row-container .standard-fields .custom-field-group{height:150px;overflow:auto;background-color:#f9f9f9;padding:10px;border:1px solid #e1e1e1}.nestedpages-settings-table .row-container .columns h5,.nestedpages-settings-table .row-container .custom-fields h5,.nestedpages-settings-table .row-container .standard-fields h5{padding:0;font-weight:400;font-style:oblique;margin:0 0 6px;color:#999}.nestedpages-settings-table .row-container .columns p,.nestedpages-settings-table .row-container .custom-fields p,.nestedpages-settings-table .row-container .standard-fields p{margin:0 0 6px;font-weight:700}.nestedpages-settings-table .row-container .columns ul,.nestedpages-settings-table .row-container .custom-fields ul,.nestedpages-settings-table .row-container .standard-fields ul{margin:0}.nestedpages-settings-table .row-container .columns ul.indented,.nestedpages-settings-table .row-container .custom-fields ul.indented,.nestedpages-settings-table .row-container .standard-fields ul.indented{padding-left:15px}.nestedpages-settings-table .row-container .columns ul li,.nestedpages-settings-table .row-container .custom-fields ul li,.nestedpages-settings-table .row-container .standard-fields ul li{margin:3px 0 0}.nestedpages-page-pt-assignment,.nestedpages-settings-table .row-container .thumbnail-options{background-color:#f9f9f9;padding:10px;border:1px solid #e1e1e1;margin-top:1em}.nestedpages-settings-table .row-container .thumbnail-options label{display:block}.nestedpages-settings-table .row-container .thumbnail-options select{margin-bottom:1em}.nestedpages-page-pt-assignment input[type=search]{width:100%;margin-bottom:1em}.nestedpages-page-pt-assignment .np-quickedit-info{background-color:#fff;border-right:1px solid #e5e5e5;border-top:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5}.nestedpages-page-pt-assignment .nestedpages-page-search-results{height:100px;overflow:auto}.nestedpages-page-pt-assignment .nestedpages-page-search-results ul{list-style-type:none;margin:0;padding:0}.nestedpages-page-pt-assignment .nestedpages-page-search-results a{display:block;text-decoration:none;border-top:1px solid #dcdcdc;padding:3px 0;color:#333;background-color:#f9f9f9}.nestedpages-page-pt-assignment .nestedpages-page-search-results a:hover{background-color:#0074a2;color:#fff;padding-left:5px}.nestedpages-page-pt-assignment .nestedpages-page-search-results li:first-child a{border:0;padding-top:0}.nestedpages-checklist-field,.nestedpages-page-pt-assignment-selection,.nestedpages-sort-options-selection{background-color:#f9f9f9;border:1px solid #e1e1e1;margin-top:1em;padding:.5em}.nestedpages-checklist-field label,.nestedpages-sort-options-selection label{display:block;margin-top:3px}.nestedpages-checklist-field label:first-child,.nestedpages-sort-options-selection label:first-child{margin:0}.nestedpages-checklist-field .sort-options-default,.nestedpages-sort-options-selection .sort-options-default{display:none;background-color:#fff;margin:.5em 0 1.5em;padding:.75em;border:1px solid #e1e1e1}.nestedpages-checklist-field .sort-options-default label,.nestedpages-sort-options-selection .sort-options-default label{display:inline-block}.nestedpages-checklist-field .sort-options-default select,.nestedpages-sort-options-selection .sort-options-default select{width:auto!important}.np-menu-customization{display:none;padding:.5em 1em 1em}.np-menu-customization .np-menu-customization-header{background-color:#f9f9f9;border:1px solid #e1e1e1;border-bottom:0;height:60px;position:relative;padding:15px 180px 0 10px;-webkit-box-sizing:border-box;box-sizing:border-box;zoom:1}.np-menu-customization .np-menu-customization-header:after,.np-menu-customization .np-menu-customization-header:before{content:" ";display:table}.np-menu-customization .np-menu-customization-header .hide,.np-menu-customization .np-menu-customization-header .new{position:absolute;right:0;top:0;height:60px;width:80px;text-align:center;line-height:60px;border-left:1px solid #e1e1e1;background-color:#ececec;font-size:.9em}.np-menu-customization .np-menu-customization-header .role-select{float:left;width:100%}.np-menu-customization .np-menu-customization-header .new{right:80px;background-color:#fff}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-toggle{display:block;height:60px;width:80px;text-decoration:none;color:#333}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-toggle .np-caret{display:inline-block;width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid #333;vertical-align:middle;margin-left:3px}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-toggle:active,.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-toggle:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-content{width:150px;font-size:1.1em}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-content ul li{border-top:1px solid #e1e1e1}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-content ul li a{display:block;padding:1em .5em;background-color:#fff}.np-nav-menu-settings .update-count,.np-nav-menu-settings li.disabled .menu-item .title:hover .details-button,.np-nav-menu-settings li.disabled .submenu-toggle a,.np-nav-menu-settings li.disabled.submenu-open .submenu-listing{display:none}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-content ul li a:hover{background-color:#333;color:#fff}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-content ul li:first-child{border:0}.np-nav-menu-settings li{border:1px solid #e1e1e1;position:relative;border-top:0}.np-nav-menu-settings li.disabled{text-decoration:line-through}.np-nav-menu-settings li.disabled:hover{background-color:inherit!important}.np-nav-menu-settings li.disabled .menu-item .title{opacity:.2}.np-nav-menu-settings li:first-child{border-top:1px solid #e1e1e1}.np-nav-menu-settings li:first-child .hide-checkbox{border-top:0}.np-nav-menu-settings .ui-sortable-helper{border:1px solid #e1e1e1;-webkit-box-shadow:1px 1px 1px 0 rgba(0,0,0,.3);box-shadow:1px 1px 1px 0 rgba(0,0,0,.3)}.np-nav-menu-settings .menu-item{height:50px;zoom:1;padding:0 80px 0 100px;background-color:#fff}.np-nav-menu-settings .menu-item:after,.np-nav-menu-settings .menu-item:before{content:" ";display:table}.np-nav-menu-settings .menu-item .title{zoom:1;position:relative;padding-right:120px;height:50px}.np-nav-menu-settings .menu-item .title:after,.np-nav-menu-settings .menu-item .title:before{content:" ";display:table}.np-nav-menu-settings .menu-item .title.separator{padding-left:40px}.np-nav-menu-settings .menu-item .title p{margin:0;font-size:1em;line-height:50px}.np-nav-menu-settings .menu-item .title .menu-icon{position:absolute;left:0;top:0;height:50px;width:40px;text-align:center}.np-nav-menu-settings .menu-item .title .menu-icon:before{font-size:1.6em;line-height:50px}.np-nav-menu-settings .menu-item .title .details-button{display:none;position:absolute;right:0;top:0;margin:12px 10px 0 0}.np-nav-menu-settings .menu-item .title:hover .details-button{display:block}.np-nav-menu-settings .menu-item .menu-title-field{float:left;margin:0 0 0 40px;position:relative;padding:0;line-height:50px;border:0;-webkit-box-shadow:none;box-shadow:none}.np-nav-menu-settings .menu-item .menu-title-field::-webkit-input-placeholder{color:#333}.np-nav-menu-settings .menu-item .menu-title-field::-moz-placeholder{color:#333}.np-nav-menu-settings .menu-item .menu-title-field:-ms-input-placeholder{color:#333}.np-nav-menu-settings .menu-item .menu-title-field::-ms-input-placeholder{color:#333}.np-nav-menu-settings .menu-item .menu-title-field::placeholder{color:#333}.np-nav-menu-settings li.separator .menu-item{background-color:#f9f9f9;padding-right:10px}.np-nav-menu-settings li.separator .menu-item .menu-icon{display:none}.np-nav-menu-settings li.separator .menu-item .details-button{margin-right:0}.np-nav-menu-settings li.separator .menu-item .title{padding-left:10px;padding-right:0;color:#999}.np-nav-menu-settings .ui-sortable-placeholder{background-color:#f9f9f9;border:1px dashed #0074a2!important;display:block;visibility:visible!important}.np-nav-menu-settings .submenu-toggle{width:50px;height:50px;left:0;border-right:1px solid #e1e1e1;background-color:#f9f9f9;position:absolute}.np-nav-menu-settings .submenu-toggle a{margin:0;display:block;text-decoration:none;width:26px;height:26px;background-color:#fff;border:1px solid #e1e1e1;border-radius:50%;text-align:center;color:#333;position:relative;top:10px;left:10px;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.np-nav-menu-settings .submenu-toggle a span{margin:0;position:absolute;left:11px;top:8px;display:block;width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:6px solid #333}.np-nav-menu-settings .submenu-toggle a.active{background-color:#333;color:#fff;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);border-color:#333}.np-nav-menu-settings .submenu-toggle a.active span{border-left-color:#fff}.np-nav-menu-settings .submenu-toggle a:active,.np-nav-menu-settings .submenu-toggle a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}.np-nav-menu-settings .handle{position:absolute;width:50px;height:50px;left:51px;background-color:#f9f9f9;border-right:1px solid #e5e5e5;text-align:center;line-height:40px;cursor:move}.nestedpages.np-dark-mode .handle .bars,.nestedpages.np-dark-mode .np-icon-sub-menu .arrow,.nestedpages.np-dark-mode .page-title .link-icon .icon,.nestedpages.np-dark-mode ol .row-status-icon .icon,.np-dark-mode .handle .bars,.np-dark-mode .np-icon-sub-menu .arrow,.np-dark-mode .page-title .link-icon .icon,.np-dark-mode ol .row-status-icon .icon{fill:#50626f}.np-nav-menu-settings .handle svg{position:relative;top:10px;width:20px}.np-nav-menu-settings .handle:hover{color:#333}.np-nav-menu-settings .hide-checkbox{position:absolute;width:80px;height:50px;top:0;text-align:center;right:0;background-color:#ececec;border-left:1px solid #e1e1e1}.np-nav-menu-settings .hide-checkbox input[type=checkbox]{position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);margin-top:-5px;left:2px}.np-nav-menu-settings .np-extra-options{display:none;border-top:1px solid #e1e1e1;padding:1em;zoom:1;background-color:#f9f9f9}.np-nav-menu-settings .np-extra-options:after,.np-nav-menu-settings .np-extra-options:before{content:" ";display:table}.np-nav-menu-settings .np-extra-options .half{float:left;width:48%}.np-nav-menu-settings .np-extra-options .half.right{clear:none;float:right}.np-nav-menu-settings .options-open .menu-item .title .details-button,.np-nav-menu-settings .options-open .np-extra-options{display:block}.np-nav-menu-settings .options-open.disabled .menu-item .title .details-button,.np-nav-menu-settings .options-open.disabled .np-extra-options{display:none}.np-nav-menu-settings .submenu-listing{display:none;padding-left:50px;background-color:#f9f9f9;border-top:1px solid #e1e1e1;border-bottom:3px solid #e1e1e1}.np-nav-menu-settings li.submenu-open .submenu-listing{display:block}.np-nav-menu-settings .submenu-item{border:0;border-left:1px solid #e1e1e1;border-top:1px solid #e1e1e1;background-color:#f9f9f9}.np-nav-menu-settings .submenu-item .menu-item{padding-left:50px}.np-nav-menu-settings .submenu-item .title{padding-left:1em}.np-nav-menu-settings .submenu-item:first-child{border-top:0}.np-nav-menu-settings .submenu-item .handle{left:0}.nestedpages.np-dark-mode ol,.np-dark-mode ol{border:0;border-radius:0}.nestedpages.np-dark-mode ol .np-page-type,.np-dark-mode ol .np-page-type{color:#bbc8d4}.nestedpages.np-dark-mode ol .locked,.np-dark-mode ol .locked{color:#fff}.nestedpages.np-dark-mode ol .nav-status,.nestedpages.np-dark-mode ol .np-icon-eye-blocked,.nestedpages.np-dark-mode ol .status,.nestedpages.np-dark-mode ol .sticky,.np-dark-mode ol .nav-status,.np-dark-mode ol .np-icon-eye-blocked,.np-dark-mode ol .status,.np-dark-mode ol .sticky{color:#50626f}.nestedpages.np-dark-mode ol .np-assigned-pt-actions li a,.np-dark-mode ol .np-assigned-pt-actions li a{color:#fff;border-color:rgba(0,0,0,.2)}.nestedpages.np-dark-mode ol .np-seo-indicator,.np-dark-mode ol .np-seo-indicator{background-color:#50626f}.nestedpages.np-dark-mode ol .np-seo-indicator.good,.np-dark-mode ol .np-seo-indicator.good{background-color:#7ad03a}.nestedpages.np-dark-mode ol .np-seo-indicator.ok,.np-dark-mode ol .np-seo-indicator.ok{background-color:#ffba00}.nestedpages.np-dark-mode ol .np-seo-indicator.poor,.np-dark-mode ol .np-seo-indicator.poor{background-color:#ee7c1b}.nestedpages.np-dark-mode ol .np-seo-indicator.bad,.np-dark-mode ol .np-seo-indicator.bad{background-color:#dd3d36}.nestedpages.np-dark-mode ol .np-seo-indicator.warn,.np-dark-mode ol .np-seo-indicator.warn{background-color:maroon}.nestedpages.np-dark-mode ol .np-seo-indicator.wrong,.np-dark-mode ol .np-seo-indicator.wrong{background-color:red}.nestedpages.np-dark-mode ol .np-seo-indicator.noindex,.np-dark-mode ol .np-seo-indicator.noindex{background-color:#1e8cbe}.nestedpages.np-dark-mode ol li,.np-dark-mode ol li{border-top-color:#32373c;background:0 0}.nestedpages.np-dark-mode ol ol,.np-dark-mode ol ol{border-top:1px solid #32373c}.nestedpages.np-dark-mode .np-icon-arrow,.np-dark-mode .np-icon-arrow{border-left-color:#fff}.nestedpages.np-dark-mode .child-toggle a:active,.nestedpages.np-dark-mode .child-toggle a:focus,.np-dark-mode .child-toggle a:active,.np-dark-mode .child-toggle a:focus{-webkit-box-shadow:none;box-shadow:none}.nestedpages.np-dark-mode .non-indent .child-toggle,.np-dark-mode .non-indent .child-toggle{background-color:rgba(0,0,0,.15)}.nestedpages.np-dark-mode .non-indent .child-toggle a,.np-dark-mode .non-indent .child-toggle a{background-color:#50626f;border:0;color:#fff}.nestedpages.np-dark-mode .non-indent .child-toggle a .np-icon-arrow,.nestedpages.np-dark-mode .non-indent .child-toggle a:hover .np-icon-arrow,.np-dark-mode .non-indent .child-toggle a .np-icon-arrow,.np-dark-mode .non-indent .child-toggle a:hover .np-icon-arrow{border-left-color:#fff}.nestedpages.np-dark-mode .non-indent .child-toggle a:hover,.np-dark-mode .non-indent .child-toggle a:hover{background-color:rgba(0,0,0,.5)}.nestedpages.np-dark-mode .handle,.np-dark-mode .handle{color:#50626f}.nestedpages.np-dark-mode .action-buttons .nestedpages-dropdown .np-btn.toggle svg path.circles,.nestedpages.np-dark-mode .action-buttons .nestedpages-dropdown ul li a svg path.primary,.np-dark-mode .action-buttons .nestedpages-dropdown .np-btn.toggle svg path.circles,.np-dark-mode .action-buttons .nestedpages-dropdown ul li a svg path.primary{fill:#fff}.nestedpages.np-dark-mode .np-bulk-checkbox,.nestedpages.np-dark-mode .row,.np-dark-mode .np-bulk-checkbox,.np-dark-mode .row{background:0 0}.nestedpages.np-dark-mode .row.active,.nestedpages.np-dark-mode .row.np-updated,.nestedpages.np-dark-mode .row.np-updated-show,.nestedpages.np-dark-mode .row:hover,.np-dark-mode .row.active,.np-dark-mode .row.np-updated,.np-dark-mode .row.np-updated-show,.np-dark-mode .row:hover{background-color:#32373c}.nestedpages.np-dark-mode .np-post-columns ul li,.np-dark-mode .np-post-columns ul li{color:#fff;border-left:1px solid rgba(0,0,0,.4)}.nestedpages.np-dark-mode .np-post-columns ul li:first-child,.np-dark-mode .np-post-columns ul li:first-child{border:0}.nestedpages.np-dark-mode .action-buttons .nestedpages-dropdown ul li,.np-dark-mode .action-buttons .nestedpages-dropdown ul li{background-color:#50626f}.nestedpages.np-dark-mode .action-buttons .nestedpages-dropdown ul li a,.np-dark-mode .action-buttons .nestedpages-dropdown ul li a{color:#fff}.nestedpages.np-dark-mode .nestedpages-list-header,.np-dark-mode .nestedpages-list-header{background-color:#32373c;border:0}.nestedpages.np-dark-mode .nestedpages-list-header .np-check-all,.np-dark-mode .nestedpages-list-header .np-check-all{background:0 0}.nestedpages.np-dark-mode .np-btn,.np-dark-mode .np-btn{color:#fff;display:inline-block;background-color:#50626f;border:1px solid #444}.nestedpages.np-dark-mode .np-btn:hover,.np-dark-mode .np-btn:hover{background-color:#32373c;border-color:#32373c}.nestedpages.np-dark-mode .np-inline-modal,.np-dark-mode .np-inline-modal{background-color:#32373c}.nestedpages.np-dark-mode .new-child h3,.nestedpages.np-dark-mode .quick-edit h3,.np-dark-mode .new-child h3,.np-dark-mode .quick-edit h3{color:#fff}.nestedpages.np-dark-mode .new-child h3 span em,.nestedpages.np-dark-mode .quick-edit h3 span em,.np-dark-mode .new-child h3 span em,.np-dark-mode .quick-edit h3 span em{color:#50626f}.nestedpages.np-dark-mode .new-child .fields,.nestedpages.np-dark-mode .quick-edit .fields,.np-dark-mode .new-child .fields,.np-dark-mode .quick-edit .fields{background:0 0}.nestedpages.np-dark-mode .new-child .buttons,.nestedpages.np-dark-mode .quick-edit .buttons,.np-dark-mode .new-child .buttons,.np-dark-mode .quick-edit .buttons{background-color:rgba(0,0,0,.15)}.nestedpages.np-dark-mode .new-child .form-control.original-link,.nestedpages.np-dark-mode .quick-edit .form-control.original-link,.np-dark-mode .new-child .form-control.original-link,.np-dark-mode .quick-edit .form-control.original-link{background-color:rgba(0,0,0,.15);border:0}.nestedpages.np-dark-mode .new-child .np-toggle-options,.nestedpages.np-dark-mode .quick-edit .np-toggle-options,.np-dark-mode .new-child .np-toggle-options,.np-dark-mode .quick-edit .np-toggle-options{background-color:rgba(0,0,0,.1)}.nestedpages.np-dark-mode .new-child .np-menuoptions,.nestedpages.np-dark-mode .new-child .np-taxonomies,.nestedpages.np-dark-mode .new-child .np-taxonomy li,.nestedpages.np-dark-mode .quick-edit .np-menuoptions,.nestedpages.np-dark-mode .quick-edit .np-taxonomies,.nestedpages.np-dark-mode .quick-edit .np-taxonomy li,.np-dark-mode .new-child .np-menuoptions,.np-dark-mode .new-child .np-taxonomies,.np-dark-mode .new-child .np-taxonomy li,.np-dark-mode .quick-edit .np-menuoptions,.np-dark-mode .quick-edit .np-taxonomies,.np-dark-mode .quick-edit .np-taxonomy li{background:0 0}.nestedpages.np-dark-mode .nestedpages-bulk-edit,.np-dark-mode .nestedpages-bulk-edit{background-color:#32373c;border:0}.nestedpages.np-dark-mode .nestedpages-bulk-edit .np-bulk-titles,.np-dark-mode .nestedpages-bulk-edit .np-bulk-titles{background-color:rgba(0,0,0,.15);border:0}.nestedpages.np-dark-mode .nestedpages-bulk-edit .np-bulk-titles .np-remove,.np-dark-mode .nestedpages-bulk-edit .np-bulk-titles .np-remove{background-color:#50626f}.nestedpages.np-dark-mode .nestedpages-bulk-edit .np-bulk-footer,.np-dark-mode .nestedpages-bulk-edit .np-bulk-footer{background-color:rgba(0,0,0,.15)}.nestedpages.np-dark-mode .np-quickedit-error,.np-dark-mode .np-quickedit-error{background-color:#e14d43;color:#fff}.np-modal-form.np-dark-mode .form-interior{background:0 0}.nestedpages-modal-content.np-dark-mode,.nestedpages-modal-content.np-dark-mode .modal-content{background-color:#32373c}.nestedpages-modal-content.np-dark-mode .new-child h3,.nestedpages-modal-content.np-dark-mode h3{color:#fff}.nestedpages-modal-content.np-dark-mode .modal-footer{background-color:rgba(0,0,0,.15)}.nestedpages-modal-content.np-dark-mode .clone-modal h3{background:0 0}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection{background-color:#32373c;border:0}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li{border:1px solid #32373c;border-top:0}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li a{background-color:#50626f;color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li a:after{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li a:active,.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li a:focus{-webkit-box-shadow:none;box-shadow:none}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li:first-child{border-top:0}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li ul{padding:0;background:0 0}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li ul li{border-color:#32373c}.nestedpages-modal-content.np-dark-mode .np-menu-search,.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li ul li a{background-color:rgba(0,0,0,.15)}.nestedpages-modal-content.np-dark-mode .np-menu-search input[type=text]::-webkit-input-placeholder{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-search input[type=text]::-moz-placeholder{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-search input[type=text]:-ms-input-placeholder{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-search input[type=text]::-ms-input-placeholder{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-search input[type=text]::placeholder{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-link-details h3 em{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-link-details .original-link{border:0;background-color:rgba(0,0,0,.15)}.nestedpages-modal-content.np-dark-mode .np-menu-link-details .fields{background:0 0;padding:0}
|
1 |
+
.np-btn{text-decoration:none;color:#555;display:inline-block;background-color:#f7f7f7;border:1px solid #e1e1e1;padding:5px 8px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;vertical-align:top}.np-btn:hover{background-color:#0074a2;color:#fff;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;border-color:#0074a2}.np-btn.disabled,.np-btn:disabled{opacity:.6;cursor:not-allowed}.np-btn.has-icon{padding:0}.np-btn-half{float:left;width:47%;padding:3px 0;text-align:center}.np-btn-half.btn-right{float:right}.np-btn-trash{background-color:#e14d43;border-color:#e14d43;color:#fff}.np-btn-trash:hover{background-color:#ba281e;border-color:#ba281e}.np-quickedit-error,.np-quickedit-info{padding:4px 0 4px 8px;margin-bottom:10px;background-color:#f9f9f9}.np-quickedit-error{border-left:4px solid #dd3d36}.np-quickedit-info{border-left:4px solid #0074a2}.nestedpages-modal-backdrop{position:fixed;width:100%;height:100%;background-color:rgba(0,0,0,.85);top:0;left:0;z-index:9999;visibility:hidden;opacity:0;-webkit-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease}.nestedpages-modal-backdrop.active{visibility:visible;opacity:1;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.nestedpages-modal-content{z-index:99999;position:fixed;top:-200%;width:90%;height:80%;margin:10px auto 0;background-color:#fff;left:5%;-webkit-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease}.nestedpages-modal-content.small{width:400px;left:50%;margin-left:-200px}.nestedpages-modal-content.short{height:auto}.nestedpages-modal-content.active{top:50%;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.nestedpages-modal-content h5{font-size:1.1em}.nestedpages-modal-content .modal-body{position:relative;padding:10px}.nestedpages-modal-content .modal-body.new-child{padding:0}.nestedpages-modal-content .modal-footer{padding:10px;text-align:right;background-color:#404040;zoom:1}.nestedpages-modal-content .modal-footer:after,.nestedpages-modal-content .modal-footer:before{content:" ";display:table}.nestedpages-modal-content .modal-footer:after{clear:both}.nestedpages-modal-content .modal-footer .modal-close{float:left}.nestedpages-modal-content .modal-open .modal{overflow-x:hidden;overflow-y:auto}.nestedpages-modal-content .modal-content{position:relative;background-color:#fff;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.nestedpages-modal-full{width:94%;height:94%;-webkit-transform:none;-ms-transform:none;transform:none;left:3%}.nestedpages-modal-full.active{top:3%}.nestedpages-modal-full .modal-header{position:absolute;top:0;left:0;width:100%;height:50px;z-index:4;zoom:1;padding-left:.5em}.nestedpages-modal-full .modal-header:after,.nestedpages-modal-full .modal-header:before{content:" ";display:table}.nestedpages-modal-full .modal-header:after{clear:both}.nestedpages-modal-full .modal-content-interior{padding-top:50px;height:100%}.nestedpages-modal-full .modal-content-interior .modal-content-body{height:100%;max-height:100%}.np-trash-modal{text-align:center}.np-trash-modal .modal-body{padding-bottom:30px}.np-trash-modal .button-primary{margin-left:10px}.clone-modal h3{margin:0;padding:8px;background-color:#e5e5e5}.clone-modal .form-control{margin:0!important;padding:5px 10px}.np-inline-overlay{position:fixed;width:100%;height:100%;background-color:rgba(0,0,0,.4);z-index:998;top:0;right:0;bottom:0;left:0;opacity:0;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.np-inline-overlay.active{opacity:1;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.np-inline-modal{position:relative;z-index:999;background-color:#fff;border-radius:0;-webkit-box-shadow:0 0 4px 0 rgba(0,0,0,.5);box-shadow:0 0 4px 0 rgba(0,0,0,.5)}.nestedpages-listing-title{zoom:1}.nestedpages-listing-title:after,.nestedpages-listing-title:before{content:" ";display:table}.nestedpages .updated,.nestedpages-listing-title:after{clear:both}.nestedpages-toggleall.np-btn{float:right}.np-toggle-publish{color:#999}.np-toggle-publish.active{color:#333;font-weight:700}.np-sync-menu-cont{float:right;margin:0 15px 0 0}.np-sync-menu-cont button{position:relative;top:-5px;padding:5px 8px}.np-sync-menu-cont label{position:relative;top:4px}.nestedpages-top-toggles{float:right;zoom:1;padding-top:10px}.nestedpages-top-toggles:after,.nestedpages-top-toggles:before{content:" ";display:table}.nestedpages-top-toggles:after{clear:both}.np-tab-pane{display:none}.nestedpages ul.np-tabs,.ul.np-tabs{background:0 0;text-align:left;list-style-type:none;margin:0 0 10px;padding:0;border-bottom:1px solid #ccc;font-size:0;line-height:0}.nestedpages ul.np-tabs li,.ul.np-tabs li{font-size:13px;line-height:1.4em;display:inline-block;margin:0 0 0 6px;border:0}.nestedpages ul.np-tabs li a,.ul.np-tabs li a{background-color:#e6e6e6;display:block;text-decoration:none;padding:8px 15px;color:#333;border:1px solid #ccc;border-bottom:0}.nestedpages ul.np-tabs li a:hover,.ul.np-tabs li a:hover{background-color:#fff}.nestedpages ul.np-tabs li a:active,.nestedpages ul.np-tabs li a:focus,.ul.np-tabs li a:active,.ul.np-tabs li a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}.nestedpages ul.np-tabs li.active a,.ul.np-tabs li.active a{font-weight:700;position:relative;color:#333;background-color:#fff}.nestedpages ul.np-tabs li.active a:after,.ul.np-tabs li.active a:after{position:absolute;width:100%;height:2px;content:'';background-color:#fff;left:0;bottom:-1px}.nestedpages-datepicker.ui-datepicker{background-color:#fff;font-size:90%;-webkit-box-shadow:0 0 3px 0 rgba(0,0,0,.4);box-shadow:0 0 3px 0 rgba(0,0,0,.4);border-radius:3px;padding:0;width:auto}.nestedpages-datepicker.ui-datepicker .ui-datepicker-next,.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev{position:absolute;color:#fff;top:0;right:0;cursor:pointer;display:block;width:35px;height:35px;font-size:0;background:url(../images/datepicker-arrow-next.png) center;opacity:1;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.nestedpages-datepicker.ui-datepicker .ui-datepicker-next:hover,.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev:hover{opacity:.5;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar{margin:0;border-collapse:collapse}.nestedpages-datepicker.ui-datepicker .ui-datepicker-prev{right:auto;left:0;background:url(../images/datepicker-arrow-prev.png)}.nestedpages-datepicker.ui-datepicker .ui-datepicker-header{padding:0}.nestedpages-datepicker.ui-datepicker .ui-datepicker-title{background-color:#1a1a1a;text-align:center;color:#fff;height:35px;line-height:35px;border-radius:3px 3px 0 0;margin:0}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar table{width:auto}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar td,.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar th{text-align:center;width:30px;height:30px}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar th{background-color:#e6e6e6;text-transform:uppercase;font-size:11px;letter-spacing:1px;padding:0}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar td{border-top:1px solid #ebebeb;border-left:1px solid #ebebeb;padding:0}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar td:first-child{border-left:0}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a{text-align:center;padding:0;text-decoration:none;color:#333;display:block;background-color:#fff;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;width:30px;height:30px;line-height:30px}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a.ui-state-active{background-color:#1a1a1a;color:#fff}.nestedpages-datepicker.ui-datepicker .ui-datepicker-calendar a:hover{background-color:#333;color:#fff;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.nestedpages-dropdown{position:relative;z-index:3;display:inline-block}.nestedpages-dropdown-content{display:none;position:absolute;top:40px;left:0;z-index:2;background-color:#fff;width:250px;text-align:left;border-radius:2px;-webkit-box-shadow:1px 1px 3px 0 rgba(51,51,51,.4);box-shadow:1px 1px 3px 0 rgba(51,51,51,.4)}.nestedpages-dropdown-content.padded{padding:1em}.nestedpages-dropdown-content p{line-height:1.4;margin:0}.nestedpages-dropdown-content.right{left:auto;right:0}.nestedpages-dropdown-content ul{list-style-type:none;margin:0;padding:0;zoom:1}.nestedpages-dropdown-content ul:after,.nestedpages-dropdown-content ul:before{content:" ";display:table}.nestedpages-dropdown-content ul:after{clear:both}.nestedpages-dropdown-content ul li{float:none;width:100%;margin:0;line-height:1}.nestedpages-dropdown-content ul li a{display:block;color:#333;text-decoration:none}.nestedpages-dropdown-content ul li:first-child a{border:0}.nestedpages-dropdown-content.active{display:block}#nested-loading{display:none;float:right;width:30px;height:30px;margin:0 20px 0 0;position:relative}#nested-loading svg{width:30px;height:30px;-webkit-animation:nestedpagesRotate linear 1.25s infinite;animation:nestedpagesRotate linear 1.25s infinite;position:absolute;left:0;top:0;line-height:.1}#nested-loading svg path{fill:#999}.np-default-loading,.np-menu-search-loading,.np-qe-loading{display:none;float:right;width:25px;height:25px;margin:2px 10px 0 0;position:relative;-webkit-animation:nestedpagesRotate linear 1.25s infinite;animation:nestedpagesRotate linear 1.25s infinite}.np-default-loading svg,.np-menu-search-loading svg,.np-qe-loading svg{position:absolute;left:0;top:0;width:25px;height:25px}.np-default-loading svg path,.np-menu-search-loading svg path,.np-qe-loading svg path{fill:#fff}.np-default-loading{float:none;margin:0}.np-default-loading svg path{fill:#999}.nestedpages .handle .bars,.nestedpages ol .row-status-icon .icon{fill:#b3b3b3}@-webkit-keyframes nestedpagesRotate{0%{-webkit-transform:rotate(0);transform:rotate(0);-webkit-transform-origin:center center;transform-origin:center center}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-transform-origin:center center;transform-origin:center center}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg);-webkit-transform-origin:center center;transform-origin:center center}}@keyframes nestedpagesRotate{0%{-webkit-transform:rotate(0);transform:rotate(0);-webkit-transform-origin:center center;transform-origin:center center}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-transform-origin:center center;transform-origin:center center}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg);-webkit-transform-origin:center center;transform-origin:center center}}.nestedpages-tools{zoom:1;clear:both;margin:20px 0 5px}.nestedpages-tools:after,.nestedpages-tools:before{content:" ";display:table}.nestedpages-tools:after{clear:both}.nestedpages-tools .subsubsub{margin:0}.nestedpages-tools .np-tools-primary{clear:left;padding-top:8px}.nestedpages-tools .select{float:left;margin-left:5px}.nestedpages-tools .select:first-child{margin-left:0}.nestedpages-tools .np-tools-sort{float:left}.nestedpages-tools .np-tools-search{float:right}.wppages-handle-expand{float:left;background-color:#f2f2f2;font-size:18px;width:46px;height:46px;margin-right:5px;text-align:center;border-right:1px solid #e1e1e1}.wppages-handle-expand div{background-color:#fff;border:1px solid #e1e1e1;width:24px;height:24px;line-height:24px;border-radius:15px;margin-top:9px;cursor:pointer;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.wppages-handle-expand div:hover{background-color:#0074a2;border-color:#0074a2;color:#fff;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.nestedpages{clear:both;border-radius:4px}.nestedpages .ui-sortable-placeholder{display:block!important;position:relative;min-height:46px;border:1px dashed #0074a2!important;background-color:#effaff;margin:0}.nestedpages .ui-sortable-helper{opacity:.8;-webkit-box-shadow:2px 2px 3px 0 rgba(0,0,0,.5);box-shadow:2px 2px 3px 0 rgba(0,0,0,.5)}.nestedpages ol{list-style-type:none;clear:both;margin:0;border:1px solid #e5e5e5;border-radius:3px}.nestedpages ol a{text-decoration:none}.nestedpages ol .page-link .edit-indicator{margin-left:10px;display:none}.nestedpages ol .page-link .edit-indicator i{font-size:12px;margin-right:3px}.nestedpages ol .page-link:hover .edit-indicator{display:inline}.nestedpages ol .np-page-type{color:#333}.nestedpages ol .locked{color:#333;margin-left:10px;padding-left:20px;position:relative}.nestedpages ol .locked svg{position:absolute;left:0;top:-5px;width:15px;height:24px}.nestedpages ol .locked em{font-style:normal}.nestedpages ol .row-status-icon{width:18px;height:18px;display:inline-block;vertical-align:middle;margin-left:5px}.nestedpages ol .np-icon-eye-blocked,.nestedpages ol .status,.nestedpages ol .sticky{color:#999}.nestedpages ol .nav-status{color:#b3b3b3}.nestedpages ol .np-hide{display:none}.nestedpages ol .np-assigned-pt-actions{list-style-type:none;margin:0 0 0 10px;padding:0;display:inline-block;vertical-align:middle}.nestedpages ol .np-seo-indicator,.nestedpages ol .wpseo-score-icon{position:absolute;top:50%;margin-top:-6px;right:10px}.nestedpages ol .np-assigned-pt-actions li{display:none;background:0 0;border:0}.nestedpages ol .np-assigned-pt-actions li.visible{display:inline-block}.nestedpages ol .np-assigned-pt-actions li a{color:#333;display:block;border-left:1px solid #e1e1e1;padding:0 5px}.nestedpages ol .np-assigned-pt-actions li:first-child a{border:0;padding-left:0}.nestedpages ol .np-seo-indicator{display:block;width:12px;height:12px;border-radius:50%;background-color:#999}.nestedpages ol .np-seo-indicator.good{background-color:#7ad03a}.nestedpages ol .np-seo-indicator.ok{background-color:#ffba00}.nestedpages ol .np-seo-indicator.poor{background-color:#ee7c1b}.nestedpages ol .np-seo-indicator.bad{background-color:#dd3d36}.nestedpages ol .np-seo-indicator.warn{background-color:maroon}.nestedpages ol .np-seo-indicator.wrong{background-color:red}.nestedpages ol .np-seo-indicator.noindex{background-color:#1e8cbe}.nestedpages ol li{margin:0;border-top:1px solid #e1e1e1;background-color:#0074a2}.nestedpages ol li.first,.nestedpages ol li.no-border,.nestedpages ol li:first-child{border:0}.nestedpages ol ol{display:none;border-radius:0;list-style-type:none;border:0;-webkit-box-shadow:none;box-shadow:none;border-top:1px solid #e1e1e1}.nestedpages .np-search-results .np-hide{display:block}.nestedpages .child-toggle{display:table-cell;width:30px;text-align:left}.nestedpages .child-toggle .child-toggle-spacer{display:inline-block;vertical-align:middle;height:50px;width:1px}.nestedpages .child-toggle a{display:inline-block;text-align:center;vertical-align:middle;width:29px;height:29px;line-height:29px;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)}.nestedpages .child-toggle a.open{-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.nestedpages .child-toggle a:active,.nestedpages .child-toggle a:focus{outline:0}.nestedpages .np-icon-arrow{display:inline-block;vertical-align:middle;width:0;height:0;position:relative;top:-3px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:6px solid #333}.nestedpages .non-indent .child-toggle{width:46px;background-color:#f0f0f0;position:relative}.nestedpages .non-indent .child-toggle .child-toggle-spacer{display:block;height:46px;width:46px}.nestedpages .non-indent .child-toggle a{position:absolute;top:50%;display:inline-block;vertical-align:middle;left:8px;margin-top:-16px;width:28px;height:28px;background-color:#fff;border:1px solid #e1e1e1;border-radius:50%;line-height:28px;color:#333;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)}.nestedpages .non-indent .child-toggle a.open{-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.nestedpages .non-indent .child-toggle a:hover{background-color:#333;border-color:#333}.nestedpages .non-indent .child-toggle a:hover .np-icon-arrow{border-left-color:#fff}.nestedpages .non-indent .np-icon-arrow{border-top-width:4px;border-bottom-width:4px;border-left-width:6px}.nestedpages .handle{display:inline-block;opacity:.4;cursor:move;position:relative;top:-1px;height:20px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.nestedpages .handle:hover,.np-menu-type-selection ul li a{-webkit-transition:all .2s ease;-o-transition:all .2s ease}.nestedpages .np-icon-sub-menu .arrow,.np-wpml-translations-modal .np-qe-loading svg path{fill:#999}.nestedpages .handle:hover{transition:all .2s ease;color:#0074a2}.nestedpages .np-icon-sub-menu{display:none;height:20px}.nestedpages .page-title .link-icon .icon,.np-nav-menu-settings .handle .bars{fill:#b3b3b3}.nestedpages .row.no-sort .page-title{padding-left:10px}.nestedpages .row.no-sort-filtered .page-title{padding-left:34px}.nestedpages .page-title{display:inline-block;vertical-align:middle}.nestedpages .page-title .link-icon{width:20px;height:20px;display:inline;vertical-align:middle;margin-left:8px;position:relative;top:-2px}.nestedpages .np-thumbnail{display:table-cell;width:80px;vertical-align:middle;zoom:1}.nestedpages .np-thumbnail:after,.nestedpages .np-thumbnail:before{content:" ";display:table}.nestedpages .np-thumbnail:after{clear:both}.nestedpages .np-thumbnail img{float:right;width:100%;height:auto}.nestedpages .np-thumbnail.large{width:150px}.nestedpages .np-thumbnail.small{width:50px}.nestedpages .np-thumbnail.link{text-align:center}.nestedpages .np-bulk-checkbox{display:table-cell;width:33px;vertical-align:middle;text-align:center;background-color:#f0f0f0}.nestedpages .np-bulk-checkbox input[type=checkbox]{margin-right:0}.nestedpages .handle,.nestedpages .np-icon-sub-menu{width:30px;text-align:center;vertical-align:middle}.nestedpages .non-indent li ol .row .np-icon-sub-menu{display:inline-block}.nestedpages .non-indent li ol .row .handle,.nestedpages .non-indent li ol .row:hover .np-icon-sub-menu{display:none}.nestedpages .no-sort ol li .row:hover .np-icon-sub-menu,.nestedpages .non-indent li ol .row.no-sort .np-icon-sub-menu,.nestedpages .non-indent li ol .row:hover .handle{display:inline-block}.nestedpages .page-row.hidden{display:none}.nestedpages .row{background-color:#fff;display:table;width:100%}.nestedpages .row.active,.nestedpages .row:hover{background-color:#f0f0f0}.nestedpages .row.active .handle,.nestedpages .row:hover .handle{opacity:1}.nestedpages .row.active .np-assigned-pt-actions li,.nestedpages .row:hover .np-assigned-pt-actions li{display:inline-block}.nestedpages .row.active .cell.custom-column,.nestedpages .row:hover .cell.custom-column{visibility:hidden}.nestedpages .row.np-updated{background-color:#e9f7df;-webkit-transition:background-color .4s ease;-o-transition:background-color .4s ease;transition:background-color .4s ease}.nestedpages .row.np-updated-show{background-color:#fff;-webkit-transition:background-color .4s ease;-o-transition:background-color .4s ease;transition:background-color .4s ease}.nestedpages .row.search .page-title{padding-left:10px}.nestedpages .non-hierarchical-spacer{height:47px}.nestedpages .row-inner{display:table-cell;vertical-align:middle;position:relative}.nestedpages ol li ol .row-inner{padding-left:0}.nestedpages ol li ol li ol .row-inner{padding-left:20px}.nestedpages ol li ol li ol li ol .row-inner{padding-left:40px}.nestedpages ol li ol li ol li ol li ol .row-inner{padding-left:60px}.nestedpages ol li ol li ol li ol li ol li ol .row-inner{padding-left:80px}.nestedpages .np-post-columns{float:right;margin:3px 20px 0 0;zoom:1}.nestedpages .np-post-columns:after,.nestedpages .np-post-columns:before{content:" ";display:table}.nestedpages .np-post-columns:after{clear:both}.nestedpages .np-post-columns ul li{background:0 0;color:gray;border:0;float:left;margin-left:8px;padding-left:8px;border-left:1px solid #ccc}.nestedpages .np-post-columns ul li:first-child{margin-left:0;padding-left:0;border:0}.nestedpages .has-yoast .np-post-columns{margin-right:30px}.nestedpages .has-custom-columns .np-post-columns{display:none}.nestedpages .action-buttons{display:none;position:absolute;right:10px;top:50%;margin-top:-15px}.nestedpages .action-buttons a{margin:0 0 0 -5px;padding:0 .5em;height:30px;line-height:30px}.nestedpages .action-buttons a.np-btn-trash{margin-left:4px}.nestedpages .action-buttons a.np-btn-trash svg{width:20px;height:20px;position:relative;top:4px}.nestedpages .action-buttons a.np-btn-trash svg .icon{fill:#fff}.nestedpages .action-buttons .nestedpages-dropdown{display:inline-block;vertical-align:middle}.nestedpages .action-buttons .nestedpages-dropdown .np-btn.toggle{background:0 0;border:0}.nestedpages .action-buttons .nestedpages-dropdown .np-btn.toggle svg{position:relative;top:4px}.nestedpages .action-buttons .nestedpages-dropdown .np-btn.toggle:active,.nestedpages .action-buttons .nestedpages-dropdown .np-btn.toggle:focus{-webkit-box-shadow:none;box-shadow:none}.nestedpages .action-buttons .nestedpages-dropdown .np-btn.toggle.active{color:gray}.nestedpages .action-buttons .nestedpages-dropdown ul{left:auto;right:5px;width:180px}.nestedpages .action-buttons .nestedpages-dropdown ul li{background-color:#fff}.nestedpages .action-buttons .nestedpages-dropdown ul li a{display:block;color:#333;line-height:1.2;height:auto;margin:0;padding:10px 5px 10px 30px;position:relative}.nestedpages .action-buttons .nestedpages-dropdown ul li a.disabled{opacity:.3}.nestedpages .action-buttons .nestedpages-dropdown ul li a svg{position:absolute;left:0;width:20px;height:20px;top:8px;margin-right:5px;margin-left:5px}.np-search{float:right}.nestedpages-list-header{background-color:#fff;border:1px solid #e1e1e1;border-bottom:0;height:46px;zoom:1}.nestedpages-list-header:after,.nestedpages-list-header:before{content:" ";display:table}.nestedpages-list-header:after{clear:both}.nestedpages-list-header .np-check-all{float:right;width:33px;text-align:center;line-height:46px;background-color:#f0f0f0}.nestedpages-list-header .np-check-all input[type=checkbox]{margin:0}.nestedpages-list-header .np-check-all input[type=checkbox].check-all-partial:checked:before{content:"-";margin:-9px 0 0}.nestedpages-list-header .np-hidden-select-count{display:none;float:right;margin:0 1em 0 0;line-height:46px;font-style:oblique}.nestedpages-list-header .np-bulk-form{padding-right:3px;float:right;margin-right:5px;position:relative;top:9px}.nestedpages-list-header .np-bulk-form input[type=submit],.nestedpages-list-header .np-bulk-form select{display:inline-block}@media (min-width:768px){.nestedpages .row.active .action-buttons,.nestedpages .row:hover .action-buttons{display:block}.nestedpages .row.active .np-post-columns,.nestedpages .row:hover .np-post-columns{display:none}}@media (max-width:767px){.nestedpages ol .page-link{line-height:24px}.nestedpages ol .locked em,.nestedpages ol .page-link:hover span{display:none}.nestedpages .child-toggle{background:0 0}.nestedpages .row{height:auto}.nestedpages .action-buttons{display:none;background-color:#0074a2;float:none;margin:0;padding:8px}.nestedpages .action-buttons a{margin-left:5px}}.nestedpages .new-child .header,.nestedpages .quick-edit .header{padding:10px 0 0;background-color:#f2f2f2;position:relative}.nestedpages .new-child .header h3,.nestedpages .quick-edit .header h3{position:absolute;right:10px;top:15px;font-size:12px}.nestedpages .new-child .header h3 span,.nestedpages .quick-edit .header h3 span{display:inline-block;float:none;margin-left:10px}.nestedpages .new-child .header.no-tabs,.nestedpages .quick-edit .header.no-tabs{zoom:1;padding:10px;border-bottom:1px solid #ccc}.nestedpages .new-child .header.no-tabs:after,.nestedpages .new-child .header.no-tabs:before,.nestedpages .quick-edit .header.no-tabs:after,.nestedpages .quick-edit .header.no-tabs:before{content:" ";display:table}.nestedpages .new-child .header.no-tabs:after,.nestedpages .quick-edit .header.no-tabs:after{clear:both}.nestedpages .new-child .header.no-tabs h3,.nestedpages .quick-edit .header.no-tabs h3{position:relative;top:5px;right:auto;float:right}.nestedpages .new-child .np-menuoptions-description,.nestedpages .quick-edit .np-menuoptions-description{background-color:#f2f2f2;margin-bottom:15px;margin-top:-8px;padding:8px 10px;border:1px solid #e1e1e1}.nestedpages .new-child .np-menuoptions-description p,.nestedpages .quick-edit .np-menuoptions-description p{margin:0 0 2px}.nestedpages .new-child .np-menuoptions-description p.note,.nestedpages .quick-edit .np-menuoptions-description p.note{font-size:.9em;margin:0;opacity:.7}.nestedpages .new-child .form-interior,.nestedpages .quick-edit .form-interior{padding:10px}.nestedpages .new-child h3,.nestedpages .quick-edit h3{margin:0 0 8px;font-size:14px}.nestedpages .new-child h3 span,.nestedpages .quick-edit h3 span{float:right;font-size:12px}.nestedpages .new-child h3 span em,.nestedpages .quick-edit h3 span em{font-weight:400;font-style:normal;color:gray}.nestedpages .new-child .fields,.nestedpages .quick-edit .fields{margin-bottom:10px;background:url(../images/border.png) center repeat-y;zoom:1}.nestedpages .new-child .fields:after,.nestedpages .new-child .fields:before,.nestedpages .quick-edit .fields:after,.nestedpages .quick-edit .fields:before{content:" ";display:table}.nestedpages .new-child .fields:after,.nestedpages .quick-edit .fields:after{clear:both}.nestedpages .new-child .left,.nestedpages .quick-edit .left{float:left;width:48%}.nestedpages .new-child .right,.nestedpages .quick-edit .right{float:right;width:48%}.nestedpages .new-child label,.nestedpages .quick-edit label{font-style:oblique}.nestedpages .new-child .buttons,.nestedpages .quick-edit .buttons{clear:both;zoom:1;background-color:#404040;padding:8px}.nestedpages .new-child .buttons:after,.nestedpages .new-child .buttons:before,.nestedpages .quick-edit .buttons:after,.nestedpages .quick-edit .buttons:before{content:" ";display:table}.nestedpages .new-child .buttons:after,.nestedpages .quick-edit .buttons:after{clear:both}.nestedpages .new-child .form-control,.nestedpages .quick-edit .form-control{clear:both;zoom:1;margin-bottom:5px}.nestedpages .new-child .form-control:after,.nestedpages .new-child .form-control:before,.nestedpages .quick-edit .form-control:after,.nestedpages .quick-edit .form-control:before{content:" ";display:table}.nestedpages .new-child .form-control:after,.nestedpages .quick-edit .form-control:after{clear:both}.nestedpages .new-child .form-control input[type=text],.nestedpages .new-child .form-control input[type=password],.nestedpages .new-child .form-control select,.nestedpages .quick-edit .form-control input[type=text],.nestedpages .quick-edit .form-control input[type=password],.nestedpages .quick-edit .form-control select{float:right;width:75%}.nestedpages .new-child .form-control label,.nestedpages .quick-edit .form-control label{float:left;width:20%}.nestedpages .new-child .form-control.original-link,.nestedpages .quick-edit .form-control.original-link{background-color:#f9f9f9;border:1px solid #e1e1e1;padding:5px;font-style:oblique;margin-bottom:8px}.nestedpages .new-child .form-control.password label,.nestedpages .quick-edit .form-control.password label{width:25%}.nestedpages .new-child .form-control.password input[type=text],.nestedpages .quick-edit .form-control.password input[type=text]{float:left;width:35%}.nestedpages .new-child .form-control.password .private,.nestedpages .quick-edit .form-control.password .private{float:right;width:35%;margin-top:4px}.nestedpages .new-child .form-control.password .private label,.nestedpages .quick-edit .form-control.password .private label{width:auto;float:none}.nestedpages .new-child .form-control.np-datepicker-container .datetime,.nestedpages .quick-edit .form-control.np-datepicker-container .datetime{float:right;width:75%}.nestedpages .new-child .form-control.np-datepicker-container .np-time-container,.nestedpages .quick-edit .form-control.np-datepicker-container .np-time-container{float:left;width:45%;margin:0;position:relative}.nestedpages .new-child .form-control.np-datepicker-container .np-time-container input[type=text],.nestedpages .quick-edit .form-control.np-datepicker-container .np-time-container input[type=text]{float:left;width:55%}.nestedpages .new-child .form-control.np-datepicker-container .np-time-container select,.nestedpages .quick-edit .form-control.np-datepicker-container .np-time-container select{float:right;width:35%}.nestedpages .new-child .form-control.np-datepicker-container .np_datepicker,.nestedpages .quick-edit .form-control.np-datepicker-container .np_datepicker{float:left;width:45%;margin:0}.nestedpages .new-child .form-control.np-datepicker-container .np_datepicker.full,.nestedpages .quick-edit .form-control.np-datepicker-container .np_datepicker.full{width:100%}.nestedpages .new-child .form-control.np-datepicker-container span,.nestedpages .quick-edit .form-control.np-datepicker-container span{float:left;width:10%;display:block;text-align:center;padding-top:3px}.nestedpages .new-child .form-control.full label,.nestedpages .quick-edit .form-control.full label{width:auto}.nestedpages .new-child .form-control.full.checkbox label,.nestedpages .quick-edit .form-control.full.checkbox label{padding:5px 0 5px 25%}.nestedpages .new-child .comments,.nestedpages .quick-edit .comments{float:right;width:75%;margin-bottom:10px;zoom:1}.nestedpages .new-child .comments:after,.nestedpages .new-child .comments:before,.nestedpages .quick-edit .comments:after,.nestedpages .quick-edit .comments:before{content:" ";display:table}.nestedpages .new-child .comments:after,.nestedpages .quick-edit .comments:after{clear:both}.nestedpages .new-child .dates,.nestedpages .quick-edit .dates{float:right;width:75%;margin-bottom:6px}.nestedpages .new-child .dates select,.nestedpages .quick-edit .dates select{width:25%}.nestedpages .new-child .dates input,.nestedpages .quick-edit .dates input{width:12%}.nestedpages .new-child .np-menuoptions,.nestedpages .new-child .np-taxonomies,.nestedpages .quick-edit .np-menuoptions,.nestedpages .quick-edit .np-taxonomies{zoom:1;background-color:#fff}.nestedpages .new-child .np-menuoptions:after,.nestedpages .new-child .np-menuoptions:before,.nestedpages .new-child .np-taxonomies:after,.nestedpages .new-child .np-taxonomies:before,.nestedpages .quick-edit .np-menuoptions:after,.nestedpages .quick-edit .np-menuoptions:before,.nestedpages .quick-edit .np-taxonomies:after,.nestedpages .quick-edit .np-taxonomies:before{content:" ";display:table}.nestedpages .new-child .np-menuoptions:after,.nestedpages .new-child .np-taxonomies:after,.nestedpages .quick-edit .np-menuoptions:after,.nestedpages .quick-edit .np-taxonomies:after{clear:both}.nestedpages .new-child .np-taxonomy,.nestedpages .quick-edit .np-taxonomy{float:left;width:30%;margin-right:3.33%}.nestedpages .new-child .np-taxonomy .title,.nestedpages .quick-edit .np-taxonomy .title{font-weight:700;margin-bottom:4px;display:block}.nestedpages .new-child .np-taxonomy li,.nestedpages .quick-edit .np-taxonomy li{background-color:#fff;border:0}.nestedpages .new-child .np-taxonomy textarea,.nestedpages .quick-edit .np-taxonomy textarea{width:100%;height:6.5em}.nestedpages .new-child .np-menuoptions .left label,.nestedpages .quick-edit .np-menuoptions .left label{width:30%}.nestedpages .new-child .np-menuoptions .left input,.nestedpages .quick-edit .np-menuoptions .left input{width:65%}.nestedpages .new-child .np-menuoptions .right label,.nestedpages .quick-edit .np-menuoptions .right label{margin-bottom:5px;display:block;float:none;width:100%}.nestedpages .new-child .np-hide-options,.nestedpages .quick-edit .np-hide-options{display:none;background-color:#f0f0f0;border-radius:3px;clear:both;padding:6px;-webkit-box-sizing:border-box;box-sizing:border-box}.nestedpages .new-child .np-hide-options p,.nestedpages .quick-edit .np-hide-options p{margin:0}.nestedpages .new-child .np-hide-options label,.nestedpages .quick-edit .np-hide-options label{display:block;margin-top:4px;font-style:normal}.nestedpages .new-child .new-page-titles,.nestedpages .quick-edit .new-page-titles{display:block;border:0}.nestedpages .new-child .new-page-titles li,.nestedpages .quick-edit .new-page-titles li{background:0 0;border:0;padding:4px;zoom:1}.nestedpages .new-child .new-page-titles li:after,.nestedpages .new-child .new-page-titles li:before,.nestedpages .quick-edit .new-page-titles li:after,.nestedpages .quick-edit .new-page-titles li:before{content:" ";display:table}.nestedpages .new-child .new-page-titles li:after,.nestedpages .quick-edit .new-page-titles li:after{clear:both}.nestedpages .new-child .new-page-titles li:nth-child(even),.nestedpages .quick-edit .new-page-titles li:nth-child(even){background-color:#f0f0f0}.nestedpages .new-child .new-page-titles li label,.nestedpages .quick-edit .new-page-titles li label{margin-top:7px}.nestedpages .new-child .new-page-titles .form-control,.nestedpages .quick-edit .new-page-titles .form-control{float:right;width:90%;clear:none}.nestedpages .nestedpages-bulk-edit .np-bulk-footer:after,.nestedpages .new-child .new-page-titles .new-child-row div:after,.nestedpages .quick-edit .new-page-titles .new-child-row div:after,.nestedpages-settings-table .row-container .head:after,.np-link-modal-content .buttons-inner:after,.np-link-modal-content .footer-inner:after,.np-menu-customization .np-menu-customization-header:after,.np-modal-form .buttons,.np-modal-form .form-control:after,.np-modal-form .form-interior:after,.np-nav-menu-settings .menu-item .title:after,.np-nav-menu-settings .menu-item:after,.np-nav-menu-settings .np-extra-options .half,.np-nav-menu-settings .np-extra-options:after{clear:both}.nestedpages .new-child .new-page-titles .np-icon-menu,.nestedpages .quick-edit .new-page-titles .np-icon-menu{float:left;margin-top:0;width:24px;height:24px;position:relative;top:5px}.nestedpages .new-child .new-page-titles .new-child-row div,.nestedpages .quick-edit .new-page-titles .new-child-row div{float:right;width:75%;margin:2px;zoom:1}.nestedpages .new-child .new-page-titles .new-child-row div:after,.nestedpages .new-child .new-page-titles .new-child-row div:before,.nestedpages .quick-edit .new-page-titles .new-child-row div:after,.nestedpages .quick-edit .new-page-titles .new-child-row div:before{content:" ";display:table}.nestedpages .new-child .new-page-titles .new-child-row div input[type=text],.nestedpages .quick-edit .new-page-titles .new-child-row div input[type=text]{float:left;width:80%}.nestedpages .new-child .new-page-titles .new-child-row div a,.nestedpages .quick-edit .new-page-titles .new-child-row div a{float:right}.np-modal.nestedpages .new-child .right .form-control input[type=text],.np-modal.nestedpages .new-child .right .form-control input[type=password],.np-modal.nestedpages .new-child .right .form-control label,.np-modal.nestedpages .new-child .right .form-control select{float:none;width:100%}.np-modal.nestedpages .new-child .right .form-control.full label{padding-left:0}.np-modal.nestedpages .new-child .new-page-titles .form-control{width:85%}.np-modal.nestedpages .new-child .new-page-titles .form-control div{width:100%}.np-modal.nestedpages .new-child .left label{display:none}@media (max-width:767px){.nestedpages .quick-edit .comments,.nestedpages .quick-edit .dates,.nestedpages .quick-edit .form-control input[type=text],.nestedpages .quick-edit .form-control input[type=password],.nestedpages .quick-edit .form-control label,.nestedpages .quick-edit .form-control select,.nestedpages .quick-edit .form-control.np-datepicker-container .datetime,.nestedpages .quick-edit .left,.nestedpages .quick-edit .right{float:none;width:100%}.nestedpages .quick-edit .fields{background:0 0}.nestedpages .quick-edit .form-control{margin-bottom:10px}.nestedpages .quick-edit .form-control label{display:block;margin-bottom:4px}.nestedpages .quick-edit .dates{margin-bottom:6px}}.np-modal-form .form-interior{zoom:1;background:url(../images/border.png) center repeat-y;padding:5px 0}.np-modal-form .form-interior:after,.np-modal-form .form-interior:before{content:" ";display:table}.np-modal-form .form-control{zoom:1;margin-bottom:10px}.np-modal-form .form-control:after,.np-modal-form .form-control:before{content:" ";display:table}.np-modal-form .checkbox{margin-bottom:10px}.np-modal-form .left{float:left;width:45%}.np-modal-form .right{float:right;width:45%;padding-top:18px}.np-modal-form label{display:block}.np-modal-form input[type=text],.np-modal-form select{width:100%}.np-new-child-form.in-modal{padding-bottom:50px}.modal-body.np-menu-item-form{height:100%;padding:0;border-top:1px solid #e1e1e1;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.np-link-modal-content .new-child,.np-link-modal-content .np-tabbed-content{height:100%}.np-link-modal-content .new-child form,.np-link-modal-content .np-tabbed-content form{height:94%}.np-link-modal-content .form-interior,.np-link-modal-content .modal-content{position:relative;height:100%}.np-link-modal-content .form-interior{overflow:auto}.np-link-modal-content .buttons,.np-link-modal-content .modal-footer{position:absolute;left:0;width:100%;bottom:0;padding:0}.np-link-modal-content .buttons{padding:0!important}.np-link-modal-content .buttons-inner,.np-link-modal-content .footer-inner{padding:10px;zoom:1}.np-link-modal-content .buttons-inner:after,.np-link-modal-content .buttons-inner:before,.np-link-modal-content .footer-inner:after,.np-link-modal-content .footer-inner:before{content:" ";display:table}.np-menu-type-selection{overflow:auto;width:35%;padding:15px;background-color:#f9f9f9;border-right:1px solid #e1e1e1;-webkit-box-sizing:border-box;box-sizing:border-box}.np-menu-type-selection ul{list-style-type:none;margin:0;padding:0;border-radius:3px;border:0}.np-menu-type-selection ul li{margin:0;border:1px solid #e5e5e5;border-top:0}.np-menu-type-selection ul li a{background-color:#fff;display:block;text-decoration:none;padding:15px 10px;position:relative;color:#333;font-weight:700;transition:all .2s ease}.np-menu-type-selection ul li a:hover{background-color:#ebebeb;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.np-menu-type-selection ul li a:after{position:absolute;font-family:dashicons;content:"\f140";font-size:18px;right:10px;top:15px;color:gray}.np-menu-type-selection ul li a.active:after{content:"\f142"}.np-menu-type-selection ul li a.np-custom-link:after{content:"\f139"}.np-menu-type-selection ul li a.np-custom-link.active{background-color:#0074a2;color:#fff}.np-menu-type-selection ul li a.np-custom-link.active:after{content:"\f335";color:#fff}.np-menu-type-selection ul li a:active,.np-menu-type-selection ul li a:focus{-webkit-box-shadow:none;box-shadow:none}.np-menu-type-selection ul li a.no-terms{color:#b3b3b3}.np-menu-type-selection ul li a.no-terms span{float:right;font-weight:400;font-style:oblique}.np-menu-type-selection ul li a.no-terms:after{content:''}.np-menu-type-selection ul li a.no-terms:hover{background-color:#fff;cursor:default}.np-menu-type-selection ul li a.no-terms.section{padding:8px 10px;background-color:#333;color:#fff}.np-menu-type-selection ul li:first-child{border-top:1px solid #e5e5e5}.np-menu-type-selection ul li ul{display:none;-webkit-box-shadow:none;box-shadow:none;padding:10px;background-color:#fff}.np-menu-type-selection ul li ul li{border-color:#e0e0e0}.np-menu-type-selection ul li ul li a{padding:8px;background-color:#f9f9f9;font-weight:400}.np-menu-type-selection ul li ul li a:after{content:"\f139";top:8px;right:5px}.np-menu-type-selection ul li ul li a.active{background-color:#0074a2;color:#fff}.np-menu-type-selection ul li ul li a.active:after{content:"\f335";color:#fff}.np-menu-link-object{width:65%;overflow:auto}.np-menu-link-object-placeholder{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);color:#b3b3b3}.np-menu-search{padding:10px;background-color:#f9f9f9}.np-menu-search input[type=text]{width:100%;height:35px}.np-menu-search .np-menu-search-loading{margin-top:5px}.np-menu-link-details h3,.np-menu-link-details p{margin-top:0}.np-menu-search .np-menu-search-noresults{display:none;text-align:center;padding-top:8px;font-style:oblique}.np-menu-link-details{padding:20px}.np-menu-link-details h3 em{float:right;font-size:13px;font-weight:400;font-style:normal;color:gray}.np-menu-link-details .original-link{border:1px solid #e5e5e5;font-size:12px;margin-bottom:15px;padding:5px;font-style:oblique}.np-menu-link-details .fields{background-color:#f9f9f9;padding:15px}.np-menu-link-details .checkbox{margin-bottom:10px}.np-menu-link-details label{display:block}.np-menu-link-details input[type=text]{width:100%}.nestedpages .nestedpages-bulk-edit{display:none;background-color:#fff;margin:0;border:1px solid #e1e1e1;border-bottom:0}.nestedpages .nestedpages-bulk-edit h3{padding:1em;margin:0}.nestedpages .nestedpages-bulk-edit .np-bulk-edit-link-info{padding:0 1em}.nestedpages .nestedpages-bulk-edit .fields{padding:1em;margin:0}.nestedpages .nestedpages-bulk-edit .np-taxonomies{margin:0}.nestedpages .nestedpages-bulk-edit .np-bulk-titles{list-style-type:none;margin:0;background-color:#f9f9f9;border:1px solid #e5e5e5;border-left:0;border-right:0;padding:.5em}.nestedpages .nestedpages-bulk-edit .np-bulk-titles li{padding:0;margin:.5em 0 0}.nestedpages .nestedpages-bulk-edit .np-bulk-titles li:first-child{margin:0}.nestedpages .nestedpages-bulk-edit .np-bulk-titles .np-remove{display:inline-block;background-color:#333;width:22px;height:22px;border-radius:50%;text-align:center;text-decoration:none;color:#fff;line-height:18px;font-size:1.5em;margin-right:.3em}.nestedpages .nestedpages-bulk-edit .np-bulk-titles .np-remove:hover{background-color:gray}.nestedpages .nestedpages-bulk-edit .np-taxonomies{display:block;padding:1em}.nestedpages .nestedpages-bulk-edit .np-bulk-footer{padding:10px;text-align:right;background-color:#404040;zoom:1}.nestedpages .nestedpages-bulk-edit .np-bulk-footer:after,.nestedpages .nestedpages-bulk-edit .np-bulk-footer:before{content:" ";display:table}.nestedpages .nestedpages-bulk-edit .np-bulk-footer .pull-left{float:left}.nestedpages-columns-header{display:table;border-collapse:collapse;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f0f0f0;border:1px solid #e1e1e1;border-bottom:0}.nestedpages-columns-header .cell{font-weight:700;text-align:left;display:table-cell;padding:1em .5em 1em 0;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.nestedpages-columns-header .toggle-spacer span{display:block;width:50px}.nestedpages-columns-header .bulk-spacer span{display:block;width:33px}.nestedpages-columns-header .thumbnail-spacer span{display:block;width:100%}.nestedpages-columns-header .title{width:30%;padding:0 5px}.nestedpages-row-columns{display:table;width:100%;border-collapse:collapse;-webkit-box-sizing:border-box;box-sizing:border-box}.nestedpages-row-columns .cell{text-align:left;display:table-cell;padding:1em .5em 1em 0;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.nestedpages-row-columns .title-cell{width:30%;position:relative}.nestedpages-row-columns .title-cell-spacer{position:absolute;display:block;width:100%}@media (max-width:767px){.nestedpages-columns-header,.nestedpages-row-columns .custom-column{display:none}.nestedpages-row-columns .title-cell.cell{width:100%}}.np-wpml-translations-modal .np-qe-loading{margin:1em 0;text-align:center;float:left}.np-wpml-translations-modal.loading .np-translations-table{display:none}.np-wpml-translations-modal.loading .np-qe-loading{display:block}.np-wpml-translations-modal .np-translations-table{display:table;border-collapse:collapse;width:100%}.np-wpml-translations-modal .np-translations-table tr td{padding:10px;border:1px solid #e1e1e1}.np-wpml-translations-modal .np-translations-table tr td:first-child{border-left:0;padding-left:0}.np-wpml-translations-modal .np-translations-table tr td:last-child{border-right:0}.np-wpml-translations-modal .np-translations-table tr:last-child td{border-bottom:0}.nestedpages-settings-table thead th{background-color:#d9d9d9;padding:5px}.nestedpages-settings-table tbody tr td{padding:5px;border-left:1px solid #e0e0e0}.nestedpages-settings-table tbody tr td:first-child{border:0}.nestedpages-settings-table tbody tr:nth-child(odd) td{background-color:#fff}.nestedpages-settings-table i{font-size:20px}.nestedpages-settings-table .np-btn{cursor:pointer;text-decoration:none;color:#555;display:inline-block;background-color:#f7f7f7;border:1px solid #e1e1e1;padding:5px 8px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.nestedpages-settings-table .np-btn:hover{background-color:#0074a2;color:#fff;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;border-color:#0074a2}.nestedpages-settings-table .np-btn.disabled,.nestedpages-settings-table .np-btn:disabled{opacity:.6;cursor:not-allowed}.nestedpages-settings-table .np-btn-trash{background-color:#e14d43;border-color:#e14d43;color:#fff}.nestedpages-settings-table .np-btn-trash:hover{background-color:#ba281e;border-color:#ba281e}.nestedpages-settings-general-wrapper{padding-top:1em;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.nestedpages-settings-general-wrapper .nestedpages-settings-table{width:67%;border:0}.nestedpages-settings-general-wrapper .nestedpages-settings-table .row{border-left:1px solid #e1e1e1;border-right:1px solid #e1e1e1}.nestedpages-settings-general-wrapper .nestedpages-settings-table .row.submit{border:0}.nestedpages-settings-general-wrapper .nestedpages-settings-support{width:30%;background-color:#fff;text-align:center;border:1px solid #e5e5e5;border-radius:3px}.nestedpages-settings-general-wrapper .nestedpages-settings-support .inner{padding:2em}.nestedpages-settings-general-wrapper .nestedpages-settings-support .or{margin:2em 0}.nestedpages-settings-general-wrapper h3{color:#ff2d20;margin:0 0 3px;font-size:20px}.nestedpages-settings-general-wrapper h4{margin:0}.nestedpages-settings-general-wrapper .support-button{display:block;background-color:rgba(255,45,32,.1);border:1px solid rgba(255,45,32,.15);text-align:center;color:#333;text-decoration:none;padding:1em;border-radius:4px;font-weight:700;font-size:16px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.nestedpages-settings-general-wrapper .support-button svg{display:inline-block;vertical-align:middle;margin-right:8px}.nestedpages-settings-general-wrapper .support-button svg .heart{fill:#ff2d20}.nestedpages-settings-general-wrapper .support-button:hover{background-color:#ff2d20;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;color:#fff}.nestedpages-settings-general-wrapper .support-button:hover svg .heart{fill:#fff}@media (max-width:768px){.nestedpages-settings-general-wrapper{display:block}.nestedpages-settings-general-wrapper .nestedpages-settings-support,.nestedpages-settings-general-wrapper .nestedpages-settings-table{width:100%}}.nestedpages-settings-table{border-collapse:collapse;border:1px solid #e5e5e5;border-radius:3px}.nestedpages-settings-table .row-container{border-bottom:1px solid #e1e1e1}.nestedpages-settings-table .row-container:last-child{border:0}.nestedpages-settings-table .row-container .head{zoom:1;line-height:46px;background-color:#fff;padding-right:10px}.nestedpages-settings-table .row-container .head:after,.nestedpages-settings-table .row-container .head:before{content:" ";display:table}.nestedpages-settings-table .row-container .head .checkbox{float:left;width:46px;height:46px;background-color:rgba(51,51,51,.06);text-align:center;line-height:46px;margin-right:10px}.nestedpages-settings-table .row-container .head label{float:left;line-height:46px;margin:0}.nestedpages-settings-table .row-container .head label em{color:#999}.nestedpages-settings-table .row-container .head .button{float:right;margin-top:10px}.nestedpages-settings-table .row-container.active .head{background-color:#0074a2;color:#fff}.nestedpages-settings-table .row-container .row{display:table;width:100%}.nestedpages-settings-table .row-container .row.submit{display:block}.nestedpages-settings-table .row-container .row.submit p{margin:0}.nestedpages-settings-table .row-container .row .description{display:table-cell;vertical-align:top;width:25%;border-bottom:1px solid #e1e1e1;background-color:#f9f9f9;padding:1em}.nestedpages-settings-table .row-container .row .description p{color:gray;font-size:.9em}.nestedpages-settings-table .row-container .row .description strong{color:#333;font-size:1.2em}.nestedpages-settings-table .row-container .row .field{display:table-cell;vertical-align:top;width:75%;background-color:#fff;border-bottom:1px solid #e1e1e1;border-left:1px solid #e1e1e1;padding:1em}.nestedpages-settings-table .row-container .row .field.padded-sides{padding:1em 2em}.nestedpages-settings-table .row-container .row .field.extra-padding{padding:2em}.nestedpages-settings-table .row-container .row .field label.block{display:block}.nestedpages-settings-table .row-container .row .field input[type=tel],.nestedpages-settings-table .row-container .row .field input[type=text],.nestedpages-settings-table .row-container .row .field select{width:100%}.nestedpages-settings-table .row-container .body{display:none}.nestedpages-settings-table .row-container .body h4{margin:0;padding:10px 0 0 10px}.nestedpages-settings-table .row-container .body .settings-details,.nestedpages-settings-table .row-container .body li{margin:0}.nestedpages-settings-table .row-container .settings-details li:last-child .description,.nestedpages-settings-table .row-container .settings-details li:last-child .field{border-bottom:0}.nestedpages-settings-table .row-container .columns,.nestedpages-settings-table .row-container .custom-fields,.nestedpages-settings-table .row-container .standard-fields{display:none;padding-top:20px}.nestedpages-settings-table .row-container .columns .custom-field-group,.nestedpages-settings-table .row-container .custom-fields .custom-field-group,.nestedpages-settings-table .row-container .standard-fields .custom-field-group{height:150px;overflow:auto;background-color:#f9f9f9;padding:10px;border:1px solid #e1e1e1}.nestedpages-settings-table .row-container .columns h5,.nestedpages-settings-table .row-container .custom-fields h5,.nestedpages-settings-table .row-container .standard-fields h5{padding:0;font-weight:400;font-style:oblique;margin:0 0 6px;color:#999}.nestedpages-settings-table .row-container .columns p,.nestedpages-settings-table .row-container .custom-fields p,.nestedpages-settings-table .row-container .standard-fields p{margin:0 0 6px;font-weight:700}.nestedpages-settings-table .row-container .columns ul,.nestedpages-settings-table .row-container .custom-fields ul,.nestedpages-settings-table .row-container .standard-fields ul{margin:0}.nestedpages-settings-table .row-container .columns ul.indented,.nestedpages-settings-table .row-container .custom-fields ul.indented,.nestedpages-settings-table .row-container .standard-fields ul.indented{padding-left:15px}.nestedpages-settings-table .row-container .columns ul li,.nestedpages-settings-table .row-container .custom-fields ul li,.nestedpages-settings-table .row-container .standard-fields ul li{margin:3px 0 0}.nestedpages-page-pt-assignment,.nestedpages-settings-table .row-container .thumbnail-options{background-color:#f9f9f9;padding:10px;border:1px solid #e1e1e1;margin-top:1em}.nestedpages-settings-table .row-container .thumbnail-options label{display:block}.nestedpages-settings-table .row-container .thumbnail-options select{margin-bottom:1em}.nestedpages-page-pt-assignment input[type=search]{width:100%;margin-bottom:1em}.nestedpages-page-pt-assignment .np-quickedit-info{background-color:#fff;border-right:1px solid #e5e5e5;border-top:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5}.nestedpages-page-pt-assignment .nestedpages-page-search-results{height:100px;overflow:auto}.nestedpages-page-pt-assignment .nestedpages-page-search-results ul{list-style-type:none;margin:0;padding:0}.nestedpages-page-pt-assignment .nestedpages-page-search-results a{display:block;text-decoration:none;border-top:1px solid #dcdcdc;padding:3px 0;color:#333;background-color:#f9f9f9}.nestedpages-page-pt-assignment .nestedpages-page-search-results a:hover{background-color:#0074a2;color:#fff;padding-left:5px}.nestedpages-page-pt-assignment .nestedpages-page-search-results li:first-child a{border:0;padding-top:0}.nestedpages-checklist-field,.nestedpages-page-pt-assignment-selection,.nestedpages-sort-options-selection{background-color:#f9f9f9;border:1px solid #e1e1e1;margin-top:1em;padding:.5em}.nestedpages-checklist-field label,.nestedpages-sort-options-selection label{display:block;margin-top:3px}.nestedpages-checklist-field label:first-child,.nestedpages-sort-options-selection label:first-child{margin:0}.nestedpages-checklist-field .sort-options-default,.nestedpages-sort-options-selection .sort-options-default{display:none;background-color:#fff;margin:.5em 0 1.5em;padding:.75em;border:1px solid #e1e1e1}.nestedpages-checklist-field .sort-options-default label,.nestedpages-sort-options-selection .sort-options-default label{display:inline-block}.nestedpages-checklist-field .sort-options-default select,.nestedpages-sort-options-selection .sort-options-default select{width:auto!important}.np-menu-customization{display:none;padding:.5em 1em 1em}.np-menu-customization .np-menu-customization-header{background-color:#f9f9f9;border:1px solid #e1e1e1;border-bottom:0;height:60px;position:relative;padding:15px 180px 0 10px;-webkit-box-sizing:border-box;box-sizing:border-box;zoom:1}.np-menu-customization .np-menu-customization-header:after,.np-menu-customization .np-menu-customization-header:before{content:" ";display:table}.np-menu-customization .np-menu-customization-header .hide,.np-menu-customization .np-menu-customization-header .new{position:absolute;right:0;top:0;height:60px;width:80px;text-align:center;line-height:60px;border-left:1px solid #e1e1e1;background-color:#ececec;font-size:.9em}.np-menu-customization .np-menu-customization-header .role-select{float:left;width:100%}.np-menu-customization .np-menu-customization-header .new{right:80px;background-color:#fff}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-toggle{display:block;height:60px;width:80px;text-decoration:none;color:#333}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-toggle .np-caret{display:inline-block;width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid #333;vertical-align:middle;margin-left:3px}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-toggle:active,.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-toggle:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-content{width:150px;font-size:1.1em}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-content ul li{border-top:1px solid #e1e1e1}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-content ul li a{display:block;padding:1em .5em;background-color:#fff}.np-nav-menu-settings .update-count,.np-nav-menu-settings li.disabled .menu-item .title:hover .details-button,.np-nav-menu-settings li.disabled .submenu-toggle a,.np-nav-menu-settings li.disabled.submenu-open .submenu-listing{display:none}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-content ul li a:hover{background-color:#333;color:#fff}.np-menu-customization .np-menu-customization-header .nestedpages-dropdown-content ul li:first-child{border:0}.np-nav-menu-settings li{border:1px solid #e1e1e1;position:relative;border-top:0}.np-nav-menu-settings li.disabled{text-decoration:line-through}.np-nav-menu-settings li.disabled:hover{background-color:inherit!important}.np-nav-menu-settings li.disabled .menu-item .title{opacity:.2}.np-nav-menu-settings li:first-child{border-top:1px solid #e1e1e1}.np-nav-menu-settings li:first-child .hide-checkbox{border-top:0}.np-nav-menu-settings .ui-sortable-helper{border:1px solid #e1e1e1;-webkit-box-shadow:1px 1px 1px 0 rgba(0,0,0,.3);box-shadow:1px 1px 1px 0 rgba(0,0,0,.3)}.np-nav-menu-settings .menu-item{height:50px;zoom:1;padding:0 80px 0 100px;background-color:#fff}.np-nav-menu-settings .menu-item:after,.np-nav-menu-settings .menu-item:before{content:" ";display:table}.np-nav-menu-settings .menu-item .title{zoom:1;position:relative;padding-right:120px;height:50px}.np-nav-menu-settings .menu-item .title:after,.np-nav-menu-settings .menu-item .title:before{content:" ";display:table}.np-nav-menu-settings .menu-item .title.separator{padding-left:40px}.np-nav-menu-settings .menu-item .title p{margin:0;font-size:1em;line-height:50px}.np-nav-menu-settings .menu-item .title .menu-icon{position:absolute;left:0;top:0;height:50px;width:40px;text-align:center}.np-nav-menu-settings .menu-item .title .menu-icon:before{font-size:1.6em;line-height:50px}.np-nav-menu-settings .menu-item .title .details-button{display:none;position:absolute;right:0;top:0;margin:12px 10px 0 0}.np-nav-menu-settings .menu-item .title:hover .details-button{display:block}.np-nav-menu-settings .menu-item .menu-title-field{float:left;margin:0 0 0 40px;position:relative;padding:0;line-height:50px;border:0;-webkit-box-shadow:none;box-shadow:none}.np-nav-menu-settings .menu-item .menu-title-field::-webkit-input-placeholder{color:#333}.np-nav-menu-settings .menu-item .menu-title-field::-moz-placeholder{color:#333}.np-nav-menu-settings .menu-item .menu-title-field:-ms-input-placeholder{color:#333}.np-nav-menu-settings .menu-item .menu-title-field::-ms-input-placeholder{color:#333}.np-nav-menu-settings .menu-item .menu-title-field::placeholder{color:#333}.np-nav-menu-settings li.separator .menu-item{background-color:#f9f9f9;padding-right:10px}.np-nav-menu-settings li.separator .menu-item .menu-icon{display:none}.np-nav-menu-settings li.separator .menu-item .details-button{margin-right:0}.np-nav-menu-settings li.separator .menu-item .title{padding-left:10px;padding-right:0;color:#999}.np-nav-menu-settings .ui-sortable-placeholder{background-color:#f9f9f9;border:1px dashed #0074a2!important;display:block;visibility:visible!important}.np-nav-menu-settings .submenu-toggle{width:50px;height:50px;left:0;border-right:1px solid #e1e1e1;background-color:#f9f9f9;position:absolute}.np-nav-menu-settings .submenu-toggle a{margin:0;display:block;text-decoration:none;width:26px;height:26px;background-color:#fff;border:1px solid #e1e1e1;border-radius:50%;text-align:center;color:#333;position:relative;top:10px;left:10px;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.np-nav-menu-settings .submenu-toggle a span{margin:0;position:absolute;left:11px;top:8px;display:block;width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:6px solid #333}.np-nav-menu-settings .submenu-toggle a.active{background-color:#333;color:#fff;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);border-color:#333}.np-nav-menu-settings .submenu-toggle a.active span{border-left-color:#fff}.np-nav-menu-settings .submenu-toggle a:active,.np-nav-menu-settings .submenu-toggle a:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}.np-nav-menu-settings .handle{position:absolute;width:50px;height:50px;left:51px;background-color:#f9f9f9;border-right:1px solid #e5e5e5;text-align:center;line-height:40px;cursor:move}.nestedpages.np-dark-mode .handle .bars,.nestedpages.np-dark-mode .np-icon-sub-menu .arrow,.nestedpages.np-dark-mode .page-title .link-icon .icon,.nestedpages.np-dark-mode ol .row-status-icon .icon,.np-dark-mode .handle .bars,.np-dark-mode .np-icon-sub-menu .arrow,.np-dark-mode .page-title .link-icon .icon,.np-dark-mode ol .row-status-icon .icon{fill:#50626f}.np-nav-menu-settings .handle svg{position:relative;top:10px;width:20px}.np-nav-menu-settings .handle:hover{color:#333}.np-nav-menu-settings .hide-checkbox{position:absolute;width:80px;height:50px;top:0;text-align:center;right:0;background-color:#ececec;border-left:1px solid #e1e1e1}.np-nav-menu-settings .hide-checkbox input[type=checkbox]{position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);margin-top:-5px;left:2px}.np-nav-menu-settings .np-extra-options{display:none;border-top:1px solid #e1e1e1;padding:1em;zoom:1;background-color:#f9f9f9}.np-nav-menu-settings .np-extra-options:after,.np-nav-menu-settings .np-extra-options:before{content:" ";display:table}.np-nav-menu-settings .np-extra-options .half{float:left;width:48%}.np-nav-menu-settings .np-extra-options .half.right{clear:none;float:right}.np-nav-menu-settings .options-open .menu-item .title .details-button,.np-nav-menu-settings .options-open .np-extra-options{display:block}.np-nav-menu-settings .options-open.disabled .menu-item .title .details-button,.np-nav-menu-settings .options-open.disabled .np-extra-options{display:none}.np-nav-menu-settings .submenu-listing{display:none;padding-left:50px;background-color:#f9f9f9;border-top:1px solid #e1e1e1;border-bottom:3px solid #e1e1e1}.np-nav-menu-settings li.submenu-open .submenu-listing{display:block}.np-nav-menu-settings .submenu-item{border:0;border-left:1px solid #e1e1e1;border-top:1px solid #e1e1e1;background-color:#f9f9f9}.np-nav-menu-settings .submenu-item .menu-item{padding-left:50px}.np-nav-menu-settings .submenu-item .title{padding-left:1em}.np-nav-menu-settings .submenu-item:first-child{border-top:0}.np-nav-menu-settings .submenu-item .handle{left:0}.nestedpages.np-dark-mode ol,.np-dark-mode ol{border:0;border-radius:0}.nestedpages.np-dark-mode ol .np-page-type,.np-dark-mode ol .np-page-type{color:#bbc8d4}.nestedpages.np-dark-mode ol .locked,.np-dark-mode ol .locked{color:#fff}.nestedpages.np-dark-mode ol .nav-status,.nestedpages.np-dark-mode ol .np-icon-eye-blocked,.nestedpages.np-dark-mode ol .status,.nestedpages.np-dark-mode ol .sticky,.np-dark-mode ol .nav-status,.np-dark-mode ol .np-icon-eye-blocked,.np-dark-mode ol .status,.np-dark-mode ol .sticky{color:#50626f}.nestedpages.np-dark-mode ol .np-assigned-pt-actions li a,.np-dark-mode ol .np-assigned-pt-actions li a{color:#fff;border-color:rgba(0,0,0,.2)}.nestedpages.np-dark-mode ol .np-seo-indicator,.np-dark-mode ol .np-seo-indicator{background-color:#50626f}.nestedpages.np-dark-mode ol .np-seo-indicator.good,.np-dark-mode ol .np-seo-indicator.good{background-color:#7ad03a}.nestedpages.np-dark-mode ol .np-seo-indicator.ok,.np-dark-mode ol .np-seo-indicator.ok{background-color:#ffba00}.nestedpages.np-dark-mode ol .np-seo-indicator.poor,.np-dark-mode ol .np-seo-indicator.poor{background-color:#ee7c1b}.nestedpages.np-dark-mode ol .np-seo-indicator.bad,.np-dark-mode ol .np-seo-indicator.bad{background-color:#dd3d36}.nestedpages.np-dark-mode ol .np-seo-indicator.warn,.np-dark-mode ol .np-seo-indicator.warn{background-color:maroon}.nestedpages.np-dark-mode ol .np-seo-indicator.wrong,.np-dark-mode ol .np-seo-indicator.wrong{background-color:red}.nestedpages.np-dark-mode ol .np-seo-indicator.noindex,.np-dark-mode ol .np-seo-indicator.noindex{background-color:#1e8cbe}.nestedpages.np-dark-mode ol li,.np-dark-mode ol li{border-top-color:#32373c;background:0 0}.nestedpages.np-dark-mode ol ol,.np-dark-mode ol ol{border-top:1px solid #32373c}.nestedpages.np-dark-mode .np-icon-arrow,.np-dark-mode .np-icon-arrow{border-left-color:#fff}.nestedpages.np-dark-mode .child-toggle a:active,.nestedpages.np-dark-mode .child-toggle a:focus,.np-dark-mode .child-toggle a:active,.np-dark-mode .child-toggle a:focus{-webkit-box-shadow:none;box-shadow:none}.nestedpages.np-dark-mode .non-indent .child-toggle,.np-dark-mode .non-indent .child-toggle{background-color:rgba(0,0,0,.15)}.nestedpages.np-dark-mode .non-indent .child-toggle a,.np-dark-mode .non-indent .child-toggle a{background-color:#50626f;border:0;color:#fff}.nestedpages.np-dark-mode .non-indent .child-toggle a .np-icon-arrow,.nestedpages.np-dark-mode .non-indent .child-toggle a:hover .np-icon-arrow,.np-dark-mode .non-indent .child-toggle a .np-icon-arrow,.np-dark-mode .non-indent .child-toggle a:hover .np-icon-arrow{border-left-color:#fff}.nestedpages.np-dark-mode .non-indent .child-toggle a:hover,.np-dark-mode .non-indent .child-toggle a:hover{background-color:rgba(0,0,0,.5)}.nestedpages.np-dark-mode .handle,.np-dark-mode .handle{color:#50626f}.nestedpages.np-dark-mode .action-buttons .nestedpages-dropdown .np-btn.toggle svg path.circles,.nestedpages.np-dark-mode .action-buttons .nestedpages-dropdown ul li a svg path.primary,.np-dark-mode .action-buttons .nestedpages-dropdown .np-btn.toggle svg path.circles,.np-dark-mode .action-buttons .nestedpages-dropdown ul li a svg path.primary{fill:#fff}.nestedpages.np-dark-mode .np-bulk-checkbox,.nestedpages.np-dark-mode .row,.np-dark-mode .np-bulk-checkbox,.np-dark-mode .row{background:0 0}.nestedpages.np-dark-mode .row.active,.nestedpages.np-dark-mode .row.np-updated,.nestedpages.np-dark-mode .row.np-updated-show,.nestedpages.np-dark-mode .row:hover,.np-dark-mode .row.active,.np-dark-mode .row.np-updated,.np-dark-mode .row.np-updated-show,.np-dark-mode .row:hover{background-color:#32373c}.nestedpages.np-dark-mode .np-post-columns ul li,.np-dark-mode .np-post-columns ul li{color:#fff;border-left:1px solid rgba(0,0,0,.4)}.nestedpages.np-dark-mode .np-post-columns ul li:first-child,.np-dark-mode .np-post-columns ul li:first-child{border:0}.nestedpages.np-dark-mode .action-buttons .nestedpages-dropdown ul li,.np-dark-mode .action-buttons .nestedpages-dropdown ul li{background-color:#50626f}.nestedpages.np-dark-mode .action-buttons .nestedpages-dropdown ul li a,.np-dark-mode .action-buttons .nestedpages-dropdown ul li a{color:#fff}.nestedpages.np-dark-mode .nestedpages-list-header,.np-dark-mode .nestedpages-list-header{background-color:#32373c;border:0}.nestedpages.np-dark-mode .nestedpages-list-header .np-check-all,.np-dark-mode .nestedpages-list-header .np-check-all{background:0 0}.nestedpages.np-dark-mode .np-btn,.np-dark-mode .np-btn{color:#fff;display:inline-block;background-color:#50626f;border:1px solid #444}.nestedpages.np-dark-mode .np-btn:hover,.np-dark-mode .np-btn:hover{background-color:#32373c;border-color:#32373c}.nestedpages.np-dark-mode .np-inline-modal,.np-dark-mode .np-inline-modal{background-color:#32373c}.nestedpages.np-dark-mode .new-child h3,.nestedpages.np-dark-mode .quick-edit h3,.np-dark-mode .new-child h3,.np-dark-mode .quick-edit h3{color:#fff}.nestedpages.np-dark-mode .new-child h3 span em,.nestedpages.np-dark-mode .quick-edit h3 span em,.np-dark-mode .new-child h3 span em,.np-dark-mode .quick-edit h3 span em{color:#50626f}.nestedpages.np-dark-mode .new-child .fields,.nestedpages.np-dark-mode .quick-edit .fields,.np-dark-mode .new-child .fields,.np-dark-mode .quick-edit .fields{background:0 0}.nestedpages.np-dark-mode .new-child .buttons,.nestedpages.np-dark-mode .quick-edit .buttons,.np-dark-mode .new-child .buttons,.np-dark-mode .quick-edit .buttons{background-color:rgba(0,0,0,.15)}.nestedpages.np-dark-mode .new-child .form-control.original-link,.nestedpages.np-dark-mode .quick-edit .form-control.original-link,.np-dark-mode .new-child .form-control.original-link,.np-dark-mode .quick-edit .form-control.original-link{background-color:rgba(0,0,0,.15);border:0}.nestedpages.np-dark-mode .new-child .np-toggle-options,.nestedpages.np-dark-mode .quick-edit .np-toggle-options,.np-dark-mode .new-child .np-toggle-options,.np-dark-mode .quick-edit .np-toggle-options{background-color:rgba(0,0,0,.1)}.nestedpages.np-dark-mode .new-child .np-menuoptions,.nestedpages.np-dark-mode .new-child .np-taxonomies,.nestedpages.np-dark-mode .new-child .np-taxonomy li,.nestedpages.np-dark-mode .quick-edit .np-menuoptions,.nestedpages.np-dark-mode .quick-edit .np-taxonomies,.nestedpages.np-dark-mode .quick-edit .np-taxonomy li,.np-dark-mode .new-child .np-menuoptions,.np-dark-mode .new-child .np-taxonomies,.np-dark-mode .new-child .np-taxonomy li,.np-dark-mode .quick-edit .np-menuoptions,.np-dark-mode .quick-edit .np-taxonomies,.np-dark-mode .quick-edit .np-taxonomy li{background:0 0}.nestedpages.np-dark-mode .nestedpages-bulk-edit,.np-dark-mode .nestedpages-bulk-edit{background-color:#32373c;border:0}.nestedpages.np-dark-mode .nestedpages-bulk-edit .np-bulk-titles,.np-dark-mode .nestedpages-bulk-edit .np-bulk-titles{background-color:rgba(0,0,0,.15);border:0}.nestedpages.np-dark-mode .nestedpages-bulk-edit .np-bulk-titles .np-remove,.np-dark-mode .nestedpages-bulk-edit .np-bulk-titles .np-remove{background-color:#50626f}.nestedpages.np-dark-mode .nestedpages-bulk-edit .np-bulk-footer,.np-dark-mode .nestedpages-bulk-edit .np-bulk-footer{background-color:rgba(0,0,0,.15)}.nestedpages.np-dark-mode .np-quickedit-error,.np-dark-mode .np-quickedit-error{background-color:#e14d43;color:#fff}.np-modal-form.np-dark-mode .form-interior{background:0 0}.nestedpages-modal-content.np-dark-mode,.nestedpages-modal-content.np-dark-mode .modal-content{background-color:#32373c}.nestedpages-modal-content.np-dark-mode .new-child h3,.nestedpages-modal-content.np-dark-mode h3{color:#fff}.nestedpages-modal-content.np-dark-mode .modal-footer{background-color:rgba(0,0,0,.15)}.nestedpages-modal-content.np-dark-mode .clone-modal h3{background:0 0}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection{background-color:#32373c;border:0}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li{border:1px solid #32373c;border-top:0}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li a{background-color:#50626f;color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li a:after{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li a:active,.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li a:focus{-webkit-box-shadow:none;box-shadow:none}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li:first-child{border-top:0}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li ul{padding:0;background:0 0}.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li ul li{border-color:#32373c}.nestedpages-modal-content.np-dark-mode .np-menu-search,.nestedpages-modal-content.np-dark-mode .np-menu-type-selection ul li ul li a{background-color:rgba(0,0,0,.15)}.nestedpages-modal-content.np-dark-mode .np-menu-search input[type=text]::-webkit-input-placeholder{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-search input[type=text]::-moz-placeholder{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-search input[type=text]:-ms-input-placeholder{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-search input[type=text]::-ms-input-placeholder{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-search input[type=text]::placeholder{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-link-details h3 em{color:#fff}.nestedpages-modal-content.np-dark-mode .np-menu-link-details .original-link{border:0;background-color:rgba(0,0,0,.15)}.nestedpages-modal-content.np-dark-mode .np-menu-link-details .fields{background:0 0;padding:0}
|
assets/js/lib/nestedpages.formatter.js
CHANGED
@@ -76,6 +76,9 @@ NestedPages.Formatter = function()
|
|
76 |
$(this).find(indent_element).css('padding-left', padding + 'px');
|
77 |
return;
|
78 |
}
|
|
|
|
|
|
|
79 |
if ( !NestedPages.jsData.sortable || $(this).hasClass('no-sort') ){
|
80 |
$(this).find('.row-inner').css('padding-left', '10px');
|
81 |
return;
|
76 |
$(this).find(indent_element).css('padding-left', padding + 'px');
|
77 |
return;
|
78 |
}
|
79 |
+
if ( parent_count < 1 ){
|
80 |
+
$(this).find(indent_element).css('padding-left', '0px');
|
81 |
+
}
|
82 |
if ( !NestedPages.jsData.sortable || $(this).hasClass('no-sort') ){
|
83 |
$(this).find('.row-inner').css('padding-left', '10px');
|
84 |
return;
|
assets/js/lib/nestedpages.menu-links.js
CHANGED
@@ -196,7 +196,7 @@ NestedPages.MenuLinks = function()
|
|
196 |
// Create the nested pages row for the new link
|
197 |
plugin.createRow = function()
|
198 |
{
|
199 |
-
var html = '<li id="menuItem_' + plugin.post.id + '" class="page-row published';
|
200 |
html += '">'
|
201 |
|
202 |
html += '<div class="row"><div class="child-toggle"><div class="child-toggle-spacer"></div></div><div class="row-inner">';
|
196 |
// Create the nested pages row for the new link
|
197 |
plugin.createRow = function()
|
198 |
{
|
199 |
+
var html = '<li id="menuItem_' + plugin.post.id + '" class="page-row post-type-np-redirect published';
|
200 |
html += '">'
|
201 |
|
202 |
html += '<div class="row"><div class="child-toggle"><div class="child-toggle-spacer"></div></div><div class="row-inner">';
|
assets/js/lib/nestedpages.quickedit-post.js
CHANGED
@@ -77,6 +77,7 @@ NestedPages.QuickEditPost = function()
|
|
77 |
hour : $(plugin.button).attr('data-hour'),
|
78 |
minute : $(plugin.button).attr('data-minute'),
|
79 |
navstatus : $(plugin.button).attr('data-navstatus'),
|
|
|
80 |
npstatus : $(plugin.button).attr('data-np-status'),
|
81 |
navtitle : $(plugin.button).attr('data-navtitle'),
|
82 |
navtitleattr : $(plugin.button).attr('data-navtitleattr'),
|
@@ -140,8 +141,9 @@ NestedPages.QuickEditPost = function()
|
|
140 |
$(plugin.form).find('.np_author select').val(plugin.initialData.author);
|
141 |
$(plugin.form).find('.np_status').val(plugin.initialData.status);
|
142 |
$(plugin.form).find('.np_nav_title').val(plugin.initialData.navtitle);
|
143 |
-
$(plugin.form).find('.np_title_attribute').val(plugin.initialData.navtitleattr);
|
144 |
$(plugin.form).find('.np_nav_css_classes').val(plugin.initialData.navcss);
|
|
|
|
|
145 |
$(plugin.form).find('.post_password').val(plugin.initialData.password);
|
146 |
$(plugin.form).find('.np_publish_date').val(plugin.initialData.datepicker);
|
147 |
if ( plugin.initialData.cs === 'open' ) $(plugin.form).find('.np_cs').attr('checked', 'checked');
|
77 |
hour : $(plugin.button).attr('data-hour'),
|
78 |
minute : $(plugin.button).attr('data-minute'),
|
79 |
navstatus : $(plugin.button).attr('data-navstatus'),
|
80 |
+
navCustomUrl: $(plugin.button).attr('data-custom-url'),
|
81 |
npstatus : $(plugin.button).attr('data-np-status'),
|
82 |
navtitle : $(plugin.button).attr('data-navtitle'),
|
83 |
navtitleattr : $(plugin.button).attr('data-navtitleattr'),
|
141 |
$(plugin.form).find('.np_author select').val(plugin.initialData.author);
|
142 |
$(plugin.form).find('.np_status').val(plugin.initialData.status);
|
143 |
$(plugin.form).find('.np_nav_title').val(plugin.initialData.navtitle);
|
|
|
144 |
$(plugin.form).find('.np_nav_css_classes').val(plugin.initialData.navcss);
|
145 |
+
$(plugin.form).find('.np_title_attribute').val(plugin.initialData.navtitleattr);
|
146 |
+
$(plugin.form).find('.np_nav_custom_url').val(plugin.initialData.navCustomUrl);
|
147 |
$(plugin.form).find('.post_password').val(plugin.initialData.password);
|
148 |
$(plugin.form).find('.np_publish_date').val(plugin.initialData.datepicker);
|
149 |
if ( plugin.initialData.cs === 'open' ) $(plugin.form).find('.np_cs').attr('checked', 'checked');
|
assets/js/nestedpages.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var NestedPages=NestedPages||{};NestedPages.Formatter=function(){var s=this,i=jQuery;s.updateSubMenuToggle=function(){for(var e=i(NestedPages.selectors.childToggle),t=0;t<e.length;t++){var a,s=e[t],n=i(s).parent(".row").parent("li");0<i(n).children("ol").length?i(n).children("ol").find("li.page-row").length<1?i(n).children("ol").hide():(a='<div class="child-toggle-spacer"></div>',a+='<a href="#"',0<i(n).children("ol:visible").length&&(a+=' class="open"'),a+='><span class="np-icon-arrow"></span></a>',i(s).html(a),0<i(n).children("ol").children(".np-hide").length&&0===i(n).children("ol").children(".np-hide.shown").length?i(s).find("a").hide():0<i(n).children("ol").children(".np-hide").length&&0<i(n).children("ol").children(".np-hide.shown").length&&i(s).find("a").show()):i(s).empty().html('<div class="child-toggle-spacer"></div>')}},s.setBorders=function(){i(NestedPages.selectors.rows).removeClass(NestedPages.cssClasses.noborder),i.each(i(NestedPages.selectors.lists),function(){i(this).find(".page-row:visible:first").addClass(NestedPages.cssClasses.noborder)})},s.setNestedMargins=function(){s.setIndent()},s.setIndent=function(){var n="1"===nestedpages.non_indent?20:30,o="1"===nestedpages.non_indent?".row-inner":".child-toggle";i.each(i(NestedPages.selectors.lists),function(e,t){var a=i(this).parents(NestedPages.selectors.lists).length,s=0;NestedPages.jsData.sortable||(s=10),0<a?(s=a*n+s,i(this).find(o).css("padding-left",s+"px")):NestedPages.jsData.sortable&&!i(this).hasClass("no-sort")?i(this).find(".row-inner").css("padding-left","0px"):i(this).find(".row-inner").css("padding-left","10px")})},s.setClassicIndent=function(){i.each(i(NestedPages.selectors.lists),function(e,t){var a=i(this).parents(NestedPages.selectors.lists).length,s=0;NestedPages.jsData.sortable||(s=10),0<a?(s=20*a+s,i(this).find(".row-inner").css("padding-left",s+"px")):NestedPages.jsData.sortable&&!i(this).hasClass("no-sort")?i(this).find(".row-inner").css("padding-left","0px"):i(this).find(".row-inner").css("padding-left","10px")})},s.updatePlaceholderWidth=function(e){var t,a;NestedPages.jsData.nestable&&(t=40*i(e.placeholder).parents("ol").length-40,a=i(NestedPages.selectors.sortable).width()-t,i(e.placeholder).width(a).css("margin-left",t+"px")),s.updateListVisibility(e)},s.updateListVisibility=function(e){e=i(e.placeholder).parent("ol");i(e).is(":visible")||(i(e).addClass("nplist"),i(e).show())},s.removeQuickEdit=function(){i(NestedPages.selectors.quickEditOverlay).removeClass("active").remove(),i(".sortable .quick-edit").remove(),i(".row").show()},s.showQuickEdit=function(){i("body").append('<div class="np-inline-overlay"></div>'),setTimeout(function(){i(".np-inline-overlay").addClass("active")},50)},s.flashRow=function(e){i(e).addClass("np-updated"),s.setBorders(),setTimeout(function(){i(e).addClass("np-updated-show")},1500)},s.showAjaxError=function(e){i(NestedPages.selectors.ajaxError).find("p").text(e),i(NestedPages.selectors.ajaxError).show()},s.hideAjaxError=function(e){i(NestedPages.selectors.ajaxError).hide()},s.sizeLinkThumbnails=function(){var e=i(NestedPages.selectors.thumbnailContainer).not(NestedPages.selectors.thumbnailContainerLink).first().find("img"),t=i(e).width(),a=i(e).height();i.each(i(NestedPages.selectors.thumbnailContainerLink),function(){i(this).width(t),i(this).height(a)})}},(NestedPages=NestedPages||{}).Dropdowns=function(){var t=this,a=jQuery;return t.dropdown="",t.activeBtn="",t.activeContent="",t.toggleBtn="[data-dropdown-toggle]",t.dropdownContainer="[data-dropdown]",t.dropdownContent="[data-dropdown-content]",t.selectors={caret_up:"icon-arrow_drop_up",caret_down:"icon-arrow_drop_down"},t.bindEvents=function(){a(document).on("click",t.toggleBtn,function(e){e.preventDefault(),t.activeBtn=a(this),t.dropdown=a(this).parents(t.dropdownContainer),t.toggleDropdown()}),a(document).on("click",function(e){t.closeDropdowns(e.target)}),a(document).on("dropdown-opened",function(e,t){0<a(t).parents(NestedPages.selectors.row).length&&a(t).parents(NestedPages.selectors.row).addClass("active")}),a(document).on("dropdown-closed",function(){a(NestedPages.selectors.row).removeClass("active")})},t.toggleDropdown=function(){a("."+t.selectors.caret_up).attr("class",t.selectors.caret_down);var e=a(t.dropdown).find(t.dropdownContent);if(t.activeContent=e,a(e).hasClass("active"))return a(e).removeClass("active"),a(t.activeBtn).removeClass("active"),a(t.activeBtn).find("."+t.selectors.caret_up).attr("class",t.selectors.caret_down),void a(document).trigger("dropdown-closed",e);t.setPositioning(),a(t.toggleBtn).removeClass("active"),a(t.dropdownContent).removeClass("active"),a(e).addClass("active"),a(t.activeBtn).find("."+t.selectors.caret_down).attr("class",t.selectors.caret_up),a(t.activeBtn).addClass("active"),a(document).trigger("dropdown-opened",e)},t.setPositioning=function(){var e=a(t.activeBtn).outerHeight();a(t.activeContent).css("top",e+"px")},t.closeDropdowns=function(e){0===a(e).parents(t.dropdownContainer).length&&(a(t.dropdownContent).removeClass("active"),a(t.toggleBtn).removeClass("active"),a(t.activeBtn).find("."+t.selectors.caret_up).attr("class",t.selectors.caret_down),a(document).trigger("dropdown-closed",void 0))},t.bindEvents()},(NestedPages=NestedPages||{}).Modals=function(){var a=this,s=jQuery;return a.activeBtn="",a.activeModal="",a.modalOpen=!1,a.selectors={toggleBtn:"[data-nestedpages-modal-toggle]",backdrop:"[data-nestedpages-modal-backdrop]",closeBtn:"[data-nestedpages-modal-close]",title:"data-nestedpages-modal-title",content:"data-nestedpages-modal-content"},a.bindEvents=function(){s(document).on("click",a.selectors.toggleBtn,function(e){e.preventDefault(),a.activeBtn=s(this),a.openModal()}),s(document).on("click",a.selectors.closeBtn,function(e){e.preventDefault(),a.closeModals()}),s(document).on("open-modal-manual",function(e,t){a.activeModal=s('[data-nestedpages-modal="'+t+'"]'),a.openModal()}),s(document).on("close-modal-manual",function(e){a.closeModals()}),s(document).on("click",a.selectors.backdrop,function(e){a.closeModals()}),s(document).ready(function(){a.checkHash()})},a.openModal=function(){var e;a.modalOpen?a.closeModals():(0<s(a.activeBtn).length&&(e=s(a.activeBtn).attr("data-nestedpages-modal-toggle"),a.activeModal=s('*[data-nestedpages-modal="'+e+'"]')),s(a.activeModal).addClass("active"),a.modalOpen=!0,a.populateModal(),s(document).trigger("open-modal",[a.activeBtn,a.activeModal]))},a.closeModals=function(){a.modalOpen=!1,s("[data-nestedpages-modal]").removeClass("active"),a.activeModal="",a.activeBtn=""},a.populateModal=function(){var e=s(a.activeBtn).attr(a.selectors.title);void 0!==e&&""!==e&&s(a.activeModal).find("[data-nestedpages-modal-title]").text(e);e=s(a.activeBtn).attr(a.selectors.content);void 0!==e&&""!==e&&s(a.activeModal).find("[data-nestedpages-modal-content]").html(e)},a.checkHash=function(){var e;window.location.hash&&"#modal"===window.location.hash.substring(0,6)&&(e=window.location.hash.substring(7),a.activeModal=s('*[data-nestedpages-modal="'+e+'"]'),a.openModal())},a.bindEvents()},(NestedPages=NestedPages||{}).CheckAll=function(){var a=this,s=jQuery;return a.activeCheckbox="",a.selectors={checkbox:"[data-np-check-all]"},a.bindEvents=function(){s(document).on("change",a.selectors.checkbox,function(){a.activeCheckbox=s(this),a.toggleCheckboxes()}),s(document).on("change","input[type=checkbox]",function(){a.checkAllStatus(s(this))})},a.init=function(){a.bindEvents()},a.toggleCheckboxes=function(){var t=!!s(a.activeCheckbox).is(":checked"),e=s(a.activeCheckbox).attr("data-np-check-all"),e=s('*[name="'+e+'"]');s.each(e,function(){var e=s(this).parents(NestedPages.selectors.rows);s(this).prop("checked",t),s(e).hasClass("np-hide")&&!s(e).is(":visible")&&s(e).find(NestedPages.selectors.bulkActionsCheckbox).prop("checked",!1)}),a.toggleCheckAll()},a.toggleCheckAll=function(){var e=s(a.activeCheckbox).attr("data-np-check-all"),t=(t=s('*[name="'+e+'"]').length)-s(".np-hide").find(NestedPages.selectors.bulkActionsCheckbox).length+s(".np-hide:visible").find(NestedPages.selectors.bulkActionsCheckbox).length,e=s('*[name="'+e+'"]:checked').length;if(t==e)return s(a.activeCheckbox).prop("checked",!0),void s(a.activeCheckbox).removeClass("check-all-partial");0<e?s(a.activeCheckbox).addClass("check-all-partial"):(s(a.activeCheckbox).attr("checked",!1),s(a.activeCheckbox).removeClass("check-all-partial"))},a.checkAllStatus=function(e){e=s(e).attr("name"),e=s('*[data-np-check-all="'+e+'"]');0!==e.length&&(a.activeCheckbox=s(e)[0],a.toggleCheckAll())},a.init()},(NestedPages=NestedPages||{}).BulkActions=function(){var n=this,o=jQuery;return n.selectedNumber=0,n.selectedLinks=[],n.selectedPosts=[],n.bindEvents=function(){o(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){n.toggleBulkForm()}),o(document).on("submit",NestedPages.selectors.bulkActionsForm,function(e){"edit"===o("select[name=np_bulk_action]").val()&&(e.preventDefault(),n.toggleBulkEdit(!0))}),o(document).on("click",NestedPages.selectors.bulkEditRemoveItem,function(e){e.preventDefault();e=o(this).siblings("input[type=hidden]").val();n.uncheckBulkItem(e)}),o(document).on("click",NestedPages.selectors.bulkEditCancel,function(e){e.preventDefault(),n.uncheckAllBulkItems()})},n.toggleBulkForm=function(){var t=!1,a="",s="";if(n.selectedPosts=[],n.selectedLinks=[],o.each(o(NestedPages.selectors.bulkActionsCheckbox),function(){var e;o(this).is(":checked")&&(e=o(this).parents(NestedPages.selectors.rows),t=!0,o(this).parent("div").hasClass("np-check-all")||o(e).hasClass("post-type-np-redirect")||(a+=o(this).val()+","),o(e).hasClass("post-type-np-redirect")&&(s+=o(this).val()+",",n.selectedLinks.push(o(this).val())),"np-redirect"===o(this).attr("data-np-post-type")||o(this).parent("div").hasClass("np-check-all")||((e=[]).title=o(this).attr("data-np-bulk-checkbox"),e.id=o(this).val(),n.selectedPosts.push(e)))}),n.setBulkEditPosts(),n.toggleEditOption(),n.toggleLinkCountAlert(),t)return o(NestedPages.selectors.bulkActionsForm).show(),o(NestedPages.selectors.bulkActionsIds).val(a),o(NestedPages.selectors.bulkActionRedirectIds).val(s),void n.setSelectedNumber();o(NestedPages.selectors.bulkActionsIds).val(""),o(NestedPages.selectors.bulkActionsForm).hide()},n.setBulkEditPosts=function(){for(var e="",t=0;t<n.selectedPosts.length;t++)e+='<li><a href="#" class="np-remove" data-np-remove-bulk-item>×</a>',e+=n.selectedPosts[t].title,e+='<input type="hidden" name="post_ids[]" value="'+n.selectedPosts[t].id+'"></li>';o(NestedPages.selectors.bulkEditTitles).html(e)},n.uncheckBulkItem=function(e){o.each(o(NestedPages.selectors.bulkActionsCheckbox),function(){o(this).val()==e&&o(this).prop("checked",!1).change()}),0===o(NestedPages.selectors.bulkEditRemoveItem).length&&n.toggleBulkEdit(!1)},n.uncheckAllBulkItems=function(){o.each(o(NestedPages.selectors.bulkActionsCheckbox),function(){o(this).prop("checked",!1).change()}),n.toggleBulkEdit(!1)},n.setSelectedNumber=function(){var e=o(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").length,t=o(NestedPages.selectors.bulkActionsForm).find("select option").first();o(t).text(nestedpages.bulk_actions+" ("+e+")")},n.toggleEditOption=function(){var e=o(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").not(".np-redirect-bulk").length,t=o(NestedPages.selectors.bulkActionsForm).find("select option[value=edit]");if(0===e)return o(t).prop("disabled",!0),o(NestedPages.selectors.bulkActionsForm).find("select option").first().prop("selected",!0),void n.toggleBulkEdit(!1);o(t).prop("disabled",!1)},n.toggleBulkEdit=function(e){if(n.toggleLinkCountAlert(),e)return n.disableParentOptions(),o(NestedPages.selectors.bulkEditForm).show(),o(NestedPages.selectors.bulkActionsForm).hide(),void n.setWPSuggest();o(NestedPages.selectors.bulkEditForm).hide(),o(NestedPages.selectors.bulkActionsForm).show(),o(NestedPages.selectors.bulkEditLinkCount).parent("div").hide(),o(NestedPages.selectors.bulkActionsForm).find("select option").first().text(nestedpages.bulk_actions),n.resetBulkEditFields()},n.toggleLinkCountAlert=function(){0!==n.selectedLinks.length?o(NestedPages.selectors.bulkEditLinkCount).parent("div").show():o(NestedPages.selectors.bulkEditLinkCount).parent("div").hide()},n.disableParentOptions=function(){for(var e=o(NestedPages.selectors.bulkEditForm).find("select[name=post_parent]"),t=0;t<n.selectedPosts.length;t++)o(e).find("option[value="+n.selectedPosts[t].id+"]").attr("disabled",!0)},n.setWPSuggest=function(){var e=o(NestedPages.selectors.bulkEditForm).find("[data-autotag]");o.each(e,function(e,t){var a=o(this).attr("data-taxonomy");o(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})},n.resetBulkEditFields=function(){var e=o(NestedPages.selectors.bulkEditForm).find("select");o.each(e,function(){o(this).find("option").first().prop("selected",!0),o(this).find("option").removeAttr("disabled")});e=o(NestedPages.selectors.bulkEditForm).find(".cat-checklist");o.each(e,function(){o(this).find("input[type=checkbox]").prop("checked",!1)})},n.bindEvents()},(NestedPages=NestedPages||{}).HiddenItemCount=function(){var e=this,a=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){a(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){e.toggleHiddenCount()}),a(document).on("click",NestedPages.selectors.toggleAll,function(){e.toggleHiddenCount()}),a(document).on("click",NestedPages.selectors.pageToggle,function(){e.toggleHiddenCount()})},e.toggleHiddenCount=function(){var t=0;a.each(a(NestedPages.selectors.bulkActionsCheckbox),function(){var e;a(this).is(":checked")&&(a(this).parent("div").hasClass("np-check-all")||(e=a(this).closest(".page-row"),a(e).is(":visible")||t++))}),t<1?a(NestedPages.selectors.hiddenItemCountParent).hide():(a(NestedPages.selectors.hiddenItemCount).text(t),a(NestedPages.selectors.hiddenItemCountParent).show())},e.init()},(NestedPages=NestedPages||{}).MenuToggle=function(){var a=this,n=jQuery;return a.formatter=new NestedPages.Formatter,a.bindEvents=function(){n(document).on("click",NestedPages.selectors.childToggleLink,function(e){e.preventDefault(),a.toggleSingleMenu(n(this))}),n(document).on("click",NestedPages.selectors.toggleAll,function(e){e.preventDefault(),a.toggleAllMenus()})},a.toggleSingleMenu=function(e){var t=n(e).parent(NestedPages.selectors.childToggle).parent(NestedPages.selectors.row).siblings("ol");n(e).toggleClass("open"),n(t).toggle(),a.formatter.setBorders(),a.formatter.setNestedMargins(),a.syncUserToggles()},a.toggleAllMenus=function(){var e=NestedPages.selectors.toggleAll;if("closed"===n(e).attr("data-toggle"))return n(NestedPages.selectors.lists).show(),n(e).attr("data-toggle","opened").text(NestedPages.jsData.collapseText),n(NestedPages.selectors.childToggle+" a").addClass("open"),a.formatter.setBorders(),void a.syncUserToggles();n(NestedPages.selectors.lists).not(n(NestedPages.selectors.lists)[0]).hide(),n(e).attr("data-toggle","closed").text(NestedPages.jsData.expandText),n(NestedPages.selectors.childToggle+" a").removeClass("open"),a.formatter.setBorders(),a.syncUserToggles()},a.visibleRowIDs=function(){var s=[],e=n(NestedPages.selectors.rows+":visible");return n.each(e,function(e,t){var a=n(this).attr("id");s.push(a.replace("menuItem_",""))}),s},a.syncUserToggles=function(){n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncToggles,nonce:NestedPages.jsData.nonce,ids:a.visibleRowIDs(),posttype:NestedPages.jsData.posttype},success:function(e){"success"!==e.status&&console.log("There was an error saving toggled pages.")}})},a.bindEvents()},(NestedPages=NestedPages||{}).PageToggle=function(){var a=this,s=jQuery;return a.activeButton="",a.formatter=new NestedPages.Formatter,a.bindEvents=function(){s(document).on("click",NestedPages.selectors.toggleHidden,function(e){e.preventDefault(),a.activeButton=s(this),a.toggleHidden()}),s(document).on("click",NestedPages.selectors.toggleStatus,function(e){e.preventDefault(),a.toggleStatus(s(this))})},a.toggleHidden=function(){var e=s(a.activeButton),t=s(e).attr("href");if("#show"==t)return s(e).attr("href","#hide").text(NestedPages.jsData.showHiddenText),s(NestedPages.selectors.hiddenRows).removeClass("shown").hide(),a.formatter.updateSubMenuToggle(),void a.formatter.setBorders();"#hide"==t&&(s(e).attr("href","#show").text(NestedPages.jsData.hideHiddenText),s(NestedPages.selectors.hiddenRows).addClass("shown").show(),a.formatter.updateSubMenuToggle(),a.formatter.setBorders())},a.toggleStatus=function(e){var t=(t=s(e).attr("href")).substring(1);s(NestedPages.selectors.syncCheckbox).attr("disabled",!1),s(NestedPages.selectors.toggleStatus).removeClass("active"),s(e).addClass("active"),a.saveStatusPreference(t),"draft"==t&&(s(NestedPages.selectors.syncCheckbox).attr("disabled",!0),s("."+t).addClass("nested-visible")),"all"!=t?(s(NestedPages.selectors.rows).hide(),s("."+t).show()):s(NestedPages.selectors.rows).show()},a.saveStatusPreference=function(e){s.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.toggleStatusDisplay,nonce:NestedPages.jsData.nonce,status:e,post_type:NestedPages.jsData.posttype}})},a.bindEvents()},(NestedPages=NestedPages||{}).Nesting=function(){var n=this,o=jQuery;n.formatter=new NestedPages.Formatter,n.initializeSortable=function(){if(!NestedPages.jsData.nestable)return n.initializeSortableFlat();o(NestedPages.selectors.sortable).not(NestedPages.selectors.notSortable).nestedSortable({items:NestedPages.selectors.rows,toleranceElement:"> .row",handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",tabSize:56,isAllowed:function(e,t,a){return!(o(t).hasClass("post-type-np-redirect")&&!o(a).hasClass("post-type-np-redirect"))},start:function(e,t){t.placeholder.height(t.item.height())},sort:function(e,t){n.formatter.updatePlaceholderWidth(t)},stop:function(e,t){setTimeout(function(){n.formatter.updateSubMenuToggle(),n.formatter.setBorders(),n.formatter.setNestedMargins()},100),n.syncNesting()}})},n.initializeSortableFlat=function(){var e=o(NestedPages.selectors.lists).not(NestedPages.selectors.notSortable);o.each(e,function(){o(this).sortable({items:">"+NestedPages.selectors.rows,handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",forcePlaceholderSize:!0,start:function(e,t){t.placeholder.height(t.item.height())},sort:function(e,t){n.formatter.updatePlaceholderWidth(t)},stop:function(e,t){setTimeout(function(){n.formatter.updateSubMenuToggle(),n.formatter.setBorders(),n.formatter.setNestedMargins()},100),n.syncNesting()}})})},n.disableNesting=function(){o(NestedPages.selectors.sortable).sortable("destroy")},n.syncNesting=function(e,t){var a,s;"1"===nestedpages.manual_order_sync&&!e||(o(NestedPages.selectors.errorDiv).hide(),o(NestedPages.selectors.loadingIndicator).show(),s=!!o(NestedPages.selectors.lists).first().hasClass("filtered"),a=NestedPages.jsData.nestable&&!s?o(NestedPages.selectors.sortable).nestedSortable("toHierarchy",{startDepthCount:0}):n.setNestingArray(),n.disableNesting(),e=NestedPages.jsData.syncmenu,"1"===nestedpages.manual_menu_sync&&(e="nosync"),o.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncNesting,nonce:NestedPages.jsData.nonce,list:a,post_type:NestedPages.jsData.posttype,syncmenu:e,filtered:s},success:function(e,t){n.initializeSortable(),"error"===e.status?(o(NestedPages.selectors.errorDiv).text(e.message).show(),o(NestedPages.selectors.loadingIndicator).hide()):t&&"function"==typeof t?t():o(NestedPages.selectors.loadingIndicator).hide()}}))},n.setNestingArray=function(e){return ret=[],o(NestedPages.selectors.lists).first().children("li.page-row").each(function(){var e=n.recursiveNesting(this);ret.push(e)}),ret},n.recursiveNesting=function(e){var t,a=o(e).attr("id");if(a)return a=a.replace("menuItem_",""),t={id:a},0<o(e).children(NestedPages.selectors.lists).children(NestedPages.selectors.rows).length&&(t.children=[],o(e).children(NestedPages.selectors.lists).children(NestedPages.selectors.rows).each(function(){var e=n.recursiveNesting(this);t.children.push(e)})),t}},(NestedPages=NestedPages||{}).SyncMenuSetting=function(){var t=this,e=jQuery;return t.formatter=new NestedPages.Formatter,t.init=function(){t.bindEvents()},t.bindEvents=function(){e(document).ready(function(){"1"!==nestedpages.manual_menu_sync&&"1"===nestedpages.syncmenu&&t.syncSetting()}),e(document).on("change",NestedPages.selectors.syncCheckbox,function(){t.syncSetting()})},t.syncSetting=function(){"page"===NestedPages.jsData.posttype&&0!==e(NestedPages.selectors.syncCheckbox).length&&(NestedPages.jsData.syncmenu=e(NestedPages.selectors.syncCheckbox).is(":checked")?"sync":"nosync",e.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncMenu,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:NestedPages.jsData.syncmenu},success:function(e){"error"===e.status&&t.formatter.showAjaxError(e.message)},error:function(e){console.log(e)}}))},t.bindEvents()},(NestedPages=NestedPages||{}).NewPost=function(){var r=this,d=jQuery;return r.formatter=new NestedPages.Formatter,r.parent_id=0,r.posts="",r.form="",r.bindEvents=function(){d(document).on("open-modal",function(e,t,a){t=d(t).attr("data-nestedpages-modal-toggle");void 0!==t&&"np-bulk-modal"==t&&r.openModal()}),d(document).on("submit",NestedPages.selectors.newPageForm,function(e){e.preventDefault()}),d(document).on("click",NestedPages.selectors.newPageSubmitButton,function(e){e.preventDefault(),r.submitForm(d(this))}),d(document).on("click",NestedPages.selectors.newPageTitle,function(e){e.preventDefault(),r.addTitleField(d(this))}),d(document).on("click",NestedPages.selectors.newPageRemoveTitle,function(e){e.preventDefault(),r.removeTitleField(d(this))}),d(document).on("click",NestedPages.selectors.addChildButton,function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("click",NestedPages.selectors.cancelNewChildButton,function(e){e.preventDefault(),r.cancelNewPage()}),d(document).on("click","["+NestedPages.selectors.newBeforeButton+"]",function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("click","["+NestedPages.selectors.newAfterButton+"]",function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("keydown",function(e){27===e.keyCode&&(r.cancelNewPage(),d(document).click())})},r.openModal=function(){var e=d(NestedPages.selectors.newPageFormContainer).clone().find(NestedPages.selectors.newPageForm);d(e).addClass("in-modal"),d(NestedPages.selectors.newPageModal).find(".modal-body").html(e),d(NestedPages.selectors.newPageModal).find("h3").text(nestedpages.add_multiple),d(NestedPages.selectors.newPageModal).find(".page_parent_id").val(r.parent_id),d(e).find(".np_title").first().focus(),d(e).find(NestedPages.selectors.newPageTitle).first().prop("tabindex","2")},r.openQuickEdit=function(e){var t,a=void 0!==(a=d(e).attr(NestedPages.selectors.newBeforeButton))&&""!==a&&a,s=void 0!==(s=d(e).attr(NestedPages.selectors.newAfterButton))&&""!==s&&s,n=d(e).closest(NestedPages.selectors.row).parent("li"),o=d(NestedPages.selectors.newPageFormContainer).clone();0<d(n).children("ol").length?(t=d(n).children("ol"),d(o).insertBefore(t)):d(o).appendTo(n),d(o).siblings(NestedPages.selectors.row).hide(),r.formatter.showQuickEdit(),d(o).find(".parent_name").html("<em>Parent:</em> "+d(e).attr("data-parentname")),a||s||d(o).find(".page_parent_id").val(d(e).attr("data-id")),a&&(d(o).find(".page_before_id").val(a),d(o).find("[data-new-post-relation-title]").text(nestedpages.insert_before+": "+d(e).attr("data-parentname"))),s&&(d(o).find(".page_after_id").val(s),d(o).find("[data-new-post-relation-title]").text(nestedpages.insert_after+": "+d(e).attr("data-parentname"))),d(o).show(),d(o).find(".np_title").focus(),d(o).find(NestedPages.selectors.newPageTitle).prop("tabindex","2")},r.cancelNewPage=function(){r.formatter.removeQuickEdit(),d(NestedPages.selectors.newChildError).hide(),d(NestedPages.selectors.newPageModal).find(".modal-body").empty(),d(NestedPages.selectors.sortable).find(".new-child").remove(),d(NestedPages.selectors.row).show()},r.addTitleField=function(e){var t=d(e).parents("form"),a=d(e).siblings(".new-page-titles").children("li").length+1,s='<li><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg><div class="form-control new-child-row"><label>'+NestedPages.jsData.titleText+'</label><div><input type="text" name="post_title[]" class="np_title" placeholder="'+NestedPages.jsData.titleText+'" value="" tabindex="'+a+'" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';d(e).siblings(".new-page-titles").append(s);d(t).find(".np_title").last().focus(),d(t).find(NestedPages.selectors.newPageTitle).prop("tabindex",+a),d(".new-page-titles").sortable({items:"li",handle:".handle"}),r.toggleAddEditButton(t)},r.removeTitleField=function(e){var t=d(e).parents("form");d(e).parents(".new-child-row").parent("li").remove(),r.toggleAddEditButton(t)},r.submitForm=function(e){r.toggleLoading(!0),r.form=d(e).parents("form");var t=!!d(e).hasClass("add-edit"),e=NestedPages.formActions.newPage;""!==d(r.form).find(".page_before_id").val()&&(e=NestedPages.formActions.newBeforeAfter),""!==d(r.form).find(".page_after_id").val()&&(e=NestedPages.formActions.newBeforeAfter),d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:d(r.form).serialize()+"&action="+e+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){if("error"===e.status)return r.toggleLoading(!1),void d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show();!0!=t?(r.toggleLoading(!1),r.posts=e.new_pages,r.addPosts()):(e=(e=e.new_pages[0].edit_link).replace(/&/g,"&"),window.location.replace(e))},error:function(e){console.log(e),r.toggleLoading(!1),d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},r.addPosts=function(){var e,t=""!==(t=d(r.form).find(".page_before_id").val())&&t,a=""!==(a=d(r.form).find(".page_after_id").val())&&a,s=d(r.form).parent(".new-child").parent(".page-row");for(0!==d(s).children("ol").length||t||a||d(s).append('<ol class="nplist"></ol>'),e=d(r.form).hasClass("in-modal")?d(".nplist.sortable li.page-row:first"):d(s).children("ol"),i=0;i<r.posts.length;i++)r.appendRows(e,r.posts[i],t,a);t||a||d(e).show(),r.formatter.updateSubMenuToggle(),r.formatter.setNestedMargins(),r.cancelNewPage(),d(document).trigger("close-modal-manual")},r.appendRows=function(e,t,a,s){var n,o='<li id="menuItem_'+t.id+'" class="page-row';"publish"===t.status&&(o+=" published"),o+='">',NestedPages.jsData.hierarchical?(o+='<div class="row">',o+='<div class="child-toggle"></div>'):(o+='<div class="row non-hierarchical">',o+='<div class="non-hierarchical-spacer"></div>'),o+='<div class="row-inner">',o+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg>',o+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>',o+='<a href="'+t.edit_link+'" class="page-link page-title">',o+='<span class="title">'+t.title+"</span>","Publish"!==t.status?o+='<span class="status">('+t.status+")</span>":o+='<span class="status"></span>',o+='<span class="nav-status">',"hide"===t.np_nav_status&&(o+=" "+nestedpages.hidden),o+="</span>",o+='<span class="edit-indicator">Edit</span>',o+="</a>",NestedPages.jsData.hierarchical||(o+='<div class="np-post-columns">',o+='<ul class="np-post-info">',o+='<li><span class="np-author-display">'+t.author_formatted+"</span></li>",o+="<li>"+t.date_formatted+"</li>",o+="</ul>",o+="</div>"),d(".nplist").first().hasClass("has-yoast")&&(o+='<span class="np-seo-indicator na"></span>'),o+='<div class="action-buttons">',o+='<div class="nestedpages-dropdown" data-dropdown><a href="#" class="np-btn has-icon toggle" data-dropdown-toggle><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></a><ul class="nestedpages-dropdown-content" data-dropdown-content>',o+='<li><a href="#" class="open-redirect-modal" data-parentid="'+t.id+'"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>'+nestedpages.add_link+"</a></li>",o+='<li><a href="#" class="add-new-child" data-id="'+t.id+'" data-parentname="'+t.title+'"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'+nestedpages.add_child_short+"</a></li>",o+="</ul></div>",o+='<a href="#" class="np-btn np-quick-edit" data-id="'+t.id+'" data-template="'+t.page_template+'" data-title="'+t.title+'" data-slug="'+t.slug+'" data-commentstatus="closed" data-status="'+t.status.toLowerCase()+'" data-np-status="show"\tdata-navstatus="show" data-author="'+t.author+'" data-template="'+t.template+'" data-month="'+t.month+'" data-day="'+t.day+'" data-year="'+t.year+'" data-hour="'+t.hour+'" data-minute="'+t.minute+'" data-datepicker="'+t.datepicker+'" data-time="'+t.time+'" data-formattedtime="'+t.formattedtime+'" data-ampm="'+t.ampm+'">'+nestedpages.quick_edit+"</a>",o+='<a href="'+t.view_link+'" class="np-btn" target="_blank">'+nestedpages.view+"</a>",o+='<a href="'+t.delete_link+'" class="np-btn np-btn-trash"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-remove"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" class="icon"/><path d="M0 0h24v24H0z" fill="none"/></svg></a>',o+="</div>\x3c!-- .action-buttons --\x3e",o+="</div>\x3c!-- .row-inner --\x3e</div>\x3c!-- .row --\x3e",o+="</li>",a?(n=r.findRowById(a),d(o).insertBefore(n)):s?(n=r.findRowById(s),d(o).insertAfter(n)):d(e).append(o)},r.findRowById=function(e){return d(NestedPages.selectors.rows+"#menuItem_"+e)},r.toggleAddEditButton=function(e){e=d(e).find(".np_title").length;e<1?d(NestedPages.selectors.newPageSubmitButton).hide():(d(NestedPages.selectors.newPageSubmitButton).show(),1<e?d(NestedPages.selectors.newPageSubmitButton+".add-edit").hide():d(NestedPages.selectors.newPageSubmitButton+".add-edit").show())},r.toggleLoading=function(e){if(e)return d(NestedPages.selectors.quickEditErrorDiv).hide(),d(NestedPages.selectors.newPageSubmitButton).attr("disabled","disabled"),void d(NestedPages.selectors.quickEditLoadingIndicator).show();d(NestedPages.selectors.newPageSubmitButton).attr("disabled",!1),d(NestedPages.selectors.quickEditLoadingIndicator).hide()},r.bindEvents()},(NestedPages=NestedPages||{}).QuickEditPost=function(){var r=this,d=jQuery;return r.formatter=new NestedPages.Formatter,r.button="",r.initialData="",r.parent_li="",r.form="",r.flatTerms="",r.termNames="",r.saveButton="",r.newData="",r.row="",r.bindEvents=function(){d(document).on("click",NestedPages.selectors.quickEditOpen,function(e){e.preventDefault(),r.button=d(this),r.openForm()}),d(document).on("click",NestedPages.selectors.quickEditCancel,function(e){e.preventDefault(),r.formatter.removeQuickEdit()}),d(document).on("change",".keep_private",function(){this.checked?d(".post_password").val("").prop("readonly",!0):d(".post_password").prop("readonly",!1)}),d(document).on("click",NestedPages.selectors.quickEditSaveButton,function(e){e.preventDefault(),r.saveButton=d(this),r.save()}),d(document).on("keydown",function(e){27===e.keyCode&&r.formatter.removeQuickEdit()})},r.openForm=function(){r.setInitialData(),r.createForm(),r.populateForm(),r.populateFlatTaxonomies()},r.setInitialData=function(){r.initialData={id:d(r.button).attr("data-id"),title:d(r.button).attr("data-title"),slug:d(r.button).attr("data-slug"),author:d(r.button).attr("data-author"),cs:d(r.button).attr("data-commentstatus"),status:d(r.button).attr("data-status"),template:d(r.button).attr("data-template"),month:d(r.button).attr("data-month"),day:d(r.button).attr("data-day"),year:d(r.button).attr("data-year"),hour:d(r.button).attr("data-hour"),minute:d(r.button).attr("data-minute"),navstatus:d(r.button).attr("data-navstatus"),npstatus:d(r.button).attr("data-np-status"),navtitle:d(r.button).attr("data-navtitle"),navtitleattr:d(r.button).attr("data-navtitleattr"),navcss:d(r.button).attr("data-navcss"),linktarget:d(r.button).attr("data-linktarget"),password:d(r.button).attr("data-password"),datepicker:d(r.button).attr("data-datepicker"),time:d(r.button).attr("data-formattedtime"),timeTwentyFour:d(r.button).attr("data-time"),ampm:d(r.button).attr("data-ampm"),timeFormat:d(r.button).attr("data-timeformat"),sticky:d(r.button).attr("data-sticky")};var e=d(r.button)[0].attributes;d.each(e,function(e,t){t.name.includes("data-npcustom")&&(r.initialData[t.name]=t.value)}),r.initialData.h_taxonomies=[],r.initialData.f_taxonomies=[],r.parent_li=d(r.button).closest(NestedPages.selectors.row).parent("li");var t=d(r.parent_li).attr("class").split(/\s+/);for(i=0;i<t.length;i++)"in-"===t[i].substring(0,3)&&r.initialData.h_taxonomies.push(t[i]),"inf-"===t[i].substring(0,4)&&r.initialData.f_taxonomies.push(t[i])},r.createForm=function(){var e;r.form=d(NestedPages.selectors.quickEditPostForm).clone(),0<d(r.parent_li).children("ol").length?(e=d(r.parent_li).children("ol"),d(r.form).insertBefore(e)):d(r.form).appendTo(r.parent_li),d(r.form).siblings(NestedPages.selectors.row).hide(),d(r.form).show()},r.populateForm=function(){for(var e in d(r.form).find(".page_id").html("<em>ID:</em> "+r.initialData.id),d(r.form).find(".np_id").val(r.initialData.id),d(r.form).find(".np_title").val(r.initialData.title),d(r.form).find(".np_slug").val(r.initialData.slug),d(r.form).find(".np_author select").val(r.initialData.author),d(r.form).find(".np_status").val(r.initialData.status),d(r.form).find(".np_nav_title").val(r.initialData.navtitle),d(r.form).find(".np_title_attribute").val(r.initialData.navtitleattr),d(r.form).find(".np_nav_css_classes").val(r.initialData.navcss),d(r.form).find(".post_password").val(r.initialData.password),d(r.form).find(".np_publish_date").val(r.initialData.datepicker),"open"===r.initialData.cs&&d(r.form).find(".np_cs").attr("checked","checked"),""!==r.initialData.template?d(r.form).find(".np_template").val(r.initialData.template):d(r.form).find(".np_template").val("default"),"private"===r.initialData.status&&(d(r.form).find(".post_password").attr("readonly",!0),d(r.form).find(".keep_private").attr("checked",!0)),"hide"===r.initialData.npstatus?d(r.form).find(".nested_pages_status").attr("checked","checked"):d(r.form).find(".nested_pages_status").removeAttr("checked"),"hide"===r.initialData.navstatus?d(r.form).find(".np_nav_status").attr("checked","checked"):d(r.form).find(".np_nav_status").attr("checked",!1),"_blank"===r.initialData.linktarget?d(r.form).find(".link_target").attr("checked","checked"):d(r.form).find(".link_target").attr("checked",!1),"private"===r.initialData.status&&d(r.form).find(".np_status").val("publish"),"sticky"===r.initialData.sticky?d(r.form).find(".np-sticky").attr("checked","checked"):d(r.form).find(".np-sticky").removeAttr("checked"),"H:i"===r.initialData.timeFormat?d(r.form).find(".np_time").val(r.initialData.timeTwentyFour):(d(r.form).find(".np_time").val(r.initialData.time),d(r.form).find(".np_ampm").val(r.initialData.ampm),d(r.form).find('select[name="mm"]').val(r.initialData.month),d(r.form).find('input[name="jj"]').val(r.initialData.day),d(r.form).find('input[name="aa"]').val(r.initialData.year),d(r.form).find('input[name="hh"]').val(r.initialData.hour),d(r.form).find('input[name="mn"]').val(r.initialData.minute)),r.initialData){var t;e.includes("npcustom")&&r.initialData.hasOwnProperty(e)&&(t=(t=e.replace("data-npcustom-","")).toLowerCase(),d(r.form).find('[data-np-custom-field="'+t+'"]').val(r.initialData[e]))}if(r.populateFlatTaxonomies(),r.initialData.hasOwnProperty("h_taxonomies")){var a=r.initialData.h_taxonomies;for(i=0;i<a.length;i++){var s="#"+a[i];d(r.form).find(s).attr("checked","checked")}}var n=d(r.form).find(".np_datepicker");d.each(n,function(){var e=d(this);e.datepicker({dateFormat:e.attr("data-datepicker-format"),beforeShow:function(e,t){d("#ui-datepicker-div").addClass("nestedpages-datepicker")}})}),r.formatter.showQuickEdit(),d(r.form).show()},r.populateFlatTaxonomies=function(){r.initialData.hasOwnProperty("f_taxonomies")&&(r.createTaxonomyObject(),r.getTermNames(),r.setWPSuggest())},r.createTaxonomyObject=function(){var e={};for(i=0;i<r.initialData.f_taxonomies.length;i++){var t=r.initialData.f_taxonomies[i],a=t.split("-"),s=a.indexOf("nps"),a=(a=a.splice(s+1)).join("-"),s=t.split("-").splice(0,s);s.shift("inf");s=s.join("-");s in e||(e[s]=[]),e[s].push(a)}r.flatTerms=e},r.getTermNames=function(){d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.getTaxonomies,nonce:NestedPages.jsData.nonce,terms:r.flatTerms},success:function(e){r.termNames=e.terms,r.populateFlatTaxonomyFields()}})},r.populateFlatTaxonomyFields=function(){r.termNames&&d.each(r.termNames,function(e,t){e=d("#"+e+"-quickedit");d(e).val(t.join(","))})},r.setWPSuggest=function(){var e=d(r.form).find("[data-autotag]");d.each(e,function(e,t){var a=d(this).attr("data-taxonomy");d(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})},r.save=function(){r.toggleLoading(!0),d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:d(r.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditPost+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){"error"===e.status?(r.toggleLoading(!1),d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show()):(r.toggleLoading(!1),r.newData=e.post_data,r.updatePostRow())},error:function(e){console.log(e)}})},r.updatePostRow=function(){r.row=d(r.button).parents(".row-inner"),d(r.row).find(".title").text(r.newData.post_title),d(r.row).find(".np-view-button").attr("href",r.newData.permalink);var e,t=d(r.row).find(".status");"publish"!==r.newData._status&&"future"!==r.newData._status?(e=nestedpages.post_statuses[r.newData._status].label,d(t).text("("+e+")")):d(t).text(""),"private"===r.newData.keep_private&&d(t).text(nestedpages.private),""!==r.newData.post_password&&void 0!==r.newData.post_password&&(a=d(t).text(),a+=' <span class="locked">',a+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>',a+="</span>",d(t).html(a));var a=d(r.row).find(".nav-status");"hide"==r.newData.nav_status?d(a).text("(Hidden)"):d(a).text("");a=d(r.row).parent("li");"hide"==r.newData.np_status?(d(a).addClass("np-hide"),d(r.row).find(".status").after('<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>')):(d(a).removeClass("np-hide"),d(r.row).find(".status-np-hidden").remove());a=d(r.row).find(".sticky");"sticky"==r.newData.sticky?d(a).show():d(a).hide(),NestedPages.jsData.hierarchical||d(r.row).find(".np-author-display").text(r.newData.author_name);var s,n,o=d(r.row).find(NestedPages.selectors.quickEditOpen);for(s in d(o).attr("data-id",r.newData.post_id),d(o).attr("data-template",r.newData.page_template),d(o).attr("data-title",r.newData.post_title),d(o).attr("data-slug",r.newData.post_name),d(o).attr("data-commentstatus",r.newData.comment_status),d(o).attr("data-status",r.newData._status),d(o).attr("data-sticky",r.newData.sticky),"private"===r.newData.keep_private&&d(o).attr("data-status","private"),d(o).attr("data-author",r.newData.post_author),d(o).attr("data-np-status",r.newData.np_status),d(o).attr("data-password",r.newData.post_password),d(o).attr("data-navstatus",r.newData.nav_status),d(o).attr("data-navtitle",r.newData.np_nav_title),d(o).attr("data-linktarget",r.newData.link_target),d(o).attr("data-navtitleattr",r.newData.np_title_attribute),d(o).attr("data-navcss",r.newData.np_nav_css_classes),d(o).attr("data-month",r.newData.mm),d(o).attr("data-day",r.newData.jj),d(o).attr("data-year",r.newData.aa),d(o).attr("data-hour",r.newData.hh),d(o).attr("data-minute",r.newData.mn),d(o).attr("data-datepicker",r.newData.np_date),d(o).attr("data-time",r.newData.np_time),d(o).attr("data-formattedtime",r.newData.np_time),d(o).attr("data-ampm",r.newData.np_ampm),r.newData)s.includes("np_custom")&&r.newData.hasOwnProperty(s)&&(n=s.replace("np_custom_","data-npcustom-"),d(o).attr(n,r.newData[s]));r.removeTaxonomyClasses(),r.addCategoryClasses(),r.addHierarchicalClasses(),r.addFlatClasses(),r.addStatusClass(),r.formatter.removeQuickEdit(),r.formatter.flashRow(r.row)},r.addStatusClass=function(){var e=["published","draft","pending","future"];for(i=0;i<e.length;i++)d(r.row).removeClass(e[i]);d(r.row).addClass(r.newData._status)},r.removeTaxonomyClasses=function(){taxonomies=[];var e=d(r.row).attr("class").split(/\s+/);for(i=0;i<e.length;i++)"in-"===e[i].substring(0,3)&&d(r.row).removeClass(e[i]),"inf-"===e[i].substring(0,4)&&d(r.row).removeClass(e[i])},r.addCategoryClasses=function(){if(r.newData.hasOwnProperty("post_category")){var e=r.newData.post_category;for(i=0;i<e.length;i++){var t="in-category-"+e[i];d(r.row).addClass(t)}}},r.addHierarchicalClasses=function(){var e;r.newData.hasOwnProperty("tax_input")&&(e=r.newData.tax_input,d.each(e,function(e,t){for(i=0;i<t.length;i++){var a="in-"+e+"-"+t[i];d(r.row).addClass(a)}}))},r.addFlatClasses=function(){var e;r.newData.hasOwnProperty("flat_tax")&&(e=r.newData.flat_tax,d.each(e,function(e,t){for(i=0;i<t.length;i++){var a="inf-"+e+"-nps-"+t[i];d(r.row).addClass(a)}}))},r.toggleLoading=function(e){if(e)return d(NestedPages.selectors.quickEditErrorDiv).hide(),d(r.saveButton).attr("disabled","disabled"),void d(NestedPages.selectors.quickEditLoadingIndicator).show();d(r.saveButton).attr("disabled",!1),d(NestedPages.selectors.quickEditLoadingIndicator).hide()},r.bindEvents()},(NestedPages=NestedPages||{}).QuickEditLink=function(){var a=this,s=jQuery;return a.formatter=new NestedPages.Formatter,a.button="",a.postData="",a.newPostData="",a.form="",a.bindEvents=function(){s(document).on("click",NestedPages.selectors.quickEditButtonLink,function(e){e.preventDefault(),a.formatter.removeQuickEdit(),a.button=s(this),a.openQuickEdit()}),s(document).on("click",NestedPages.selectors.quickEditLinkSaveButton,function(e){e.preventDefault(),a.submitForm()}),s(document).on("keydown",function(e){27===e.keyCode&&a.formatter.removeQuickEdit()})},a.openQuickEdit=function(){a.setData(),a.createForm(),a.populateForm()},a.setData=function(){a.postData={id:s(a.button).attr("data-id"),url:s(a.button).attr("data-url"),title:s(a.button).attr("data-title"),status:s(a.button).attr("data-status"),navstatus:s(a.button).attr("data-navstatus"),npstatus:s(a.button).attr("data-np-status"),linktarget:s(a.button).attr("data-linktarget"),parentid:s(a.button).attr("data-parentid"),navtitleattr:s(a.button).attr("data-navtitleattr"),navcss:s(a.button).attr("data-navcss"),navtype:s(a.button).attr("data-nav-type"),navobject:s(a.button).attr("data-nav-object"),navobjectid:s(a.button).attr("data-nav-object-id"),navoriginallink:s(a.button).attr("data-nav-original-link"),navoriginaltitle:s(a.button).attr("data-nav-original-title")}},a.createForm=function(){var e,t=s(a.button).closest(NestedPages.selectors.row).parent("li");a.form=s(NestedPages.selectors.quickEditLinkForm).clone(),0<s(t).children("ol").length?(e=s(t).children("ol"),s(a.form).insertBefore(e)):s(a.form).appendTo(t);s(a.form).siblings(NestedPages.selectors.row).hide()},a.populateForm=function(){var e;s(a.form).find(".np_id").val(a.postData.id),s(a.form).find(".np_title").val(a.postData.title),s(a.form).find(".np_author select").val(a.postData.author),s(a.form).find(".np_status").val(a.postData.status),s(a.form).find(".np_content").val(a.postData.url),s(a.form).find(".np_parent_id").val(a.postData.parentid),s(a.form).find(".np_title_attribute").val(a.postData.navtitleattr),s(a.form).find(".np_nav_css_classes").val(a.postData.navcss),"hide"===a.postData.npstatus?s(a.form).find(".np_status").prop("checked","checked"):s(a.form).find(".np_status").removeAttr("checked"),"hide"===a.postData.navstatus?s(a.form).find(".np_nav_status").prop("checked","checked"):s(a.form).find(".np_nav_status").removeAttr("checked"),"_blank"===a.postData.linktarget?s(a.form).find(".link_target").prop("checked","checked"):s(a.form).find(".link_target").removeAttr("checked"),"custom"!==a.postData.navobject&&""!==a.postData.navobject?(e='<div class="form-control original-link">Original: <a href="'+a.postData.navoriginallink+'" target="_blank">'+a.postData.navoriginaltitle+"</a></div>",s(a.form).find("[data-url-field]").remove(),s(e).insertAfter(s(a.form).find("h3")),s(a.form).find("[data-np-menu-object-input]").val(a.postData.navobject),s(a.form).find("[data-np-menu-objectid-input]").val(a.postData.navobjectid),s(a.form).find("[data-np-menu-type-input]").val(a.postData.navtype),s(a.form).find("h3").text("Link: "+a.postData.navoriginaltitle)):(s(a.form).find("h3").text("Link"),s(a.form).find("[data-np-menu-object-input]").val("custom"),s(a.form).find("[data-np-menu-type-input]").val("custom")),a.formatter.showQuickEdit(),s(a.form).show()},a.submitForm=function(){a.toggleLoading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:s(a.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditLink+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){"error"===e.status?(a.toggleLoading(!1),s(a.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show()):(a.toggleLoading(!1),a.newPostData=e.post_data,a.updateRow())},error:function(e){a.toggleLoading(!1),s(a.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},a.updateRow=function(){var e=s(a.form).siblings(".row");s(e).find(".title").html(a.newPostData.post_title+' <svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>');var t=s(e).find(".status");"publish"!==a.newPostData._status&&"future"!==a.newPostData._status?s(t).text("("+a.newPostData._status+")"):s(t).text("");t=s(e).find(".nav-status");"hide"==a.newPostData.nav_status?s(t).text("("+NestedPages.jsData.hiddenText+")"):s(t).text("");t=s(e).parent("li");"hide"==a.newPostData.np_status?(s(t).addClass("np-hide"),s(e).find(".status").after('<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>')):(s(t).removeClass("np-hide"),s(e).find(".status-np-hidden").remove());t=s(e).find(NestedPages.selectors.quickEditButtonLink);s(t).attr("data-id",a.newPostData.post_id),s(t).attr("data-title",a.newPostData.post_title),s(t).attr("data-url",a.newPostData.post_content),s(t).attr("data-status",a.newPostData._status),s(t).attr("data-navstatus",a.newPostData.nav_status),s(t).attr("data-np-status",a.newPostData.np_status),s(t).attr("data-linkTarget",a.newPostData.linkTarget),s(t).attr("data-navtitleattr",a.newPostData.titleAttribute),s(t).attr("data-navcss",a.newPostData.cssClasses),a.formatter.removeQuickEdit(),a.formatter.flashRow(e)},a.toggleLoading=function(e){if(s(".row").removeClass("np-updated").removeClass("np-updated-show"),e)return s(NestedPages.selectors.quickEditErrorDiv).hide(),s(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled","disabled"),void s(NestedPages.selectors.quickEditLoadingIndicator).show();s(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled",!1),s(NestedPages.selectors.quickEditLoadingIndicator).hide()},a.bindEvents()},(NestedPages=NestedPages||{}).Clone=function(){var t=this,a=jQuery;return t.parent_id="",t.parent_title="",t.parentLi=null,t.formatter=new NestedPages.Formatter,t.bindEvents=function(){a(document).on("click",NestedPages.selectors.cloneButton,function(e){e.preventDefault(),t.parent_id=a(this).attr("data-id"),t.parent_title=a(this).attr("data-parentname"),t.parentLi=a(this).parent(".row").parent(".page-row").parent(".npList"),t.openModal()}),a(document).on("click",NestedPages.selectors.confirmClone,function(e){e.preventDefault(),t.clone()})},t.openModal=function(){a("#"+NestedPages.selectors.cloneModal).find("[data-clone-parent]").text(t.parent_title),a(document).trigger("open-modal-manual",NestedPages.selectors.cloneModal)},t.clone=function(){t.toggleLoading(!0),a.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.clonePost,parent_id:t.parent_id,quantity:a(NestedPages.selectors.cloneQuantity).val(),status:a(NestedPages.selectors.cloneStatus).val(),author:a(NestedPages.selectors.cloneAuthor).find("select").val(),nonce:NestedPages.jsData.nonce,posttype:NestedPages.jsData.posttype},success:function(e){t.toggleLoading(!1),a(document).trigger("close-modal-manual"),location.reload()}})},t.toggleLoading=function(e){if(e)return a("#"+NestedPages.selectors.cloneModal).find("[data-clone-loading]").show(),void a(NestedPages.selectors.confirmClone).attr("disabled","disabled");a("#"+NestedPages.selectors.cloneModal).find("[data-clone-loading]").hide(),a(NestedPages.selectors.confirmClone).attr("disabled",!1)},t.bindEvents()},(NestedPages=NestedPages||{}).Tabs=function(){var r=this,d=jQuery;return r.selectors={tabToggle:"data-np-tab-toggle",tabPane:"data-np-tab-pane",tabGroup:"data-np-tab-group"},r.bindEvents=function(){d(document).on("click","["+r.selectors.tabToggle+"]",function(e){e.preventDefault(),r.toggleTabs(d(this))})},r.toggleTabs=function(e){for(var t=d(e).attr(r.selectors.tabGroup),a=d("*["+r.selectors.tabGroup+"="+t+"]["+r.selectors.tabPane+"]"),s=d(e).attr(r.selectors.tabToggle),n=d("*["+r.selectors.tabGroup+"="+t+"]["+r.selectors.tabToggle+"]"),o=[],i=0;i<n.length;i++)o[i]=d(n[i]).parent("li")[0];d(a).hide(),d(n).removeClass("active"),d(o).removeClass("active"),d.each(a,function(){d(this).attr(r.selectors.tabPane)==s&&d(this).show()}),d.each(n,function(){d(this).attr(r.selectors.tabToggle)==s&&(d(this).addClass("active"),d(this).parent("li").addClass("active"))}),d(document).trigger("tabs-changed",[s,t,e])},r.bindEvents()},jQuery(document).ready(function(){new NestedPages.Factory}),(NestedPages=NestedPages||{}).selectors={childToggle:".child-toggle",childToggleLink:".child-toggle a",toggleAll:".nestedpages-toggleall",toggleHidden:".np-toggle-hidden",toggleStatus:".np-toggle-publish",lists:".nplist",rows:".page-row",row:".row",sortable:".sortable",notSortable:".no-sort",handle:".handle",published:".published",hiddenRows:".np-hide",errorDiv:"#np-error",loadingIndicator:"#nested-loading",syncCheckbox:".np-sync-menu",syncForm:".np-sync-menu-cont",ajaxError:"[data-nestedpages-error]",trashWithChildrenButton:"[data-nestedpages-trash-children]",toggleEditButtons:".np-toggle-edit",bulkActionsHeader:".nestedpages-list-header",bulkActionsForm:"[data-np-bulk-form]",bulkActionsCheckbox:"[data-np-bulk-checkbox]",bulkActionsIds:"[data-np-bulk-ids]",bulkActionRedirectIds:"[data-np-bulk-redirect-ids]",hiddenItemCount:"[data-np-hidden-count]",hiddenItemCountParent:"[data-np-hidden-count-parent]",bulkEditForm:"[data-np-bulk-edit-form]",bulkEditTitles:"[data-np-bulk-titles]",bulkEditRemoveItem:"[data-np-remove-bulk-item]",bulkEditCancel:"[data-np-cancel-bulk-edit]",bulkEditLinkCount:"[data-bulk-edit-link-count]",quickEditOverlay:".np-inline-overlay",quickEditLoadingIndicator:".np-qe-loading",quickEditErrorDiv:".np-quickedit-error",quickEditCancel:".np-cancel-quickedit",quickEditButtonLink:".np-quick-edit-redirect",quickEditLinkForm:".quick-edit-form-redirect",quickEditLinkSaveButton:".np-save-quickedit-redirect",quickEditOpen:".np-quick-edit",quickEditPostForm:".quick-edit-form",quickEditSaveButton:".np-save-quickedit",openLinkModal:".open-redirect-modal",linkModal:"np-link-modal",saveLink:".np-save-link",linkLoadingIndicator:".np-link-loading",linkErrorDiv:".np-new-link-error",linkForm:".np-new-link-form",linkDeleteButton:"[data-np-confirm-delete]",linkDeleteConfirmationButton:"[data-delete-confirmation]",linkDeleteConfirmationModal:"np-delete-confirmation-modal",linkDeleteConfirmationModalText:"[data-np-link-delete-text]",openPageModal:".open-bulk-modal",newPageModal:"#np-bulk-modal",newPageFormContainer:".new-child-form",newPageForm:".np-new-child-form",newPageSubmitButton:".np-save-newchild",newPageTitle:".add-new-child-row",newPageRemoveTitle:".np-remove-child",addChildButton:".add-new-child",newChildError:".np-newchild-error",cancelNewChildButton:".np-cancel-newchild",newBeforeButton:"data-insert-before",newAfterButton:"data-insert-after",cloneButton:".clone-post",confirmClone:"[data-confirm-clone]",cloneModal:"np-clone-modal",cloneQuantity:"[data-clone-quantity]",cloneStatus:"[data-clone-status]",cloneAuthor:"[data-clone-author]",tabButtonParent:"[data-np-tabs]",tabButton:"[data-np-tab]",tabContent:"[data-np-tab-pane]",thumbnailContainer:".np-thumbnail",thumbnailContainerLink:".np-thumbnail.link",manualMenuSync:"[data-np-manual-menu-sync]",manualOrderSync:"[data-np-manual-order-sync]"},NestedPages.cssClasses={noborder:"no-border"},NestedPages.jsData={ajaxurl:ajaxurl,nonce:nestedpages.np_nonce,allPostTypes:nestedpages.post_types,syncmenu:"nosync",posttype:"",nestable:!0,sortable:!0,hierarchical:!0,expandText:nestedpages.expand_text,collapseText:nestedpages.collapse_text,showHiddenText:nestedpages.show_hidden,hideHiddenText:nestedpages.hide_hidden,quickEditText:nestedpages.quick_edit,hiddenText:nestedpages.hidden,titleText:nestedpages.title},NestedPages.formActions={syncToggles:"npnestToggle",syncNesting:"npsort",syncMenu:"npsyncMenu",newPage:"npnewChild",newBeforeAfter:"npnewBeforeAfter",quickEditLink:"npquickEditLink",getTaxonomies:"npgetTaxonomies",quickEditPost:"npquickEdit",clonePost:"npclonePost",search:"npmenuSearch",newMenuItem:"npnewMenuItem",manualMenuSync:"npmanualMenuSync",postSearch:"nppostSearch",wpmlTranslations:"npWpmlTranslations",resetSettings:"npresetSettings",resetUserPrefs:"npresetUserPreferences",resetAdminMenuSettings:"npresetAdminMenuSettings",trashWithChildren:"nptrashWithChildren",toggleStatusDisplay:"nptoggleStatusDisplay"},NestedPages.Factory=function(){var t=this,e=jQuery;return t.formatter=new NestedPages.Formatter,t.dropdowns=new NestedPages.Dropdowns,t.modals=new NestedPages.Modals,t.checkAll=new NestedPages.CheckAll,t.bulkActions=new NestedPages.BulkActions,t.menuToggle=new NestedPages.MenuToggle,t.pageToggle=new NestedPages.PageToggle,t.nesting=new NestedPages.Nesting,t.syncMenuSetting=new NestedPages.SyncMenuSetting,t.newPage=new NestedPages.NewPost,t.quickEditLink=new NestedPages.QuickEditLink,t.quickEditPost=new NestedPages.QuickEditPost,t.clone=new NestedPages.Clone,t.tabs=new NestedPages.Tabs,t.menuLinks=new NestedPages.MenuLinks,t.hiddenItemCount=new NestedPages.HiddenItemCount,t.confirmDelete=new NestedPages.ConfirmDelete,t.manualSync=new NestedPages.ManualSync,t.postSearch=new NestedPages.PostSearch,t.postMove=new NestedPages.MovePost,t.wpml=new NestedPages.Wpml,t.trashWithChildren=new NestedPages.TrashWithChildren,t.init=function(){nestedpages.settings_page||(t.bindEvents(),t.setPostType(),t.setMenuSync(),t.setNestable(),t.setSortable(),t.formatter.updateSubMenuToggle(),t.formatter.setBorders(),t.formatter.setNestedMargins(),t.nesting.initializeSortable())},t.bindEvents=function(){e(document).on("click",NestedPages.selectors.quickEditOverlay,function(e){t.formatter.removeQuickEdit(),t.newPage.cancelNewPage()}),e(document).ready(function(){t.formatter.hideAjaxError(),t.formatter.sizeLinkThumbnails()})},t.setNestable=function(){var a=!1;e.each(NestedPages.jsData.allPostTypes,function(e,t){t.name===NestedPages.jsData.posttype&&(!0===t.hierarchical&&(a=!0),!0===t.disable_nesting&&(a=!1))}),NestedPages.jsData.nestable=a},t.setSortable=function(){var a=!0;e.each(NestedPages.jsData.allPostTypes,function(e,t){t.name===NestedPages.jsData.posttype&&void 0!==t.disable_sorting&&""!==t.disable_sorting&&"true"===t.disable_sorting&&(a=!1)}),NestedPages.jsData.sortable=a},t.setPostType=function(){NestedPages.jsData.posttype=nestedpages.current_post_type,void 0!==NestedPages.jsData.posttype&&""!==NestedPages.jsData.posttype||(NestedPages.jsData.posttype=e(NestedPages.selectors.sortable).attr("id").substring(3)),NestedPages.jsData.hierarchical=NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical},t.setMenuSync=function(){NestedPages.jsData.syncmenu="1"===nestedpages.syncmenu?"sync":"nosync"},t.init()},(NestedPages=NestedPages||{}).MenuLinks=function(){var a=this,s=jQuery;return a.typeButton="",a.post="",a.formatter=new NestedPages.Formatter,a.selectors={form:"[data-np-menu-item-form]",typeSelect:"[data-np-menu-selection]",accordion:"[data-np-menu-accordion]",accordionItem:"[data-np-menu-accordion-item]",formPlaceholder:".np-menu-link-object-placeholder",formDetails:".np-menu-link-details",searchResults:"[data-np-search-result]",defaultResults:"[data-default-result]",originalLink:"[data-np-original-link]",saveButton:"[data-np-save-link]",urlInputCont:"[data-np-menu-url-cont]",errorDiv:"[data-np-error]"},a.fields={object:"[data-np-menu-object-input]",objectid:"[data-np-menu-objectid-input]",itemType:"[data-np-menu-type-input]",url:"[data-np-menu-url]",navigationLabel:"[data-np-menu-navigation-label]",titleAttribute:"[data-np-menu-title-attr]",cssClasses:"[data-np-menu-css-classes]",npStatus:"[data-np-menu-np-status]",linkTarget:"[data-np-menu-link-target]",menuTitle:"[data-np-menu-title]",parentPostType:"[data-np-menu-parent-post-type]"},a.search=new NestedPages.MenuSearch,a.bindEvents=function(){s(document).on("click",NestedPages.selectors.openLinkModal,function(e){e.preventDefault(),a.postParent=s(this).attr("data-parentid"),s(a.selectors.form).find(".parent_id").val(s(this).attr("data-parentid")),a.openModal()}),s(document).on("click",a.selectors.accordionItem,function(e){e.preventDefault(),a.accordion(s(this))}),s(document).on("click",a.selectors.typeSelect,function(e){e.preventDefault(),a.typeButton=s(this),a.setLinkType()}),s(document).on("keyup",a.fields.navigationLabel,function(){a.updateTitle()}),s(document).on("click",a.selectors.saveButton,function(e){e.preventDefault(),a.submitForm()}),s(document).on("keydown",function(e){27===e.keyCode&&s(document).trigger("close-modal-manual")})},a.openModal=function(){s(NestedPages.selectors.linkErrorDiv).hide(),s(NestedPages.selectors.linkModal).find("input").val(""),s(NestedPages.selectors.linkModal).find(".parent_id").val(a.postParent),a.clearForm(),s(a.selectors.accordion).find("ul").hide(),s(a.selectors.typeSelect).removeClass("active"),s(document).trigger("open-modal-manual",NestedPages.selectors.linkModal)},a.accordion=function(e){a.clearForm();var t=s(e).siblings("ul");if(s(t).is(":visible"))return s(e).removeClass("active"),void s(t).slideUp("fast");s(a.selectors.accordionItem).removeClass("active"),s(e).addClass("active"),s(e).parents(a.selectors.accordion).find("ul").slideUp("fast"),s(t).slideDown("fast")},a.setLinkType=function(){s(a.typeButton).hasClass("active")?a.clearForm():(s(a.typeButton).hasClass("np-custom-link")&&(s(a.selectors.accordionItem).removeClass("active"),s(a.selectors.accordion).find("ul").slideUp("fast")),s(a.selectors.formPlaceholder).hide(),a.populateForm())},a.populateForm=function(){s(a.selectors.saveButton).show(),s(a.selectors.typeSelect).removeClass("active"),s(a.typeButton).addClass("active"),s(a.fields.menuTitle).text(s(a.typeButton).text()).val(s(a.typeButton).text()),s(a.selectors.form).find("h3").find("em").text(s(a.typeButton).attr("data-np-object-name")),""!==s(a.typeButton).attr("data-np-permalink")?(s(a.selectors.form).find(a.selectors.urlInputCont).hide(),s(a.selectors.form).find(a.selectors.originalLink).html('<a href="'+s(a.typeButton).attr("data-np-permalink")+'">'+s(a.typeButton).text()+"</a>"),s(a.selectors.form).find(a.selectors.originalLink).parent(".original-link").show()):(s(a.selectors.form).find(a.selectors.urlInputCont).show(),s(a.selectors.form).find(a.selectors.originalLink).parent(".original-link").hide()),s(a.fields.object).val(s(a.typeButton).attr("data-np-menu-object")),s(a.fields.objectid).val(s(a.typeButton).attr("data-np-menu-objectid")),s(a.fields.itemType).val(s(a.typeButton).attr("data-np-menu-type")),s(a.selectors.formDetails).show()},a.clearForm=function(){s(a.selectors.form).find(a.selectors.errorDiv).hide(),s(a.selectors.saveButton).hide(),s(a.selectors.formDetails).hide(),s(a.selectors.formPlaceholder).show(),s(a.selectors.form).find("input").not(".parent_id").not(".parent-post-type").val(""),s(a.selectors.form).find(a.fields.linkTarget).val("_blank"),s(a.selectors.form).find('input[type="checkbox"]').attr("checked",!1),s(a.selectors.typeSelect).removeClass("active"),a.search.toggleLoading(!1),s(a.selectors.searchResults).remove(),s(a.selectors.defaultResults).show()},a.updateTitle=function(){var e=s(a.fields.navigationLabel).val(),t=s(a.selectors.form).find("h3").find("span");""!==e?(s(a.fields.menuTitle).val(e),s(t).text(e)):(s(a.fields.menuTitle).val(s(a.typeButton).text()),s(t).text(s(a.typeButton).text()))},a.submitForm=function(){a.toggleLoading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:s(a.selectors.form).serialize()+"&action="+NestedPages.formActions.newMenuItem+"&nonce="+NestedPages.jsData.nonce+"&post_type="+NestedPages.jsData.posttype+"&syncmenu="+NestedPages.jsData.syncmenu,success:function(e){a.toggleLoading(!1),"error"!==e.status?(a.post=e.post_data,a.createRow()):s(a.selectors.form).find(a.selectors.errorDiv).text(e.message).show()},error:function(e){console.log(e)}})},a.createRow=function(){var e='<li id="menuItem_'+a.post.id+'" class="page-row published';e+='">',e+='<div class="row"><div class="child-toggle"><div class="child-toggle-spacer"></div></div><div class="row-inner">',e+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg>',e+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>',e+='<a href="'+a.post.np_link_content+'" class="page-link page-title" target="_blank"><span class="title">'+a.post.menuTitle+' <svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg></span>',e+='</a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ',e+='data-id="'+a.post.id+'"',e+='data-parentid="'+a.post.parent_id+'"',e+='data-title="'+a.post.menuTitle+'" ',e+='data-url="'+a.post.url+'" ',e+='data-status="publish" ',e+='data-np-status="show" ',e+='data-navstatus="show" ',e+='data-navcss="'+a.post.cssClasses+'" ',e+='data-navtitleattr="'+a.post.titleAttribute+'" ',e+='data-nav-type="'+a.post.menuType+'" ',e+='data-nav-object="'+a.post.objectType+'" ',e+='data-nav-object-id="'+a.post.objectId+'" ',e+='data-nav-original-link="'+a.post.original_link+'" ',e+='data-nav-original-title="'+a.post.original_title+'" ',e+='data-linktarget="'+a.post.link_target+'">',e+=NestedPages.jsData.quickEditText,e+="</a>",e+='<a href="'+a.post.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',e+="</div></div></div></li>","0"===a.post.parent_id?s(".nplist:first li:first").after(e):a.appendChildRow(e),s(document).trigger("close-modal-manual"),a.row=s("#menuItem_"+a.post.id).find(".row"),a.formatter.flashRow(a.row)},a.appendChildRow=function(e){var t=s("#menuItem_"+a.post.parent_id);0===s(t).children("ol").length?(e='<ol class="sortable nplist" style="display:block;">'+e+"</ol>",s(t).append(e)):s(t).find("ol:first").prepend(e),a.formatter.updateSubMenuToggle()},a.toggleLoading=function(e){if(e)return s(a.selectors.form).find(a.selectors.errorDiv).hide(),s(a.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).show(),void s(a.selectors.saveButton).attr("disabled","disabled");s(a.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).hide(),s(a.selectors.saveButton).attr("disabled",!1)},a.bindEvents()},(NestedPages=NestedPages||{}).MenuSearch=function(){var s=this,n=jQuery;return s.selectors={searchForms:"*[data-np-menu-search]",defaultResults:"[data-default-result]",loadingIndicator:".np-menu-search-loading",noResults:".np-menu-search-noresults",searchType:"data-search-type",searchObject:"data-search-object",searchResults:"[data-np-search-result]"},s.activeForm="",s.results="",s.defaultResults="",s.searchType="",s.searchObject="",s.init=function(){s.bindEvents()},s.bindEvents=function(){n(document).on("keyup",s.selectors.searchForms,function(){s.activeForm=n(this),n(s.selectors.searchResults).remove(),s.performSearch()})},s.performSearch=function(){if(s.defaultResults=n(s.activeForm).parent("li").siblings(s.selectors.defaultResults),2<n(s.activeForm).val().length)return n(s.defaultResults).hide(),s.toggleLoading(!0),void s.query();s.toggleLoading(!1),n(s.defaultResults).show()},s.query=function(){s.searchType=n(s.activeForm).attr(s.selectors.searchType),s.searchObject=n(s.activeForm).attr(s.selectors.searchObject),n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.search,nonce:NestedPages.jsData.nonce,term:n(s.activeForm).val(),searchType:s.searchType,searchObject:s.searchObject},success:function(e){console.log(e),e.results?(s.results=e.results,s.toggleLoading(!1),"post_type"===s.searchType?s.appendPosts():s.appendTaxonomies()):(s.toggleLoading(!1),n(s.activeForm).siblings(s.selectors.noResults).show())}})},s.appendPosts=function(){var a="";n.each(s.results,function(e,t){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+s.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+t.ID+'" data-np-permalink="'+t.permalink+'" data-np-object-name="'+t.singular_name+'" data-np-menu-selection>'+t.post_title+"</a></li>"}),n(a).insertAfter(n(s.activeForm).parent("li")),s.toggleLoading(!1)},s.appendTaxonomies=function(){var a="";n.each(s.results,function(e,t){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+s.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+t.term_id+'" data-np-permalink="'+t.permalink+'" data-np-object-name="'+t.taxonomy+'" data-np-menu-selection>'+t.name+"</a></li>"}),n(a).insertAfter(n(s.activeForm).parent("li")),s.toggleLoading(!1)},s.toggleLoading=function(e){var t=n(s.activeForm).siblings(s.selectors.loadingIndicator);n(s.selectors.noResults).hide(),e?n(t).show():n(t).hide()},s.init()},jQuery(document).ready(function(){new NestedPagesTrash});var NestedPagesTrash=function(){var t=this,a=jQuery;return t.trashButton=".np-empty-trash",t.confirmButton=".np-trash-confirm",t.warningModal="#np-trash-modal",t.errorAlert="#np-error",t.loadingIndicator="#nested-loading",t.trashLinks=".np-trash-links",t.postType=a("#np-trash-posttype").val(),t.nonce=nestedpages.np_nonce,t.formAction="npEmptyTrash",t.bindEvents=function(){a(document).on("click",t.confirmButton,function(e){e.preventDefault(),t.confirmEmpty()})},t.confirmEmpty=function(){t.loading(!0),a(document).trigger("close-modal-manual"),a(t.errorAlert).hide(),t.emptyTrash()},t.emptyTrash=function(){a.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:t.formAction,nonce:t.nonce,posttype:t.postType},success:function(e){t.loading(!1),"error"===e.status?a(t.errorAlert).text(e.message).show():(a(t.trashLinks).hide(),a(".notice-dismiss").click())}})},t.loading=function(e){e?a(t.loadingIndicator).show():a(t.loadingIndicator).hide()},t.bindEvents()};(NestedPages=NestedPages||{}).ConfirmDelete=function(){var t=this,a=jQuery;return t.deleteLink="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.linkDeleteButton,function(e){e.preventDefault(),t.confirmSingle(a(this))}),a(document).on("click",NestedPages.selectors.linkDeleteConfirmationButton,function(e){e.preventDefault(),a(this).hasClass("bulk")?t.deleteMultiple():t.deleteSingle()}),a(document).on("submit",NestedPages.selectors.bulkActionsForm,function(e){t.confirmMultiple(e)})},t.confirmSingle=function(e){t.deleteLink=a(e).attr("href"),a(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation_singular),a(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.delete).removeClass("bulk"),a(document).trigger("open-modal-manual",NestedPages.selectors.linkDeleteConfirmationModal)},t.confirmMultiple=function(e){"trash"===a('select[name="np_bulk_action"]').val()&&""!==a(NestedPages.selectors.bulkActionRedirectIds).val()&&(e.preventDefault(),a(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation),a(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.trash_delete_links).addClass("bulk"),a(document).trigger("open-modal-manual",[NestedPages.selectors.linkDeleteConfirmationModal]))},t.deleteMultiple=function(){a(NestedPages.selectors.bulkActionsForm)[0].submit()},t.deleteSingle=function(){window.location.replace(t.deleteLink)},t.bindEvents()},(NestedPages=NestedPages||{}).ManualSync=function(){var t=this,a=jQuery;return t.activeBtn="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.manualMenuSync,function(e){e.preventDefault(),t.activeBtn=a(this),t.syncMenu()}),a(document).on("click",NestedPages.selectors.manualOrderSync,function(e){e.preventDefault(),t.activeBtn=a(this),t.syncOrder()})},t.syncMenu=function(){t.loading(!0),a.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.manualMenuSync,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:"sync"},success:function(e){"error"===e.status?(a(NestedPages.selectors.errorDiv).text(e.message).show(),a(NestedPages.selectors.loadingIndicator).hide()):t.loading(!1)}})},t.syncOrder=function(){t.loading(!0),(new NestedPages.Nesting).syncNesting(!0,t.loading(!1))},t.loading=function(e){if(e)return a(t.activeBtn).addClass("disabled"),void a(NestedPages.selectors.loadingIndicator).show();a(t.activeBtn).removeClass("disabled"),a(NestedPages.selectors.loadingIndicator).hide()},t.bindEvents()},(NestedPages=NestedPages||{}).PostSearch=function(){var s=this,n=jQuery;return s.selectors={input:"data-nestedpages-post-search",form:"data-nestedpages-post-search-form",loadingIndicator:"data-nestedpages-loading",noResults:"data-nestedpages-no-results",results:"data-nestedpages-search-results"},s.changed=!1,s.activeInput="",s.results="",s.defaultResults="",s.postType="",s.activeForm="",s.bindEvents=function(){n("["+s.selectors.input+"]").on("input",function(){return s.activeInput=n(this),s.setOptions(),s.changed||s.setDefaultResults(),""===n(this).val()?(n(s.activeForm).find("["+s.selectors.noResults+"]").hide(),void s.showDefaultResults()):void s.query()})},s.setDefaultResults=function(){s.defaultResults=n(s.activeForm).find("["+s.selectors.results+"]").html(),s.changed=!0},s.showDefaultResults=function(){n(s.activeForm).find("["+s.selectors.results+"]").html(s.defaultResults)},s.setOptions=function(){s.postType=n(s.activeInput).attr(s.selectors.input),s.activeForm=n(s.activeInput).parents("["+s.selectors.form+"]")},s.performSearch=function(){if(s.defaultResults=n(s.activeForm).parent("li").siblings(s.selectors.defaultResults),2<n(s.activeForm).val().length)return n(s.defaultResults).hide(),s.toggleLoading(!0),void s.query();s.toggleLoading(!1),n(s.defaultResults).show()},s.query=function(){n(s.activeForm).find("["+s.selectors.results+"]").empty(),s.toggleLoading(!0),n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.postSearch,nonce:NestedPages.jsData.nonce,term:n(s.activeInput).val(),postType:s.postType},success:function(e){e.results?(s.results=e.results,s.loadResults(),s.toggleLoading(!1)):(s.toggleLoading(!1),n(s.activeForm).find("["+s.selectors.noResults+"]").show())}})},s.loadResults=function(){var a="<ul>";n.each(s.results,function(e,t){a+='<li><a href="#" data-assignment-page-id="'+t.ID+'" data-assignment-page-title="'+t.post_title+'">'+t.post_title+"</a></li>"}),a+="</ul>",n(s.activeForm).find("["+s.selectors.results+"]").html(a),s.toggleLoading(!1)},s.toggleLoading=function(e){var t=n(s.activeForm).find("["+s.selectors.loadingIndicator+"]"),a=n(s.activeForm).find("["+s.selectors.noResults+"]");n(a).hide(),e?n(t).show():n(t).hide()},s.bindEvents()},(NestedPages=NestedPages||{}).MovePost=function(){var t=this,a=jQuery;return t.formatter=new NestedPages.Formatter,t.nesting=new NestedPages.Nesting,t.activeRow,t.selectors={moveToTop:"data-push-to-top",moveToBottom:"data-push-to-bottom"},t.bindEvents=function(){a(document).ready(function(){t.disableTopOnFirst(),t.disableBottomOnLast()}),a(document).on("click","["+t.selectors.moveToTop+"]",function(e){e.preventDefault(),a(this).hasClass("disabled")||(t.activeRow=a(this).closest(NestedPages.selectors.rows),t.moveToTop())}),a(document).on("click","["+t.selectors.moveToBottom+"]",function(e){e.preventDefault(),a(this).hasClass("disabled")||(t.activeRow=a(this).closest(NestedPages.selectors.rows),t.moveToBottom())})},t.moveToTop=function(){var e=a(t.activeRow).parent(NestedPages.selectors.lists),e=a(e).find(NestedPages.selectors.rows).first();a(t.activeRow).insertBefore(e),t.formatter.setBorders(),a(document).click(),t.nesting.syncNesting(),t.disableTopOnFirst(),t.disableBottomOnLast()},t.moveToBottom=function(){var e=a(t.activeRow).parent(NestedPages.selectors.lists),e=a(e).children(NestedPages.selectors.rows).last();a(t.activeRow).insertAfter(e),t.formatter.setBorders(),a(document).click(),t.nesting.syncNesting(),t.disableTopOnFirst(),t.disableBottomOnLast()},t.disableTopOnFirst=function(){var e=a(NestedPages.selectors.lists);a.each(e,function(){a(this).find("["+t.selectors.moveToTop+"]").removeClass("disabled");var e=a(this).find(NestedPages.selectors.rows).first();a(e).find("["+t.selectors.moveToTop+"]").addClass("disabled")})},t.disableBottomOnLast=function(){var e=a(NestedPages.selectors.lists);a.each(e,function(){a(this).find("["+t.selectors.moveToBottom+"]").removeClass("disabled");var e=a(this).find(NestedPages.selectors.rows).last();a(e).find("["+t.selectors.moveToBottom+"]").addClass("disabled")})},t.bindEvents()},(NestedPages=NestedPages||{}).TrashWithChildren=function(){var t=this,a=jQuery;return t.post_id="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.trashWithChildrenButton,function(e){e.preventDefault(),t.post_id=a(this).attr("data-post-id"),t.trash()})},t.trash=function(){a.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.trashWithChildren,nonce:NestedPages.jsData.nonce,post_id:t.post_id,screen:nestedpages.current_page},success:function(e){window.location.replace(e.redirect)},error:function(e){console.log(e)}})},t.bindEvents()},(NestedPages=NestedPages||{}).Wpml=function(){var t=this,n=jQuery;return t.button=null,t.postData=null,t.modal=null,t.parent_li=null,t.formatter=new NestedPages.Formatter,t.selectors={translationsBtn:"data-nestedpages-translations",modal:"data-np-wpml-translations-modal",title:"data-wmpl-translation-title",table:"data-np-wpml-translations-modal-table"},t.bindEvents=function(){nestedpages.wpml&&n(document).on("click","["+t.selectors.translationsBtn+"]",function(e){e.preventDefault(),t.createTranslationsModal(n(this))})},t.createTranslationsModal=function(e){t.parent_li=n(e).parents(".action-buttons").closest(NestedPages.selectors.row).parent("li"),t.button=n(t.parent_li).find(NestedPages.selectors.quickEditOpen),t.postData={id:n(t.button).attr("data-id"),title:n(t.button).attr("data-title"),slug:n(t.button).attr("data-slug")},t.modal=n("["+t.selectors.modal+"]").clone(),0<n(t.parent_li).children("ol").length?(e=n(t.parent_li).children("ol"),n(t.modal).insertBefore(e)):n(t.modal).appendTo(t.parent_li),n(t.modal).find("["+t.selectors.title+"]").text(t.postData.title),t.formatter.showQuickEdit(),n(t.modal).show(),t.getTranslationData()},t.getTranslationData=function(){n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.wpmlTranslations,post_id:t.postData.id,nonce:NestedPages.jsData.nonce},success:function(e){console.log(e),console.log(t.postData.id),"success"===e.status?t.populateModal(e.translations):(n(t.modal).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show(),t.toggleLoading(!1))}})},t.populateModal=function(a){var s="<tbody>";n.each(a,function(e,t){e=a[e];s+="<tr>",s+='<td><img src="'+e.country_flag_url+'" alt="'+e.translated_name+'" /> '+e.translated_name+"</td>",s+="<td>",e.has_translation&&e.edit_link?s+='<a href="'+e.edit_link+'">'+e.translation.post_title+" ("+nestedpages.edit+")</a>":s+='<a href="'+e.add_link+'" class="np-btn">+ '+nestedpages.add_translation+"</a>",s+="</td>",s+="</tr>"}),s+="</tbody>",n(t.modal).find("["+t.selectors.table+"]").html(s),t.toggleLoading(!1)},t.toggleLoading=function(e){e?n(t.modal).addClass("loading"):n(t.modal).removeClass("loading")},t.bindEvents()};
|
1 |
+
var NestedPages=NestedPages||{};NestedPages.Formatter=function(){var s=this,i=jQuery;s.updateSubMenuToggle=function(){for(var e=i(NestedPages.selectors.childToggle),t=0;t<e.length;t++){var a,s=e[t],n=i(s).parent(".row").parent("li");0<i(n).children("ol").length?i(n).children("ol").find("li.page-row").length<1?i(n).children("ol").hide():(a='<div class="child-toggle-spacer"></div>',a+='<a href="#"',0<i(n).children("ol:visible").length&&(a+=' class="open"'),a+='><span class="np-icon-arrow"></span></a>',i(s).html(a),0<i(n).children("ol").children(".np-hide").length&&0===i(n).children("ol").children(".np-hide.shown").length?i(s).find("a").hide():0<i(n).children("ol").children(".np-hide").length&&0<i(n).children("ol").children(".np-hide.shown").length&&i(s).find("a").show()):i(s).empty().html('<div class="child-toggle-spacer"></div>')}},s.setBorders=function(){i(NestedPages.selectors.rows).removeClass(NestedPages.cssClasses.noborder),i.each(i(NestedPages.selectors.lists),function(){i(this).find(".page-row:visible:first").addClass(NestedPages.cssClasses.noborder)})},s.setNestedMargins=function(){s.setIndent()},s.setIndent=function(){var n="1"===nestedpages.non_indent?20:30,o="1"===nestedpages.non_indent?".row-inner":".child-toggle";i.each(i(NestedPages.selectors.lists),function(e,t){var a=i(this).parents(NestedPages.selectors.lists).length,s=0;NestedPages.jsData.sortable||(s=10),0<a?(s=a*n+s,i(this).find(o).css("padding-left",s+"px")):(a<1&&i(this).find(o).css("padding-left","0px"),NestedPages.jsData.sortable&&!i(this).hasClass("no-sort")?i(this).find(".row-inner").css("padding-left","0px"):i(this).find(".row-inner").css("padding-left","10px"))})},s.setClassicIndent=function(){i.each(i(NestedPages.selectors.lists),function(e,t){var a=i(this).parents(NestedPages.selectors.lists).length,s=0;NestedPages.jsData.sortable||(s=10),0<a?(s=20*a+s,i(this).find(".row-inner").css("padding-left",s+"px")):NestedPages.jsData.sortable&&!i(this).hasClass("no-sort")?i(this).find(".row-inner").css("padding-left","0px"):i(this).find(".row-inner").css("padding-left","10px")})},s.updatePlaceholderWidth=function(e){var t,a;NestedPages.jsData.nestable&&(t=40*i(e.placeholder).parents("ol").length-40,a=i(NestedPages.selectors.sortable).width()-t,i(e.placeholder).width(a).css("margin-left",t+"px")),s.updateListVisibility(e)},s.updateListVisibility=function(e){e=i(e.placeholder).parent("ol");i(e).is(":visible")||(i(e).addClass("nplist"),i(e).show())},s.removeQuickEdit=function(){i(NestedPages.selectors.quickEditOverlay).removeClass("active").remove(),i(".sortable .quick-edit").remove(),i(".row").show()},s.showQuickEdit=function(){i("body").append('<div class="np-inline-overlay"></div>'),setTimeout(function(){i(".np-inline-overlay").addClass("active")},50)},s.flashRow=function(e){i(e).addClass("np-updated"),s.setBorders(),setTimeout(function(){i(e).addClass("np-updated-show")},1500)},s.showAjaxError=function(e){i(NestedPages.selectors.ajaxError).find("p").text(e),i(NestedPages.selectors.ajaxError).show()},s.hideAjaxError=function(e){i(NestedPages.selectors.ajaxError).hide()},s.sizeLinkThumbnails=function(){var e=i(NestedPages.selectors.thumbnailContainer).not(NestedPages.selectors.thumbnailContainerLink).first().find("img"),t=i(e).width(),a=i(e).height();i.each(i(NestedPages.selectors.thumbnailContainerLink),function(){i(this).width(t),i(this).height(a)})}},(NestedPages=NestedPages||{}).Dropdowns=function(){var t=this,a=jQuery;return t.dropdown="",t.activeBtn="",t.activeContent="",t.toggleBtn="[data-dropdown-toggle]",t.dropdownContainer="[data-dropdown]",t.dropdownContent="[data-dropdown-content]",t.selectors={caret_up:"icon-arrow_drop_up",caret_down:"icon-arrow_drop_down"},t.bindEvents=function(){a(document).on("click",t.toggleBtn,function(e){e.preventDefault(),t.activeBtn=a(this),t.dropdown=a(this).parents(t.dropdownContainer),t.toggleDropdown()}),a(document).on("click",function(e){t.closeDropdowns(e.target)}),a(document).on("dropdown-opened",function(e,t){0<a(t).parents(NestedPages.selectors.row).length&&a(t).parents(NestedPages.selectors.row).addClass("active")}),a(document).on("dropdown-closed",function(){a(NestedPages.selectors.row).removeClass("active")})},t.toggleDropdown=function(){a("."+t.selectors.caret_up).attr("class",t.selectors.caret_down);var e=a(t.dropdown).find(t.dropdownContent);if(t.activeContent=e,a(e).hasClass("active"))return a(e).removeClass("active"),a(t.activeBtn).removeClass("active"),a(t.activeBtn).find("."+t.selectors.caret_up).attr("class",t.selectors.caret_down),void a(document).trigger("dropdown-closed",e);t.setPositioning(),a(t.toggleBtn).removeClass("active"),a(t.dropdownContent).removeClass("active"),a(e).addClass("active"),a(t.activeBtn).find("."+t.selectors.caret_down).attr("class",t.selectors.caret_up),a(t.activeBtn).addClass("active"),a(document).trigger("dropdown-opened",e)},t.setPositioning=function(){var e=a(t.activeBtn).outerHeight();a(t.activeContent).css("top",e+"px")},t.closeDropdowns=function(e){0===a(e).parents(t.dropdownContainer).length&&(a(t.dropdownContent).removeClass("active"),a(t.toggleBtn).removeClass("active"),a(t.activeBtn).find("."+t.selectors.caret_up).attr("class",t.selectors.caret_down),a(document).trigger("dropdown-closed",void 0))},t.bindEvents()},(NestedPages=NestedPages||{}).Modals=function(){var a=this,s=jQuery;return a.activeBtn="",a.activeModal="",a.modalOpen=!1,a.selectors={toggleBtn:"[data-nestedpages-modal-toggle]",backdrop:"[data-nestedpages-modal-backdrop]",closeBtn:"[data-nestedpages-modal-close]",title:"data-nestedpages-modal-title",content:"data-nestedpages-modal-content"},a.bindEvents=function(){s(document).on("click",a.selectors.toggleBtn,function(e){e.preventDefault(),a.activeBtn=s(this),a.openModal()}),s(document).on("click",a.selectors.closeBtn,function(e){e.preventDefault(),a.closeModals()}),s(document).on("open-modal-manual",function(e,t){a.activeModal=s('[data-nestedpages-modal="'+t+'"]'),a.openModal()}),s(document).on("close-modal-manual",function(e){a.closeModals()}),s(document).on("click",a.selectors.backdrop,function(e){a.closeModals()}),s(document).ready(function(){a.checkHash()})},a.openModal=function(){var e;a.modalOpen?a.closeModals():(0<s(a.activeBtn).length&&(e=s(a.activeBtn).attr("data-nestedpages-modal-toggle"),a.activeModal=s('*[data-nestedpages-modal="'+e+'"]')),s(a.activeModal).addClass("active"),a.modalOpen=!0,a.populateModal(),s(document).trigger("open-modal",[a.activeBtn,a.activeModal]))},a.closeModals=function(){a.modalOpen=!1,s("[data-nestedpages-modal]").removeClass("active"),a.activeModal="",a.activeBtn=""},a.populateModal=function(){var e=s(a.activeBtn).attr(a.selectors.title);void 0!==e&&""!==e&&s(a.activeModal).find("[data-nestedpages-modal-title]").text(e);e=s(a.activeBtn).attr(a.selectors.content);void 0!==e&&""!==e&&s(a.activeModal).find("[data-nestedpages-modal-content]").html(e)},a.checkHash=function(){var e;window.location.hash&&"#modal"===window.location.hash.substring(0,6)&&(e=window.location.hash.substring(7),a.activeModal=s('*[data-nestedpages-modal="'+e+'"]'),a.openModal())},a.bindEvents()},(NestedPages=NestedPages||{}).CheckAll=function(){var a=this,s=jQuery;return a.activeCheckbox="",a.selectors={checkbox:"[data-np-check-all]"},a.bindEvents=function(){s(document).on("change",a.selectors.checkbox,function(){a.activeCheckbox=s(this),a.toggleCheckboxes()}),s(document).on("change","input[type=checkbox]",function(){a.checkAllStatus(s(this))})},a.init=function(){a.bindEvents()},a.toggleCheckboxes=function(){var t=!!s(a.activeCheckbox).is(":checked"),e=s(a.activeCheckbox).attr("data-np-check-all"),e=s('*[name="'+e+'"]');s.each(e,function(){var e=s(this).parents(NestedPages.selectors.rows);s(this).prop("checked",t),s(e).hasClass("np-hide")&&!s(e).is(":visible")&&s(e).find(NestedPages.selectors.bulkActionsCheckbox).prop("checked",!1)}),a.toggleCheckAll()},a.toggleCheckAll=function(){var e=s(a.activeCheckbox).attr("data-np-check-all"),t=(t=s('*[name="'+e+'"]').length)-s(".np-hide").find(NestedPages.selectors.bulkActionsCheckbox).length+s(".np-hide:visible").find(NestedPages.selectors.bulkActionsCheckbox).length,e=s('*[name="'+e+'"]:checked').length;if(t==e)return s(a.activeCheckbox).prop("checked",!0),void s(a.activeCheckbox).removeClass("check-all-partial");0<e?s(a.activeCheckbox).addClass("check-all-partial"):(s(a.activeCheckbox).attr("checked",!1),s(a.activeCheckbox).removeClass("check-all-partial"))},a.checkAllStatus=function(e){e=s(e).attr("name"),e=s('*[data-np-check-all="'+e+'"]');0!==e.length&&(a.activeCheckbox=s(e)[0],a.toggleCheckAll())},a.init()},(NestedPages=NestedPages||{}).BulkActions=function(){var n=this,o=jQuery;return n.selectedNumber=0,n.selectedLinks=[],n.selectedPosts=[],n.bindEvents=function(){o(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){n.toggleBulkForm()}),o(document).on("submit",NestedPages.selectors.bulkActionsForm,function(e){"edit"===o("select[name=np_bulk_action]").val()&&(e.preventDefault(),n.toggleBulkEdit(!0))}),o(document).on("click",NestedPages.selectors.bulkEditRemoveItem,function(e){e.preventDefault();e=o(this).siblings("input[type=hidden]").val();n.uncheckBulkItem(e)}),o(document).on("click",NestedPages.selectors.bulkEditCancel,function(e){e.preventDefault(),n.uncheckAllBulkItems()})},n.toggleBulkForm=function(){var t=!1,a="",s="";if(n.selectedPosts=[],n.selectedLinks=[],o.each(o(NestedPages.selectors.bulkActionsCheckbox),function(){var e;o(this).is(":checked")&&(e=o(this).parents(NestedPages.selectors.rows),t=!0,o(this).parent("div").hasClass("np-check-all")||o(e).hasClass("post-type-np-redirect")||(a+=o(this).val()+","),o(e).hasClass("post-type-np-redirect")&&(s+=o(this).val()+",",n.selectedLinks.push(o(this).val())),"np-redirect"===o(this).attr("data-np-post-type")||o(this).parent("div").hasClass("np-check-all")||((e=[]).title=o(this).attr("data-np-bulk-checkbox"),e.id=o(this).val(),n.selectedPosts.push(e)))}),n.setBulkEditPosts(),n.toggleEditOption(),n.toggleLinkCountAlert(),t)return o(NestedPages.selectors.bulkActionsForm).show(),o(NestedPages.selectors.bulkActionsIds).val(a),o(NestedPages.selectors.bulkActionRedirectIds).val(s),void n.setSelectedNumber();o(NestedPages.selectors.bulkActionsIds).val(""),o(NestedPages.selectors.bulkActionsForm).hide()},n.setBulkEditPosts=function(){for(var e="",t=0;t<n.selectedPosts.length;t++)e+='<li><a href="#" class="np-remove" data-np-remove-bulk-item>×</a>',e+=n.selectedPosts[t].title,e+='<input type="hidden" name="post_ids[]" value="'+n.selectedPosts[t].id+'"></li>';o(NestedPages.selectors.bulkEditTitles).html(e)},n.uncheckBulkItem=function(e){o.each(o(NestedPages.selectors.bulkActionsCheckbox),function(){o(this).val()==e&&o(this).prop("checked",!1).change()}),0===o(NestedPages.selectors.bulkEditRemoveItem).length&&n.toggleBulkEdit(!1)},n.uncheckAllBulkItems=function(){o.each(o(NestedPages.selectors.bulkActionsCheckbox),function(){o(this).prop("checked",!1).change()}),n.toggleBulkEdit(!1)},n.setSelectedNumber=function(){var e=o(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").length,t=o(NestedPages.selectors.bulkActionsForm).find("select option").first();o(t).text(nestedpages.bulk_actions+" ("+e+")")},n.toggleEditOption=function(){var e=o(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").not(".np-redirect-bulk").length,t=o(NestedPages.selectors.bulkActionsForm).find("select option[value=edit]");if(0===e)return o(t).prop("disabled",!0),o(NestedPages.selectors.bulkActionsForm).find("select option").first().prop("selected",!0),void n.toggleBulkEdit(!1);o(t).prop("disabled",!1)},n.toggleBulkEdit=function(e){if(n.toggleLinkCountAlert(),e)return n.disableParentOptions(),o(NestedPages.selectors.bulkEditForm).show(),o(NestedPages.selectors.bulkActionsForm).hide(),void n.setWPSuggest();o(NestedPages.selectors.bulkEditForm).hide(),o(NestedPages.selectors.bulkActionsForm).show(),o(NestedPages.selectors.bulkEditLinkCount).parent("div").hide(),o(NestedPages.selectors.bulkActionsForm).find("select option").first().text(nestedpages.bulk_actions),n.resetBulkEditFields()},n.toggleLinkCountAlert=function(){0!==n.selectedLinks.length?o(NestedPages.selectors.bulkEditLinkCount).parent("div").show():o(NestedPages.selectors.bulkEditLinkCount).parent("div").hide()},n.disableParentOptions=function(){for(var e=o(NestedPages.selectors.bulkEditForm).find("select[name=post_parent]"),t=0;t<n.selectedPosts.length;t++)o(e).find("option[value="+n.selectedPosts[t].id+"]").attr("disabled",!0)},n.setWPSuggest=function(){var e=o(NestedPages.selectors.bulkEditForm).find("[data-autotag]");o.each(e,function(e,t){var a=o(this).attr("data-taxonomy");o(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})},n.resetBulkEditFields=function(){var e=o(NestedPages.selectors.bulkEditForm).find("select");o.each(e,function(){o(this).find("option").first().prop("selected",!0),o(this).find("option").removeAttr("disabled")});e=o(NestedPages.selectors.bulkEditForm).find(".cat-checklist");o.each(e,function(){o(this).find("input[type=checkbox]").prop("checked",!1)})},n.bindEvents()},(NestedPages=NestedPages||{}).HiddenItemCount=function(){var e=this,a=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){a(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){e.toggleHiddenCount()}),a(document).on("click",NestedPages.selectors.toggleAll,function(){e.toggleHiddenCount()}),a(document).on("click",NestedPages.selectors.pageToggle,function(){e.toggleHiddenCount()})},e.toggleHiddenCount=function(){var t=0;a.each(a(NestedPages.selectors.bulkActionsCheckbox),function(){var e;a(this).is(":checked")&&(a(this).parent("div").hasClass("np-check-all")||(e=a(this).closest(".page-row"),a(e).is(":visible")||t++))}),t<1?a(NestedPages.selectors.hiddenItemCountParent).hide():(a(NestedPages.selectors.hiddenItemCount).text(t),a(NestedPages.selectors.hiddenItemCountParent).show())},e.init()},(NestedPages=NestedPages||{}).MenuToggle=function(){var a=this,n=jQuery;return a.formatter=new NestedPages.Formatter,a.bindEvents=function(){n(document).on("click",NestedPages.selectors.childToggleLink,function(e){e.preventDefault(),a.toggleSingleMenu(n(this))}),n(document).on("click",NestedPages.selectors.toggleAll,function(e){e.preventDefault(),a.toggleAllMenus()})},a.toggleSingleMenu=function(e){var t=n(e).parent(NestedPages.selectors.childToggle).parent(NestedPages.selectors.row).siblings("ol");n(e).toggleClass("open"),n(t).toggle(),a.formatter.setBorders(),a.formatter.setNestedMargins(),a.syncUserToggles()},a.toggleAllMenus=function(){var e=NestedPages.selectors.toggleAll;if("closed"===n(e).attr("data-toggle"))return n(NestedPages.selectors.lists).show(),n(e).attr("data-toggle","opened").text(NestedPages.jsData.collapseText),n(NestedPages.selectors.childToggle+" a").addClass("open"),a.formatter.setBorders(),void a.syncUserToggles();n(NestedPages.selectors.lists).not(n(NestedPages.selectors.lists)[0]).hide(),n(e).attr("data-toggle","closed").text(NestedPages.jsData.expandText),n(NestedPages.selectors.childToggle+" a").removeClass("open"),a.formatter.setBorders(),a.syncUserToggles()},a.visibleRowIDs=function(){var s=[],e=n(NestedPages.selectors.rows+":visible");return n.each(e,function(e,t){var a=n(this).attr("id");s.push(a.replace("menuItem_",""))}),s},a.syncUserToggles=function(){n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncToggles,nonce:NestedPages.jsData.nonce,ids:a.visibleRowIDs(),posttype:NestedPages.jsData.posttype},success:function(e){"success"!==e.status&&console.log("There was an error saving toggled pages.")}})},a.bindEvents()},(NestedPages=NestedPages||{}).PageToggle=function(){var a=this,s=jQuery;return a.activeButton="",a.formatter=new NestedPages.Formatter,a.bindEvents=function(){s(document).on("click",NestedPages.selectors.toggleHidden,function(e){e.preventDefault(),a.activeButton=s(this),a.toggleHidden()}),s(document).on("click",NestedPages.selectors.toggleStatus,function(e){e.preventDefault(),a.toggleStatus(s(this))})},a.toggleHidden=function(){var e=s(a.activeButton),t=s(e).attr("href");if("#show"==t)return s(e).attr("href","#hide").text(NestedPages.jsData.showHiddenText),s(NestedPages.selectors.hiddenRows).removeClass("shown").hide(),a.formatter.updateSubMenuToggle(),void a.formatter.setBorders();"#hide"==t&&(s(e).attr("href","#show").text(NestedPages.jsData.hideHiddenText),s(NestedPages.selectors.hiddenRows).addClass("shown").show(),a.formatter.updateSubMenuToggle(),a.formatter.setBorders())},a.toggleStatus=function(e){var t=(t=s(e).attr("href")).substring(1);s(NestedPages.selectors.syncCheckbox).attr("disabled",!1),s(NestedPages.selectors.toggleStatus).removeClass("active"),s(e).addClass("active"),a.saveStatusPreference(t),"draft"==t&&(s(NestedPages.selectors.syncCheckbox).attr("disabled",!0),s("."+t).addClass("nested-visible")),"all"!=t?(s(NestedPages.selectors.rows).hide(),s("."+t).show()):s(NestedPages.selectors.rows).show()},a.saveStatusPreference=function(e){s.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.toggleStatusDisplay,nonce:NestedPages.jsData.nonce,status:e,post_type:NestedPages.jsData.posttype}})},a.bindEvents()},(NestedPages=NestedPages||{}).Nesting=function(){var n=this,o=jQuery;n.formatter=new NestedPages.Formatter,n.initializeSortable=function(){if(!NestedPages.jsData.nestable)return n.initializeSortableFlat();o(NestedPages.selectors.sortable).not(NestedPages.selectors.notSortable).nestedSortable({items:NestedPages.selectors.rows,toleranceElement:"> .row",handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",tabSize:56,isAllowed:function(e,t,a){return!(o(t).hasClass("post-type-np-redirect")&&!o(a).hasClass("post-type-np-redirect"))},start:function(e,t){t.placeholder.height(t.item.height())},sort:function(e,t){n.formatter.updatePlaceholderWidth(t)},stop:function(e,t){setTimeout(function(){n.formatter.updateSubMenuToggle(),n.formatter.setBorders(),n.formatter.setNestedMargins()},100),n.syncNesting()}})},n.initializeSortableFlat=function(){var e=o(NestedPages.selectors.lists).not(NestedPages.selectors.notSortable);o.each(e,function(){o(this).sortable({items:">"+NestedPages.selectors.rows,handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",forcePlaceholderSize:!0,start:function(e,t){t.placeholder.height(t.item.height())},sort:function(e,t){n.formatter.updatePlaceholderWidth(t)},stop:function(e,t){setTimeout(function(){n.formatter.updateSubMenuToggle(),n.formatter.setBorders(),n.formatter.setNestedMargins()},100),n.syncNesting()}})})},n.disableNesting=function(){o(NestedPages.selectors.sortable).sortable("destroy")},n.syncNesting=function(e,t){var a,s;"1"===nestedpages.manual_order_sync&&!e||(o(NestedPages.selectors.errorDiv).hide(),o(NestedPages.selectors.loadingIndicator).show(),s=!!o(NestedPages.selectors.lists).first().hasClass("filtered"),a=NestedPages.jsData.nestable&&!s?o(NestedPages.selectors.sortable).nestedSortable("toHierarchy",{startDepthCount:0}):n.setNestingArray(),n.disableNesting(),e=NestedPages.jsData.syncmenu,"1"===nestedpages.manual_menu_sync&&(e="nosync"),o.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncNesting,nonce:NestedPages.jsData.nonce,list:a,post_type:NestedPages.jsData.posttype,syncmenu:e,filtered:s},success:function(e,t){n.initializeSortable(),"error"===e.status?(o(NestedPages.selectors.errorDiv).text(e.message).show(),o(NestedPages.selectors.loadingIndicator).hide()):t&&"function"==typeof t?t():o(NestedPages.selectors.loadingIndicator).hide()}}))},n.setNestingArray=function(e){return ret=[],o(NestedPages.selectors.lists).first().children("li.page-row").each(function(){var e=n.recursiveNesting(this);ret.push(e)}),ret},n.recursiveNesting=function(e){var t,a=o(e).attr("id");if(a)return a=a.replace("menuItem_",""),t={id:a},0<o(e).children(NestedPages.selectors.lists).children(NestedPages.selectors.rows).length&&(t.children=[],o(e).children(NestedPages.selectors.lists).children(NestedPages.selectors.rows).each(function(){var e=n.recursiveNesting(this);t.children.push(e)})),t}},(NestedPages=NestedPages||{}).SyncMenuSetting=function(){var t=this,e=jQuery;return t.formatter=new NestedPages.Formatter,t.init=function(){t.bindEvents()},t.bindEvents=function(){e(document).ready(function(){"1"!==nestedpages.manual_menu_sync&&"1"===nestedpages.syncmenu&&t.syncSetting()}),e(document).on("change",NestedPages.selectors.syncCheckbox,function(){t.syncSetting()})},t.syncSetting=function(){"page"===NestedPages.jsData.posttype&&0!==e(NestedPages.selectors.syncCheckbox).length&&(NestedPages.jsData.syncmenu=e(NestedPages.selectors.syncCheckbox).is(":checked")?"sync":"nosync",e.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncMenu,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:NestedPages.jsData.syncmenu},success:function(e){"error"===e.status&&t.formatter.showAjaxError(e.message)},error:function(e){console.log(e)}}))},t.bindEvents()},(NestedPages=NestedPages||{}).NewPost=function(){var r=this,d=jQuery;return r.formatter=new NestedPages.Formatter,r.parent_id=0,r.posts="",r.form="",r.bindEvents=function(){d(document).on("open-modal",function(e,t,a){t=d(t).attr("data-nestedpages-modal-toggle");void 0!==t&&"np-bulk-modal"==t&&r.openModal()}),d(document).on("submit",NestedPages.selectors.newPageForm,function(e){e.preventDefault()}),d(document).on("click",NestedPages.selectors.newPageSubmitButton,function(e){e.preventDefault(),r.submitForm(d(this))}),d(document).on("click",NestedPages.selectors.newPageTitle,function(e){e.preventDefault(),r.addTitleField(d(this))}),d(document).on("click",NestedPages.selectors.newPageRemoveTitle,function(e){e.preventDefault(),r.removeTitleField(d(this))}),d(document).on("click",NestedPages.selectors.addChildButton,function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("click",NestedPages.selectors.cancelNewChildButton,function(e){e.preventDefault(),r.cancelNewPage()}),d(document).on("click","["+NestedPages.selectors.newBeforeButton+"]",function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("click","["+NestedPages.selectors.newAfterButton+"]",function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("keydown",function(e){27===e.keyCode&&(r.cancelNewPage(),d(document).click())})},r.openModal=function(){var e=d(NestedPages.selectors.newPageFormContainer).clone().find(NestedPages.selectors.newPageForm);d(e).addClass("in-modal"),d(NestedPages.selectors.newPageModal).find(".modal-body").html(e),d(NestedPages.selectors.newPageModal).find("h3").text(nestedpages.add_multiple),d(NestedPages.selectors.newPageModal).find(".page_parent_id").val(r.parent_id),d(e).find(".np_title").first().focus(),d(e).find(NestedPages.selectors.newPageTitle).first().prop("tabindex","2")},r.openQuickEdit=function(e){var t,a=void 0!==(a=d(e).attr(NestedPages.selectors.newBeforeButton))&&""!==a&&a,s=void 0!==(s=d(e).attr(NestedPages.selectors.newAfterButton))&&""!==s&&s,n=d(e).closest(NestedPages.selectors.row).parent("li"),o=d(NestedPages.selectors.newPageFormContainer).clone();0<d(n).children("ol").length?(t=d(n).children("ol"),d(o).insertBefore(t)):d(o).appendTo(n),d(o).siblings(NestedPages.selectors.row).hide(),r.formatter.showQuickEdit(),d(o).find(".parent_name").html("<em>Parent:</em> "+d(e).attr("data-parentname")),a||s||d(o).find(".page_parent_id").val(d(e).attr("data-id")),a&&(d(o).find(".page_before_id").val(a),d(o).find("[data-new-post-relation-title]").text(nestedpages.insert_before+": "+d(e).attr("data-parentname"))),s&&(d(o).find(".page_after_id").val(s),d(o).find("[data-new-post-relation-title]").text(nestedpages.insert_after+": "+d(e).attr("data-parentname"))),d(o).show(),d(o).find(".np_title").focus(),d(o).find(NestedPages.selectors.newPageTitle).prop("tabindex","2")},r.cancelNewPage=function(){r.formatter.removeQuickEdit(),d(NestedPages.selectors.newChildError).hide(),d(NestedPages.selectors.newPageModal).find(".modal-body").empty(),d(NestedPages.selectors.sortable).find(".new-child").remove(),d(NestedPages.selectors.row).show()},r.addTitleField=function(e){var t=d(e).parents("form"),a=d(e).siblings(".new-page-titles").children("li").length+1,s='<li><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg><div class="form-control new-child-row"><label>'+NestedPages.jsData.titleText+'</label><div><input type="text" name="post_title[]" class="np_title" placeholder="'+NestedPages.jsData.titleText+'" value="" tabindex="'+a+'" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';d(e).siblings(".new-page-titles").append(s);d(t).find(".np_title").last().focus(),d(t).find(NestedPages.selectors.newPageTitle).prop("tabindex",+a),d(".new-page-titles").sortable({items:"li",handle:".handle"}),r.toggleAddEditButton(t)},r.removeTitleField=function(e){var t=d(e).parents("form");d(e).parents(".new-child-row").parent("li").remove(),r.toggleAddEditButton(t)},r.submitForm=function(e){r.toggleLoading(!0),r.form=d(e).parents("form");var t=!!d(e).hasClass("add-edit"),e=NestedPages.formActions.newPage;""!==d(r.form).find(".page_before_id").val()&&(e=NestedPages.formActions.newBeforeAfter),""!==d(r.form).find(".page_after_id").val()&&(e=NestedPages.formActions.newBeforeAfter),d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:d(r.form).serialize()+"&action="+e+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){if("error"===e.status)return r.toggleLoading(!1),void d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show();!0!=t?(r.toggleLoading(!1),r.posts=e.new_pages,r.addPosts()):(e=(e=e.new_pages[0].edit_link).replace(/&/g,"&"),window.location.replace(e))},error:function(e){console.log(e),r.toggleLoading(!1),d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},r.addPosts=function(){var e,t=""!==(t=d(r.form).find(".page_before_id").val())&&t,a=""!==(a=d(r.form).find(".page_after_id").val())&&a,s=d(r.form).parent(".new-child").parent(".page-row");for(0!==d(s).children("ol").length||t||a||d(s).append('<ol class="nplist"></ol>'),e=d(r.form).hasClass("in-modal")?d(".nplist.sortable li.page-row:first"):d(s).children("ol"),i=0;i<r.posts.length;i++)r.appendRows(e,r.posts[i],t,a);t||a||d(e).show(),r.formatter.updateSubMenuToggle(),r.formatter.setNestedMargins(),r.cancelNewPage(),d(document).trigger("close-modal-manual")},r.appendRows=function(e,t,a,s){var n,o='<li id="menuItem_'+t.id+'" class="page-row';"publish"===t.status&&(o+=" published"),o+='">',NestedPages.jsData.hierarchical?(o+='<div class="row">',o+='<div class="child-toggle"></div>'):(o+='<div class="row non-hierarchical">',o+='<div class="non-hierarchical-spacer"></div>'),o+='<div class="row-inner">',o+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg>',o+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>',o+='<a href="'+t.edit_link+'" class="page-link page-title">',o+='<span class="title">'+t.title+"</span>","Publish"!==t.status?o+='<span class="status">('+t.status+")</span>":o+='<span class="status"></span>',o+='<span class="nav-status">',"hide"===t.np_nav_status&&(o+=" "+nestedpages.hidden),o+="</span>",o+='<span class="edit-indicator">Edit</span>',o+="</a>",NestedPages.jsData.hierarchical||(o+='<div class="np-post-columns">',o+='<ul class="np-post-info">',o+='<li><span class="np-author-display">'+t.author_formatted+"</span></li>",o+="<li>"+t.date_formatted+"</li>",o+="</ul>",o+="</div>"),d(".nplist").first().hasClass("has-yoast")&&(o+='<span class="np-seo-indicator na"></span>'),o+='<div class="action-buttons">',o+='<div class="nestedpages-dropdown" data-dropdown><a href="#" class="np-btn has-icon toggle" data-dropdown-toggle><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></a><ul class="nestedpages-dropdown-content" data-dropdown-content>',o+='<li><a href="#" class="open-redirect-modal" data-parentid="'+t.id+'"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>'+nestedpages.add_link+"</a></li>",o+='<li><a href="#" class="add-new-child" data-id="'+t.id+'" data-parentname="'+t.title+'"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'+nestedpages.add_child_short+"</a></li>",o+="</ul></div>",o+='<a href="#" class="np-btn np-quick-edit" data-id="'+t.id+'" data-template="'+t.page_template+'" data-title="'+t.title+'" data-slug="'+t.slug+'" data-commentstatus="closed" data-status="'+t.status.toLowerCase()+'" data-np-status="show"\tdata-navstatus="show" data-author="'+t.author+'" data-template="'+t.template+'" data-month="'+t.month+'" data-day="'+t.day+'" data-year="'+t.year+'" data-hour="'+t.hour+'" data-minute="'+t.minute+'" data-datepicker="'+t.datepicker+'" data-time="'+t.time+'" data-formattedtime="'+t.formattedtime+'" data-ampm="'+t.ampm+'">'+nestedpages.quick_edit+"</a>",o+='<a href="'+t.view_link+'" class="np-btn" target="_blank">'+nestedpages.view+"</a>",o+='<a href="'+t.delete_link+'" class="np-btn np-btn-trash"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-remove"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" class="icon"/><path d="M0 0h24v24H0z" fill="none"/></svg></a>',o+="</div>\x3c!-- .action-buttons --\x3e",o+="</div>\x3c!-- .row-inner --\x3e</div>\x3c!-- .row --\x3e",o+="</li>",a?(n=r.findRowById(a),d(o).insertBefore(n)):s?(n=r.findRowById(s),d(o).insertAfter(n)):d(e).append(o)},r.findRowById=function(e){return d(NestedPages.selectors.rows+"#menuItem_"+e)},r.toggleAddEditButton=function(e){e=d(e).find(".np_title").length;e<1?d(NestedPages.selectors.newPageSubmitButton).hide():(d(NestedPages.selectors.newPageSubmitButton).show(),1<e?d(NestedPages.selectors.newPageSubmitButton+".add-edit").hide():d(NestedPages.selectors.newPageSubmitButton+".add-edit").show())},r.toggleLoading=function(e){if(e)return d(NestedPages.selectors.quickEditErrorDiv).hide(),d(NestedPages.selectors.newPageSubmitButton).attr("disabled","disabled"),void d(NestedPages.selectors.quickEditLoadingIndicator).show();d(NestedPages.selectors.newPageSubmitButton).attr("disabled",!1),d(NestedPages.selectors.quickEditLoadingIndicator).hide()},r.bindEvents()},(NestedPages=NestedPages||{}).QuickEditPost=function(){var r=this,d=jQuery;return r.formatter=new NestedPages.Formatter,r.button="",r.initialData="",r.parent_li="",r.form="",r.flatTerms="",r.termNames="",r.saveButton="",r.newData="",r.row="",r.bindEvents=function(){d(document).on("click",NestedPages.selectors.quickEditOpen,function(e){e.preventDefault(),r.button=d(this),r.openForm()}),d(document).on("click",NestedPages.selectors.quickEditCancel,function(e){e.preventDefault(),r.formatter.removeQuickEdit()}),d(document).on("change",".keep_private",function(){this.checked?d(".post_password").val("").prop("readonly",!0):d(".post_password").prop("readonly",!1)}),d(document).on("click",NestedPages.selectors.quickEditSaveButton,function(e){e.preventDefault(),r.saveButton=d(this),r.save()}),d(document).on("keydown",function(e){27===e.keyCode&&r.formatter.removeQuickEdit()})},r.openForm=function(){r.setInitialData(),r.createForm(),r.populateForm(),r.populateFlatTaxonomies()},r.setInitialData=function(){r.initialData={id:d(r.button).attr("data-id"),title:d(r.button).attr("data-title"),slug:d(r.button).attr("data-slug"),author:d(r.button).attr("data-author"),cs:d(r.button).attr("data-commentstatus"),status:d(r.button).attr("data-status"),template:d(r.button).attr("data-template"),month:d(r.button).attr("data-month"),day:d(r.button).attr("data-day"),year:d(r.button).attr("data-year"),hour:d(r.button).attr("data-hour"),minute:d(r.button).attr("data-minute"),navstatus:d(r.button).attr("data-navstatus"),navCustomUrl:d(r.button).attr("data-custom-url"),npstatus:d(r.button).attr("data-np-status"),navtitle:d(r.button).attr("data-navtitle"),navtitleattr:d(r.button).attr("data-navtitleattr"),navcss:d(r.button).attr("data-navcss"),linktarget:d(r.button).attr("data-linktarget"),password:d(r.button).attr("data-password"),datepicker:d(r.button).attr("data-datepicker"),time:d(r.button).attr("data-formattedtime"),timeTwentyFour:d(r.button).attr("data-time"),ampm:d(r.button).attr("data-ampm"),timeFormat:d(r.button).attr("data-timeformat"),sticky:d(r.button).attr("data-sticky")};var e=d(r.button)[0].attributes;d.each(e,function(e,t){t.name.includes("data-npcustom")&&(r.initialData[t.name]=t.value)}),r.initialData.h_taxonomies=[],r.initialData.f_taxonomies=[],r.parent_li=d(r.button).closest(NestedPages.selectors.row).parent("li");var t=d(r.parent_li).attr("class").split(/\s+/);for(i=0;i<t.length;i++)"in-"===t[i].substring(0,3)&&r.initialData.h_taxonomies.push(t[i]),"inf-"===t[i].substring(0,4)&&r.initialData.f_taxonomies.push(t[i])},r.createForm=function(){var e;r.form=d(NestedPages.selectors.quickEditPostForm).clone(),0<d(r.parent_li).children("ol").length?(e=d(r.parent_li).children("ol"),d(r.form).insertBefore(e)):d(r.form).appendTo(r.parent_li),d(r.form).siblings(NestedPages.selectors.row).hide(),d(r.form).show()},r.populateForm=function(){for(var e in d(r.form).find(".page_id").html("<em>ID:</em> "+r.initialData.id),d(r.form).find(".np_id").val(r.initialData.id),d(r.form).find(".np_title").val(r.initialData.title),d(r.form).find(".np_slug").val(r.initialData.slug),d(r.form).find(".np_author select").val(r.initialData.author),d(r.form).find(".np_status").val(r.initialData.status),d(r.form).find(".np_nav_title").val(r.initialData.navtitle),d(r.form).find(".np_nav_css_classes").val(r.initialData.navcss),d(r.form).find(".np_title_attribute").val(r.initialData.navtitleattr),d(r.form).find(".np_nav_custom_url").val(r.initialData.navCustomUrl),d(r.form).find(".post_password").val(r.initialData.password),d(r.form).find(".np_publish_date").val(r.initialData.datepicker),"open"===r.initialData.cs&&d(r.form).find(".np_cs").attr("checked","checked"),""!==r.initialData.template?d(r.form).find(".np_template").val(r.initialData.template):d(r.form).find(".np_template").val("default"),"private"===r.initialData.status&&(d(r.form).find(".post_password").attr("readonly",!0),d(r.form).find(".keep_private").attr("checked",!0)),"hide"===r.initialData.npstatus?d(r.form).find(".nested_pages_status").attr("checked","checked"):d(r.form).find(".nested_pages_status").removeAttr("checked"),"hide"===r.initialData.navstatus?d(r.form).find(".np_nav_status").attr("checked","checked"):d(r.form).find(".np_nav_status").attr("checked",!1),"_blank"===r.initialData.linktarget?d(r.form).find(".link_target").attr("checked","checked"):d(r.form).find(".link_target").attr("checked",!1),"private"===r.initialData.status&&d(r.form).find(".np_status").val("publish"),"sticky"===r.initialData.sticky?d(r.form).find(".np-sticky").attr("checked","checked"):d(r.form).find(".np-sticky").removeAttr("checked"),"H:i"===r.initialData.timeFormat?d(r.form).find(".np_time").val(r.initialData.timeTwentyFour):(d(r.form).find(".np_time").val(r.initialData.time),d(r.form).find(".np_ampm").val(r.initialData.ampm),d(r.form).find('select[name="mm"]').val(r.initialData.month),d(r.form).find('input[name="jj"]').val(r.initialData.day),d(r.form).find('input[name="aa"]').val(r.initialData.year),d(r.form).find('input[name="hh"]').val(r.initialData.hour),d(r.form).find('input[name="mn"]').val(r.initialData.minute)),r.initialData){var t;e.includes("npcustom")&&r.initialData.hasOwnProperty(e)&&(t=(t=e.replace("data-npcustom-","")).toLowerCase(),d(r.form).find('[data-np-custom-field="'+t+'"]').val(r.initialData[e]))}if(r.populateFlatTaxonomies(),r.initialData.hasOwnProperty("h_taxonomies")){var a=r.initialData.h_taxonomies;for(i=0;i<a.length;i++){var s="#"+a[i];d(r.form).find(s).attr("checked","checked")}}var n=d(r.form).find(".np_datepicker");d.each(n,function(){var e=d(this);e.datepicker({dateFormat:e.attr("data-datepicker-format"),beforeShow:function(e,t){d("#ui-datepicker-div").addClass("nestedpages-datepicker")}})}),r.formatter.showQuickEdit(),d(r.form).show()},r.populateFlatTaxonomies=function(){r.initialData.hasOwnProperty("f_taxonomies")&&(r.createTaxonomyObject(),r.getTermNames(),r.setWPSuggest())},r.createTaxonomyObject=function(){var e={};for(i=0;i<r.initialData.f_taxonomies.length;i++){var t=r.initialData.f_taxonomies[i],a=t.split("-"),s=a.indexOf("nps"),a=(a=a.splice(s+1)).join("-"),s=t.split("-").splice(0,s);s.shift("inf");s=s.join("-");s in e||(e[s]=[]),e[s].push(a)}r.flatTerms=e},r.getTermNames=function(){d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.getTaxonomies,nonce:NestedPages.jsData.nonce,terms:r.flatTerms},success:function(e){r.termNames=e.terms,r.populateFlatTaxonomyFields()}})},r.populateFlatTaxonomyFields=function(){r.termNames&&d.each(r.termNames,function(e,t){e=d("#"+e+"-quickedit");d(e).val(t.join(","))})},r.setWPSuggest=function(){var e=d(r.form).find("[data-autotag]");d.each(e,function(e,t){var a=d(this).attr("data-taxonomy");d(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})},r.save=function(){r.toggleLoading(!0),d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:d(r.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditPost+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){"error"===e.status?(r.toggleLoading(!1),d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show()):(r.toggleLoading(!1),r.newData=e.post_data,r.updatePostRow())},error:function(e){console.log(e)}})},r.updatePostRow=function(){r.row=d(r.button).parents(".row-inner"),d(r.row).find(".title").text(r.newData.post_title),d(r.row).find(".np-view-button").attr("href",r.newData.permalink);var e,t=d(r.row).find(".status");"publish"!==r.newData._status&&"future"!==r.newData._status?(e=nestedpages.post_statuses[r.newData._status].label,d(t).text("("+e+")")):d(t).text(""),"private"===r.newData.keep_private&&d(t).text(nestedpages.private),""!==r.newData.post_password&&void 0!==r.newData.post_password&&(a=d(t).text(),a+=' <span class="locked">',a+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>',a+="</span>",d(t).html(a));var a=d(r.row).find(".nav-status");"hide"==r.newData.nav_status?d(a).text("(Hidden)"):d(a).text("");a=d(r.row).parent("li");"hide"==r.newData.np_status?(d(a).addClass("np-hide"),d(r.row).find(".status").after('<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>')):(d(a).removeClass("np-hide"),d(r.row).find(".status-np-hidden").remove());a=d(r.row).find(".sticky");"sticky"==r.newData.sticky?d(a).show():d(a).hide(),NestedPages.jsData.hierarchical||d(r.row).find(".np-author-display").text(r.newData.author_name);var s,n,o=d(r.row).find(NestedPages.selectors.quickEditOpen);for(s in d(o).attr("data-id",r.newData.post_id),d(o).attr("data-template",r.newData.page_template),d(o).attr("data-title",r.newData.post_title),d(o).attr("data-slug",r.newData.post_name),d(o).attr("data-commentstatus",r.newData.comment_status),d(o).attr("data-status",r.newData._status),d(o).attr("data-sticky",r.newData.sticky),"private"===r.newData.keep_private&&d(o).attr("data-status","private"),d(o).attr("data-author",r.newData.post_author),d(o).attr("data-np-status",r.newData.np_status),d(o).attr("data-password",r.newData.post_password),d(o).attr("data-navstatus",r.newData.nav_status),d(o).attr("data-navtitle",r.newData.np_nav_title),d(o).attr("data-linktarget",r.newData.link_target),d(o).attr("data-navtitleattr",r.newData.np_title_attribute),d(o).attr("data-navcss",r.newData.np_nav_css_classes),d(o).attr("data-month",r.newData.mm),d(o).attr("data-day",r.newData.jj),d(o).attr("data-year",r.newData.aa),d(o).attr("data-hour",r.newData.hh),d(o).attr("data-minute",r.newData.mn),d(o).attr("data-datepicker",r.newData.np_date),d(o).attr("data-time",r.newData.np_time),d(o).attr("data-formattedtime",r.newData.np_time),d(o).attr("data-ampm",r.newData.np_ampm),r.newData)s.includes("np_custom")&&r.newData.hasOwnProperty(s)&&(n=s.replace("np_custom_","data-npcustom-"),d(o).attr(n,r.newData[s]));r.removeTaxonomyClasses(),r.addCategoryClasses(),r.addHierarchicalClasses(),r.addFlatClasses(),r.addStatusClass(),r.formatter.removeQuickEdit(),r.formatter.flashRow(r.row)},r.addStatusClass=function(){var e=["published","draft","pending","future"];for(i=0;i<e.length;i++)d(r.row).removeClass(e[i]);d(r.row).addClass(r.newData._status)},r.removeTaxonomyClasses=function(){taxonomies=[];var e=d(r.row).attr("class").split(/\s+/);for(i=0;i<e.length;i++)"in-"===e[i].substring(0,3)&&d(r.row).removeClass(e[i]),"inf-"===e[i].substring(0,4)&&d(r.row).removeClass(e[i])},r.addCategoryClasses=function(){if(r.newData.hasOwnProperty("post_category")){var e=r.newData.post_category;for(i=0;i<e.length;i++){var t="in-category-"+e[i];d(r.row).addClass(t)}}},r.addHierarchicalClasses=function(){var e;r.newData.hasOwnProperty("tax_input")&&(e=r.newData.tax_input,d.each(e,function(e,t){for(i=0;i<t.length;i++){var a="in-"+e+"-"+t[i];d(r.row).addClass(a)}}))},r.addFlatClasses=function(){var e;r.newData.hasOwnProperty("flat_tax")&&(e=r.newData.flat_tax,d.each(e,function(e,t){for(i=0;i<t.length;i++){var a="inf-"+e+"-nps-"+t[i];d(r.row).addClass(a)}}))},r.toggleLoading=function(e){if(e)return d(NestedPages.selectors.quickEditErrorDiv).hide(),d(r.saveButton).attr("disabled","disabled"),void d(NestedPages.selectors.quickEditLoadingIndicator).show();d(r.saveButton).attr("disabled",!1),d(NestedPages.selectors.quickEditLoadingIndicator).hide()},r.bindEvents()},(NestedPages=NestedPages||{}).QuickEditLink=function(){var a=this,s=jQuery;return a.formatter=new NestedPages.Formatter,a.button="",a.postData="",a.newPostData="",a.form="",a.bindEvents=function(){s(document).on("click",NestedPages.selectors.quickEditButtonLink,function(e){e.preventDefault(),a.formatter.removeQuickEdit(),a.button=s(this),a.openQuickEdit()}),s(document).on("click",NestedPages.selectors.quickEditLinkSaveButton,function(e){e.preventDefault(),a.submitForm()}),s(document).on("keydown",function(e){27===e.keyCode&&a.formatter.removeQuickEdit()})},a.openQuickEdit=function(){a.setData(),a.createForm(),a.populateForm()},a.setData=function(){a.postData={id:s(a.button).attr("data-id"),url:s(a.button).attr("data-url"),title:s(a.button).attr("data-title"),status:s(a.button).attr("data-status"),navstatus:s(a.button).attr("data-navstatus"),npstatus:s(a.button).attr("data-np-status"),linktarget:s(a.button).attr("data-linktarget"),parentid:s(a.button).attr("data-parentid"),navtitleattr:s(a.button).attr("data-navtitleattr"),navcss:s(a.button).attr("data-navcss"),navtype:s(a.button).attr("data-nav-type"),navobject:s(a.button).attr("data-nav-object"),navobjectid:s(a.button).attr("data-nav-object-id"),navoriginallink:s(a.button).attr("data-nav-original-link"),navoriginaltitle:s(a.button).attr("data-nav-original-title")}},a.createForm=function(){var e,t=s(a.button).closest(NestedPages.selectors.row).parent("li");a.form=s(NestedPages.selectors.quickEditLinkForm).clone(),0<s(t).children("ol").length?(e=s(t).children("ol"),s(a.form).insertBefore(e)):s(a.form).appendTo(t);s(a.form).siblings(NestedPages.selectors.row).hide()},a.populateForm=function(){var e;s(a.form).find(".np_id").val(a.postData.id),s(a.form).find(".np_title").val(a.postData.title),s(a.form).find(".np_author select").val(a.postData.author),s(a.form).find(".np_status").val(a.postData.status),s(a.form).find(".np_content").val(a.postData.url),s(a.form).find(".np_parent_id").val(a.postData.parentid),s(a.form).find(".np_title_attribute").val(a.postData.navtitleattr),s(a.form).find(".np_nav_css_classes").val(a.postData.navcss),"hide"===a.postData.npstatus?s(a.form).find(".np_status").prop("checked","checked"):s(a.form).find(".np_status").removeAttr("checked"),"hide"===a.postData.navstatus?s(a.form).find(".np_nav_status").prop("checked","checked"):s(a.form).find(".np_nav_status").removeAttr("checked"),"_blank"===a.postData.linktarget?s(a.form).find(".link_target").prop("checked","checked"):s(a.form).find(".link_target").removeAttr("checked"),"custom"!==a.postData.navobject&&""!==a.postData.navobject?(e='<div class="form-control original-link">Original: <a href="'+a.postData.navoriginallink+'" target="_blank">'+a.postData.navoriginaltitle+"</a></div>",s(a.form).find("[data-url-field]").remove(),s(e).insertAfter(s(a.form).find("h3")),s(a.form).find("[data-np-menu-object-input]").val(a.postData.navobject),s(a.form).find("[data-np-menu-objectid-input]").val(a.postData.navobjectid),s(a.form).find("[data-np-menu-type-input]").val(a.postData.navtype),s(a.form).find("h3").text("Link: "+a.postData.navoriginaltitle)):(s(a.form).find("h3").text("Link"),s(a.form).find("[data-np-menu-object-input]").val("custom"),s(a.form).find("[data-np-menu-type-input]").val("custom")),a.formatter.showQuickEdit(),s(a.form).show()},a.submitForm=function(){a.toggleLoading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:s(a.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditLink+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){"error"===e.status?(a.toggleLoading(!1),s(a.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show()):(a.toggleLoading(!1),a.newPostData=e.post_data,a.updateRow())},error:function(e){a.toggleLoading(!1),s(a.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},a.updateRow=function(){var e=s(a.form).siblings(".row");s(e).find(".title").html(a.newPostData.post_title+' <svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>');var t=s(e).find(".status");"publish"!==a.newPostData._status&&"future"!==a.newPostData._status?s(t).text("("+a.newPostData._status+")"):s(t).text("");t=s(e).find(".nav-status");"hide"==a.newPostData.nav_status?s(t).text("("+NestedPages.jsData.hiddenText+")"):s(t).text("");t=s(e).parent("li");"hide"==a.newPostData.np_status?(s(t).addClass("np-hide"),s(e).find(".status").after('<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>')):(s(t).removeClass("np-hide"),s(e).find(".status-np-hidden").remove());t=s(e).find(NestedPages.selectors.quickEditButtonLink);s(t).attr("data-id",a.newPostData.post_id),s(t).attr("data-title",a.newPostData.post_title),s(t).attr("data-url",a.newPostData.post_content),s(t).attr("data-status",a.newPostData._status),s(t).attr("data-navstatus",a.newPostData.nav_status),s(t).attr("data-np-status",a.newPostData.np_status),s(t).attr("data-linkTarget",a.newPostData.linkTarget),s(t).attr("data-navtitleattr",a.newPostData.titleAttribute),s(t).attr("data-navcss",a.newPostData.cssClasses),a.formatter.removeQuickEdit(),a.formatter.flashRow(e)},a.toggleLoading=function(e){if(s(".row").removeClass("np-updated").removeClass("np-updated-show"),e)return s(NestedPages.selectors.quickEditErrorDiv).hide(),s(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled","disabled"),void s(NestedPages.selectors.quickEditLoadingIndicator).show();s(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled",!1),s(NestedPages.selectors.quickEditLoadingIndicator).hide()},a.bindEvents()},(NestedPages=NestedPages||{}).Clone=function(){var t=this,a=jQuery;return t.parent_id="",t.parent_title="",t.parentLi=null,t.formatter=new NestedPages.Formatter,t.bindEvents=function(){a(document).on("click",NestedPages.selectors.cloneButton,function(e){e.preventDefault(),t.parent_id=a(this).attr("data-id"),t.parent_title=a(this).attr("data-parentname"),t.parentLi=a(this).parent(".row").parent(".page-row").parent(".npList"),t.openModal()}),a(document).on("click",NestedPages.selectors.confirmClone,function(e){e.preventDefault(),t.clone()})},t.openModal=function(){a("#"+NestedPages.selectors.cloneModal).find("[data-clone-parent]").text(t.parent_title),a(document).trigger("open-modal-manual",NestedPages.selectors.cloneModal)},t.clone=function(){t.toggleLoading(!0),a.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.clonePost,parent_id:t.parent_id,quantity:a(NestedPages.selectors.cloneQuantity).val(),status:a(NestedPages.selectors.cloneStatus).val(),author:a(NestedPages.selectors.cloneAuthor).find("select").val(),nonce:NestedPages.jsData.nonce,posttype:NestedPages.jsData.posttype},success:function(e){t.toggleLoading(!1),a(document).trigger("close-modal-manual"),location.reload()}})},t.toggleLoading=function(e){if(e)return a("#"+NestedPages.selectors.cloneModal).find("[data-clone-loading]").show(),void a(NestedPages.selectors.confirmClone).attr("disabled","disabled");a("#"+NestedPages.selectors.cloneModal).find("[data-clone-loading]").hide(),a(NestedPages.selectors.confirmClone).attr("disabled",!1)},t.bindEvents()},(NestedPages=NestedPages||{}).Tabs=function(){var r=this,d=jQuery;return r.selectors={tabToggle:"data-np-tab-toggle",tabPane:"data-np-tab-pane",tabGroup:"data-np-tab-group"},r.bindEvents=function(){d(document).on("click","["+r.selectors.tabToggle+"]",function(e){e.preventDefault(),r.toggleTabs(d(this))})},r.toggleTabs=function(e){for(var t=d(e).attr(r.selectors.tabGroup),a=d("*["+r.selectors.tabGroup+"="+t+"]["+r.selectors.tabPane+"]"),s=d(e).attr(r.selectors.tabToggle),n=d("*["+r.selectors.tabGroup+"="+t+"]["+r.selectors.tabToggle+"]"),o=[],i=0;i<n.length;i++)o[i]=d(n[i]).parent("li")[0];d(a).hide(),d(n).removeClass("active"),d(o).removeClass("active"),d.each(a,function(){d(this).attr(r.selectors.tabPane)==s&&d(this).show()}),d.each(n,function(){d(this).attr(r.selectors.tabToggle)==s&&(d(this).addClass("active"),d(this).parent("li").addClass("active"))}),d(document).trigger("tabs-changed",[s,t,e])},r.bindEvents()},jQuery(document).ready(function(){new NestedPages.Factory}),(NestedPages=NestedPages||{}).selectors={childToggle:".child-toggle",childToggleLink:".child-toggle a",toggleAll:".nestedpages-toggleall",toggleHidden:".np-toggle-hidden",toggleStatus:".np-toggle-publish",lists:".nplist",rows:".page-row",row:".row",sortable:".sortable",notSortable:".no-sort",handle:".handle",published:".published",hiddenRows:".np-hide",errorDiv:"#np-error",loadingIndicator:"#nested-loading",syncCheckbox:".np-sync-menu",syncForm:".np-sync-menu-cont",ajaxError:"[data-nestedpages-error]",trashWithChildrenButton:"[data-nestedpages-trash-children]",toggleEditButtons:".np-toggle-edit",bulkActionsHeader:".nestedpages-list-header",bulkActionsForm:"[data-np-bulk-form]",bulkActionsCheckbox:"[data-np-bulk-checkbox]",bulkActionsIds:"[data-np-bulk-ids]",bulkActionRedirectIds:"[data-np-bulk-redirect-ids]",hiddenItemCount:"[data-np-hidden-count]",hiddenItemCountParent:"[data-np-hidden-count-parent]",bulkEditForm:"[data-np-bulk-edit-form]",bulkEditTitles:"[data-np-bulk-titles]",bulkEditRemoveItem:"[data-np-remove-bulk-item]",bulkEditCancel:"[data-np-cancel-bulk-edit]",bulkEditLinkCount:"[data-bulk-edit-link-count]",quickEditOverlay:".np-inline-overlay",quickEditLoadingIndicator:".np-qe-loading",quickEditErrorDiv:".np-quickedit-error",quickEditCancel:".np-cancel-quickedit",quickEditButtonLink:".np-quick-edit-redirect",quickEditLinkForm:".quick-edit-form-redirect",quickEditLinkSaveButton:".np-save-quickedit-redirect",quickEditOpen:".np-quick-edit",quickEditPostForm:".quick-edit-form",quickEditSaveButton:".np-save-quickedit",openLinkModal:".open-redirect-modal",linkModal:"np-link-modal",saveLink:".np-save-link",linkLoadingIndicator:".np-link-loading",linkErrorDiv:".np-new-link-error",linkForm:".np-new-link-form",linkDeleteButton:"[data-np-confirm-delete]",linkDeleteConfirmationButton:"[data-delete-confirmation]",linkDeleteConfirmationModal:"np-delete-confirmation-modal",linkDeleteConfirmationModalText:"[data-np-link-delete-text]",openPageModal:".open-bulk-modal",newPageModal:"#np-bulk-modal",newPageFormContainer:".new-child-form",newPageForm:".np-new-child-form",newPageSubmitButton:".np-save-newchild",newPageTitle:".add-new-child-row",newPageRemoveTitle:".np-remove-child",addChildButton:".add-new-child",newChildError:".np-newchild-error",cancelNewChildButton:".np-cancel-newchild",newBeforeButton:"data-insert-before",newAfterButton:"data-insert-after",cloneButton:".clone-post",confirmClone:"[data-confirm-clone]",cloneModal:"np-clone-modal",cloneQuantity:"[data-clone-quantity]",cloneStatus:"[data-clone-status]",cloneAuthor:"[data-clone-author]",tabButtonParent:"[data-np-tabs]",tabButton:"[data-np-tab]",tabContent:"[data-np-tab-pane]",thumbnailContainer:".np-thumbnail",thumbnailContainerLink:".np-thumbnail.link",manualMenuSync:"[data-np-manual-menu-sync]",manualOrderSync:"[data-np-manual-order-sync]"},NestedPages.cssClasses={noborder:"no-border"},NestedPages.jsData={ajaxurl:ajaxurl,nonce:nestedpages.np_nonce,allPostTypes:nestedpages.post_types,syncmenu:"nosync",posttype:"",nestable:!0,sortable:!0,hierarchical:!0,expandText:nestedpages.expand_text,collapseText:nestedpages.collapse_text,showHiddenText:nestedpages.show_hidden,hideHiddenText:nestedpages.hide_hidden,quickEditText:nestedpages.quick_edit,hiddenText:nestedpages.hidden,titleText:nestedpages.title},NestedPages.formActions={syncToggles:"npnestToggle",syncNesting:"npsort",syncMenu:"npsyncMenu",newPage:"npnewChild",newBeforeAfter:"npnewBeforeAfter",quickEditLink:"npquickEditLink",getTaxonomies:"npgetTaxonomies",quickEditPost:"npquickEdit",clonePost:"npclonePost",search:"npmenuSearch",newMenuItem:"npnewMenuItem",manualMenuSync:"npmanualMenuSync",postSearch:"nppostSearch",wpmlTranslations:"npWpmlTranslations",resetSettings:"npresetSettings",resetUserPrefs:"npresetUserPreferences",resetAdminMenuSettings:"npresetAdminMenuSettings",trashWithChildren:"nptrashWithChildren",toggleStatusDisplay:"nptoggleStatusDisplay"},NestedPages.Factory=function(){var t=this,e=jQuery;return t.formatter=new NestedPages.Formatter,t.dropdowns=new NestedPages.Dropdowns,t.modals=new NestedPages.Modals,t.checkAll=new NestedPages.CheckAll,t.bulkActions=new NestedPages.BulkActions,t.menuToggle=new NestedPages.MenuToggle,t.pageToggle=new NestedPages.PageToggle,t.nesting=new NestedPages.Nesting,t.syncMenuSetting=new NestedPages.SyncMenuSetting,t.newPage=new NestedPages.NewPost,t.quickEditLink=new NestedPages.QuickEditLink,t.quickEditPost=new NestedPages.QuickEditPost,t.clone=new NestedPages.Clone,t.tabs=new NestedPages.Tabs,t.menuLinks=new NestedPages.MenuLinks,t.hiddenItemCount=new NestedPages.HiddenItemCount,t.confirmDelete=new NestedPages.ConfirmDelete,t.manualSync=new NestedPages.ManualSync,t.postSearch=new NestedPages.PostSearch,t.postMove=new NestedPages.MovePost,t.wpml=new NestedPages.Wpml,t.trashWithChildren=new NestedPages.TrashWithChildren,t.init=function(){nestedpages.settings_page||(t.bindEvents(),t.setPostType(),t.setMenuSync(),t.setNestable(),t.setSortable(),t.formatter.updateSubMenuToggle(),t.formatter.setBorders(),t.formatter.setNestedMargins(),t.nesting.initializeSortable())},t.bindEvents=function(){e(document).on("click",NestedPages.selectors.quickEditOverlay,function(e){t.formatter.removeQuickEdit(),t.newPage.cancelNewPage()}),e(document).ready(function(){t.formatter.hideAjaxError(),t.formatter.sizeLinkThumbnails()})},t.setNestable=function(){var a=!1;e.each(NestedPages.jsData.allPostTypes,function(e,t){t.name===NestedPages.jsData.posttype&&(!0===t.hierarchical&&(a=!0),!0===t.disable_nesting&&(a=!1))}),NestedPages.jsData.nestable=a},t.setSortable=function(){var a=!0;e.each(NestedPages.jsData.allPostTypes,function(e,t){t.name===NestedPages.jsData.posttype&&void 0!==t.disable_sorting&&""!==t.disable_sorting&&"true"===t.disable_sorting&&(a=!1)}),NestedPages.jsData.sortable=a},t.setPostType=function(){NestedPages.jsData.posttype=nestedpages.current_post_type,void 0!==NestedPages.jsData.posttype&&""!==NestedPages.jsData.posttype||(NestedPages.jsData.posttype=e(NestedPages.selectors.sortable).attr("id").substring(3)),NestedPages.jsData.hierarchical=NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical},t.setMenuSync=function(){NestedPages.jsData.syncmenu="1"===nestedpages.syncmenu?"sync":"nosync"},t.init()},(NestedPages=NestedPages||{}).MenuLinks=function(){var a=this,s=jQuery;return a.typeButton="",a.post="",a.formatter=new NestedPages.Formatter,a.selectors={form:"[data-np-menu-item-form]",typeSelect:"[data-np-menu-selection]",accordion:"[data-np-menu-accordion]",accordionItem:"[data-np-menu-accordion-item]",formPlaceholder:".np-menu-link-object-placeholder",formDetails:".np-menu-link-details",searchResults:"[data-np-search-result]",defaultResults:"[data-default-result]",originalLink:"[data-np-original-link]",saveButton:"[data-np-save-link]",urlInputCont:"[data-np-menu-url-cont]",errorDiv:"[data-np-error]"},a.fields={object:"[data-np-menu-object-input]",objectid:"[data-np-menu-objectid-input]",itemType:"[data-np-menu-type-input]",url:"[data-np-menu-url]",navigationLabel:"[data-np-menu-navigation-label]",titleAttribute:"[data-np-menu-title-attr]",cssClasses:"[data-np-menu-css-classes]",npStatus:"[data-np-menu-np-status]",linkTarget:"[data-np-menu-link-target]",menuTitle:"[data-np-menu-title]",parentPostType:"[data-np-menu-parent-post-type]"},a.search=new NestedPages.MenuSearch,a.bindEvents=function(){s(document).on("click",NestedPages.selectors.openLinkModal,function(e){e.preventDefault(),a.postParent=s(this).attr("data-parentid"),s(a.selectors.form).find(".parent_id").val(s(this).attr("data-parentid")),a.openModal()}),s(document).on("click",a.selectors.accordionItem,function(e){e.preventDefault(),a.accordion(s(this))}),s(document).on("click",a.selectors.typeSelect,function(e){e.preventDefault(),a.typeButton=s(this),a.setLinkType()}),s(document).on("keyup",a.fields.navigationLabel,function(){a.updateTitle()}),s(document).on("click",a.selectors.saveButton,function(e){e.preventDefault(),a.submitForm()}),s(document).on("keydown",function(e){27===e.keyCode&&s(document).trigger("close-modal-manual")})},a.openModal=function(){s(NestedPages.selectors.linkErrorDiv).hide(),s(NestedPages.selectors.linkModal).find("input").val(""),s(NestedPages.selectors.linkModal).find(".parent_id").val(a.postParent),a.clearForm(),s(a.selectors.accordion).find("ul").hide(),s(a.selectors.typeSelect).removeClass("active"),s(document).trigger("open-modal-manual",NestedPages.selectors.linkModal)},a.accordion=function(e){a.clearForm();var t=s(e).siblings("ul");if(s(t).is(":visible"))return s(e).removeClass("active"),void s(t).slideUp("fast");s(a.selectors.accordionItem).removeClass("active"),s(e).addClass("active"),s(e).parents(a.selectors.accordion).find("ul").slideUp("fast"),s(t).slideDown("fast")},a.setLinkType=function(){s(a.typeButton).hasClass("active")?a.clearForm():(s(a.typeButton).hasClass("np-custom-link")&&(s(a.selectors.accordionItem).removeClass("active"),s(a.selectors.accordion).find("ul").slideUp("fast")),s(a.selectors.formPlaceholder).hide(),a.populateForm())},a.populateForm=function(){s(a.selectors.saveButton).show(),s(a.selectors.typeSelect).removeClass("active"),s(a.typeButton).addClass("active"),s(a.fields.menuTitle).text(s(a.typeButton).text()).val(s(a.typeButton).text()),s(a.selectors.form).find("h3").find("em").text(s(a.typeButton).attr("data-np-object-name")),""!==s(a.typeButton).attr("data-np-permalink")?(s(a.selectors.form).find(a.selectors.urlInputCont).hide(),s(a.selectors.form).find(a.selectors.originalLink).html('<a href="'+s(a.typeButton).attr("data-np-permalink")+'">'+s(a.typeButton).text()+"</a>"),s(a.selectors.form).find(a.selectors.originalLink).parent(".original-link").show()):(s(a.selectors.form).find(a.selectors.urlInputCont).show(),s(a.selectors.form).find(a.selectors.originalLink).parent(".original-link").hide()),s(a.fields.object).val(s(a.typeButton).attr("data-np-menu-object")),s(a.fields.objectid).val(s(a.typeButton).attr("data-np-menu-objectid")),s(a.fields.itemType).val(s(a.typeButton).attr("data-np-menu-type")),s(a.selectors.formDetails).show()},a.clearForm=function(){s(a.selectors.form).find(a.selectors.errorDiv).hide(),s(a.selectors.saveButton).hide(),s(a.selectors.formDetails).hide(),s(a.selectors.formPlaceholder).show(),s(a.selectors.form).find("input").not(".parent_id").not(".parent-post-type").val(""),s(a.selectors.form).find(a.fields.linkTarget).val("_blank"),s(a.selectors.form).find('input[type="checkbox"]').attr("checked",!1),s(a.selectors.typeSelect).removeClass("active"),a.search.toggleLoading(!1),s(a.selectors.searchResults).remove(),s(a.selectors.defaultResults).show()},a.updateTitle=function(){var e=s(a.fields.navigationLabel).val(),t=s(a.selectors.form).find("h3").find("span");""!==e?(s(a.fields.menuTitle).val(e),s(t).text(e)):(s(a.fields.menuTitle).val(s(a.typeButton).text()),s(t).text(s(a.typeButton).text()))},a.submitForm=function(){a.toggleLoading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:s(a.selectors.form).serialize()+"&action="+NestedPages.formActions.newMenuItem+"&nonce="+NestedPages.jsData.nonce+"&post_type="+NestedPages.jsData.posttype+"&syncmenu="+NestedPages.jsData.syncmenu,success:function(e){a.toggleLoading(!1),"error"!==e.status?(a.post=e.post_data,a.createRow()):s(a.selectors.form).find(a.selectors.errorDiv).text(e.message).show()},error:function(e){console.log(e)}})},a.createRow=function(){var e='<li id="menuItem_'+a.post.id+'" class="page-row post-type-np-redirect published';e+='">',e+='<div class="row"><div class="child-toggle"><div class="child-toggle-spacer"></div></div><div class="row-inner">',e+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg>',e+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>',e+='<a href="'+a.post.np_link_content+'" class="page-link page-title" target="_blank"><span class="title">'+a.post.menuTitle+' <svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg></span>',e+='</a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ',e+='data-id="'+a.post.id+'"',e+='data-parentid="'+a.post.parent_id+'"',e+='data-title="'+a.post.menuTitle+'" ',e+='data-url="'+a.post.url+'" ',e+='data-status="publish" ',e+='data-np-status="show" ',e+='data-navstatus="show" ',e+='data-navcss="'+a.post.cssClasses+'" ',e+='data-navtitleattr="'+a.post.titleAttribute+'" ',e+='data-nav-type="'+a.post.menuType+'" ',e+='data-nav-object="'+a.post.objectType+'" ',e+='data-nav-object-id="'+a.post.objectId+'" ',e+='data-nav-original-link="'+a.post.original_link+'" ',e+='data-nav-original-title="'+a.post.original_title+'" ',e+='data-linktarget="'+a.post.link_target+'">',e+=NestedPages.jsData.quickEditText,e+="</a>",e+='<a href="'+a.post.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',e+="</div></div></div></li>","0"===a.post.parent_id?s(".nplist:first li:first").after(e):a.appendChildRow(e),s(document).trigger("close-modal-manual"),a.row=s("#menuItem_"+a.post.id).find(".row"),a.formatter.flashRow(a.row)},a.appendChildRow=function(e){var t=s("#menuItem_"+a.post.parent_id);0===s(t).children("ol").length?(e='<ol class="sortable nplist" style="display:block;">'+e+"</ol>",s(t).append(e)):s(t).find("ol:first").prepend(e),a.formatter.updateSubMenuToggle()},a.toggleLoading=function(e){if(e)return s(a.selectors.form).find(a.selectors.errorDiv).hide(),s(a.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).show(),void s(a.selectors.saveButton).attr("disabled","disabled");s(a.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).hide(),s(a.selectors.saveButton).attr("disabled",!1)},a.bindEvents()},(NestedPages=NestedPages||{}).MenuSearch=function(){var s=this,n=jQuery;return s.selectors={searchForms:"*[data-np-menu-search]",defaultResults:"[data-default-result]",loadingIndicator:".np-menu-search-loading",noResults:".np-menu-search-noresults",searchType:"data-search-type",searchObject:"data-search-object",searchResults:"[data-np-search-result]"},s.activeForm="",s.results="",s.defaultResults="",s.searchType="",s.searchObject="",s.init=function(){s.bindEvents()},s.bindEvents=function(){n(document).on("keyup",s.selectors.searchForms,function(){s.activeForm=n(this),n(s.selectors.searchResults).remove(),s.performSearch()})},s.performSearch=function(){if(s.defaultResults=n(s.activeForm).parent("li").siblings(s.selectors.defaultResults),2<n(s.activeForm).val().length)return n(s.defaultResults).hide(),s.toggleLoading(!0),void s.query();s.toggleLoading(!1),n(s.defaultResults).show()},s.query=function(){s.searchType=n(s.activeForm).attr(s.selectors.searchType),s.searchObject=n(s.activeForm).attr(s.selectors.searchObject),n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.search,nonce:NestedPages.jsData.nonce,term:n(s.activeForm).val(),searchType:s.searchType,searchObject:s.searchObject},success:function(e){console.log(e),e.results?(s.results=e.results,s.toggleLoading(!1),"post_type"===s.searchType?s.appendPosts():s.appendTaxonomies()):(s.toggleLoading(!1),n(s.activeForm).siblings(s.selectors.noResults).show())}})},s.appendPosts=function(){var a="";n.each(s.results,function(e,t){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+s.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+t.ID+'" data-np-permalink="'+t.permalink+'" data-np-object-name="'+t.singular_name+'" data-np-menu-selection>'+t.post_title+"</a></li>"}),n(a).insertAfter(n(s.activeForm).parent("li")),s.toggleLoading(!1)},s.appendTaxonomies=function(){var a="";n.each(s.results,function(e,t){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+s.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+t.term_id+'" data-np-permalink="'+t.permalink+'" data-np-object-name="'+t.taxonomy+'" data-np-menu-selection>'+t.name+"</a></li>"}),n(a).insertAfter(n(s.activeForm).parent("li")),s.toggleLoading(!1)},s.toggleLoading=function(e){var t=n(s.activeForm).siblings(s.selectors.loadingIndicator);n(s.selectors.noResults).hide(),e?n(t).show():n(t).hide()},s.init()},jQuery(document).ready(function(){new NestedPagesTrash});var NestedPagesTrash=function(){var t=this,a=jQuery;return t.trashButton=".np-empty-trash",t.confirmButton=".np-trash-confirm",t.warningModal="#np-trash-modal",t.errorAlert="#np-error",t.loadingIndicator="#nested-loading",t.trashLinks=".np-trash-links",t.postType=a("#np-trash-posttype").val(),t.nonce=nestedpages.np_nonce,t.formAction="npEmptyTrash",t.bindEvents=function(){a(document).on("click",t.confirmButton,function(e){e.preventDefault(),t.confirmEmpty()})},t.confirmEmpty=function(){t.loading(!0),a(document).trigger("close-modal-manual"),a(t.errorAlert).hide(),t.emptyTrash()},t.emptyTrash=function(){a.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:t.formAction,nonce:t.nonce,posttype:t.postType},success:function(e){t.loading(!1),"error"===e.status?a(t.errorAlert).text(e.message).show():(a(t.trashLinks).hide(),a(".notice-dismiss").click())}})},t.loading=function(e){e?a(t.loadingIndicator).show():a(t.loadingIndicator).hide()},t.bindEvents()};(NestedPages=NestedPages||{}).ConfirmDelete=function(){var t=this,a=jQuery;return t.deleteLink="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.linkDeleteButton,function(e){e.preventDefault(),t.confirmSingle(a(this))}),a(document).on("click",NestedPages.selectors.linkDeleteConfirmationButton,function(e){e.preventDefault(),a(this).hasClass("bulk")?t.deleteMultiple():t.deleteSingle()}),a(document).on("submit",NestedPages.selectors.bulkActionsForm,function(e){t.confirmMultiple(e)})},t.confirmSingle=function(e){t.deleteLink=a(e).attr("href"),a(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation_singular),a(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.delete).removeClass("bulk"),a(document).trigger("open-modal-manual",NestedPages.selectors.linkDeleteConfirmationModal)},t.confirmMultiple=function(e){"trash"===a('select[name="np_bulk_action"]').val()&&""!==a(NestedPages.selectors.bulkActionRedirectIds).val()&&(e.preventDefault(),a(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation),a(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.trash_delete_links).addClass("bulk"),a(document).trigger("open-modal-manual",[NestedPages.selectors.linkDeleteConfirmationModal]))},t.deleteMultiple=function(){a(NestedPages.selectors.bulkActionsForm)[0].submit()},t.deleteSingle=function(){window.location.replace(t.deleteLink)},t.bindEvents()},(NestedPages=NestedPages||{}).ManualSync=function(){var t=this,a=jQuery;return t.activeBtn="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.manualMenuSync,function(e){e.preventDefault(),t.activeBtn=a(this),t.syncMenu()}),a(document).on("click",NestedPages.selectors.manualOrderSync,function(e){e.preventDefault(),t.activeBtn=a(this),t.syncOrder()})},t.syncMenu=function(){t.loading(!0),a.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.manualMenuSync,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:"sync"},success:function(e){"error"===e.status?(a(NestedPages.selectors.errorDiv).text(e.message).show(),a(NestedPages.selectors.loadingIndicator).hide()):t.loading(!1)}})},t.syncOrder=function(){t.loading(!0),(new NestedPages.Nesting).syncNesting(!0,t.loading(!1))},t.loading=function(e){if(e)return a(t.activeBtn).addClass("disabled"),void a(NestedPages.selectors.loadingIndicator).show();a(t.activeBtn).removeClass("disabled"),a(NestedPages.selectors.loadingIndicator).hide()},t.bindEvents()},(NestedPages=NestedPages||{}).PostSearch=function(){var s=this,n=jQuery;return s.selectors={input:"data-nestedpages-post-search",form:"data-nestedpages-post-search-form",loadingIndicator:"data-nestedpages-loading",noResults:"data-nestedpages-no-results",results:"data-nestedpages-search-results"},s.changed=!1,s.activeInput="",s.results="",s.defaultResults="",s.postType="",s.activeForm="",s.bindEvents=function(){n("["+s.selectors.input+"]").on("input",function(){return s.activeInput=n(this),s.setOptions(),s.changed||s.setDefaultResults(),""===n(this).val()?(n(s.activeForm).find("["+s.selectors.noResults+"]").hide(),void s.showDefaultResults()):void s.query()})},s.setDefaultResults=function(){s.defaultResults=n(s.activeForm).find("["+s.selectors.results+"]").html(),s.changed=!0},s.showDefaultResults=function(){n(s.activeForm).find("["+s.selectors.results+"]").html(s.defaultResults)},s.setOptions=function(){s.postType=n(s.activeInput).attr(s.selectors.input),s.activeForm=n(s.activeInput).parents("["+s.selectors.form+"]")},s.performSearch=function(){if(s.defaultResults=n(s.activeForm).parent("li").siblings(s.selectors.defaultResults),2<n(s.activeForm).val().length)return n(s.defaultResults).hide(),s.toggleLoading(!0),void s.query();s.toggleLoading(!1),n(s.defaultResults).show()},s.query=function(){n(s.activeForm).find("["+s.selectors.results+"]").empty(),s.toggleLoading(!0),n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.postSearch,nonce:NestedPages.jsData.nonce,term:n(s.activeInput).val(),postType:s.postType},success:function(e){e.results?(s.results=e.results,s.loadResults(),s.toggleLoading(!1)):(s.toggleLoading(!1),n(s.activeForm).find("["+s.selectors.noResults+"]").show())}})},s.loadResults=function(){var a="<ul>";n.each(s.results,function(e,t){a+='<li><a href="#" data-assignment-page-id="'+t.ID+'" data-assignment-page-title="'+t.post_title+'">'+t.post_title+"</a></li>"}),a+="</ul>",n(s.activeForm).find("["+s.selectors.results+"]").html(a),s.toggleLoading(!1)},s.toggleLoading=function(e){var t=n(s.activeForm).find("["+s.selectors.loadingIndicator+"]"),a=n(s.activeForm).find("["+s.selectors.noResults+"]");n(a).hide(),e?n(t).show():n(t).hide()},s.bindEvents()},(NestedPages=NestedPages||{}).MovePost=function(){var t=this,a=jQuery;return t.formatter=new NestedPages.Formatter,t.nesting=new NestedPages.Nesting,t.activeRow,t.selectors={moveToTop:"data-push-to-top",moveToBottom:"data-push-to-bottom"},t.bindEvents=function(){a(document).ready(function(){t.disableTopOnFirst(),t.disableBottomOnLast()}),a(document).on("click","["+t.selectors.moveToTop+"]",function(e){e.preventDefault(),a(this).hasClass("disabled")||(t.activeRow=a(this).closest(NestedPages.selectors.rows),t.moveToTop())}),a(document).on("click","["+t.selectors.moveToBottom+"]",function(e){e.preventDefault(),a(this).hasClass("disabled")||(t.activeRow=a(this).closest(NestedPages.selectors.rows),t.moveToBottom())})},t.moveToTop=function(){var e=a(t.activeRow).parent(NestedPages.selectors.lists),e=a(e).find(NestedPages.selectors.rows).first();a(t.activeRow).insertBefore(e),t.formatter.setBorders(),a(document).click(),t.nesting.syncNesting(),t.disableTopOnFirst(),t.disableBottomOnLast()},t.moveToBottom=function(){var e=a(t.activeRow).parent(NestedPages.selectors.lists),e=a(e).children(NestedPages.selectors.rows).last();a(t.activeRow).insertAfter(e),t.formatter.setBorders(),a(document).click(),t.nesting.syncNesting(),t.disableTopOnFirst(),t.disableBottomOnLast()},t.disableTopOnFirst=function(){var e=a(NestedPages.selectors.lists);a.each(e,function(){a(this).find("["+t.selectors.moveToTop+"]").removeClass("disabled");var e=a(this).find(NestedPages.selectors.rows).first();a(e).find("["+t.selectors.moveToTop+"]").addClass("disabled")})},t.disableBottomOnLast=function(){var e=a(NestedPages.selectors.lists);a.each(e,function(){a(this).find("["+t.selectors.moveToBottom+"]").removeClass("disabled");var e=a(this).find(NestedPages.selectors.rows).last();a(e).find("["+t.selectors.moveToBottom+"]").addClass("disabled")})},t.bindEvents()},(NestedPages=NestedPages||{}).TrashWithChildren=function(){var t=this,a=jQuery;return t.post_id="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.trashWithChildrenButton,function(e){e.preventDefault(),t.post_id=a(this).attr("data-post-id"),t.trash()})},t.trash=function(){a.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.trashWithChildren,nonce:NestedPages.jsData.nonce,post_id:t.post_id,screen:nestedpages.current_page},success:function(e){window.location.replace(e.redirect)},error:function(e){console.log(e)}})},t.bindEvents()},(NestedPages=NestedPages||{}).Wpml=function(){var t=this,n=jQuery;return t.button=null,t.postData=null,t.modal=null,t.parent_li=null,t.formatter=new NestedPages.Formatter,t.selectors={translationsBtn:"data-nestedpages-translations",modal:"data-np-wpml-translations-modal",title:"data-wmpl-translation-title",table:"data-np-wpml-translations-modal-table"},t.bindEvents=function(){nestedpages.wpml&&n(document).on("click","["+t.selectors.translationsBtn+"]",function(e){e.preventDefault(),t.createTranslationsModal(n(this))})},t.createTranslationsModal=function(e){t.parent_li=n(e).parents(".action-buttons").closest(NestedPages.selectors.row).parent("li"),t.button=n(t.parent_li).find(NestedPages.selectors.quickEditOpen),t.postData={id:n(t.button).attr("data-id"),title:n(t.button).attr("data-title"),slug:n(t.button).attr("data-slug")},t.modal=n("["+t.selectors.modal+"]").clone(),0<n(t.parent_li).children("ol").length?(e=n(t.parent_li).children("ol"),n(t.modal).insertBefore(e)):n(t.modal).appendTo(t.parent_li),n(t.modal).find("["+t.selectors.title+"]").text(t.postData.title),t.formatter.showQuickEdit(),n(t.modal).show(),t.getTranslationData()},t.getTranslationData=function(){n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.wpmlTranslations,post_id:t.postData.id,nonce:NestedPages.jsData.nonce},success:function(e){console.log(e),console.log(t.postData.id),"success"===e.status?t.populateModal(e.translations):(n(t.modal).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show(),t.toggleLoading(!1))}})},t.populateModal=function(a){var s="<tbody>";n.each(a,function(e,t){e=a[e];s+="<tr>",s+='<td><img src="'+e.country_flag_url+'" alt="'+e.translated_name+'" /> '+e.translated_name+"</td>",s+="<td>",e.has_translation&&e.edit_link?s+='<a href="'+e.edit_link+'">'+e.translation.post_title+" ("+nestedpages.edit+")</a>":s+='<a href="'+e.add_link+'" class="np-btn">+ '+nestedpages.add_translation+"</a>",s+="</td>",s+="</tr>"}),s+="</tbody>",n(t.modal).find("["+t.selectors.table+"]").html(s),t.toggleLoading(!1)},t.toggleLoading=function(e){e?n(t.modal).addClass("loading"):n(t.modal).removeClass("loading")},t.bindEvents()};
|
assets/js/nestedpages.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var NestedPages=NestedPages||{};NestedPages.Formatter=function(){var s=this,i=jQuery;s.updateSubMenuToggle=function(){for(var e=i(NestedPages.selectors.childToggle),t=0;t<e.length;t++){var a,s=e[t],n=i(s).parent(".row").parent("li");0<i(n).children("ol").length?i(n).children("ol").find("li.page-row").length<1?i(n).children("ol").hide():(a='<div class="child-toggle-spacer"></div>',a+='<a href="#"',0<i(n).children("ol:visible").length&&(a+=' class="open"'),a+='><span class="np-icon-arrow"></span></a>',i(s).html(a),0<i(n).children("ol").children(".np-hide").length&&0===i(n).children("ol").children(".np-hide.shown").length?i(s).find("a").hide():0<i(n).children("ol").children(".np-hide").length&&0<i(n).children("ol").children(".np-hide.shown").length&&i(s).find("a").show()):i(s).empty().html('<div class="child-toggle-spacer"></div>')}},s.setBorders=function(){i(NestedPages.selectors.rows).removeClass(NestedPages.cssClasses.noborder),i.each(i(NestedPages.selectors.lists),function(){i(this).find(".page-row:visible:first").addClass(NestedPages.cssClasses.noborder)})},s.setNestedMargins=function(){s.setIndent()},s.setIndent=function(){var n="1"===nestedpages.non_indent?20:30,o="1"===nestedpages.non_indent?".row-inner":".child-toggle";i.each(i(NestedPages.selectors.lists),function(e,t){var a=i(this).parents(NestedPages.selectors.lists).length,s=0;NestedPages.jsData.sortable||(s=10),0<a?(s=a*n+s,i(this).find(o).css("padding-left",s+"px")):NestedPages.jsData.sortable&&!i(this).hasClass("no-sort")?i(this).find(".row-inner").css("padding-left","0px"):i(this).find(".row-inner").css("padding-left","10px")})},s.setClassicIndent=function(){i.each(i(NestedPages.selectors.lists),function(e,t){var a=i(this).parents(NestedPages.selectors.lists).length,s=0;NestedPages.jsData.sortable||(s=10),0<a?(s=20*a+s,i(this).find(".row-inner").css("padding-left",s+"px")):NestedPages.jsData.sortable&&!i(this).hasClass("no-sort")?i(this).find(".row-inner").css("padding-left","0px"):i(this).find(".row-inner").css("padding-left","10px")})},s.updatePlaceholderWidth=function(e){var t,a;NestedPages.jsData.nestable&&(t=40*i(e.placeholder).parents("ol").length-40,a=i(NestedPages.selectors.sortable).width()-t,i(e.placeholder).width(a).css("margin-left",t+"px")),s.updateListVisibility(e)},s.updateListVisibility=function(e){e=i(e.placeholder).parent("ol");i(e).is(":visible")||(i(e).addClass("nplist"),i(e).show())},s.removeQuickEdit=function(){i(NestedPages.selectors.quickEditOverlay).removeClass("active").remove(),i(".sortable .quick-edit").remove(),i(".row").show()},s.showQuickEdit=function(){i("body").append('<div class="np-inline-overlay"></div>'),setTimeout(function(){i(".np-inline-overlay").addClass("active")},50)},s.flashRow=function(e){i(e).addClass("np-updated"),s.setBorders(),setTimeout(function(){i(e).addClass("np-updated-show")},1500)},s.showAjaxError=function(e){i(NestedPages.selectors.ajaxError).find("p").text(e),i(NestedPages.selectors.ajaxError).show()},s.hideAjaxError=function(e){i(NestedPages.selectors.ajaxError).hide()},s.sizeLinkThumbnails=function(){var e=i(NestedPages.selectors.thumbnailContainer).not(NestedPages.selectors.thumbnailContainerLink).first().find("img"),t=i(e).width(),a=i(e).height();i.each(i(NestedPages.selectors.thumbnailContainerLink),function(){i(this).width(t),i(this).height(a)})}},(NestedPages=NestedPages||{}).Dropdowns=function(){var t=this,a=jQuery;return t.dropdown="",t.activeBtn="",t.activeContent="",t.toggleBtn="[data-dropdown-toggle]",t.dropdownContainer="[data-dropdown]",t.dropdownContent="[data-dropdown-content]",t.selectors={caret_up:"icon-arrow_drop_up",caret_down:"icon-arrow_drop_down"},t.bindEvents=function(){a(document).on("click",t.toggleBtn,function(e){e.preventDefault(),t.activeBtn=a(this),t.dropdown=a(this).parents(t.dropdownContainer),t.toggleDropdown()}),a(document).on("click",function(e){t.closeDropdowns(e.target)}),a(document).on("dropdown-opened",function(e,t){0<a(t).parents(NestedPages.selectors.row).length&&a(t).parents(NestedPages.selectors.row).addClass("active")}),a(document).on("dropdown-closed",function(){a(NestedPages.selectors.row).removeClass("active")})},t.toggleDropdown=function(){a("."+t.selectors.caret_up).attr("class",t.selectors.caret_down);var e=a(t.dropdown).find(t.dropdownContent);if(t.activeContent=e,a(e).hasClass("active"))return a(e).removeClass("active"),a(t.activeBtn).removeClass("active"),a(t.activeBtn).find("."+t.selectors.caret_up).attr("class",t.selectors.caret_down),void a(document).trigger("dropdown-closed",e);t.setPositioning(),a(t.toggleBtn).removeClass("active"),a(t.dropdownContent).removeClass("active"),a(e).addClass("active"),a(t.activeBtn).find("."+t.selectors.caret_down).attr("class",t.selectors.caret_up),a(t.activeBtn).addClass("active"),a(document).trigger("dropdown-opened",e)},t.setPositioning=function(){var e=a(t.activeBtn).outerHeight();a(t.activeContent).css("top",e+"px")},t.closeDropdowns=function(e){0===a(e).parents(t.dropdownContainer).length&&(a(t.dropdownContent).removeClass("active"),a(t.toggleBtn).removeClass("active"),a(t.activeBtn).find("."+t.selectors.caret_up).attr("class",t.selectors.caret_down),a(document).trigger("dropdown-closed",void 0))},t.bindEvents()},(NestedPages=NestedPages||{}).Modals=function(){var a=this,s=jQuery;return a.activeBtn="",a.activeModal="",a.modalOpen=!1,a.selectors={toggleBtn:"[data-nestedpages-modal-toggle]",backdrop:"[data-nestedpages-modal-backdrop]",closeBtn:"[data-nestedpages-modal-close]",title:"data-nestedpages-modal-title",content:"data-nestedpages-modal-content"},a.bindEvents=function(){s(document).on("click",a.selectors.toggleBtn,function(e){e.preventDefault(),a.activeBtn=s(this),a.openModal()}),s(document).on("click",a.selectors.closeBtn,function(e){e.preventDefault(),a.closeModals()}),s(document).on("open-modal-manual",function(e,t){a.activeModal=s('[data-nestedpages-modal="'+t+'"]'),a.openModal()}),s(document).on("close-modal-manual",function(e){a.closeModals()}),s(document).on("click",a.selectors.backdrop,function(e){a.closeModals()}),s(document).ready(function(){a.checkHash()})},a.openModal=function(){var e;a.modalOpen?a.closeModals():(0<s(a.activeBtn).length&&(e=s(a.activeBtn).attr("data-nestedpages-modal-toggle"),a.activeModal=s('*[data-nestedpages-modal="'+e+'"]')),s(a.activeModal).addClass("active"),a.modalOpen=!0,a.populateModal(),s(document).trigger("open-modal",[a.activeBtn,a.activeModal]))},a.closeModals=function(){a.modalOpen=!1,s("[data-nestedpages-modal]").removeClass("active"),a.activeModal="",a.activeBtn=""},a.populateModal=function(){var e=s(a.activeBtn).attr(a.selectors.title);void 0!==e&&""!==e&&s(a.activeModal).find("[data-nestedpages-modal-title]").text(e);e=s(a.activeBtn).attr(a.selectors.content);void 0!==e&&""!==e&&s(a.activeModal).find("[data-nestedpages-modal-content]").html(e)},a.checkHash=function(){var e;window.location.hash&&"#modal"===window.location.hash.substring(0,6)&&(e=window.location.hash.substring(7),a.activeModal=s('*[data-nestedpages-modal="'+e+'"]'),a.openModal())},a.bindEvents()},(NestedPages=NestedPages||{}).CheckAll=function(){var a=this,s=jQuery;return a.activeCheckbox="",a.selectors={checkbox:"[data-np-check-all]"},a.bindEvents=function(){s(document).on("change",a.selectors.checkbox,function(){a.activeCheckbox=s(this),a.toggleCheckboxes()}),s(document).on("change","input[type=checkbox]",function(){a.checkAllStatus(s(this))})},a.init=function(){a.bindEvents()},a.toggleCheckboxes=function(){var t=!!s(a.activeCheckbox).is(":checked"),e=s(a.activeCheckbox).attr("data-np-check-all"),e=s('*[name="'+e+'"]');s.each(e,function(){var e=s(this).parents(NestedPages.selectors.rows);s(this).prop("checked",t),s(e).hasClass("np-hide")&&!s(e).is(":visible")&&s(e).find(NestedPages.selectors.bulkActionsCheckbox).prop("checked",!1)}),a.toggleCheckAll()},a.toggleCheckAll=function(){var e=s(a.activeCheckbox).attr("data-np-check-all"),t=(t=s('*[name="'+e+'"]').length)-s(".np-hide").find(NestedPages.selectors.bulkActionsCheckbox).length+s(".np-hide:visible").find(NestedPages.selectors.bulkActionsCheckbox).length,e=s('*[name="'+e+'"]:checked').length;if(t==e)return s(a.activeCheckbox).prop("checked",!0),void s(a.activeCheckbox).removeClass("check-all-partial");0<e?s(a.activeCheckbox).addClass("check-all-partial"):(s(a.activeCheckbox).attr("checked",!1),s(a.activeCheckbox).removeClass("check-all-partial"))},a.checkAllStatus=function(e){e=s(e).attr("name"),e=s('*[data-np-check-all="'+e+'"]');0!==e.length&&(a.activeCheckbox=s(e)[0],a.toggleCheckAll())},a.init()},(NestedPages=NestedPages||{}).BulkActions=function(){var n=this,o=jQuery;return n.selectedNumber=0,n.selectedLinks=[],n.selectedPosts=[],n.bindEvents=function(){o(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){n.toggleBulkForm()}),o(document).on("submit",NestedPages.selectors.bulkActionsForm,function(e){"edit"===o("select[name=np_bulk_action]").val()&&(e.preventDefault(),n.toggleBulkEdit(!0))}),o(document).on("click",NestedPages.selectors.bulkEditRemoveItem,function(e){e.preventDefault();e=o(this).siblings("input[type=hidden]").val();n.uncheckBulkItem(e)}),o(document).on("click",NestedPages.selectors.bulkEditCancel,function(e){e.preventDefault(),n.uncheckAllBulkItems()})},n.toggleBulkForm=function(){var t=!1,a="",s="";if(n.selectedPosts=[],n.selectedLinks=[],o.each(o(NestedPages.selectors.bulkActionsCheckbox),function(){var e;o(this).is(":checked")&&(e=o(this).parents(NestedPages.selectors.rows),t=!0,o(this).parent("div").hasClass("np-check-all")||o(e).hasClass("post-type-np-redirect")||(a+=o(this).val()+","),o(e).hasClass("post-type-np-redirect")&&(s+=o(this).val()+",",n.selectedLinks.push(o(this).val())),"np-redirect"===o(this).attr("data-np-post-type")||o(this).parent("div").hasClass("np-check-all")||((e=[]).title=o(this).attr("data-np-bulk-checkbox"),e.id=o(this).val(),n.selectedPosts.push(e)))}),n.setBulkEditPosts(),n.toggleEditOption(),n.toggleLinkCountAlert(),t)return o(NestedPages.selectors.bulkActionsForm).show(),o(NestedPages.selectors.bulkActionsIds).val(a),o(NestedPages.selectors.bulkActionRedirectIds).val(s),void n.setSelectedNumber();o(NestedPages.selectors.bulkActionsIds).val(""),o(NestedPages.selectors.bulkActionsForm).hide()},n.setBulkEditPosts=function(){for(var e="",t=0;t<n.selectedPosts.length;t++)e+='<li><a href="#" class="np-remove" data-np-remove-bulk-item>×</a>',e+=n.selectedPosts[t].title,e+='<input type="hidden" name="post_ids[]" value="'+n.selectedPosts[t].id+'"></li>';o(NestedPages.selectors.bulkEditTitles).html(e)},n.uncheckBulkItem=function(e){o.each(o(NestedPages.selectors.bulkActionsCheckbox),function(){o(this).val()==e&&o(this).prop("checked",!1).change()}),0===o(NestedPages.selectors.bulkEditRemoveItem).length&&n.toggleBulkEdit(!1)},n.uncheckAllBulkItems=function(){o.each(o(NestedPages.selectors.bulkActionsCheckbox),function(){o(this).prop("checked",!1).change()}),n.toggleBulkEdit(!1)},n.setSelectedNumber=function(){var e=o(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").length,t=o(NestedPages.selectors.bulkActionsForm).find("select option").first();o(t).text(nestedpages.bulk_actions+" ("+e+")")},n.toggleEditOption=function(){var e=o(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").not(".np-redirect-bulk").length,t=o(NestedPages.selectors.bulkActionsForm).find("select option[value=edit]");if(0===e)return o(t).prop("disabled",!0),o(NestedPages.selectors.bulkActionsForm).find("select option").first().prop("selected",!0),void n.toggleBulkEdit(!1);o(t).prop("disabled",!1)},n.toggleBulkEdit=function(e){if(n.toggleLinkCountAlert(),e)return n.disableParentOptions(),o(NestedPages.selectors.bulkEditForm).show(),o(NestedPages.selectors.bulkActionsForm).hide(),void n.setWPSuggest();o(NestedPages.selectors.bulkEditForm).hide(),o(NestedPages.selectors.bulkActionsForm).show(),o(NestedPages.selectors.bulkEditLinkCount).parent("div").hide(),o(NestedPages.selectors.bulkActionsForm).find("select option").first().text(nestedpages.bulk_actions),n.resetBulkEditFields()},n.toggleLinkCountAlert=function(){0!==n.selectedLinks.length?o(NestedPages.selectors.bulkEditLinkCount).parent("div").show():o(NestedPages.selectors.bulkEditLinkCount).parent("div").hide()},n.disableParentOptions=function(){for(var e=o(NestedPages.selectors.bulkEditForm).find("select[name=post_parent]"),t=0;t<n.selectedPosts.length;t++)o(e).find("option[value="+n.selectedPosts[t].id+"]").attr("disabled",!0)},n.setWPSuggest=function(){var e=o(NestedPages.selectors.bulkEditForm).find("[data-autotag]");o.each(e,function(e,t){var a=o(this).attr("data-taxonomy");o(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})},n.resetBulkEditFields=function(){var e=o(NestedPages.selectors.bulkEditForm).find("select");o.each(e,function(){o(this).find("option").first().prop("selected",!0),o(this).find("option").removeAttr("disabled")});e=o(NestedPages.selectors.bulkEditForm).find(".cat-checklist");o.each(e,function(){o(this).find("input[type=checkbox]").prop("checked",!1)})},n.bindEvents()},(NestedPages=NestedPages||{}).HiddenItemCount=function(){var e=this,a=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){a(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){e.toggleHiddenCount()}),a(document).on("click",NestedPages.selectors.toggleAll,function(){e.toggleHiddenCount()}),a(document).on("click",NestedPages.selectors.pageToggle,function(){e.toggleHiddenCount()})},e.toggleHiddenCount=function(){var t=0;a.each(a(NestedPages.selectors.bulkActionsCheckbox),function(){var e;a(this).is(":checked")&&(a(this).parent("div").hasClass("np-check-all")||(e=a(this).closest(".page-row"),a(e).is(":visible")||t++))}),t<1?a(NestedPages.selectors.hiddenItemCountParent).hide():(a(NestedPages.selectors.hiddenItemCount).text(t),a(NestedPages.selectors.hiddenItemCountParent).show())},e.init()},(NestedPages=NestedPages||{}).MenuToggle=function(){var a=this,n=jQuery;return a.formatter=new NestedPages.Formatter,a.bindEvents=function(){n(document).on("click",NestedPages.selectors.childToggleLink,function(e){e.preventDefault(),a.toggleSingleMenu(n(this))}),n(document).on("click",NestedPages.selectors.toggleAll,function(e){e.preventDefault(),a.toggleAllMenus()})},a.toggleSingleMenu=function(e){var t=n(e).parent(NestedPages.selectors.childToggle).parent(NestedPages.selectors.row).siblings("ol");n(e).toggleClass("open"),n(t).toggle(),a.formatter.setBorders(),a.formatter.setNestedMargins(),a.syncUserToggles()},a.toggleAllMenus=function(){var e=NestedPages.selectors.toggleAll;if("closed"===n(e).attr("data-toggle"))return n(NestedPages.selectors.lists).show(),n(e).attr("data-toggle","opened").text(NestedPages.jsData.collapseText),n(NestedPages.selectors.childToggle+" a").addClass("open"),a.formatter.setBorders(),void a.syncUserToggles();n(NestedPages.selectors.lists).not(n(NestedPages.selectors.lists)[0]).hide(),n(e).attr("data-toggle","closed").text(NestedPages.jsData.expandText),n(NestedPages.selectors.childToggle+" a").removeClass("open"),a.formatter.setBorders(),a.syncUserToggles()},a.visibleRowIDs=function(){var s=[],e=n(NestedPages.selectors.rows+":visible");return n.each(e,function(e,t){var a=n(this).attr("id");s.push(a.replace("menuItem_",""))}),s},a.syncUserToggles=function(){n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncToggles,nonce:NestedPages.jsData.nonce,ids:a.visibleRowIDs(),posttype:NestedPages.jsData.posttype},success:function(e){"success"!==e.status&&console.log("There was an error saving toggled pages.")}})},a.bindEvents()},(NestedPages=NestedPages||{}).PageToggle=function(){var a=this,s=jQuery;return a.activeButton="",a.formatter=new NestedPages.Formatter,a.bindEvents=function(){s(document).on("click",NestedPages.selectors.toggleHidden,function(e){e.preventDefault(),a.activeButton=s(this),a.toggleHidden()}),s(document).on("click",NestedPages.selectors.toggleStatus,function(e){e.preventDefault(),a.toggleStatus(s(this))})},a.toggleHidden=function(){var e=s(a.activeButton),t=s(e).attr("href");if("#show"==t)return s(e).attr("href","#hide").text(NestedPages.jsData.showHiddenText),s(NestedPages.selectors.hiddenRows).removeClass("shown").hide(),a.formatter.updateSubMenuToggle(),void a.formatter.setBorders();"#hide"==t&&(s(e).attr("href","#show").text(NestedPages.jsData.hideHiddenText),s(NestedPages.selectors.hiddenRows).addClass("shown").show(),a.formatter.updateSubMenuToggle(),a.formatter.setBorders())},a.toggleStatus=function(e){var t=(t=s(e).attr("href")).substring(1);s(NestedPages.selectors.syncCheckbox).attr("disabled",!1),s(NestedPages.selectors.toggleStatus).removeClass("active"),s(e).addClass("active"),a.saveStatusPreference(t),"draft"==t&&(s(NestedPages.selectors.syncCheckbox).attr("disabled",!0),s("."+t).addClass("nested-visible")),"all"!=t?(s(NestedPages.selectors.rows).hide(),s("."+t).show()):s(NestedPages.selectors.rows).show()},a.saveStatusPreference=function(e){s.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.toggleStatusDisplay,nonce:NestedPages.jsData.nonce,status:e,post_type:NestedPages.jsData.posttype}})},a.bindEvents()},(NestedPages=NestedPages||{}).Nesting=function(){var n=this,o=jQuery;n.formatter=new NestedPages.Formatter,n.initializeSortable=function(){if(!NestedPages.jsData.nestable)return n.initializeSortableFlat();o(NestedPages.selectors.sortable).not(NestedPages.selectors.notSortable).nestedSortable({items:NestedPages.selectors.rows,toleranceElement:"> .row",handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",tabSize:56,isAllowed:function(e,t,a){return!(o(t).hasClass("post-type-np-redirect")&&!o(a).hasClass("post-type-np-redirect"))},start:function(e,t){t.placeholder.height(t.item.height())},sort:function(e,t){n.formatter.updatePlaceholderWidth(t)},stop:function(e,t){setTimeout(function(){n.formatter.updateSubMenuToggle(),n.formatter.setBorders(),n.formatter.setNestedMargins()},100),n.syncNesting()}})},n.initializeSortableFlat=function(){var e=o(NestedPages.selectors.lists).not(NestedPages.selectors.notSortable);o.each(e,function(){o(this).sortable({items:">"+NestedPages.selectors.rows,handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",forcePlaceholderSize:!0,start:function(e,t){t.placeholder.height(t.item.height())},sort:function(e,t){n.formatter.updatePlaceholderWidth(t)},stop:function(e,t){setTimeout(function(){n.formatter.updateSubMenuToggle(),n.formatter.setBorders(),n.formatter.setNestedMargins()},100),n.syncNesting()}})})},n.disableNesting=function(){o(NestedPages.selectors.sortable).sortable("destroy")},n.syncNesting=function(e,t){var a,s;"1"===nestedpages.manual_order_sync&&!e||(o(NestedPages.selectors.errorDiv).hide(),o(NestedPages.selectors.loadingIndicator).show(),s=!!o(NestedPages.selectors.lists).first().hasClass("filtered"),a=NestedPages.jsData.nestable&&!s?o(NestedPages.selectors.sortable).nestedSortable("toHierarchy",{startDepthCount:0}):n.setNestingArray(),n.disableNesting(),e=NestedPages.jsData.syncmenu,"1"===nestedpages.manual_menu_sync&&(e="nosync"),o.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncNesting,nonce:NestedPages.jsData.nonce,list:a,post_type:NestedPages.jsData.posttype,syncmenu:e,filtered:s},success:function(e,t){n.initializeSortable(),"error"===e.status?(o(NestedPages.selectors.errorDiv).text(e.message).show(),o(NestedPages.selectors.loadingIndicator).hide()):t&&"function"==typeof t?t():o(NestedPages.selectors.loadingIndicator).hide()}}))},n.setNestingArray=function(e){return ret=[],o(NestedPages.selectors.lists).first().children("li.page-row").each(function(){var e=n.recursiveNesting(this);ret.push(e)}),ret},n.recursiveNesting=function(e){var t,a=o(e).attr("id");if(a)return a=a.replace("menuItem_",""),t={id:a},0<o(e).children(NestedPages.selectors.lists).children(NestedPages.selectors.rows).length&&(t.children=[],o(e).children(NestedPages.selectors.lists).children(NestedPages.selectors.rows).each(function(){var e=n.recursiveNesting(this);t.children.push(e)})),t}},(NestedPages=NestedPages||{}).SyncMenuSetting=function(){var t=this,e=jQuery;return t.formatter=new NestedPages.Formatter,t.init=function(){t.bindEvents()},t.bindEvents=function(){e(document).ready(function(){"1"!==nestedpages.manual_menu_sync&&"1"===nestedpages.syncmenu&&t.syncSetting()}),e(document).on("change",NestedPages.selectors.syncCheckbox,function(){t.syncSetting()})},t.syncSetting=function(){"page"===NestedPages.jsData.posttype&&0!==e(NestedPages.selectors.syncCheckbox).length&&(NestedPages.jsData.syncmenu=e(NestedPages.selectors.syncCheckbox).is(":checked")?"sync":"nosync",e.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncMenu,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:NestedPages.jsData.syncmenu},success:function(e){"error"===e.status&&t.formatter.showAjaxError(e.message)},error:function(e){console.log(e)}}))},t.bindEvents()},(NestedPages=NestedPages||{}).NewPost=function(){var r=this,d=jQuery;return r.formatter=new NestedPages.Formatter,r.parent_id=0,r.posts="",r.form="",r.bindEvents=function(){d(document).on("open-modal",function(e,t,a){t=d(t).attr("data-nestedpages-modal-toggle");void 0!==t&&"np-bulk-modal"==t&&r.openModal()}),d(document).on("submit",NestedPages.selectors.newPageForm,function(e){e.preventDefault()}),d(document).on("click",NestedPages.selectors.newPageSubmitButton,function(e){e.preventDefault(),r.submitForm(d(this))}),d(document).on("click",NestedPages.selectors.newPageTitle,function(e){e.preventDefault(),r.addTitleField(d(this))}),d(document).on("click",NestedPages.selectors.newPageRemoveTitle,function(e){e.preventDefault(),r.removeTitleField(d(this))}),d(document).on("click",NestedPages.selectors.addChildButton,function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("click",NestedPages.selectors.cancelNewChildButton,function(e){e.preventDefault(),r.cancelNewPage()}),d(document).on("click","["+NestedPages.selectors.newBeforeButton+"]",function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("click","["+NestedPages.selectors.newAfterButton+"]",function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("keydown",function(e){27===e.keyCode&&(r.cancelNewPage(),d(document).click())})},r.openModal=function(){var e=d(NestedPages.selectors.newPageFormContainer).clone().find(NestedPages.selectors.newPageForm);d(e).addClass("in-modal"),d(NestedPages.selectors.newPageModal).find(".modal-body").html(e),d(NestedPages.selectors.newPageModal).find("h3").text(nestedpages.add_multiple),d(NestedPages.selectors.newPageModal).find(".page_parent_id").val(r.parent_id),d(e).find(".np_title").first().focus(),d(e).find(NestedPages.selectors.newPageTitle).first().prop("tabindex","2")},r.openQuickEdit=function(e){var t,a=void 0!==(a=d(e).attr(NestedPages.selectors.newBeforeButton))&&""!==a&&a,s=void 0!==(s=d(e).attr(NestedPages.selectors.newAfterButton))&&""!==s&&s,n=d(e).closest(NestedPages.selectors.row).parent("li"),o=d(NestedPages.selectors.newPageFormContainer).clone();0<d(n).children("ol").length?(t=d(n).children("ol"),d(o).insertBefore(t)):d(o).appendTo(n),d(o).siblings(NestedPages.selectors.row).hide(),r.formatter.showQuickEdit(),d(o).find(".parent_name").html("<em>Parent:</em> "+d(e).attr("data-parentname")),a||s||d(o).find(".page_parent_id").val(d(e).attr("data-id")),a&&(d(o).find(".page_before_id").val(a),d(o).find("[data-new-post-relation-title]").text(nestedpages.insert_before+": "+d(e).attr("data-parentname"))),s&&(d(o).find(".page_after_id").val(s),d(o).find("[data-new-post-relation-title]").text(nestedpages.insert_after+": "+d(e).attr("data-parentname"))),d(o).show(),d(o).find(".np_title").focus(),d(o).find(NestedPages.selectors.newPageTitle).prop("tabindex","2")},r.cancelNewPage=function(){r.formatter.removeQuickEdit(),d(NestedPages.selectors.newChildError).hide(),d(NestedPages.selectors.newPageModal).find(".modal-body").empty(),d(NestedPages.selectors.sortable).find(".new-child").remove(),d(NestedPages.selectors.row).show()},r.addTitleField=function(e){var t=d(e).parents("form"),a=d(e).siblings(".new-page-titles").children("li").length+1,s='<li><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg><div class="form-control new-child-row"><label>'+NestedPages.jsData.titleText+'</label><div><input type="text" name="post_title[]" class="np_title" placeholder="'+NestedPages.jsData.titleText+'" value="" tabindex="'+a+'" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';d(e).siblings(".new-page-titles").append(s);d(t).find(".np_title").last().focus(),d(t).find(NestedPages.selectors.newPageTitle).prop("tabindex",+a),d(".new-page-titles").sortable({items:"li",handle:".handle"}),r.toggleAddEditButton(t)},r.removeTitleField=function(e){var t=d(e).parents("form");d(e).parents(".new-child-row").parent("li").remove(),r.toggleAddEditButton(t)},r.submitForm=function(e){r.toggleLoading(!0),r.form=d(e).parents("form");var t=!!d(e).hasClass("add-edit"),e=NestedPages.formActions.newPage;""!==d(r.form).find(".page_before_id").val()&&(e=NestedPages.formActions.newBeforeAfter),""!==d(r.form).find(".page_after_id").val()&&(e=NestedPages.formActions.newBeforeAfter),d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:d(r.form).serialize()+"&action="+e+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){if("error"===e.status)return r.toggleLoading(!1),void d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show();!0!=t?(r.toggleLoading(!1),r.posts=e.new_pages,r.addPosts()):(e=(e=e.new_pages[0].edit_link).replace(/&/g,"&"),window.location.replace(e))},error:function(e){console.log(e),r.toggleLoading(!1),d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},r.addPosts=function(){var e,t=""!==(t=d(r.form).find(".page_before_id").val())&&t,a=""!==(a=d(r.form).find(".page_after_id").val())&&a,s=d(r.form).parent(".new-child").parent(".page-row");for(0!==d(s).children("ol").length||t||a||d(s).append('<ol class="nplist"></ol>'),e=d(r.form).hasClass("in-modal")?d(".nplist.sortable li.page-row:first"):d(s).children("ol"),i=0;i<r.posts.length;i++)r.appendRows(e,r.posts[i],t,a);t||a||d(e).show(),r.formatter.updateSubMenuToggle(),r.formatter.setNestedMargins(),r.cancelNewPage(),d(document).trigger("close-modal-manual")},r.appendRows=function(e,t,a,s){var n,o='<li id="menuItem_'+t.id+'" class="page-row';"publish"===t.status&&(o+=" published"),o+='">',NestedPages.jsData.hierarchical?(o+='<div class="row">',o+='<div class="child-toggle"></div>'):(o+='<div class="row non-hierarchical">',o+='<div class="non-hierarchical-spacer"></div>'),o+='<div class="row-inner">',o+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg>',o+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>',o+='<a href="'+t.edit_link+'" class="page-link page-title">',o+='<span class="title">'+t.title+"</span>","Publish"!==t.status?o+='<span class="status">('+t.status+")</span>":o+='<span class="status"></span>',o+='<span class="nav-status">',"hide"===t.np_nav_status&&(o+=" "+nestedpages.hidden),o+="</span>",o+='<span class="edit-indicator">Edit</span>',o+="</a>",NestedPages.jsData.hierarchical||(o+='<div class="np-post-columns">',o+='<ul class="np-post-info">',o+='<li><span class="np-author-display">'+t.author_formatted+"</span></li>",o+="<li>"+t.date_formatted+"</li>",o+="</ul>",o+="</div>"),d(".nplist").first().hasClass("has-yoast")&&(o+='<span class="np-seo-indicator na"></span>'),o+='<div class="action-buttons">',o+='<div class="nestedpages-dropdown" data-dropdown><a href="#" class="np-btn has-icon toggle" data-dropdown-toggle><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></a><ul class="nestedpages-dropdown-content" data-dropdown-content>',o+='<li><a href="#" class="open-redirect-modal" data-parentid="'+t.id+'"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>'+nestedpages.add_link+"</a></li>",o+='<li><a href="#" class="add-new-child" data-id="'+t.id+'" data-parentname="'+t.title+'"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'+nestedpages.add_child_short+"</a></li>",o+="</ul></div>",o+='<a href="#" class="np-btn np-quick-edit" data-id="'+t.id+'" data-template="'+t.page_template+'" data-title="'+t.title+'" data-slug="'+t.slug+'" data-commentstatus="closed" data-status="'+t.status.toLowerCase()+'" data-np-status="show"\tdata-navstatus="show" data-author="'+t.author+'" data-template="'+t.template+'" data-month="'+t.month+'" data-day="'+t.day+'" data-year="'+t.year+'" data-hour="'+t.hour+'" data-minute="'+t.minute+'" data-datepicker="'+t.datepicker+'" data-time="'+t.time+'" data-formattedtime="'+t.formattedtime+'" data-ampm="'+t.ampm+'">'+nestedpages.quick_edit+"</a>",o+='<a href="'+t.view_link+'" class="np-btn" target="_blank">'+nestedpages.view+"</a>",o+='<a href="'+t.delete_link+'" class="np-btn np-btn-trash"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-remove"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" class="icon"/><path d="M0 0h24v24H0z" fill="none"/></svg></a>',o+="</div>\x3c!-- .action-buttons --\x3e",o+="</div>\x3c!-- .row-inner --\x3e</div>\x3c!-- .row --\x3e",o+="</li>",a?(n=r.findRowById(a),d(o).insertBefore(n)):s?(n=r.findRowById(s),d(o).insertAfter(n)):d(e).append(o)},r.findRowById=function(e){return d(NestedPages.selectors.rows+"#menuItem_"+e)},r.toggleAddEditButton=function(e){e=d(e).find(".np_title").length;e<1?d(NestedPages.selectors.newPageSubmitButton).hide():(d(NestedPages.selectors.newPageSubmitButton).show(),1<e?d(NestedPages.selectors.newPageSubmitButton+".add-edit").hide():d(NestedPages.selectors.newPageSubmitButton+".add-edit").show())},r.toggleLoading=function(e){if(e)return d(NestedPages.selectors.quickEditErrorDiv).hide(),d(NestedPages.selectors.newPageSubmitButton).attr("disabled","disabled"),void d(NestedPages.selectors.quickEditLoadingIndicator).show();d(NestedPages.selectors.newPageSubmitButton).attr("disabled",!1),d(NestedPages.selectors.quickEditLoadingIndicator).hide()},r.bindEvents()},(NestedPages=NestedPages||{}).QuickEditPost=function(){var r=this,d=jQuery;return r.formatter=new NestedPages.Formatter,r.button="",r.initialData="",r.parent_li="",r.form="",r.flatTerms="",r.termNames="",r.saveButton="",r.newData="",r.row="",r.bindEvents=function(){d(document).on("click",NestedPages.selectors.quickEditOpen,function(e){e.preventDefault(),r.button=d(this),r.openForm()}),d(document).on("click",NestedPages.selectors.quickEditCancel,function(e){e.preventDefault(),r.formatter.removeQuickEdit()}),d(document).on("change",".keep_private",function(){this.checked?d(".post_password").val("").prop("readonly",!0):d(".post_password").prop("readonly",!1)}),d(document).on("click",NestedPages.selectors.quickEditSaveButton,function(e){e.preventDefault(),r.saveButton=d(this),r.save()}),d(document).on("keydown",function(e){27===e.keyCode&&r.formatter.removeQuickEdit()})},r.openForm=function(){r.setInitialData(),r.createForm(),r.populateForm(),r.populateFlatTaxonomies()},r.setInitialData=function(){r.initialData={id:d(r.button).attr("data-id"),title:d(r.button).attr("data-title"),slug:d(r.button).attr("data-slug"),author:d(r.button).attr("data-author"),cs:d(r.button).attr("data-commentstatus"),status:d(r.button).attr("data-status"),template:d(r.button).attr("data-template"),month:d(r.button).attr("data-month"),day:d(r.button).attr("data-day"),year:d(r.button).attr("data-year"),hour:d(r.button).attr("data-hour"),minute:d(r.button).attr("data-minute"),navstatus:d(r.button).attr("data-navstatus"),npstatus:d(r.button).attr("data-np-status"),navtitle:d(r.button).attr("data-navtitle"),navtitleattr:d(r.button).attr("data-navtitleattr"),navcss:d(r.button).attr("data-navcss"),linktarget:d(r.button).attr("data-linktarget"),password:d(r.button).attr("data-password"),datepicker:d(r.button).attr("data-datepicker"),time:d(r.button).attr("data-formattedtime"),timeTwentyFour:d(r.button).attr("data-time"),ampm:d(r.button).attr("data-ampm"),timeFormat:d(r.button).attr("data-timeformat"),sticky:d(r.button).attr("data-sticky")};var e=d(r.button)[0].attributes;d.each(e,function(e,t){t.name.includes("data-npcustom")&&(r.initialData[t.name]=t.value)}),r.initialData.h_taxonomies=[],r.initialData.f_taxonomies=[],r.parent_li=d(r.button).closest(NestedPages.selectors.row).parent("li");var t=d(r.parent_li).attr("class").split(/\s+/);for(i=0;i<t.length;i++)"in-"===t[i].substring(0,3)&&r.initialData.h_taxonomies.push(t[i]),"inf-"===t[i].substring(0,4)&&r.initialData.f_taxonomies.push(t[i])},r.createForm=function(){var e;r.form=d(NestedPages.selectors.quickEditPostForm).clone(),0<d(r.parent_li).children("ol").length?(e=d(r.parent_li).children("ol"),d(r.form).insertBefore(e)):d(r.form).appendTo(r.parent_li),d(r.form).siblings(NestedPages.selectors.row).hide(),d(r.form).show()},r.populateForm=function(){for(var e in d(r.form).find(".page_id").html("<em>ID:</em> "+r.initialData.id),d(r.form).find(".np_id").val(r.initialData.id),d(r.form).find(".np_title").val(r.initialData.title),d(r.form).find(".np_slug").val(r.initialData.slug),d(r.form).find(".np_author select").val(r.initialData.author),d(r.form).find(".np_status").val(r.initialData.status),d(r.form).find(".np_nav_title").val(r.initialData.navtitle),d(r.form).find(".np_title_attribute").val(r.initialData.navtitleattr),d(r.form).find(".np_nav_css_classes").val(r.initialData.navcss),d(r.form).find(".post_password").val(r.initialData.password),d(r.form).find(".np_publish_date").val(r.initialData.datepicker),"open"===r.initialData.cs&&d(r.form).find(".np_cs").attr("checked","checked"),""!==r.initialData.template?d(r.form).find(".np_template").val(r.initialData.template):d(r.form).find(".np_template").val("default"),"private"===r.initialData.status&&(d(r.form).find(".post_password").attr("readonly",!0),d(r.form).find(".keep_private").attr("checked",!0)),"hide"===r.initialData.npstatus?d(r.form).find(".nested_pages_status").attr("checked","checked"):d(r.form).find(".nested_pages_status").removeAttr("checked"),"hide"===r.initialData.navstatus?d(r.form).find(".np_nav_status").attr("checked","checked"):d(r.form).find(".np_nav_status").attr("checked",!1),"_blank"===r.initialData.linktarget?d(r.form).find(".link_target").attr("checked","checked"):d(r.form).find(".link_target").attr("checked",!1),"private"===r.initialData.status&&d(r.form).find(".np_status").val("publish"),"sticky"===r.initialData.sticky?d(r.form).find(".np-sticky").attr("checked","checked"):d(r.form).find(".np-sticky").removeAttr("checked"),"H:i"===r.initialData.timeFormat?d(r.form).find(".np_time").val(r.initialData.timeTwentyFour):(d(r.form).find(".np_time").val(r.initialData.time),d(r.form).find(".np_ampm").val(r.initialData.ampm),d(r.form).find('select[name="mm"]').val(r.initialData.month),d(r.form).find('input[name="jj"]').val(r.initialData.day),d(r.form).find('input[name="aa"]').val(r.initialData.year),d(r.form).find('input[name="hh"]').val(r.initialData.hour),d(r.form).find('input[name="mn"]').val(r.initialData.minute)),r.initialData){var t;e.includes("npcustom")&&r.initialData.hasOwnProperty(e)&&(t=(t=e.replace("data-npcustom-","")).toLowerCase(),d(r.form).find('[data-np-custom-field="'+t+'"]').val(r.initialData[e]))}if(r.populateFlatTaxonomies(),r.initialData.hasOwnProperty("h_taxonomies")){var a=r.initialData.h_taxonomies;for(i=0;i<a.length;i++){var s="#"+a[i];d(r.form).find(s).attr("checked","checked")}}var n=d(r.form).find(".np_datepicker");d.each(n,function(){var e=d(this);e.datepicker({dateFormat:e.attr("data-datepicker-format"),beforeShow:function(e,t){d("#ui-datepicker-div").addClass("nestedpages-datepicker")}})}),r.formatter.showQuickEdit(),d(r.form).show()},r.populateFlatTaxonomies=function(){r.initialData.hasOwnProperty("f_taxonomies")&&(r.createTaxonomyObject(),r.getTermNames(),r.setWPSuggest())},r.createTaxonomyObject=function(){var e={};for(i=0;i<r.initialData.f_taxonomies.length;i++){var t=r.initialData.f_taxonomies[i],a=t.split("-"),s=a.indexOf("nps"),a=(a=a.splice(s+1)).join("-"),s=t.split("-").splice(0,s);s.shift("inf");s=s.join("-");s in e||(e[s]=[]),e[s].push(a)}r.flatTerms=e},r.getTermNames=function(){d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.getTaxonomies,nonce:NestedPages.jsData.nonce,terms:r.flatTerms},success:function(e){r.termNames=e.terms,r.populateFlatTaxonomyFields()}})},r.populateFlatTaxonomyFields=function(){r.termNames&&d.each(r.termNames,function(e,t){e=d("#"+e+"-quickedit");d(e).val(t.join(","))})},r.setWPSuggest=function(){var e=d(r.form).find("[data-autotag]");d.each(e,function(e,t){var a=d(this).attr("data-taxonomy");d(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})},r.save=function(){r.toggleLoading(!0),d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:d(r.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditPost+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){"error"===e.status?(r.toggleLoading(!1),d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show()):(r.toggleLoading(!1),r.newData=e.post_data,r.updatePostRow())},error:function(e){console.log(e)}})},r.updatePostRow=function(){r.row=d(r.button).parents(".row-inner"),d(r.row).find(".title").text(r.newData.post_title),d(r.row).find(".np-view-button").attr("href",r.newData.permalink);var e,t=d(r.row).find(".status");"publish"!==r.newData._status&&"future"!==r.newData._status?(e=nestedpages.post_statuses[r.newData._status].label,d(t).text("("+e+")")):d(t).text(""),"private"===r.newData.keep_private&&d(t).text(nestedpages.private),""!==r.newData.post_password&&void 0!==r.newData.post_password&&(a=d(t).text(),a+=' <span class="locked">',a+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>',a+="</span>",d(t).html(a));var a=d(r.row).find(".nav-status");"hide"==r.newData.nav_status?d(a).text("(Hidden)"):d(a).text("");a=d(r.row).parent("li");"hide"==r.newData.np_status?(d(a).addClass("np-hide"),d(r.row).find(".status").after('<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>')):(d(a).removeClass("np-hide"),d(r.row).find(".status-np-hidden").remove());a=d(r.row).find(".sticky");"sticky"==r.newData.sticky?d(a).show():d(a).hide(),NestedPages.jsData.hierarchical||d(r.row).find(".np-author-display").text(r.newData.author_name);var s,n,o=d(r.row).find(NestedPages.selectors.quickEditOpen);for(s in d(o).attr("data-id",r.newData.post_id),d(o).attr("data-template",r.newData.page_template),d(o).attr("data-title",r.newData.post_title),d(o).attr("data-slug",r.newData.post_name),d(o).attr("data-commentstatus",r.newData.comment_status),d(o).attr("data-status",r.newData._status),d(o).attr("data-sticky",r.newData.sticky),"private"===r.newData.keep_private&&d(o).attr("data-status","private"),d(o).attr("data-author",r.newData.post_author),d(o).attr("data-np-status",r.newData.np_status),d(o).attr("data-password",r.newData.post_password),d(o).attr("data-navstatus",r.newData.nav_status),d(o).attr("data-navtitle",r.newData.np_nav_title),d(o).attr("data-linktarget",r.newData.link_target),d(o).attr("data-navtitleattr",r.newData.np_title_attribute),d(o).attr("data-navcss",r.newData.np_nav_css_classes),d(o).attr("data-month",r.newData.mm),d(o).attr("data-day",r.newData.jj),d(o).attr("data-year",r.newData.aa),d(o).attr("data-hour",r.newData.hh),d(o).attr("data-minute",r.newData.mn),d(o).attr("data-datepicker",r.newData.np_date),d(o).attr("data-time",r.newData.np_time),d(o).attr("data-formattedtime",r.newData.np_time),d(o).attr("data-ampm",r.newData.np_ampm),r.newData)s.includes("np_custom")&&r.newData.hasOwnProperty(s)&&(n=s.replace("np_custom_","data-npcustom-"),d(o).attr(n,r.newData[s]));r.removeTaxonomyClasses(),r.addCategoryClasses(),r.addHierarchicalClasses(),r.addFlatClasses(),r.addStatusClass(),r.formatter.removeQuickEdit(),r.formatter.flashRow(r.row)},r.addStatusClass=function(){var e=["published","draft","pending","future"];for(i=0;i<e.length;i++)d(r.row).removeClass(e[i]);d(r.row).addClass(r.newData._status)},r.removeTaxonomyClasses=function(){taxonomies=[];var e=d(r.row).attr("class").split(/\s+/);for(i=0;i<e.length;i++)"in-"===e[i].substring(0,3)&&d(r.row).removeClass(e[i]),"inf-"===e[i].substring(0,4)&&d(r.row).removeClass(e[i])},r.addCategoryClasses=function(){if(r.newData.hasOwnProperty("post_category")){var e=r.newData.post_category;for(i=0;i<e.length;i++){var t="in-category-"+e[i];d(r.row).addClass(t)}}},r.addHierarchicalClasses=function(){var e;r.newData.hasOwnProperty("tax_input")&&(e=r.newData.tax_input,d.each(e,function(e,t){for(i=0;i<t.length;i++){var a="in-"+e+"-"+t[i];d(r.row).addClass(a)}}))},r.addFlatClasses=function(){var e;r.newData.hasOwnProperty("flat_tax")&&(e=r.newData.flat_tax,d.each(e,function(e,t){for(i=0;i<t.length;i++){var a="inf-"+e+"-nps-"+t[i];d(r.row).addClass(a)}}))},r.toggleLoading=function(e){if(e)return d(NestedPages.selectors.quickEditErrorDiv).hide(),d(r.saveButton).attr("disabled","disabled"),void d(NestedPages.selectors.quickEditLoadingIndicator).show();d(r.saveButton).attr("disabled",!1),d(NestedPages.selectors.quickEditLoadingIndicator).hide()},r.bindEvents()},(NestedPages=NestedPages||{}).QuickEditLink=function(){var a=this,s=jQuery;return a.formatter=new NestedPages.Formatter,a.button="",a.postData="",a.newPostData="",a.form="",a.bindEvents=function(){s(document).on("click",NestedPages.selectors.quickEditButtonLink,function(e){e.preventDefault(),a.formatter.removeQuickEdit(),a.button=s(this),a.openQuickEdit()}),s(document).on("click",NestedPages.selectors.quickEditLinkSaveButton,function(e){e.preventDefault(),a.submitForm()}),s(document).on("keydown",function(e){27===e.keyCode&&a.formatter.removeQuickEdit()})},a.openQuickEdit=function(){a.setData(),a.createForm(),a.populateForm()},a.setData=function(){a.postData={id:s(a.button).attr("data-id"),url:s(a.button).attr("data-url"),title:s(a.button).attr("data-title"),status:s(a.button).attr("data-status"),navstatus:s(a.button).attr("data-navstatus"),npstatus:s(a.button).attr("data-np-status"),linktarget:s(a.button).attr("data-linktarget"),parentid:s(a.button).attr("data-parentid"),navtitleattr:s(a.button).attr("data-navtitleattr"),navcss:s(a.button).attr("data-navcss"),navtype:s(a.button).attr("data-nav-type"),navobject:s(a.button).attr("data-nav-object"),navobjectid:s(a.button).attr("data-nav-object-id"),navoriginallink:s(a.button).attr("data-nav-original-link"),navoriginaltitle:s(a.button).attr("data-nav-original-title")}},a.createForm=function(){var e,t=s(a.button).closest(NestedPages.selectors.row).parent("li");a.form=s(NestedPages.selectors.quickEditLinkForm).clone(),0<s(t).children("ol").length?(e=s(t).children("ol"),s(a.form).insertBefore(e)):s(a.form).appendTo(t);s(a.form).siblings(NestedPages.selectors.row).hide()},a.populateForm=function(){var e;s(a.form).find(".np_id").val(a.postData.id),s(a.form).find(".np_title").val(a.postData.title),s(a.form).find(".np_author select").val(a.postData.author),s(a.form).find(".np_status").val(a.postData.status),s(a.form).find(".np_content").val(a.postData.url),s(a.form).find(".np_parent_id").val(a.postData.parentid),s(a.form).find(".np_title_attribute").val(a.postData.navtitleattr),s(a.form).find(".np_nav_css_classes").val(a.postData.navcss),"hide"===a.postData.npstatus?s(a.form).find(".np_status").prop("checked","checked"):s(a.form).find(".np_status").removeAttr("checked"),"hide"===a.postData.navstatus?s(a.form).find(".np_nav_status").prop("checked","checked"):s(a.form).find(".np_nav_status").removeAttr("checked"),"_blank"===a.postData.linktarget?s(a.form).find(".link_target").prop("checked","checked"):s(a.form).find(".link_target").removeAttr("checked"),"custom"!==a.postData.navobject&&""!==a.postData.navobject?(e='<div class="form-control original-link">Original: <a href="'+a.postData.navoriginallink+'" target="_blank">'+a.postData.navoriginaltitle+"</a></div>",s(a.form).find("[data-url-field]").remove(),s(e).insertAfter(s(a.form).find("h3")),s(a.form).find("[data-np-menu-object-input]").val(a.postData.navobject),s(a.form).find("[data-np-menu-objectid-input]").val(a.postData.navobjectid),s(a.form).find("[data-np-menu-type-input]").val(a.postData.navtype),s(a.form).find("h3").text("Link: "+a.postData.navoriginaltitle)):(s(a.form).find("h3").text("Link"),s(a.form).find("[data-np-menu-object-input]").val("custom"),s(a.form).find("[data-np-menu-type-input]").val("custom")),a.formatter.showQuickEdit(),s(a.form).show()},a.submitForm=function(){a.toggleLoading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:s(a.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditLink+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){"error"===e.status?(a.toggleLoading(!1),s(a.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show()):(a.toggleLoading(!1),a.newPostData=e.post_data,a.updateRow())},error:function(e){a.toggleLoading(!1),s(a.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},a.updateRow=function(){var e=s(a.form).siblings(".row");s(e).find(".title").html(a.newPostData.post_title+' <svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>');var t=s(e).find(".status");"publish"!==a.newPostData._status&&"future"!==a.newPostData._status?s(t).text("("+a.newPostData._status+")"):s(t).text("");t=s(e).find(".nav-status");"hide"==a.newPostData.nav_status?s(t).text("("+NestedPages.jsData.hiddenText+")"):s(t).text("");t=s(e).parent("li");"hide"==a.newPostData.np_status?(s(t).addClass("np-hide"),s(e).find(".status").after('<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>')):(s(t).removeClass("np-hide"),s(e).find(".status-np-hidden").remove());t=s(e).find(NestedPages.selectors.quickEditButtonLink);s(t).attr("data-id",a.newPostData.post_id),s(t).attr("data-title",a.newPostData.post_title),s(t).attr("data-url",a.newPostData.post_content),s(t).attr("data-status",a.newPostData._status),s(t).attr("data-navstatus",a.newPostData.nav_status),s(t).attr("data-np-status",a.newPostData.np_status),s(t).attr("data-linkTarget",a.newPostData.linkTarget),s(t).attr("data-navtitleattr",a.newPostData.titleAttribute),s(t).attr("data-navcss",a.newPostData.cssClasses),a.formatter.removeQuickEdit(),a.formatter.flashRow(e)},a.toggleLoading=function(e){if(s(".row").removeClass("np-updated").removeClass("np-updated-show"),e)return s(NestedPages.selectors.quickEditErrorDiv).hide(),s(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled","disabled"),void s(NestedPages.selectors.quickEditLoadingIndicator).show();s(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled",!1),s(NestedPages.selectors.quickEditLoadingIndicator).hide()},a.bindEvents()},(NestedPages=NestedPages||{}).Clone=function(){var t=this,a=jQuery;return t.parent_id="",t.parent_title="",t.parentLi=null,t.formatter=new NestedPages.Formatter,t.bindEvents=function(){a(document).on("click",NestedPages.selectors.cloneButton,function(e){e.preventDefault(),t.parent_id=a(this).attr("data-id"),t.parent_title=a(this).attr("data-parentname"),t.parentLi=a(this).parent(".row").parent(".page-row").parent(".npList"),t.openModal()}),a(document).on("click",NestedPages.selectors.confirmClone,function(e){e.preventDefault(),t.clone()})},t.openModal=function(){a("#"+NestedPages.selectors.cloneModal).find("[data-clone-parent]").text(t.parent_title),a(document).trigger("open-modal-manual",NestedPages.selectors.cloneModal)},t.clone=function(){t.toggleLoading(!0),a.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.clonePost,parent_id:t.parent_id,quantity:a(NestedPages.selectors.cloneQuantity).val(),status:a(NestedPages.selectors.cloneStatus).val(),author:a(NestedPages.selectors.cloneAuthor).find("select").val(),nonce:NestedPages.jsData.nonce,posttype:NestedPages.jsData.posttype},success:function(e){t.toggleLoading(!1),a(document).trigger("close-modal-manual"),location.reload()}})},t.toggleLoading=function(e){if(e)return a("#"+NestedPages.selectors.cloneModal).find("[data-clone-loading]").show(),void a(NestedPages.selectors.confirmClone).attr("disabled","disabled");a("#"+NestedPages.selectors.cloneModal).find("[data-clone-loading]").hide(),a(NestedPages.selectors.confirmClone).attr("disabled",!1)},t.bindEvents()},(NestedPages=NestedPages||{}).Tabs=function(){var r=this,d=jQuery;return r.selectors={tabToggle:"data-np-tab-toggle",tabPane:"data-np-tab-pane",tabGroup:"data-np-tab-group"},r.bindEvents=function(){d(document).on("click","["+r.selectors.tabToggle+"]",function(e){e.preventDefault(),r.toggleTabs(d(this))})},r.toggleTabs=function(e){for(var t=d(e).attr(r.selectors.tabGroup),a=d("*["+r.selectors.tabGroup+"="+t+"]["+r.selectors.tabPane+"]"),s=d(e).attr(r.selectors.tabToggle),n=d("*["+r.selectors.tabGroup+"="+t+"]["+r.selectors.tabToggle+"]"),o=[],i=0;i<n.length;i++)o[i]=d(n[i]).parent("li")[0];d(a).hide(),d(n).removeClass("active"),d(o).removeClass("active"),d.each(a,function(){d(this).attr(r.selectors.tabPane)==s&&d(this).show()}),d.each(n,function(){d(this).attr(r.selectors.tabToggle)==s&&(d(this).addClass("active"),d(this).parent("li").addClass("active"))}),d(document).trigger("tabs-changed",[s,t,e])},r.bindEvents()},jQuery(document).ready(function(){new NestedPages.Factory}),(NestedPages=NestedPages||{}).selectors={childToggle:".child-toggle",childToggleLink:".child-toggle a",toggleAll:".nestedpages-toggleall",toggleHidden:".np-toggle-hidden",toggleStatus:".np-toggle-publish",lists:".nplist",rows:".page-row",row:".row",sortable:".sortable",notSortable:".no-sort",handle:".handle",published:".published",hiddenRows:".np-hide",errorDiv:"#np-error",loadingIndicator:"#nested-loading",syncCheckbox:".np-sync-menu",syncForm:".np-sync-menu-cont",ajaxError:"[data-nestedpages-error]",trashWithChildrenButton:"[data-nestedpages-trash-children]",toggleEditButtons:".np-toggle-edit",bulkActionsHeader:".nestedpages-list-header",bulkActionsForm:"[data-np-bulk-form]",bulkActionsCheckbox:"[data-np-bulk-checkbox]",bulkActionsIds:"[data-np-bulk-ids]",bulkActionRedirectIds:"[data-np-bulk-redirect-ids]",hiddenItemCount:"[data-np-hidden-count]",hiddenItemCountParent:"[data-np-hidden-count-parent]",bulkEditForm:"[data-np-bulk-edit-form]",bulkEditTitles:"[data-np-bulk-titles]",bulkEditRemoveItem:"[data-np-remove-bulk-item]",bulkEditCancel:"[data-np-cancel-bulk-edit]",bulkEditLinkCount:"[data-bulk-edit-link-count]",quickEditOverlay:".np-inline-overlay",quickEditLoadingIndicator:".np-qe-loading",quickEditErrorDiv:".np-quickedit-error",quickEditCancel:".np-cancel-quickedit",quickEditButtonLink:".np-quick-edit-redirect",quickEditLinkForm:".quick-edit-form-redirect",quickEditLinkSaveButton:".np-save-quickedit-redirect",quickEditOpen:".np-quick-edit",quickEditPostForm:".quick-edit-form",quickEditSaveButton:".np-save-quickedit",openLinkModal:".open-redirect-modal",linkModal:"np-link-modal",saveLink:".np-save-link",linkLoadingIndicator:".np-link-loading",linkErrorDiv:".np-new-link-error",linkForm:".np-new-link-form",linkDeleteButton:"[data-np-confirm-delete]",linkDeleteConfirmationButton:"[data-delete-confirmation]",linkDeleteConfirmationModal:"np-delete-confirmation-modal",linkDeleteConfirmationModalText:"[data-np-link-delete-text]",openPageModal:".open-bulk-modal",newPageModal:"#np-bulk-modal",newPageFormContainer:".new-child-form",newPageForm:".np-new-child-form",newPageSubmitButton:".np-save-newchild",newPageTitle:".add-new-child-row",newPageRemoveTitle:".np-remove-child",addChildButton:".add-new-child",newChildError:".np-newchild-error",cancelNewChildButton:".np-cancel-newchild",newBeforeButton:"data-insert-before",newAfterButton:"data-insert-after",cloneButton:".clone-post",confirmClone:"[data-confirm-clone]",cloneModal:"np-clone-modal",cloneQuantity:"[data-clone-quantity]",cloneStatus:"[data-clone-status]",cloneAuthor:"[data-clone-author]",tabButtonParent:"[data-np-tabs]",tabButton:"[data-np-tab]",tabContent:"[data-np-tab-pane]",thumbnailContainer:".np-thumbnail",thumbnailContainerLink:".np-thumbnail.link",manualMenuSync:"[data-np-manual-menu-sync]",manualOrderSync:"[data-np-manual-order-sync]"},NestedPages.cssClasses={noborder:"no-border"},NestedPages.jsData={ajaxurl:ajaxurl,nonce:nestedpages.np_nonce,allPostTypes:nestedpages.post_types,syncmenu:"nosync",posttype:"",nestable:!0,sortable:!0,hierarchical:!0,expandText:nestedpages.expand_text,collapseText:nestedpages.collapse_text,showHiddenText:nestedpages.show_hidden,hideHiddenText:nestedpages.hide_hidden,quickEditText:nestedpages.quick_edit,hiddenText:nestedpages.hidden,titleText:nestedpages.title},NestedPages.formActions={syncToggles:"npnestToggle",syncNesting:"npsort",syncMenu:"npsyncMenu",newPage:"npnewChild",newBeforeAfter:"npnewBeforeAfter",quickEditLink:"npquickEditLink",getTaxonomies:"npgetTaxonomies",quickEditPost:"npquickEdit",clonePost:"npclonePost",search:"npmenuSearch",newMenuItem:"npnewMenuItem",manualMenuSync:"npmanualMenuSync",postSearch:"nppostSearch",wpmlTranslations:"npWpmlTranslations",resetSettings:"npresetSettings",resetUserPrefs:"npresetUserPreferences",resetAdminMenuSettings:"npresetAdminMenuSettings",trashWithChildren:"nptrashWithChildren",toggleStatusDisplay:"nptoggleStatusDisplay"},NestedPages.Factory=function(){var t=this,e=jQuery;return t.formatter=new NestedPages.Formatter,t.dropdowns=new NestedPages.Dropdowns,t.modals=new NestedPages.Modals,t.checkAll=new NestedPages.CheckAll,t.bulkActions=new NestedPages.BulkActions,t.menuToggle=new NestedPages.MenuToggle,t.pageToggle=new NestedPages.PageToggle,t.nesting=new NestedPages.Nesting,t.syncMenuSetting=new NestedPages.SyncMenuSetting,t.newPage=new NestedPages.NewPost,t.quickEditLink=new NestedPages.QuickEditLink,t.quickEditPost=new NestedPages.QuickEditPost,t.clone=new NestedPages.Clone,t.tabs=new NestedPages.Tabs,t.menuLinks=new NestedPages.MenuLinks,t.hiddenItemCount=new NestedPages.HiddenItemCount,t.confirmDelete=new NestedPages.ConfirmDelete,t.manualSync=new NestedPages.ManualSync,t.postSearch=new NestedPages.PostSearch,t.postMove=new NestedPages.MovePost,t.wpml=new NestedPages.Wpml,t.trashWithChildren=new NestedPages.TrashWithChildren,t.init=function(){nestedpages.settings_page||(t.bindEvents(),t.setPostType(),t.setMenuSync(),t.setNestable(),t.setSortable(),t.formatter.updateSubMenuToggle(),t.formatter.setBorders(),t.formatter.setNestedMargins(),t.nesting.initializeSortable())},t.bindEvents=function(){e(document).on("click",NestedPages.selectors.quickEditOverlay,function(e){t.formatter.removeQuickEdit(),t.newPage.cancelNewPage()}),e(document).ready(function(){t.formatter.hideAjaxError(),t.formatter.sizeLinkThumbnails()})},t.setNestable=function(){var a=!1;e.each(NestedPages.jsData.allPostTypes,function(e,t){t.name===NestedPages.jsData.posttype&&(!0===t.hierarchical&&(a=!0),!0===t.disable_nesting&&(a=!1))}),NestedPages.jsData.nestable=a},t.setSortable=function(){var a=!0;e.each(NestedPages.jsData.allPostTypes,function(e,t){t.name===NestedPages.jsData.posttype&&void 0!==t.disable_sorting&&""!==t.disable_sorting&&"true"===t.disable_sorting&&(a=!1)}),NestedPages.jsData.sortable=a},t.setPostType=function(){NestedPages.jsData.posttype=nestedpages.current_post_type,void 0!==NestedPages.jsData.posttype&&""!==NestedPages.jsData.posttype||(NestedPages.jsData.posttype=e(NestedPages.selectors.sortable).attr("id").substring(3)),NestedPages.jsData.hierarchical=NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical},t.setMenuSync=function(){NestedPages.jsData.syncmenu="1"===nestedpages.syncmenu?"sync":"nosync"},t.init()},(NestedPages=NestedPages||{}).MenuLinks=function(){var a=this,s=jQuery;return a.typeButton="",a.post="",a.formatter=new NestedPages.Formatter,a.selectors={form:"[data-np-menu-item-form]",typeSelect:"[data-np-menu-selection]",accordion:"[data-np-menu-accordion]",accordionItem:"[data-np-menu-accordion-item]",formPlaceholder:".np-menu-link-object-placeholder",formDetails:".np-menu-link-details",searchResults:"[data-np-search-result]",defaultResults:"[data-default-result]",originalLink:"[data-np-original-link]",saveButton:"[data-np-save-link]",urlInputCont:"[data-np-menu-url-cont]",errorDiv:"[data-np-error]"},a.fields={object:"[data-np-menu-object-input]",objectid:"[data-np-menu-objectid-input]",itemType:"[data-np-menu-type-input]",url:"[data-np-menu-url]",navigationLabel:"[data-np-menu-navigation-label]",titleAttribute:"[data-np-menu-title-attr]",cssClasses:"[data-np-menu-css-classes]",npStatus:"[data-np-menu-np-status]",linkTarget:"[data-np-menu-link-target]",menuTitle:"[data-np-menu-title]",parentPostType:"[data-np-menu-parent-post-type]"},a.search=new NestedPages.MenuSearch,a.bindEvents=function(){s(document).on("click",NestedPages.selectors.openLinkModal,function(e){e.preventDefault(),a.postParent=s(this).attr("data-parentid"),s(a.selectors.form).find(".parent_id").val(s(this).attr("data-parentid")),a.openModal()}),s(document).on("click",a.selectors.accordionItem,function(e){e.preventDefault(),a.accordion(s(this))}),s(document).on("click",a.selectors.typeSelect,function(e){e.preventDefault(),a.typeButton=s(this),a.setLinkType()}),s(document).on("keyup",a.fields.navigationLabel,function(){a.updateTitle()}),s(document).on("click",a.selectors.saveButton,function(e){e.preventDefault(),a.submitForm()}),s(document).on("keydown",function(e){27===e.keyCode&&s(document).trigger("close-modal-manual")})},a.openModal=function(){s(NestedPages.selectors.linkErrorDiv).hide(),s(NestedPages.selectors.linkModal).find("input").val(""),s(NestedPages.selectors.linkModal).find(".parent_id").val(a.postParent),a.clearForm(),s(a.selectors.accordion).find("ul").hide(),s(a.selectors.typeSelect).removeClass("active"),s(document).trigger("open-modal-manual",NestedPages.selectors.linkModal)},a.accordion=function(e){a.clearForm();var t=s(e).siblings("ul");if(s(t).is(":visible"))return s(e).removeClass("active"),void s(t).slideUp("fast");s(a.selectors.accordionItem).removeClass("active"),s(e).addClass("active"),s(e).parents(a.selectors.accordion).find("ul").slideUp("fast"),s(t).slideDown("fast")},a.setLinkType=function(){s(a.typeButton).hasClass("active")?a.clearForm():(s(a.typeButton).hasClass("np-custom-link")&&(s(a.selectors.accordionItem).removeClass("active"),s(a.selectors.accordion).find("ul").slideUp("fast")),s(a.selectors.formPlaceholder).hide(),a.populateForm())},a.populateForm=function(){s(a.selectors.saveButton).show(),s(a.selectors.typeSelect).removeClass("active"),s(a.typeButton).addClass("active"),s(a.fields.menuTitle).text(s(a.typeButton).text()).val(s(a.typeButton).text()),s(a.selectors.form).find("h3").find("em").text(s(a.typeButton).attr("data-np-object-name")),""!==s(a.typeButton).attr("data-np-permalink")?(s(a.selectors.form).find(a.selectors.urlInputCont).hide(),s(a.selectors.form).find(a.selectors.originalLink).html('<a href="'+s(a.typeButton).attr("data-np-permalink")+'">'+s(a.typeButton).text()+"</a>"),s(a.selectors.form).find(a.selectors.originalLink).parent(".original-link").show()):(s(a.selectors.form).find(a.selectors.urlInputCont).show(),s(a.selectors.form).find(a.selectors.originalLink).parent(".original-link").hide()),s(a.fields.object).val(s(a.typeButton).attr("data-np-menu-object")),s(a.fields.objectid).val(s(a.typeButton).attr("data-np-menu-objectid")),s(a.fields.itemType).val(s(a.typeButton).attr("data-np-menu-type")),s(a.selectors.formDetails).show()},a.clearForm=function(){s(a.selectors.form).find(a.selectors.errorDiv).hide(),s(a.selectors.saveButton).hide(),s(a.selectors.formDetails).hide(),s(a.selectors.formPlaceholder).show(),s(a.selectors.form).find("input").not(".parent_id").not(".parent-post-type").val(""),s(a.selectors.form).find(a.fields.linkTarget).val("_blank"),s(a.selectors.form).find('input[type="checkbox"]').attr("checked",!1),s(a.selectors.typeSelect).removeClass("active"),a.search.toggleLoading(!1),s(a.selectors.searchResults).remove(),s(a.selectors.defaultResults).show()},a.updateTitle=function(){var e=s(a.fields.navigationLabel).val(),t=s(a.selectors.form).find("h3").find("span");""!==e?(s(a.fields.menuTitle).val(e),s(t).text(e)):(s(a.fields.menuTitle).val(s(a.typeButton).text()),s(t).text(s(a.typeButton).text()))},a.submitForm=function(){a.toggleLoading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:s(a.selectors.form).serialize()+"&action="+NestedPages.formActions.newMenuItem+"&nonce="+NestedPages.jsData.nonce+"&post_type="+NestedPages.jsData.posttype+"&syncmenu="+NestedPages.jsData.syncmenu,success:function(e){a.toggleLoading(!1),"error"!==e.status?(a.post=e.post_data,a.createRow()):s(a.selectors.form).find(a.selectors.errorDiv).text(e.message).show()},error:function(e){console.log(e)}})},a.createRow=function(){var e='<li id="menuItem_'+a.post.id+'" class="page-row published';e+='">',e+='<div class="row"><div class="child-toggle"><div class="child-toggle-spacer"></div></div><div class="row-inner">',e+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg>',e+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>',e+='<a href="'+a.post.np_link_content+'" class="page-link page-title" target="_blank"><span class="title">'+a.post.menuTitle+' <svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg></span>',e+='</a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ',e+='data-id="'+a.post.id+'"',e+='data-parentid="'+a.post.parent_id+'"',e+='data-title="'+a.post.menuTitle+'" ',e+='data-url="'+a.post.url+'" ',e+='data-status="publish" ',e+='data-np-status="show" ',e+='data-navstatus="show" ',e+='data-navcss="'+a.post.cssClasses+'" ',e+='data-navtitleattr="'+a.post.titleAttribute+'" ',e+='data-nav-type="'+a.post.menuType+'" ',e+='data-nav-object="'+a.post.objectType+'" ',e+='data-nav-object-id="'+a.post.objectId+'" ',e+='data-nav-original-link="'+a.post.original_link+'" ',e+='data-nav-original-title="'+a.post.original_title+'" ',e+='data-linktarget="'+a.post.link_target+'">',e+=NestedPages.jsData.quickEditText,e+="</a>",e+='<a href="'+a.post.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',e+="</div></div></div></li>","0"===a.post.parent_id?s(".nplist:first li:first").after(e):a.appendChildRow(e),s(document).trigger("close-modal-manual"),a.row=s("#menuItem_"+a.post.id).find(".row"),a.formatter.flashRow(a.row)},a.appendChildRow=function(e){var t=s("#menuItem_"+a.post.parent_id);0===s(t).children("ol").length?(e='<ol class="sortable nplist" style="display:block;">'+e+"</ol>",s(t).append(e)):s(t).find("ol:first").prepend(e),a.formatter.updateSubMenuToggle()},a.toggleLoading=function(e){if(e)return s(a.selectors.form).find(a.selectors.errorDiv).hide(),s(a.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).show(),void s(a.selectors.saveButton).attr("disabled","disabled");s(a.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).hide(),s(a.selectors.saveButton).attr("disabled",!1)},a.bindEvents()},(NestedPages=NestedPages||{}).MenuSearch=function(){var s=this,n=jQuery;return s.selectors={searchForms:"*[data-np-menu-search]",defaultResults:"[data-default-result]",loadingIndicator:".np-menu-search-loading",noResults:".np-menu-search-noresults",searchType:"data-search-type",searchObject:"data-search-object",searchResults:"[data-np-search-result]"},s.activeForm="",s.results="",s.defaultResults="",s.searchType="",s.searchObject="",s.init=function(){s.bindEvents()},s.bindEvents=function(){n(document).on("keyup",s.selectors.searchForms,function(){s.activeForm=n(this),n(s.selectors.searchResults).remove(),s.performSearch()})},s.performSearch=function(){if(s.defaultResults=n(s.activeForm).parent("li").siblings(s.selectors.defaultResults),2<n(s.activeForm).val().length)return n(s.defaultResults).hide(),s.toggleLoading(!0),void s.query();s.toggleLoading(!1),n(s.defaultResults).show()},s.query=function(){s.searchType=n(s.activeForm).attr(s.selectors.searchType),s.searchObject=n(s.activeForm).attr(s.selectors.searchObject),n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.search,nonce:NestedPages.jsData.nonce,term:n(s.activeForm).val(),searchType:s.searchType,searchObject:s.searchObject},success:function(e){console.log(e),e.results?(s.results=e.results,s.toggleLoading(!1),"post_type"===s.searchType?s.appendPosts():s.appendTaxonomies()):(s.toggleLoading(!1),n(s.activeForm).siblings(s.selectors.noResults).show())}})},s.appendPosts=function(){var a="";n.each(s.results,function(e,t){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+s.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+t.ID+'" data-np-permalink="'+t.permalink+'" data-np-object-name="'+t.singular_name+'" data-np-menu-selection>'+t.post_title+"</a></li>"}),n(a).insertAfter(n(s.activeForm).parent("li")),s.toggleLoading(!1)},s.appendTaxonomies=function(){var a="";n.each(s.results,function(e,t){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+s.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+t.term_id+'" data-np-permalink="'+t.permalink+'" data-np-object-name="'+t.taxonomy+'" data-np-menu-selection>'+t.name+"</a></li>"}),n(a).insertAfter(n(s.activeForm).parent("li")),s.toggleLoading(!1)},s.toggleLoading=function(e){var t=n(s.activeForm).siblings(s.selectors.loadingIndicator);n(s.selectors.noResults).hide(),e?n(t).show():n(t).hide()},s.init()},jQuery(document).ready(function(){new NestedPagesTrash});var NestedPagesTrash=function(){var t=this,a=jQuery;return t.trashButton=".np-empty-trash",t.confirmButton=".np-trash-confirm",t.warningModal="#np-trash-modal",t.errorAlert="#np-error",t.loadingIndicator="#nested-loading",t.trashLinks=".np-trash-links",t.postType=a("#np-trash-posttype").val(),t.nonce=nestedpages.np_nonce,t.formAction="npEmptyTrash",t.bindEvents=function(){a(document).on("click",t.confirmButton,function(e){e.preventDefault(),t.confirmEmpty()})},t.confirmEmpty=function(){t.loading(!0),a(document).trigger("close-modal-manual"),a(t.errorAlert).hide(),t.emptyTrash()},t.emptyTrash=function(){a.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:t.formAction,nonce:t.nonce,posttype:t.postType},success:function(e){t.loading(!1),"error"===e.status?a(t.errorAlert).text(e.message).show():(a(t.trashLinks).hide(),a(".notice-dismiss").click())}})},t.loading=function(e){e?a(t.loadingIndicator).show():a(t.loadingIndicator).hide()},t.bindEvents()};(NestedPages=NestedPages||{}).ConfirmDelete=function(){var t=this,a=jQuery;return t.deleteLink="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.linkDeleteButton,function(e){e.preventDefault(),t.confirmSingle(a(this))}),a(document).on("click",NestedPages.selectors.linkDeleteConfirmationButton,function(e){e.preventDefault(),a(this).hasClass("bulk")?t.deleteMultiple():t.deleteSingle()}),a(document).on("submit",NestedPages.selectors.bulkActionsForm,function(e){t.confirmMultiple(e)})},t.confirmSingle=function(e){t.deleteLink=a(e).attr("href"),a(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation_singular),a(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.delete).removeClass("bulk"),a(document).trigger("open-modal-manual",NestedPages.selectors.linkDeleteConfirmationModal)},t.confirmMultiple=function(e){"trash"===a('select[name="np_bulk_action"]').val()&&""!==a(NestedPages.selectors.bulkActionRedirectIds).val()&&(e.preventDefault(),a(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation),a(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.trash_delete_links).addClass("bulk"),a(document).trigger("open-modal-manual",[NestedPages.selectors.linkDeleteConfirmationModal]))},t.deleteMultiple=function(){a(NestedPages.selectors.bulkActionsForm)[0].submit()},t.deleteSingle=function(){window.location.replace(t.deleteLink)},t.bindEvents()},(NestedPages=NestedPages||{}).ManualSync=function(){var t=this,a=jQuery;return t.activeBtn="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.manualMenuSync,function(e){e.preventDefault(),t.activeBtn=a(this),t.syncMenu()}),a(document).on("click",NestedPages.selectors.manualOrderSync,function(e){e.preventDefault(),t.activeBtn=a(this),t.syncOrder()})},t.syncMenu=function(){t.loading(!0),a.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.manualMenuSync,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:"sync"},success:function(e){"error"===e.status?(a(NestedPages.selectors.errorDiv).text(e.message).show(),a(NestedPages.selectors.loadingIndicator).hide()):t.loading(!1)}})},t.syncOrder=function(){t.loading(!0),(new NestedPages.Nesting).syncNesting(!0,t.loading(!1))},t.loading=function(e){if(e)return a(t.activeBtn).addClass("disabled"),void a(NestedPages.selectors.loadingIndicator).show();a(t.activeBtn).removeClass("disabled"),a(NestedPages.selectors.loadingIndicator).hide()},t.bindEvents()},(NestedPages=NestedPages||{}).PostSearch=function(){var s=this,n=jQuery;return s.selectors={input:"data-nestedpages-post-search",form:"data-nestedpages-post-search-form",loadingIndicator:"data-nestedpages-loading",noResults:"data-nestedpages-no-results",results:"data-nestedpages-search-results"},s.changed=!1,s.activeInput="",s.results="",s.defaultResults="",s.postType="",s.activeForm="",s.bindEvents=function(){n("["+s.selectors.input+"]").on("input",function(){return s.activeInput=n(this),s.setOptions(),s.changed||s.setDefaultResults(),""===n(this).val()?(n(s.activeForm).find("["+s.selectors.noResults+"]").hide(),void s.showDefaultResults()):void s.query()})},s.setDefaultResults=function(){s.defaultResults=n(s.activeForm).find("["+s.selectors.results+"]").html(),s.changed=!0},s.showDefaultResults=function(){n(s.activeForm).find("["+s.selectors.results+"]").html(s.defaultResults)},s.setOptions=function(){s.postType=n(s.activeInput).attr(s.selectors.input),s.activeForm=n(s.activeInput).parents("["+s.selectors.form+"]")},s.performSearch=function(){if(s.defaultResults=n(s.activeForm).parent("li").siblings(s.selectors.defaultResults),2<n(s.activeForm).val().length)return n(s.defaultResults).hide(),s.toggleLoading(!0),void s.query();s.toggleLoading(!1),n(s.defaultResults).show()},s.query=function(){n(s.activeForm).find("["+s.selectors.results+"]").empty(),s.toggleLoading(!0),n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.postSearch,nonce:NestedPages.jsData.nonce,term:n(s.activeInput).val(),postType:s.postType},success:function(e){e.results?(s.results=e.results,s.loadResults(),s.toggleLoading(!1)):(s.toggleLoading(!1),n(s.activeForm).find("["+s.selectors.noResults+"]").show())}})},s.loadResults=function(){var a="<ul>";n.each(s.results,function(e,t){a+='<li><a href="#" data-assignment-page-id="'+t.ID+'" data-assignment-page-title="'+t.post_title+'">'+t.post_title+"</a></li>"}),a+="</ul>",n(s.activeForm).find("["+s.selectors.results+"]").html(a),s.toggleLoading(!1)},s.toggleLoading=function(e){var t=n(s.activeForm).find("["+s.selectors.loadingIndicator+"]"),a=n(s.activeForm).find("["+s.selectors.noResults+"]");n(a).hide(),e?n(t).show():n(t).hide()},s.bindEvents()},(NestedPages=NestedPages||{}).MovePost=function(){var t=this,a=jQuery;return t.formatter=new NestedPages.Formatter,t.nesting=new NestedPages.Nesting,t.activeRow,t.selectors={moveToTop:"data-push-to-top",moveToBottom:"data-push-to-bottom"},t.bindEvents=function(){a(document).ready(function(){t.disableTopOnFirst(),t.disableBottomOnLast()}),a(document).on("click","["+t.selectors.moveToTop+"]",function(e){e.preventDefault(),a(this).hasClass("disabled")||(t.activeRow=a(this).closest(NestedPages.selectors.rows),t.moveToTop())}),a(document).on("click","["+t.selectors.moveToBottom+"]",function(e){e.preventDefault(),a(this).hasClass("disabled")||(t.activeRow=a(this).closest(NestedPages.selectors.rows),t.moveToBottom())})},t.moveToTop=function(){var e=a(t.activeRow).parent(NestedPages.selectors.lists),e=a(e).find(NestedPages.selectors.rows).first();a(t.activeRow).insertBefore(e),t.formatter.setBorders(),a(document).click(),t.nesting.syncNesting(),t.disableTopOnFirst(),t.disableBottomOnLast()},t.moveToBottom=function(){var e=a(t.activeRow).parent(NestedPages.selectors.lists),e=a(e).children(NestedPages.selectors.rows).last();a(t.activeRow).insertAfter(e),t.formatter.setBorders(),a(document).click(),t.nesting.syncNesting(),t.disableTopOnFirst(),t.disableBottomOnLast()},t.disableTopOnFirst=function(){var e=a(NestedPages.selectors.lists);a.each(e,function(){a(this).find("["+t.selectors.moveToTop+"]").removeClass("disabled");var e=a(this).find(NestedPages.selectors.rows).first();a(e).find("["+t.selectors.moveToTop+"]").addClass("disabled")})},t.disableBottomOnLast=function(){var e=a(NestedPages.selectors.lists);a.each(e,function(){a(this).find("["+t.selectors.moveToBottom+"]").removeClass("disabled");var e=a(this).find(NestedPages.selectors.rows).last();a(e).find("["+t.selectors.moveToBottom+"]").addClass("disabled")})},t.bindEvents()},(NestedPages=NestedPages||{}).TrashWithChildren=function(){var t=this,a=jQuery;return t.post_id="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.trashWithChildrenButton,function(e){e.preventDefault(),t.post_id=a(this).attr("data-post-id"),t.trash()})},t.trash=function(){a.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.trashWithChildren,nonce:NestedPages.jsData.nonce,post_id:t.post_id,screen:nestedpages.current_page},success:function(e){window.location.replace(e.redirect)},error:function(e){console.log(e)}})},t.bindEvents()},(NestedPages=NestedPages||{}).Wpml=function(){var t=this,n=jQuery;return t.button=null,t.postData=null,t.modal=null,t.parent_li=null,t.formatter=new NestedPages.Formatter,t.selectors={translationsBtn:"data-nestedpages-translations",modal:"data-np-wpml-translations-modal",title:"data-wmpl-translation-title",table:"data-np-wpml-translations-modal-table"},t.bindEvents=function(){nestedpages.wpml&&n(document).on("click","["+t.selectors.translationsBtn+"]",function(e){e.preventDefault(),t.createTranslationsModal(n(this))})},t.createTranslationsModal=function(e){t.parent_li=n(e).parents(".action-buttons").closest(NestedPages.selectors.row).parent("li"),t.button=n(t.parent_li).find(NestedPages.selectors.quickEditOpen),t.postData={id:n(t.button).attr("data-id"),title:n(t.button).attr("data-title"),slug:n(t.button).attr("data-slug")},t.modal=n("["+t.selectors.modal+"]").clone(),0<n(t.parent_li).children("ol").length?(e=n(t.parent_li).children("ol"),n(t.modal).insertBefore(e)):n(t.modal).appendTo(t.parent_li),n(t.modal).find("["+t.selectors.title+"]").text(t.postData.title),t.formatter.showQuickEdit(),n(t.modal).show(),t.getTranslationData()},t.getTranslationData=function(){n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.wpmlTranslations,post_id:t.postData.id,nonce:NestedPages.jsData.nonce},success:function(e){console.log(e),console.log(t.postData.id),"success"===e.status?t.populateModal(e.translations):(n(t.modal).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show(),t.toggleLoading(!1))}})},t.populateModal=function(a){var s="<tbody>";n.each(a,function(e,t){e=a[e];s+="<tr>",s+='<td><img src="'+e.country_flag_url+'" alt="'+e.translated_name+'" /> '+e.translated_name+"</td>",s+="<td>",e.has_translation&&e.edit_link?s+='<a href="'+e.edit_link+'">'+e.translation.post_title+" ("+nestedpages.edit+")</a>":s+='<a href="'+e.add_link+'" class="np-btn">+ '+nestedpages.add_translation+"</a>",s+="</td>",s+="</tr>"}),s+="</tbody>",n(t.modal).find("["+t.selectors.table+"]").html(s),t.toggleLoading(!1)},t.toggleLoading=function(e){e?n(t.modal).addClass("loading"):n(t.modal).removeClass("loading")},t.bindEvents()};
|
1 |
+
var NestedPages=NestedPages||{};NestedPages.Formatter=function(){var s=this,i=jQuery;s.updateSubMenuToggle=function(){for(var e=i(NestedPages.selectors.childToggle),t=0;t<e.length;t++){var a,s=e[t],n=i(s).parent(".row").parent("li");0<i(n).children("ol").length?i(n).children("ol").find("li.page-row").length<1?i(n).children("ol").hide():(a='<div class="child-toggle-spacer"></div>',a+='<a href="#"',0<i(n).children("ol:visible").length&&(a+=' class="open"'),a+='><span class="np-icon-arrow"></span></a>',i(s).html(a),0<i(n).children("ol").children(".np-hide").length&&0===i(n).children("ol").children(".np-hide.shown").length?i(s).find("a").hide():0<i(n).children("ol").children(".np-hide").length&&0<i(n).children("ol").children(".np-hide.shown").length&&i(s).find("a").show()):i(s).empty().html('<div class="child-toggle-spacer"></div>')}},s.setBorders=function(){i(NestedPages.selectors.rows).removeClass(NestedPages.cssClasses.noborder),i.each(i(NestedPages.selectors.lists),function(){i(this).find(".page-row:visible:first").addClass(NestedPages.cssClasses.noborder)})},s.setNestedMargins=function(){s.setIndent()},s.setIndent=function(){var n="1"===nestedpages.non_indent?20:30,o="1"===nestedpages.non_indent?".row-inner":".child-toggle";i.each(i(NestedPages.selectors.lists),function(e,t){var a=i(this).parents(NestedPages.selectors.lists).length,s=0;NestedPages.jsData.sortable||(s=10),0<a?(s=a*n+s,i(this).find(o).css("padding-left",s+"px")):(a<1&&i(this).find(o).css("padding-left","0px"),NestedPages.jsData.sortable&&!i(this).hasClass("no-sort")?i(this).find(".row-inner").css("padding-left","0px"):i(this).find(".row-inner").css("padding-left","10px"))})},s.setClassicIndent=function(){i.each(i(NestedPages.selectors.lists),function(e,t){var a=i(this).parents(NestedPages.selectors.lists).length,s=0;NestedPages.jsData.sortable||(s=10),0<a?(s=20*a+s,i(this).find(".row-inner").css("padding-left",s+"px")):NestedPages.jsData.sortable&&!i(this).hasClass("no-sort")?i(this).find(".row-inner").css("padding-left","0px"):i(this).find(".row-inner").css("padding-left","10px")})},s.updatePlaceholderWidth=function(e){var t,a;NestedPages.jsData.nestable&&(t=40*i(e.placeholder).parents("ol").length-40,a=i(NestedPages.selectors.sortable).width()-t,i(e.placeholder).width(a).css("margin-left",t+"px")),s.updateListVisibility(e)},s.updateListVisibility=function(e){e=i(e.placeholder).parent("ol");i(e).is(":visible")||(i(e).addClass("nplist"),i(e).show())},s.removeQuickEdit=function(){i(NestedPages.selectors.quickEditOverlay).removeClass("active").remove(),i(".sortable .quick-edit").remove(),i(".row").show()},s.showQuickEdit=function(){i("body").append('<div class="np-inline-overlay"></div>'),setTimeout(function(){i(".np-inline-overlay").addClass("active")},50)},s.flashRow=function(e){i(e).addClass("np-updated"),s.setBorders(),setTimeout(function(){i(e).addClass("np-updated-show")},1500)},s.showAjaxError=function(e){i(NestedPages.selectors.ajaxError).find("p").text(e),i(NestedPages.selectors.ajaxError).show()},s.hideAjaxError=function(e){i(NestedPages.selectors.ajaxError).hide()},s.sizeLinkThumbnails=function(){var e=i(NestedPages.selectors.thumbnailContainer).not(NestedPages.selectors.thumbnailContainerLink).first().find("img"),t=i(e).width(),a=i(e).height();i.each(i(NestedPages.selectors.thumbnailContainerLink),function(){i(this).width(t),i(this).height(a)})}},(NestedPages=NestedPages||{}).Dropdowns=function(){var t=this,a=jQuery;return t.dropdown="",t.activeBtn="",t.activeContent="",t.toggleBtn="[data-dropdown-toggle]",t.dropdownContainer="[data-dropdown]",t.dropdownContent="[data-dropdown-content]",t.selectors={caret_up:"icon-arrow_drop_up",caret_down:"icon-arrow_drop_down"},t.bindEvents=function(){a(document).on("click",t.toggleBtn,function(e){e.preventDefault(),t.activeBtn=a(this),t.dropdown=a(this).parents(t.dropdownContainer),t.toggleDropdown()}),a(document).on("click",function(e){t.closeDropdowns(e.target)}),a(document).on("dropdown-opened",function(e,t){0<a(t).parents(NestedPages.selectors.row).length&&a(t).parents(NestedPages.selectors.row).addClass("active")}),a(document).on("dropdown-closed",function(){a(NestedPages.selectors.row).removeClass("active")})},t.toggleDropdown=function(){a("."+t.selectors.caret_up).attr("class",t.selectors.caret_down);var e=a(t.dropdown).find(t.dropdownContent);if(t.activeContent=e,a(e).hasClass("active"))return a(e).removeClass("active"),a(t.activeBtn).removeClass("active"),a(t.activeBtn).find("."+t.selectors.caret_up).attr("class",t.selectors.caret_down),void a(document).trigger("dropdown-closed",e);t.setPositioning(),a(t.toggleBtn).removeClass("active"),a(t.dropdownContent).removeClass("active"),a(e).addClass("active"),a(t.activeBtn).find("."+t.selectors.caret_down).attr("class",t.selectors.caret_up),a(t.activeBtn).addClass("active"),a(document).trigger("dropdown-opened",e)},t.setPositioning=function(){var e=a(t.activeBtn).outerHeight();a(t.activeContent).css("top",e+"px")},t.closeDropdowns=function(e){0===a(e).parents(t.dropdownContainer).length&&(a(t.dropdownContent).removeClass("active"),a(t.toggleBtn).removeClass("active"),a(t.activeBtn).find("."+t.selectors.caret_up).attr("class",t.selectors.caret_down),a(document).trigger("dropdown-closed",void 0))},t.bindEvents()},(NestedPages=NestedPages||{}).Modals=function(){var a=this,s=jQuery;return a.activeBtn="",a.activeModal="",a.modalOpen=!1,a.selectors={toggleBtn:"[data-nestedpages-modal-toggle]",backdrop:"[data-nestedpages-modal-backdrop]",closeBtn:"[data-nestedpages-modal-close]",title:"data-nestedpages-modal-title",content:"data-nestedpages-modal-content"},a.bindEvents=function(){s(document).on("click",a.selectors.toggleBtn,function(e){e.preventDefault(),a.activeBtn=s(this),a.openModal()}),s(document).on("click",a.selectors.closeBtn,function(e){e.preventDefault(),a.closeModals()}),s(document).on("open-modal-manual",function(e,t){a.activeModal=s('[data-nestedpages-modal="'+t+'"]'),a.openModal()}),s(document).on("close-modal-manual",function(e){a.closeModals()}),s(document).on("click",a.selectors.backdrop,function(e){a.closeModals()}),s(document).ready(function(){a.checkHash()})},a.openModal=function(){var e;a.modalOpen?a.closeModals():(0<s(a.activeBtn).length&&(e=s(a.activeBtn).attr("data-nestedpages-modal-toggle"),a.activeModal=s('*[data-nestedpages-modal="'+e+'"]')),s(a.activeModal).addClass("active"),a.modalOpen=!0,a.populateModal(),s(document).trigger("open-modal",[a.activeBtn,a.activeModal]))},a.closeModals=function(){a.modalOpen=!1,s("[data-nestedpages-modal]").removeClass("active"),a.activeModal="",a.activeBtn=""},a.populateModal=function(){var e=s(a.activeBtn).attr(a.selectors.title);void 0!==e&&""!==e&&s(a.activeModal).find("[data-nestedpages-modal-title]").text(e);e=s(a.activeBtn).attr(a.selectors.content);void 0!==e&&""!==e&&s(a.activeModal).find("[data-nestedpages-modal-content]").html(e)},a.checkHash=function(){var e;window.location.hash&&"#modal"===window.location.hash.substring(0,6)&&(e=window.location.hash.substring(7),a.activeModal=s('*[data-nestedpages-modal="'+e+'"]'),a.openModal())},a.bindEvents()},(NestedPages=NestedPages||{}).CheckAll=function(){var a=this,s=jQuery;return a.activeCheckbox="",a.selectors={checkbox:"[data-np-check-all]"},a.bindEvents=function(){s(document).on("change",a.selectors.checkbox,function(){a.activeCheckbox=s(this),a.toggleCheckboxes()}),s(document).on("change","input[type=checkbox]",function(){a.checkAllStatus(s(this))})},a.init=function(){a.bindEvents()},a.toggleCheckboxes=function(){var t=!!s(a.activeCheckbox).is(":checked"),e=s(a.activeCheckbox).attr("data-np-check-all"),e=s('*[name="'+e+'"]');s.each(e,function(){var e=s(this).parents(NestedPages.selectors.rows);s(this).prop("checked",t),s(e).hasClass("np-hide")&&!s(e).is(":visible")&&s(e).find(NestedPages.selectors.bulkActionsCheckbox).prop("checked",!1)}),a.toggleCheckAll()},a.toggleCheckAll=function(){var e=s(a.activeCheckbox).attr("data-np-check-all"),t=(t=s('*[name="'+e+'"]').length)-s(".np-hide").find(NestedPages.selectors.bulkActionsCheckbox).length+s(".np-hide:visible").find(NestedPages.selectors.bulkActionsCheckbox).length,e=s('*[name="'+e+'"]:checked').length;if(t==e)return s(a.activeCheckbox).prop("checked",!0),void s(a.activeCheckbox).removeClass("check-all-partial");0<e?s(a.activeCheckbox).addClass("check-all-partial"):(s(a.activeCheckbox).attr("checked",!1),s(a.activeCheckbox).removeClass("check-all-partial"))},a.checkAllStatus=function(e){e=s(e).attr("name"),e=s('*[data-np-check-all="'+e+'"]');0!==e.length&&(a.activeCheckbox=s(e)[0],a.toggleCheckAll())},a.init()},(NestedPages=NestedPages||{}).BulkActions=function(){var n=this,o=jQuery;return n.selectedNumber=0,n.selectedLinks=[],n.selectedPosts=[],n.bindEvents=function(){o(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){n.toggleBulkForm()}),o(document).on("submit",NestedPages.selectors.bulkActionsForm,function(e){"edit"===o("select[name=np_bulk_action]").val()&&(e.preventDefault(),n.toggleBulkEdit(!0))}),o(document).on("click",NestedPages.selectors.bulkEditRemoveItem,function(e){e.preventDefault();e=o(this).siblings("input[type=hidden]").val();n.uncheckBulkItem(e)}),o(document).on("click",NestedPages.selectors.bulkEditCancel,function(e){e.preventDefault(),n.uncheckAllBulkItems()})},n.toggleBulkForm=function(){var t=!1,a="",s="";if(n.selectedPosts=[],n.selectedLinks=[],o.each(o(NestedPages.selectors.bulkActionsCheckbox),function(){var e;o(this).is(":checked")&&(e=o(this).parents(NestedPages.selectors.rows),t=!0,o(this).parent("div").hasClass("np-check-all")||o(e).hasClass("post-type-np-redirect")||(a+=o(this).val()+","),o(e).hasClass("post-type-np-redirect")&&(s+=o(this).val()+",",n.selectedLinks.push(o(this).val())),"np-redirect"===o(this).attr("data-np-post-type")||o(this).parent("div").hasClass("np-check-all")||((e=[]).title=o(this).attr("data-np-bulk-checkbox"),e.id=o(this).val(),n.selectedPosts.push(e)))}),n.setBulkEditPosts(),n.toggleEditOption(),n.toggleLinkCountAlert(),t)return o(NestedPages.selectors.bulkActionsForm).show(),o(NestedPages.selectors.bulkActionsIds).val(a),o(NestedPages.selectors.bulkActionRedirectIds).val(s),void n.setSelectedNumber();o(NestedPages.selectors.bulkActionsIds).val(""),o(NestedPages.selectors.bulkActionsForm).hide()},n.setBulkEditPosts=function(){for(var e="",t=0;t<n.selectedPosts.length;t++)e+='<li><a href="#" class="np-remove" data-np-remove-bulk-item>×</a>',e+=n.selectedPosts[t].title,e+='<input type="hidden" name="post_ids[]" value="'+n.selectedPosts[t].id+'"></li>';o(NestedPages.selectors.bulkEditTitles).html(e)},n.uncheckBulkItem=function(e){o.each(o(NestedPages.selectors.bulkActionsCheckbox),function(){o(this).val()==e&&o(this).prop("checked",!1).change()}),0===o(NestedPages.selectors.bulkEditRemoveItem).length&&n.toggleBulkEdit(!1)},n.uncheckAllBulkItems=function(){o.each(o(NestedPages.selectors.bulkActionsCheckbox),function(){o(this).prop("checked",!1).change()}),n.toggleBulkEdit(!1)},n.setSelectedNumber=function(){var e=o(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").length,t=o(NestedPages.selectors.bulkActionsForm).find("select option").first();o(t).text(nestedpages.bulk_actions+" ("+e+")")},n.toggleEditOption=function(){var e=o(NestedPages.selectors.bulkActionsCheckbox+":checked").not(".np-check-all input").not(".np-redirect-bulk").length,t=o(NestedPages.selectors.bulkActionsForm).find("select option[value=edit]");if(0===e)return o(t).prop("disabled",!0),o(NestedPages.selectors.bulkActionsForm).find("select option").first().prop("selected",!0),void n.toggleBulkEdit(!1);o(t).prop("disabled",!1)},n.toggleBulkEdit=function(e){if(n.toggleLinkCountAlert(),e)return n.disableParentOptions(),o(NestedPages.selectors.bulkEditForm).show(),o(NestedPages.selectors.bulkActionsForm).hide(),void n.setWPSuggest();o(NestedPages.selectors.bulkEditForm).hide(),o(NestedPages.selectors.bulkActionsForm).show(),o(NestedPages.selectors.bulkEditLinkCount).parent("div").hide(),o(NestedPages.selectors.bulkActionsForm).find("select option").first().text(nestedpages.bulk_actions),n.resetBulkEditFields()},n.toggleLinkCountAlert=function(){0!==n.selectedLinks.length?o(NestedPages.selectors.bulkEditLinkCount).parent("div").show():o(NestedPages.selectors.bulkEditLinkCount).parent("div").hide()},n.disableParentOptions=function(){for(var e=o(NestedPages.selectors.bulkEditForm).find("select[name=post_parent]"),t=0;t<n.selectedPosts.length;t++)o(e).find("option[value="+n.selectedPosts[t].id+"]").attr("disabled",!0)},n.setWPSuggest=function(){var e=o(NestedPages.selectors.bulkEditForm).find("[data-autotag]");o.each(e,function(e,t){var a=o(this).attr("data-taxonomy");o(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})},n.resetBulkEditFields=function(){var e=o(NestedPages.selectors.bulkEditForm).find("select");o.each(e,function(){o(this).find("option").first().prop("selected",!0),o(this).find("option").removeAttr("disabled")});e=o(NestedPages.selectors.bulkEditForm).find(".cat-checklist");o.each(e,function(){o(this).find("input[type=checkbox]").prop("checked",!1)})},n.bindEvents()},(NestedPages=NestedPages||{}).HiddenItemCount=function(){var e=this,a=jQuery;return e.init=function(){e.bindEvents()},e.bindEvents=function(){a(document).on("change",NestedPages.selectors.bulkActionsCheckbox,function(){e.toggleHiddenCount()}),a(document).on("click",NestedPages.selectors.toggleAll,function(){e.toggleHiddenCount()}),a(document).on("click",NestedPages.selectors.pageToggle,function(){e.toggleHiddenCount()})},e.toggleHiddenCount=function(){var t=0;a.each(a(NestedPages.selectors.bulkActionsCheckbox),function(){var e;a(this).is(":checked")&&(a(this).parent("div").hasClass("np-check-all")||(e=a(this).closest(".page-row"),a(e).is(":visible")||t++))}),t<1?a(NestedPages.selectors.hiddenItemCountParent).hide():(a(NestedPages.selectors.hiddenItemCount).text(t),a(NestedPages.selectors.hiddenItemCountParent).show())},e.init()},(NestedPages=NestedPages||{}).MenuToggle=function(){var a=this,n=jQuery;return a.formatter=new NestedPages.Formatter,a.bindEvents=function(){n(document).on("click",NestedPages.selectors.childToggleLink,function(e){e.preventDefault(),a.toggleSingleMenu(n(this))}),n(document).on("click",NestedPages.selectors.toggleAll,function(e){e.preventDefault(),a.toggleAllMenus()})},a.toggleSingleMenu=function(e){var t=n(e).parent(NestedPages.selectors.childToggle).parent(NestedPages.selectors.row).siblings("ol");n(e).toggleClass("open"),n(t).toggle(),a.formatter.setBorders(),a.formatter.setNestedMargins(),a.syncUserToggles()},a.toggleAllMenus=function(){var e=NestedPages.selectors.toggleAll;if("closed"===n(e).attr("data-toggle"))return n(NestedPages.selectors.lists).show(),n(e).attr("data-toggle","opened").text(NestedPages.jsData.collapseText),n(NestedPages.selectors.childToggle+" a").addClass("open"),a.formatter.setBorders(),void a.syncUserToggles();n(NestedPages.selectors.lists).not(n(NestedPages.selectors.lists)[0]).hide(),n(e).attr("data-toggle","closed").text(NestedPages.jsData.expandText),n(NestedPages.selectors.childToggle+" a").removeClass("open"),a.formatter.setBorders(),a.syncUserToggles()},a.visibleRowIDs=function(){var s=[],e=n(NestedPages.selectors.rows+":visible");return n.each(e,function(e,t){var a=n(this).attr("id");s.push(a.replace("menuItem_",""))}),s},a.syncUserToggles=function(){n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncToggles,nonce:NestedPages.jsData.nonce,ids:a.visibleRowIDs(),posttype:NestedPages.jsData.posttype},success:function(e){"success"!==e.status&&console.log("There was an error saving toggled pages.")}})},a.bindEvents()},(NestedPages=NestedPages||{}).PageToggle=function(){var a=this,s=jQuery;return a.activeButton="",a.formatter=new NestedPages.Formatter,a.bindEvents=function(){s(document).on("click",NestedPages.selectors.toggleHidden,function(e){e.preventDefault(),a.activeButton=s(this),a.toggleHidden()}),s(document).on("click",NestedPages.selectors.toggleStatus,function(e){e.preventDefault(),a.toggleStatus(s(this))})},a.toggleHidden=function(){var e=s(a.activeButton),t=s(e).attr("href");if("#show"==t)return s(e).attr("href","#hide").text(NestedPages.jsData.showHiddenText),s(NestedPages.selectors.hiddenRows).removeClass("shown").hide(),a.formatter.updateSubMenuToggle(),void a.formatter.setBorders();"#hide"==t&&(s(e).attr("href","#show").text(NestedPages.jsData.hideHiddenText),s(NestedPages.selectors.hiddenRows).addClass("shown").show(),a.formatter.updateSubMenuToggle(),a.formatter.setBorders())},a.toggleStatus=function(e){var t=(t=s(e).attr("href")).substring(1);s(NestedPages.selectors.syncCheckbox).attr("disabled",!1),s(NestedPages.selectors.toggleStatus).removeClass("active"),s(e).addClass("active"),a.saveStatusPreference(t),"draft"==t&&(s(NestedPages.selectors.syncCheckbox).attr("disabled",!0),s("."+t).addClass("nested-visible")),"all"!=t?(s(NestedPages.selectors.rows).hide(),s("."+t).show()):s(NestedPages.selectors.rows).show()},a.saveStatusPreference=function(e){s.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.toggleStatusDisplay,nonce:NestedPages.jsData.nonce,status:e,post_type:NestedPages.jsData.posttype}})},a.bindEvents()},(NestedPages=NestedPages||{}).Nesting=function(){var n=this,o=jQuery;n.formatter=new NestedPages.Formatter,n.initializeSortable=function(){if(!NestedPages.jsData.nestable)return n.initializeSortableFlat();o(NestedPages.selectors.sortable).not(NestedPages.selectors.notSortable).nestedSortable({items:NestedPages.selectors.rows,toleranceElement:"> .row",handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",tabSize:56,isAllowed:function(e,t,a){return!(o(t).hasClass("post-type-np-redirect")&&!o(a).hasClass("post-type-np-redirect"))},start:function(e,t){t.placeholder.height(t.item.height())},sort:function(e,t){n.formatter.updatePlaceholderWidth(t)},stop:function(e,t){setTimeout(function(){n.formatter.updateSubMenuToggle(),n.formatter.setBorders(),n.formatter.setNestedMargins()},100),n.syncNesting()}})},n.initializeSortableFlat=function(){var e=o(NestedPages.selectors.lists).not(NestedPages.selectors.notSortable);o.each(e,function(){o(this).sortable({items:">"+NestedPages.selectors.rows,handle:NestedPages.selectors.handle,placeholder:"ui-sortable-placeholder",forcePlaceholderSize:!0,start:function(e,t){t.placeholder.height(t.item.height())},sort:function(e,t){n.formatter.updatePlaceholderWidth(t)},stop:function(e,t){setTimeout(function(){n.formatter.updateSubMenuToggle(),n.formatter.setBorders(),n.formatter.setNestedMargins()},100),n.syncNesting()}})})},n.disableNesting=function(){o(NestedPages.selectors.sortable).sortable("destroy")},n.syncNesting=function(e,t){var a,s;"1"===nestedpages.manual_order_sync&&!e||(o(NestedPages.selectors.errorDiv).hide(),o(NestedPages.selectors.loadingIndicator).show(),s=!!o(NestedPages.selectors.lists).first().hasClass("filtered"),a=NestedPages.jsData.nestable&&!s?o(NestedPages.selectors.sortable).nestedSortable("toHierarchy",{startDepthCount:0}):n.setNestingArray(),n.disableNesting(),e=NestedPages.jsData.syncmenu,"1"===nestedpages.manual_menu_sync&&(e="nosync"),o.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncNesting,nonce:NestedPages.jsData.nonce,list:a,post_type:NestedPages.jsData.posttype,syncmenu:e,filtered:s},success:function(e,t){n.initializeSortable(),"error"===e.status?(o(NestedPages.selectors.errorDiv).text(e.message).show(),o(NestedPages.selectors.loadingIndicator).hide()):t&&"function"==typeof t?t():o(NestedPages.selectors.loadingIndicator).hide()}}))},n.setNestingArray=function(e){return ret=[],o(NestedPages.selectors.lists).first().children("li.page-row").each(function(){var e=n.recursiveNesting(this);ret.push(e)}),ret},n.recursiveNesting=function(e){var t,a=o(e).attr("id");if(a)return a=a.replace("menuItem_",""),t={id:a},0<o(e).children(NestedPages.selectors.lists).children(NestedPages.selectors.rows).length&&(t.children=[],o(e).children(NestedPages.selectors.lists).children(NestedPages.selectors.rows).each(function(){var e=n.recursiveNesting(this);t.children.push(e)})),t}},(NestedPages=NestedPages||{}).SyncMenuSetting=function(){var t=this,e=jQuery;return t.formatter=new NestedPages.Formatter,t.init=function(){t.bindEvents()},t.bindEvents=function(){e(document).ready(function(){"1"!==nestedpages.manual_menu_sync&&"1"===nestedpages.syncmenu&&t.syncSetting()}),e(document).on("change",NestedPages.selectors.syncCheckbox,function(){t.syncSetting()})},t.syncSetting=function(){"page"===NestedPages.jsData.posttype&&0!==e(NestedPages.selectors.syncCheckbox).length&&(NestedPages.jsData.syncmenu=e(NestedPages.selectors.syncCheckbox).is(":checked")?"sync":"nosync",e.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.syncMenu,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:NestedPages.jsData.syncmenu},success:function(e){"error"===e.status&&t.formatter.showAjaxError(e.message)},error:function(e){console.log(e)}}))},t.bindEvents()},(NestedPages=NestedPages||{}).NewPost=function(){var r=this,d=jQuery;return r.formatter=new NestedPages.Formatter,r.parent_id=0,r.posts="",r.form="",r.bindEvents=function(){d(document).on("open-modal",function(e,t,a){t=d(t).attr("data-nestedpages-modal-toggle");void 0!==t&&"np-bulk-modal"==t&&r.openModal()}),d(document).on("submit",NestedPages.selectors.newPageForm,function(e){e.preventDefault()}),d(document).on("click",NestedPages.selectors.newPageSubmitButton,function(e){e.preventDefault(),r.submitForm(d(this))}),d(document).on("click",NestedPages.selectors.newPageTitle,function(e){e.preventDefault(),r.addTitleField(d(this))}),d(document).on("click",NestedPages.selectors.newPageRemoveTitle,function(e){e.preventDefault(),r.removeTitleField(d(this))}),d(document).on("click",NestedPages.selectors.addChildButton,function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("click",NestedPages.selectors.cancelNewChildButton,function(e){e.preventDefault(),r.cancelNewPage()}),d(document).on("click","["+NestedPages.selectors.newBeforeButton+"]",function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("click","["+NestedPages.selectors.newAfterButton+"]",function(e){e.preventDefault(),r.openQuickEdit(d(this))}),d(document).on("keydown",function(e){27===e.keyCode&&(r.cancelNewPage(),d(document).click())})},r.openModal=function(){var e=d(NestedPages.selectors.newPageFormContainer).clone().find(NestedPages.selectors.newPageForm);d(e).addClass("in-modal"),d(NestedPages.selectors.newPageModal).find(".modal-body").html(e),d(NestedPages.selectors.newPageModal).find("h3").text(nestedpages.add_multiple),d(NestedPages.selectors.newPageModal).find(".page_parent_id").val(r.parent_id),d(e).find(".np_title").first().focus(),d(e).find(NestedPages.selectors.newPageTitle).first().prop("tabindex","2")},r.openQuickEdit=function(e){var t,a=void 0!==(a=d(e).attr(NestedPages.selectors.newBeforeButton))&&""!==a&&a,s=void 0!==(s=d(e).attr(NestedPages.selectors.newAfterButton))&&""!==s&&s,n=d(e).closest(NestedPages.selectors.row).parent("li"),o=d(NestedPages.selectors.newPageFormContainer).clone();0<d(n).children("ol").length?(t=d(n).children("ol"),d(o).insertBefore(t)):d(o).appendTo(n),d(o).siblings(NestedPages.selectors.row).hide(),r.formatter.showQuickEdit(),d(o).find(".parent_name").html("<em>Parent:</em> "+d(e).attr("data-parentname")),a||s||d(o).find(".page_parent_id").val(d(e).attr("data-id")),a&&(d(o).find(".page_before_id").val(a),d(o).find("[data-new-post-relation-title]").text(nestedpages.insert_before+": "+d(e).attr("data-parentname"))),s&&(d(o).find(".page_after_id").val(s),d(o).find("[data-new-post-relation-title]").text(nestedpages.insert_after+": "+d(e).attr("data-parentname"))),d(o).show(),d(o).find(".np_title").focus(),d(o).find(NestedPages.selectors.newPageTitle).prop("tabindex","2")},r.cancelNewPage=function(){r.formatter.removeQuickEdit(),d(NestedPages.selectors.newChildError).hide(),d(NestedPages.selectors.newPageModal).find(".modal-body").empty(),d(NestedPages.selectors.sortable).find(".new-child").remove(),d(NestedPages.selectors.row).show()},r.addTitleField=function(e){var t=d(e).parents("form"),a=d(e).siblings(".new-page-titles").children("li").length+1,s='<li><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg><div class="form-control new-child-row"><label>'+NestedPages.jsData.titleText+'</label><div><input type="text" name="post_title[]" class="np_title" placeholder="'+NestedPages.jsData.titleText+'" value="" tabindex="'+a+'" /><a href="#" class="button-secondary np-remove-child">-</a></div></div></li>';d(e).siblings(".new-page-titles").append(s);d(t).find(".np_title").last().focus(),d(t).find(NestedPages.selectors.newPageTitle).prop("tabindex",+a),d(".new-page-titles").sortable({items:"li",handle:".handle"}),r.toggleAddEditButton(t)},r.removeTitleField=function(e){var t=d(e).parents("form");d(e).parents(".new-child-row").parent("li").remove(),r.toggleAddEditButton(t)},r.submitForm=function(e){r.toggleLoading(!0),r.form=d(e).parents("form");var t=!!d(e).hasClass("add-edit"),e=NestedPages.formActions.newPage;""!==d(r.form).find(".page_before_id").val()&&(e=NestedPages.formActions.newBeforeAfter),""!==d(r.form).find(".page_after_id").val()&&(e=NestedPages.formActions.newBeforeAfter),d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:d(r.form).serialize()+"&action="+e+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){if("error"===e.status)return r.toggleLoading(!1),void d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show();!0!=t?(r.toggleLoading(!1),r.posts=e.new_pages,r.addPosts()):(e=(e=e.new_pages[0].edit_link).replace(/&/g,"&"),window.location.replace(e))},error:function(e){console.log(e),r.toggleLoading(!1),d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},r.addPosts=function(){var e,t=""!==(t=d(r.form).find(".page_before_id").val())&&t,a=""!==(a=d(r.form).find(".page_after_id").val())&&a,s=d(r.form).parent(".new-child").parent(".page-row");for(0!==d(s).children("ol").length||t||a||d(s).append('<ol class="nplist"></ol>'),e=d(r.form).hasClass("in-modal")?d(".nplist.sortable li.page-row:first"):d(s).children("ol"),i=0;i<r.posts.length;i++)r.appendRows(e,r.posts[i],t,a);t||a||d(e).show(),r.formatter.updateSubMenuToggle(),r.formatter.setNestedMargins(),r.cancelNewPage(),d(document).trigger("close-modal-manual")},r.appendRows=function(e,t,a,s){var n,o='<li id="menuItem_'+t.id+'" class="page-row';"publish"===t.status&&(o+=" published"),o+='">',NestedPages.jsData.hierarchical?(o+='<div class="row">',o+='<div class="child-toggle"></div>'):(o+='<div class="row non-hierarchical">',o+='<div class="non-hierarchical-spacer"></div>'),o+='<div class="row-inner">',o+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg>',o+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>',o+='<a href="'+t.edit_link+'" class="page-link page-title">',o+='<span class="title">'+t.title+"</span>","Publish"!==t.status?o+='<span class="status">('+t.status+")</span>":o+='<span class="status"></span>',o+='<span class="nav-status">',"hide"===t.np_nav_status&&(o+=" "+nestedpages.hidden),o+="</span>",o+='<span class="edit-indicator">Edit</span>',o+="</a>",NestedPages.jsData.hierarchical||(o+='<div class="np-post-columns">',o+='<ul class="np-post-info">',o+='<li><span class="np-author-display">'+t.author_formatted+"</span></li>",o+="<li>"+t.date_formatted+"</li>",o+="</ul>",o+="</div>"),d(".nplist").first().hasClass("has-yoast")&&(o+='<span class="np-seo-indicator na"></span>'),o+='<div class="action-buttons">',o+='<div class="nestedpages-dropdown" data-dropdown><a href="#" class="np-btn has-icon toggle" data-dropdown-toggle><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg></a><ul class="nestedpages-dropdown-content" data-dropdown-content>',o+='<li><a href="#" class="open-redirect-modal" data-parentid="'+t.id+'"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>'+nestedpages.add_link+"</a></li>",o+='<li><a href="#" class="add-new-child" data-id="'+t.id+'" data-parentname="'+t.title+'"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'+nestedpages.add_child_short+"</a></li>",o+="</ul></div>",o+='<a href="#" class="np-btn np-quick-edit" data-id="'+t.id+'" data-template="'+t.page_template+'" data-title="'+t.title+'" data-slug="'+t.slug+'" data-commentstatus="closed" data-status="'+t.status.toLowerCase()+'" data-np-status="show"\tdata-navstatus="show" data-author="'+t.author+'" data-template="'+t.template+'" data-month="'+t.month+'" data-day="'+t.day+'" data-year="'+t.year+'" data-hour="'+t.hour+'" data-minute="'+t.minute+'" data-datepicker="'+t.datepicker+'" data-time="'+t.time+'" data-formattedtime="'+t.formattedtime+'" data-ampm="'+t.ampm+'">'+nestedpages.quick_edit+"</a>",o+='<a href="'+t.view_link+'" class="np-btn" target="_blank">'+nestedpages.view+"</a>",o+='<a href="'+t.delete_link+'" class="np-btn np-btn-trash"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-remove"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" class="icon"/><path d="M0 0h24v24H0z" fill="none"/></svg></a>',o+="</div>\x3c!-- .action-buttons --\x3e",o+="</div>\x3c!-- .row-inner --\x3e</div>\x3c!-- .row --\x3e",o+="</li>",a?(n=r.findRowById(a),d(o).insertBefore(n)):s?(n=r.findRowById(s),d(o).insertAfter(n)):d(e).append(o)},r.findRowById=function(e){return d(NestedPages.selectors.rows+"#menuItem_"+e)},r.toggleAddEditButton=function(e){e=d(e).find(".np_title").length;e<1?d(NestedPages.selectors.newPageSubmitButton).hide():(d(NestedPages.selectors.newPageSubmitButton).show(),1<e?d(NestedPages.selectors.newPageSubmitButton+".add-edit").hide():d(NestedPages.selectors.newPageSubmitButton+".add-edit").show())},r.toggleLoading=function(e){if(e)return d(NestedPages.selectors.quickEditErrorDiv).hide(),d(NestedPages.selectors.newPageSubmitButton).attr("disabled","disabled"),void d(NestedPages.selectors.quickEditLoadingIndicator).show();d(NestedPages.selectors.newPageSubmitButton).attr("disabled",!1),d(NestedPages.selectors.quickEditLoadingIndicator).hide()},r.bindEvents()},(NestedPages=NestedPages||{}).QuickEditPost=function(){var r=this,d=jQuery;return r.formatter=new NestedPages.Formatter,r.button="",r.initialData="",r.parent_li="",r.form="",r.flatTerms="",r.termNames="",r.saveButton="",r.newData="",r.row="",r.bindEvents=function(){d(document).on("click",NestedPages.selectors.quickEditOpen,function(e){e.preventDefault(),r.button=d(this),r.openForm()}),d(document).on("click",NestedPages.selectors.quickEditCancel,function(e){e.preventDefault(),r.formatter.removeQuickEdit()}),d(document).on("change",".keep_private",function(){this.checked?d(".post_password").val("").prop("readonly",!0):d(".post_password").prop("readonly",!1)}),d(document).on("click",NestedPages.selectors.quickEditSaveButton,function(e){e.preventDefault(),r.saveButton=d(this),r.save()}),d(document).on("keydown",function(e){27===e.keyCode&&r.formatter.removeQuickEdit()})},r.openForm=function(){r.setInitialData(),r.createForm(),r.populateForm(),r.populateFlatTaxonomies()},r.setInitialData=function(){r.initialData={id:d(r.button).attr("data-id"),title:d(r.button).attr("data-title"),slug:d(r.button).attr("data-slug"),author:d(r.button).attr("data-author"),cs:d(r.button).attr("data-commentstatus"),status:d(r.button).attr("data-status"),template:d(r.button).attr("data-template"),month:d(r.button).attr("data-month"),day:d(r.button).attr("data-day"),year:d(r.button).attr("data-year"),hour:d(r.button).attr("data-hour"),minute:d(r.button).attr("data-minute"),navstatus:d(r.button).attr("data-navstatus"),navCustomUrl:d(r.button).attr("data-custom-url"),npstatus:d(r.button).attr("data-np-status"),navtitle:d(r.button).attr("data-navtitle"),navtitleattr:d(r.button).attr("data-navtitleattr"),navcss:d(r.button).attr("data-navcss"),linktarget:d(r.button).attr("data-linktarget"),password:d(r.button).attr("data-password"),datepicker:d(r.button).attr("data-datepicker"),time:d(r.button).attr("data-formattedtime"),timeTwentyFour:d(r.button).attr("data-time"),ampm:d(r.button).attr("data-ampm"),timeFormat:d(r.button).attr("data-timeformat"),sticky:d(r.button).attr("data-sticky")};var e=d(r.button)[0].attributes;d.each(e,function(e,t){t.name.includes("data-npcustom")&&(r.initialData[t.name]=t.value)}),r.initialData.h_taxonomies=[],r.initialData.f_taxonomies=[],r.parent_li=d(r.button).closest(NestedPages.selectors.row).parent("li");var t=d(r.parent_li).attr("class").split(/\s+/);for(i=0;i<t.length;i++)"in-"===t[i].substring(0,3)&&r.initialData.h_taxonomies.push(t[i]),"inf-"===t[i].substring(0,4)&&r.initialData.f_taxonomies.push(t[i])},r.createForm=function(){var e;r.form=d(NestedPages.selectors.quickEditPostForm).clone(),0<d(r.parent_li).children("ol").length?(e=d(r.parent_li).children("ol"),d(r.form).insertBefore(e)):d(r.form).appendTo(r.parent_li),d(r.form).siblings(NestedPages.selectors.row).hide(),d(r.form).show()},r.populateForm=function(){for(var e in d(r.form).find(".page_id").html("<em>ID:</em> "+r.initialData.id),d(r.form).find(".np_id").val(r.initialData.id),d(r.form).find(".np_title").val(r.initialData.title),d(r.form).find(".np_slug").val(r.initialData.slug),d(r.form).find(".np_author select").val(r.initialData.author),d(r.form).find(".np_status").val(r.initialData.status),d(r.form).find(".np_nav_title").val(r.initialData.navtitle),d(r.form).find(".np_nav_css_classes").val(r.initialData.navcss),d(r.form).find(".np_title_attribute").val(r.initialData.navtitleattr),d(r.form).find(".np_nav_custom_url").val(r.initialData.navCustomUrl),d(r.form).find(".post_password").val(r.initialData.password),d(r.form).find(".np_publish_date").val(r.initialData.datepicker),"open"===r.initialData.cs&&d(r.form).find(".np_cs").attr("checked","checked"),""!==r.initialData.template?d(r.form).find(".np_template").val(r.initialData.template):d(r.form).find(".np_template").val("default"),"private"===r.initialData.status&&(d(r.form).find(".post_password").attr("readonly",!0),d(r.form).find(".keep_private").attr("checked",!0)),"hide"===r.initialData.npstatus?d(r.form).find(".nested_pages_status").attr("checked","checked"):d(r.form).find(".nested_pages_status").removeAttr("checked"),"hide"===r.initialData.navstatus?d(r.form).find(".np_nav_status").attr("checked","checked"):d(r.form).find(".np_nav_status").attr("checked",!1),"_blank"===r.initialData.linktarget?d(r.form).find(".link_target").attr("checked","checked"):d(r.form).find(".link_target").attr("checked",!1),"private"===r.initialData.status&&d(r.form).find(".np_status").val("publish"),"sticky"===r.initialData.sticky?d(r.form).find(".np-sticky").attr("checked","checked"):d(r.form).find(".np-sticky").removeAttr("checked"),"H:i"===r.initialData.timeFormat?d(r.form).find(".np_time").val(r.initialData.timeTwentyFour):(d(r.form).find(".np_time").val(r.initialData.time),d(r.form).find(".np_ampm").val(r.initialData.ampm),d(r.form).find('select[name="mm"]').val(r.initialData.month),d(r.form).find('input[name="jj"]').val(r.initialData.day),d(r.form).find('input[name="aa"]').val(r.initialData.year),d(r.form).find('input[name="hh"]').val(r.initialData.hour),d(r.form).find('input[name="mn"]').val(r.initialData.minute)),r.initialData){var t;e.includes("npcustom")&&r.initialData.hasOwnProperty(e)&&(t=(t=e.replace("data-npcustom-","")).toLowerCase(),d(r.form).find('[data-np-custom-field="'+t+'"]').val(r.initialData[e]))}if(r.populateFlatTaxonomies(),r.initialData.hasOwnProperty("h_taxonomies")){var a=r.initialData.h_taxonomies;for(i=0;i<a.length;i++){var s="#"+a[i];d(r.form).find(s).attr("checked","checked")}}var n=d(r.form).find(".np_datepicker");d.each(n,function(){var e=d(this);e.datepicker({dateFormat:e.attr("data-datepicker-format"),beforeShow:function(e,t){d("#ui-datepicker-div").addClass("nestedpages-datepicker")}})}),r.formatter.showQuickEdit(),d(r.form).show()},r.populateFlatTaxonomies=function(){r.initialData.hasOwnProperty("f_taxonomies")&&(r.createTaxonomyObject(),r.getTermNames(),r.setWPSuggest())},r.createTaxonomyObject=function(){var e={};for(i=0;i<r.initialData.f_taxonomies.length;i++){var t=r.initialData.f_taxonomies[i],a=t.split("-"),s=a.indexOf("nps"),a=(a=a.splice(s+1)).join("-"),s=t.split("-").splice(0,s);s.shift("inf");s=s.join("-");s in e||(e[s]=[]),e[s].push(a)}r.flatTerms=e},r.getTermNames=function(){d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.getTaxonomies,nonce:NestedPages.jsData.nonce,terms:r.flatTerms},success:function(e){r.termNames=e.terms,r.populateFlatTaxonomyFields()}})},r.populateFlatTaxonomyFields=function(){r.termNames&&d.each(r.termNames,function(e,t){e=d("#"+e+"-quickedit");d(e).val(t.join(","))})},r.setWPSuggest=function(){var e=d(r.form).find("[data-autotag]");d.each(e,function(e,t){var a=d(this).attr("data-taxonomy");d(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+a,{multiple:!0,multipleSep:","})})},r.save=function(){r.toggleLoading(!0),d.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:d(r.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditPost+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){"error"===e.status?(r.toggleLoading(!1),d(r.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show()):(r.toggleLoading(!1),r.newData=e.post_data,r.updatePostRow())},error:function(e){console.log(e)}})},r.updatePostRow=function(){r.row=d(r.button).parents(".row-inner"),d(r.row).find(".title").text(r.newData.post_title),d(r.row).find(".np-view-button").attr("href",r.newData.permalink);var e,t=d(r.row).find(".status");"publish"!==r.newData._status&&"future"!==r.newData._status?(e=nestedpages.post_statuses[r.newData._status].label,d(t).text("("+e+")")):d(t).text(""),"private"===r.newData.keep_private&&d(t).text(nestedpages.private),""!==r.newData.post_password&&void 0!==r.newData.post_password&&(a=d(t).text(),a+=' <span class="locked">',a+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>',a+="</span>",d(t).html(a));var a=d(r.row).find(".nav-status");"hide"==r.newData.nav_status?d(a).text("(Hidden)"):d(a).text("");a=d(r.row).parent("li");"hide"==r.newData.np_status?(d(a).addClass("np-hide"),d(r.row).find(".status").after('<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>')):(d(a).removeClass("np-hide"),d(r.row).find(".status-np-hidden").remove());a=d(r.row).find(".sticky");"sticky"==r.newData.sticky?d(a).show():d(a).hide(),NestedPages.jsData.hierarchical||d(r.row).find(".np-author-display").text(r.newData.author_name);var s,n,o=d(r.row).find(NestedPages.selectors.quickEditOpen);for(s in d(o).attr("data-id",r.newData.post_id),d(o).attr("data-template",r.newData.page_template),d(o).attr("data-title",r.newData.post_title),d(o).attr("data-slug",r.newData.post_name),d(o).attr("data-commentstatus",r.newData.comment_status),d(o).attr("data-status",r.newData._status),d(o).attr("data-sticky",r.newData.sticky),"private"===r.newData.keep_private&&d(o).attr("data-status","private"),d(o).attr("data-author",r.newData.post_author),d(o).attr("data-np-status",r.newData.np_status),d(o).attr("data-password",r.newData.post_password),d(o).attr("data-navstatus",r.newData.nav_status),d(o).attr("data-navtitle",r.newData.np_nav_title),d(o).attr("data-linktarget",r.newData.link_target),d(o).attr("data-navtitleattr",r.newData.np_title_attribute),d(o).attr("data-navcss",r.newData.np_nav_css_classes),d(o).attr("data-month",r.newData.mm),d(o).attr("data-day",r.newData.jj),d(o).attr("data-year",r.newData.aa),d(o).attr("data-hour",r.newData.hh),d(o).attr("data-minute",r.newData.mn),d(o).attr("data-datepicker",r.newData.np_date),d(o).attr("data-time",r.newData.np_time),d(o).attr("data-formattedtime",r.newData.np_time),d(o).attr("data-ampm",r.newData.np_ampm),r.newData)s.includes("np_custom")&&r.newData.hasOwnProperty(s)&&(n=s.replace("np_custom_","data-npcustom-"),d(o).attr(n,r.newData[s]));r.removeTaxonomyClasses(),r.addCategoryClasses(),r.addHierarchicalClasses(),r.addFlatClasses(),r.addStatusClass(),r.formatter.removeQuickEdit(),r.formatter.flashRow(r.row)},r.addStatusClass=function(){var e=["published","draft","pending","future"];for(i=0;i<e.length;i++)d(r.row).removeClass(e[i]);d(r.row).addClass(r.newData._status)},r.removeTaxonomyClasses=function(){taxonomies=[];var e=d(r.row).attr("class").split(/\s+/);for(i=0;i<e.length;i++)"in-"===e[i].substring(0,3)&&d(r.row).removeClass(e[i]),"inf-"===e[i].substring(0,4)&&d(r.row).removeClass(e[i])},r.addCategoryClasses=function(){if(r.newData.hasOwnProperty("post_category")){var e=r.newData.post_category;for(i=0;i<e.length;i++){var t="in-category-"+e[i];d(r.row).addClass(t)}}},r.addHierarchicalClasses=function(){var e;r.newData.hasOwnProperty("tax_input")&&(e=r.newData.tax_input,d.each(e,function(e,t){for(i=0;i<t.length;i++){var a="in-"+e+"-"+t[i];d(r.row).addClass(a)}}))},r.addFlatClasses=function(){var e;r.newData.hasOwnProperty("flat_tax")&&(e=r.newData.flat_tax,d.each(e,function(e,t){for(i=0;i<t.length;i++){var a="inf-"+e+"-nps-"+t[i];d(r.row).addClass(a)}}))},r.toggleLoading=function(e){if(e)return d(NestedPages.selectors.quickEditErrorDiv).hide(),d(r.saveButton).attr("disabled","disabled"),void d(NestedPages.selectors.quickEditLoadingIndicator).show();d(r.saveButton).attr("disabled",!1),d(NestedPages.selectors.quickEditLoadingIndicator).hide()},r.bindEvents()},(NestedPages=NestedPages||{}).QuickEditLink=function(){var a=this,s=jQuery;return a.formatter=new NestedPages.Formatter,a.button="",a.postData="",a.newPostData="",a.form="",a.bindEvents=function(){s(document).on("click",NestedPages.selectors.quickEditButtonLink,function(e){e.preventDefault(),a.formatter.removeQuickEdit(),a.button=s(this),a.openQuickEdit()}),s(document).on("click",NestedPages.selectors.quickEditLinkSaveButton,function(e){e.preventDefault(),a.submitForm()}),s(document).on("keydown",function(e){27===e.keyCode&&a.formatter.removeQuickEdit()})},a.openQuickEdit=function(){a.setData(),a.createForm(),a.populateForm()},a.setData=function(){a.postData={id:s(a.button).attr("data-id"),url:s(a.button).attr("data-url"),title:s(a.button).attr("data-title"),status:s(a.button).attr("data-status"),navstatus:s(a.button).attr("data-navstatus"),npstatus:s(a.button).attr("data-np-status"),linktarget:s(a.button).attr("data-linktarget"),parentid:s(a.button).attr("data-parentid"),navtitleattr:s(a.button).attr("data-navtitleattr"),navcss:s(a.button).attr("data-navcss"),navtype:s(a.button).attr("data-nav-type"),navobject:s(a.button).attr("data-nav-object"),navobjectid:s(a.button).attr("data-nav-object-id"),navoriginallink:s(a.button).attr("data-nav-original-link"),navoriginaltitle:s(a.button).attr("data-nav-original-title")}},a.createForm=function(){var e,t=s(a.button).closest(NestedPages.selectors.row).parent("li");a.form=s(NestedPages.selectors.quickEditLinkForm).clone(),0<s(t).children("ol").length?(e=s(t).children("ol"),s(a.form).insertBefore(e)):s(a.form).appendTo(t);s(a.form).siblings(NestedPages.selectors.row).hide()},a.populateForm=function(){var e;s(a.form).find(".np_id").val(a.postData.id),s(a.form).find(".np_title").val(a.postData.title),s(a.form).find(".np_author select").val(a.postData.author),s(a.form).find(".np_status").val(a.postData.status),s(a.form).find(".np_content").val(a.postData.url),s(a.form).find(".np_parent_id").val(a.postData.parentid),s(a.form).find(".np_title_attribute").val(a.postData.navtitleattr),s(a.form).find(".np_nav_css_classes").val(a.postData.navcss),"hide"===a.postData.npstatus?s(a.form).find(".np_status").prop("checked","checked"):s(a.form).find(".np_status").removeAttr("checked"),"hide"===a.postData.navstatus?s(a.form).find(".np_nav_status").prop("checked","checked"):s(a.form).find(".np_nav_status").removeAttr("checked"),"_blank"===a.postData.linktarget?s(a.form).find(".link_target").prop("checked","checked"):s(a.form).find(".link_target").removeAttr("checked"),"custom"!==a.postData.navobject&&""!==a.postData.navobject?(e='<div class="form-control original-link">Original: <a href="'+a.postData.navoriginallink+'" target="_blank">'+a.postData.navoriginaltitle+"</a></div>",s(a.form).find("[data-url-field]").remove(),s(e).insertAfter(s(a.form).find("h3")),s(a.form).find("[data-np-menu-object-input]").val(a.postData.navobject),s(a.form).find("[data-np-menu-objectid-input]").val(a.postData.navobjectid),s(a.form).find("[data-np-menu-type-input]").val(a.postData.navtype),s(a.form).find("h3").text("Link: "+a.postData.navoriginaltitle)):(s(a.form).find("h3").text("Link"),s(a.form).find("[data-np-menu-object-input]").val("custom"),s(a.form).find("[data-np-menu-type-input]").val("custom")),a.formatter.showQuickEdit(),s(a.form).show()},a.submitForm=function(){a.toggleLoading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:s(a.form).find("form").serialize()+"&action="+NestedPages.formActions.quickEditLink+"&nonce="+NestedPages.jsData.nonce+"&syncmenu="+NestedPages.jsData.syncmenu+"&post_type="+NestedPages.jsData.posttype,success:function(e){"error"===e.status?(a.toggleLoading(!1),s(a.form).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show()):(a.toggleLoading(!1),a.newPostData=e.post_data,a.updateRow())},error:function(e){a.toggleLoading(!1),s(a.form).find(NestedPages.selectors.quickEditErrorDiv).text("The form could not be saved at this time.").show()}})},a.updateRow=function(){var e=s(a.form).siblings(".row");s(e).find(".title").html(a.newPostData.post_title+' <svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>');var t=s(e).find(".status");"publish"!==a.newPostData._status&&"future"!==a.newPostData._status?s(t).text("("+a.newPostData._status+")"):s(t).text("");t=s(e).find(".nav-status");"hide"==a.newPostData.nav_status?s(t).text("("+NestedPages.jsData.hiddenText+")"):s(t).text("");t=s(e).parent("li");"hide"==a.newPostData.np_status?(s(t).addClass("np-hide"),s(e).find(".status").after('<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>')):(s(t).removeClass("np-hide"),s(e).find(".status-np-hidden").remove());t=s(e).find(NestedPages.selectors.quickEditButtonLink);s(t).attr("data-id",a.newPostData.post_id),s(t).attr("data-title",a.newPostData.post_title),s(t).attr("data-url",a.newPostData.post_content),s(t).attr("data-status",a.newPostData._status),s(t).attr("data-navstatus",a.newPostData.nav_status),s(t).attr("data-np-status",a.newPostData.np_status),s(t).attr("data-linkTarget",a.newPostData.linkTarget),s(t).attr("data-navtitleattr",a.newPostData.titleAttribute),s(t).attr("data-navcss",a.newPostData.cssClasses),a.formatter.removeQuickEdit(),a.formatter.flashRow(e)},a.toggleLoading=function(e){if(s(".row").removeClass("np-updated").removeClass("np-updated-show"),e)return s(NestedPages.selectors.quickEditErrorDiv).hide(),s(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled","disabled"),void s(NestedPages.selectors.quickEditLoadingIndicator).show();s(NestedPages.selectors.quickEditLinkSaveButton).attr("disabled",!1),s(NestedPages.selectors.quickEditLoadingIndicator).hide()},a.bindEvents()},(NestedPages=NestedPages||{}).Clone=function(){var t=this,a=jQuery;return t.parent_id="",t.parent_title="",t.parentLi=null,t.formatter=new NestedPages.Formatter,t.bindEvents=function(){a(document).on("click",NestedPages.selectors.cloneButton,function(e){e.preventDefault(),t.parent_id=a(this).attr("data-id"),t.parent_title=a(this).attr("data-parentname"),t.parentLi=a(this).parent(".row").parent(".page-row").parent(".npList"),t.openModal()}),a(document).on("click",NestedPages.selectors.confirmClone,function(e){e.preventDefault(),t.clone()})},t.openModal=function(){a("#"+NestedPages.selectors.cloneModal).find("[data-clone-parent]").text(t.parent_title),a(document).trigger("open-modal-manual",NestedPages.selectors.cloneModal)},t.clone=function(){t.toggleLoading(!0),a.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.clonePost,parent_id:t.parent_id,quantity:a(NestedPages.selectors.cloneQuantity).val(),status:a(NestedPages.selectors.cloneStatus).val(),author:a(NestedPages.selectors.cloneAuthor).find("select").val(),nonce:NestedPages.jsData.nonce,posttype:NestedPages.jsData.posttype},success:function(e){t.toggleLoading(!1),a(document).trigger("close-modal-manual"),location.reload()}})},t.toggleLoading=function(e){if(e)return a("#"+NestedPages.selectors.cloneModal).find("[data-clone-loading]").show(),void a(NestedPages.selectors.confirmClone).attr("disabled","disabled");a("#"+NestedPages.selectors.cloneModal).find("[data-clone-loading]").hide(),a(NestedPages.selectors.confirmClone).attr("disabled",!1)},t.bindEvents()},(NestedPages=NestedPages||{}).Tabs=function(){var r=this,d=jQuery;return r.selectors={tabToggle:"data-np-tab-toggle",tabPane:"data-np-tab-pane",tabGroup:"data-np-tab-group"},r.bindEvents=function(){d(document).on("click","["+r.selectors.tabToggle+"]",function(e){e.preventDefault(),r.toggleTabs(d(this))})},r.toggleTabs=function(e){for(var t=d(e).attr(r.selectors.tabGroup),a=d("*["+r.selectors.tabGroup+"="+t+"]["+r.selectors.tabPane+"]"),s=d(e).attr(r.selectors.tabToggle),n=d("*["+r.selectors.tabGroup+"="+t+"]["+r.selectors.tabToggle+"]"),o=[],i=0;i<n.length;i++)o[i]=d(n[i]).parent("li")[0];d(a).hide(),d(n).removeClass("active"),d(o).removeClass("active"),d.each(a,function(){d(this).attr(r.selectors.tabPane)==s&&d(this).show()}),d.each(n,function(){d(this).attr(r.selectors.tabToggle)==s&&(d(this).addClass("active"),d(this).parent("li").addClass("active"))}),d(document).trigger("tabs-changed",[s,t,e])},r.bindEvents()},jQuery(document).ready(function(){new NestedPages.Factory}),(NestedPages=NestedPages||{}).selectors={childToggle:".child-toggle",childToggleLink:".child-toggle a",toggleAll:".nestedpages-toggleall",toggleHidden:".np-toggle-hidden",toggleStatus:".np-toggle-publish",lists:".nplist",rows:".page-row",row:".row",sortable:".sortable",notSortable:".no-sort",handle:".handle",published:".published",hiddenRows:".np-hide",errorDiv:"#np-error",loadingIndicator:"#nested-loading",syncCheckbox:".np-sync-menu",syncForm:".np-sync-menu-cont",ajaxError:"[data-nestedpages-error]",trashWithChildrenButton:"[data-nestedpages-trash-children]",toggleEditButtons:".np-toggle-edit",bulkActionsHeader:".nestedpages-list-header",bulkActionsForm:"[data-np-bulk-form]",bulkActionsCheckbox:"[data-np-bulk-checkbox]",bulkActionsIds:"[data-np-bulk-ids]",bulkActionRedirectIds:"[data-np-bulk-redirect-ids]",hiddenItemCount:"[data-np-hidden-count]",hiddenItemCountParent:"[data-np-hidden-count-parent]",bulkEditForm:"[data-np-bulk-edit-form]",bulkEditTitles:"[data-np-bulk-titles]",bulkEditRemoveItem:"[data-np-remove-bulk-item]",bulkEditCancel:"[data-np-cancel-bulk-edit]",bulkEditLinkCount:"[data-bulk-edit-link-count]",quickEditOverlay:".np-inline-overlay",quickEditLoadingIndicator:".np-qe-loading",quickEditErrorDiv:".np-quickedit-error",quickEditCancel:".np-cancel-quickedit",quickEditButtonLink:".np-quick-edit-redirect",quickEditLinkForm:".quick-edit-form-redirect",quickEditLinkSaveButton:".np-save-quickedit-redirect",quickEditOpen:".np-quick-edit",quickEditPostForm:".quick-edit-form",quickEditSaveButton:".np-save-quickedit",openLinkModal:".open-redirect-modal",linkModal:"np-link-modal",saveLink:".np-save-link",linkLoadingIndicator:".np-link-loading",linkErrorDiv:".np-new-link-error",linkForm:".np-new-link-form",linkDeleteButton:"[data-np-confirm-delete]",linkDeleteConfirmationButton:"[data-delete-confirmation]",linkDeleteConfirmationModal:"np-delete-confirmation-modal",linkDeleteConfirmationModalText:"[data-np-link-delete-text]",openPageModal:".open-bulk-modal",newPageModal:"#np-bulk-modal",newPageFormContainer:".new-child-form",newPageForm:".np-new-child-form",newPageSubmitButton:".np-save-newchild",newPageTitle:".add-new-child-row",newPageRemoveTitle:".np-remove-child",addChildButton:".add-new-child",newChildError:".np-newchild-error",cancelNewChildButton:".np-cancel-newchild",newBeforeButton:"data-insert-before",newAfterButton:"data-insert-after",cloneButton:".clone-post",confirmClone:"[data-confirm-clone]",cloneModal:"np-clone-modal",cloneQuantity:"[data-clone-quantity]",cloneStatus:"[data-clone-status]",cloneAuthor:"[data-clone-author]",tabButtonParent:"[data-np-tabs]",tabButton:"[data-np-tab]",tabContent:"[data-np-tab-pane]",thumbnailContainer:".np-thumbnail",thumbnailContainerLink:".np-thumbnail.link",manualMenuSync:"[data-np-manual-menu-sync]",manualOrderSync:"[data-np-manual-order-sync]"},NestedPages.cssClasses={noborder:"no-border"},NestedPages.jsData={ajaxurl:ajaxurl,nonce:nestedpages.np_nonce,allPostTypes:nestedpages.post_types,syncmenu:"nosync",posttype:"",nestable:!0,sortable:!0,hierarchical:!0,expandText:nestedpages.expand_text,collapseText:nestedpages.collapse_text,showHiddenText:nestedpages.show_hidden,hideHiddenText:nestedpages.hide_hidden,quickEditText:nestedpages.quick_edit,hiddenText:nestedpages.hidden,titleText:nestedpages.title},NestedPages.formActions={syncToggles:"npnestToggle",syncNesting:"npsort",syncMenu:"npsyncMenu",newPage:"npnewChild",newBeforeAfter:"npnewBeforeAfter",quickEditLink:"npquickEditLink",getTaxonomies:"npgetTaxonomies",quickEditPost:"npquickEdit",clonePost:"npclonePost",search:"npmenuSearch",newMenuItem:"npnewMenuItem",manualMenuSync:"npmanualMenuSync",postSearch:"nppostSearch",wpmlTranslations:"npWpmlTranslations",resetSettings:"npresetSettings",resetUserPrefs:"npresetUserPreferences",resetAdminMenuSettings:"npresetAdminMenuSettings",trashWithChildren:"nptrashWithChildren",toggleStatusDisplay:"nptoggleStatusDisplay"},NestedPages.Factory=function(){var t=this,e=jQuery;return t.formatter=new NestedPages.Formatter,t.dropdowns=new NestedPages.Dropdowns,t.modals=new NestedPages.Modals,t.checkAll=new NestedPages.CheckAll,t.bulkActions=new NestedPages.BulkActions,t.menuToggle=new NestedPages.MenuToggle,t.pageToggle=new NestedPages.PageToggle,t.nesting=new NestedPages.Nesting,t.syncMenuSetting=new NestedPages.SyncMenuSetting,t.newPage=new NestedPages.NewPost,t.quickEditLink=new NestedPages.QuickEditLink,t.quickEditPost=new NestedPages.QuickEditPost,t.clone=new NestedPages.Clone,t.tabs=new NestedPages.Tabs,t.menuLinks=new NestedPages.MenuLinks,t.hiddenItemCount=new NestedPages.HiddenItemCount,t.confirmDelete=new NestedPages.ConfirmDelete,t.manualSync=new NestedPages.ManualSync,t.postSearch=new NestedPages.PostSearch,t.postMove=new NestedPages.MovePost,t.wpml=new NestedPages.Wpml,t.trashWithChildren=new NestedPages.TrashWithChildren,t.init=function(){nestedpages.settings_page||(t.bindEvents(),t.setPostType(),t.setMenuSync(),t.setNestable(),t.setSortable(),t.formatter.updateSubMenuToggle(),t.formatter.setBorders(),t.formatter.setNestedMargins(),t.nesting.initializeSortable())},t.bindEvents=function(){e(document).on("click",NestedPages.selectors.quickEditOverlay,function(e){t.formatter.removeQuickEdit(),t.newPage.cancelNewPage()}),e(document).ready(function(){t.formatter.hideAjaxError(),t.formatter.sizeLinkThumbnails()})},t.setNestable=function(){var a=!1;e.each(NestedPages.jsData.allPostTypes,function(e,t){t.name===NestedPages.jsData.posttype&&(!0===t.hierarchical&&(a=!0),!0===t.disable_nesting&&(a=!1))}),NestedPages.jsData.nestable=a},t.setSortable=function(){var a=!0;e.each(NestedPages.jsData.allPostTypes,function(e,t){t.name===NestedPages.jsData.posttype&&void 0!==t.disable_sorting&&""!==t.disable_sorting&&"true"===t.disable_sorting&&(a=!1)}),NestedPages.jsData.sortable=a},t.setPostType=function(){NestedPages.jsData.posttype=nestedpages.current_post_type,void 0!==NestedPages.jsData.posttype&&""!==NestedPages.jsData.posttype||(NestedPages.jsData.posttype=e(NestedPages.selectors.sortable).attr("id").substring(3)),NestedPages.jsData.hierarchical=NestedPages.jsData.allPostTypes[NestedPages.jsData.posttype].hierarchical},t.setMenuSync=function(){NestedPages.jsData.syncmenu="1"===nestedpages.syncmenu?"sync":"nosync"},t.init()},(NestedPages=NestedPages||{}).MenuLinks=function(){var a=this,s=jQuery;return a.typeButton="",a.post="",a.formatter=new NestedPages.Formatter,a.selectors={form:"[data-np-menu-item-form]",typeSelect:"[data-np-menu-selection]",accordion:"[data-np-menu-accordion]",accordionItem:"[data-np-menu-accordion-item]",formPlaceholder:".np-menu-link-object-placeholder",formDetails:".np-menu-link-details",searchResults:"[data-np-search-result]",defaultResults:"[data-default-result]",originalLink:"[data-np-original-link]",saveButton:"[data-np-save-link]",urlInputCont:"[data-np-menu-url-cont]",errorDiv:"[data-np-error]"},a.fields={object:"[data-np-menu-object-input]",objectid:"[data-np-menu-objectid-input]",itemType:"[data-np-menu-type-input]",url:"[data-np-menu-url]",navigationLabel:"[data-np-menu-navigation-label]",titleAttribute:"[data-np-menu-title-attr]",cssClasses:"[data-np-menu-css-classes]",npStatus:"[data-np-menu-np-status]",linkTarget:"[data-np-menu-link-target]",menuTitle:"[data-np-menu-title]",parentPostType:"[data-np-menu-parent-post-type]"},a.search=new NestedPages.MenuSearch,a.bindEvents=function(){s(document).on("click",NestedPages.selectors.openLinkModal,function(e){e.preventDefault(),a.postParent=s(this).attr("data-parentid"),s(a.selectors.form).find(".parent_id").val(s(this).attr("data-parentid")),a.openModal()}),s(document).on("click",a.selectors.accordionItem,function(e){e.preventDefault(),a.accordion(s(this))}),s(document).on("click",a.selectors.typeSelect,function(e){e.preventDefault(),a.typeButton=s(this),a.setLinkType()}),s(document).on("keyup",a.fields.navigationLabel,function(){a.updateTitle()}),s(document).on("click",a.selectors.saveButton,function(e){e.preventDefault(),a.submitForm()}),s(document).on("keydown",function(e){27===e.keyCode&&s(document).trigger("close-modal-manual")})},a.openModal=function(){s(NestedPages.selectors.linkErrorDiv).hide(),s(NestedPages.selectors.linkModal).find("input").val(""),s(NestedPages.selectors.linkModal).find(".parent_id").val(a.postParent),a.clearForm(),s(a.selectors.accordion).find("ul").hide(),s(a.selectors.typeSelect).removeClass("active"),s(document).trigger("open-modal-manual",NestedPages.selectors.linkModal)},a.accordion=function(e){a.clearForm();var t=s(e).siblings("ul");if(s(t).is(":visible"))return s(e).removeClass("active"),void s(t).slideUp("fast");s(a.selectors.accordionItem).removeClass("active"),s(e).addClass("active"),s(e).parents(a.selectors.accordion).find("ul").slideUp("fast"),s(t).slideDown("fast")},a.setLinkType=function(){s(a.typeButton).hasClass("active")?a.clearForm():(s(a.typeButton).hasClass("np-custom-link")&&(s(a.selectors.accordionItem).removeClass("active"),s(a.selectors.accordion).find("ul").slideUp("fast")),s(a.selectors.formPlaceholder).hide(),a.populateForm())},a.populateForm=function(){s(a.selectors.saveButton).show(),s(a.selectors.typeSelect).removeClass("active"),s(a.typeButton).addClass("active"),s(a.fields.menuTitle).text(s(a.typeButton).text()).val(s(a.typeButton).text()),s(a.selectors.form).find("h3").find("em").text(s(a.typeButton).attr("data-np-object-name")),""!==s(a.typeButton).attr("data-np-permalink")?(s(a.selectors.form).find(a.selectors.urlInputCont).hide(),s(a.selectors.form).find(a.selectors.originalLink).html('<a href="'+s(a.typeButton).attr("data-np-permalink")+'">'+s(a.typeButton).text()+"</a>"),s(a.selectors.form).find(a.selectors.originalLink).parent(".original-link").show()):(s(a.selectors.form).find(a.selectors.urlInputCont).show(),s(a.selectors.form).find(a.selectors.originalLink).parent(".original-link").hide()),s(a.fields.object).val(s(a.typeButton).attr("data-np-menu-object")),s(a.fields.objectid).val(s(a.typeButton).attr("data-np-menu-objectid")),s(a.fields.itemType).val(s(a.typeButton).attr("data-np-menu-type")),s(a.selectors.formDetails).show()},a.clearForm=function(){s(a.selectors.form).find(a.selectors.errorDiv).hide(),s(a.selectors.saveButton).hide(),s(a.selectors.formDetails).hide(),s(a.selectors.formPlaceholder).show(),s(a.selectors.form).find("input").not(".parent_id").not(".parent-post-type").val(""),s(a.selectors.form).find(a.fields.linkTarget).val("_blank"),s(a.selectors.form).find('input[type="checkbox"]').attr("checked",!1),s(a.selectors.typeSelect).removeClass("active"),a.search.toggleLoading(!1),s(a.selectors.searchResults).remove(),s(a.selectors.defaultResults).show()},a.updateTitle=function(){var e=s(a.fields.navigationLabel).val(),t=s(a.selectors.form).find("h3").find("span");""!==e?(s(a.fields.menuTitle).val(e),s(t).text(e)):(s(a.fields.menuTitle).val(s(a.typeButton).text()),s(t).text(s(a.typeButton).text()))},a.submitForm=function(){a.toggleLoading(!0),s.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:s(a.selectors.form).serialize()+"&action="+NestedPages.formActions.newMenuItem+"&nonce="+NestedPages.jsData.nonce+"&post_type="+NestedPages.jsData.posttype+"&syncmenu="+NestedPages.jsData.syncmenu,success:function(e){a.toggleLoading(!1),"error"!==e.status?(a.post=e.post_data,a.createRow()):s(a.selectors.form).find(a.selectors.errorDiv).text(e.message).show()},error:function(e){console.log(e)}})},a.createRow=function(){var e='<li id="menuItem_'+a.post.id+'" class="page-row post-type-np-redirect published';e+='">',e+='<div class="row"><div class="child-toggle"><div class="child-toggle-spacer"></div></div><div class="row-inner">',e+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg>',e+='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>',e+='<a href="'+a.post.np_link_content+'" class="page-link page-title" target="_blank"><span class="title">'+a.post.menuTitle+' <svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="icon" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg></span>',e+='</a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ',e+='data-id="'+a.post.id+'"',e+='data-parentid="'+a.post.parent_id+'"',e+='data-title="'+a.post.menuTitle+'" ',e+='data-url="'+a.post.url+'" ',e+='data-status="publish" ',e+='data-np-status="show" ',e+='data-navstatus="show" ',e+='data-navcss="'+a.post.cssClasses+'" ',e+='data-navtitleattr="'+a.post.titleAttribute+'" ',e+='data-nav-type="'+a.post.menuType+'" ',e+='data-nav-object="'+a.post.objectType+'" ',e+='data-nav-object-id="'+a.post.objectId+'" ',e+='data-nav-original-link="'+a.post.original_link+'" ',e+='data-nav-original-title="'+a.post.original_title+'" ',e+='data-linktarget="'+a.post.link_target+'">',e+=NestedPages.jsData.quickEditText,e+="</a>",e+='<a href="'+a.post.delete_link+'" class="np-btn np-btn-trash"><i class="np-icon-remove"></i></a>',e+="</div></div></div></li>","0"===a.post.parent_id?s(".nplist:first li:first").after(e):a.appendChildRow(e),s(document).trigger("close-modal-manual"),a.row=s("#menuItem_"+a.post.id).find(".row"),a.formatter.flashRow(a.row)},a.appendChildRow=function(e){var t=s("#menuItem_"+a.post.parent_id);0===s(t).children("ol").length?(e='<ol class="sortable nplist" style="display:block;">'+e+"</ol>",s(t).append(e)):s(t).find("ol:first").prepend(e),a.formatter.updateSubMenuToggle()},a.toggleLoading=function(e){if(e)return s(a.selectors.form).find(a.selectors.errorDiv).hide(),s(a.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).show(),void s(a.selectors.saveButton).attr("disabled","disabled");s(a.selectors.form).find(NestedPages.selectors.quickEditLoadingIndicator).hide(),s(a.selectors.saveButton).attr("disabled",!1)},a.bindEvents()},(NestedPages=NestedPages||{}).MenuSearch=function(){var s=this,n=jQuery;return s.selectors={searchForms:"*[data-np-menu-search]",defaultResults:"[data-default-result]",loadingIndicator:".np-menu-search-loading",noResults:".np-menu-search-noresults",searchType:"data-search-type",searchObject:"data-search-object",searchResults:"[data-np-search-result]"},s.activeForm="",s.results="",s.defaultResults="",s.searchType="",s.searchObject="",s.init=function(){s.bindEvents()},s.bindEvents=function(){n(document).on("keyup",s.selectors.searchForms,function(){s.activeForm=n(this),n(s.selectors.searchResults).remove(),s.performSearch()})},s.performSearch=function(){if(s.defaultResults=n(s.activeForm).parent("li").siblings(s.selectors.defaultResults),2<n(s.activeForm).val().length)return n(s.defaultResults).hide(),s.toggleLoading(!0),void s.query();s.toggleLoading(!1),n(s.defaultResults).show()},s.query=function(){s.searchType=n(s.activeForm).attr(s.selectors.searchType),s.searchObject=n(s.activeForm).attr(s.selectors.searchObject),n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.search,nonce:NestedPages.jsData.nonce,term:n(s.activeForm).val(),searchType:s.searchType,searchObject:s.searchObject},success:function(e){console.log(e),e.results?(s.results=e.results,s.toggleLoading(!1),"post_type"===s.searchType?s.appendPosts():s.appendTaxonomies()):(s.toggleLoading(!1),n(s.activeForm).siblings(s.selectors.noResults).show())}})},s.appendPosts=function(){var a="";n.each(s.results,function(e,t){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+s.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+t.ID+'" data-np-permalink="'+t.permalink+'" data-np-object-name="'+t.singular_name+'" data-np-menu-selection>'+t.post_title+"</a></li>"}),n(a).insertAfter(n(s.activeForm).parent("li")),s.toggleLoading(!1)},s.appendTaxonomies=function(){var a="";n.each(s.results,function(e,t){a+='<li data-np-search-result><a href="#" data-np-menu-object="'+s.searchObject+'" data-np-menu-type="post_type" data-np-menu-objectid="'+t.term_id+'" data-np-permalink="'+t.permalink+'" data-np-object-name="'+t.taxonomy+'" data-np-menu-selection>'+t.name+"</a></li>"}),n(a).insertAfter(n(s.activeForm).parent("li")),s.toggleLoading(!1)},s.toggleLoading=function(e){var t=n(s.activeForm).siblings(s.selectors.loadingIndicator);n(s.selectors.noResults).hide(),e?n(t).show():n(t).hide()},s.init()},jQuery(document).ready(function(){new NestedPagesTrash});var NestedPagesTrash=function(){var t=this,a=jQuery;return t.trashButton=".np-empty-trash",t.confirmButton=".np-trash-confirm",t.warningModal="#np-trash-modal",t.errorAlert="#np-error",t.loadingIndicator="#nested-loading",t.trashLinks=".np-trash-links",t.postType=a("#np-trash-posttype").val(),t.nonce=nestedpages.np_nonce,t.formAction="npEmptyTrash",t.bindEvents=function(){a(document).on("click",t.confirmButton,function(e){e.preventDefault(),t.confirmEmpty()})},t.confirmEmpty=function(){t.loading(!0),a(document).trigger("close-modal-manual"),a(t.errorAlert).hide(),t.emptyTrash()},t.emptyTrash=function(){a.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:t.formAction,nonce:t.nonce,posttype:t.postType},success:function(e){t.loading(!1),"error"===e.status?a(t.errorAlert).text(e.message).show():(a(t.trashLinks).hide(),a(".notice-dismiss").click())}})},t.loading=function(e){e?a(t.loadingIndicator).show():a(t.loadingIndicator).hide()},t.bindEvents()};(NestedPages=NestedPages||{}).ConfirmDelete=function(){var t=this,a=jQuery;return t.deleteLink="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.linkDeleteButton,function(e){e.preventDefault(),t.confirmSingle(a(this))}),a(document).on("click",NestedPages.selectors.linkDeleteConfirmationButton,function(e){e.preventDefault(),a(this).hasClass("bulk")?t.deleteMultiple():t.deleteSingle()}),a(document).on("submit",NestedPages.selectors.bulkActionsForm,function(e){t.confirmMultiple(e)})},t.confirmSingle=function(e){t.deleteLink=a(e).attr("href"),a(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation_singular),a(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.delete).removeClass("bulk"),a(document).trigger("open-modal-manual",NestedPages.selectors.linkDeleteConfirmationModal)},t.confirmMultiple=function(e){"trash"===a('select[name="np_bulk_action"]').val()&&""!==a(NestedPages.selectors.bulkActionRedirectIds).val()&&(e.preventDefault(),a(NestedPages.selectors.linkDeleteConfirmationModalText).text(nestedpages.link_delete_confirmation),a(NestedPages.selectors.linkDeleteConfirmationButton).text(nestedpages.trash_delete_links).addClass("bulk"),a(document).trigger("open-modal-manual",[NestedPages.selectors.linkDeleteConfirmationModal]))},t.deleteMultiple=function(){a(NestedPages.selectors.bulkActionsForm)[0].submit()},t.deleteSingle=function(){window.location.replace(t.deleteLink)},t.bindEvents()},(NestedPages=NestedPages||{}).ManualSync=function(){var t=this,a=jQuery;return t.activeBtn="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.manualMenuSync,function(e){e.preventDefault(),t.activeBtn=a(this),t.syncMenu()}),a(document).on("click",NestedPages.selectors.manualOrderSync,function(e){e.preventDefault(),t.activeBtn=a(this),t.syncOrder()})},t.syncMenu=function(){t.loading(!0),a.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.manualMenuSync,nonce:NestedPages.jsData.nonce,post_type:NestedPages.jsData.posttype,syncmenu:"sync"},success:function(e){"error"===e.status?(a(NestedPages.selectors.errorDiv).text(e.message).show(),a(NestedPages.selectors.loadingIndicator).hide()):t.loading(!1)}})},t.syncOrder=function(){t.loading(!0),(new NestedPages.Nesting).syncNesting(!0,t.loading(!1))},t.loading=function(e){if(e)return a(t.activeBtn).addClass("disabled"),void a(NestedPages.selectors.loadingIndicator).show();a(t.activeBtn).removeClass("disabled"),a(NestedPages.selectors.loadingIndicator).hide()},t.bindEvents()},(NestedPages=NestedPages||{}).PostSearch=function(){var s=this,n=jQuery;return s.selectors={input:"data-nestedpages-post-search",form:"data-nestedpages-post-search-form",loadingIndicator:"data-nestedpages-loading",noResults:"data-nestedpages-no-results",results:"data-nestedpages-search-results"},s.changed=!1,s.activeInput="",s.results="",s.defaultResults="",s.postType="",s.activeForm="",s.bindEvents=function(){n("["+s.selectors.input+"]").on("input",function(){return s.activeInput=n(this),s.setOptions(),s.changed||s.setDefaultResults(),""===n(this).val()?(n(s.activeForm).find("["+s.selectors.noResults+"]").hide(),void s.showDefaultResults()):void s.query()})},s.setDefaultResults=function(){s.defaultResults=n(s.activeForm).find("["+s.selectors.results+"]").html(),s.changed=!0},s.showDefaultResults=function(){n(s.activeForm).find("["+s.selectors.results+"]").html(s.defaultResults)},s.setOptions=function(){s.postType=n(s.activeInput).attr(s.selectors.input),s.activeForm=n(s.activeInput).parents("["+s.selectors.form+"]")},s.performSearch=function(){if(s.defaultResults=n(s.activeForm).parent("li").siblings(s.selectors.defaultResults),2<n(s.activeForm).val().length)return n(s.defaultResults).hide(),s.toggleLoading(!0),void s.query();s.toggleLoading(!1),n(s.defaultResults).show()},s.query=function(){n(s.activeForm).find("["+s.selectors.results+"]").empty(),s.toggleLoading(!0),n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.postSearch,nonce:NestedPages.jsData.nonce,term:n(s.activeInput).val(),postType:s.postType},success:function(e){e.results?(s.results=e.results,s.loadResults(),s.toggleLoading(!1)):(s.toggleLoading(!1),n(s.activeForm).find("["+s.selectors.noResults+"]").show())}})},s.loadResults=function(){var a="<ul>";n.each(s.results,function(e,t){a+='<li><a href="#" data-assignment-page-id="'+t.ID+'" data-assignment-page-title="'+t.post_title+'">'+t.post_title+"</a></li>"}),a+="</ul>",n(s.activeForm).find("["+s.selectors.results+"]").html(a),s.toggleLoading(!1)},s.toggleLoading=function(e){var t=n(s.activeForm).find("["+s.selectors.loadingIndicator+"]"),a=n(s.activeForm).find("["+s.selectors.noResults+"]");n(a).hide(),e?n(t).show():n(t).hide()},s.bindEvents()},(NestedPages=NestedPages||{}).MovePost=function(){var t=this,a=jQuery;return t.formatter=new NestedPages.Formatter,t.nesting=new NestedPages.Nesting,t.activeRow,t.selectors={moveToTop:"data-push-to-top",moveToBottom:"data-push-to-bottom"},t.bindEvents=function(){a(document).ready(function(){t.disableTopOnFirst(),t.disableBottomOnLast()}),a(document).on("click","["+t.selectors.moveToTop+"]",function(e){e.preventDefault(),a(this).hasClass("disabled")||(t.activeRow=a(this).closest(NestedPages.selectors.rows),t.moveToTop())}),a(document).on("click","["+t.selectors.moveToBottom+"]",function(e){e.preventDefault(),a(this).hasClass("disabled")||(t.activeRow=a(this).closest(NestedPages.selectors.rows),t.moveToBottom())})},t.moveToTop=function(){var e=a(t.activeRow).parent(NestedPages.selectors.lists),e=a(e).find(NestedPages.selectors.rows).first();a(t.activeRow).insertBefore(e),t.formatter.setBorders(),a(document).click(),t.nesting.syncNesting(),t.disableTopOnFirst(),t.disableBottomOnLast()},t.moveToBottom=function(){var e=a(t.activeRow).parent(NestedPages.selectors.lists),e=a(e).children(NestedPages.selectors.rows).last();a(t.activeRow).insertAfter(e),t.formatter.setBorders(),a(document).click(),t.nesting.syncNesting(),t.disableTopOnFirst(),t.disableBottomOnLast()},t.disableTopOnFirst=function(){var e=a(NestedPages.selectors.lists);a.each(e,function(){a(this).find("["+t.selectors.moveToTop+"]").removeClass("disabled");var e=a(this).find(NestedPages.selectors.rows).first();a(e).find("["+t.selectors.moveToTop+"]").addClass("disabled")})},t.disableBottomOnLast=function(){var e=a(NestedPages.selectors.lists);a.each(e,function(){a(this).find("["+t.selectors.moveToBottom+"]").removeClass("disabled");var e=a(this).find(NestedPages.selectors.rows).last();a(e).find("["+t.selectors.moveToBottom+"]").addClass("disabled")})},t.bindEvents()},(NestedPages=NestedPages||{}).TrashWithChildren=function(){var t=this,a=jQuery;return t.post_id="",t.bindEvents=function(){a(document).on("click",NestedPages.selectors.trashWithChildrenButton,function(e){e.preventDefault(),t.post_id=a(this).attr("data-post-id"),t.trash()})},t.trash=function(){a.ajax({url:NestedPages.jsData.ajaxurl,type:"post",data:{action:NestedPages.formActions.trashWithChildren,nonce:NestedPages.jsData.nonce,post_id:t.post_id,screen:nestedpages.current_page},success:function(e){window.location.replace(e.redirect)},error:function(e){console.log(e)}})},t.bindEvents()},(NestedPages=NestedPages||{}).Wpml=function(){var t=this,n=jQuery;return t.button=null,t.postData=null,t.modal=null,t.parent_li=null,t.formatter=new NestedPages.Formatter,t.selectors={translationsBtn:"data-nestedpages-translations",modal:"data-np-wpml-translations-modal",title:"data-wmpl-translation-title",table:"data-np-wpml-translations-modal-table"},t.bindEvents=function(){nestedpages.wpml&&n(document).on("click","["+t.selectors.translationsBtn+"]",function(e){e.preventDefault(),t.createTranslationsModal(n(this))})},t.createTranslationsModal=function(e){t.parent_li=n(e).parents(".action-buttons").closest(NestedPages.selectors.row).parent("li"),t.button=n(t.parent_li).find(NestedPages.selectors.quickEditOpen),t.postData={id:n(t.button).attr("data-id"),title:n(t.button).attr("data-title"),slug:n(t.button).attr("data-slug")},t.modal=n("["+t.selectors.modal+"]").clone(),0<n(t.parent_li).children("ol").length?(e=n(t.parent_li).children("ol"),n(t.modal).insertBefore(e)):n(t.modal).appendTo(t.parent_li),n(t.modal).find("["+t.selectors.title+"]").text(t.postData.title),t.formatter.showQuickEdit(),n(t.modal).show(),t.getTranslationData()},t.getTranslationData=function(){n.ajax({url:NestedPages.jsData.ajaxurl,type:"post",datatype:"json",data:{action:NestedPages.formActions.wpmlTranslations,post_id:t.postData.id,nonce:NestedPages.jsData.nonce},success:function(e){console.log(e),console.log(t.postData.id),"success"===e.status?t.populateModal(e.translations):(n(t.modal).find(NestedPages.selectors.quickEditErrorDiv).text(e.message).show(),t.toggleLoading(!1))}})},t.populateModal=function(a){var s="<tbody>";n.each(a,function(e,t){e=a[e];s+="<tr>",s+='<td><img src="'+e.country_flag_url+'" alt="'+e.translated_name+'" /> '+e.translated_name+"</td>",s+="<td>",e.has_translation&&e.edit_link?s+='<a href="'+e.edit_link+'">'+e.translation.post_title+" ("+nestedpages.edit+")</a>":s+='<a href="'+e.add_link+'" class="np-btn">+ '+nestedpages.add_translation+"</a>",s+="</td>",s+="</tr>"}),s+="</tbody>",n(t.modal).find("["+t.selectors.table+"]").html(s),t.toggleLoading(!1)},t.toggleLoading=function(e){e?n(t.modal).addClass("loading"):n(t.modal).removeClass("loading")},t.bindEvents()};
|
nestedpages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Nested Pages
|
4 |
Plugin URI: http://nestedpages.com
|
5 |
Description: Provides an intuitive drag and drop interface for managing pages in the Wordpress admin, while enhancing quick edit. Includes an auto-generated menu to match the nested interface, support for all post types and more.
|
6 |
-
Version: 3.
|
7 |
Author: Kyle Phillips
|
8 |
Author URI: https://github.com/kylephillips
|
9 |
Text Domain: wp-nested-pages
|
3 |
Plugin Name: Nested Pages
|
4 |
Plugin URI: http://nestedpages.com
|
5 |
Description: Provides an intuitive drag and drop interface for managing pages in the Wordpress admin, while enhancing quick edit. Includes an auto-generated menu to match the nested interface, support for all post types and more.
|
6 |
+
Version: 3.2.0
|
7 |
Author: Kyle Phillips
|
8 |
Author URI: https://github.com/kylephillips
|
9 |
Text Domain: wp-nested-pages
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: pages, admin, nested, tree view, page tree, sort, quick edit, structure
|
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.4
|
8 |
-
Stable tag: 3.1.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -105,6 +105,12 @@ No. The menu synchronization currently only works within the pages post type.
|
|
105 |
|
106 |
== Changelog ==
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
= 3.1.22 =
|
109 |
* Fixes deprecation notice from new Yoast release
|
110 |
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.4
|
8 |
+
Stable tag: 3.1.22
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
105 |
|
106 |
== Changelog ==
|
107 |
|
108 |
+
= 3.2.0 =
|
109 |
+
* Resolves issue where post_updated action was not firing after reordering of nested view.
|
110 |
+
* Adds ability to save a custom URL for pages in the nav menu (Example: outputting an anchor link rather than the page's link). To add a custom link, select quick edit, followed by the "Menu Options" tab. There is a new "Custom URL" input.
|
111 |
+
* Corrects previous version's Yoast indicator display.
|
112 |
+
* Fixes bug where padding was not reset correctly when dragging a sub-level item to the primary/main level
|
113 |
+
|
114 |
= 3.1.22 =
|
115 |
* Fixes deprecation notice from new Yoast release
|
116 |
|